-
Notifications
You must be signed in to change notification settings - Fork 1.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
Upgrade github.com/mostynb/go-grpc-compression and switch to nonclobbering imports #7966
Upgrade github.com/mostynb/go-grpc-compression and switch to nonclobbering imports #7966
Conversation
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.
Thanks @mostynb
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.
@mostynb can you add a changelog entry to capture this change?
I suspect it will mostly be a non event for most users, but in case anyone is surprised by their compression options changing, they can reference the changelog to see what changed.
I gave it a try- I hope the formatting is OK. |
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.
Thanks for rebasing @mostynb!
…ering imports Some consumers of this library have registered grpc compressors, and the init() order can cause their compressors to be clobbered by opentelemetry-collector's use of github.com/mostynb/go-grpc-compression, which follows the pattern from the grpc-go library (overwrite any previously registered encoders with the same name). Version 1.2.0 of github.com/mostynb/go-grpc-compression added so-called "nonclobbering" imports, which only register the codec if there is not already a codec registered with that name. This PR switches to use those. Fixes #7920.
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #7966 +/- ##
=======================================
Coverage 90.96% 90.96%
=======================================
Files 300 300
Lines 15090 15090
=======================================
Hits 13726 13726
Misses 1091 1091
Partials 273 273
☔ View full report in Codecov by Sentry. |
Description: Switch to grpc encoders that won't override the consumer's previously registered codecs.
Some consumers of this library have registered grpc compressors, and the init() order can cause their compressors to be clobbered by opentelemetry-collector's use of github.com/mostynb/go-grpc-compression, which follows the pattern from the grpc-go library (overwrite any previously registered encoders with the same name).
Version 1.2.0 of github.com/mostynb/go-grpc-compression added so-called "nonclobbering" imports, which only register the codec if there is not already a codec registered with that name. This PR switches to use those.
Link to tracking Issue: #7920
Testing: tests have been added to the upstream library.