fix: Retry plugin downloads that drop mid-body - #672
Merged
Conversation
An HTTP/2 INTERNAL_ERROR stream reset during the body copy was classified as permanent, so the download failed after a single attempt. Classify transient transport failures and retryable status codes for retry, keep 4xx permanent, reset the output file between attempts, verify the body length against Content-Length, and extract the plugin binary through a temporary file so a partial extraction is never cached as a plugin.
erezrokah
marked this pull request as ready for review
August 21, 2026 19:28
erezrokah
requested review from
dcelasun and
disq
and
a lite review from Copilot
and removed request for
a team
August 21, 2026 19:28
Redact the URL that url.Error prints verbatim, so wrapping a transport error no longer re-exposes the signed token. Retry connection refused, unreachable networks and DNS failures, and match the Windows WSA socket messages that the synthetic syscall.E* constants never match. Migrate the getURLLocation probe onto the same classifier with bounded backoff and redacted URLs. Make the retry delays injectable so the tests stop sleeping through the real backoff, and assert the hijack error on the test goroutine.
mnorbury
approved these changes
Aug 24, 2026
kodiakhq Bot
pushed a commit
that referenced
this pull request
Aug 24, 2026
🤖 I have created a release *beep* *boop* --- ## [1.27.17](v1.27.16...v1.27.17) (2026-08-24) ### Bug Fixes * **deps:** Update module google.golang.org/protobuf to v1.36.12 ([#674](#674)) ([0bbd596](0bbd596)) * Retry plugin downloads that drop mid-body ([#672](#672)) ([3afec5a](3afec5a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Retries a mid-body HTTP/2 stream reset and its sibling transient transport failures within a bounded budget, while keeping 4xx permanent so an expired signed URL fails fast.
#1— one attempt. The body-copy error did not match the oldRetryIf, which only accepted a non-200 status.