mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-02 03:53:24 +00:00
fix(deploy): apply the health-convergence fix to the dev Terraform rollback
The dev Terraform rollback verify was the one gate the previous commit missed, and it is the copy that actually ran on 34293894914. It still decided on the first Ready poll: previous version correctly restored, health not yet converged, reported as a failed rollback. Split the version and health conditions the same way the other three gates now do — a Ready poll on the wrong version fails immediately and names the version that came up, while the correct version with unsettled health keeps polling inside the unchanged 80 x 15s budget. Timeout now reports the last observed status, version and health.
This commit is contained in:
parent
d1e3fb03ce
commit
9a49a5c40a
1 changed files with 10 additions and 4 deletions
14
.github/workflows/deploy.yml
vendored
14
.github/workflows/deploy.yml
vendored
|
|
@ -620,16 +620,22 @@ jobs:
|
|||
)
|
||||
echo "environment status: $status; version: $current; health: $health"
|
||||
if [ "$status" = "Ready" ]; then
|
||||
if [ "$current" = "$prev" ] && { [ "$health" = "Green" ] || [ "$health" = "Yellow" ]; }; then
|
||||
if [ "$current" != "$prev" ]; then
|
||||
echo "Rollback reached Ready on version $current, not the previous $prev." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "$health" = "Green" ] || [ "$health" = "Yellow" ]; then
|
||||
echo "Application version restore complete; previous code is Ready and healthy."
|
||||
exit 0
|
||||
fi
|
||||
echo "Rollback reached Ready in an unexpected version/health state." >&2
|
||||
exit 1
|
||||
# Same convergence gap as the release check above: the previous version
|
||||
# is back, health has not settled yet, and reporting a failed rollback
|
||||
# here hides the fact that the restore itself worked.
|
||||
echo "Previous version is active; waiting for health to leave $health."
|
||||
fi
|
||||
sleep 15
|
||||
done
|
||||
echo "Environment did not return to Ready within rollback window." >&2
|
||||
echo "Environment did not return to Ready and healthy within the rollback window (last seen: status=$status version=$current health=$health)." >&2
|
||||
exit 1
|
||||
|
||||
deploy-staging:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue