Repository navigation
feat(storage): delete an analytics bucket - #829
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.
Summary
A caller can delete an empty analytics (Iceberg) bucket through
storage.Analytics.DeleteBucketAsync.Capability:
storage.analytics.delete_analytics_bucket- Delete Analytics Bucket. No capability spec exists; the contract is taken from the storage route source (src/http/routes/iceberg/bucket.ts).Public API
IStorageAnalyticsApiis the home for the sibling analytics capabilities (create, list, and a catalog-scoped surface for namespaces and tables).Behavior
DELETE {storage}/iceberg/bucket/{name}, service-role key, no body. A200 {"message":"Successfully deleted"}acknowledgement is discarded.ArgumentExceptionbefore I/O for a null, empty/whitespace,.or..name. The SDK does no bucket-name format validation; the service owns it.SupabaseStorageException: 404 ->Reason.NotFound, 401 ->NotAuthorized, 500 ->Internal, anything else (including feature-not-enabled) -> its status withReason.Unknown.GetHeadersand the access-token hook apply); the cancellation token reaches the HTTP call; the call goes through the existing instrumentation.{"error":{"message","type","code"}}) with no top-levelstatusCode. The shared error path took0as the status for such a body, soReasoncould never beNotFound. It now falls back to the HTTP status when the body carries no positivestatusCode. This is a one-line change inHelpers.MakeRequestAsync; it also applies to other members that receive a body with nostatusCode(theirStatusCodewas0and is now the HTTP status).Deviations from supabase-js
{ data, error }; the acknowledgement is not returned.Tests
StorageAnalyticsApiContractTestsDeleteAnalyticsBucketPathTestsNo approval snapshot: the request has no body.
Changed-line coverage: 100% (21 lines). Mutation: all mutants on changed lines killed (or timed out), 0 survivors.
Notes
ICEBERG_ENABLEDis off by default andsupabase/config.tomlhas no switch). The non-empty-bucket, missing-bucket, non-service-role and feature-not-enabled responses are pinned from the route source, not observed. In particular, what the service answers for a bucket that is not empty is unconfirmed.supabase/config.tomlis unchanged.