Skip to content

Automated fix for refs/heads/test_748704078 #24

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

Open
wants to merge 1 commit into
base: test_748704078
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/config/core_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include <atomic>

#include "absl/functional/any_invocable.h"
#include "absl/log/check.h"
#include "src/core/credentials/transport/channel_creds_registry.h"
#include "src/core/credentials/transport/tls/certificate_provider_registry.h"
#include "src/core/handshaker/handshaker_registry.h"
Expand All @@ -30,8 +32,6 @@
#include "src/core/resolver/resolver_registry.h"
#include "src/core/service_config/service_config_parser.h"
#include "src/core/transport/endpoint_transport.h"
#include "absl/functional/any_invocable.h"
#include "absl/log/check.h"

namespace grpc_core {

Expand Down
28 changes: 14 additions & 14 deletions src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,20 @@ const grpc_channel_filter ServerLoadReportingFilter::kFilter =
// time if we build with the filter target.
struct ServerLoadReportingFilterStaticRegistrar {
ServerLoadReportingFilterStaticRegistrar() {
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
// Access measures to ensure they are initialized. Otherwise, we can't
// create any valid view before the first RPC.
grpc::load_reporter::MeasureStartCount();
grpc::load_reporter::MeasureEndCount();
grpc::load_reporter::MeasureEndBytesSent();
grpc::load_reporter::MeasureEndBytesReceived();
grpc::load_reporter::MeasureEndLatencyMs();
grpc::load_reporter::MeasureOtherCallMetric();
builder->channel_init()
->RegisterFilter<ServerLoadReportingFilter>(GRPC_SERVER_CHANNEL)
.IfChannelArg(GRPC_ARG_ENABLE_LOAD_REPORTING, false);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
// Access measures to ensure they are initialized. Otherwise, we can't
// create any valid view before the first RPC.
grpc::load_reporter::MeasureStartCount();
grpc::load_reporter::MeasureEndCount();
grpc::load_reporter::MeasureEndBytesSent();
grpc::load_reporter::MeasureEndBytesReceived();
grpc::load_reporter::MeasureEndLatencyMs();
grpc::load_reporter::MeasureOtherCallMetric();
builder->channel_init()
->RegisterFilter<ServerLoadReportingFilter>(GRPC_SERVER_CHANNEL)
.IfChannelArg(GRPC_ARG_ENABLE_LOAD_REPORTING, false);
});
}
} server_load_reporting_filter_static_registrar;

Expand Down
22 changes: 11 additions & 11 deletions src/core/ext/filters/logging/logging_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,17 +503,17 @@ const grpc_channel_filter ServerLoggingFilter::kFilter =

void RegisterLoggingFilter(LoggingSink* sink) {
g_logging_sink = sink;
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterV2Filter<ServerLoggingFilter>(GRPC_SERVER_CHANNEL)
// TODO(yashykt) : Figure out a good place to place this channel arg
.IfChannelArg("grpc.experimental.enable_observability", true);
builder->channel_init()
->RegisterV2Filter<ClientLoggingFilter>(GRPC_CLIENT_CHANNEL)
// TODO(yashykt) : Figure out a good place to place this channel arg
.IfChannelArg("grpc.experimental.enable_observability", true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterV2Filter<ServerLoggingFilter>(GRPC_SERVER_CHANNEL)
// TODO(yashykt) : Figure out a good place to place this channel arg
.IfChannelArg("grpc.experimental.enable_observability", true);
builder->channel_init()
->RegisterV2Filter<ClientLoggingFilter>(GRPC_CLIENT_CHANNEL)
// TODO(yashykt) : Figure out a good place to place this channel arg
.IfChannelArg("grpc.experimental.enable_observability", true);
});
}

} // namespace grpc_core
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ grpc_channel_filter FailSendOpsFilter::kFilterVtable = {
};

void RegisterFilter() {
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailSendOpsFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailSendOpsFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
}

CORE_END2END_TEST(RetryTests, RetryCancelWithMultipleSendBatches) {
Expand Down
20 changes: 10 additions & 10 deletions test/core/end2end/tests/retry_lb_drop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ void RegisterDropPolicy(CoreConfiguration::Builder* builder) {
// - first attempt returns UNAVAILABLE due to LB drop but does not retry
CORE_END2END_TEST(RetryTests, RetryLbDrop) {
SKIP_IF_V3(); // Not working yet
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
RegisterTestPickArgsLoadBalancingPolicy(
builder,
[](const PickArgsSeen& pick_args) {
CHECK_NE(g_pick_args_vector, nullptr);
g_pick_args_vector->push_back(pick_args);
},
kDropPolicyName);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
RegisterTestPickArgsLoadBalancingPolicy(
builder,
[](const PickArgsSeen& pick_args) {
CHECK_NE(g_pick_args_vector, nullptr);
g_pick_args_vector->push_back(pick_args);
},
kDropPolicyName);
});
CoreConfiguration::RegisterEphemeralBuilder(RegisterDropPolicy);
std::vector<PickArgsSeen> pick_args_seen;
g_pick_args_vector = &pick_args_seen;
Expand Down
16 changes: 8 additions & 8 deletions test/core/end2end/tests/retry_recv_message_replay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ grpc_channel_filter FailFirstSendOpFilter::kFilterVtable = {
// a grpc_error.
CORE_END2END_TEST(RetryTests, RetryRecvMessageReplay) {
SKIP_IF_V3(); // Need to convert filter
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstSendOpFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstSendOpFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
InitServer(ChannelArgs());
InitClient(ChannelArgs().Set(
GRPC_ARG_SERVICE_CONFIG,
Expand Down
16 changes: 8 additions & 8 deletions test/core/end2end/tests/retry_recv_trailing_metadata_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ grpc_channel_filter InjectStatusFilter::kFilterVtable = {
// so no retry is done
CORE_END2END_TEST(RetryTests, RetryRecvTrailingMetadataError) {
SKIP_IF_V3(); // Need to convert filter
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&InjectStatusFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&InjectStatusFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
InitServer(ChannelArgs());
InitClient(ChannelArgs().Set(
GRPC_ARG_SERVICE_CONFIG,
Expand Down
16 changes: 8 additions & 8 deletions test/core/end2end/tests/retry_send_op_fails.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ grpc_channel_filter FailFirstCallFilter::kFilterVtable = {
// attempts are allowed
CORE_END2END_TEST(RetryTests, RetrySendOpFails) {
SKIP_IF_V3(); // Need to convert filter
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstCallFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstCallFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
InitServer(ChannelArgs());
InitClient(ChannelArgs().Set(
GRPC_ARG_SERVICE_CONFIG,
Expand Down
16 changes: 8 additions & 8 deletions test/core/end2end/tests/retry_transparent_goaway.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ namespace {
// Tests transparent retries when the call was never sent out on the wire.
CORE_END2END_TEST(RetryTests, TransparentGoaway) {
SKIP_IF_V3(); // Need to convert filter
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&testing::FailFirstCallFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&testing::FailFirstCallFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
auto c =
NewClientCall("/service/method").Timeout(Duration::Minutes(1)).Create();
EXPECT_NE(c.GetPeer(), std::nullopt);
Expand Down
16 changes: 8 additions & 8 deletions test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ grpc_channel_filter FailFirstTenCallsFilter::kFilterVtable = {
// Tests transparent retries when the call was never sent out on the wire.
CORE_END2END_TEST(RetryTests, RetryTransparentNotSentOnWire) {
SKIP_IF_V3(); // Need to convert filter
CoreConfiguration::RegisterEphemeralBuilder([](CoreConfiguration::Builder*
builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstTenCallsFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
CoreConfiguration::RegisterEphemeralBuilder(
[](CoreConfiguration::Builder* builder) {
builder->channel_init()
->RegisterFilter(GRPC_CLIENT_SUBCHANNEL,
&FailFirstTenCallsFilter::kFilterVtable)
// Skip on proxy (which explicitly disables retries).
.IfChannelArg(GRPC_ARG_ENABLE_RETRIES, true);
});
auto c =
NewClientCall("/service/method").Timeout(Duration::Minutes(1)).Create();
EXPECT_NE(c.GetPeer(), std::nullopt);
Expand Down