-
Notifications
You must be signed in to change notification settings - Fork 5.1k
CI: Fix Go 1.25 build failure in kube-cross Docker by setting GOPATH and GOMODCACHE #21943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @copilot. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Can one of the admins verify this patch? |
Co-authored-by: medyagh <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Copilot, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/ok-to-test |
|
@Copilot: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Go 1.25 changed default behavior when
GOPATHis unset—it now defaults toGOROOT, causing build failures in the kube-cross Docker container with permission errors writing to/usr/local/go/pkg/mod.Changes
GOPATH=/goandGOMODCACHE=/app/.modcachein DOCKER function.modcacheto ignore module cache directoryContext
The Makefile's DOCKER function mounts the host's GOPATH to
/gobut didn't set the environment variable. In Go 1.25, this causes:Setting
GOMODCACHEto a writable location in/app(project directory) ensures module downloads work regardless of GOPATH mount permissions.Fixes builds with
MINIKUBE_BUILD_IN_DOCKER=yon Jenkins and Functional_Verified workflow.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
registry.k8s.io/usr/bin/docker docker run --rm registry.k8s.io/build-image/kube-cross:v1.34.0-go1.24.6-bullseye.0 /bin/bash -c echo "GOROOT: $GOROOT"; echo "GOPATH: $GOPATH"; go env GOROOT; go env GOPATH(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This section details on the original issue you should resolve
<issue_title>bumping golang 1.25 failure when building using "kube-cross image"</issue_title>
<issue_description>When trying to bump the golang from 1.24 to 1.25 I the build fails in jenkins when it is built in Docker using the Kube Cross image (this is after I removed hyperkit which is can not be built with 1.25) but now got a new blocker
I noticed build fails in Jenkins (which runs in docker) "MINIKUBE_BUILD_IN_DOCKER" and also Functiona_Verified job also fails (builds minikube in docker) but "Functional" workflow passes (builds it on Ubuntu Baremetal
Functional_Verified Workflow Build (builds in Docker
minikube/.github/workflows/functional_verified.yml
Line 47 in bac7021
MINIKUBE_BUILD_IN_DOCKER=y make e2e-linux-arm64
Functional Normal build passee
minikube/.github/workflows/functional_test.yml
Line 46 in bac7021
We need to find out why new KubeCorss Image fails and how to fix it, because on Jenkins we should not rely on building on host
Logs From Jenkins build (trimmed)