From 2a88a7ed70ef0db0e3f610029d16fda90c1d4f59 Mon Sep 17 00:00:00 2001 From: mohanli-ml Date: Wed, 16 Aug 2023 16:31:18 +0000 Subject: [PATCH] [pick_first] de-experiment pick first --- .../client_channel/lb_policy/pick_first/pick_first.cc | 3 --- src/core/lib/json/json_object_loader.h | 8 +------- test/core/client_channel/lb_policy/pick_first_test.cc | 4 ---- test/core/xds/xds_lb_policy_registry_test.cc | 3 --- test/cpp/end2end/xds/xds_pick_first_end2end_test.cc | 2 -- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc index 4fb40219e06d1..0ad833b559681 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc @@ -82,9 +82,6 @@ class PickFirstConfig : public LoadBalancingPolicy::Config { return kJsonLoader; } - void JsonPostLoad(const Json& /* json */, const JsonArgs& /* args */, - ValidationErrors* /* errors */) {} - private: bool shuffle_addresses_ = false; }; diff --git a/src/core/lib/json/json_object_loader.h b/src/core/lib/json/json_object_loader.h index 45bbc087f9747..c69e3d2253974 100644 --- a/src/core/lib/json/json_object_loader.h +++ b/src/core/lib/json/json_object_loader.h @@ -537,13 +537,7 @@ class FinishedJsonObjectLoader(dst)->JsonPostLoad(json, args, errors); - } - } + ValidationErrors* errors) const override {} private: GPR_NO_UNIQUE_ADDRESS Vec elements_; diff --git a/test/core/client_channel/lb_policy/pick_first_test.cc b/test/core/client_channel/lb_policy/pick_first_test.cc index b375e93f90793..1fb54dbec19d7 100644 --- a/test/core/client_channel/lb_policy/pick_first_test.cc +++ b/test/core/client_channel/lb_policy/pick_first_test.cc @@ -486,8 +486,6 @@ TEST_F(PickFirstTest, GoesIdleWhenConnectionFailsThenCanReconnect) { } TEST_F(PickFirstTest, WithShuffle) { - testing::ScopedExperimentalEnvVar env_var( - "GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); constexpr std::array kAddresses = { "ipv4:127.0.0.1:443", "ipv4:127.0.0.1:444", "ipv4:127.0.0.1:445", "ipv4:127.0.0.1:446", "ipv4:127.0.0.1:447", "ipv4:127.0.0.1:448"}; @@ -516,8 +514,6 @@ TEST_F(PickFirstTest, WithShuffle) { } TEST_F(PickFirstTest, ShufflingDisabled) { - testing::ScopedExperimentalEnvVar env_var( - "GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); constexpr std::array kAddresses = { "ipv4:127.0.0.1:443", "ipv4:127.0.0.1:444", "ipv4:127.0.0.1:445", "ipv4:127.0.0.1:446", "ipv4:127.0.0.1:447", "ipv4:127.0.0.1:448"}; diff --git a/test/core/xds/xds_lb_policy_registry_test.cc b/test/core/xds/xds_lb_policy_registry_test.cc index 7127598d17810..bb45198dfc89f 100644 --- a/test/core/xds/xds_lb_policy_registry_test.cc +++ b/test/core/xds/xds_lb_policy_registry_test.cc @@ -450,7 +450,6 @@ TEST(WrrLocality, UnsupportedChildPolicyTypeSkipped) { // TEST(PickFirst, NoShuffle) { - ScopedExperimentalEnvVar env_var("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); LoadBalancingPolicyProto policy; auto* lb_policy = policy.add_policies(); PickFirst pick_first; @@ -463,7 +462,6 @@ TEST(PickFirst, NoShuffle) { } TEST(PickFirst, Shuffle) { - ScopedExperimentalEnvVar env_var("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); LoadBalancingPolicyProto policy; auto* lb_policy = policy.add_policies(); PickFirst pick_first; @@ -476,7 +474,6 @@ TEST(PickFirst, Shuffle) { } TEST(PickFirst, ShuffleOmitted) { - ScopedExperimentalEnvVar env_var("GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); LoadBalancingPolicyProto policy; auto* lb_policy = policy.add_policies(); lb_policy->mutable_typed_extension_config()->mutable_typed_config()->PackFrom( diff --git a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc index 4344c27a727bc..fedf1e8daf40b 100644 --- a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc @@ -80,8 +80,6 @@ INSTANTIATE_TEST_SUITE_P(XdsTest, PickFirstTest, ::testing::Values(XdsTestType()), &XdsTestType::Name); TEST_P(PickFirstTest, PickFirstConfigurationIsPropagated) { - grpc_core::testing::ScopedExperimentalEnvVar env_var( - "GRPC_EXPERIMENTAL_PICKFIRST_LB_CONFIG"); CreateAndStartBackends(6); // Change cluster to use pick_first with shuffle option. auto cluster = default_cluster_;