Skip to content

Commit

Permalink
Reviewer comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yashykt committed Oct 28, 2024
1 parent 499c631 commit 8e57ab8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/core/xds/grpc/xds_client_grpc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ GetStatsPluginGroupForKeyAndChannelArgs(absl::string_view key,
return GlobalStatsPluginRegistry::GetStatsPluginsForServer(channel_args);
}
grpc_event_engine::experimental::ChannelArgsEndpointConfig endpoint_config(
ChannelArgs{});
ChannelArgs{channel_args});
std::string authority =
channel_args.GetOwnedString(GRPC_ARG_DEFAULT_AUTHORITY)
.value_or(
Expand All @@ -250,11 +250,6 @@ absl::StatusOr<RefCountedPtr<GrpcXdsClient>> GrpcXdsClient::GetOrCreate(
// instance for the channel or server instead of using the global instance.
absl::optional<absl::string_view> bootstrap_config = args.GetString(
GRPC_ARG_TEST_ONLY_DO_NOT_USE_IN_PROD_XDS_BOOTSTRAP_CONFIG);
std::string channel_default_authority =
args.GetOwnedString(GRPC_ARG_DEFAULT_AUTHORITY)
.value_or(
CoreConfiguration::Get().resolver_registry().GetDefaultAuthority(
key));
if (bootstrap_config.has_value()) {
auto bootstrap = GrpcXdsBootstrap::Create(*bootstrap_config);
if (!bootstrap.ok()) return bootstrap.status();
Expand Down
10 changes: 8 additions & 2 deletions test/cpp/end2end/xds/xds_core_end2end_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1122,10 +1122,16 @@ class XdsMetricsTest : public XdsEnd2endTest {
[](const grpc_core::experimental::StatsPluginChannelScope&
scope) {
return scope.target() == absl::StrCat("xds:", kServerName) &&
scope.default_authority() == kServerName;
scope.default_authority() == kServerName &&
scope.experimental_args().GetString("test_only.arg") ==
"test_only.value";
})
.BuildAndRegister();
InitClient();
ChannelArguments args;
args.SetString("test_only.arg", "test_only.value");
InitClient(/*builder=*/absl::nullopt, /*lb_expected_authority=*/"",
/*xds_resource_does_not_exist_timeout_ms=*/0,
/*balancer_authority_override=*/"", /*args=*/&args);
}

std::shared_ptr<grpc_core::FakeStatsPlugin> stats_plugin_;
Expand Down

0 comments on commit 8e57ab8

Please sign in to comment.