ci(deploy): make production helm upgrade atomic (BLO-21492) - #998
ci(deploy): make production helm upgrade atomic (BLO-21492)#998allyblockcast[bot] wants to merge 2 commits into
Conversation
|
🔗 Paperclip issue: BLO-21492 |
1 similar comment
|
🔗 Paperclip issue: BLO-21492 |
|
Hey @allyblockcast[bot]! Before this PR can be reviewed, a few things need attention: Missing or incomplete:
Once updated, push a new commit and these checks will re-run automatically. — commitperclip |
…492) scripts/check-docker-deploy-timeout.test.js regex-matches the literal "--wait --timeout Nm" substring to check the deploy job's timeout-minutes leaves cleanup margin over Helm's own timeout. Inserting --atomic between --wait and --timeout broke that match (policy job failure on PR #998). Reordering to --atomic --wait --timeout is semantically identical to Helm and keeps the checked substring intact.
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Important Issues (1)
Strengths
Recommended Action
This PR is authored by |
…492) scripts/check-docker-deploy-timeout.test.js regex-matches the literal "--wait --timeout Nm" substring to check the deploy job's timeout-minutes leaves cleanup margin over Helm's own timeout. Inserting --atomic between --wait and --timeout broke that match (policy job failure on PR #998). Reordering to --atomic --wait --timeout is semantically identical to Helm and keeps the checked substring intact.
c86dcb3 to
1a91f2a
Compare
allyblockcast
left a comment
There was a problem hiding this comment.
Approved with the allyblockcast reviewer seat after the automated review gate passed; merge remains gated on the remaining CI checks.
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Prior Findings Dispositioned (1)
Looks good. Adding Strengths
Recommended ActionMerge after the remaining required CI checks pass. This PR is authored by |
helm upgrade ran without --atomic, so a partially-applied upgrade (e.g. one workload patched, another denied by an admission policy) was left half-rolled-out with a bare exit 1 and no rollback -- the worker StatefulSet advanced to the new image while the paperclip-api Deployment stayed pinned to the old one, invisibly, until someone compared digests. --atomic makes Helm roll the whole release back to the last successful revision on any failure, so a failed upgrade never leaves the API and worker tiers on different builds; it only ever advances both or neither.
…492) scripts/check-docker-deploy-timeout.test.js regex-matches the literal "--wait --timeout Nm" substring to check the deploy job's timeout-minutes leaves cleanup margin over Helm's own timeout. Inserting --atomic between --wait and --timeout broke that match (policy job failure on PR #998). Reordering to --atomic --wait --timeout is semantically identical to Helm and keeps the checked substring intact.
1a91f2a to
cde07e5
Compare
Ally — Consolidated PR ReviewLenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex. Looks good. The flag reorder at Suggestions (1)
Strengths
Recommended ActionMerge after the remaining required CI checks pass. This PR is authored by |
Thinking Path
Linked Issues or Issue Description
Refs BLO-21492 — Paperclip-internal tracker issue; no mirrored GitHub issue exists in this repo (searched
is:issue BLO-21492— zero results, and searched open/recent PRs for--atomic/helm upgrade— no duplicates).What Changed
--atomicto the productionhelm upgradeinvocation in thedeployjob of.github/workflows/docker.yml, so Helm rolls the whole release back to the last successful revision on any failure instead of leaving it half-applied.--atomic --wait --timeout 30m(rather than--wait --atomic --timeout 30m) so the literal substring--wait --timeoutthatscripts/check-docker-deploy-timeout.test.jsregex-matches for the timeout-margin check stays intact.--atomicimplies--wait; the explicit--waitis kept for readability only.Verification
node --test ./scripts/check-docker-deploy-timeout.test.js— 7/7 pass locally, including the timeout-margin assertion that the flag reorder was needed to keep passing.verify/policy/reviewchecks on thedeployjob definition.helm -n paperclip history paperclipthat the release rolled back rather than leaving a half-applied revision, and thatkubectl -n paperclip get deploy/paperclip-api sts/paperclip -o jsonpath='{.items[*].spec.template.spec.containers[0].image}'shows both tiers still on the pre-upgrade digest.Risks
Low risk.
--atomiconly changes behavior on the failure path (adds an automatichelm rollbackbefore exiting non-zero); it does not change what a healthy upgrade does. The one behavior change worth flagging: a failure now takes longer to report (Helm waits for the rollback to complete before returning), so thedeployjob'stimeout-minutes: 40needs to keep leaving margin over the Helm--timeout 30mfor the rollback itself — verified by the existingcheck-docker-deploy-timeout.test.jsmargin test, which still passes after this change.This is one half of the BLO-21492 fix. The other half (the admission policy that was denying legitimate API-container chart changes in the first place) is Blockcast/onprem-k8s#1997 — both need to land before a production deploy of an API-container chart change succeeds cleanly without ever tripping this rollback path.
Model Used
Claude, claude-sonnet-5[1m] (Sonnet 5, 1M context), via Claude Code — no extended thinking mode, standard tool use.
Checklist