Skip to content

feat(cli)!: remove deprecated db pull and domains flags (CLI-2596) - #7116

Merged
Coly010 merged 5 commits into
nextfrom
columferry/cli-2596-bc-remove-deprecated-flags-db-pull-use-pg-delta-db-pull
Oct 15, 2026
Merged

Coly010 merged 5 commits into
nextfrom
columferry/cli-2596-bc-remove-deprecated-flags-db-pull-use-pg-delta-db-pull

Conversation

@Coly010

@Coly010 Coly010 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

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 feat(cli): warn at runtime on deprecated db pull and domains flags (CLI-2599) #7115 (develop).

Linked issue

Closes CLI-2596

Checklist

  • The PR title follows Conventional Commits.
  • 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.
  • pnpm check:all passes. The apps/cli unit and integration suites and pnpm docs:spec pass.

🤖 Generated with 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.

Three deprecated surfaces now fail with exit 1 and a message naming the
replacement. Each is a hidden, still-parsed tombstone that raises
RemovedSurfaceError (error_fingerprint ending in :removed_flag). --use-pg-delta
and --include-raw-output fail on a credential-free runtime before any work; the
db pull --experimental rejection fails after the profile and project .env load,
before any config, database or network work.

- db pull --use-pg-delta (any value): use --declarative. The diff engine is
  still chosen with --diff-engine or [experimental.pgdelta] enabled.
- db pull in the --experimental structured-dump mode (--experimental or
  SUPABASE_EXPERIMENTAL resolving true without --declarative): use
  --declarative, or --experimental=false for a migration pull.
  --experimental --declarative is unchanged. The check lives in the db pull
  handler, so the supabase pull orchestrator keeps working when
  SUPABASE_EXPERIMENTAL is set.
- domains create|get|reverify|activate|delete --include-raw-output (any
  value): use -o json. Rejected on a credential-free runtime, so it needs no
  login.

Removes the --declarative/--use-pg-delta argv replay, the deprecation lines,
DbPullInvoke.forceMigrationMode, the structured-dump branch and the
emitHostnameResult includeRawOutput forcing. The supabase pull retry hint keeps
its --experimental=false suffix.

BREAKING CHANGE: supabase db pull --use-pg-delta is removed; use
--declarative. supabase db pull with --experimental or SUPABASE_EXPERIMENTAL
and no --declarative is removed; use --declarative, or pass
--experimental=false for a migration pull. supabase domains
create|get|reverify|activate|delete --include-raw-output is removed; use -o
json. Each removed surface exits 1 and prints its replacement.
@Coly010
Coly010 requested a review from a team as a code owner October 13, 2026 11:39

@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 were available. All three findings are confirmed and distinct: one minor test-quality concern and two nits concerning documentation and redundant environment-file reads. None establishes a runtime defect.

Findings

Severity Location Category Sources Claim
🟡 MINOR apps/cli/src/commands/db/pull/pull.removed-flag.integration.test.ts:158 test-quality codex The supported-invocation negative controls accept unrelated failures, allowing parsing or runtime-initialization regressions to pass without exercising the removal-guard exemption.
⚪ NIT apps/cli/src/commands/pull/SIDE_EFFECTS.md:318 documentation claude The statement that runDbPull never reads --experimental or SUPABASE_EXPERIMENTAL is inaccurate: its local-container prelude still resolves that gate, although the gate no longer selects the pull mode.
⚪ NIT apps/cli/src/commands/db/pull/pull.handler.ts:27 performance claude A non-declarative db pull that passes the removal guard loads and parses project environment files redundantly: once in the handler and again in runDbPull.

Stats

Claude findings: 2 · Codex findings: 1 · Confirmed: 3 · 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.

Comment thread apps/cli/src/commands/pull/SIDE_EFFECTS.md Outdated
Comment thread apps/cli/src/commands/db/pull/pull.handler.ts Outdated
Comment thread apps/cli/src/commands/db/pull/pull.removed-flag.integration.test.ts Outdated
@avallete
avallete self-requested a review October 15, 2026 09:00

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dogfooded against a real project, without credentials: all three removed surfaces exit 1 with the expected removal message, and the controls are not rejected. Those controls are plain db pull, --experimental=false with SUPABASE_EXPERIMENTAL set, and --experimental --declarative. The removed flags are hidden from --help, and supabase pull still works.

One minor, non-blocking comment inline.

Comment thread apps/cli/src/commands/db/pull/pull.command.ts Outdated
@Coly010
Coly010 enabled auto-merge October 15, 2026 09:33
@Coly010
Coly010 added this pull request to the merge queue Oct 15, 2026
Merged via the queue into next with commit 8913e85 Oct 15, 2026
43 checks passed
@Coly010
Coly010 deleted the columferry/cli-2596-bc-remove-deprecated-flags-db-pull-use-pg-delta-db-pull branch October 15, 2026 09:39
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