Use new APIs for configuring TLS in Android environment. Starting from Android 29, there is a new set of public APIs for configuring ALPN (and starting from Android 24, there is API for enabling SNI). This change migrates to use these new APIs whenever possible. Only fallback to call the old hidden APIs if new ones do not exist (or do not work).
Delete special logics (e.g., fallback) for EDS-only workflow and use the same format of lb config for running EDS-only workflow as running the full CDS-EDS workflow.
The LB configs used for EDS policy diverges for the full xDS flow (generated by CDS policy) and EDS-only flow (received in service config). This change creates a separate config (EdsConfig) for the actual EDS LB policy. CDS policy generates EdsConfig directly and the wrapper policy (i.e., XdsLoadBalancer) converts received XdsConfig to EdsConfig for EDS-only flow.
The race between new streams and transport shutdown is #2562, but it is still
far from being generally solved. This reduces the race window of new streams
from (transport selection → stream created on network thread) to (transport
selection → stream enqueued on network thread). Since only a single thread now
needs to do work in the stream creation race window, the window should be
dramatically smaller.
This only reduces GOAWAY races when the server performs a graceful shutdown
(using two GOAWAYs), as that is the only non-racy way on-the-wire to shutdown a
connection in HTTP/2.
Allow receiving empty LocalityLbEnpoints in EDS responses, it is LB policies' responsibility to go to TRANSIENT_FAILURE immediately when receiving an update with no locality.
A user has been seeing "InternalSubchannel closed transport due to address
change" errors (b/153064566). It is unclear if they are predomenent, but they
are at least adding noise. Since #2562 is still far from being generally
solved, we delay the shutdown a while to side-step the race.
Make each subchannel created by RR stay in TRANSIENT_FAILURE state until READY. That is, each subchannel ignores consequent non-READY states after TRANSIENT_FAILURE.
The sourceSets.main.output.collect should probably be improved at some point to
improve loading performance, but this is technically better than what we had
before so let's call it a win and move on.
Fix logic of filtering localites in EDS responses:
- Each LocalityLbEndpoints message is allowed to contain 0 LbEndpoints.
- LocalityLbEndpoints without or with 0 weight are ignored.
- NACK responses with sparse locality priorities.
useMarshalledMessages works by duplicating a ServerServiceDefinition while replacing just the marshallers. It currently does not copy over the SchemaDescriptors, which breaks at least the ProtoReflectionService.