From a510cf5d4d842eedec02d78a799817e4a8107c09 Mon Sep 17 00:00:00 2001 From: Arjan Singh Bal <46515553+arjan-bal@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:22:22 +0530 Subject: [PATCH] xds, pickfirst: Enable additional addresses in xDS, set new pick_first as default (#8126) --- .github/workflows/coverage.yml | 4 ++-- internal/envconfig/envconfig.go | 6 +++--- internal/envconfig/xds.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ef832ed8cbf0..08a206929b44 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,8 +19,8 @@ jobs: - name: Run coverage run: go test -coverprofile=coverage.out -coverpkg=./... ./... - - name: Run coverage with new pickfirst - run: GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST=true go test -coverprofile=coverage_new_pickfirst.out -coverpkg=./... ./... + - name: Run coverage with old pickfirst + run: GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST=false go test -coverprofile=coverage_old_pickfirst.out -coverpkg=./... ./... - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 diff --git a/internal/envconfig/envconfig.go b/internal/envconfig/envconfig.go index 1e42b6fdc872..9bc13c01c2d9 100644 --- a/internal/envconfig/envconfig.go +++ b/internal/envconfig/envconfig.go @@ -51,10 +51,10 @@ var ( // xDS server in the list of server configs will be used. XDSFallbackSupport = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FALLBACK", true) // NewPickFirstEnabled is set if the new pickfirst leaf policy is to be used - // instead of the exiting pickfirst implementation. This can be enabled by + // instead of the exiting pickfirst implementation. This can be disabled by // setting the environment variable "GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST" - // to "true". - NewPickFirstEnabled = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", false) + // to "false". + NewPickFirstEnabled = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_NEW_PICK_FIRST", true) ) func boolFromEnv(envVar string, def bool) bool { diff --git a/internal/envconfig/xds.go b/internal/envconfig/xds.go index 429f743c8328..2eb97f832b1c 100644 --- a/internal/envconfig/xds.go +++ b/internal/envconfig/xds.go @@ -56,7 +56,7 @@ var ( // XDSDualstackEndpointsEnabled is true if gRPC should read the // "additional addresses" in the xDS endpoint resource. - XDSDualstackEndpointsEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS", false) + XDSDualstackEndpointsEnabled = boolFromEnv("GRPC_EXPERIMENTAL_XDS_DUALSTACK_ENDPOINTS", true) // XDSSystemRootCertsEnabled is true when xDS enabled gRPC clients can use // the system's default root certificates for TLS certificate validation.