Repository navigation
FIX: bound ACA rollback connection wait by deadline instead of attempt count - #2913
Merged
hannahwestra25 merged 2 commits intoSep 30, 2026
Conversation
…t count
`rollback_public_origin` polled for private endpoint connection removal with
`for attempt in {1..20}` and a fixed `sleep 15`. An attempt-count loop does not
bound wall-clock time: each `az` call costs seconds of real CLI latency, so the
intended 5 minute window stretched well past it during a cutover rollback.
It also made the loop untestable. A no-op `sleep` stub cannot compress an
attempt counter, so `test_cancellation_keeps_public_access_disabled_until_
connection_removal` had to grind through all 20 iterations. Each one costs two
subshell forks plus a `jq` spawn, which is slow under Git Bash on Windows, and
the test intermittently exceeded the harness 30s subprocess timeout in CI.
Switch to a `SECONDS` deadline, matching `wait_for_http_health` in
deployment_common.sh, and log the remaining budget while waiting so a multi
minute wait is visible in pipeline logs. The retry budget and poll interval are
unchanged at 300s and 15s.
The test now stubs `sleep` to advance `SECONDS`, the same pattern the existing
HTTP readiness tests use, so the budget is exhausted in two polls. It asserts
the poll interval and that exactly one wait occurred, which pins the deadline
behavior; the old loop produces 19 sleeps and fails these assertions.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adrian Gavrila (adrian-gavrila)
approved these changes
Sep 30, 2026
hannahwestra25
enabled auto-merge
September 30, 2026 18:27
hannahwestra25
deleted the
hannahwestra25-fix-rollback-wait-deadline
branch
September 30, 2026 19:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rollback_public_originpolled for connection removal usingfor attempt in {1..20}with a fixedsleep 15. An attempt counter can't be compressed by the test'ssleepstub, sotest_cancellation_keeps_public_access_disabled_until_connection_removalran all 20 iterations — each two forks plus ajqspawn — intermittently exceeding the harness's 30s timeout on Windows CI.Now a
SECONDSdeadline, matchingwait_for_http_health. Budget (300s) and poll interval (15s) unchanged. The test stub advancesSECONDS, finishing in two polls.Verified:
tests/unit/infra49 passed; new tests fail against the old loop (19 sleeps); 7.72s → 3.05s.