-
Notifications
You must be signed in to change notification settings - Fork 4.5k
xds: generic xds client resource watching e2e #8183
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
xds: generic xds client resource watching e2e #8183
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8183 +/- ##
==========================================
+ Coverage 82.09% 82.19% +0.09%
==========================================
Files 412 417 +5
Lines 40491 41257 +766
==========================================
+ Hits 33242 33912 +670
- Misses 5876 5931 +55
- Partials 1373 1414 +41
🚀 New features to boost your workflow:
|
c99ca98
to
02db583
Compare
@dfawley could you do a pass on the implementation? For now, I have removed the metrics from client as it requires some more thought. It can be added in separate commit or PR. Otherwise the main implementation can be reviewed to make sure we are following the right approach and do the changes (if needed) before we go further. Also, I will be adding more e2e tests in subsequent commits |
aeb32c1
to
7064881
Compare
4a038d9
to
3bacb44
Compare
@dfawley i have made the change to use ServerConfig and ServerIdentifier as map key for xdsclient and transport respectively. Now we don't need equal. Only thing is for grpcTransport, we return runtime error if extensions are not Could you do the pass on last commit and confirm if we can finalize this approach? |
03adc89
to
5bcc906
Compare
153bdce
to
81711cb
Compare
Apologies for the delay. |
thanks @easwars. I have addressed all the comments. Could you please do another pass? |
d7c3bb2
to
6a422d7
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.
Mostly LGTM.
Just a couple of open comments that needs addressing.
|
||
// DumpResources returns the status and contents of all xDS resources being | ||
// watched by the xDS client. | ||
func (c *XDSClient) DumpResources() ([]byte, error) { |
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 thought we were going to require byte slices for the send and recv functionalities on the transport. But why do we need to return a byte slice here? We are marshaling the proto to bytes here and the caller would do exactly the opposite. So, I'm not seeing the reason. Maybe I'm missing something?
This is the change to make generic xDS client do resource watching from xDS management server. The xDS client uses the ADS (Aggregated Data Service) stream transport channel that was created in #8144. The e2e tests are written using the listener resource type from #8144 and grpctransport from #8066.
The PR copies the existing
clientimpl
,authority
,clientimpl_watcher
from internal xdsclient code along with the helpers that are part of gRPC and then modify them to use the generic client types and interfaces.The PR also adds
String()
andEqual()
methods forServerIdentifierExtension
and implements them forgrpctransport.ServerIdentifierExtension
. It also adds a custom map implementation similar toresolver.AddrMap
to re-use existing channels for similar server configurations.Recommend to review each commit of the PR separately in the order.
Commits with copy prefix are copy paste of internal xdsclient code and are followed by modifications. Review only the modification commit.
RELEASE NOTES: None