Skip to content

feat(cli): add supabase workers list, status and delete - #6263

Draft
johnstonmatt wants to merge 3 commits into
FUNC-753/workers-pushfrom
FUNC-753/workers-read
Draft

feat(cli): add supabase workers list, status and delete#6263
johnstonmatt wants to merge 3 commits into
FUNC-753/workers-pushfrom
FUNC-753/workers-read

Conversation

@johnstonmatt

@johnstonmatt johnstonmatt commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the command family with the three remaining subcommands:

  • workers list — this project's workers.
  • workers status — one worker in detail.
  • workers delete — remove a worker, with confirmation.

All three reuse the API client and output helpers introduced in #6262, so this is
the smallest layer of the stack.

Stack 4 of 4, on top of workers push (#6262).

Linked issue

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

Checklist

@johnstonmatt johnstonmatt changed the title FUNC 753/workers read feat(cli): add supabase workers list, status and delete Aug 19, 2026
@johnstonmatt
johnstonmatt force-pushed the FUNC-753/workers-read branch from c5f5bb7 to 6710630 Compare August 19, 2026 03:07
Every worker in the project, deployed or not, rendered through
`renderGlamourTable` so it sits beside `functions list` and `projects list`
looking like them.

It is the union of two sources, because either half alone misleads: the
`[workers.*]` entries in `config.toml` (scaffolded, perhaps never deployed)
and what the API reports as deployed, which can include something deployed
from another machine or from a directory since deleted. A worker with no
deployment shows as `not deployed`; a deployment with no local entry is
called out on stderr, since pushing it from here would have to guess its
runtime — stderr so the note never lands inside a `-o` payload.

The runtime column only claims a runtime it can support. The API omits
`spec.runtime` for a context-only build, so for a deployed worker its
absence does mean `dockerfile` — but for one that has never been deployed
there is nothing to infer from, and the column says so rather than
asserting.

The list endpoint makes no per-worker backend call, so it carries no live
instance tally; the column shows the declared count, and `status` is where
the live one lives.
One worker in detail: the size, access, image and URL a `push` printed once
and then scrolled away, plus the live instance tally, which the list
endpoint deliberately does not carry.

The deployed spec is the truth here, not `config.toml`. A worker deployed
from its own Dockerfile carries no `spec.runtime`, and letting a stale local
entry answer instead would report a runtime that is not what is running.

When the instance read-through fails the API says so rather than returning
counts, and this reports that failure on stderr instead of printing numbers
it does not have. A failed build points at the retry, with the reason the
API gave.
Deletes a worker from the linked project; its instances and image are torn
down asynchronously. Whether it exists is asked of the API, never of a local
directory, so `status` and `delete` answer that question the same way.

Being the irreversible verb, an interactive session has to type the worker's
name back before anything happens — the same confirm-by-typing pattern as
GitHub's own repository deletion, rather than a bare y/n that is too easy to
reflexively accept. `--yes` skips it for scripts, as does a non-interactive
session, where there would be nothing to read.

What it does not remove is worth saying out loud, so it says it: the
worker's directory and its `config.toml` entry stay on disk, which is what
makes `push` a one-command undo.
@johnstonmatt
johnstonmatt force-pushed the FUNC-753/workers-read branch from 6710630 to 4745b37 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