chore(cd): deploy pipeline per ADR-0110 round 29 (expand, deploy 100 %, smoke, auto-rollback)
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with docs/src/architecture/cicd.md, ADR-0110, and the existing .github/workflows/ci.yml; inspect scripts/stage2-contract.sh for the deployed Worker checks and docs/src/architecture/infra.md for the migration access path. Then implement and document the ordered deploy, smoke, rollback, and asset-retention steps, including the staging failure controls and approval gate for Durable Object migrations.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Nothing deploys today. docs/src/architecture/cicd.md:80 reads "Any deploy. There is no workflow for it.", and :96-97 says nothing implements ADR-0110. The repository's workflows are ci.yml, contract-cell.yml and flake-hunt.yml. ADR-0110 (accepted in round 24) prescribes this sequence:
- expand migration;
- upload at 0 %;
- smoke and an oracle subset through the version-override header;
- 10 % for 10 minutes;
- 100 %, with absolute-count gates and an automatic
wrangler rollback(adrs/cd/0110-deploy-pipeline.md:38,:79; Q-0110.1,QUESTIONS.md:234).
The only script that tests a deployed Worker is scripts/stage2-contract.sh, which needs the test routes and the admin token (:36-39). Migrations are the migrate binary (docs/src/architecture/infra.md:128-129). Today the only way into the CNPG clusters is kubectl exec on the primary (research/0010 §2, lines 107-112).
Problem
- FR-12: traffic is about 5 M requests a month (
research/0004§9, line 317), so 10 % for 10 minutes is roughly 100 requests, most of them the owner's. The ADR itself says percentage slices are meaningless at ≤50 users (0110-deploy-pipeline.md:79). The 10 % stage observes nothing the smoke suite does not, and the version-override plumbing costs build and maintenance. - Two constraints remain. A rollback does not revert connected resources, so migrations stay expand/contract (
:15-17,:25). A deploy cannot be rolled back across a Durable Object lifecycle change (:18-19). - A third comes from ADR-0011 (round 26). The SPA fallback answers a missing hashed asset with
200 text/html, so deploys must keep old hashes until clients age out (adrs/ui/0011-static-asset-hosting.md:76). A 100 % deploy drops the previous version's assets.
Proposal
Add .github/workflows/deploy.yml, triggered on push to main and by hand for each environment (dev, staging and prod, per Q-0092.2), with credentials per ADR-0101.
- Expand migration. Q-0110.2 says CI runs it, but nothing gives CI a route to
thrust-pgtoday, so this issue chooses one: a runner with cluster access, or a tunnel route with an Access service token. If #37 picks the Durable Object cell, this step becomes the object's own migration. - Deploy. Record the current version id, then
wrangler deployat 100 %. - Smoke. Run a new pass against the live hostname that needs no test routes:
/healthzfirst; then, once #44 exists, sign in with a dedicated smoke account and read a seeded project. Vacuity guard:/healthzreports the deployed version id (from the version metadata binding, or a var set at deploy), and the smoke checks it equals the new one. - Roll back. If the smoke fails, run
wrangler rollback <previous id>and fail the job. If the release adds a[[migrations]]tag, skip the automatic rollback and require manual approval (the DO-lifecycle rule). - Assets. Once #44 adds static assets, include the previous release's hashed files in each upload, or answer 404 for a missing
/assets/*file.
Acceptance criteria
-
deploy.ymlexists and runs the steps in order on push tomain. - Control: on staging, a release with a smoke check that fails on purpose ends with the previous version active again (
wrangler deployments list) and the job red. - Control: the smoke pass fails when pointed at a Worker that still serves the previous version id.
- A release that adds a DO migration stops for approval and does not roll back automatically.
- After a deploy, an asset URL from the previous release still returns its JavaScript, not HTML.
-
docs/src/architecture/cicd.mddescribes the pipeline, and ADR-0110 (round-29 note) and Q-0110.1 match it.
References
- Review: .agents/plans/contrail/reviews/2026-10-19-fable-architecture-review.md (FR-12)
- ADR-0110 (
:13-20,:25,:38,:79; round-29 note), ADR-0101, ADR-0011 (:76), ADR-0090, ADR-0093, ADR-0130 - Q-0110.1, Q-0110.2, Q-0092.2
docs/src/architecture/cicd.md:73-80,:94-97;docs/src/architecture/infra.md:128-129;scripts/stage2-contract.sh:36-39research/0004-rust-on-workers-binding-matrix.md§9 (traffic model);research/0010-thrust-postgres-infra-plan.md§2 (database access path)
Blocked by: #43
Finding: FR-12
- Ngôn ngữ chính
- Rust
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 35 phút
- Pull request đã merge (30 ngày)
- 67
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 aRustyDev/thrust
-
area:process prio:p1 type:security
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process bug prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:process prio:p1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aRustyDev/thrust
Issue tương tự
-
Độ 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
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Clean master build fails in zune-jpeg error conversion and zero-IV array construction (patch)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CakeRepository/agentshangout#995 ·
-
area:frontend kind:bug priority:p3 ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày