chore(cli-go): sync API types and fix storage config feature literal - #5737
Conversation
The synced API types added a PurgeCache feature to UpdateStorageConfigBody.Features. Because Go requires anonymous struct types to match field-for-field, the inline struct literal in ToUpdateStorageConfigBody no longer matched the generated type, breaking every build of pkg/config (and the main module that imports it via the local replace). Add the matching PurgeCache field to the literal. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HCAM37nBUbzHa4u7gr9876
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@0af9d0d611fb66f82b76b9c4138f5dba7210b819Preview package for commit |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0af9d0d611
ℹ️ 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".
| PurgeCache *struct { | ||
| Enabled bool `json:"enabled"` | ||
| } `json:"purgeCache,omitempty"` |
There was a problem hiding this comment.
Wire purgeCache through the storage config
Adding this field to the update body's anonymous type is not enough for config push to send it: ToUpdateStorageConfigBody never assigns body.Features.PurgeCache, and the local storage config struct has no corresponding field like ImageTransformation or S3Protocol. Any storage config update path using this helper will still omit features.purgeCache, so the new purge-cache setting cannot actually be enabled or disabled through the CLI.
Useful? React with 👍 / 👎.
Add support for new storage and PostgreSQL configuration features in the Go CLI API types and storage configuration.
Changes:
Feature entitlements: Added two new feature keys to
V1ListEntitlementsResponseEntitlementsFeatureKey:api.members.roles— API members roles managementstorage.purge_cache— Storage cache purging capabilityPostgreSQL configuration: Extended
PostgrestConfigWithJWTSecretResponse,V1PostgrestConfigResponse, andV1UpdatePostgrestConfigBodytypes with:DbPoolAcquisitionTimeoutfield for configuring database pool acquisition timeout (defaults to 10 when null)Storage configuration: Added
PurgeCachefeature toggle to:StorageConfigResponse— read-only storage configuration responseUpdateStorageConfigBody— storage configuration update requestThese changes enable clients to manage cache purging and fine-tune PostgreSQL connection pool behavior through the Management API.
https://claude.ai/code/session_01HCAM37nBUbzHa4u7gr9876