Skip to content

feat(storage): add purge_project_cache capability - #294

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2298-purge-project-cache
Oct 20, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2298-purge-project-cache

Conversation

@spydon

@spydon spydon commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

New capability storage.file_buckets.purge_project_cache, next to purge_cache and purge_bucket_cache.

DELETE /storage/v1/cdn/                       → tenant purge
DELETE /storage/v1/cdn/?transformations=true  → tenant-transforms purge

Storage serves it from src/http/routes/cdn/purgeCache.ts. Like the other purge calls it needs the service-role key and the tenant purgeCache feature. supabase-swift already ships it as purgeCache(bucket: nil) (supabase/supabase-swift#1546).

SDKs do not have to declare the new id: validate-compliance treats an undeclared feature as not_implemented, and sync-compliance adds it as such.

Evidence

From packages/capability-matrix: bun test 222 pass / 0 fail; bun run format-and-lint clean; bun run knip clean; bun run validate passes.

Merge Danger

Door: two-way

Blast Radius: registry

Adds one feature id to capabilities/storage.yaml; every SDK sees it as not implemented until it declares it.

@spydon
spydon requested a review from a team as a code owner October 20, 2026 11:57
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7c5bf7a0-52d9-4073-ba62-cd774818041f
📥 Commits

Reviewing files that changed from the base of the PR and between 1d2c1be and 1eaef9d.

📒 Files selected for processing: 1
  • packages/capability-matrix/capabilities/storage.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • New Features
    • Added a capability for purging project-wide CDN caches, with optional support for transformation-only purges.

The storage capability matrix now declares storage.file_buckets.purge_project_cache. The capability describes invalidating cached objects across every project bucket, with an option to limit invalidation to resized or formatted transformations.

Priority: ⬇️ Low

Change: Feature

Merge Risk: ⚪ Minimal · up to 1eaef

No merge-blocking risk is identified in this capability-matrix-only change.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon merged commit 94b4da6 into main Oct 20, 2026
10 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2298-purge-project-cache branch October 20, 2026 12:04
spydon pushed a commit that referenced this pull request Oct 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.18.0](capability-matrix/v1.17.0...capability-matrix/v1.18.0)
(2026-10-20)


### Features

* **storage:** add purge_project_cache capability
([#294](#294))
([94b4da6](94b4da6))
* **storage:** add transfer_progress capability and spec
([#282](#282))
([1d2c1be](1d2c1be))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
spydon added a commit to supabase/supabase-flutter that referenced this pull request Oct 20, 2026
## Summary

Adds `purgeProjectCache` next to `purgeBucketCache`, so
`supabase.storage.purgeProjectCache()` purges the CDN cache for every
bucket in the project.

```dart
await supabase.storage.purgeProjectCache();                      // DELETE /cdn/
await supabase.storage.purgeProjectCache(transformations: true); // DELETE /cdn/?transformations=true
```

`transformations: true` purges only the transformed variants. The
default purges the originals and their variants. Like the other purge
calls, it needs the service-role key and the tenant `purgeCache`
feature.

Registered as `storage.file_buckets.purge_project_cache` in
`sdk-compliance.yaml`.

The capability-matrix pin in
`.github/workflows/validate-capabilities.yml` moves to
`capability-matrix/v1.18.0`, which defines that id (supabase/sdk#294).

## Evidence

- `dart test test/basic_test.dart` in `supabase_storage`: 116 pass,
including the two new tests for the request path and the
`transformations` query parameter.
- `dart analyze` and `dcm analyze` are clean.
- Compliance checks run locally against the supabase/sdk#294 branch:
symbol check, drift check and `validate-compliance` all pass.

Fixes SDK-2298
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.

3 participants