Skip to content

feat(config): add the [workers] section to the project config schema - #6260

Draft
johnstonmatt wants to merge 1 commit into
developfrom
FUNC-753/workers-config
Draft

feat(config): add the [workers] section to the project config schema#6260
johnstonmatt wants to merge 1 commit into
developfrom
FUNC-753/workers-config

Conversation

@johnstonmatt

@johnstonmatt johnstonmatt commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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 config
structs, with the worker-name pattern enforced at the schema level (DNS labels,
root reserved because [workers] root is 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), and
workers list/status/delete (#6263).

Linked issue

FUNC-753 (Linear). Supabase maintainer, exempt from the open-for-contribution flow.

Checklist

@johnstonmatt johnstonmatt changed the title FUNC 753/workers config feat(config): add the [workers] section to the project config schema Aug 19, 2026
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
johnstonmatt force-pushed the FUNC-753/workers-config branch from e6b90b1 to 1f30b54 Compare August 19, 2026 03:11
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