Skip to content

feat(cli): expose consolidated Warehouse status - #7671

Merged
jgoux merged 6 commits into
feat/generated-warehouse-commandsfrom
bnjjj/pipe-1445-warehouse-status
Nov 17, 2026
Merged

jgoux merged 6 commits into
feat/generated-warehouse-commandsfrom
bnjjj/pipe-1445-warehouse-status

Conversation

@bnjjj

@bnjjj bnjjj commented Nov 17, 2026 •

Copy link
Copy Markdown

Generate warehouse status from GET /v2/projects/{ref}/warehouse/status, preserving readiness, capabilities, zero-target enablement and unavailable observations through the shared runtime.

Preserve warehouse enable --wait with selection-bound setup polling. Discover internal polling targets from response links without exposing a warehouse setups get command; status has no wait flags. Retain teardown waiting.

Keep text output on terminals, raw JSON when piped or requested, and YAML through -o yaml.

Stacked on #7640 (including merged #7660). Depends on https://github.com/supabase/platform/pull/42039.

Implements PIPE-1445.

@bnjjj
bnjjj requested review from a team and supabase-oss as code owners November 17, 2026 13:50
@bnjjj
bnjjj requested review from mdonnalley and removed request for a team November 17, 2026 13:50
@bnjjj
bnjjj added this pull request to stack #7672 November 17, 2026 13:51

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

Both independent reviews completed. Confirmed two non-blocking nits: a stale test target, with the behavior still covered elsewhere, and unused group descriptions. No runtime defect was established. Tests were not run.

Findings

Severity Location Category Sources Claim
⚪ NIT apps/cli/src/commands/api/api-command-policy.ts:46 dead-code claude The new replication, tables, and tables.layout group descriptions have no generated commands and currently serve no purpose.
⚪ NIT apps/cli/src/cli/command-surface/command-surface.integration.test.ts:145 test-coverage claude The test describing self-polling result behavior still checks warehouse status, which now performs a non-waiting context read. This assertion no longer exercises its stated scenario.

Findings outside the diff

  • ⚪ NIT apps/cli/src/cli/command-surface/command-surface.integration.test.ts:145 — The test describing self-polling result behavior still checks warehouse status, which now performs a non-waiting context read. This assertion no longer exercises its stated scenario.

Stats

Claude findings: 2 · Codex findings: 0 · Confirmed: 2 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6.1-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

@github-actions

Copy link
Copy Markdown
Contributor

CLI benchmark (Lightweight Commands): no changes found

Commit 557a79f against bnjjj/pipe-1447-warehouse-disable at d83a707 · 10 runs each · report only, never blocks merging

Command Workload Before After Change
supabase --version version 294 ms 305 ms no real change
supabase --help help 301 ms 319 ms no real change (+6%, within normal variation)
supabase init init 222 ms 235 ms no real change (+6%, within normal variation)
supabase migration new bench migration-new 256 ms 250 ms no real change
supabase config convert config-convert 253 ms 241 ms no real change
supabase config validate config-validate 241 ms 246 ms no real change
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 327 ms 324 ms no real change
supabase projects list projects-list 501 ms 475 ms no real change (-5%, within normal variation)
supabase functions list --project-ref replayfixtureprojref functions-list 499 ms 527 ms no real change (+6%, within normal variation)

API calls: unchanged for all 9 commands.

Binary size: 135.3 MB, up 24.0 KB from 135.2 MB.

Details: timing ranges, API calls per command, slowest phases

Timing ranges

Command Workload Before range After range Change Verdict
supabase --version version 247-369 ms 246-403 ms +11 ms (+4%) within noise
supabase --help help 248-390 ms 255-492 ms +17 ms (+6%) within noise
supabase init init 193-352 ms 186-370 ms +12 ms (+6%) within noise
supabase migration new bench migration-new 223-410 ms 206-341 ms -6 ms (-2%) within noise
supabase config convert config-convert 214-271 ms 213-321 ms -12 ms (-5%) within noise
supabase config validate config-validate 213-288 ms 229-259 ms +5 ms (+2%) within noise
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 267-454 ms 287-487 ms -3 ms (-1%) within noise
supabase projects list projects-list 238-631 ms 242-603 ms -26 ms (-5%) within noise
supabase functions list --project-ref replayfixtureprojref functions-list 435-657 ms 460-577 ms +28 ms (+6%) within noise

API calls per command

Command Workload Before After Endpoint changes
supabase --version version 0 0
supabase --help help 0 0
supabase init init 0 0
supabase migration new bench migration-new 0 0
supabase config convert config-convert 0 0
supabase config validate config-validate 0 0
supabase gen types --lang typescript --project-id replayfixtureprojref gen-types 2 2
supabase projects list projects-list 1 1
supabase functions list --project-ref replayfixtureprojref functions-list 2 2

Slowest phases

No command moved beyond noise, so there are no phase deltas.

Workflow run

Comment /bench to run the lightweight benchmark (this comment) again on the latest commit, or /bench full to also run the integration-heavy benchmark, which posts in its own comment.

@bnjjj
bnjjj removed this pull request from stack #7672 November 17, 2026 14:56
Base automatically changed from bnjjj/pipe-1447-warehouse-disable to feat/generated-warehouse-commands November 17, 2026 14:57
@bnjjj
bnjjj force-pushed the bnjjj/pipe-1445-warehouse-status branch from 1e0478f to 65bba85 Compare November 17, 2026 15:00
@bnjjj
bnjjj force-pushed the bnjjj/pipe-1445-warehouse-status branch from 65bba85 to f5b7cda Compare November 17, 2026 15:07
@bnjjj bnjjj added the run-ci Run full develop CI (tests) on drafts and non-develop PRs. label Nov 17, 2026
Hidden polling reads a generated link may target are now listed in
`pollTargets`, each paired with the read-only generated command a failed
or timed-out wait points users at. The setup read gets its own spec
identity so it no longer shares `warehouse status` with the consolidated
status route, and hidden targets go through the same experimental and
poll-or-links checks as generated operations.
@jgoux

jgoux commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@bnjjj I pushed bea291a on top of your branch (no force-push) to keep this aligned with the command-generation design in #7640 before we merge it there. Summary of what changed and why:

1. Hidden polling reads now go through policy

Dropping v2-get-warehouse-setup from generatedOperations was the right call: the setup read is only useful to enable --wait, not as a standalone command. But it meant any response link could pull a polled operation into the runtime without anyone listing it in policy, and that read skipped the checks generated operations get.

api-command-policy.ts now has a pollTargets map: hidden target -> the generated read-only command that inspects its state.

export const pollTargets = {
  "v2-get-warehouse-setup": "v2-get-warehouse-status",
};

The deriver enforces it. Generation fails when:

  • a link targets a polled operation that is neither generated nor listed;
  • an entry is stale (no generated wait reaches it);
  • a listed target is also generated;
  • the inspect command needs input beyond the project ref, or isn't read-only.

Hidden targets also pass the same experimental-stage and "polls or links, never both" checks as generated operations. The runtime still calls the setup read through the typed @supabase/api client. Nothing new is exposed to users.

2. The setup read no longer claims warehouse status

The deployed spec still annotates the setup read with {group: "warehouse", method: "status"}, the same identity as the consolidated status route. It only worked because the setup read was excluded from generation. openapi-overrides.json now has a guarded test + replace that renames it to warehouse.setups get, so the spec metadata is unambiguous. The upstream annotation should get the same change; once it does, the test op will fail and tell us to drop the override.

3. A failed or timed-out enable --wait names a follow-up command again

With the setup read hidden, the hint had fallen back to a generic "inspect the operation's status" with nothing to run. It now uses the pollTargets inspect entry:

Check it with supabase warehouse status --remote=<ref>.

The consolidated status route reports starting/ready/degraded/…, so it's the right place to look after a failed setup.

4. Docs

The enable and status SIDE_EFFECTS.md now name that hint. The dry-run row now says the preview follows the selected JSON or YAML presentation, matching writeDryRun.

Tests: deriver unit cases for each new failure mode, and the integration test now asserts the new hint. Generated data, unit, integration and repo-wide checks are green.

@jgoux
jgoux merged commit 39e27f3 into feat/generated-warehouse-commands Nov 17, 2026
41 checks passed
@jgoux
jgoux deleted the bnjjj/pipe-1445-warehouse-status branch November 17, 2026 21:21
jgoux added a commit that referenced this pull request Nov 17, 2026
Generate `warehouse connection` from `GET
/v2/projects/{ref}/warehouse/connection`. It prints the Arrow Flight SQL
endpoint, the TLS requirement and source-database login guidance: use a
database role with its existing password (`postgres` uses the project's
database password) and `supabase_warehouse_reader` membership. The
command never fetches or prints a password, and a disabled, unconfigured
or unavailable Warehouse shows no connection string.

Text output on terminals, raw JSON when piped or requested, and YAML
through `-o yaml`, as for the other generated Warehouse commands. Help
includes a usql recipe.

Add `connection` to the generated command vocabulary and render `TLS` as
an acronym in text labels. The contract comes from an OpenAPI override
until it ships in the deployed Management API specification.

Stacked on #7671. Depends on
supabase/platform#42053.

Implements PIPE-1449.

---------

Co-authored-by: Julien Goux <hi@jgoux.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Run full develop CI (tests) on drafts and non-develop PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants