Repository navigation
refactor(storage): organise vector, analytics and lifecycle code by domain - #913
Merged
Merged
Conversation
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.
Why
Storage/Common/held 36 files from three unrelated domains: file buckets (lifecycle), vector buckets, and analytics buckets with their Iceberg catalog. An analytics type knows nothing about vectors, and the reverse is also true. This PR puts each domain's types together, so a domain reads as one folder.The PR only moves files. Nothing behaves differently, and no type or member is renamed. Folders and namespaces drop the redundant domain prefix (
CreateVectorBucket/becomesVectorBuckets/CreateBucket/), but type names keep it (VectorBucketSummary,ListAnalyticsBucketsOptions).Layout
VectorBuckets/AnalyticsBuckets/FileBuckets, notVectors/Analytics, becauseIStorageClienthas properties calledVectorsandAnalytics(CONVENTIONS §2: never name a folder after a name in scope).Supabase.Storage.VectorBuckets.CreateBucketandSupabase.Storage.AnalyticsBuckets.Iceberg.Common.Storage.Testshas the same tree. Test folders,Data/fixtures and Verify.verified.txtsnapshots moved with their production counterparts. Test-only use-case folders moved into their domain (DeleteBucketLifecycletoFileBuckets/,AccessVectorIndextoVectorBuckets/AccessIndex/, andDeleteNamespace,LoadTable,NamespaceExistsandTableExiststoAnalyticsBuckets/Iceberg/).Support/stays shared.Nothing breaking
PublicAPI.Shipped.txt. Shipped file-bucket code (Bucket,FileObject,IStorageBucketApi,StorageBucketApi, ...) stays where it is, and the lifecycle members stay onIStorageBucketApi. Only the types those members reference moved.PublicAPI.Shipped.txtis unchanged.PublicAPI.Unshipped.txt: each of the 722 changed entries is the old entry with only its namespace rewritten. The record members the code fixer can drop (<Clone>$,Equals, operators) are all still there. The gate's public API diff signal reports these entries as "722 REMOVED". It compares namespaces of unshipped types, and those types have never been released..verified.txtsits next to its test class, and no snapshot was regenerated or orphaned.usings and namespaces, the only edits are the JSON fixture paths inStorage.Tests.csprojand theirPath.Combinereaders, one fully-qualifiedIIcebergCatalogreference in a test, and one cref (Interfaces.IVectorBucket.GetIndexAsyncbecameIVectorBucket.GetIndexAsync).Cross-domain types
None. No moved type is used by more than one domain.
PathSegmentandQueryStringstay inStorage/Common/as approved. Today only analytics buckets and the Iceberg catalog use them:PathSegmentis used byAnalyticsBucketName,IcebergNamespaceandIcebergTable, andQueryStringby the Iceberg list queries. That does not match the new rule that the product'sCommon/holds only what two domains share. If you want them to follow their usages,PathSegmentwould move toAnalyticsBuckets/Common/andQueryStringtoAnalyticsBuckets/Iceberg/Common/.Verification
gate.sh packages/Storage --fast: PARTIAL (exit 0). Build at baseline, format clean, 752/752 Unit + Contract tests pass, public API declared.