Skip to content

Commit b9870ca

Browse files
committed
Pin the Supabase CLI to 2.121.0 so every worktree uses one image set
Each Supabase CLI version pulls its own ~7 GB set of Docker images. The VPS had 2.116.0 in /usr/local/bin and 2.121.0 from npm, so worktrees kept both sets. - Add supabase 2.121.0 as an exact devDependency. - db-gate.sh, teardown.sh, agent-stack.sh and the verify harness put the repo-pinned CLI first on PATH (.superset/lib/supabase-cli.sh). - Bump the setup-cli steps in CI from 2.116.0 to 2.121.0. - AGENTS.md and docs: use only the pinned CLI, never a global or @latest.
1 parent d749051 commit b9870ca

17 files changed

Lines changed: 278 additions & 19 deletions

File tree

‎.claude/skills/verify-debatelab/bin/verify.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
2525
REPO="$(git -C "$SKILL_DIR" rev-parse --show-toplevel)"
2626
cd "$REPO"
2727
source "$REPO/.superset/lib/lock.sh"
28+
source "$REPO/.superset/lib/supabase-cli.sh"
29+
use_pinned_supabase_cli "$REPO"
2830

2931
DB_LOCK="$HOME/.superset/debatelab-db.lock"
3032
FAKE_PROVIDER=debatelab-fake-openrouter

‎.github/workflows/agentic-e2e.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
- name: Set up Supabase CLI
8181
uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0
8282
with:
83-
version: 2.116.0
83+
version: 2.121.0
8484

8585
- name: Install dependencies
8686
run: npm ci
@@ -186,7 +186,7 @@ jobs:
186186
- name: Set up Supabase CLI
187187
uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0
188188
with:
189-
version: 2.116.0
189+
version: 2.121.0
190190

191191
- name: Install dependencies
192192
run: npm ci

‎.github/workflows/database.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
- name: Set up Supabase CLI
7373
uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0
7474
with:
75-
version: 2.116.0
75+
version: 2.121.0
7676

7777
- name: Install dependencies
7878
run: npm ci

‎.github/workflows/live-e2e.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set up Supabase CLI
4343
uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0
4444
with:
45-
version: 2.116.0
45+
version: 2.121.0
4646

4747
- name: Install dependencies
4848
run: npm ci

‎.github/workflows/model-matrix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Set up Supabase CLI
4343
uses: supabase/setup-cli@46f7f98c7f948ad727d22c1e67fab04c223a0520 # v3.0.0
4444
with:
45-
version: 2.116.0
45+
version: 2.121.0
4646

4747
- name: Install dependencies
4848
run: npm ci

‎.superset/db-gate.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ esac
2121

2222
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2323
source "$DIR/lib/lock.sh"
24+
source "$DIR/lib/supabase-cli.sh"
25+
use_pinned_supabase_cli "$(cd "$DIR/.." && pwd)"
2426

2527
DB_LOCK="$HOME/.superset/debatelab-db.lock"
2628
FAKE_PROVIDER=debatelab-fake-openrouter

‎.superset/lib/supabase-cli.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Puts the repo-pinned Supabase CLI (the exact `supabase` devDependency in
2+
# package.json) first on PATH. Every worktree then runs one CLI version, so
3+
# Docker keeps one Supabase image set instead of one per CLI version.
4+
# Tests point DEBATELAB_SUPABASE_BIN_DIR at a stub directory instead.
5+
#
6+
# usage: use_pinned_supabase_cli <repo root>
7+
use_pinned_supabase_cli() {
8+
local bin="${DEBATELAB_SUPABASE_BIN_DIR:-$1/node_modules/.bin}"
9+
if [ ! -x "$bin/supabase" ]; then
10+
echo "The repo-pinned Supabase CLI is missing ($bin/supabase). Run npm ci first." >&2
11+
return 1
12+
fi
13+
export PATH="$bin:$PATH"
14+
}

‎.superset/teardown.sh‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set -euo pipefail
66

77
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
88
source "$DIR/lib/lock.sh"
9+
source "$DIR/lib/supabase-cli.sh"
10+
# Teardown still runs when npm ci never did; then there is no stack to stop.
11+
use_pinned_supabase_cli "$(cd "$DIR/.." && pwd)" 2>/dev/null || exit 0
912

1013
WORKSPACE_KEY="$(pwd)"
1114
PORTS_LOCK="$HOME/.superset/debatelab-ports/lock"

‎AGENTS.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ Database migrations and pgTAP policies use a separate Docker-backed gate. In Sup
7575
Outside Superset, run the underlying commands directly:
7676

7777
```bash
78-
supabase db start
78+
npx supabase db start
7979
npm run test:db
80-
supabase stop --no-backup
80+
npx supabase stop --no-backup
8181
```
8282

83-
Supabase CLI 2.115 or newer is required. Do not run this gate concurrently from multiple worktrees. If this task starts the stack, stop it before finishing, including after failures when safe.
83+
Use only the repo-pinned Supabase CLI (the exact `supabase` devDependency, 2.121.0). `npm run` scripts, `./.superset/db-gate.sh`, `scripts/agent-stack.sh`, and the verify harness already put it first on PATH; anywhere else, call `npx supabase`. Never use a global CLI or `npx supabase@latest`, and never bump the version in one worktree only: each CLI version pulls its own ~7 GB set of Docker images onto the shared VPS. Change it in `package.json`, `package-lock.json`, and the `setup-cli` steps in `.github/workflows/` together. Do not run this gate concurrently from multiple worktrees. If this task starts the stack, stop it before finishing, including after failures when safe.
8484

8585
WebKit is a separate release smoke test:
8686

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Requirements:
2424

2525
- Node.js 22.x and npm, using the committed `package-lock.json`
2626
- Deno 2.x for Edge Function tests
27-
- Docker and Supabase CLI 2.115 or newer for the local database gate
27+
- Docker and Supabase CLI 2.121.0, pinned in `package.json` (`npm ci` installs it) for the local database gate
2828
- Playwright browsers for browser tests
2929

3030
```bash

0 commit comments

Comments
 (0)