feat: support STORAGE_PATH_PREFIX for global storage key namespacing#35320
Open
feat: support STORAGE_PATH_PREFIX for global storage key namespacing#35320
Conversation
Add STORAGE_PATH_PREFIX config field and apply prefix in Storage wrapper for all operations (save, load, download, exists, delete, scan). Scan strips prefix from results to prevent double-prefixing. Aliyun OSS disables its own folder prefix when STORAGE_PATH_PREFIX is set.
8 tasks
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly DiffNo changes detected. |
Contributor
Pyrefly DiffNo changes detected. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #35320 +/- ##
==========================================
+ Coverage 83.89% 84.82% +0.92%
==========================================
Files 4189 4274 +85
Lines 177118 194564 +17446
Branches 35433 36555 +1122
==========================================
+ Hits 148597 165038 +16441
- Misses 25630 26421 +791
- Partials 2891 3105 +214
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
STORAGE_PATH_PREFIXconfig field toStorageConfigStoragewrapper for all operations (save, load, download, exists, delete, scan)scan()results to prevent double-prefixing for callersSTORAGE_PATH_PREFIXis set (priority: global > backend-specific)..segments in prefixresolve ENG-44
Test plan
STORAGE_PATH_PREFIXis setscan()returns paths without the prefix..in prefix raises ValueError