Skip to content
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

cds: stop child policies on resource-not-found errors #8122

Merged

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Feb 25, 2025

Prior to this PR, when the cds LB policy received a resource-not-found error for one of the clusters that it was watching, it would do the following:

  • send that error down to its child (eventually this would propagate all the way down the LB policy tree)
  • cluster_resolver LB policy would then create a config with no priorities, and this would result in the priority LB policy putting the channel in TRANSIENT_FAILURE and sending an error picker with a not so useful error message "all priorities are removed"

With this change though, whenever the cds LB policy receives a resource-not-found (either from its parent or for the resources that it is watching), it will shut down the LB policy tree under it and put the channel in TRANSIENT_FAILURE. If the error is from its parent, the picker will fail with the error received from the parent. If the error is for one of the resources that the cds LB policy is watching, the error would be a more useful one "cluster foo not found".

Addresses #7931.

RELEASE NOTES:

  • TBD

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.21%. Comparing base (dbf92b4) to head (b0a5671).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8122      +/-   ##
==========================================
+ Coverage   82.18%   82.21%   +0.03%     
==========================================
  Files         387      387              
  Lines       38947    38952       +5     
==========================================
+ Hits        32007    32025      +18     
+ Misses       5613     5604       -9     
+ Partials     1327     1323       -4     
Files with missing lines Coverage Δ
xds/internal/balancer/cdsbalancer/cdsbalancer.go 83.48% <100.00%> (+1.84%) ⬆️

... and 22 files with indirect coverage changes

@easwars easwars force-pushed the change_cds_behavior_on_resource_not_found branch from 4329a3d to b0a5671 Compare February 26, 2025 22:56
@easwars easwars merged commit feaf942 into grpc:master Feb 26, 2025
15 checks passed
@easwars easwars deleted the change_cds_behavior_on_resource_not_found branch February 26, 2025 23:08
purnesh42H pushed a commit to purnesh42H/grpc-go that referenced this pull request Mar 1, 2025
cds: stop child policies on resource-not-found errors (grpc#8122)

xds: simplify code handling certain error conditions in the resolver (grpc#8123)

xds, pickfirst: Enable additional addresses in xDS, set new pick_first as default (grpc#8126)

github: change test action to cover the legacy pickfirst balancer (grpc#8129)

cleanup: replace dial with newclient (grpc#7967)

cleanup: replace dial with newclient (grpc#7970)

stats/openetelemetry: refactor and make e2e test stats verification deterministic (grpc#8077)

xds: introduce simple grpc transport for generic xds clients (grpc#8066)

xds: generic xds client common configs

re-push comments

improve ServerConfig equal

easwar review round 1 on documentation

easwar comments on docstrings

easwar comments round 4

config tests

merge with previous pr

xds: add lrs client and xDS client interfaces

second pass to documentation language

change from godoc review

dfawley review 2

easwar review 1

changed to decoder struct

move authorities under xds client

easwar review 2

easwars review 4

ResourceWatcher done and LoadStore stop

grpc based transport

remove server config extension interface

add byte codec

dfawley review 1

send and recv tests with byte based test server

change to proto based server

easwar review 1

easwar review 3

xds: generic xds client ads transport channel
purnesh42H pushed a commit to purnesh42H/grpc-go that referenced this pull request Mar 1, 2025
ads: stop child policies on resource-not-found errors (grpc#8122)

xds: simplify code handling certain error conditions in the resolver (grpc#8123)

xds, pickfirst: Enable additional addresses in xDS, set new pick_first as default (grpc#8126)

github: change test action to cover the legacy pickfirst balancer (grpc#8129)

cleanup: replace dial with newclient (grpc#7967)

cleanup: replace dial with newclient (grpc#7970)

stats/openetelemetry: refactor and make e2e test stats verification deterministic (grpc#8077)

xds: introduce simple grpc transport for generic xds clients (grpc#8066)

xds: generic xds client common configs

re-push comments

improve ServerConfig equal

easwar review round 1 on documentation

easwar comments on docstrings

easwar comments round 4

config tests

merge with previous pr

xds: add lrs client and xDS client interfaces

second pass to documentation language

change from godoc review

dfawley review 2

easwar review 1

changed to decoder struct

move authorities under xds client

easwar review 2

easwars review 4

ResourceWatcher done and LoadStore stop

grpc based transport

remove server config extension interface

add byte codec

dfawley review 1

send and recv tests with byte based test server

change to proto based server

easwar review 1

easwar review 3

xds: generic xds client ads transport channel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants