decision(ops): hold a production build until its migrations are applied
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nextjs, supabase, typescript
- Lĩnh vực
- databases, devops, documentation
Hướng nghiên cứu
Read docs/operations/deploy.md, docs/internal/hosted-instance.md, and docs/operations/self-hosting.md to understand the current release steps and document the selected option. Eddie must choose an option first; then update the release order and migration status check in those files. Done means the chosen setting or branch and safe promotion order are documented, and self-hosting guidance no longer implies that a push always promotes automatically.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Sources: platform triage report, new issue 2, and deploy readiness report, new issue 4 (merged here).
The hosted instance's production branch is main (docs/operations/deploy.md:206), so every merge builds a production deployment, and with Vercel's default settings that deployment takes the production domain as soon as it builds. The runbooks assume otherwise: docs/internal/hosted-instance.md:9-11 says to apply new migrations "before the deployment receives traffic", and deploy.md:89 says every release applies migrations "before promoting the matching deployment". That order only holds with Vercel's "Auto-assign Custom Production Domains" turned off, which makes each production build a staged deployment that waits for a manual promote (Vercel docs, "Staging and promoting a production deployment"). No runbook names that setting. docs/operations/self-hosting.md:122 says a push to main builds and promotes.
Expand then contract (deploy.md:89) protects the previous build on a new schema, not a new build on the old schema. main had 52 commits since 2026-11-25, 14 of them touching supabase/migrations/ (git log origin/main --since=2026-11-25).
Impact: every signed-in user after a merge that adds a migration. New code runs on the old schema until Eddie applies the migration; queries against a new column or function fail with errors that users see on every page that reads them. Nothing self-heals until the migration is applied. The signal exists: /app/admin shows "Database migrations: Behind" (src/app/super-admin/page.tsx:76, :199).
This is Eddie's choice, so the options are below. Eddie promotes production; agents never do (hosted-instance.md:25).
| Option | Pros | Cons | Effort | Impact |
|---|---|---|---|---|
Status quo: main builds and goes live on its own |
Nothing to change; one step per release | New code serves before its migration is applied; hosted-instance.md:9-11 and deploy.md:89 describe an order that cannot happen |
XS (nothing) | Every user after a migration merge sees errors until Eddie applies it; the window is as long as Eddie's reaction time |
A. Turn off "Auto-assign Custom Production Domains"; each main build is staged, Eddie runs supabase migration list --remote and migration up --remote, then promotes |
Matches the runbooks as written; no new secret anywhere; a build whose CI failed is simply not promoted | Every release needs a manual promote, even with no migration; a forgotten promote leaves production on the old build (safe, but stale) | XS (docs plus one Vercel setting) | Users never meet a schema mismatch; the cost is release latency, which self-heals at the next promote |
B. Production branch becomes production; Eddie fast-forwards it from main after applying migrations |
Release is a visible git action; previews of main still build |
A second long-lived branch to keep in step; the #461 default-branch and ruleset setup (hosted-instance.md:29-30) needs a second protected branch; still manual |
S (docs, ruleset, Vercel setting) | Same protection as A, with more moving parts that can drift |
| C. A CI job applies migrations on merge before Vercel builds | No manual step | Puts the production database password in GitHub Actions secrets; a migration runs before review of the deploy; CI and the Vercel build race unless ordered; against "agents and automation never promote production" | M (workflow, secrets, ordering) | Fast releases; a bad migration reaches production with nobody watching |
Files each option touches:
| Option | Files |
|---|---|
| Status quo | none |
| A | docs/operations/deploy.md (step 5 and the release paragraph at :89), docs/internal/hosted-instance.md (Promote production), docs/operations/self-hosting.md:122 |
| B | the same docs, plus the repository ruleset and Vercel's production branch setting |
| C | a new workflow under .github/workflows/, repository secrets, the same docs |
Recommendation: A. The deciding argument: it makes the order the runbooks already promise true with one Vercel setting and no new secret, and keeps promotion with Eddie. Second choice: B, if a visible release branch is wanted later.
Plan
- Eddie picks an option on this issue.
- Write the chosen setting into
deploy.mdstep 5 andhosted-instance.md, and the order as: staged build,supabase migration list --remoteandmigration up --remote, then promote. - Name "Database migrations: Behind" on
/app/adminas the signal to check before promoting. - Say that a
maincommit whose CI failed is not promoted.
Acceptance criteria
- The chosen option is recorded on this issue with the reason.
-
deploy.mdstep 5 andhosted-instance.mdname the Vercel setting (or the production branch) and the release order. - A commit with a new migration cannot serve production before
supabase migration list --remoteshows it applied. -
self-hosting.md"Upgrade" no longer says a push tomainpromotes on its own, or says why that is safe for self-hosters. - Playwright e2e: none needed, docs only.
Files and areas
docs/operations/deploy.md, docs/internal/hosted-instance.md, docs/operations/self-hosting.md.
Non-goals: applying migrations, changing Vercel settings (Eddie's), the production address work in #756.
Verification
npm run lint; the docs e2e spec still passes.
Branch: <issue-number>-staged-production-builds
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 2
- Merge trung bình
- 5 giờ 20 phút
- Pull request đã merge (30 ngày)
- 287
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eddiejaoude/StackDash#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops documentation priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eddiejaoude/StackDash#796 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs documentation impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops bug impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#785 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: connections enhancement impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
eddiejaoude/StackDash#768 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
bot:ai-assisted component:midnight-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-js#1790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:vscode bug has repro platform:macos platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort/l priority/p1 risk/high triage/core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iflytek/skillhub#1188 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày