fix: allow using go 1.26 for konflux-ci/konflux-ci#79898
Conversation
We updated the go version for the konflux-ci/konflux-ci repository to 1.26, but this breaks CI here as we're using an image with go 1.25 here. Setting GOTOOLCHAIN to auto to temporarily work around this. Assisted-by: Cursor Signed-off-by: Yftach Herzog <yherzog@redhat.com>
WalkthroughThe PR adds ChangesGOTOOLCHAIN auto-download support for CI steps
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yftacherzog 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 |
|
/pj-rehearse |
|
@yftacherzog: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-commands.sh`:
- Around line 3-4: The script currently hardcodes GOTOOLCHAIN=auto which
overrides any step-level environment value; change it so the step-level override
is preserved and "auto" is only the fallback by setting GOTOOLCHAIN only when it
is unset or empty (use the existing GOTOOLCHAIN variable as the source of truth
and default to "auto" otherwise), updating the export of GOTOOLCHAIN in
konflux-ci-e2e-tests-commands.sh accordingly so downstream code uses the
provided override if present.
In
`@ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-commands.sh`:
- Around line 3-4: The script currently unconditionally sets the GOTOOLCHAIN
environment variable to "auto", overriding any externally supplied value; change
this to only set a default when GOTOOLCHAIN is empty or unset so step env
overrides are respected—detect if GOTOOLCHAIN is unset/empty and assign "auto"
only in that case, then export GOTOOLCHAIN (reference symbol: GOTOOLCHAIN in the
installer script).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: b3c26c8d-fd34-43b2-be72-ae5bd2153842
📒 Files selected for processing (4)
ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-commands.shci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-ref.yamlci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-commands.shci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-ref.yaml
| # RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download. | ||
| export GOTOOLCHAIN=auto |
There was a problem hiding this comment.
Preserve step-level GOTOOLCHAIN overrides instead of hardcoding.
Line 4 currently forces auto and ignores any upstream env override configured for this step. Keep auto as fallback, but honor provided values.
Suggested patch
-# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
-export GOTOOLCHAIN=auto
+# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
+export GOTOOLCHAIN="${GOTOOLCHAIN:-auto}"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-commands.sh`
around lines 3 - 4, The script currently hardcodes GOTOOLCHAIN=auto which
overrides any step-level environment value; change it so the step-level override
is preserved and "auto" is only the fallback by setting GOTOOLCHAIN only when it
is unset or empty (use the existing GOTOOLCHAIN variable as the source of truth
and default to "auto" otherwise), updating the export of GOTOOLCHAIN in
konflux-ci-e2e-tests-commands.sh accordingly so downstream code uses the
provided override if present.
| # RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download. | ||
| export GOTOOLCHAIN=auto |
There was a problem hiding this comment.
Avoid overriding configurable GOTOOLCHAIN value in-script.
Line 4 hardcodes auto, which masks any value passed via step env overrides. Use auto as default only when unset.
Suggested patch
-# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
-export GOTOOLCHAIN=auto
+# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
+export GOTOOLCHAIN="${GOTOOLCHAIN:-auto}"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download. | |
| export GOTOOLCHAIN=auto | |
| # RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download. | |
| export GOTOOLCHAIN="${GOTOOLCHAIN:-auto}" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-commands.sh`
around lines 3 - 4, The script currently unconditionally sets the GOTOOLCHAIN
environment variable to "auto", overriding any externally supplied value; change
this to only set a default when GOTOOLCHAIN is empty or unset so step env
overrides are respected—detect if GOTOOLCHAIN is unset/empty and assign "auto"
only in that case, then export GOTOOLCHAIN (reference symbol: GOTOOLCHAIN in the
installer script).
|
@yftacherzog: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
We updated the go version for the konflux-ci/konflux-ci repository to 1.26, but this breaks CI here as we're using an image with go 1.25 here.
Setting GOTOOLCHAIN to auto to temporarily work around this.
Assisted-by: Cursor