Repository navigation
Retry E2E image builds after Go proxy transport errors - #1076
Merged
Merged
Conversation
Collaborator
Author
|
@mjudeikis-bot review |
mjudeikis
reviewed
Nov 11, 2026
mjudeikis
left a comment
Contributor
There was a problem hiding this comment.
No Critical or Warning findings. One Note.
Checked
- Read beyond the diff:
Makefilee2e-hub-image,e2e-agent-imageande2e-images(plaindocker build), thego mod downloadandgo buildsteps indeploy/Dockerfile.hubanddeploy/Dockerfile.agent, the othertimeout-minutesvalues ine2e.yaml, and theverify-workflowstarget. - Correctness: the loop exits 0 on the first success and exits 1 on the third failure or on a non-matching failure.
teewithout-atruncates the log on each attempt, so a previous attempt's proxy error cannot trigger a retry of a later compile failure.shell: bashmakes Actions runbash -eo pipefail, somakefailing insidemake | teefails the pipeline andteedoes not mask it. Simulated the loop with a fake proxystream erroron every attempt: it retried twice, then gave up with rc=1. - Concurrency, tenancy and kcp, provider contract, API/codegen/storage, portal: not applicable. The change is one CI workflow step and a timeout.
- Security: no secrets reach the log. The
mktempfile is removed by the EXIT trap.::warning::is a static string. - Timeout: worst case is 3 image builds plus 45s of sleep, covered by the raise from 25 to 35 minutes. The step is bounded.
- Tests: no test covers the classifier. That is reasonable for a workflow step, and the PR body describes the manual simulation.
- Commands run:
make verify-workflows(pinned actionlint v1.7.7) passed with no findings; the retry simulation above. - Not run: the e2e suites and
make build/vet/lint/unit tests, because no Go, API or provider code changed. The retry path itself needs a real Docker/proxy failure and cannot be reproduced locally.
| if make e2e-images 2>&1 | tee "$build_log"; then | ||
| exit 0 | ||
| fi | ||
| if [[ "$attempt" == 3 ]] || ! grep -Eq 'proxy[.]golang[.]org.*(stream error|connection reset by peer|TLS handshake timeout|unexpected EOF|i/o timeout)' "$build_log"; then |
Contributor
There was a problem hiding this comment.
Note: Transient-error pattern is narrow
The pattern only matches five phrases on the same line as proxy.golang.org. Other transient proxy failures, such as HTTP 5xx (502 Bad Gateway, 503 Service Unavailable), http2: server sent GOAWAY and http2: client connection lost, are not retried and fail immediately. These are the same class as the HTTP/2 stream errors this PR targets, so the next flake of that kind will still fail the job. Consider widening it:
grep -Eq 'proxy[.]golang[.]org.*(stream error|GOAWAY|client connection lost|connection reset by peer|TLS handshake timeout|unexpected EOF|i/o timeout|50[234] |Bad Gateway|Service Unavailable)' "$build_log"# Conflicts: # test/e2e/suites/agentsprovider/agents_test.go
The proxy error on main hit the agent image's go build step, not go mod download, so a workflow-level loop that rebuilt every image and matched proxy.golang.org error text both missed cases and cost full rebuilds. Wrap both go commands in the hub and agent Dockerfiles with hack/go-retry.sh, which retries the failed step in place and switches to HTTP/1.1 on retry. CI passes GO_BUILD_GODEBUG=http2client=0 from the first attempt in both the e2e and image publishing workflows; the setting applies only to those go commands. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
The E2E hub and agent image build failed on PR #1075 and again on main with HTTP/2 stream errors from
proxy.golang.org. In the failed main run the error came from the agent image'sgo buildstep, which also downloads modules, not only fromgo mod download.hack/go-retry.shwrapsgo mod downloadandgo buildin bothdeploy/Dockerfile.hubanddeploy/Dockerfile.agent. A failed step is retried up to three times inside the same Docker build, and every retry uses HTTP/1.1. Only that step reruns; the module and build caches keep finished downloads and compiles. There is no error-text matching, so checksum-database (sum.golang.org) failures are covered too.GO_BUILD_GODEBUG=http2client=0, so Go downloads use HTTP/1.1 from the first attempt. The E2E build step sets it formake e2e-images, andimages.yamlpasses it as a build arg for the published hub and agent images. The setting applies only to the wrapped go commands, so builds without it (Tilt, local) are unchanged.make e2e-imageswith the setting, and checks both Dockerfiles andimages.yaml. New tests run the retry script: first-try success, the setting applied from the start, the switch to HTTP/1.1 on retry, and the exit code after the last attempt.Validated with the pinned Actionlint (
make verify-workflows), all 32 CI tests (hack/ci), and a local agent image build with the CI setting.🤖 Generated with Claude Code