Skip to content

feat(ci): configure Go proxy settings for builds#19

Draft
bschimke95 wants to merge 9 commits intomainfrom
KU-4668/go-build-issues
Draft

feat(ci): configure Go proxy settings for builds#19
bschimke95 wants to merge 9 commits intomainfrom
KU-4668/go-build-issues

Conversation

@bschimke95
Copy link
Contributor

@bschimke95 bschimke95 commented Nov 27, 2025

Configure GOPROXY with direct fallback and disable HTTP/2 client
to avoid transient EOF errors from proxy.golang.org on self-hosted
runners.

See here for the related discussion with the rockcraft team.

@bschimke95 bschimke95 force-pushed the KU-4668/go-build-issues branch 7 times, most recently from 2419616 to f4ea228 Compare November 28, 2025 06:39
Update pull_request workflow to use k8s-workflows feature branch with
configurable build-env support. Add GOPROXY and GOSUMDB environment
variables to handle transient EOF errors from proxy.golang.org on
self-hosted runners.

Add dummy comment to rockcraft.yaml files to trigger build process.
@bschimke95 bschimke95 force-pushed the KU-4668/go-build-issues branch from f4ea228 to 551f71e Compare November 28, 2025 06:52
Configure GOPROXY with direct fallback and disable HTTP/2 client
to avoid transient EOF errors from proxy.golang.org on self-hosted
runners. Update workflow to use main branch of k8s-workflows.
@bschimke95 bschimke95 force-pushed the KU-4668/go-build-issues branch from 6b7f34f to 7cb72e0 Compare December 4, 2025 10:22
Remove GOPROXY settings and keep only GODEBUG=http2client=0 to disable
HTTP/2 client. This avoids transient EOF errors from proxy.golang.org
on self-hosted runners. Update comments accordingly.
Add GOPROXY=direct alongside GODEBUG=http2client=0 to completely
bypass proxy.golang.org and download Go modules directly from source.
This avoids transient EOF errors on self-hosted runners.
Remove GODEBUG=http2client=0 as it causes TLS handshake timeouts
when Go tries to fetch modules from servers that require HTTP/2.
Keep only GOPROXY=direct to bypass proxy.golang.org.
Remove GOPROXY=direct as it causes TLS handshake timeouts when Go
tries to resolve vanity import paths like sigs.k8s.io. Let Go use
its default proxy behavior which handles these cases properly.
Changed all k8s-workflows references from @main to @KU-4668/go-build-issues
to test the new Go module and build caching feature.

This will enable:
- Go module cache restoration and saving
- Go build cache restoration and saving
- Reduced EOF errors on self-hosted runners
- Faster builds with cached dependencies
Fixed invalid YAML syntax by removing empty build-environment keys
from all metrics-server versions (0.7.1, 0.7.2, 0.8.0).

This fixes the error:
'Bad rockcraft.yaml content: input should be a valid list
(in field parts.metrics-server.build-environment)'

This prepares the rocks for testing the new Go caching feature
implemented in k8s-workflows.
Added comment to 0.8.0 rockcraft.yaml file
to trigger a rebuild that will test the new Go caching feature.
@bschimke95
Copy link
Contributor Author

Only used for testing canonical/k8s-workflows#54

@bschimke95 bschimke95 closed this Dec 8, 2025
@louiseschmidtgen louiseschmidtgen marked this pull request as ready for review December 19, 2025 10:25
@louiseschmidtgen louiseschmidtgen requested a review from a team as a code owner December 19, 2025 10:25
Copilot AI review requested due to automatic review settings December 19, 2025 10:25
@louiseschmidtgen louiseschmidtgen marked this pull request as draft December 19, 2025 10:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR configures Go proxy settings to address transient EOF errors from proxy.golang.org on self-hosted runners. The changes update workflow references to use a development branch (KU-4668/go-build-issues) where the actual Go proxy configuration (GOPROXY with direct fallback and HTTP/2 client disabled) is implemented in the external workflow repository.

  • Updates all workflow references from @main to the @KU-4668/go-build-issues branch in canonical/k8s-workflows
  • Modifies the rockcraft.yaml description field (appears to be for testing purposes)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/pull_request.yaml Updates all reusable workflow references to use the KU-4668/go-build-issues branch instead of @main to test Go proxy configuration changes
0.8.0/rockcraft.yaml Adds test text to the description field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants