damccorm opened a new pull request, #41910:
URL: https://github.com/apache/beam/pull/41910
Note: this PR was auto-generated by tooling. Before moving it out of draft,
the author has done a full review of the PR, specifically evaluating it on the
following criteria:
- The PR is an appropriate fix for the issue (e.g. we're not changing a test
to avoid a bug)
- The PR is a simple fix to the issue (e.g. we're not adding infra when we
could just modify a test)
- The PR is not covering for other problems (e.g. if we're bumping timeouts,
it is not because we're covering for a performance problem)
Full details of the methodology of generation and review can be found here -
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
If you have concerns with the PR or with the underlying methodology used to
generate this, please comment below - they will be addressed by the author not
the tooling :)
## Summary
Retries transient `proxy.golang.org` transport/HTTP/2 errors (such as
`stream error: stream ID ...; INTERNAL_ERROR; received from peer`) in
`:sdks:go:examples:wordCount` (`sdks/go/examples/build.gradle`), which failed
`Local environment tests` (`Mac run local environment shell script`) twice in 3
hours.
## Recent Occurrences
- [47137555748](https://github.com/apache/beam/actions/runs/47137555748)
(`2026-12-03T15:21:24Z`, scan https://develocity.apache.org/s/ng72tmsjsghtk):
`:sdks:go:examples:wordCount` failed on `macos-latest` with `read
"https://proxy.golang.org/golang.org/x/net/@v/v0.63.0.zip": stream error:
stream ID 107; INTERNAL_ERROR; received from peer`.
- [47111889160](https://github.com/apache/beam/actions/runs/47111889160)
(`2026-12-03T13:04:12Z`, scan https://develocity.apache.org/s/axj6w32kcon4s):
`:sdks:go:examples:wordCount` failed on `macos-latest` with `stream error:
stream ID 23; INTERNAL_ERROR; received from peer`.
- `Local environment tests` has 3 `master` failures in the past 7 days
(`46578092770`, `47111889160`, `47137555748`).
## Root Cause
When `actions/setup-go` has a cold `GOMODCACHE` on `macos-latest`,
`:sdks:go:examples:wordCount` invokes `go build` which downloads hundreds of Go
module zips concurrently over HTTP/2 from `https://proxy.golang.org`. `cmd/go`
does not retry a single HTTP/2 `INTERNAL_ERROR` stream reset, failing the
entire `./gradlew checkSetup` run even though all previously fetched modules
are already cached in `GOMODCACHE`.
## Fix
- In `sdks/go/examples/build.gradle`, wrap `project.exec` in `task
wordCount` with up to 3 attempts (5s, 10s backoff), retrying **only** when
stderr contains `proxy.golang.org` along with a transient transport error
(`stream error`, `INTERNAL_ERROR`, `TLS handshake timeout`, `connection reset`,
or `unexpected EOF`). All other errors (such as Go compilation failures) fail
immediately on attempt 1, and stderr is always echoed to `System.err`.
## Test Suite Runtime Impact
- **Affected workflow:** `Local environment tests`
(`.github/workflows/local_env_tests.yml`, which runs `./gradlew checkSetup` →
`:sdks:go:examples:wordCount`).
- **Happy path:** **0 seconds added** — when `go build` succeeds on attempt
1, no extra commands or sleeps run.
- **On transient proxy error:** Adds 5s (attempt 2) or 15s (attempt 3)
backoff plus only the remaining uncached module downloads (already-fetched
modules stay in `GOMODCACHE`), avoiding a ~10-minute workflow failure and
manual rerun. Non-proxy errors fail immediately on attempt 1.
- **Unaffected:** All other CI workflows (does not modify `buildSrc/`, so
there is no Gradle build cache invalidation).
Build/CI-only change; no production SDK code is modified.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]