-
Notifications
You must be signed in to change notification settings - Fork 920
fixes #7427: Patch LazyStorage to pass its ClassLoader to ServiceLoader #7424
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
fixes #7427: Patch LazyStorage to pass its ClassLoader to ServiceLoader #7424
Conversation
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7424 +/- ##
=========================================
Coverage 89.75% 89.75%
Complexity 6980 6980
=========================================
Files 797 797
Lines 21165 21165
Branches 2057 2057
=========================================
Hits 18996 18996
Misses 1505 1505
Partials 664 664 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
anuraaga
left a comment
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.
Code looks good thanks!
|
@indigophox we need your commits to be associated with a github account which has signed the CNCF CLA. |
|
@jkwatson got it, I will rattle the grapevine here tomorrow. Thank you! |
|
Ok CLA stuff appears to be sorted. |
|
Thank you! Is it possible to get this into a point or minor release soon-ish? This bug is blocking a release for us. |
|
We wouldn't normally do a special release for this kind of change, but just fold it into the next release, as we generally only issue mid-cycle patches for security issues or new bugs that were introduced. Exceptions can be made, but they would need to be exceptional. The next release should be the 2nd week of July, I believe. |
|
Sounds like we are good to wait on our end. Thanks again! |
jack-berg
left a comment
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!
|
Thank -you-! We're the ones blocked on this and appreciate it moving ahead! |
LazyStoragepasses itsContextStorageProvider.classtoServiceLoader.load(). However, this is done from theLazyStoragestatic initializer, so the application has little to no control over the execution thread context for this code, and by defaultServiceLoaderuses the Thread context classloader, which may or may not have a different instance ofContextStorageProviderand its desendants.This patch passes the classloader from
LazyStoragetoServiceLoaderso that it is able to find true (rather than just symbolic) descendants of that same class. Otherwise, if OpenTelemetry is loaded in a multi-classloader application, it can easily end up throwing aServiceConfigurationErrorbecauseServiceLoadersees a different set of class instances than the set which the passed-inContextStorageProvider.classis from.