-
Notifications
You must be signed in to change notification settings - Fork 26
OCPBUGS-74168: Fix GOTOOLCHAIN env var #355
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
base: main
Are you sure you want to change the base?
Conversation
|
@locriandev: This pull request references Jira Issue OCPBUGS-74168, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/verified by test build ose-etcd-container-v4.22.0-202601201705.p2.g5baac2e.assembly.stream.scos9 |
|
@locriandev: This PR has been marked as verified by DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/cherry-pick openshift-4.21 |
|
@locriandev: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
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. |
5baac2e to
d44e035
Compare
|
ART managed to fix OKD builds by patching their config. Changing this PR content to remove unneeded ART dockerfiles |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: locriandev, tjungblu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix GOTOOLCHAIN invalid value when GO_VERSION has "v" prefix
Problem
OKD builds for
ose-installer-etcd-artifactsstarted failing on 2026-01-16 with:Root Cause
The golang builder base image sets
GO_VERSION=v1.24.11as an environment variable (with "v" prefix):ENV GO_VERSION=v1.24.11When
build.shsourcesscripts/test_lib.sh, thedetermine_go_version()function runs:Since
GO_VERSIONis already set in the environment tov1.24.11, the default substitution never triggers, and line 476 creates an invalidGOTOOLCHAIN=gov1.24.11(with extra "v"), which Go rejects.Why This Only Affected OKD Builds Recently
The bug existed all along, but was masked by the Go compliance shim in OpenShift builds:
__doozer_groupopenshift-4.21EXEMPT: 0→ ForcesGOTOOLCHAIN=localokd-4.21EXEMPT: 1→ Does NOT override GOTOOLCHAINThe Go compliance shim enforces FIPS compliance for OpenShift builds by forcing
GOTOOLCHAIN=local, which overrode the invalid value. OKD builds are exempt from this enforcement, exposing the bug.When OKD builds were correctly labeled as
__doozer_group=okd-4.21(instead of the previous mislabeledopenshift-4.21), the compliance shim exemption activated and the bug was exposed.Solution
Normalize
GO_VERSIONby stripping any leading "v" prefix before using it inGOTOOLCHAIN:This ensures
GOTOOLCHAIN=go1.24.11regardless of whetherGO_VERSIONis set tov1.24.11or1.24.11.Testing
Before Fix
After Fix
Verified by test build ose-etcd-container-v4.22.0-202601201705.p2.g5baac2e.assembly.stream.scos9