Skip to content

fix(cli): chunk storage delete requests to respect API cap (#1814)#5629

Open
avallete wants to merge 3 commits into
developfrom
avallete/cli-1814-chunk-storage-delete-requests-to-respect-the-new-storage-api
Open

fix(cli): chunk storage delete requests to respect API cap (#1814)#5629
avallete wants to merge 3 commits into
developfrom
avallete/cli-1814-chunk-storage-delete-requests-to-respect-the-new-storage-api

Conversation

@avallete

Copy link
Copy Markdown
Member

Summary

  • Fixes New Studio Version 20240104-dfc02e3 #1814.
  • storage rm now splits delete calls into DELETE_OBJECTS_LIMIT batches instead of sending every prefix in one request.
  • Recursive directory removal uses the same chunking path, so large deletes no longer exceed the storage API request cap.
  • Added coverage for explicit object deletes and recursive deletes with more than 1,000 objects.

Testing

  • Added Go tests covering batched delete requests for both direct object removal and recursive path removal.
  • Existing storage rm test suite passes with the new chunked request behavior.

@avallete avallete marked this pull request as ready for review June 20, 2026 12:11
@avallete avallete requested a review from a team as a code owner June 20, 2026 12:11
@github-actions

Copy link
Copy Markdown

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@a18a226e2198616deca94a7a954ac869f6f8841c

Preview package for commit a18a226.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a18a226e21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +200 to +201
if registry == "ghcr.io" && strings.HasPrefix(imageName, "supabase/logflare:") {
return imageName

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use Docker Hub auth when bypassing the GHCR mirror

When INTERNAL_IMAGE_REGISTRY=ghcr.io, this branch pulls supabase/logflare:* from Docker Hub, but DockerImagePull and the compose pull wrapper still attach utils.GetRegistryAuth(), which is loaded for GetRegistry() (ghcr.io). Docker's image-create API treats X-Registry-Auth as the auth config for the registry being pulled (https://docs.docker.com/reference/api/engine/version/v1.51/#tag/Image/operation/ImageCreate), so users who have GHCR credentials configured can send those credentials on the Docker Hub Logflare pull and hit an auth failure for an otherwise public image. This special case needs to also select Docker Hub/empty auth, or skip the registry auth for this image.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant