Skip to content

fix(deploy): keep healthy targets through production cutover - #1062

Merged
athvin merged 2 commits into
mainfrom
fix/1043-cutover-gate
Nov 9, 2026
Merged

athvin merged 2 commits into
mainfrom
fix/1043-cutover-gate

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #1043

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Keep old ALB targets registered while the replacement colour becomes healthy, then verify public health before retirement. Roll back on failed verification.

Why

Proof

45 local CI-helper tests pass, including 11 cutover tests; intentionally broken target matching and overlap selectors both made their gates fail. Helm lint, all profile schema validation plus production overlap, selector checks, actionlint, workflow-shell/scripts-home checks and skills-check pass.

Risk & rollback

The overlap briefly serves both already-smoke-tested versions; each BFF reaches its own same-pod API. Additive migrations remain mandatory. Canonical live/preview selectors stay colour-specific through interruption. Any target/public verification failure restores the old colour and fails the deploy before retirement; a rollback failure remains visibly red with both Deployments retained.

Post-merge ledger

Closed by: Codex · session 01a1be1a-66a7-72f3-8e78-32c20c5e0da9 on Mac-46 · 2026-11-09T22:22:06.103400+00:00

Specific to this change

  • Normal demo login reaches the dashboard in Chromium and WebKit; both read 23 synthetic records with no page errors. This confirms navigation, not complete application availability: the independent monitor caught two upstream-unreachable health failures during these reads, recorded in Fix production readiness timeouts during dashboard reads #1067.

  • Completed the post-merge watch from 21:51:06Z through 2026-11-09T22:22:03.590430+00:00: 353 public-health samples, 351 HTTP200/ready=true and 2 HTTP503. Both failures were application JSON upstream-unreachable at 21:59:08Z and 21:59:15Z during ordinary dashboard reads; deferred — Fix production readiness timeouts during dashboard reads #1067. No ALB registration 503 was sampled during either fixed cutover. The owned observer was stopped after this window. This is not a claim of complete production availability.

  • A second real cutover on descendant 80c674ec also passed in 42710140151: two expected ALB targets healthy22:16:46Z, public readiness passed three minutes22:19:53Z, blue retired22:19:55Z. Independent readback22:21Z: green1/1, blue0/0, pod2/2 with zero restarts, target10.1.164.13 healthy; live process emitted startup22:15:46.364193Z. The newer commit's Rust/frontend/infra/images/devcontainer workflows also succeeded.

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Implementation plan
  1. Prerequisite fix(prod): allow deploy to read ALB target health #1061 merged 3e95a13; await its successful production apply (read-only target-health permission).
  2. Add a temporary dedicated er-web-edge Service overlap selector, preserving the old and new pod templates and preview isolation until smoke tests pass.
  3. Read exact pod IPs; wait for both colours in ALB, switch to the target, require three minutes of public readiness, and wait for old targets to drain before retirement. Restore the old colour on failure.
  4. Skip repeat Helm hooks during selector-only upgrades: schema/tenant migration already completed during the inactive-colour deploy.
  5. Prove delayed/missing target registration and public failure reject cutover; render default/overlap charts and run CI gates.
  6. Land and observe a real production cutover, retain separate follow-up for any steady-state timeout not resolved by this transition.

@athvin
athvin force-pushed the fix/1043-cutover-gate branch from 770370e to 69b6b76 Compare November 9, 2026 20:17
@athvin
athvin marked this pull request as ready for review November 9, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate transient public 503 during production blue/green cutover

2 participants