Skip to content

fix: allow using go 1.26 for konflux-ci/konflux-ci#79898

Open
yftacherzog wants to merge 1 commit into
openshift:mainfrom
yftacherzog:upgrade-go
Open

fix: allow using go 1.26 for konflux-ci/konflux-ci#79898
yftacherzog wants to merge 1 commit into
openshift:mainfrom
yftacherzog:upgrade-go

Conversation

@yftacherzog
Copy link
Copy Markdown
Contributor

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

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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Walkthrough

The PR adds GOTOOLCHAIN=auto environment configuration to two Konflux CI step registries—E2E tests and operator install—enabling Go toolchain auto-download when go.mod requires a newer version, overriding RHEL builder defaults in both command scripts and step parameter definitions.

Changes

GOTOOLCHAIN auto-download support for CI steps

Layer / File(s) Summary
E2E tests GOTOOLCHAIN configuration
ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-commands.sh, ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-ref.yaml
E2E test step now exports GOTOOLCHAIN=auto in its command script and defines the GOTOOLCHAIN parameter with default: auto and documentation explaining the override of RHEL Go builder default behavior.
Install operator GOTOOLCHAIN configuration
ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-commands.sh, ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-ref.yaml
Install operator step now exports GOTOOLCHAIN=auto in its command script and defines the GOTOOLCHAIN parameter with default: auto and documentation explaining when the override can be removed once specific build_root versions use newer golang.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

lgtm, rehearsals-ack

Suggested reviewers

  • rafabene
  • jkhelil
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly summarizes the main change: enabling Go 1.26 for konflux-ci/konflux-ci by setting GOTOOLCHAIN=auto across multiple CI step configurations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed This PR contains no Ginkgo test code. It only modifies CI configuration shell scripts and YAML files to set the GOTOOLCHAIN environment variable. The check is not applicable.
Test Structure And Quality ✅ Passed PR contains no Ginkgo test code—only shell scripts and YAML configuration files. Custom check for test structure and quality is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. Changes are limited to CI configuration files setting GOTOOLCHAIN environment variable, which is not subject to MicroShift compatibility checks.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR does not add any Ginkgo e2e tests. It only modifies CI configuration scripts and YAML files to set GOTOOLCHAIN=auto, which allows Go 1.26 builds. The custom check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only CI/CD pipeline configuration files (shell scripts and YAML step definitions) to set GOTOOLCHAIN environment variable. No Kubernetes scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed PR modifies only CI infrastructure shell and YAML files, not OTE binary or Go source code. The stdout contract check is inapplicable to these configuration changes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. Changes are CI step registry configuration and command scripts setting GOTOOLCHAIN=auto for Go toolchain compatibility, not test code.
No-Weak-Crypto ✅ Passed PR contains only Go toolchain version configuration changes; no cryptographic code, weak crypto algorithms, custom implementations, or insecure secret comparisons are present.
Container-Privileges ✅ Passed No container privilege escalation configurations found in modified files. Changes are limited to Go toolchain environment variable setup.
No-Sensitive-Data-In-Logs ✅ Passed No logging statements in the PR expose sensitive data; only non-sensitive metadata (git refs, container image URIs) are logged.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from stbenjam and xueqzhan May 31, 2026 15:17
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 31, 2026

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 31, 2026
@yftacherzog
Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

@yftacherzog: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@yftacherzog: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-konflux-ci-konflux-ci-main-konflux-e2e-v420-optional konflux-ci/konflux-ci presubmit Registry content changed
pull-ci-konflux-ci-konflux-ci-main-konflux-e2e-v420-arm64-optional konflux-ci/konflux-ci presubmit Registry content changed
periodic-ci-konflux-ci-konflux-ci-main-ocp420-konflux-e2e-v420 N/A periodic Registry content changed
periodic-ci-konflux-ci-konflux-ci-main-ocp420-arm64-konflux-e2e-v420-arm64 N/A periodic Registry content changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 63ca5bb and 9adaf45.

📒 Files selected for processing (4)
  • ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-commands.sh
  • ci-operator/step-registry/konflux-ci/e2e-tests/konflux-ci-e2e-tests-ref.yaml
  • ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-commands.sh
  • ci-operator/step-registry/konflux-ci/install-operator/konflux-ci-install-operator-ref.yaml

Comment on lines +3 to +4
# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
export GOTOOLCHAIN=auto
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Comment on lines +3 to +4
# RHEL golang builder images set GOTOOLCHAIN=local; allow toolchain download.
export GOTOOLCHAIN=auto
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
# 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).

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 31, 2026

@yftacherzog: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-konflux-ci-konflux-ci-main-ocp420-arm64-konflux-e2e-v420-arm64 9adaf45 link unknown /pj-rehearse periodic-ci-konflux-ci-konflux-ci-main-ocp420-arm64-konflux-e2e-v420-arm64
ci/rehearse/konflux-ci/konflux-ci/main/konflux-e2e-v420-arm64-optional 9adaf45 link unknown /pj-rehearse pull-ci-konflux-ci-konflux-ci-main-konflux-e2e-v420-arm64-optional
ci/rehearse/konflux-ci/konflux-ci/main/konflux-e2e-v420-optional 9adaf45 link unknown /pj-rehearse pull-ci-konflux-ci-konflux-ci-main-konflux-e2e-v420-optional
ci/rehearse/periodic-ci-konflux-ci-konflux-ci-main-ocp420-konflux-e2e-v420 9adaf45 link unknown /pj-rehearse periodic-ci-konflux-ci-konflux-ci-main-ocp420-konflux-e2e-v420

Full PR test history. Your PR dashboard.

Details

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.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant