-
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
updated grpc config to use DialContext #11575
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11575 +/- ##
=======================================
Coverage ? 91.57%
=======================================
Files ? 441
Lines ? 23873
Branches ? 0
=======================================
Hits ? 21861
Misses ? 1640
Partials ? 372 ☔ View full report in Codecov by Sentry. |
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.
Does this need a changelog? (seems yes)
yep added |
@songy23 anything else needed to get this merged, just want to ensure it’s included in the next release |
@akats7 I don't have the access to merge PRs unfortunately |
@open-telemetry/collector-maintainers Are we good with merging this? It's a simple 1-line bug fix |
Famous last words :)) How confident are you in the fix? I have not had time to read about. |
Context are in grpc/grpc-go#7556 & grpc/grpc-go#7779. gRPC maintainers acked there's an issue with proxy in |
#6197) ## Which problem is this PR solving? - Continuation of #6175. - There was a breaking change made in open-telemetry/opentelemetry-collector#11575 that updates `ToClientConn` to use `DialContext` instead of `NewClient` because of a bug. `DialContext` uses the `passthrough` scheme was resulting in the following error when the endpoint is left empty. This PR fixes the unit tests by setting the endpoint in the test configs to be non-empty. ``` grpc storage builder failed to create a store: error creating traced remote storage client: failed to exit idle mode: passthrough: received empty target in Build() ``` ## How was this change tested? - CI ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Mahad Zaryab <[email protected]> Signed-off-by: Mahad Zaryab <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is related open-telemetry#11537 and [this grpc issue](grpc/grpc-go#7779), to reiterate there is a bug in the grpc-go NewClient that makes the way the hostname is resolved incompatible with the way proxy setting are applied. Due to this domain based NO_PROXY setting do not work for grpc connections. They are working on a fix in the grpc library but until then it seems like it might be a good idea to revert to using DialContext instead of NewClient. If there's a workaround for this that anyone is aware of that could be suitable as well, the most clear one of using passthrough doesn't work since we sanitize the endpoint. <!-- Issue number if applicable --> #### Link to tracking issue Fixes open-telemetry#11537 <!--Describe what testing was performed and which tests were added.--> #### Testing I added some logging where the proxy setting are evaluated to show the behavior. **DialContext** ______ InMatch host : otel*******</DOMAIN-NAME/> m.host : </DOMAIN-NAME/> hasSuffix : true m.matchHost : true ______ **NewClient** ______ InMatch host : 10.*.*.*.* m.host : </DOMAIN-NAME/> hasSuffix : false m.matchHost : false ______ --------- Co-authored-by: Yang Song <[email protected]>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This is related open-telemetry#11537 and [this grpc issue](grpc/grpc-go#7779), to reiterate there is a bug in the grpc-go NewClient that makes the way the hostname is resolved incompatible with the way proxy setting are applied. Due to this domain based NO_PROXY setting do not work for grpc connections. They are working on a fix in the grpc library but until then it seems like it might be a good idea to revert to using DialContext instead of NewClient. If there's a workaround for this that anyone is aware of that could be suitable as well, the most clear one of using passthrough doesn't work since we sanitize the endpoint. <!-- Issue number if applicable --> #### Link to tracking issue Fixes open-telemetry#11537 <!--Describe what testing was performed and which tests were added.--> #### Testing I added some logging where the proxy setting are evaluated to show the behavior. **DialContext** ______ InMatch host : otel*******</DOMAIN-NAME/> m.host : </DOMAIN-NAME/> hasSuffix : true m.matchHost : true ______ **NewClient** ______ InMatch host : 10.*.*.*.* m.host : </DOMAIN-NAME/> hasSuffix : false m.matchHost : false ______ --------- Co-authored-by: Yang Song <[email protected]>
Description
This is related #11537 and this grpc issue, to reiterate there is a bug in the grpc-go NewClient that makes the way the hostname is resolved incompatible with the way proxy setting are applied. Due to this domain based NO_PROXY setting do not work for grpc connections. They are working on a fix in the grpc library but until then it seems like it might be a good idea to revert to using DialContext instead of NewClient.
If there's a workaround for this that anyone is aware of that could be suitable as well, the most clear one of using passthrough doesn't work since we sanitize the endpoint.
Link to tracking issue
Fixes #11537
Testing
I added some logging where the proxy setting are evaluated to show the behavior.
DialContext
InMatch
host : otel*******</DOMAIN-NAME/>
m.host : </DOMAIN-NAME/>
hasSuffix : true
m.matchHost : true
NewClient
InMatch
host : 10....
m.host : </DOMAIN-NAME/>
hasSuffix : false
m.matchHost : false