Repository navigation
feat(storage): list analytics buckets - #856
Merged
Merged
Conversation
Tr00d
marked this pull request as ready for review
November 25, 2026 06:43
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
A caller can list the project's analytics (Apache Iceberg) buckets through
storage.Analytics.ListBucketsAsync, with optional pagination, sort and search.Capability:
storage.analytics.list_analytics_buckets- List Analytics Buckets. No capability spec exists; the contract is the storage routeGET /iceberg/bucketand its source.Public API
AnalyticsBucketmoves fromSupabase.Storage.CreateAnalyticsBuckettoSupabase.Storage.Common, now that create and list both return it. It has not shipped in a release (still inPublicAPI.Unshipped.txt), so the move breaks no released caller; the gate's public-API diff reports it as 16 removals for that reason.Behavior
GET {storageUrl}/iceberg/bucket, no body. Requires a service-role key; headers are read at call time.limit,offset,sortColumn(name/created_at/updated_at),sortOrder(asc/desc, ascending unless specified),search(escaped as one query value). Without options, no query is sent and the service applies its defaults: every bucket, sorted byname ASC.AnalyticsBucketSortColumnvalue throwsArgumentOutOfRangeException. Pagination ranges (limit >= 1,offset >= 0) are validated by the service (400).IReadOnlyList<AnalyticsBucket>(name,created_at,updated_at;idis dropped, it always equalsname). A JSONnullbody maps to an empty list; an empty success body is not a listing and surfaces asSupabaseStorageException, as for create.SupabaseStorageExceptionthrough the existing hint mapping (400 out-of-range pagination, 401NotAuthorized, 403 feature not enabled, 500Internal). The Iceberg error envelope carries no top-levelstatusCode, so the HTTP status is reported.Deviations from supabase-js
Sortvalue: the service ignores a direction without a column, so the type cannot express it.System.ComponentModel.ListSortDirection.idis not offered as a sort column (the route accepts it, supabase-js does not; it equalsname).typeorformat: the route does not return them (same as create).{ data, error }.Tests
ListAnalyticsBucketsContractTestsnullbodies, 400/401/403/500, call-time headers, cancellation, no capture of the caller's contextListAnalyticsBucketsTestsNo E2E: the CLI stack does not serve Iceberg yet, consistent with create and delete. No wire-shape approval: the request has no body; the query is pinned by the contract tests.
Changed-line coverage: 100% (33 lines). Mutation: 24/25 killed, 1 timeout (the
ConfigureAwait(true)mutant, caught by the blocking-caller test), 0 survivors.