From 702608ffae4d03a6821b96d3e2311973d34b96dc Mon Sep 17 00:00:00 2001 From: Doug Fawley Date: Wed, 24 Mar 2021 10:20:16 -0700 Subject: [PATCH] xds: enable timeout, circuit breaking, and fault injection by default (#4286) --- internal/xds/env/env.go | 14 +++++++------- xds/csds/csds_test.go | 11 ++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/internal/xds/env/env.go b/internal/xds/env/env.go index 035b92b18f13..1110722a630b 100644 --- a/internal/xds/env/env.go +++ b/internal/xds/env/env.go @@ -61,16 +61,16 @@ var ( // When both bootstrap FileName and FileContent are set, FileName is used. BootstrapFileContent = os.Getenv(BootstrapFileContentEnv) // CircuitBreakingSupport indicates whether circuit breaking support is - // enabled, which can be done by setting the environment variable - // "GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING" to "true". - CircuitBreakingSupport = strings.EqualFold(os.Getenv(circuitBreakingSupportEnv), "true") + // enabled, which can be disabled by setting the environment variable + // "GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING" to "false". + CircuitBreakingSupport = !strings.EqualFold(os.Getenv(circuitBreakingSupportEnv), "false") // TimeoutSupport indicates whether support for max_stream_duration in - // route actions is enabled. This can be enabled by setting the - // environment variable "GRPC_XDS_EXPERIMENTAL_ENABLE_TIMEOUT" to "true". - TimeoutSupport = strings.EqualFold(os.Getenv(timeoutSupportEnv), "true") + // route actions is enabled. This can be disabled by setting the + // environment variable "GRPC_XDS_EXPERIMENTAL_ENABLE_TIMEOUT" to "false". + TimeoutSupport = !strings.EqualFold(os.Getenv(timeoutSupportEnv), "false") // FaultInjectionSupport is used to control both fault injection and HTTP // filter support. - FaultInjectionSupport = strings.EqualFold(os.Getenv(faultInjectionSupportEnv), "true") + FaultInjectionSupport = !strings.EqualFold(os.Getenv(faultInjectionSupportEnv), "false") // C2PResolverSupport indicates whether support for C2P resolver is enabled. // This can be enabled by setting the environment variable // "GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER" to "true". diff --git a/xds/csds/csds_test.go b/xds/csds/csds_test.go index 856894b4e4d4..2993beea0e5d 100644 --- a/xds/csds/csds_test.go +++ b/xds/csds/csds_test.go @@ -25,11 +25,6 @@ import ( "testing" "time" - v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3" - v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" - v3clusterpb "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" - v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" - v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" @@ -39,14 +34,20 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/internal/xds" "google.golang.org/grpc/xds/internal/client" + _ "google.golang.org/grpc/xds/internal/httpfilter/router" "google.golang.org/grpc/xds/internal/testutils" "google.golang.org/grpc/xds/internal/testutils/e2e" "google.golang.org/protobuf/testing/protocmp" "google.golang.org/protobuf/types/known/anypb" "google.golang.org/protobuf/types/known/timestamppb" + v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3" + v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" + v3clusterpb "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3" v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" + v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3" v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" + v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3" )