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: enable XDS federation by default #6151

Merged
merged 3 commits into from Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/envconfig/xds.go
Expand Up @@ -79,7 +79,7 @@ var (
// XDSFederation indicates whether federation support is enabled, which can
// be enabled by setting the environment variable
// "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true".
XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", false)
XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", true)

// XDSRLS indicates whether processing of Cluster Specifier plugins and
// support for the RLS CLuster Specifier is enabled, which can be enabled by
Expand Down
16 changes: 5 additions & 11 deletions xds/internal/xdsclient/xdsresource/name_test.go
Expand Up @@ -92,13 +92,11 @@ func TestParseName(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.env {
defer func() func() {
oldEnv := envconfig.XDSFederation
envconfig.XDSFederation = true
return func() { envconfig.XDSFederation = oldEnv }
}()()
}
defer func() func() {
oldEnv := envconfig.XDSFederation
envconfig.XDSFederation = tt.env
return func() { envconfig.XDSFederation = oldEnv }
}()()
got := ParseName(tt.in)
if !cmp.Equal(got, tt.want, cmpopts.IgnoreFields(Name{}, "processingDirective")) {
t.Errorf("ParseName() = %#v, want %#v", got, tt.want)
Expand All @@ -113,10 +111,6 @@ func TestParseName(t *testing.T) {
// TestNameStringCtxParamsOrder covers the case that if two names differ only in
// context parameter __order__, the parsed name.String() has the same value.
func TestNameStringCtxParamsOrder(t *testing.T) {
oldEnv := envconfig.XDSFederation
envconfig.XDSFederation = true
defer func() { envconfig.XDSFederation = oldEnv }()

const (
a = "xdstp://auth/type/id?a=1&b=2"
b = "xdstp://auth/type/id?b=2&a=1"
Expand Down