feat(config): add the [workers] section to the project config schema - #6260
Draft
johnstonmatt wants to merge 1 commit into
Draft
feat(config): add the [workers] section to the project config schema#6260johnstonmatt wants to merge 1 commit into
johnstonmatt wants to merge 1 commit into
Conversation
1 task
Workers record their runtime, instance size and source directory in `supabase/config.toml`, keyed `[workers.<name>]`, next to the `[functions.<slug>]` entries already in the same file. The section is unusual in carrying both a project-wide scalar (`root`, the directory workers are grouped in, relative to `supabase/`) and one sub-table per worker, so it is modelled with `Schema.StructWithRest`. The record's key pattern excludes `root` deliberately: an index signature otherwise claims that key too and rejects its string value, which would make every config carrying a `[workers] root` fail to decode. The same collision means a worker cannot be named `root`; the CLI reserves the name where workers are created. Worker names are DNS labels, matching what the Management API validates its `:name` path parameter against, since they end up in hostnames. The section flows into the published `schema.json`, so editors offer completion for it in `config.toml`.
johnstonmatt
force-pushed
the
FUNC-753/workers-config
branch
from
August 19, 2026 03:11
e6b90b1 to
1f30b54
Compare
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
Adds the
[workers]section to the project config schema: a map of worker name to{ runtime, size, source }, wired into both the local and remote project configstructs, with the worker-name pattern enforced at the schema level (DNS labels,
rootreserved because[workers] rootis a scalar in the same table).No CLI surface consumes this yet — it lands first so the schema and its generated
types are reviewable on their own.
Stack 1 of 4. Followed by
workers new(#6261),workers push(#6262), andworkers list/status/delete(#6263).Linked issue
FUNC-753 (Linear). Supabase maintainer, exempt from the
open-for-contributionflow.Checklist