-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bump minimum version to go 1.21.0 #32451
Conversation
Is there a rationale for this change? |
The motivation is that we want to import datadog-agent modules to use in collector-contrib, but both repositories have different go versions in their go.mod files. We are making a change in datadog-agent to modify the version to match collector-contrib's version, but datadog-agent requires the minor version due to the EBPF dependency. collector-contrib also has this dependency, and the Go project seems to prefer using the minor version as well. |
Co-authored-by: Antoine Toulme <antoine@toulme.name>
Related: #32356 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
CI fails with https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/8709569766/job/23889804537?pr=32451 please take a look |
For further context: the Datadog Agent has |
I ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to revert this change upstream on cilium/ebpf/discussions/1438 but it doesn't seem like this is going to change soon.
While this is not well documented, and it is a feature for applications and not libraries, I think this is okay to merge because:
- The only impact it has on downstream consumers is that we drop support for prereleases of Go 1.21 (so e.g. go1.21rc1 will refuse to build a module with this version). This is mentioned in the 'Go versions' section of https://go.dev/doc/toolchain. This seems okay to me.
- We will probably end up with this change one way or another, since (i) the 'stable' solution in the ecosystem is for everyone to specify the bugfix version and (ii)
go mod init
now adds the bugfix version for you on recent versions.
If the upstream discussion changes, we can revert this, or even do so on the bump to Go 1.22 when Go 1.23 is released
Description:
We currently use
go 1.21
in all go.mod files, this PR changes all go.mod files to include the minor version by usinggo 1.21.0
. It seems that using the minor version is recommended by the Go project: golang/go#62278. One of the dependencies in collector-contrib also usesgo 1.21.0
, so this will need to be updated eventually anyways: https://github.com/cilium/ebpf/blob/main/go.mod#L3.Link to tracking Issue:
Testing:
Documentation: