-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Fix http2 authority header in single endpoint scenario #13359
Conversation
15f87be
to
8ce6100
Compare
c9afc60
to
f83159c
Compare
d6fbce2
to
171cca3
Compare
Codecov Report
@@ Coverage Diff @@
## main #13359 +/- ##
===========================================
+ Coverage 39.49% 71.31% +31.81%
===========================================
Files 460 453 -7
Lines 39141 38856 -285
===========================================
+ Hits 15459 27709 +12250
+ Misses 22009 9114 -12895
- Partials 1673 2033 +360
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
171cca3
to
8ebe2b9
Compare
Pushed original fix that uses first endpoint but with huge integration tests rewrite. Needed to rewrite tests to remove hacks that caused problems with testing authority. Those hacks are:
Please review new test suites that should cover all possible client endpoint configurations. We still cant cover all cases in https://github.com/grpc/grpc/blob/master/doc/naming.md but as we add more supported names adding them should be much easier. I decided to use the old fix to confirm that new tests work. I expect that before merging this PR I will try to fix case with multiple endpoints. |
2051bc7
to
4ad129d
Compare
As discussed in #13192 (comment) etcd never supported correct authority in multiple endpoint scenario. This PR restores behavior of etcd v3.4 where first endpoint is used to determine authority header. This PR should be good to review when tests pass. |
744fa4a
to
21dd633
Compare
21dd633
to
e8ff223
Compare
@@ -153,6 +159,10 @@ type ClusterConfig struct { | |||
|
|||
// UseIP is true to use only IP for gRPC requests. | |||
UseIP bool | |||
// UseBridge adds bridge between client and grpc server. Should be used in tests that | |||
// want to manipulate connection or require connection not breaking despite server stop/restart. | |||
UseBridge bool |
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.
As this was previous default and majority of tests got to be changed to get True
supplied here explicitly,
have you considered making it WithoutBridge
or NoBridge
setting to let opt-in for the new behaviour ?
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.
Using WithoutBridge
would require less changes/work, but I don't think it would be better. I think that enabling bridge is very bad default, it is not as transparent as it might seem. It changes how broken connections are handled hiding some issues which we would want to fix. It also forces integration tests to go through unix socket, which is not officially supported (you cannot bind etcd server to unix socket). This makes maintaining integration and e2e tests much harder, as it increases differences between two environments. When something breaks you don't know if this is specific to integration test environment or etcd logic itself.
I think we should strive to have integration and e2e tests be almost identical in setup, differing only in what is executed underneath (etcdctl binary in e2e and client library in integration). This way it is easy to attribute failures to etcd or environment. Using bridges as a common denominator creates unnecessary complexity, causing us to waste time on fixing integration test code instead of focusing on etcd itself.
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.
SG.
Does it mean, there is a follow-up TODO to check which of the existing tests would pass with 'False' ?
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 have only passed "true" only in tests that were failing, so I think this should be done. Only think it that there might be difference between what test was intended to test and it's implementation. Possibly if we changed implementation of some tests we could further reduce usage of bridge, but I don't think profit from this would outweigh amount of work that this would require us to invest.
I think it would make sense to propose rewrite of e2e/integration tests to unified framework and slowly migrate existing tests there, case by case. Removing bridge could be done at the same time and results would be more beneficial (halved amount of easier to debug tests).
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.
grpcproxy: TestV3KVInflightRangeRequests seems to be continuesly failing (tried 2 retries).
1ff4747
to
1cd1f57
Compare
1cd1f57
to
23bf6e9
Compare
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.
Please edit the changelog with the new URL schema:
https://github.com/etcd-io/etcd/blob/main/CHANGELOG-3.5.md
23bf6e9
to
736671f
Compare
Done |
7e139b9
to
ae9d2b8
Compare
ae9d2b8
to
d52d7fc
Compare
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…point scenario Signed-off-by: Chao Chen <chaochn@amazon.com>
…ty-header-fix [3.4] backport #13359 Fix http2 authority header in single endpoint scenario
Fixes #13192
This doesn't fully fix authority in multiple endpoint scenario, but
should at least fixes single endpoint scenario.
cc @ptabor @tatsuhiro-t @menghanl