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

xdsclient: completely remove the old WatchCluster API #6621

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Sep 12, 2023

#6600 switched the CDS LB policy to use the new API to watch a cluster. This PR:

  • Removes the old API from the xdsclient.XDSClient interface
  • Removes the old API from the fakeclient package
  • Removes the old API from the xdsclient.clientImpl type
  • Switches over remaining tests to the new API

#resource-agnostic-xdsclient-api

RELEASE NOTES: none

@easwars easwars requested a review from zasweq September 12, 2023 18:57
@easwars easwars added the Type: Internal Cleanup Refactors, etc label Sep 12, 2023
@easwars easwars added this to the 1.59 Release milestone Sep 12, 2023
Copy link
Contributor

@zasweq zasweq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

}

func (ew *clusterWatcher) OnError(err error) {
ew.updateCh.SendOrFail(xdsresource.ClusterUpdateErrTuple{Err: err})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this SendOrFail where as API you switched from Sends on all? Can you switch this to blocking and assert it doesn't receive an error from updateCh? I don't really care, but can you comment here or top level for clusterWatcher if this route as to why one send blocks and one doesnt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually wanted to use Replace, which is what I had used in the xds_resolver_test. This block of code, I just copied over from the endpointsWatcher. Changed both to use Replace instead and added a comment as well. Thanks.

@zasweq zasweq assigned easwars and unassigned zasweq Sep 14, 2023
@easwars easwars merged commit 92f5ba9 into grpc:master Sep 18, 2023
1 check passed
@easwars easwars deleted the remove_watch_cluster branch September 18, 2023 16:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants