Skip to content

Conversation

@ezekiel-alexrod
Copy link
Contributor

Add explicit 'toolchain go1.24.13' directive to both operator and
storage-operator go.mod files to prevent Go's automatic toolchain
selection from choosing incompatible versions.

Problem:
After Go 1.26.0 release (Feb 10, 2026), Go's toolchain selection
algorithm started automatically choosing Go 1.25.7 instead of 1.24.13.
Go 1.25.7 is incompatible with golang.org/x/tools v0.20.0, causing
all CI lint jobs to fail with:
invalid array length -delta * delta (constant -256 of type int64)

This affects ALL branches based on development/131.0.

Root cause:
Go's algorithm prefers 'latest patch before most recent version'.
Before Feb 10: [1.24.13, 1.25.7] → chooses 1.24.13 (before 1.25)
After Feb 10: [1.24.13, 1.25.7, 1.26.0] → chooses 1.25.7 (before 1.26)

Solution:
Pin toolchain to go1.24.13 (latest Go 1.24 patch) to ensure:

  • Reproducible builds
  • Consistent CI behavior
  • Compatibility with current dependencies

The directive is placed immediately after 'go' line as per Go
best practices: https://go.dev/doc/toolchain

Files modified:

  • operator/go.mod: Added toolchain directive
  • storage-operator/go.mod: Added toolchain directive

This is a minimal fix to unblock CI. A proper Go 1.26 bump will be
done in a separate ticket with full dependency updates.

References:

Fixes: MK8S-131

… failures

Add explicit 'toolchain go1.24.13' directive to both operator and
storage-operator go.mod files to prevent Go's automatic toolchain
selection from choosing incompatible versions.

Problem:
  After Go 1.26.0 release (Feb 10, 2026), Go's toolchain selection
  algorithm started automatically choosing Go 1.25.7 instead of 1.24.13.
  Go 1.25.7 is incompatible with golang.org/x/tools v0.20.0, causing
  all CI lint jobs to fail with:
    invalid array length -delta * delta (constant -256 of type int64)

  This affects ALL branches based on development/131.0.

Root cause:
  Go's algorithm prefers 'latest patch before most recent version'.
  Before Feb 10: [1.24.13, 1.25.7] → chooses 1.24.13 (before 1.25)
  After Feb 10:  [1.24.13, 1.25.7, 1.26.0] → chooses 1.25.7 (before 1.26)

Solution:
  Pin toolchain to go1.24.13 (latest Go 1.24 patch) to ensure:
  - Reproducible builds
  - Consistent CI behavior
  - Compatibility with current dependencies

  The directive is placed immediately after 'go' line as per Go
  best practices: https://go.dev/doc/toolchain

Files modified:
  - operator/go.mod: Added toolchain directive
  - storage-operator/go.mod: Added toolchain directive

This is a minimal fix to unblock CI. A proper Go 1.26 bump will be
done in a separate ticket with full dependency updates.

References:
- Go toolchain selection: https://go.dev/doc/toolchain
- Algorithm source: https://go.dev/src/cmd/go/internal/toolchain/switch.go
- Bug in x/tools v0.20.0: tokeninternal.go:64

Fixes: MK8S-131
@ezekiel-alexrod ezekiel-alexrod requested a review from a team as a code owner February 12, 2026 14:23
@bert-e
Copy link
Contributor

bert-e commented Feb 12, 2026

Hello ezekiel-alexrod,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Feb 12, 2026

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@ezekiel-alexrod
Copy link
Contributor Author

Closing the PR since it's preferred to use the latest patch of 1.22, thus 1.22.12 to this date.

@ezekiel-alexrod ezekiel-alexrod deleted the bugfix/pin-go-toolchain-1.24.13 branch February 12, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants