Skip to content

Commit

Permalink
xds, pickfirst: Enable additional addresses in xDS, set new pick_firs…
Browse files Browse the repository at this point in the history
…t as default (grpc#8126)
  • Loading branch information
arjan-bal authored Feb 27, 2025
1 parent e9c0617 commit a510cf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions internal/envconfig/envconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/envconfig/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a510cf5

Please sign in to comment.