Skip to content

build: upgrade to Go 1.26.5 - #543

Merged
xcoulon merged 11 commits into
codeready-toolchain:masterfrom
xcoulon:upgrade-go-1.26-common
Aug 7, 2026
Merged

build: upgrade to Go 1.26.5#543
xcoulon merged 11 commits into
codeready-toolchain:masterfrom
xcoulon:upgrade-go-1.26-common

Conversation

@xcoulon

@xcoulon xcoulon commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

also, update modules to get rid of known vulnerabilities
also, convert README.adoc to README.md
also, remove the check-format target and move the formatting logic into go.mk

see also:

Signed-off-by: Xavier Coulon xcoulon@redhat.com

Summary by CodeRabbit

  • Documentation

    • Added updated repository documentation covering project status, shared usage, and build prerequisites.
    • Removed outdated documentation.
  • Developer Experience

    • Updated supported Go tooling and refreshed supporting packages.
    • Added a Go formatting command for consistent code style.
  • Maintenance

    • Updated automated linting checks and streamlined their caching configuration.
    • Preserved the current vulnerability ignore configuration.

also, update modules to get rid of known vulnerabilities
also, convert `README.adoc` to `README.md`
also, remove the `check-format` target and move the formatting logic into `go.mk`

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 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

The pull request updates the repository to Go 1.26, changes module dependencies, adds a formatting target, updates the lint workflow, replaces the README, and removes the previous AsciiDoc README and formatting makefile.

Changes

Repository maintenance

Layer / File(s) Summary
Go toolchain and module configuration
go.mod, .govulncheck.yaml
The module now targets Go 1.26 and uses updated API and golang.org/x/* dependencies. The vulnerability ignore list remains empty.
Formatting and lint tooling
make/go.mk, make/format.mk, .github/workflows/linters.yml
The repository adds a batched format-go-code target, removes make/format.mk, and updates GolangCI Lint to v2.12.2 without cache-skip settings.
Repository documentation
README.md, README.adoc
The repository adds Go 1.26 build documentation in README.md and deletes README.adoc.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: documentation, dependencies, chore, ci

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary change: upgrading the project build to Go 1.26.5.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot added chore Routine repo or tooling maintenance dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation labels Aug 5, 2026
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>

@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: 3

🤖 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 `@go.mod`:
- Around line 97-103: Update the golang.org/x/crypto dependency in go.mod from
v0.51.0 to v0.52.0 or later, then refresh the module checksums and dependency
metadata as needed while preserving the existing indirect dependency
declaration.

In `@make/go.mk`:
- Around line 10-15: Update the GOFORMAT_FILES and format-go-code flow so
discovered Go filenames are passed as literal arguments rather than expanded
shell syntax. Use a safe find -exec or NUL-delimited xargs pipeline while
preserving the existing gofmt flags and exclusion behavior.

In `@README.md`:
- Around line 7-8: Update the external repository links in the README
description to use absolute HTTPS URLs, including the host-operator,
member-operator, and toolchain-e2e links, while preserving their visible link
text and surrounding wording.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: c5c113d8-7d3e-41ac-87dc-0ae4c1cef276

📥 Commits

Reviewing files that changed from the base of the PR and between 0d4161d and f368a31.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (7)
  • .govulncheck.yaml
  • README.adoc
  • README.md
  • go.mod
  • make/format.mk
  • make/go.mk
  • make/gofmt_exclude
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • codeready-toolchain/api (manual)
  • codeready-toolchain/toolchain-common (manual)
  • codeready-toolchain/host-operator (manual)
  • codeready-toolchain/toolchain-e2e (manual)
💤 Files with no reviewable changes (2)
  • make/format.mk
  • README.adoc
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Verify Dependencies
  • GitHub Check: test
⚠️ CI failures not shown inline (2)

GitHub Actions: ci-build / GolangCI Lint: build: upgrade to Go 1.26.5

Conclusion: failure

View job details

##[group]run golangci-lint
 Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint config path --config=./.golangci.yml] in [/home/runner/work/toolchain-common/toolchain-common] ...
 Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint run  --config=./.golangci.yml --verbose] in [/home/runner/work/toolchain-common/toolchain-common] ...
 level=info msg="golangci-lint has version 2.1.6 built with go1.24.2 from eabc2638 on "
 level=info msg="[config_reader] Used config file .golangci.yml"
 level=info msg="[config_reader] Module name \"github.com/codeready-toolchain/toolchain-common\""
 Error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.5)
 Failed executing command with error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.5)
 ##[error]golangci-lint exit with code 3

GitHub Actions: ci-build / 0_GolangCI Lint.txt: build: upgrade to Go 1.26.5

Conclusion: failure

View job details

##[group]run golangci-lint
 Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint config path --config=./.golangci.yml] in [/home/runner/work/toolchain-common/toolchain-common] ...
 Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint run  --config=./.golangci.yml --verbose] in [/home/runner/work/toolchain-common/toolchain-common] ...
 level=info msg="golangci-lint has version 2.1.6 built with go1.24.2 from eabc2638 on "
 level=info msg="[config_reader] Used config file .golangci.yml"
 level=info msg="[config_reader] Module name \"github.com/codeready-toolchain/toolchain-common\""
 Error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.5)
 Failed executing command with error: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.5)
 ##[error]golangci-lint exit with code 3
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • README.md
  • make/gofmt_exclude
  • make/go.mk
  • go.mod
🪛 GitHub Actions: ci-check-gomod / 0_go.mod replacements.txt
go.mod

[error] 1-1: Dependency replacement is not allowed for protected module 'github.com/codeready-toolchain/api'. Remove or update the replacement: github.com/codeready-toolchain/api => github.com/xcoulon/api.

🪛 GitHub Actions: ci-check-gomod / go.mod replacements
go.mod

[error] 1-1: CI check failed: go.mod contains a disallowed module replacement for protected module github.com/codeready-toolchain/api, replacing it with github.com/xcoulon/api. Command failed with exit code 1.

🪛 markdownlint-cli2 (0.23.2)
README.md

[warning] 12-12: Link text should be descriptive

(MD059, descriptive-link-text)

🪛 OSV Scanner (2.4.0)
go.mod

[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking key constraints not enforced in golang.org/x/crypto/ssh/agent

(GO-2026-5005)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking agent constraints dropped when forwarding keys in golang.org/x/crypto/ssh/agent

(GO-2026-5006)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking byte arithmetic causes underflow and panic in golang.org/x/crypto/ssh

(GO-2026-5013)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking bypass of certificate restrictions in golang.org/x/crypto/ssh

(GO-2026-5014)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking server panic during CheckHostKey/Authenticate in golang.org/x/crypto/ssh

(GO-2026-5015)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking memory leak when rejecting channels can lead to DoS in golang.org/x/crypto/ssh

(GO-2026-5016)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking client can cause server deadlock on unexpected responses in golang.org/x/crypto/ssh

(GO-2026-5017)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking pathological RSA/DSA parameters may cause DoS in golang.org/x/crypto/ssh

(GO-2026-5018)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking bypass of FIDO/U2F security keys physical interaction in golang.org/x/crypto/ssh

(GO-2026-5019)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking infinite loop on large channel writes in golang.org/x/crypto/ssh

(GO-2026-5020)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking auth bypass via unenforced @revoked status in golang.org/x/crypto/ssh/knownhosts

(GO-2026-5021)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking VerifiedPublicKeyCallback permissions skip enforcement in golang.org/x/crypto/ssh

(GO-2026-5023)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: Invoking pathological inputs can lead to client panic in golang.org/x/crypto/ssh/agent

(GO-2026-5033)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues

(GO-2026-5932)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto vulnerable to invoking bypass of certificate restrictions

(GHSA-45gg-vh54-h5m9)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto vulnerable to auth bypass via unenforced @revoked status

(GHSA-5cgq-3rg8-m6cv)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto is vulnerable to invoking server panic during CheckHostKey/Authenticate flow

(GHSA-78mq-xcr3-xm33)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: FIDO/U2F security key physical presence check can be bypassed

(GHSA-89gr-r52h-f8rx)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking pathological inputs can lead to client panic

(GHSA-9m57-25v3-79x9)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto doesn't drop invoking agent constraints when forwarding keys

(GHSA-f5wc-c3c7-36mc)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto doesn't enforce invoking key constraints

(GHSA-jppx-rxg9-jmrx)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking byte arithmetic causes underflow and panic

(GHSA-q4h4-gmj2-qvw2)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking memory leak when rejecting channels can lead to DoS

(GHSA-qpw4-5x99-6vjp)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto vulnerable to infinite loop on large channel writes

(GHSA-rm3j-f69w-wqmq)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking client can cause server deadlock on unexpected responses

(GHSA-vgwf-h737-ff37)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking pathological RSA/DSA parameters may cause DoS

(GHSA-w879-237q-wc7r)


[CRITICAL] 97-97: golang.org/x/crypto 0.51.0: golang.org/x/crypto: Invoking VerifiedPublicKeyCallback permissions skip enforcement

(GHSA-x527-x647-q7gg)

🔇 Additional comments (3)
go.mod (1)

3-5: LGTM!

Also applies to: 28-29

make/gofmt_exclude (1)

1-1: LGTM!

.govulncheck.yaml (1)

1-1: LGTM!

Comment thread go.mod Outdated
Comment thread make/go.mk Outdated
Comment thread README.md Outdated
xcoulon added 3 commits August 5, 2026 17:29
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Comment thread go.mod Outdated
sigs.k8s.io/controller-runtime v0.21.0
)

replace github.com/codeready-toolchain/api => github.com/xcoulon/api v0.0.0-20260805080027-7512d38caa3b

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.

I think this is a leftover from your testing

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>

@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 `@make/go.mk`:
- Around line 13-16: Update the format-go-code target’s find expression to
exclude third_party, builtin, and examples in addition to vendor and .git,
matching the exclusions defined by the repository’s formatter configuration.
Preserve the existing gofmt invocation and batched execution.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: c3366c74-22f3-4771-8794-4c2f85234a62

📥 Commits

Reviewing files that changed from the base of the PR and between 487b78e and 8781d6c.

📒 Files selected for processing (1)
  • make/go.mk
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • codeready-toolchain/api (manual) → reviewed against open PR #521 upgrade-go-1.26-api instead of the default branch
  • codeready-toolchain/toolchain-common (manual)
  • codeready-toolchain/host-operator (manual) → reviewed against open PR #1290 upgrade-go-1.26-host instead of the default branch
  • codeready-toolchain/toolchain-e2e (manual) → reviewed against open PR #1313 upgrade-go-1.26-e2e instead of the default branch
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: govulncheck
  • GitHub Check: GolangCI Lint
  • GitHub Check: Verify Dependencies
  • GitHub Check: test
⚠️ CI failures not shown inline (2)

GitHub Actions: ci-check-gomod / go.mod replacements: build: upgrade to Go 1.26.5

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mREGEX="("�[0m
 �[36;1mfor m in $(IFS=,; echo $PROTECTED_MODULES); do�[0m
 �[36;1m  REGEX="${REGEX}${m}|"�[0m
 �[36;1mdone�[0m
 �[36;1mREGEX="${REGEX%?})"�[0m
 �[36;1m�[0m
 �[36;1mif go list -m all | grep --color=never -E "${REGEX}.*\s*=>"; then�[0m
 �[36;1m  echo "the above replacement(s) are not allowed in go.mod"�[0m
 �[36;1m  exit 1�[0m
 �[36;1mfi�[0m
 shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
 env:
   PROTECTED_MODULES: github.com/codeready-toolchain/,github.com/kubesaw/
 ##[endgroup]
 go: downloading go1.26.5 (linux/amd64)
 github.com/codeready-toolchain/api v0.0.0-20260731065234-734640c901d2 => github.com/xcoulon/api v0.0.0-20260805080027-7512d38caa3b
 the above replacement(s) are not allowed in go.mod
 ##[error]Process completed with exit code 1.

GitHub Actions: ci-check-gomod / 0_go.mod replacements.txt: build: upgrade to Go 1.26.5

Conclusion: failure

View job details

##[group]Run set -e
 �[36;1mset -e�[0m
 �[36;1mREGEX="("�[0m
 �[36;1mfor m in $(IFS=,; echo $PROTECTED_MODULES); do�[0m
 �[36;1m  REGEX="${REGEX}${m}|"�[0m
 �[36;1mdone�[0m
 �[36;1mREGEX="${REGEX%?})"�[0m
 �[36;1m�[0m
 �[36;1mif go list -m all | grep --color=never -E "${REGEX}.*\s*=>"; then�[0m
 �[36;1m  echo "the above replacement(s) are not allowed in go.mod"�[0m
 �[36;1m  exit 1�[0m
 �[36;1mfi�[0m
 shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
 env:
   PROTECTED_MODULES: github.com/codeready-toolchain/,github.com/kubesaw/
 ##[endgroup]
 go: downloading go1.26.5 (linux/amd64)
 github.com/codeready-toolchain/api v0.0.0-20260731065234-734640c901d2 => github.com/xcoulon/api v0.0.0-20260805080027-7512d38caa3b
 the above replacement(s) are not allowed in go.mod
 ##[error]Process completed with exit code 1.
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • make/go.mk
🔀 Multi-repo context codeready-toolchain/host-operator, codeready-toolchain/toolchain-e2e

Linked repositories findings

  • No downstream references to the removed check-format/check-go-format targets were found in the inspected repositories.
  • host-operator (branch refs/pull/1290/head) and toolchain-e2e (branch refs/pull/1313/head) already use Go 1.26.0/toolchain 1.26.5 and the coordinated github.com/xcoulon/api replacement. [::codeready-toolchain/host-operator::] [::codeready-toolchain/toolchain-e2e::]
  • Both downstream repositories continue importing github.com/codeready-toolchain/api/api/v1alpha1, preserving the existing API import path. [::codeready-toolchain/host-operator::] [::codeready-toolchain/toolchain-e2e::]

Comment thread make/go.mk
Comment on lines +13 to +16
# The + tells find to batch multiple found files into a single gofmt invocation (like xargs),
# which is much faster than the alternative \;, which runs gofmt once per file. Removing it
# would be a syntax error — find -exec requires either + or \; as a terminator.
$(Q)find . -name '*.go' -not -path '*/vendor/*' -not -path '*/.git/*' -exec gofmt -s -l -w {} +

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Align the formatting scope with .golangci.yml.

format-go-code excludes only vendor and .git, but .golangci.yml:55-63 also excludes third_party, builtin, and examples. This target can rewrite files that the repository’s formatter contract intentionally excludes. Add matching find exclusions, or document why this target must use a broader scope.

As per path instructions, this review focuses on major maintainability and cross-file tooling risks.

🤖 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 `@make/go.mk` around lines 13 - 16, Update the format-go-code target’s find
expression to exclude third_party, builtin, and examples in addition to vendor
and .git, matching the exclusions defined by the repository’s formatter
configuration. Preserve the existing gofmt invocation and batched execution.

Source: Path instructions

xcoulon added 5 commits August 6, 2026 17:36
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
also, `remove check-go-format` make goal

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@xcoulon
xcoulon merged commit 33faed3 into codeready-toolchain:master Aug 7, 2026
9 of 12 checks passed
@xcoulon
xcoulon deleted the upgrade-go-1.26-common branch August 7, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Routine repo or tooling maintenance ci Add or update CI/CD configuration dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants