Repository navigation
[rush] Retry transient HTTP cache transfers - #6182
Merged
Ian Clanton-Thuon (iclanton) merged 1 commit intoOct 30, 2026
Merged
Ian Clanton-Thuon (iclanton) merged 1 commit into
Ian Clanton-Thuon (iclanton) merged 1 commit into
Conversation
Keep transient transport failures inside the HTTP cache retry budget, and reopen file streams for each upload attempt instead of attempting to replay consumed streams. Clean up failed streams before retrying. Use bounded exponential backoff and Retry-After, retry only transient status/error codes, and add verbose attempt and cf-ray diagnostics without warning on recovered requests. Keep the existing three-attempt budget and failure policy; leave retry configuration for a follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ian Clanton-Thuon (iclanton)
requested a review
from Pete Gonzalez (octogonz)
as a code owner
October 30, 2026 00:59
Ian Clanton-Thuon (iclanton)
enabled auto-merge (squash)
October 30, 2026 01:04
Bharat Middha (bmiddha)
approved these changes
Oct 30, 2026
Ian Clanton-Thuon (iclanton)
merged commit Oct 30, 2026
f9ca53c
into
microsoft:main
10 of 11 checks passed
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.
Summary
ECONNRESET, rather than bypassing the HTTP cache retry budget when a request throws.Retry-Afterforms, and include attempt/delay andcf-raydiagnostics.Why
The HTTP cache provider already retries buffered uploads that receive unsuccessful HTTP responses, but transport exceptions escape directly to the outer warning handler. Streamed uploads explicitly make only one attempt because their request body cannot be replayed. Brief cache-service interruptions can therefore fail an otherwise successful build and require rerunning the whole pipeline.
Both upload paths now share the existing three-attempt budget. File uploads create their stream inside the attempt, so a failed upload cannot leave the next attempt with an already-consumed body.
Behavior and scope
Retry-Aftercan increase the delay. If the requested wait exceeds 60 seconds, report the failure rather than retrying before the requested time or imposing an unbounded wait.Validation
node common/scripts/install-run-rush.js build: 146 operations succeeded.node common/scripts/install-run-rush.js retest --only @rushstack/rush-http-build-cache-plugin --verbose: 114 tests passed.Retry-Afterformats and bounds, stream cleanup, and diagnostics.ECONNRESETretries causes 39 tests to fail; restoring the implementation returns the suite to green.node common/scripts/install-run-rush.js change --verify --target-branch microsoft/main: passed.