Repository navigation
Description
The blue/green stack shipped across 14 PRs (#437 #445 #443 #452 #451 #456 #461 #468 #472 #474 #541 #590 #607, plus #624/#610 for the probe). Every PR was verified by content on main after merging, and the chart/Rust/CI halves each have their own gate. What has never been run is the end-to-end acceptance criterion the plan specified, against the ci namespace on er-dev.
The mechanism is Helm-native: color.active is what svc/er-api and svc/er-web select, each colour's digests are pinned independently, and er-{api,web}-preview select the inactive colour. The three-phase deploy job in images.yml reads the live colour from the Service selector rather than from Helm's state.
The four things to run
- Zero-downtime, measured.
curlin a loop againstsvc/er-webthrough a port-forward for the entire cutover window. Zero non-2xx is the criterion — not "it looked fine". - Rollback. Flip
color.activeback and run the loop again. The old colour never stopped running, so this should be seconds. - The expand case. A release that adds a nullable column, proving the old colour keeps serving correctly against an ahead store.
er-server migrate --planon the old digest must reportahead, notbreaking. This is the property the whole design rests on (er-entity-diff's third verdict, and E011 forbiddingSELECT *anywhere), and it has only ever been tested at the unit/e2e layer, not across a live cutover. - The negative path. Push a branch that retypes a column and confirm the preflight refuses and deploys nothing — live colour untouched, no hook run, no DDL written.
pg_reconcile.rs:169already asserts "a refusal writes no ledger row"; this proves the same at the deploy layer.
Two measured constraints to watch while doing it
- Aurora connection establishment.
er-serverhas no connection pool — handlers connect per request — so two colours double connection establishment against an Aurora Serverless v2 instance that may be at 0 ACU. WatchDatabaseConnectionsthrough the first cutover. - The namespace quota.
limits.cpuis 40 and a two-colour cutover costs ~5 (dispatcher 1.0 + blue 1.5 + green 1.5 + a weight-ordered hook 0.5 + the drift CronJob 0.5 if it fires). Fine at two concurrent L task pods (24 + 5 = 29). See docs(infra): the quota's cpu sum stopped adding up when colours landed #633 for why the comment that used to say "+2 for the app" was wrong, and the trap it set.
Known residual risk — expected, not a bug
A browser holding the old colour's HTML that makes a client-side navigation requests /_next/static/<old-build-id>/…, which 404s once the Service moves. The App Router recovers with a hard navigation, so it is degraded, not broken. frontend/next.config.ts sets no generateBuildId, so the id is per-build. The real fix is per-target-group stickiness on the ALB, which D-BLUEGREEN defers and which the edge (task 1.4) is blocked on anyway. Do not treat a single 404 for a stale static asset as a cutover failure; do treat a non-2xx on a document or /v1 request as one.
Activity
athvin commentedon Nov 7, 2026
Claimed — working in #811 (draft). Closing that PR releases the claim.
ci(bluegreen): measure the zero-downtime cutover instead of asserting it
athvin commentedon Nov 7, 2026
Criteria 1 and 2 are proven; 3 and 4 split to #813
#811 measures the two criteria that were achievable, against
cioner-dev:helm upgradeblue → greengreen → blueBoth colours were pinned to identical digests, so the only variable was the
selector move.
scripts/ci/bluegreen-acceptance.shmakes it re-runnable, with aguard that aborts rather than reporting a number if
deploy.ymlmoved therelease mid-window.
Both stated constraints checked: Aurora
DatabaseConnections7 → 9 withServerlessDatabaseCapacitynever leaving 0.5 ACU (the second colour costs ~2connections); quota 2500m used of 40.
Why 3 and 4 moved rather than being finished here
Neither can be exercised from a branch —
images.ymlispush: branches: [main]anddeploy.ymlfires onworkflow_runafter it, sothere is no branch path to a
cideploy. Both need a release merged tomain,which is a materially different act from running a loop against a namespace.
Criterion 4 is worse than that:
make checkhas no Postgres, so a retype passesthe PR gate cleanly and can only be refused at the deploy preflight — meaning the
test leaves
main's deploy path refusing until reverted. Not something to dowhile other sessions have PRs in flight. #813 carries both with the reasoning
and a cheaper alternative for 4.
One correction to this issue's text
Right in magnitude, wrong in mechanism. That holds only between cutover and
retire;
deploy-retire-colour.shscales the old colour to zero afterwards, whichis the steady state this namespace was found in. A real rollback is therefore a
scale-up, not a selector move — measured at 7s to ready from
replicas=0,because that script scales rather than deletes and the image stays cached on the
node. Both paths are seconds; the reasons differ, and the difference matters if
the image ever stops being cached.
wip: claim #656 — run a real two-colour cutover in ci
ci(bluegreen): measure the zero-downtime cutover instead of asserting it