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

completely delete WatchListener and WatchRouteConfig APIs #6849

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Dec 12, 2023

This PR gets rid of the old WatchListener and WatchRouteConfig APIs. This should be the last PR to call time on the old APIs.

#resource-agnostic-xdsclient-api

RELEASE NOTES: none

@easwars easwars requested a review from zasweq December 12, 2023 00:55
@easwars easwars added the Type: Internal Cleanup Refactors, etc label Dec 12, 2023
@easwars easwars added this to the 1.61 Release milestone Dec 12, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #6849 (61e0c71) into master (52baf16) will increase coverage by 0.10%.
Report is 3 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6849      +/-   ##
==========================================
+ Coverage   83.43%   83.54%   +0.10%     
==========================================
  Files         286      286              
  Lines       30801    30781      -20     
==========================================
+ Hits        25699    25716      +17     
+ Misses       4028     3999      -29     
+ Partials     1074     1066       -8     
Files Coverage Δ
xds/internal/xdsclient/clientimpl_watchers.go 83.33% <ø> (-0.54%) ⬇️
xds/internal/xdsclient/xdsresource/type_rds.go 46.15% <ø> (ø)

... and 19 files with indirect coverage changes

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.

Some nits.

xds/internal/xdsclient/tests/misc_watchers_test.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/tests/misc_watchers_test.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/tests/resource_update_test.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/tests/resource_update_test.go Outdated Show resolved Hide resolved
@zasweq zasweq assigned easwars and unassigned zasweq Dec 12, 2023
@easwars easwars assigned zasweq and unassigned easwars Dec 13, 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 overall just a few final nits.

Comment on lines 50 to 51
// This route configuration watcher registers two
// more watches from the OnUpdate callback of the original resource for which it was created.
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrap to 80 chars please :).

Copy link
Contributor

Choose a reason for hiding this comment

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

"registers two watches corresponding to the names passed in at creation time on a valid update"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines +126 to +131
// Create a route configuration watcher that registers two more watches from
// the OnUpdate callback:
// - one for the same resource name as this watch, which would be
// satisfied from xdsClient cache
// - the other for a different resource name, which would be
// satisfied from the server
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand what this is testing (I feel like a certain xDS resource can't trigger another watch for the same xDS resource) but since this is already in the codebase I'm fine leaving it.

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 feel like a certain xDS resource can't trigger another watch for the same xDS resource

Wouldn't happen in practice. But this test wants to ensure that even if that happens, things work fine.

@zasweq zasweq assigned easwars and unassigned zasweq Dec 13, 2023
@easwars easwars merged commit 6e6914a into grpc:master Dec 15, 2023
14 checks passed
@easwars easwars deleted the delete_watch_lds_rds_apis branch December 15, 2023 00:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 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