Skip to content

ROSAENG-61053 | chore: bump Go to 1.26.3#3321

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift:masterfrom
olucasfreitas:ROSAENG-61053-go126
Jul 7, 2026
Merged

ROSAENG-61053 | chore: bump Go to 1.26.3#3321
openshift-merge-bot[bot] merged 3 commits into
openshift:masterfrom
olucasfreitas:ROSAENG-61053-go126

Conversation

@olucasfreitas

@olucasfreitas olucasfreitas commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bump Go from 1.25.8 to 1.26.3 in go.mod, all Dockerfiles, Renovate config, and the committed Bingo tool modules
  • keep the verified go fix ./... mechanical cleanup that already passes the repo's local gates on this branch
  • follow the same 1.26.3 rollout pattern used in terraform-provider-rhcs#1240 because 1.26.4 is not available in all required images yet

Detailed Description of the Issue

The repository baseline was Go 1.25.8. Upstream dependency bumps (ginkgo, gomega, kubernetes) will soon require Go 1.26+, so the toolchain needs to advance. Go 1.26.4 was initially targeted but the ocp_builder images only carry 1.26.3 at this time, so we follow the proven 1.26.3 pattern from terraform-redhat/terraform-provider-rhcs#1240.

Type of Change

  • chore - maintenance work (tooling, housekeeping, non-product code).

Previous Behavior

  • go.mod declared Go 1.25.8
  • Dockerfiles pinned ubi9/go-toolset:1.25.8
  • Renovate constrained Go to 1.25.8 and pinned k8s.io/apimachinery < 0.36.0

Behavior After This Change

  • go.mod declares Go 1.26.3
  • Dockerfiles use ubi9/go-toolset:1.26.3
  • Renovate constraint updated to 1.26.3; apimachinery pin removed
  • go fix mechanical cleanup applied (interface{} -> any, strings.Builder, etc.)
  • No intended runtime behavior changes

Breaking Changes

  • No breaking changes

Test plan

  • GOTOOLCHAIN=go1.26.3 go mod tidy
  • GOTOOLCHAIN=go1.26.3 go mod download
  • GOTOOLCHAIN=go1.26.3 go mod verify
  • GOTOOLCHAIN=go1.26.3 go fix ./...
  • make generate
  • make pre-push-checks
  • Prow presubmits green (build, commits, lint, test, images, e2e-presubmits-images)

Related

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 2, 2026
@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR updates Go version references in module files, Dockerfiles, and Renovate config, and removes one Renovate package rule. It also refactors command and helper code to use any, slices, maps, strings.Cut, and strings.Builder, with several validation and error-message text changes.

Suggested reviewers: gdbranco, robpblake

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
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 Changed Ginkgo titles in the diff are all static/descriptive; none include names, UUIDs, dates, IPs, or other run-specific data.
Test Structure And Quality ✅ Passed Changed Ginkgo tests are small unit/e2e cases; each It covers one behavior, uses existing BeforeEach/AfterEach patterns, and adds no new Eventually/cleanup risks.
Microshift Test Compatibility ✅ Passed The PR only changes toolchain/Dockerfile/config files; no new Ginkgo e2e specs were added, so MicroShift compatibility is not implicated.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new or changed Ginkgo e2e specs were added; the diff only touches Dockerfiles, mod files, and helper/CLI code, with no SNO-sensitive test patterns found.
Topology-Aware Scheduling Compatibility ✅ Passed Only Go/tooling version bumps and mechanical refactors changed; no deployment manifests, controllers, or scheduling constraints were added or modified.
Ote Binary Stdout Contract ✅ Passed PASS: The PR only changes toolchain/config files; no process-level Go code or stdout writes (fmt.Print/klog/TestMain/RunSpecs) were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the only modified test is a unit test using mocked cluster APIs, with no IPv4 or external-connectivity assumptions.
No-Weak-Crypto ✅ Passed Changed files show no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or custom crypto; the only new comparison is strings.EqualFold on a public IDP name, not a secret/token.
Container-Privileges ✅ Passed No privileged=true, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation changes; Dockerfile USER root lines are preexisting build-stage setup.
No-Sensitive-Data-In-Logs ✅ Passed Only toolchain/config files changed; no logging statements or secret-like strings were added in the diff.
Title check ✅ Passed The title is concise, matches the main change, and follows the repo's commit-format convention.
Description check ✅ Passed The description covers the issue, changes, type, testing, and related links, with only minor template-heading differences.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2026
@olucasfreitas
olucasfreitas marked this pull request as ready for review July 2, 2026 13:52
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 2, 2026
@openshift-ci
openshift-ci Bot requested review from amandahla and marcolan018 July 2, 2026 13:53
@amandahla

Copy link
Copy Markdown
Contributor

Hi @olucasfreitas this might be a good opportunity to also run the go fix command wdyt

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

@amandahla agreed, will do it here and ping you again

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

@amandahla added in 862952638.

I ran go fix ./... for the Go 1.26 upgrade, regenerated bindata, and kept the mechanical subset that passes the repo gates locally. Current local verification on this branch is green:

  • fmt-check
  • build
  • lint
  • changed-lines coverage
  • unit and integration tests

I left the PR as draft until the paired release PR lands and Prow can pick up the Go 1.26 builder.

@olucasfreitas
olucasfreitas force-pushed the ROSAENG-61053-go126 branch from 8629526 to 9e73470 Compare July 2, 2026 18:36

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@cmd/create/idp/cmd.go`:
- Around line 447-461: The IDP validation messages in ValidateIdpName and
getMappingMethod no longer match the existing e2e assertions, so align the
returned error strings with the expected wording. Update the cluster-admin
reserve message in ValidateIdpName and the mapping method validation message in
getMappingMethod to use the same capitalization and punctuation as the tests, or
adjust the corresponding e2e assertions to match the new strings.
🪄 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: c734004f-91cb-47af-a877-4371e66bae88

📥 Commits

Reviewing files that changed from the base of the PR and between 6c9db38 and 8629526.

📒 Files selected for processing (19)
  • cmd/create/iamserviceaccount/cmd.go
  • cmd/create/idp/cmd.go
  • cmd/create/idp/htpasswd.go
  • cmd/edit/ingress/flags.go
  • cmd/list/accessrequests/cmd.go
  • cmd/list/imagemirrors/cmd.go
  • cmd/list/imagemirrors/cmd_test.go
  • pkg/fedramp/config.go
  • pkg/helper/url/helpers.go
  • pkg/iamserviceaccount/helpers.go
  • pkg/input/helper.go
  • pkg/kubeletconfig/output.go
  • pkg/logforwarding/helpers.go
  • pkg/logforwarding/output.go
  • pkg/logging/aws_logger.go
  • pkg/logging/round_tripper.go
  • pkg/network/helper.go
  • pkg/output/reporter.go
  • pkg/reporter/reporter.go
✅ Files skipped from review due to trivial changes (5)
  • pkg/logforwarding/output.go
  • cmd/list/imagemirrors/cmd_test.go
  • cmd/create/idp/htpasswd.go
  • pkg/logging/round_tripper.go
  • cmd/create/iamserviceaccount/cmd.go

Comment thread cmd/create/idp/cmd.go
@olucasfreitas

Copy link
Copy Markdown
Contributor Author

@amandahla ready for review

@amandahla

Copy link
Copy Markdown
Contributor

@olucasfreitas please check the failures, you are facing same error that I got in my PR, 1.26.4 is not available in all images.
terraform-redhat/terraform-provider-rhcs#1240

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2026
@olucasfreitas olucasfreitas changed the title ROSAENG-61053 | chore: bump Go to 1.26 ROSAENG-61053 | chore: bump Go to 1.26.3 Jul 3, 2026
Update the ROSA CLI toolchain from Go 1.25.8 to Go 1.26.4 across
go.mod, Dockerfiles, and Renovate configuration. Remove the
k8s.io/apimachinery < 0.36.0 version pin that was only necessary
while the repo was on Go 1.25.

Run go fix as part of the Go 1.26 upgrade and keep the verified
subset of mechanical updates that passes the repo's format, lint,
changed-lines coverage, and unit/integration test gates.

Paired with: openshift/release#81358
Follow the 1.26.3 rollout pattern used in terraform-provider-rhcs
and move the ROSA repo off 1.26.4, which is not available in all
required images yet. Align go.mod, Dockerfiles, Renovate, and the
committed bingo tool modules to the 1.26.3 baseline.
@olucasfreitas
olucasfreitas force-pushed the ROSAENG-61053-go126 branch from aee8afd to 23ac5e9 Compare July 3, 2026 18:13
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 3, 2026
@olucasfreitas

Copy link
Copy Markdown
Contributor Author

@amandahla updated to the 1.26.3 pattern from terraform-provider-rhcs#1240.

This branch now:

  • uses go 1.26.3
  • uses ubi9/go-toolset:1.26.3 in the Dockerfiles
  • keeps the already-verified go fix subset on the branch
  • rebases cleanly on current master so the image jobs can merge and run

Local make pre-push-checks is green on the rebased head. Waiting on the new Prow runs for commit 23ac5e93958e734378d9d738bab3f88ed689ac87.

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

/test lint

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

/override ci/prow/security

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@olucasfreitas: Overrode contexts on behalf of olucasfreitas: ci/prow/security

Details

In response to this:

/override ci/prow/security

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.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.69027% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.08%. Comparing base (f61ec2a) to head (23ac5e9).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/create/iamserviceaccount/cmd.go 91.30% 1 Missing and 1 partial ⚠️
pkg/iamserviceaccount/helpers.go 88.88% 2 Missing ⚠️
cmd/create/idp/cmd.go 80.00% 1 Missing ⚠️
cmd/edit/ingress/flags.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3321      +/-   ##
==========================================
+ Coverage   28.03%   28.08%   +0.04%     
==========================================
  Files         334      334              
  Lines       36710    36730      +20     
==========================================
+ Hits        10293    10316      +23     
+ Misses      25663    25660       -3     
  Partials      754      754              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…trings

The go fix cleanup lowercased validation messages in cmd/create/idp/cmd.go
but the e2e tests still asserted the old capitalized wording. Update the
two assertions in test_rosacli_idp.go to match.
@olucasfreitas

Copy link
Copy Markdown
Contributor Author

/override ci/prow/security

@olucasfreitas

olucasfreitas commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@amandahla @jerichokeyne ready for review when you can

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@olucasfreitas: Overrode contexts on behalf of olucasfreitas: ci/prow/security

Details

In response to this:

/override ci/prow/security

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.

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

/override ci/prow/security

@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@olucasfreitas: Overrode contexts on behalf of olucasfreitas: ci/prow/security

Details

In response to this:

/override ci/prow/security

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.

@amandahla

Copy link
Copy Markdown
Contributor

/approve
/lgtm
/retest-required

@amandahla

Copy link
Copy Markdown
Contributor

/test ci/prow/security

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2026
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amandahla, olucasfreitas

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:
  • OWNERS [amandahla,olucasfreitas]

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

@amandahla

Copy link
Copy Markdown
Contributor

/test security
@olucasfreitas please dont override this one, I want to check if the bump is the last missing part to make the security check pass

@amandahla

Copy link
Copy Markdown
Contributor

/retest-required

@amandahla

Copy link
Copy Markdown
Contributor

/test security

@olucasfreitas

Copy link
Copy Markdown
Contributor Author

/retest-required

@openshift-merge-bot
openshift-merge-bot Bot merged commit 37982ff into openshift:master Jul 7, 2026
11 of 14 checks passed
@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@olucasfreitas: 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/prow/e2e-presubmits-pr-rosa-sts-advanced 605f84a link false /test e2e-presubmits-pr-rosa-sts-advanced
ci/prow/e2e-presubmits-pr-rosa-hcp-advanced 605f84a link false /test e2e-presubmits-pr-rosa-hcp-advanced

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants