Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5e2539c
fix(cli): start secrets selinux (#6000)
7ttp Jul 31, 2026
08be342
fix(cli): reload kong after db reset (#6017)
7ttp Jul 31, 2026
c0cb3ff
chore(deps): bump github.com/docker/go-connections from 0.7.0 to 0.8.…
dependabot[bot] Aug 1, 2026
7f51f28
chore(ci): bump the actions-major group with 3 updates (#6033)
dependabot[bot] Aug 3, 2026
267ebbe
chore: sync API types from infrastructure (#6039)
supabase-cli-releaser[bot] Aug 3, 2026
9e4d713
fix(cli): use cobra mutual-exclusivity template in sso add (#5974)
Coly010 Aug 3, 2026
47fdba9
fix(cli): edge and cosmetic parity sweep from the 2026-07-24 audit (C…
Coly010 Aug 3, 2026
06715fd
fix(cli): match Go bundler env and deploy path anchoring (CLI-1985) (…
Coly010 Aug 3, 2026
b4d52dc
docs(cli): record intentional start --ignore-health-check divergence …
Coly010 Aug 3, 2026
3eaee31
chore(cli): apply CLI-1989 parity ruling for db push pipeline-incompa…
Coly010 Aug 3, 2026
07b3d04
fix(stack): stage binary downloads and extract via atomic rename to a…
Coly010 Aug 3, 2026
cfb979d
fix(cli): reuse existing volumes (#6037)
7ttp Aug 3, 2026
2d47ed1
test(stack): verify postgres data survives native to docker mode tran…
Coly010 Aug 3, 2026
c2ec9f5
fix(cli): order migrations by version (#6038)
7ttp Aug 3, 2026
b6ca6c9
test(cli): deflake e2e image pulls (#6030)
7ttp Aug 3, 2026
fdc8951
fix(cli): restore Go gen types flag guards, bless pg-meta permissiven…
Coly010 Aug 3, 2026
56296d9
fix(cli): match Go machine-format encoder output for -o toml/yaml/jso…
Coly010 Aug 3, 2026
8df4167
fix(cli): migrate remaining StringSlice flags onto legacyStringSliceF…
Coly010 Aug 3, 2026
97d6a66
refactor(cli): hoist sso pflag/profile reconciliation into shared lay…
Coly010 Aug 3, 2026
b17f8e7
chore: gitignore `.DS_Store` (#6011)
kanadgupta Aug 4, 2026
25ed958
fix(cli): clear deploy rollup blockers (#6057)
7ttp Aug 4, 2026
c323ddb
test(stack): deflake parallel stacks (#6052)
7ttp Aug 4, 2026
d602f48
test(cli): resolve e2e images via the production resolver (#6049)
7ttp Aug 4, 2026
86b2582
fix(cli): skip unmounted workdir (#6048)
7ttp Aug 4, 2026
dbae56a
fix(cli): route bootstrap's db push step to native TS db push (CLI-19…
Coly010 Aug 4, 2026
cd400a7
fix(cli): keep db pull --experimental delegated to Go, deprecate inst…
Coly010 Aug 4, 2026
1706b5c
chore(deps): bump the go-minor group across 1 directory with 2 update…
dependabot[bot] Aug 5, 2026
b0c2e46
chore(ci): bump docker/login-action from 4.5.2 to 4.6.0 in the action…
dependabot[bot] Aug 5, 2026
0c06053
fix(docker): bump supabase/postgres from 17.6.1.156 to 17.6.1.158 in …
dependabot[bot] Aug 5, 2026
b79994d
feat(stack): add hardened lazy service lifecycle (#6072)
jgoux Aug 5, 2026
a253ccb
fix(api): resync sso provider schemas (#6058)
7ttp Aug 5, 2026
b21d536
chore(process-compose): classify Bun platform as test dependency (#6077)
jgoux Aug 5, 2026
a37365a
fix(cli): deprecate db diff --use-pg-schema (CLI-1960) (#6060)
Coly010 Aug 5, 2026
31bcf1a
docs(cli): fix porting-status and SIDE_EFFECTS drift from 2026-07-24 …
Coly010 Aug 5, 2026
0cf61b3
docs(stack): align runtime architecture documentation (#6078)
jgoux Aug 5, 2026
b6dd487
chore(deps): bump the npm-major group across 1 directory with 27 upda…
dependabot[bot] Aug 5, 2026
666800c
chore(api): sync Management API OpenAPI spec (#6073)
supabase-cli-releaser[bot] Aug 5, 2026
10b49c4
fix: ensure resolved stays inside base path (#5956)
staaldraad Aug 5, 2026
b3d9ea2
fix(docker): bump the docker-minor group across 1 directory with 7 up…
dependabot[bot] Aug 5, 2026
b8843ea
fix(deps): bump the npm-major group with 2 updates (#6097)
dependabot[bot] Aug 6, 2026
accdfa1
fix(deps): bump github.com/go-git/go-git/v5 from 5.19.1 to 5.19.2 in …
dependabot[bot] Aug 6, 2026
789e0c3
chore(ci): bump the actions-major group with 2 updates (#6101)
dependabot[bot] Aug 6, 2026
0eb89ac
fix(cli): keep kong email templates (#6065)
7ttp Aug 6, 2026
3c43d63
fix(cli): relative declarative dir (#6066)
7ttp Aug 6, 2026
82f6e05
fix(cli): exit analytics container when migrations fail (#6093)
7ttp Aug 6, 2026
d9fb7de
fix(cli): fail on unloadable --profile (#6095)
7ttp Aug 6, 2026
a0a8e84
fix(api): clear codeql redos alert (#6096)
7ttp Aug 6, 2026
d6a845b
fix(cli): remove db schema declarative __catalog seam for migrations …
Coly010 Aug 6, 2026
c765afc
chore(cli-go): delete internal/start outright (unreachable) (CLI-1966…
Coly010 Aug 6, 2026
14f93c3
fix(cli): port db test to native TypeScript (CLI-1962) (#6063)
Coly010 Aug 6, 2026
1e4ea82
fix(cli): port db start container bootstrap to native TS (CLI-1954) (…
Coly010 Aug 6, 2026
54934f4
fix(process-compose): make unhealthy lifecycle terminal (#6080)
jgoux Aug 6, 2026
78e89d8
refactor(stack): establish explicit domain model (#6081)
jgoux Aug 6, 2026
5eaa06d
refactor(process-compose): isolate supervisor policies (#6084)
jgoux Aug 6, 2026
223fa14
refactor(stack): consolidate local lifecycle ownership (#6085)
jgoux Aug 6, 2026
75c6535
chore(deps): bump the go-minor group across 2 directories with 1 upda…
dependabot[bot] Aug 7, 2026
af348a1
refactor(stack): restore service factory locality (#6086)
jgoux Aug 7, 2026
12ed9e1
fix(docker): bump the docker-minor group across 1 directory with 4 up…
dependabot[bot] Aug 7, 2026
dd26cfb
refactor(stack): make functions configuration explicit (#6089)
jgoux Aug 7, 2026
8df0bbd
refactor(stack): narrow package entrypoints (#6090)
jgoux Aug 7, 2026
ded3807
fix(cli): skip function bundle chmod on windows (#6109)
7ttp Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 14 additions & 25 deletions .github/workflows/cli-go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ jobs:
go tool gotestsum -- -race -v -count=1 ./... \
-coverpkg="./cmd/...,./internal/...,${pkgs}" -coverprofile=coverage.out

# internal/start (docker-compose/v2, buildx, moby/buildkit, k8s client-go,
# aws-sdk-go-v2, notary, secret-detector) was deleted outright as
# unreachable (CLI-1966) -- this guards against silently reintroducing
# that dependency tree via some other package, since nothing else checks
# the shipped binary's size on every change.
- name: Verify the heavy orchestration dependency tree stays out of the module
run: |
set -euo pipefail
go list -deps . > /tmp/deps.txt
! grep -Eq \
'docker/compose|docker/buildx|moby/buildkit|k8s\.io/client-go|aws-sdk-go-v2' \
/tmp/deps.txt

- name: Check existing coverage cache
id: coverage-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down Expand Up @@ -65,7 +78,7 @@ jobs:
- name: Move coverage report
run: cp apps/cli-go/coverage.out coverage.out
working-directory: .
- uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
- uses: coverallsapp/github-action@8d6379e14d29928660c4ba802d8e85393440b329 # v2.3.8
with:
file: coverage.out
format: golang
Expand Down Expand Up @@ -93,30 +106,6 @@ jobs:
only-new-issues: true
working-directory: apps/cli-go

start:
name: Start
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: apps/cli-go/go.mod
cache: true
- run: go build main.go
- run: ./main init
- run: sed -i '/\[db.pooler\]/{n;s/.*/enabled = true/}' supabase/config.toml
- run: ./main start --workdir tests
env:
SUPABASE_INTERNAL_IMAGE_REGISTRY: ghcr.io
- name: Install websocat
run: |
sudo wget -qO /usr/local/bin/websocat https://github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl
sudo chmod a+x /usr/local/bin/websocat
websocat --version
- run: ./e2e-test.sh ./main

link:
name: Link
if: ${{ github.event_name == 'merge_group' || (github.event_name ==
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-go-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
category: "/language:${{matrix.language}}"
defaults:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-go-mirror-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
with:
role-to-assume: ${{ secrets.PROD_AWS_ROLE }}
aws-region: us-east-1
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: public.ecr.aws
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cli-go-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ on:
# This workflow is the manual/bulk entry point for re-mirroring everything.
# Template image bumps are mirrored automatically by mirror-template-images.yml
# on push to develop, which backfills any unmirrored tag when the templates
# Dockerfile changes — so develop and PRs rebased on it stop inheriting the
# `manifest unknown` failure in the ghcr.io-pinned `Start` check.
# Dockerfile changes — so anyone pinning SUPABASE_INTERNAL_IMAGE_REGISTRY=ghcr.io
# doesn't inherit a `manifest unknown` failure. (No CI job pins that registry
# anymore -- see mirror-template-images.yml's own comment for why, CLI-1966.)
workflow_dispatch:
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-go-pg-prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
with:
endpoint: builders
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-go-publish-migra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
with:
endpoint: builders
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/mirror-template-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ name: Mirror template images
#
# It runs on `push` to develop (not on the PR) on purpose: mirroring needs the
# AWS role + packages:write, which a dependabot-triggered `pull_request` run
# cannot be granted, and we deliberately avoid `pull_request_target`. The CI
# `Start` job pins SUPABASE_INTERNAL_IMAGE_REGISTRY=ghcr.io, so it only goes
# green once a bumped tag is mirrored here; this backfill runs as soon as the
# bump lands on develop, repopulating ghcr.io/ECR so develop and any PR rebased
# on it pass `Start` instead of inheriting a `manifest unknown` failure.
# cannot be granted, and we deliberately avoid `pull_request_target`. This
# backfill runs as soon as the bump lands on develop, repopulating ghcr.io/ECR
# so anyone pinning SUPABASE_INTERNAL_IMAGE_REGISTRY=ghcr.io doesn't inherit a
# `manifest unknown` failure. (No CI job pins that registry anymore -- the
# `cli-go-ci.yml` `Start` job that used to made it CI-observable was removed in
# CLI-1966 along with `internal/start`; this mirror now only serves users who
# opt into the mirror directly, and a mirroring failure no longer turns any
# check red.)

on:
push:
Expand Down Expand Up @@ -50,7 +53,7 @@ jobs:
dependency-firewall-token: ${{ secrets.DF_FIREWALL_TOKEN }}

- name: Log in to ghcr.io
uses: docker/login-action@abd2ef45e78c5afb21d64d4ca52ee8550d9572c7 # v4.5.1
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ jobs:

- name: Sync stable release to Linear
if: ${{ inputs.channel == 'stable' && env.LINEAR_CLI_STABLE_RELEASE_ACCESS_KEY != '' }}
uses: linear/linear-release-action@3858a5d7892435dc63302ac76b0cdb587435caa9 # v0
uses: linear/linear-release-action@af56a9a388625921f3757a2f988e4d7aca958377 # v0
with:
access_key: ${{ env.LINEAR_CLI_STABLE_RELEASE_ACCESS_KEY }}
version: v${{ inputs.version }}
Expand All @@ -437,7 +437,7 @@ jobs:

- name: Sync beta release to Linear
if: ${{ inputs.channel == 'beta' && env.LINEAR_CLI_BETA_RELEASE_ACCESS_KEY != '' }}
uses: linear/linear-release-action@3858a5d7892435dc63302ac76b0cdb587435caa9 # v0
uses: linear/linear-release-action@af56a9a388625921f3757a2f988e4d7aca958377 # v0
with:
access_key: ${{ env.LINEAR_CLI_BETA_RELEASE_ACCESS_KEY }}
version: v${{ inputs.version }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
dist
coverage/
.DS_Store
.env
.env.*
!.env.example
Expand All @@ -22,4 +23,4 @@ packages/cli-*/bin/

# Nx
.nx/cache
.nx/workspace-data
.nx/workspace-data
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"body": [
{
"id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"id": "aaaaaaaa-bbbb-4ccc-8ddd-eeeeeeeeeeee",
"name": "test-branch",
"project_ref": "branchrefaaaaaaaaa",
"parent_project_ref": "__PROJECT_REF__",
Expand Down
13 changes: 9 additions & 4 deletions apps/cli-e2e/src/tests/live/db-reset-start.live.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ import { testLive } from "./live-context.ts";
// destructive remote reset below is safe against the throwaway per-run project.

// --- Local leg: db start + db reset --local against the real Docker socket -----
// Exercises the hidden `db __db-bootstrap` Go seam end-to-end — the boundary the
// in-process integration suites mock. The start → already-running → reset cycle
// runs in one test so it shares a single booted stack, and `finally` stops it
// Exercises `db start`'s native container-bootstrap sequence (network/volume/container
// bring-up, health wait, the fresh-volume SetupLocalDatabase-equivalent pipeline, and
// `_current_branch`) and `db reset --local`'s container-recreate flow end-to-end — the
// real-Docker boundary the in-process integration suites mock. `db reset --local` still
// delegates its container-recreate flow to the bundled Go binary's hidden
// `db __db-bootstrap --mode recreate` seam (CLI-1955, unclaimed as of CLI-1954); `db start`
// no longer does (see `commands/db/start/start.handler.ts`). The start → already-running →
// reset cycle runs in one test so it shares a single booted stack, and `finally` stops it
// (legacy proxies `stop` to Go) so the run never leaves containers behind.
describe.skipIf(TARGET === "ts-next")("db start / db reset --local (live, local Docker)", () => {
testLive(
Expand All @@ -25,7 +30,7 @@ describe.skipIf(TARGET === "ts-next")("db start / db reset --local (live, local
try {
const start = await run(["db", "start"]);
expect(start.exitCode, start.stderr).toBe(0);
// Go tees bootstrap progress to stderr (mode-independent).
// Bootstrap progress goes to stderr on every target (Go, and native TS since CLI-1954).
expect(`${start.stdout}${start.stderr}`).toMatch(/Starting database|Initialising schema/i);

// Second start is a no-op: the db is already running, exit 0.
Expand Down
8 changes: 7 additions & 1 deletion apps/cli-e2e/src/tests/stack.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ describe("start", () => {
test.todo("start → status → stop lifecycle");
test.todo("starts with --exclude studio and stops cleanly");

test.todo("parity: start");
// Unlike `status`/`stop` above, there is no `testParityStack(["start"])` here,
// and there never will be: Go's `internal/start` was deleted outright as
// unreachable (CLI-1966), so `supabase-go start` is now a permanent stub that
// always fails with a fixed error -- there is no real Go implementation left to
// diff TS's behavior against. Go-parity coverage for `start` instead lives in
// `apps/cli/src/legacy/commands/start/start.live.test.ts` and its siblings,
// asserted against the pre-deletion Go behavior documented in `SIDE_EFFECTS.md`.
});

// ---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions apps/cli-go/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.so
*.dylib
/cli
/main
/supabase-go

# Test binary, built with `go test -c`
Expand Down
49 changes: 21 additions & 28 deletions apps/cli-go/cmd/db.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"context"
"errors"
"fmt"
"os"
Expand Down Expand Up @@ -271,24 +270,29 @@ var (
},
}

bootstrapMode string
bootstrapSqlPaths []string
bootstrapFromBackup string
bootstrapVersion string
bootstrapNoSeed bool

// dbBootstrapCmd is a hidden seam used by the native-TypeScript `db start` and
// `db reset --local` commands to drive the container-bootstrap primitives that
// are not yet ported to TypeScript: creating/recreating the local Postgres
// container, applying the initial schema, and the storage health gate. The TS
// caller orchestrates everything else (the "already running?" check and its
// message, version/last resolution, bucket seeding, the git-branch "Finished…"
// line, telemetry, and --output-format shaping); the seam stays in Go only for
// the Docker lifecycle. It mirrors the existing db __shadow seam: it carries no
bootstrapMode string
bootstrapSqlPaths []string
bootstrapVersion string
bootstrapNoSeed bool

// dbBootstrapCmd is a hidden seam used by the native-TypeScript `db reset --local`
// command to drive the container-bootstrap primitives that are not yet ported to
// TypeScript: recreating the local Postgres container, applying the initial
// schema, and the storage health gate. The TS caller orchestrates everything else
// (version/last resolution, bucket seeding, the git-branch "Finished…" line,
// telemetry, and --output-format shaping); the seam stays in Go only for the
// Docker lifecycle. It mirrors the existing db __shadow seam: it carries no
// db-url/local/linked target flags, so it loads supabase/config.toml explicitly
// (the root PersistentPreRunE only loads it when a target flag is set). Progress
// goes to stderr; the only stdout output is a single machine-parseable marker
// for --mode await-storage ("ready" or "absent").
// for --mode await-storage ("ready" or "absent"). `db start`'s own container
// bootstrap (--mode start) was removed from this seam by CLI-1954 — it is now a
// fully native TypeScript implementation
// (apps/cli/src/legacy/commands/db/start/start.handler.ts), reusing
// legacy/shared/db-bootstrap/'s already-ported container-bootstrap primitives
// instead of shelling out to this binary. `start.StartDatabase` itself (called
// below by the real, customer-facing `db start` Go command) is untouched — it
// remains the parity oracle this TS port was checked against.
dbBootstrapCmd = &cobra.Command{
Use: "__db-bootstrap",
Hidden: true,
Expand All @@ -299,16 +303,6 @@ var (
return err
}
switch bootstrapMode {
case "start":
// Mirror start.Run minus the "already running?" check, which the TS
// caller performs (and prints "Postgres database is already running.").
if err := start.StartDatabase(cmd.Context(), bootstrapFromBackup, fsys, os.Stderr); err != nil {
if rmErr := utils.DockerRemoveAll(context.Background(), os.Stderr, utils.Config.ProjectId); rmErr != nil {
fmt.Fprintln(os.Stderr, rmErr)
}
return err
}
return nil
case "recreate":
// The PG14/PG15 container-recreate half of local db reset. The TS
// caller has already printed "Resetting local database…" and validated
Expand Down Expand Up @@ -688,8 +682,7 @@ func init() {
dbCmd.AddCommand(dbShadowCmd)
// Build hidden container-bootstrap seam command (native db start / db reset)
bootstrapFlags := dbBootstrapCmd.Flags()
bootstrapFlags.StringVar(&bootstrapMode, "mode", "start", "Bootstrap mode: start, recreate, or await-storage.")
bootstrapFlags.StringVar(&bootstrapFromBackup, "from-backup", "", "Path to a logical backup file (start mode).")
bootstrapFlags.StringVar(&bootstrapMode, "mode", "recreate", "Bootstrap mode: recreate or await-storage.")
bootstrapFlags.StringVar(&bootstrapVersion, "version", "", "Reset up to the specified version (recreate mode).")
bootstrapFlags.BoolVar(&bootstrapNoSeed, "no-seed", false, "Skip the seed script after recreate (recreate mode).")
bootstrapFlags.StringArrayVar(&bootstrapSqlPaths, "sql-paths", nil, "Override [db.seed].sql_paths for the recreate (recreate mode).")
Expand Down
Loading
Loading