Skip to content

fix(cli): accept a number of bytes for storage.file_size_limit - #7960

Closed
sudhi76 wants to merge 1 commit into
supabase:developfrom
sudhi76:fix/storage-file-size-limit-number
Closed

sudhi76 wants to merge 1 commit into
supabase:developfrom
sudhi76:fix/storage-file-size-limit-number

Conversation

@sudhi76

@sudhi76 sudhi76 commented Dec 4, 2026

Copy link
Copy Markdown

Summary

[storage] file_size_limit = 5000000 fails every command that loads the config with "expected a string, got a number". The config schema accepts a string or a number for this key and turns a number into its decimal text, but the CLI's config key registry gives the key stringCodec, which rejects the number before the schema sees it.

This adds a sizeCodec whose document side accepts a string or a finite number, and registers it for storage.file_size_limit in CLI_CONFIG_CODEC_OVERRIDES. Env and flag values are unchanged: they are already text. A value of another type is still rejected, now with "expected a size such as "50MiB" or a number of bytes".

Linked issue

Closes #7959

  • The linked issue is open and carries the open-for-contribution label (or I'm a Supabase maintainer).

Checklist

  • The PR title follows Conventional Commits (e.g. fix(cli): …).
  • Tests added or updated for the change.
  • From the repository root, pnpm check:all passes; relevant package tests pass for every touched workspace, and pnpm types:check passes for each touched TypeScript workspace (or workspace declaring it).

A bare number under [storage] file_size_limit failed every command that
loads the config with "expected a string, got a number". The config
schema accepts a string or a number for this key, but the config key
registry gave it the string codec, which rejects a number.

Register a size codec for the key whose document side accepts a string
or a finite number and reads a number as its decimal text, as the
schema does. Env and flag values are unchanged.
@sudhi76
sudhi76 requested a review from a team as a code owner December 4, 2026 10:25
@sudhi76
sudhi76 requested a review from Prashansa-K December 4, 2026 10:25
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks! The linked issue hasn't been marked open-for-contribution yet, so this pull request is being closed automatically.

A maintainer adds that label once an issue is triaged and ready to be worked on. Please wait for the label before opening a pull request.
See CONTRIBUTING.md for the full workflow. Once a maintainer adds the open-for-contribution label to a linked open issue, reopen or open a new pull request and it will be accepted.

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.

storage.file_size_limit written as a number of bytes is rejected: "expected a string, got a number"

1 participant