Skip to content

Commit

Permalink
[dualstack] enable EDS dualstack support by default (grpc#37545)
Browse files Browse the repository at this point in the history
I'll backport this to 1.66 as soon as it gets merged.

Closes grpc#37545

COPYBARA_INTEGRATE_REVIEW=grpc#37545 from markdroth:dualstack_enable 1b203fe
PiperOrigin-RevId: 666046424
  • Loading branch information
markdroth committed Aug 21, 2024
1 parent 56a8122 commit f03ac65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/core/xds/grpc/xds_endpoint_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ namespace grpc_core {

namespace {

// TODO(roth): Remove this once dualstack support is stable.
// TODO(roth): Remove this after 1.67 is released.
bool XdsDualstackEndpointsEnabled() {
auto value = GetEnv("GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
if (!value.has_value()) return false;
if (!value.has_value()) return true;
bool parsed_value;
bool parse_succeeded = gpr_parse_bool_value(value->c_str(), &parsed_value);
return parse_succeeded && parsed_value;
Expand Down
14 changes: 3 additions & 11 deletions test/core/xds/xds_endpoint_resource_type_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,6 @@ TEST_F(XdsEndpointTest, MissingAddress) {
}

TEST_F(XdsEndpointTest, MultipleAddressesPerEndpoint) {
testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down Expand Up @@ -543,8 +541,6 @@ TEST_F(XdsEndpointTest, MultipleAddressesPerEndpoint) {
}

TEST_F(XdsEndpointTest, AdditionalAddressesMissingAddress) {
testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down Expand Up @@ -575,8 +571,6 @@ TEST_F(XdsEndpointTest, AdditionalAddressesMissingAddress) {
}

TEST_F(XdsEndpointTest, AdditionalAddressesMissingSocketAddress) {
testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down Expand Up @@ -608,8 +602,6 @@ TEST_F(XdsEndpointTest, AdditionalAddressesMissingSocketAddress) {
}

TEST_F(XdsEndpointTest, AdditionalAddressesInvalidPort) {
testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down Expand Up @@ -645,8 +637,6 @@ TEST_F(XdsEndpointTest, AdditionalAddressesInvalidPort) {
}

TEST_F(XdsEndpointTest, AdditionalAddressesInvalidAddress) {
testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down Expand Up @@ -681,7 +671,9 @@ TEST_F(XdsEndpointTest, AdditionalAddressesInvalidAddress) {
<< decode_result.resource.status();
}

TEST_F(XdsEndpointTest, IgnoresMultipleAddressesPerEndpointWhenNotEnabled) {
TEST_F(XdsEndpointTest, IgnoresMultipleAddressesPerEndpointWhenDisabled) {
testing::ScopedEnvVar env("GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS",
"false");
ClusterLoadAssignment cla;
cla.set_cluster_name("foo");
auto* locality = cla.add_endpoints();
Expand Down
2 changes: 0 additions & 2 deletions test/cpp/end2end/xds/xds_override_host_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,6 @@ TEST_P(OverrideHostTest, TTLSetsMaxAge) {
}

TEST_P(OverrideHostTest, MultipleAddressesPerEndpoint) {
grpc_core::testing::ScopedExperimentalEnvVar env(
"GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS");
// Create 3 backends, but leave backend 0 unstarted.
CreateBackends(3);
StartBackend(1);
Expand Down

0 comments on commit f03ac65

Please sign in to comment.