- Allow Resources to be set
- Allow clients to subscribe/unsubscribe to resources
- Managing, storing, and versioning resources correctly based on updates
- Correct ACK/NACK according to XDS protocol
- Started a separate blocking thread to be used for stream read
- Handling both requests from clients and updates from tests and respond
with the correct version of resource
- Consolidated all 4 resources (LDS, CDS, EDS, RDS) to share common code
- Updated all tests to use the fake properly
- Fixed potential crash cases in the subchannel thread for clean TSAN,
UBSAN runs
I discovered a couple of existing shortcomings while implementing this
client that mean this is *not yet ready for inclusion in CI*. I
nonetheless want to get an early review and integrate this to the master
branch, in the interest of small easily reviewable code changes.
The first problem was that the bazel build has apparently never pulled
roots.pem in as a data dependency. This appears not to have been a
problem until XDS enters into the mix. This has been added into the
Bazel build with a small change to the pyx_library rule.
The larger problem is that there is currently no public Python API to
get a peer's identity from the client side. This is crucial to
determining the correctness of an interaction of a client-server pair
under XDS. I intend to add such an method to the RpcContext interface in
an upcoming PR and use it in the interop client. For the moment, I
simply fake the peer details.
Finally, I add a knob to run_xds_tests.py allowing multiple instances of
this test to exist at once. Multiple instances forwarding to the same
port cannot exist on GCE, so this enables multiple people to run tests
at the same time.