-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Upgrade go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
#4507
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think we should stick with 1.22 toolchain for now.
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.
This is due to the version in this Dockerfile. Should I downgrade it? This is already there on main, not sure how it passed CI (1.23 forces this toolchain entry and causes a diff)
https://github.com/distribution/distribution/blob/main/dockerfiles%2Fvendor.Dockerfile#L3
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.
The CI works thanks to this
distribution/.github/workflows/build.yml
Line 30 in 3ddd142
Which uses the matrix Go versions:
distribution/.github/workflows/build.yml
Lines 35 to 37 in 3ddd142
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.
When I had this toolchain line removed
make validate-vendor
failed in the validate run and I pushed the actual output of 10000make vendor
instead.For
make validate-vendor
the toolchain version is dictated by that Dockerfile I linked above. I can downgrade it to 1.22 in the dockerfile if needed, but that generates:I suppose it changes it to 1.22.7 as the lower bound set by
go.opentelemetry.io/contrib/exporters/autoexport
Let me know which one you preffer:
go 1.22.7; toolchain go1.23.2
(current)go 1.22.7; toolchain go1.22.9
(need to change vendor.Dockerfile)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.
ok, this is interesting, because as it is now (i.e. on the latest commit),
make validate-vendor
succeeds, which makes me think - and I'm speculating here - theotel
modules are causing some new sadness (not for the first time 🙃 ) in this codebase; maybe they require1.23
toolchain? 🫠Why does this require patch release number? Doesn't specifying minor only use the latest patch release e.g.
1.22
?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.
tracked it down and grpc introduced 1.22.7 lower bound here grpc/grpc-go@393fbc3
then autoexport got it here open-telemetry/opentelemetry-go-contrib@bb01131
go 1.22.7
means it's the lower bound https://go.dev/ref/mod#go-mod-file-go:~:text=The%20go%20directive%20sets%20the%20minimum%20version%20of%20Go%20required%20to%20use%20this%20moduletoolchain
just notes whatever go version was used to resolve the go.mod/go.sum https://go.dev/ref/mod#go-mod-file-go:~:text=For%20reproducibility%2C%20the%20go%20command%20writes%20its%20own%20toolchain%20name%20in%20a%20toolchain%20line%20any%20time%20it%20is%20updating%20the%20go%20version%20in%20the%20go.mod%20file%20(usually%20during%20go%20get).We can control the
toolchain
directive just by changingvendor.Dockerfile
toARG GO_VERSION=1.22
and it will show up astoolchain go1.22.9
or if you useARG GO_VERSION=1.22.7
it will be gone (as it's the same as the go directive)Uh oh!
There was an error while loading. Please reload this page.
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.
Aha! Yeah it's starting to make more sense now. I think. The
toolchain
IIRC is not mandatory for all modules but if one of the deps requires a specific patch version it gets inserted intogo.mod
to met build constraints, which I think is what what we're seeing here 🤔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 set the vendor.Dockerfile to 1.22.7 and the toolchain directive is gone. Go is still at 1.22.7 due to that minimum set by the grpc package.
Should be good to go once CI passes.
make validate-vendor
passes locally"commit b6981b8
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 say, let's go with this option:
Mostly due to what I said in #4507 (comment)
I appreciate that was your original commit, and I'm sorry I didn't think about it properly at the time. Thanks for clarifying it.
Once you've made the changes, mind squashing your commits, please. Then we're good to got.
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.
Dropped b6981b8
It's back to the original commit, so good to go