Skip to content

chore: Do not pin go patch level #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged

Conversation

konrad-ohms
Copy link
Contributor

@konrad-ohms konrad-ohms commented Apr 8, 2025

Why

When reading golang/go#62278 (comment) I noticed that this is only recommended for development versions which are not released yet. This is no longer valid, by default the recommendation is to not use the patch level. If you need to pin to a explicit version, toolchain should be used since 1.21 instead, like toolchain go1.24.3. Setting just go 1.24 will avoid failures if developers do not install the latest patch level yet, but allow the build to pick the most recent patch level.

Go 1.24.3 should be picked up that way on rebuild

What

Remove patch level from go.mod

References

Checklist

  • Backwards compatible?
  • Release notes in public docs updated?
  • unit/e2e test coverage added or updated? n/a

Note: Remember to run a helm chart release after the the operator release to make the changes available thru helm.

When reading
golang/go#62278 (comment) I
noticed that this is only recommended for development versions which are
not released yet. This is no longer valid, by default the recommendation
is to not use the patch level. If you need to pin to a explicit version,
toolchain should be used since 1.21 instead, like `toolchain go1.24.3`. Setting just `go 1.24` will avoid failures if developers do not install the latest patch level yet, but allow the build to pick the most recent patch level.
@konrad-ohms konrad-ohms requested a review from a team as a code owner April 8, 2025 06:55
Copy link
Contributor

@FelixMarxIBM FelixMarxIBM left a comment

Choose a reason for hiding this comment

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

lgtm

@konrad-ohms konrad-ohms merged commit 81f6da5 into main Apr 8, 2025
8 checks passed
@konrad-ohms konrad-ohms deleted the ko-go-version-directive branch April 8, 2025 14:53
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