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 split #11484

Merged
merged 10 commits into from
Aug 23, 2024
Merged

Xds client split #11484

merged 10 commits into from
Aug 23, 2024

Conversation

larry-safran
Copy link
Contributor

@larry-safran larry-safran commented Aug 21, 2024

Split off from #11254

census/src/test/java/io/grpc/census/CensusModulesTest.java Outdated Show resolved Hide resolved
@@ -51,6 +51,7 @@ public class SharedXdsClientPoolProviderTest {
@Rule
public final ExpectedException thrown = ExpectedException.none();
private final Node node = Node.newBuilder().setId("SharedXdsClientPoolProviderTest").build();
private static final String DUMMY_TARGET = "dummy";
Copy link
Contributor

Choose a reason for hiding this comment

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

We should test at least two targets, and verify, e.g. the second xdsClient is not the same instance as the first one, is ref counted.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see that multiple targets have been covered in csds service test. Still, it would be nice to have multiple targets tested in this UT.

xds/src/test/java/io/grpc/xds/ControlPlaneRule.java Outdated Show resolved Hide resolved
String resourceType = value.getTypeUrl();
if (!value.getResponseNonce().isEmpty()
&& !String.valueOf(xdsNonces.get(resourceType)).equals(value.getResponseNonce())) {
if (!value.getResponseNonce().isEmpty() && xdsNonces.containsKey(resourceType)
Copy link
Contributor

Choose a reason for hiding this comment

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

this change also seems not related?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This fix is needed to support anything trying a nonce other than the initial empty value.

Copy link
Contributor

Choose a reason for hiding this comment

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

I still don't see this change related to "support multiple xds client". Looks this file can be reverted without impacting anything?
But I see this potentially avoid NPE when it receives another resource type other than the hardcoded resource type in xdsNonces keyset.

xds/src/test/java/io/grpc/xds/CsdsServiceTest.java Outdated Show resolved Hide resolved
Copy link
Contributor

@YifeiZhuang YifeiZhuang left a comment

Choose a reason for hiding this comment

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

LGTM in general with two minor comments.

@@ -51,6 +51,7 @@ public class SharedXdsClientPoolProviderTest {
@Rule
public final ExpectedException thrown = ExpectedException.none();
private final Node node = Node.newBuilder().setId("SharedXdsClientPoolProviderTest").build();
private static final String DUMMY_TARGET = "dummy";
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that multiple targets have been covered in csds service test. Still, it would be nice to have multiple targets tested in this UT.

TimeProvider.SYSTEM_TIME_PROVIDER,
MessagePrinter.INSTANCE,
new TlsContextManagerImpl(bootstrapInfo));
} catch (Exception e) {
Copy link
Member

Choose a reason for hiding this comment

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

What is this catching? I don't see any new exceptions in #11254 either.

@ejona86
Copy link
Member

ejona86 commented Aug 23, 2024

You don't need to wait for me to merge this. I wasn't planning on providing a full review. I just poked in and had the drive-by comment.

@larry-safran larry-safran merged commit d034a56 into grpc:master Aug 23, 2024
15 checks passed
@larry-safran larry-safran deleted the xds_client_split branch August 23, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants