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/xdsclient: ignore resource deletion as per gRFC A53 #6035

Merged
merged 15 commits into from
Apr 4, 2023

Conversation

arvindbr8
Copy link
Member

@arvindbr8 arvindbr8 commented Feb 17, 2023

As per gRFC A53, the gRPC xDSClient can be configured to ignore resource deletions sent by the xDS server. A53 This diff adds that feature to the xDS client. Also adds units to test this out.

RELEASE NOTES:

  • xds/xdsclient: ignores resource deletion as per gRFC A53

@arvindbr8 arvindbr8 added the Type: Feature New features or improvements in behavior label Feb 17, 2023
@arvindbr8 arvindbr8 added this to the 1.54 Release milestone Feb 17, 2023
@arvindbr8 arvindbr8 requested review from easwars and removed request for easwars February 17, 2023 22:50
As per gRFC A53, the gRPC xDSClient can be configured to ignore
resource deletions sent by the xDS server. [A53](https://github.com/grpc/proposal/blob/master/A53-xds-ignore-resource-deletion.md)
@arvindbr8 arvindbr8 force-pushed the ignore-resource-deletion-real branch from 26eb7da to 9b2ddae Compare March 1, 2023 00:31
xds/googledirectpath/googlec2p.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/authority.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/authority.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/authority.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/authority.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/authority_test.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
@arvindbr8 arvindbr8 requested a review from easwars March 23, 2023 23:16
@arvindbr8 arvindbr8 assigned easwars and unassigned arvindbr8 Mar 23, 2023
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
internal/testutils/xds/e2e/server.go Outdated Show resolved Hide resolved
internal/testutils/xds/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignores_resource_deletion_test.go Outdated Show resolved Hide resolved
xds/internal/xdsclient/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
@easwars easwars assigned arvindbr8 and unassigned easwars Mar 28, 2023
@arvindbr8 arvindbr8 requested a review from easwars March 31, 2023 11:11
@arvindbr8 arvindbr8 assigned easwars and unassigned arvindbr8 Mar 31, 2023
Copy link
Contributor

@easwars easwars left a comment

Choose a reason for hiding this comment

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

I'm yet to look at the server tests.

test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved

var (
resolverBuilder = internal.NewXDSResolverWithConfigForTesting.(func([]byte) (resolver.Builder, error))
nodeID = uuid.New().String()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little concerned about using the same nodeID across tests. Would prefer if we can keep the tests as hermetic as possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason for this being global is to avoid passing it along to all the helper function and since this was a string constant. I think maybe i should have not used many nested helpers then.

Do you think this is a problem now?

Copy link
Contributor

Choose a reason for hiding this comment

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

I've run into problems in the past when the same nodeID was reused across tests, but maybe at that point we were also using a single management server instance across tests. But since this is simple cleanup of declaring the nodeID inside the test and passing it whatever helper needs it, I think we should do it. Because if it ever leads to some test flakes, it will be hard to debug.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ill update this one in a bit

test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
return bootstrapContents
}

// This helper generates a custom bootstrap config for the test.
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment needs to be updated.

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦 sorry.. i missed this. updating

test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
@easwars easwars assigned arvindbr8 and unassigned easwars Mar 31, 2023
@arvindbr8 arvindbr8 requested a review from easwars April 3, 2023 05:17
@arvindbr8 arvindbr8 assigned easwars and unassigned arvindbr8 Apr 3, 2023
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
test/xds/xds_client_ignore_resource_deletion_test.go Outdated Show resolved Hide resolved
Comment on lines 337 to 340
// This test creates a xds-enabled gRPC server with a listener resource and this
// server features "ignore_resource_deletion". The test then verifies successful
// RPCs to server. The test then removes the listener resource from the server
// and verifies that server continues to server requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

In this test-level comment and the next, you need to disambiguate between the xDS-enabled gRPC server and the management server. When you say this server features "ignore_resource_deletion", this is actually a property of the management server. And there are too many servers in this line The test then removes the listener resource from the server and verifies that server continues to server requests.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry lol. I see what has happened here. updated.

@easwars easwars assigned arvindbr8 and unassigned easwars Apr 3, 2023
@arvindbr8 arvindbr8 requested a review from easwars April 3, 2023 22:37
@arvindbr8 arvindbr8 removed their assignment Apr 3, 2023
}
t.Cleanup(func() { lis.Close() })

// Setup the management server to respond with the listener resources.
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment is out of place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@easwars easwars assigned arvindbr8 and unassigned easwars Apr 3, 2023
@arvindbr8 arvindbr8 merged commit ea0a038 into grpc:master Apr 4, 2023
1 check passed
@arvindbr8 arvindbr8 deleted the ignore-resource-deletion-real branch April 4, 2023 17:11
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants