De-duplicate cluster update information pushed to cluster watchers.
This only applies to CDS as the management server sends a response with all requested clusters while only some of. them have changed (or newly been subscribed).
This does not apply to EDS as the protocol is incremental and each EDS response will only contain ClusterLoadAssignments for clusters whose endpoints have changed.
This does not apply to LDS and RDS as at any time we will subscribe to a single resource and our TD implementation will not send extra (unrequested) resources. So each time, the received responses always contain updated resource information.
Create the counter for recording per locality stats upon creating the child balancer for that locality. When the locality is deactivated (due to EDS response update removes it), the counter is not deleted from the LoadStatsStore. Delete it when the child balancer for that locality is shut down. In this way, the lifecycle of the load stats counter for a certain locality stays same with the child balancer for that locality. This is exactly what will happen after we refactor LocalityStore to PriorityLoadBalancer and LrsLoadBalancer (i.e., when some priority is deactivated, its subtree is not deleted immediately, so the LrsLoadBalancer instances for localities still hold the load stats counters).
Implemented service config generation in the xDS resolver with xds_routing that supports all matchers. Reimplemented xds_routing config parsing with all matchers. Existing implementation for xds_routing LB policy is mostly deleted for now, as we would need to reimplement the route matching logic with matchers added.
Put Channel into TRANSIENT_FAILURE when CDS/EDS resource that is currently being watched becomes unavailable. CDS/EDS LB policies should shut down their downstream policy instances (stop using current Subchannels for new RPCs) and propagate TRANSIENT_FAILURE status to their parent policies (and may eventually to the Channel).
Changed the logic of parsing Route to skip Routes with action that specifies cluster_header. Eliminate unnecessary validation logic in XdsClientImpl, of which is already covered in converters.
- Use gradle configuration `api` for dependencies that are part of grpc public api signatures.
- Replace deprecated gradle configurations `compile`, `testCompile`, `runtime` and `testRuntime`.
- With minimal change in dependencies: If we need dep X and Y to compile our code, and if X transitively depends on Y, then our build would still pass even if we only include X as `compile`/`implementation` dependency for our project. Ideally we should include both X and Y explicitly as `implementation` dependency for our project, but in this PR we don't add the missing Y if it is previously missing.
Use onResourceDoesNotExist() API for notifying resource not found. Previously, it uses onError(), which mixes with errors for other failures (e.g., transient TD network error). This lets us be able to make further improvement of LB policies/resolver's behavior w.r.t control plane changes (e.g., should immediately go into TRANSIENT_FAILURE if the config received from control plane leads to it).
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.
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.