-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Dualstack interop testing enablement #11231
Dualstack interop testing enablement #11231
Conversation
@@ -268,7 +267,7 @@ void setUp() { | |||
tester.setUp(); | |||
} | |||
|
|||
private synchronized void tearDown() { | |||
synchronized void tearDown() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this file changed? I don't see any usages of these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes reverted
InetAddress[] addresses = InetAddress.getAllByName(InetAddress.getLocalHost().getHostName()); | ||
for (InetAddress address : addresses) { | ||
if (address.getAddress().length == 4) { | ||
return new java.net.InetSocketAddress(address.getHostAddress(), port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass address
, like you did for IPv6. This will do a DNS lookup and can leave you with an IPV6 address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
interop-testing/src/main/java/io/grpc/testing/integration/TestServiceServer.java
Show resolved
Hide resolved
interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java
Show resolved
Hide resolved
interop-testing/src/test/java/io/grpc/testing/integration/StressTestClientTest.java
Outdated
Show resolved
Hide resolved
de679ad
to
4a97c3c
Compare
a328727
to
96388a2
Compare
…tional flag "address_type"
…t the first one. Continue to add "::1".
df9ec40
to
32e5fe9
Compare
@ejona86 ping |
interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java
Outdated
Show resolved
Hide resolved
interop-testing/src/main/java/io/grpc/testing/integration/XdsTestServer.java
Show resolved
Hide resolved
@@ -101,7 +100,8 @@ protected EdsUpdate doParse(Args args, Message unpackedMessage) throws ResourceI | |||
} | |||
|
|||
private static boolean isEnabledXdsDualStack() { | |||
return GrpcUtil.getFlag(GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS, false); | |||
return GrpcUtil.getFlag(PickFirstLoadBalancerProvider.GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to be careful here to not flip the flag before it is passing interop. We can flip the happy eyeballs flag without interop passing, but we shouldn't flip this one.
interop-testing/src/test/java/io/grpc/testing/integration/DualStackClientTest.java
Outdated
Show resolved
Hide resolved
interop-testing/src/test/java/io/grpc/testing/integration/DualStackClientTest.java
Outdated
Show resolved
Hide resolved
public final GrpcCleanupRule cleanupRule = new GrpcCleanupRule(); | ||
|
||
@Rule | ||
public final Timeout globalTimeout = Timeout.seconds(10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will leak the server. Why not just use a timeout on the unary RPC?
interop-testing/src/main/java/io/grpc/testing/integration/Util.java
Outdated
Show resolved
Hide resolved
interop-testing/src/test/java/io/grpc/testing/integration/DualStackClientTest.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
private static ManagedChannel createChannel(int port, String target) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throws Exception
to remove the unhelpful catch+rethrow?
interop-testing/src/test/java/io/grpc/testing/integration/DualStackClientTest.java
Outdated
Show resolved
Hide resolved
This documents the changes the the test server classes in grpc/grpc-java#11231 Closes #36830 COPYBARA_INTEGRATE_REVIEW=#36830 from larry-safran:dualstack_test_doc 986e9dd PiperOrigin-RevId: 647054757
…eally care about.
…lls from flag guarding xds dual stack processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before merging, let's confirm PSM Interop passes with the changes to the server.
metricsServer.shutdownNow(); | ||
if (metricsServer != null) { | ||
metricsServer.shutdownNow(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is unrelated to the change, could we please move it to a separate PR? To avoid any confusion, and in case we need to roll back this PR.
interop-testing/src/test/java/io/grpc/testing/integration/XdsTestServerTest.java
Outdated
Show resolved
Hide resolved
@@ -33,15 +33,15 @@ | |||
* down the address list and sticks to the first that works. | |||
*/ | |||
public final class PickFirstLoadBalancerProvider extends LoadBalancerProvider { | |||
public static final String GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS = | |||
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS"; | |||
public static final String GRPC_PF_USE_HAPPY_EYEBALLS = "GRPC_PF_USE_HAPPY_EYEBALLS"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ejona86 - does it make sense to separate PSM Interop server changes from the dualstack enablement env vars? I'd prefer that, but if not possible/desirable, I'm good with this too.
"grpc.experimental.xdsDualstackEndpoints"; | ||
|
||
public static final String GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS = | ||
"GRPC_EXPERIMENTAL_HAPPY_EYEBALLS"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HAPPY_EYEBALLS? This should be "GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS"
, per the gRFC, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Fix flag string for enabling dual stack and give server ability to parse argument
address_type