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

xds/client: move unmarshal functions and types to a separate package #4904

Merged
merged 5 commits into from
Nov 8, 2021

Conversation

menghanl
Copy link
Contributor

This is a cleanup PR, part of a bigger effort to refactor and cleanup the xdsclient package.

This moves unmarshal functions and types to a separete xdsclient/resource package:

  • all Unmarshal functions (e.g. UnmarshalListener)
  • all update resource types (e.g. ListenerUpdate)
    • Note FilterChainManager is also moved

Those functions don't rely on xdsclient details (ClientConn, stream, or even the watchers/callbacks). And they are a huge part of the xdsclient package, making it hard to maintain.

RELEASE NOTES: N/A

@menghanl menghanl requested a review from easwars October 27, 2021 20:56
@menghanl menghanl added the Type: Internal Cleanup Refactors, etc label Oct 27, 2021
@menghanl menghanl added this to the 1.42 Release milestone Oct 27, 2021
@menghanl menghanl force-pushed the xds_client_ractor branch 4 times, most recently from 62c8ed7 to 2daeb74 Compare October 27, 2021 21:04
@easwars
Copy link
Contributor

easwars commented Oct 27, 2021

vet isn't happy. Could you please take a look.

@menghanl
Copy link
Contributor Author

Tests fixed


// Package resource contains functions to proto xds updates (unmarshal from
// proto), and types for the resource updates.
package resource
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call this xdsresource instead? I don't feel strongly either way, but wanted to know if you considered that and rejected it, and if so, for what reasons.

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

@easwars
Copy link
Contributor

easwars commented Nov 3, 2021

Could you please handle the merge conflicts. Thanks.

@easwars easwars assigned menghanl and unassigned easwars Nov 3, 2021
@menghanl menghanl force-pushed the xds_client_ractor branch 2 times, most recently from 7f073da to dfbd7d6 Compare November 3, 2021 18:14
@menghanl
Copy link
Contributor Author

menghanl commented Nov 3, 2021

Done

@menghanl menghanl assigned easwars and unassigned menghanl Nov 3, 2021
_ "google.golang.org/grpc/xds/internal/xdsclient/v2" // V2 client registration.
"google.golang.org/grpc/xds/internal/xdsclient/xdsresource"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: join this import with the other block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did you mean "not join"?

@easwars easwars assigned menghanl and unassigned easwars Nov 4, 2021
[xds_client_ractor] package comment

[xds_client_ractor] add (s) to all tests, try to fix tlogger race
@menghanl menghanl merged commit 79e9c95 into grpc:master Nov 8, 2021
@menghanl menghanl deleted the xds_client_ractor branch November 8, 2021 19:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2022
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.

None yet

2 participants