Skip to content

feat(cli): warn at runtime on deprecated db pull and domains flags (CLI-2599) - #7115

Merged
Coly010 merged 2 commits into
developfrom
columferry/cli-2599-warn-at-runtime-when-domains-include-raw-output-is-used
Oct 13, 2026
Merged

Coly010 merged 2 commits into
developfrom
columferry/cli-2599-warn-at-runtime-when-domains-include-raw-output-is-used

Conversation

@Coly010

@Coly010 Coly010 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Stable now warns on stderr for every flag that CLI-2596 removes in v3. Each warning names the replacement and says the flag goes away in v3.

Flag Warning
domains create|get|reverify|activate|delete --include-raw-output Flag --include-raw-output is deprecated and will be removed in v3, use -o json instead. (new, previously help text only)
db pull --use-pg-delta Flag --use-pg-delta is deprecated and will be removed in v3, use --declarative with [experimental.pgdelta] enabled = true in your config.toml instead. (reworded)
db pull --experimental (structured dump) The --experimental structured-dump mode for `db pull` is deprecated and will be removed in v3. Use --declarative instead to pull the remote schema as per-object files. (reworded)
  • The domains warning fires only when the flag is set. It goes to stderr, so -o json / stream-json stdout is unchanged.
  • There are no other behaviour changes. --include-raw-output still forces JSON output, and it is still inert on delete.
  • Flag-level usage over the last 30 days is low: --include-raw-output 2 runs from 1 person, --use-pg-delta 47/30, --experimental 17/9. The numbers are on CLI-2596.

The removal itself is in a separate PR against next.

Linked issue

Closes CLI-2599

Checklist

  • The PR title follows Conventional Commits.
  • Tests added or updated: each domains command's integration test covers the warning with and without the flag, and the db pull tests assert the new wording.
  • pnpm check:all passes. The apps/cli unit and integration suites pass.

🤖 Generated with Claude Code

…LI-2599)

`domains create|get|reverify|activate|delete` now print a stderr warning when
`--include-raw-output` is passed, naming `-o json` as the replacement and v3 as
the removing major. The two existing `db pull` deprecation lines
(`--use-pg-delta` and `--experimental` structured dump) now name v3 as well.
@Coly010
Coly010 requested a review from a team as a code owner October 13, 2026 11:33

@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 reported zero findings. Reading the PR code, tests, trusted conventions, and next-branch context revealed no actionable issues: the domains warning stays on stderr, existing output behavior is preserved, and deprecation wording consistently names v3. Tests were inspected but not run because dependencies are absent.

Findings

No issues found.

Stats

Claude findings: 0 · Codex findings: 0 · Confirmed: 0 · 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.

@Coly010
Coly010 added this pull request to the merge queue Oct 13, 2026
Merged via the queue into develop with commit 4038b13 Oct 13, 2026
33 checks passed
@Coly010
Coly010 deleted the columferry/cli-2599-warn-at-runtime-when-domains-include-raw-output-is-used branch October 13, 2026 14:38
AmitKulkarni23 pushed a commit to AmitKulkarni23/supabase_cli that referenced this pull request Nov 1, 2026
…upabase#7116)

## Summary

This removes three surfaces that are deprecated in favour of an existing
replacement. Each now exits 1 with a `RemovedSurfaceError` that names
the replacement. It uses the same tombstone pattern as `db diff
--use-pg-schema` and `functions download --legacy-bundle`.

| Removed | Error | Replacement |
| -- | -- | -- |
| `db pull --use-pg-delta` | `--use-pg-delta was removed.` |
`--declarative`. The diff engine is still chosen with `--diff-engine` or
`[experimental.pgdelta] enabled`. |
| `db pull` structured-dump mode (experimental on, no `--declarative`) |
`The --experimental structured-dump mode of db pull was removed.` |
`--declarative` for per-object files, or `--experimental=false` / unset
`SUPABASE_EXPERIMENTAL` for a migration pull |
| `domains create\|get\|reverify\|activate\|delete --include-raw-output`
| `--include-raw-output was removed.` | `-o json` |

- **`--use-pg-delta` and `--include-raw-output`** stay parsed but
hidden. Any value, including `=false`, hits the removal error. Both are
rejected on a credential-free runtime, so they never ask for a login or
profile first.
- **Structured-dump mode:** `db pull` checks the *resolved* experimental
value, not only the flag. That means `--experimental`, shell
`SUPABASE_EXPERIMENTAL` and project `.env` all count, with the usual
flag > env precedence. Failing loudly is safer than silently switching
to a migration pull that writes remote history.
- `--experimental --declarative` still works, and `--experimental=false`
overrides the env for a single run.
- The `supabase pull` orchestrator is unaffected. Its retry hint keeps
`--experimental=false` for that reason.
- **Deleted:** the structured-dump branch, `forceMigrationMode`, the
`--declarative`/`--use-pg-delta` argv-order replay and
`emitHostnameResult`'s raw-output handling. The stale
`DOCS_EXCLUDED_FLAGS` entries for the domains flag are gone too.
- **Telemetry:** the `use-pg-delta` key is still recorded on
`cli_command_executed.flags`, so tombstone hits stay visible.
- **Not touched:** `db diff --use-pg-delta`, which is still the db diff
engine selector, and the global `--experimental` flag.
- **Usage, last 30 days:**
  - `--use-pg-delta`: 47 runs from 30 people
- `--experimental` without `--declarative`: 17 runs from 9 people (argv
only)
  - `--include-raw-output`: 2 runs from 1 person
- **Stable side:** the warnings that say these go away in v3 are in
supabase#7115 (develop).

## Linked issue

Closes CLI-2596

## Checklist

- [x] The PR title follows Conventional Commits.
- [x] Tests added or updated.
- Parser-level tombstone suites (`pull.removed-flag`,
`domains.removed-flag`) assert message, suggestion, fingerprint and that
no request is made. They cover `=false`, env and `.env` sources, and
missing credentials/profile.
- They include controls showing plain `db pull`, `--experimental=false`
and `--experimental --declarative` are not rejected.
- [x] `pnpm check:all` passes. The apps/cli unit and integration suites
and `pnpm docs:spec` pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

BREAKING CHANGE: `db pull --use-pg-delta` is removed; use
`--declarative`. `db pull` no longer has an `--experimental`
structured-dump mode: with `--experimental` or `SUPABASE_EXPERIMENTAL`
set and no `--declarative` it now exits 1; use `--declarative`, or
`--experimental=false` for a migration pull. `--include-raw-output` is
removed from `domains create`, `get`, `reverify`, `activate` and
`delete`; use `-o json`.
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.

2 participants