You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the default Usage/Audit SQLite database from the workspace root into the workspace _system area so runtime data follows the same internal-storage layout as QueueFS.
Related Issue
N/A
Type of Change
Bug fix (non-breaking change that fixes an issue)
New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Documentation update
Refactoring (no functional changes)
Performance improvement
Test update
Changes Made
Updated the default Usage/Audit SQLite path to <workspace>/_system/usage_audit/usage_audit.sqlite3.
The new default SQLite path includes nested directories (_system/usage_audit/), but the code does not ensure these directories exist before opening the database. This will cause a failure when the SQLite store attempts to create the database file if the parent directories are missing.
Ensure parent directories for the SQLite path exist, both for the configured and default cases, to avoid FileNotFoundError when opening the database. Use mkdir(parents=True, exist_ok=True) on the path's parent.
Why: The suggestion addresses a possible FileNotFoundError by ensuring parent directories exist for the SQLite path, which is particularly relevant with the new deeper default path. The improved code correctly refactors the function to create the parent directory for both configured and default cases.
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
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.
Description
Move the default Usage/Audit SQLite database from the workspace root into the workspace
_systemarea so runtime data follows the same internal-storage layout as QueueFS.Related Issue
N/A
Type of Change
Changes Made
<workspace>/_system/usage_audit/usage_audit.sqlite3.server.observability.usage_audit.sqlite_pathbehavior unchanged.Testing
Ran:
Note: local pre-commit hook could not run because it is installed against system Python without the
pre_commitmodule.Checklist
Screenshots (if applicable)
N/A
Additional Notes
This change does not add legacy path migration because Usage/Audit has not been formally released yet.