Merged
Conversation
* Fixed SQLite storage backend not creating directories necessary, unlike the filestore did prior. * Added initialization error to sqlite for better error handling and parsing. * Readded tests deleted with file store.
The former file store used a pooled connection. The new sqlite storage backend uses one as well now. This enables multithreaded operations on providers.
There was a problem hiding this comment.
Pull Request Overview
This PR fixes unit test failures that occurred after migrating from sled to SQLite as the storage backend. The changes address thread safety issues, directory creation problems, and improve error handling for the SQLite storage implementation.
- Migrated SQLite backend to use connection pooling for thread safety
- Added specialized initialization errors and directory creation for SQLite
- Updated test logging configuration to reduce noise from dependencies
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/storage/storage_backend/sqlite_store.rs | Major refactor to use connection pooling, add proper error types, and include tests |
| src/storage/storage_backend/mod.rs | Update error type import and remove manual directory creation from tests |
| src/storage/mod.rs | Switch storage tests to use shared test store configuration |
| src/tests/mod.rs | Improve logging configuration with better error handling and default filters |
| Cargo.toml | Add r2d2 connection pooling dependencies and remove direct rusqlite dependency |
| cSpell.json | Add SQLite-related terms to spell checker dictionary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses regressions stemming from the switch to sqlite from sled.
Added:
Fixed:
Changed:
Checklist:
cargo test -F softwaresoftwaretpm/androidtpm/apple_secure_enclave./ts-typesneeds to be updated?crypto-layer-nodea heads up?node_modules,lib,targetand everything in.gitignore)