-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[fix][query] Fix misconfiguration in TLS settings from using OTEL HTTP helper #6239
Conversation
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
Signed-off-by: Mahad Zaryab <mahadzaryab1@gmail.com>
TODO for myself:
@yurishkuro Let me know if we'd like the regression test in this PR or if we want to land this patch quickly and I can do it in a follow-up PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6239 +/- ##
==========================================
- Coverage 96.45% 96.42% -0.04%
==========================================
Files 355 355
Lines 20161 20149 -12
==========================================
- Hits 19446 19428 -18
- Misses 528 532 +4
- Partials 187 189 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
require.NoError(t, err) | ||
require.Error(t, s.Start(context.Background())) | ||
t.Cleanup(func() { | ||
require.NoError(t, s.Close()) | ||
}) |
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 error will now be thrown at start when we initialize the listener rather than when we create the server
@@ -228,15 +228,6 @@ func createHTTPServer( | |||
staticHandlerCloser: staticHandlerCloser, | |||
} | |||
|
|||
// TODO why doesn't OTEL helper do that already? |
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.
hehe, my intuition was right at the time :-)
Thanks for fixing it! |
## Which problem is this PR solving? - Resolves #6230 ## Description of the changes - We had a bug report come in #6230 which wasn't caught by our unit tests. The reason here was because the test was not checking the status code of the response received from the server but rather just the error returned from doing `Client.Do`. - - This PR also cleans up the tests to remove the manual dial call and an unnecessary filter in the test body. ## How was this change tested? - This test passes on main because of the patch that was landed in #6239. - To verify that this test would have caught the bug, I ran this test on the v1.63.0 release. Running this test caused failures in the following tests, all of which were returning `400` instead of `200`. ``` TestServerHTTPTLS/should_pass_with_TLS_client_to_trusted_TLS_server_with_correct_hostname TestServerHTTPTLS/should_pass_with_TLS_client_with_cert_to_trusted_TLS_server_requiring_cert TestServerHTTPTLS/should_pass_with_TLS_client_with_cert_to_trusted_TLS_HTTP_server_requiring_cert_and_insecure_GRPC_server ``` ## 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: Mahad Zaryab <mahadzaryab1@gmail.com>
Which problem is this PR solving?
Description of the changes
.ToListener()
ServeTLS
and can simply callServe
and TLS will be used when the connection is configured to do so (which it will be if the TLSSetting is set on the server).How was this change tested?
Start the server by doing the following
Send request with HTTP1.1
Send request with HTTP2 (default)
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test