Repository navigation
Keep waiting after a transient server or network error - #91
Open
atharv1205 wants to merge 1 commit into
Open
atharv1205 wants to merge 1 commit into
atharv1205 wants to merge 1 commit into
Conversation
A single 5xx, 429, timeout or dropped connection during a poll ended review, ci review and ci deploy waits at once, even with most of --timeout left. Poll loops now read again at the next interval and end with the same error only at the deadline. Refusals still end the wait immediately, and no POST is retried.
This branch has not been deployed
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.
Problem
One transient failure during a poll ended the whole wait. The failure could be a 502, 504, 503 or 429 with a
Retry-Afterover 60 s, a timeout or a reset connection.Api::readretries only 429/503 with a shortRetry-After, and every poll loop passed the first error up with?. So a 30-minuteci reviewor a 1-hourci deploy --until 1hfailed on one load-balancer blip:ci reviewandci deployexited 4.review --wait,findings --wait,rerunand the hooks exited 1.This happened with most of
--timeoutunused, even though the next poll would have returned the result.Fix
polled()insrc/lib.rsis used byread_review,wait_for_head_reviewanddeploy::wait.unavailable()already classifies, plus 429. The loop logs one line and reads again on the normal backoff, never sleeping past the deadline.Tests
tests/http.rsa_wait_reads_again_after_a_failed_read_and_stops_at_a_refusalsrc/deploy.rsa_failed_read_is_read_again_and_a_refusal_ends_the_waitsrc/deploy.rsa_console_that_keeps_failing_ends_the_wait_at_the_timeoutChanged:
a_wait_renews_its_credential_and_a_refused_renewal_ends_it. A credential renewal answered with 503 is now tried again at each poll and ends at the deadline (still exit 4, still no review request), instead of ending immediately.cargo fmt --check,cargo clippy --locked --all-targets -- -D warnings,cargo test --lockedandcargo deny checkpass.