From 2395bb1b866d7943813fb630d69e1fbadeb10708 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 28 May 2024 12:53:34 -0700 Subject: [PATCH 01/20] [xDS] fix "tls" channel cred in bootstrap to actually work (#36726) This fixes a fairly embarrassing bug and lack of testing from #33234. Prior to this fix, attempting to use the "tls" creds type would always cause a crash. @gtcooke94 @matthewstevenson88 Note that the root cause of this bug was that when I wrote this code, I assumed that `grpc_tls_credentials_options` had a reasonable default for the cert verifier. But it turns out that it doesn't do that directly; instead, we are only imposing that default in [`CredentialOptionSanityCheck()`](https://github.com/grpc/grpc/blob/621aa4e5ce5a1ac93a31439adcec00e301206072/src/core/lib/security/credentials/tls/tls_credentials.cc#L85), which is called only when we call [`grpc_tls_credentials_create()`](https://github.com/grpc/grpc/blob/621aa4e5ce5a1ac93a31439adcec00e301206072/src/core/lib/security/credentials/tls/tls_credentials.cc#L160), not when we directly instantiate `TlsCredentials` as my code was doing. As part of the TlsCreds API cleanup you're working on, we should fix this so that callers get the right behavior even if they are internal callers that instantiate the TlsCreds object directly rather than calling the C-core API. Closes #36726 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36726 from markdroth:xds_bootstrap_mtls_creds_fix dac2789e104a7cdc22efbfe5be0a4da4a4ad13a1 PiperOrigin-RevId: 637993734 --- doc/grpc_xds_features.md | 2 +- .../channel_creds_registry_init.cc | 2 ++ test/cpp/end2end/xds/BUILD | 5 ++++ test/cpp/end2end/xds/xds_core_end2end_test.cc | 28 +++++++++++++++++++ test/cpp/end2end/xds/xds_end2end_test_lib.cc | 28 ++++++++++++++++++- test/cpp/end2end/xds/xds_end2end_test_lib.h | 18 +++++++++++- test/cpp/end2end/xds/xds_utils.cc | 7 ++++- test/cpp/end2end/xds/xds_utils.h | 5 +++- 8 files changed, 90 insertions(+), 5 deletions(-) diff --git a/doc/grpc_xds_features.md b/doc/grpc_xds_features.md index b6f33ea59fe..16ac26214bd 100644 --- a/doc/grpc_xds_features.md +++ b/doc/grpc_xds_features.md @@ -77,5 +77,5 @@ Aggregate Cluster Behavior Fixes | [A75](https://github.com/grpc/proposal/blob/m Pick First | [A62](https://github.com/grpc/proposal/blob/master/A62-pick-first.md) | v1.58.0 | v1.58.1 | v1.56.0 | | [StringMatcher for Header Matching](https://github.com/envoyproxy/envoy/blob/3fe4b8d335fa339ef6f17325c8d31f87ade7bb1a/api/envoy/config/route/v3/route_components.proto#L2280) | [A63](https://github.com/grpc/proposal/blob/master/A63-xds-string-matcher-in-header-matching.md) | v1.56.0 | v1.53.0 | v1.56.0 | v1.9.0 | LRS Custom Metrics Support | [A64](https://github.com/grpc/proposal/blob/master/A64-lrs-custom-metrics.md) | v1.54.0 | | | | -mTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.57.0 | | v1.61.0 | | +mTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.65.0 | | v1.61.0 | | Stateful Session Affinity | [A55](https://github.com/grpc/proposal/blob/master/A55-xds-stateful-session-affinity.md), [A60](https://github.com/grpc/proposal/blob/master/A60-xds-stateful-session-affinity-weighted-clusters.md), [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | | diff --git a/src/core/lib/security/credentials/channel_creds_registry_init.cc b/src/core/lib/security/credentials/channel_creds_registry_init.cc index 9b7a0e04372..832daba1284 100644 --- a/src/core/lib/security/credentials/channel_creds_registry_init.cc +++ b/src/core/lib/security/credentials/channel_creds_registry_init.cc @@ -96,6 +96,8 @@ class TlsChannelCredsFactory : public ChannelCredsFactory<> { } options->set_watch_root_cert(!config->ca_certificate_file().empty()); options->set_watch_identity_pair(!config->certificate_file().empty()); + options->set_certificate_verifier( + MakeRefCounted()); return MakeRefCounted(std::move(options)); } diff --git a/test/cpp/end2end/xds/BUILD b/test/cpp/end2end/xds/BUILD index 15afd38eb26..2a66bca252c 100644 --- a/test/cpp/end2end/xds/BUILD +++ b/test/cpp/end2end/xds/BUILD @@ -216,6 +216,11 @@ grpc_cc_test( name = "xds_core_end2end_test", size = "large", srcs = ["xds_core_end2end_test.cc"], + data = [ + "//src/core/tsi/test_creds:ca.pem", + "//src/core/tsi/test_creds:server1.key", + "//src/core/tsi/test_creds:server1.pem", + ], external_deps = [ "gtest", ], diff --git a/test/cpp/end2end/xds/xds_core_end2end_test.cc b/test/cpp/end2end/xds/xds_core_end2end_test.cc index abc1d20cf06..6b8fcd43482 100644 --- a/test/cpp/end2end/xds/xds_core_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_core_end2end_test.cc @@ -160,6 +160,34 @@ TEST_P(XdsClientTest, XdsStreamErrorPropagation) { ::testing::HasSubstr("(node ID:xds_end2end_test)")); } +// +// XdsServerTlsTest: xDS server using TlsCreds +// + +class XdsServerTlsTest : public XdsEnd2endTest { + protected: + void SetUp() override { + InitClient(MakeBootstrapBuilder().SetXdsChannelCredentials( + "tls", absl::StrCat("{\"ca_certificate_file\": \"", + kCaCertPath, "\"}")), + /*lb_expected_authority=*/"", + /*xds_resource_does_not_exist_timeout_ms=*/0, + /*balancer_authority_override=*/"foo.test.google.fr"); + } +}; + +INSTANTIATE_TEST_SUITE_P( + XdsTest, XdsServerTlsTest, + ::testing::Values(XdsTestType().set_xds_server_uses_tls_creds(true)), + &XdsTestType::Name); + +TEST_P(XdsServerTlsTest, Basic) { + CreateAndStartBackends(1); + EdsResourceArgs args({{"locality0", CreateEndpointsForBackends()}}); + balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); + CheckRpcSendOk(DEBUG_LOCATION); +} + // // GlobalXdsClientTest - tests that need to run with a global XdsClient // (this is the default in production) diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.cc b/test/cpp/end2end/xds/xds_end2end_test_lib.cc index 08d305c2a8a..f9e884650fe 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.cc +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.cc @@ -318,6 +318,26 @@ XdsEnd2endTest::BalancerServerThread::BalancerServerThread( }, debug_label)) {} +std::shared_ptr +XdsEnd2endTest::BalancerServerThread::Credentials() { + if (GetParam().xds_server_uses_tls_creds()) { + std::string identity_cert = + grpc_core::testing::GetFileContents(kServerCertPath); + std::string private_key = + grpc_core::testing::GetFileContents(kServerKeyPath); + std::vector identity_key_cert_pairs = { + {private_key, identity_cert}}; + auto certificate_provider = + std::make_shared( + identity_key_cert_pairs); + grpc::experimental::TlsServerCredentialsOptions options( + certificate_provider); + options.watch_identity_key_cert_pairs(); + return grpc::experimental::TlsServerCredentials(options); + } + return ServerThread::Credentials(); +} + void XdsEnd2endTest::BalancerServerThread::RegisterAllServices( ServerBuilder* builder) { builder->RegisterService(ads_service_.get()); @@ -490,7 +510,8 @@ std::vector XdsEnd2endTest::GetBackendPorts(size_t start_index, void XdsEnd2endTest::InitClient(absl::optional builder, std::string lb_expected_authority, - int xds_resource_does_not_exist_timeout_ms) { + int xds_resource_does_not_exist_timeout_ms, + std::string balancer_authority_override) { if (!builder.has_value()) { builder = MakeBootstrapBuilder(); } @@ -509,6 +530,11 @@ void XdsEnd2endTest::InitClient(absl::optional builder, const_cast(GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS), const_cast(lb_expected_authority.c_str()))); } + if (!balancer_authority_override.empty()) { + xds_channel_args_to_add_.emplace_back(grpc_channel_arg_string_create( + const_cast(GRPC_ARG_DEFAULT_AUTHORITY), + const_cast(balancer_authority_override.c_str()))); + } xds_channel_args_.num_args = xds_channel_args_to_add_.size(); xds_channel_args_.args = xds_channel_args_to_add_.data(); bootstrap_ = builder->Build(); diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.h b/test/cpp/end2end/xds/xds_end2end_test_lib.h index 7ac0474a9f4..c16aa278d1b 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.h +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.h @@ -115,6 +115,11 @@ class XdsTestType { return *this; } + XdsTestType& set_xds_server_uses_tls_creds(bool value) { + xds_server_uses_tls_creds_ = value; + return *this; + } + bool enable_load_reporting() const { return enable_load_reporting_; } bool enable_rds_testing() const { return enable_rds_testing_; } bool use_xds_credentials() const { return use_xds_credentials_; } @@ -130,6 +135,7 @@ class XdsTestType { rbac_audit_condition() const { return rbac_audit_condition_; } + bool xds_server_uses_tls_creds() const { return xds_server_uses_tls_creds_; } std::string AsString() const { std::string retval = "V3"; @@ -158,6 +164,9 @@ class XdsTestType { RBAC_AuditLoggingOptions_AuditCondition_Name( rbac_audit_condition_)); } + if (xds_server_uses_tls_creds_) { + retval += "XdsServerUsesTlsCreds"; + } return retval; } @@ -178,6 +187,7 @@ class XdsTestType { ::envoy::config::rbac::v3::RBAC_AuditLoggingOptions_AuditCondition rbac_audit_condition_ = ::envoy::config::rbac::v3:: RBAC_AuditLoggingOptions_AuditCondition_NONE; + bool xds_server_uses_tls_creds_ = false; }; // A base class for xDS end-to-end tests. @@ -412,6 +422,11 @@ class XdsEnd2endTest : public ::testing::TestWithParam, AdsServiceImpl* ads_service() { return ads_service_.get(); } LrsServiceImpl* lrs_service() { return lrs_service_.get(); } + // If XdsTestType::xds_server_uses_tls_creds() is true, + // returns TlsServerCredentials. + // Otherwise, returns fake credentials. + std::shared_ptr Credentials() override; + private: const char* Type() override { return "Balancer"; } void RegisterAllServices(ServerBuilder* builder) override; @@ -578,7 +593,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // All tests must call this exactly once at the start of the test. void InitClient(absl::optional builder = absl::nullopt, std::string lb_expected_authority = "", - int xds_resource_does_not_exist_timeout_ms = 0); + int xds_resource_does_not_exist_timeout_ms = 0, + std::string balancer_authority_override = ""); XdsBootstrapBuilder MakeBootstrapBuilder() { return XdsBootstrapBuilder().SetServers( diff --git a/test/cpp/end2end/xds/xds_utils.cc b/test/cpp/end2end/xds/xds_utils.cc index f70ca9b9ccd..6a45d81b8a0 100644 --- a/test/cpp/end2end/xds/xds_utils.cc +++ b/test/cpp/end2end/xds/xds_utils.cc @@ -84,7 +84,7 @@ std::string XdsBootstrapBuilder::MakeXdsServersText( " \"server_uri\": \"\",\n" " \"channel_creds\": [\n" " {\n" - " \"type\": \"\"\n" + " \"type\": \"\"\n" " }\n" " ],\n" " \"server_features\": []\n" @@ -99,6 +99,11 @@ std::string XdsBootstrapBuilder::MakeXdsServersText( kXdsServerTemplate, {{"", server_uri}, {"", xds_channel_creds_type_}, + {"", + xds_channel_creds_config_.empty() + ? "" + : absl::StrCat(",\n \"config\": ", + xds_channel_creds_config_)}, {"", absl::StrJoin(server_features, ", ")}})); } return absl::StrCat(" \"xds_servers\": [\n", diff --git a/test/cpp/end2end/xds/xds_utils.h b/test/cpp/end2end/xds/xds_utils.h index 10b552ea62c..6fb0d33b341 100644 --- a/test/cpp/end2end/xds/xds_utils.h +++ b/test/cpp/end2end/xds/xds_utils.h @@ -43,8 +43,10 @@ class XdsBootstrapBuilder { servers_ = std::vector(servers.begin(), servers.end()); return *this; } - XdsBootstrapBuilder& SetXdsChannelCredentials(const std::string& type) { + XdsBootstrapBuilder& SetXdsChannelCredentials( + const std::string& type, const std::string& config = "") { xds_channel_creds_type_ = type; + xds_channel_creds_config_ = config; return *this; } XdsBootstrapBuilder& SetClientDefaultListenerResourceNameTemplate( @@ -100,6 +102,7 @@ class XdsBootstrapBuilder { bool ignore_resource_deletion_ = false; std::vector servers_; std::string xds_channel_creds_type_ = "fake"; + std::string xds_channel_creds_config_; std::string client_default_listener_resource_name_template_; std::map plugins_; std::map authorities_; From 33017551bb635a7d6e8edbbac08b861068bad19c Mon Sep 17 00:00:00 2001 From: Vishwanath Sastry Date: Tue, 28 May 2024 13:23:46 -0700 Subject: [PATCH 02/20] Adding id for grpc access (#36391) Closes #36391 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36391 from sastryvp:add_id_to_grpc_maintainers 8f20baed621049ddd5924db92aa1ae31ad4a35be PiperOrigin-RevId: 638003273 --- MAINTAINERS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 5c36c24f156..3fefae1797b 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -31,6 +31,7 @@ for general contribution guidelines. - [pfreixes](https://github.com/pfreixes), Skyscanner Ltd - [ran-su](https://github.com/ran-su), Google LLC - [sanjaypujare](https://github.com/sanjaypujare), Google LLC +- [sastryvp](https://github.com/sastryvp), Google LLC - [sergiitk](https://github.com/sergiitk), Google LLC - [soheilhy](https://github.com/soheilhy), Google LLC - [stanley-cheung](https://github.com/stanley-cheung), Google LLC From cd074cc0b55f554cc2f7d336c2d02dd69783ae4a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 28 May 2024 13:45:08 -0700 Subject: [PATCH 03/20] [chttp2] Fix use after free on shutdown (#36743) Closes #36743 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36743 from ctiller:msanity 41edce0dc2cc9388eb474dd079fd946e83cd56fd PiperOrigin-RevId: 638010575 --- .../transport/chttp2/server/chttp2_server.cc | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 3388e234fd9..77645c06871 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -474,23 +474,18 @@ void Chttp2ServerListener::ActiveConnection::HandshakingState::OnHandshakeDone( // handshaker may have handed off the connection to some external // code, so we can just clean up here without creating a transport. if (args->endpoint != nullptr) { - Transport* transport = - grpc_create_chttp2_transport(args->args, args->endpoint, false); + RefCountedPtr transport = + grpc_create_chttp2_transport(args->args, args->endpoint, false) + ->Ref(); grpc_error_handle channel_init_err = self->connection_->listener_->server_->SetupTransport( - transport, self->accepting_pollset_, args->args, - grpc_chttp2_transport_get_socket_node(transport)); + transport.get(), self->accepting_pollset_, args->args, + grpc_chttp2_transport_get_socket_node(transport.get())); if (channel_init_err.ok()) { // Use notify_on_receive_settings callback to enforce the // handshake deadline. - // Note: The reinterpret_cast<>s here are safe, because - // grpc_chttp2_transport is a C-style extension of - // Transport, so this is morally equivalent of a - // static_cast<> to a derived class. - // TODO(roth): Change to static_cast<> when we C++-ify the - // transport API. self->connection_->transport_ = - reinterpret_cast(transport)->Ref(); + DownCast(transport.get())->Ref(); self->Ref().release(); // Held by OnReceiveSettings(). GRPC_CLOSURE_INIT(&self->on_receive_settings_, OnReceiveSettings, self, grpc_schedule_on_exec_ctx); @@ -520,9 +515,9 @@ void Chttp2ServerListener::ActiveConnection::HandshakingState::OnHandshakeDone( grpc_schedule_on_exec_ctx_); cleanup_connection = true; } - grpc_chttp2_transport_start_reading(transport, args->read_buffer, - &self->on_receive_settings_, - on_close); + grpc_chttp2_transport_start_reading( + transport.get(), args->read_buffer, &self->on_receive_settings_, + on_close); self->timer_handle_ = self->connection_->event_engine_->RunAfter( self->deadline_ - Timestamp::Now(), [self = self->Ref()]() mutable { From ca8db3b26455dd1c549ae28fad06dbf4fe4212b3 Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Tue, 28 May 2024 16:40:03 -0700 Subject: [PATCH 04/20] [build] Update Gazelle bazel dependency (#36745) Closes #36745 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36745 from drfloob:update-gazelle 4fba6f7b09ea4c367c4f355ef3c10b2d16c96785 PiperOrigin-RevId: 638067497 --- bazel/grpc_deps.bzl | 6 +++--- bazel/grpc_extra_deps.bzl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index d0099ab6163..f3920abb2ef 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -406,10 +406,10 @@ def grpc_deps(): if "bazel_gazelle" not in native.existing_rules(): http_archive( name = "bazel_gazelle", - sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", + sha256 = "d76bf7a60fd8b050444090dfa2837a4eaf9829e1165618ee35dceca5cbdf58d5", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz", ], ) diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl index eb3c3fc29c5..a370fe44966 100644 --- a/bazel/grpc_extra_deps.bzl +++ b/bazel/grpc_extra_deps.bzl @@ -52,7 +52,7 @@ def grpc_extra_deps(ignore_version_differences = False): api_dependencies() go_rules_dependencies() - go_register_toolchains(version = "1.18") + go_register_toolchains(version = "1.20") gazelle_dependencies() # Pull-in the go 3rd party dependencies for protoc_gen_validate, which is From a7283ac6fe06ff50b5c7ebaf77b55ac7d9406a19 Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Tue, 28 May 2024 16:48:13 -0700 Subject: [PATCH 05/20] [EventEngine] Disable Windows client (#36744) Rare endpoint shutdown races identified, about 1 in 10k tests have issues. Closes #36744 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36744 from drfloob:ugh 65a053fc1309ce7fa87e81d6953b4599431cde6b PiperOrigin-RevId: 638070081 --- bazel/experiments.bzl | 10 ++++++---- src/core/lib/experiments/experiments.cc | 2 +- src/core/lib/experiments/experiments.h | 3 +-- src/core/lib/experiments/rollouts.yaml | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index e3aeb05464d..053677378a6 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -57,10 +57,16 @@ EXPERIMENTS = { "dbg": { }, "off": { + "core_end2end_test": [ + "event_engine_client", + ], "endpoint_test": [ "tcp_frame_size_tuning", "tcp_rcv_lowat", ], + "event_engine_client_test": [ + "event_engine_client", + ], "flow_control_test": [ "multiping", "peer_state_based_framing", @@ -78,15 +84,11 @@ EXPERIMENTS = { "event_engine_dns", ], "core_end2end_test": [ - "event_engine_client", "event_engine_listener", ], "cpp_lb_end2end_test": [ "pick_first_new", ], - "event_engine_client_test": [ - "event_engine_client", - ], "event_engine_listener_test": [ "event_engine_listener", ], diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index 468884ec583..f54990cac18 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -326,7 +326,7 @@ const ExperimentMetadata g_experiment_metadata[] = { {"client_privacy", description_client_privacy, additional_constraints_client_privacy, nullptr, 0, false, false}, {"event_engine_client", description_event_engine_client, - additional_constraints_event_engine_client, nullptr, 0, true, true}, + additional_constraints_event_engine_client, nullptr, 0, false, true}, {"event_engine_dns", description_event_engine_dns, additional_constraints_event_engine_dns, nullptr, 0, true, false}, {"event_engine_listener", description_event_engine_listener, diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 9e3ba9148ba..999ee24a8ed 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -97,8 +97,7 @@ inline bool IsCallStatusOverrideOnCancellationEnabled() { return true; } inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } -#define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_CLIENT -inline bool IsEventEngineClientEnabled() { return true; } +inline bool IsEventEngineClientEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_DNS inline bool IsEventEngineDnsEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_EVENT_ENGINE_LISTENER diff --git a/src/core/lib/experiments/rollouts.yaml b/src/core/lib/experiments/rollouts.yaml index 7187f8c2952..65d35a1bd4e 100644 --- a/src/core/lib/experiments/rollouts.yaml +++ b/src/core/lib/experiments/rollouts.yaml @@ -58,7 +58,7 @@ # not tested on iOS at all ios: broken posix: false - windows: true + windows: false - name: event_engine_dns default: # not tested on iOS at all From 7a131420ded3203f935dfca0d1666fc9ea484a54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 17:23:46 -0700 Subject: [PATCH 06/20] Bump requests from 2.31.0 to 2.32.2 in /tools/internal_ci/helper_scripts (#36681) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.2.
Release notes

Sourced from requests's releases.

v2.32.2

2.32.2 (2024-05-21)

Deprecations

  • To provide a more stable migration for custom HTTPAdapters impacted by the CVE changes in 2.32.0, we've renamed _get_connection to a new public API, get_connection_with_tls_context. Existing custom HTTPAdapters will need to migrate their code to use this new API. get_connection is considered deprecated in all versions of Requests>=2.32.0.

    A minimal (2-line) example has been provided in the linked PR to ease migration, but we strongly urge users to evaluate if their custom adapter is subject to the same issue described in CVE-2024-35195. (#6710)

v2.32.1

2.32.1 (2024-05-20)

Bugfixes

  • Add missing test certs to the sdist distributed on PyPI.

v2.32.0

2.32.0 (2024-05-20)

🐍 PYCON US 2024 EDITION 🐍

Security

Improvements

  • verify=True now reuses a global SSLContext which should improve request time variance between first and subsequent requests. It should also minimize certificate load time on Windows systems when using a Python version built with OpenSSL 3.x. (#6667)
  • Requests now supports optional use of character detection (chardet or charset_normalizer) when repackaged or vendored. This enables pip and other projects to minimize their vendoring surface area. The Response.text() and apparent_encoding APIs will default to utf-8 if neither library is present. (#6702)

Bugfixes

  • Fixed bug in length detection where emoji length was incorrectly calculated in the request content-length. (#6589)
  • Fixed deserialization bug in JSONDecodeError. (#6629)
  • Fixed bug where an extra leading / (path separator) could lead urllib3 to unnecessarily reparse the request URI. (#6644)

... (truncated)

Changelog

Sourced from requests's changelog.

2.32.2 (2024-05-21)

Deprecations

  • To provide a more stable migration for custom HTTPAdapters impacted by the CVE changes in 2.32.0, we've renamed _get_connection to a new public API, get_connection_with_tls_context. Existing custom HTTPAdapters will need to migrate their code to use this new API. get_connection is considered deprecated in all versions of Requests>=2.32.0.

    A minimal (2-line) example has been provided in the linked PR to ease migration, but we strongly urge users to evaluate if their custom adapter is subject to the same issue described in CVE-2024-35195. (#6710)

2.32.1 (2024-05-20)

Bugfixes

  • Add missing test certs to the sdist distributed on PyPI.

2.32.0 (2024-05-20)

Security

Improvements

  • verify=True now reuses a global SSLContext which should improve request time variance between first and subsequent requests. It should also minimize certificate load time on Windows systems when using a Python version built with OpenSSL 3.x. (#6667)
  • Requests now supports optional use of character detection (chardet or charset_normalizer) when repackaged or vendored. This enables pip and other projects to minimize their vendoring surface area. The Response.text() and apparent_encoding APIs will default to utf-8 if neither library is present. (#6702)

Bugfixes

  • Fixed bug in length detection where emoji length was incorrectly calculated in the request content-length. (#6589)
  • Fixed deserialization bug in JSONDecodeError. (#6629)
  • Fixed bug where an extra leading / (path separator) could lead urllib3 to unnecessarily reparse the request URI. (#6644)

Deprecations

... (truncated)

Commits
  • 88dce9d v2.32.2
  • c98e4d1 Merge pull request #6710 from nateprewitt/api_rename
  • 92075b3 Add deprecation warning
  • aa1461b Move _get_connection to get_connection_with_tls_context
  • 970e8ce v2.32.1
  • d6ebc4a v2.32.0
  • 9a40d12 Avoid reloading root certificates to improve concurrent performance (#6667)
  • 0c030f7 Merge pull request #6702 from nateprewitt/no_char_detection
  • 555b870 Allow character detection dependencies to be optional in post-packaging steps
  • d6dded3 Merge pull request #6700 from franekmagiera/update-redirect-to-invalid-uri-test
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=requests&package-manager=pip&previous-version=2.31.0&new-version=2.32.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/grpc/grpc/network/alerts).
Closes #36681 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36681 from grpc:dependabot/pip/tools/internal_ci/helper_scripts/requests-2.32.2 c7600bdbee5cd18d749a18dfca055e86ca7f0113 PiperOrigin-RevId: 638081350 --- tools/internal_ci/helper_scripts/requirements.linux_perf.txt | 2 +- tools/internal_ci/helper_scripts/requirements.macos.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/internal_ci/helper_scripts/requirements.linux_perf.txt b/tools/internal_ci/helper_scripts/requirements.linux_perf.txt index 57e1a0c48c1..f1c954d5b39 100644 --- a/tools/internal_ci/helper_scripts/requirements.linux_perf.txt +++ b/tools/internal_ci/helper_scripts/requirements.linux_perf.txt @@ -1,5 +1,5 @@ cryptography==3.4.6 PyJWT==2.0.1 -requests==2.31.0 +requests==2.32.2 scipy==1.5.4 tabulate==0.8.9 diff --git a/tools/internal_ci/helper_scripts/requirements.macos.txt b/tools/internal_ci/helper_scripts/requirements.macos.txt index 190bf328634..59a759b0ce2 100644 --- a/tools/internal_ci/helper_scripts/requirements.macos.txt +++ b/tools/internal_ci/helper_scripts/requirements.macos.txt @@ -3,4 +3,4 @@ cryptography==3.4.6 PyJWT==2.0.1 pyOpenSSL==20.0.1 PyYAML==6.0 -requests==2.31.0 +requests==2.32.2 From a88ee9ef99a975f284ece55b9aa0bb7beacdd7ed Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 28 May 2024 19:39:23 -0700 Subject: [PATCH 07/20] [http2] Add experiment to modify behavior of GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA to throttle pings instead of blocking (#36374) Implements https://github.com/grpc/proposal/pull/429 Currently, the behavior of `GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA` blocks more pings from being sent if we are sending too many pings without a data/header frame being sent as well. The original intention of this channel arg was to play nice with proxies that have restrictive settings when it comes to pings. This causes awkwardness when configuring keepalive pings for transports with long lived streams with sparse communication. In such a case, gRPC Core would stop sending keepalive pings since no data/header frame is being sent, resulting in a situation where we are unable to detect whether the transport is alive or not. This change adds an experiment "max_pings_wo_data_throttle" to modify the behavior of `GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA` to throttle pings to a frequency of 1 minute instead of completely blocking pings when too many pings have been sent without data/header frames. Closes #36374 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36374 from yashykt:ThrottlePings b5bd42a019b7744777da8e1ac9b6d6f3e90e1ae9 PiperOrigin-RevId: 638110795 --- bazel/experiments.bzl | 1 + include/grpc/impl/channel_arg_names.h | 8 ++-- .../chttp2/transport/ping_rate_policy.cc | 42 +++++++++++++------ .../chttp2/transport/ping_rate_policy.h | 9 ++-- src/core/lib/experiments/experiments.cc | 24 +++++++++++ src/core/lib/experiments/experiments.h | 8 ++++ src/core/lib/experiments/experiments.yaml | 8 ++++ src/core/lib/experiments/rollouts.yaml | 2 + test/core/end2end/tests/bad_ping.cc | 3 ++ .../transport/chttp2/ping_rate_policy_test.cc | 35 ++++++++++++++++ 10 files changed, 120 insertions(+), 20 deletions(-) diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 053677378a6..7b41b29566a 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -28,6 +28,7 @@ EXPERIMENT_ENABLES = { "http2_stats_fix": "http2_stats_fix", "keepalive_fix": "keepalive_fix", "keepalive_server_fix": "keepalive_server_fix", + "max_pings_wo_data_throttle": "max_pings_wo_data_throttle", "monitoring_experiment": "monitoring_experiment", "multiping": "multiping", "peer_state_based_framing": "peer_state_based_framing", diff --git a/include/grpc/impl/channel_arg_names.h b/include/grpc/impl/channel_arg_names.h index 663e9620a34..efd380b8681 100644 --- a/include/grpc/impl/channel_arg_names.h +++ b/include/grpc/impl/channel_arg_names.h @@ -111,9 +111,11 @@ "grpc.server_max_unrequested_time_in_server" /** Channel arg to override the http2 :scheme header */ #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" -/** How many pings can the client send before needing to send a - data/header frame? (0 indicates that an infinite number of - pings can be sent without sending a data frame or header frame) */ +/** How many pings can the client send before needing to send a data/header + frame? (0 indicates that an infinite number of pings can be sent without + sending a data frame or header frame). + If experiment "max_pings_wo_data_throttle" is enabled, instead of pings being + completely blocked, they are throttled. */ #define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \ "grpc.http2.max_pings_without_data" /** How many misbehaving pings the server can bear before sending goaway and diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc index fed8ca20371..143b08a67c7 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc @@ -35,16 +35,18 @@ namespace grpc_core { namespace { -int g_default_max_pings_without_data = 2; +int g_default_max_pings_without_data_sent = 2; +constexpr Duration kThrottleIntervalWithoutDataSent = Duration::Minutes(1); absl::optional g_default_max_inflight_pings; } // namespace Chttp2PingRatePolicy::Chttp2PingRatePolicy(const ChannelArgs& args, bool is_client) - : max_pings_without_data_( + : max_pings_without_data_sent_( is_client - ? std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA) - .value_or(g_default_max_pings_without_data)) + ? std::max(0, + args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA) + .value_or(g_default_max_pings_without_data_sent)) : 0), // Configuration via channel arg dominates, otherwise if the multiping // experiment is enabled we use 100, otherwise 1. @@ -54,18 +56,15 @@ Chttp2PingRatePolicy::Chttp2PingRatePolicy(const ChannelArgs& args, IsMultipingEnabled() ? 100 : 1)))) {} void Chttp2PingRatePolicy::SetDefaults(const ChannelArgs& args) { - g_default_max_pings_without_data = + g_default_max_pings_without_data_sent = std::max(0, args.GetInt(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA) - .value_or(g_default_max_pings_without_data)); + .value_or(g_default_max_pings_without_data_sent)); g_default_max_inflight_pings = args.GetInt(GRPC_ARG_HTTP2_MAX_INFLIGHT_PINGS); } Chttp2PingRatePolicy::RequestSendPingResult Chttp2PingRatePolicy::RequestSendPing(Duration next_allowed_ping_interval, size_t inflight_pings) const { - if (max_pings_without_data_ != 0 && pings_before_data_required_ == 0) { - return TooManyRecentPings{}; - } if (max_inflight_pings_ > 0 && inflight_pings > static_cast(max_inflight_pings_)) { return TooManyRecentPings{}; @@ -77,12 +76,29 @@ Chttp2PingRatePolicy::RequestSendPing(Duration next_allowed_ping_interval, return TooSoon{next_allowed_ping_interval, last_ping_sent_time_, next_allowed_ping - now}; } + // Throttle pings to 1 minute if we haven't sent any data recently + if (max_pings_without_data_sent_ != 0 && + pings_before_data_sending_required_ == 0) { + if (IsMaxPingsWoDataThrottleEnabled()) { + const Timestamp next_allowed_ping = + last_ping_sent_time_ + kThrottleIntervalWithoutDataSent; + if (next_allowed_ping > now) { + return TooSoon{kThrottleIntervalWithoutDataSent, last_ping_sent_time_, + next_allowed_ping - now}; + } + } else { + return TooManyRecentPings{}; + } + } + return SendGranted{}; } void Chttp2PingRatePolicy::SentPing() { last_ping_sent_time_ = Timestamp::Now(); - if (pings_before_data_required_) --pings_before_data_required_; + if (pings_before_data_sending_required_ > 0) { + --pings_before_data_sending_required_; + } } void Chttp2PingRatePolicy::ReceivedDataFrame() { @@ -90,13 +106,13 @@ void Chttp2PingRatePolicy::ReceivedDataFrame() { } void Chttp2PingRatePolicy::ResetPingsBeforeDataRequired() { - pings_before_data_required_ = max_pings_without_data_; + pings_before_data_sending_required_ = max_pings_without_data_sent_; } std::string Chttp2PingRatePolicy::GetDebugString() const { return absl::StrCat( - "max_pings_without_data: ", max_pings_without_data_, - ", pings_before_data_required: ", pings_before_data_required_, + "max_pings_without_data: ", max_pings_without_data_sent_, + ", pings_before_data_required: ", pings_before_data_sending_required_, ", last_ping_sent_time_: ", last_ping_sent_time_.ToString()); } diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h index b9501686d95..6dab7a361bc 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h @@ -70,13 +70,14 @@ class Chttp2PingRatePolicy { void ReceivedDataFrame(); std::string GetDebugString() const; - int TestOnlyMaxPingsWithoutData() const { return max_pings_without_data_; } + int TestOnlyMaxPingsWithoutData() const { + return max_pings_without_data_sent_; + } private: - const int max_pings_without_data_; + const int max_pings_without_data_sent_; const int max_inflight_pings_; - // No pings allowed before receiving a header or data frame. - int pings_before_data_required_ = 0; + int pings_before_data_sending_required_ = 0; Timestamp last_ping_sent_time_ = Timestamp::InfPast(); }; diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index f54990cac18..b4ba5bdba89 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -59,6 +59,11 @@ const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer " "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; +const char* const description_max_pings_wo_data_throttle = + "Experiment to throttle pings to a period of 1 min when " + "GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA limit has reached (instead of " + "completely blocking)."; +const char* const additional_constraints_max_pings_wo_data_throttle = "{}"; const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; @@ -157,6 +162,9 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_keepalive_fix, nullptr, 0, false, false}, {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"max_pings_wo_data_throttle", description_max_pings_wo_data_throttle, + additional_constraints_max_pings_wo_data_throttle, nullptr, 0, false, + true}, {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, {"multiping", description_multiping, additional_constraints_multiping, @@ -241,6 +249,11 @@ const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer " "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; +const char* const description_max_pings_wo_data_throttle = + "Experiment to throttle pings to a period of 1 min when " + "GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA limit has reached (instead of " + "completely blocking)."; +const char* const additional_constraints_max_pings_wo_data_throttle = "{}"; const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; @@ -339,6 +352,9 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_keepalive_fix, nullptr, 0, false, false}, {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"max_pings_wo_data_throttle", description_max_pings_wo_data_throttle, + additional_constraints_max_pings_wo_data_throttle, nullptr, 0, false, + true}, {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, {"multiping", description_multiping, additional_constraints_multiping, @@ -423,6 +439,11 @@ const char* const description_keepalive_server_fix = "Allows overriding keepalive_permit_without_calls for servers. Refer " "https://github.com/grpc/grpc/pull/33917 for more information."; const char* const additional_constraints_keepalive_server_fix = "{}"; +const char* const description_max_pings_wo_data_throttle = + "Experiment to throttle pings to a period of 1 min when " + "GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA limit has reached (instead of " + "completely blocking)."; +const char* const additional_constraints_max_pings_wo_data_throttle = "{}"; const char* const description_monitoring_experiment = "Placeholder experiment to prove/disprove our monitoring is working"; const char* const additional_constraints_monitoring_experiment = "{}"; @@ -521,6 +542,9 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_keepalive_fix, nullptr, 0, false, false}, {"keepalive_server_fix", description_keepalive_server_fix, additional_constraints_keepalive_server_fix, nullptr, 0, false, false}, + {"max_pings_wo_data_throttle", description_max_pings_wo_data_throttle, + additional_constraints_max_pings_wo_data_throttle, nullptr, 0, false, + true}, {"monitoring_experiment", description_monitoring_experiment, additional_constraints_monitoring_experiment, nullptr, 0, true, true}, {"multiping", description_multiping, additional_constraints_multiping, diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 999ee24a8ed..50dc88d8269 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -70,6 +70,7 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; } inline bool IsHttp2StatsFixEnabled() { return true; } inline bool IsKeepaliveFixEnabled() { return false; } inline bool IsKeepaliveServerFixEnabled() { return false; } +inline bool IsMaxPingsWoDataThrottleEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT inline bool IsMonitoringExperimentEnabled() { return true; } inline bool IsMultipingEnabled() { return false; } @@ -107,6 +108,7 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; } inline bool IsHttp2StatsFixEnabled() { return true; } inline bool IsKeepaliveFixEnabled() { return false; } inline bool IsKeepaliveServerFixEnabled() { return false; } +inline bool IsMaxPingsWoDataThrottleEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT inline bool IsMonitoringExperimentEnabled() { return true; } inline bool IsMultipingEnabled() { return false; } @@ -144,6 +146,7 @@ inline bool IsFreeLargeAllocatorEnabled() { return false; } inline bool IsHttp2StatsFixEnabled() { return true; } inline bool IsKeepaliveFixEnabled() { return false; } inline bool IsKeepaliveServerFixEnabled() { return false; } +inline bool IsMaxPingsWoDataThrottleEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT inline bool IsMonitoringExperimentEnabled() { return true; } inline bool IsMultipingEnabled() { return false; } @@ -180,6 +183,7 @@ enum ExperimentIds { kExperimentIdHttp2StatsFix, kExperimentIdKeepaliveFix, kExperimentIdKeepaliveServerFix, + kExperimentIdMaxPingsWoDataThrottle, kExperimentIdMonitoringExperiment, kExperimentIdMultiping, kExperimentIdPeerStateBasedFraming, @@ -242,6 +246,10 @@ inline bool IsKeepaliveFixEnabled() { inline bool IsKeepaliveServerFixEnabled() { return IsExperimentEnabled(kExperimentIdKeepaliveServerFix); } +#define GRPC_EXPERIMENT_IS_INCLUDED_MAX_PINGS_WO_DATA_THROTTLE +inline bool IsMaxPingsWoDataThrottleEnabled() { + return IsExperimentEnabled(kExperimentIdMaxPingsWoDataThrottle); +} #define GRPC_EXPERIMENT_IS_INCLUDED_MONITORING_EXPERIMENT inline bool IsMonitoringExperimentEnabled() { return IsExperimentEnabled(kExperimentIdMonitoringExperiment); diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index 4d1a27e4d3c..f26fc02f27e 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -120,6 +120,14 @@ owner: yashkt@google.com test_tags: [] allow_in_fuzzing_config: false +- name: max_pings_wo_data_throttle + description: + Experiment to throttle pings to a period of 1 min when + GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA limit has reached (instead of + completely blocking). + expiry: 2024/12/31 + owner: yashkt@google.com + test_tags: [] - name: monitoring_experiment description: Placeholder experiment to prove/disprove our monitoring is working expiry: never-ever diff --git a/src/core/lib/experiments/rollouts.yaml b/src/core/lib/experiments/rollouts.yaml index 65d35a1bd4e..fe679a5718e 100644 --- a/src/core/lib/experiments/rollouts.yaml +++ b/src/core/lib/experiments/rollouts.yaml @@ -79,6 +79,8 @@ default: false - name: keepalive_server_fix default: false +- name: max_pings_wo_data_throttle + default: false - name: monitoring_experiment default: true - name: peer_state_based_framing diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc index 1aa247e46e3..51a799549b2 100644 --- a/test/core/end2end/tests/bad_ping.cc +++ b/test/core/end2end/tests/bad_ping.cc @@ -87,6 +87,9 @@ CORE_END2END_TEST(RetryHttp2Test, BadPing) { // Try sending more pings than server allows, but server should be fine because // max_pings_without_data should limit pings sent out on wire. CORE_END2END_TEST(RetryHttp2Test, PingsWithoutData) { + if (IsMaxPingsWoDataThrottleEnabled()) { + GTEST_SKIP() << "pings are not limited if this experiment is enabled"; + } // Only allow MAX_PING_STRIKES pings without data (DATA/HEADERS/WINDOW_UPDATE) // so that the transport will throttle the excess pings. InitClient(ChannelArgs() diff --git a/test/core/transport/chttp2/ping_rate_policy_test.cc b/test/core/transport/chttp2/ping_rate_policy_test.cc index be443468bc9..46ddd0501fd 100644 --- a/test/core/transport/chttp2/ping_rate_policy_test.cc +++ b/test/core/transport/chttp2/ping_rate_policy_test.cc @@ -19,6 +19,8 @@ #include "gtest/gtest.h" +#include "src/core/lib/experiments/experiments.h" + namespace grpc_core { namespace { @@ -47,6 +49,10 @@ TEST(PingRatePolicy, ServerCanSendAtStart) { } TEST(PingRatePolicy, ClientBlockedUntilDataSent) { + if (IsMaxPingsWoDataThrottleEnabled()) { + GTEST_SKIP() + << "Pings are not blocked if max_pings_wo_data_throttle is enabled."; + } Chttp2PingRatePolicy policy{ChannelArgs(), true}; EXPECT_EQ(policy.RequestSendPing(Duration::Milliseconds(10), 0), TooManyRecentPings()); @@ -59,6 +65,35 @@ TEST(PingRatePolicy, ClientBlockedUntilDataSent) { EXPECT_EQ(policy.RequestSendPing(Duration::Zero(), 0), TooManyRecentPings()); } +TEST(PingRatePolicy, ClientThrottledUntilDataSent) { + if (!IsMaxPingsWoDataThrottleEnabled()) { + GTEST_SKIP() + << "Throttling behavior is enabled with max_pings_wo_data_throttle."; + } + Chttp2PingRatePolicy policy{ChannelArgs(), true}; + // First ping is allowed. + EXPECT_EQ(policy.RequestSendPing(Duration::Milliseconds(10), 0), + SendGranted()); + policy.SentPing(); + // Second ping is throttled since no data has been sent. + auto result = policy.RequestSendPing(Duration::Zero(), 0); + EXPECT_TRUE(absl::holds_alternative(result)); + EXPECT_EQ(absl::get(result).wait, + Duration::Minutes(1)); + policy.ResetPingsBeforeDataRequired(); + // After resetting pings before data required (data sent), we can send pings + // without being throttled. + EXPECT_EQ(policy.RequestSendPing(Duration::Zero(), 0), SendGranted()); + policy.SentPing(); + EXPECT_EQ(policy.RequestSendPing(Duration::Zero(), 0), SendGranted()); + policy.SentPing(); + // After reaching limit, we are throttled again. + result = policy.RequestSendPing(Duration::Zero(), 0); + EXPECT_TRUE(absl::holds_alternative(result)); + EXPECT_EQ(absl::get(result).wait, + Duration::Minutes(1)); +} + TEST(PingRatePolicy, RateThrottlingWorks) { Chttp2PingRatePolicy policy{ChannelArgs(), false}; // Observe that we can fail if we send in a tight loop From c495d2aa1f8d4222910cdf8e29c7ac50db6ebf94 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 29 May 2024 09:33:20 -0700 Subject: [PATCH 08/20] [CSM] Stop using xDS enabled server for CSM observability tests (#36725) Closes #36725 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36725 from yashykt:RemoveXdsEnabledServerFromCsmInterop 91f3120f078068979274881bc02b7cd5905c61e5 PiperOrigin-RevId: 638313782 --- test/cpp/interop/xds_interop_server.cc | 7 +++---- test/cpp/interop/xds_interop_server_lib.cc | 16 ++++++---------- test/cpp/interop/xds_interop_server_lib.h | 5 ++--- test/cpp/interop/xds_interop_server_test.cc | 5 ++--- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/test/cpp/interop/xds_interop_server.cc b/test/cpp/interop/xds_interop_server.cc index ecb951e64c0..09553cb82b6 100644 --- a/test/cpp/interop/xds_interop_server.cc +++ b/test/cpp/interop/xds_interop_server.cc @@ -86,10 +86,9 @@ int main(int argc, char** argv) { if (enable_csm_observability) { observability = EnableCsmObservability(); } - grpc::testing::RunServer(absl::GetFlag(FLAGS_secure_mode), - enable_csm_observability, port, maintenance_port, - hostname, absl::GetFlag(FLAGS_server_id), - [](grpc::Server* /* unused */) {}); + grpc::testing::RunServer( + absl::GetFlag(FLAGS_secure_mode), port, maintenance_port, hostname, + absl::GetFlag(FLAGS_server_id), [](grpc::Server* /* unused */) {}); return 0; } diff --git a/test/cpp/interop/xds_interop_server_lib.cc b/test/cpp/interop/xds_interop_server_lib.cc index d1ee23381af..6a4202ff9fa 100644 --- a/test/cpp/interop/xds_interop_server_lib.cc +++ b/test/cpp/interop/xds_interop_server_lib.cc @@ -226,9 +226,8 @@ absl::optional GetStatusForRpcBehaviorMetadata( return absl::nullopt; } -void RunServer(bool secure_mode, bool enable_csm_observability, int port, - const int maintenance_port, absl::string_view hostname, - absl::string_view server_id, +void RunServer(bool secure_mode, int port, const int maintenance_port, + absl::string_view hostname, absl::string_view server_id, const std::function& server_callback) { std::unique_ptr xds_enabled_server; std::unique_ptr server; @@ -252,14 +251,11 @@ void RunServer(bool secure_mode, bool enable_csm_observability, int port, .BuildAndStart(); LOG(INFO) << "Maintenance server listening on 0.0.0.0:" << maintenance_port; } else { - // CSM Observability requires an xDS enabled server. - auto builder = enable_csm_observability - ? std::make_unique() - : std::make_unique(); - maintenance_services.AddToServerBuilder(builder.get()); + ServerBuilder builder; + maintenance_services.AddToServerBuilder(&builder); server = builder - ->AddListeningPort(absl::StrCat("0.0.0.0:", port), - grpc::InsecureServerCredentials()) + .AddListeningPort(absl::StrCat("0.0.0.0:", port), + grpc::InsecureServerCredentials()) .RegisterService(&service) .BuildAndStart(); LOG(INFO) << "Server listening on 0.0.0.0:" << port; diff --git a/test/cpp/interop/xds_interop_server_lib.h b/test/cpp/interop/xds_interop_server_lib.h index 4b196d02fa9..01e0b6185b9 100644 --- a/test/cpp/interop/xds_interop_server_lib.h +++ b/test/cpp/interop/xds_interop_server_lib.h @@ -30,9 +30,8 @@ namespace testing { absl::optional GetStatusForRpcBehaviorMetadata( absl::string_view header_value, absl::string_view hostname); -void RunServer(bool secure_mode, bool enable_csm_observability, int port, - const int maintenance_port, absl::string_view hostname, - absl::string_view server_id, +void RunServer(bool secure_mode, int port, const int maintenance_port, + absl::string_view hostname, absl::string_view server_id, const std::function& server_callback); } // namespace testing diff --git a/test/cpp/interop/xds_interop_server_test.cc b/test/cpp/interop/xds_interop_server_test.cc index 50f8196b202..479bf9125c3 100644 --- a/test/cpp/interop/xds_interop_server_test.cc +++ b/test/cpp/interop/xds_interop_server_test.cc @@ -37,9 +37,8 @@ namespace { void ServerLoop(int port, grpc_core::Mutex* mutex, grpc_core::CondVar* condition, Server** server) { - RunServer(false, /*enable_csm_observability=*/false, port, - /* should not be used */ -1, "127.0.0.1", "test_server", - [&](Server* s) { + RunServer(false, port, /* should not be used */ -1, "127.0.0.1", + "test_server", [&](Server* s) { grpc_core::MutexLock lock(mutex); *server = s; condition->Signal(); From ecdb5caf831dfb46c59e89efe018782a64687220 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Wed, 29 May 2024 10:42:59 -0700 Subject: [PATCH 09/20] [BoringSSL] Update third_party/boringssl-with-bazel (#36716) Change was created by the release automation script. See go/grpc-release. Closes #36716 PiperOrigin-RevId: 638337588 --- BoringSSL-Package.swift | 1 + Makefile | 1 + bazel/grpc_deps.bzl | 8 +- config.m4 | 2 + config.w32 | 2 + gRPC-Core.podspec | 2 +- grpc.gemspec | 4 +- package.xml | 4 +- src/boringssl/boringssl_prefix_symbols.h | 20 +- src/objective-c/BoringSSL-GRPC.podspec | 1033 +++++++++-------- src/python/grpcio/grpc_core_dependencies.py | 1 + templates/gRPC-Core.podspec.template | 2 +- .../BoringSSL-GRPC.podspec.template | 2 +- third_party/boringssl-with-bazel | 2 +- tools/run_tests/sanity/check_submodules.sh | 2 +- 15 files changed, 554 insertions(+), 532 deletions(-) diff --git a/BoringSSL-Package.swift b/BoringSSL-Package.swift index 8a4f6a6d639..1300fb1aec7 100644 --- a/BoringSSL-Package.swift +++ b/BoringSSL-Package.swift @@ -104,6 +104,7 @@ let package = Package( "src/crypto/dh_extra/dh_asn1.c", "src/crypto/dh_extra/params.c", "src/crypto/digest_extra/digest_extra.c", + "src/crypto/dilithium/dilithium.c", "src/crypto/dsa/dsa.c", "src/crypto/dsa/dsa_asn1.c", "src/crypto/ec_extra/ec_asn1.c", diff --git a/Makefile b/Makefile index 0cc5cc6a80b..5517ead7d7f 100644 --- a/Makefile +++ b/Makefile @@ -1935,6 +1935,7 @@ LIBBORINGSSL_SRC = \ third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c \ third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c \ third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c \ + third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c \ third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c \ third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c \ third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c \ diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f3920abb2ef..caa68583f6d 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -190,11 +190,11 @@ def grpc_deps(): name = "boringssl", # Use github mirror instead of https://boringssl.googlesource.com/boringssl # to obtain a boringssl archive with consistent sha256 - sha256 = "c4cccc0ea8b149d2853da77254655c0d5a5739dd4bbdff9a5b586c06a627de6c", - strip_prefix = "boringssl-5a2bca2124800f2861263959b72bc35cdf18949b", + sha256 = "9f441d72fccb9a3faf96470478c8ccfaaeb8db1cffd4d78b698f782124dad1b0", + strip_prefix = "boringssl-b8a2bffc598f230484ff48a247526a9820facfc2", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/5a2bca2124800f2861263959b72bc35cdf18949b.tar.gz", - "https://github.com/google/boringssl/archive/5a2bca2124800f2861263959b72bc35cdf18949b.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz", + "https://github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz", ], ) diff --git a/config.m4 b/config.m4 index 804c3aa0de5..ce630228f2f 100644 --- a/config.m4 +++ b/config.m4 @@ -1112,6 +1112,7 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c \ third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c \ third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c \ + third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c \ third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c \ third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c \ third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c \ @@ -1652,6 +1653,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/des) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/dh_extra) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/digest_extra) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/dilithium) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/dsa) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/ec_extra) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/ecdh_extra) diff --git a/config.w32 b/config.w32 index 9bf2bf2d20d..12b8e9df346 100644 --- a/config.w32 +++ b/config.w32 @@ -1077,6 +1077,7 @@ if (PHP_GRPC != "no") { "third_party\\boringssl-with-bazel\\src\\crypto\\dh_extra\\dh_asn1.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\dh_extra\\params.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\digest_extra\\digest_extra.c " + + "third_party\\boringssl-with-bazel\\src\\crypto\\dilithium\\dilithium.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\dsa\\dsa.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\dsa\\dsa_asn1.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\ec_extra\\ec_asn1.c " + @@ -1805,6 +1806,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\des"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\dh_extra"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\digest_extra"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\dilithium"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\dsa"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\ec_extra"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\ecdh_extra"); diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 410e0f9095a..e07e1a3dd80 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -199,7 +199,7 @@ Pod::Spec.new do |s| ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Privacy", version - ss.dependency 'BoringSSL-GRPC', '0.0.34' + ss.dependency 'BoringSSL-GRPC', '0.0.35' ss.dependency 'abseil/algorithm/container', abseil_version ss.dependency 'abseil/base/base', abseil_version ss.dependency 'abseil/base/config', abseil_version diff --git a/grpc.gemspec b/grpc.gemspec index 26c0f1f1f31..a940ee87cae 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -2517,7 +2517,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/conf/conf.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/conf/conf_def.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/conf/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_apple.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_fuchsia.c ) @@ -2540,6 +2539,8 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/dilithium/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/dsa/internal.h ) @@ -2860,6 +2861,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/evp.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/evp_errors.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/ex_data.h ) + s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/experimental/dilithium.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/experimental/kyber.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/experimental/spx.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/hkdf.h ) diff --git a/package.xml b/package.xml index eda4309713c..1cd837a3efe 100644 --- a/package.xml +++ b/package.xml @@ -2521,7 +2521,6 @@ - @@ -2544,6 +2543,8 @@ + + @@ -2864,6 +2865,7 @@ + diff --git a/src/boringssl/boringssl_prefix_symbols.h b/src/boringssl/boringssl_prefix_symbols.h index 3255f889966..faa1bc2ad47 100644 --- a/src/boringssl/boringssl_prefix_symbols.h +++ b/src/boringssl/boringssl_prefix_symbols.h @@ -1,4 +1,4 @@ -// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: 5a2bca2124800f2861263959b72bc35cdf18949b +// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: b8a2bffc598f230484ff48a247526a9820facfc2 // Copyright (c) 2018, Google Inc. // @@ -1344,6 +1344,15 @@ #define DH_size BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DH_size) #define DH_up_ref BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DH_up_ref) #define DHparams_dup BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DHparams_dup) +#define DILITHIUM_generate_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_generate_key) +#define DILITHIUM_generate_key_external_entropy BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_generate_key_external_entropy) +#define DILITHIUM_marshal_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_marshal_private_key) +#define DILITHIUM_marshal_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_marshal_public_key) +#define DILITHIUM_parse_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_parse_private_key) +#define DILITHIUM_parse_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_parse_public_key) +#define DILITHIUM_sign BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_sign) +#define DILITHIUM_sign_deterministic BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_sign_deterministic) +#define DILITHIUM_verify BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DILITHIUM_verify) #define DIRECTORYSTRING_free BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DIRECTORYSTRING_free) #define DIRECTORYSTRING_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DIRECTORYSTRING_it) #define DIRECTORYSTRING_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, DIRECTORYSTRING_new) @@ -2697,11 +2706,9 @@ #define X509_STORE_load_locations BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_load_locations) #define X509_STORE_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_new) #define X509_STORE_set1_param BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set1_param) -#define X509_STORE_set_check_crl BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_check_crl) #define X509_STORE_set_default_paths BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_default_paths) #define X509_STORE_set_depth BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_depth) #define X509_STORE_set_flags BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_flags) -#define X509_STORE_set_get_crl BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_get_crl) #define X509_STORE_set_purpose BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_purpose) #define X509_STORE_set_trust BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_trust) #define X509_STORE_set_verify_cb BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_STORE_set_verify_cb) @@ -2957,19 +2964,22 @@ #define bn_mont_ctx_set_RR_consttime BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mont_ctx_set_RR_consttime) #define bn_mont_n0 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mont_n0) #define bn_mul4x_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul4x_mont) +#define bn_mul4x_mont_gather5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul4x_mont_gather5) #define bn_mul_add_words BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_add_words) #define bn_mul_comba4 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_comba4) #define bn_mul_comba8 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_comba8) #define bn_mul_consttime BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_consttime) #define bn_mul_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_mont) -#define bn_mul_mont_gather5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_mont_gather5) +#define bn_mul_mont_gather5_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_mont_gather5_nohw) #define bn_mul_mont_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_mont_nohw) #define bn_mul_small BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_small) #define bn_mul_words BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mul_words) #define bn_mulx4x_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mulx4x_mont) +#define bn_mulx4x_mont_gather5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_mulx4x_mont_gather5) #define bn_odd_number_is_obviously_composite BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_odd_number_is_obviously_composite) #define bn_one_to_montgomery BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_one_to_montgomery) -#define bn_power5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_power5) +#define bn_power5_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_power5_nohw) +#define bn_powerx5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_powerx5) #define bn_rand_range_words BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_rand_range_words) #define bn_rand_secret_range BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_rand_secret_range) #define bn_reduce_once BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, bn_reduce_once) diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index 34bb565a76f..50267fefd64 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -39,7 +39,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.34' + version = '0.0.35' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: @@ -76,7 +76,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/google/boringssl.git', - :commit => "5a2bca2124800f2861263959b72bc35cdf18949b", + :commit => "b8a2bffc598f230484ff48a247526a9820facfc2", } s.ios.deployment_target = '10.0' @@ -177,520 +177,521 @@ Pod::Spec.new do |s| *) opts="--ignore-garbage" ;; esac base64 --decode $opts < src/include/openssl/boringssl_prefix_symbols.h - H4sICAAAAAAC/2JvcmluZ3NzbF9wcmVmaXhfc3ltYm9scy5oALS9XXPbuJaofT+/wnXm5kzVrpnY6WSn - 3zvFVjqaOLZHUvp0zg2LkiCLOxSpEJRj968/AEmJ+FgL5FrwW7VrpmPpeRYFgPgiCPzXf108ikJUaS02 - F6uX8z+SVVllxaOUeXKoxDZ7TnYi3YjqP+XuoiwuPjafLha3F+tyv8/q/+/iXXq1WqdXl1e/fXjzZnv1 - 4f3l1fu3v7/7ffVP9fe379ab7eWH33/7ffVv//Zf/3VxXR5equxxV1/87/V/XFy9ufzwj4s/yvIxFxez - Yv2f6iv6Ww+i2mdSZipeXV4cpfiHinZ4+cfFvtxkW/X/02LzX2V1sclkXWWrYy0u6l0mL2S5rX+llbjY - qg/T4kW7DsfqUEpx8Sur1Q+omv9fHuuLrRAXCtmJSuhfX6WFSoh/XByq8inbqCSpd2mt/o+4SFflk9Cm - 9fnai7LO1kJfRRv30F/v6aPDQaTVRVZcpHmuyUzI069bfp5eLO4/Lf/PZD69mC0uHub3f85upjcX/2uy - UP/+XxeTu5vmS5Nvy8/384ub2eL6djL7uriY3N5eKGo+uVvOpgvt+j+z5eeL+fSPyVwh94pSvt59d337 - 7WZ290cDzr4+3M5UlF5wcf9JO75O59ef1V8mH2e3s+X3Jvyn2fJuulj8p3Jc3N1fTP+c3i0vFp+1x7iy - j9OL29nk4+304pP61+Tuu9YtHqbXs8ntP9R1z6fXy38oxem/1Jeu7+8W0//5pnTqOxc3k6+TP/SFNPTp - n80P+zxZLu5V3Ln6eYtvt0v9Mz7N779e3N4v9JVffFtMVYzJcqJplYbqkhf/UNxUXeBcX/dE/e96Obu/ - 0z4FqNDL+URfx930j9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kMwAMpT5X5XXxkp9qhbQbjiqg + bYFDze8Cj9FuVWfW0uoSgrwDVxbzmtb+VovyrjKPpxusevtD+C5iMcU+F11XN3sB+Kb0qAqsFiqqFwr+ + Nqno29TqfrFgyV6oI4mrFgPNcUjHdcuAZkGkp2QBECMn+auW4sxxSEdkEU4gI3lIPzSQkTxw4U2sDKn4 + krhQRxIfUP6XrIRz7nxE+V+0Bs65VV7+E6vfnBseUP6XrENz7sTLP7ECzbmAl39i7VlwYTwZq+vbdnc/ + 4hBfHQhBybSI6iK9Au69KyqVb9+2t30wi6GhMGIO/XN2311jfyxTIJwghC7gXhdPFLJEOcA8vZl3vNpA + dZQSU+xbrojYjnhifwqPafpkT2m6XtlXyLFhnohimXbENiPokX4JBOXTPXVPZvKsy3CDSZskP68gP5Pk + Z3sefaG76oIMd9UUfWydzAk4OHvSpsnQAdosYIGHOTpqtY+BzHipc3E6oQdqz5NI1+UnqHoiijW00Cc/ + EkZMeFHqJ3tS2/WK2oLn2oY6gng7m3cQFI9A7dBfvvz217PdD2rXAYxtpbJ7qhd7JBi+03Uptu15lWPn + Qifs9FYsH/PPYAK/st6b6SvblylO+7bX954hK5JAu1yXryJ7fRl5wO96c6ijXUxs5vihiNksIPCwC+UH + +8uRvgei+1KCa0xN6z18wtxJ6nPNrHhW53WHfL4DXUQcv7va7lB9glBXGnHtZ8tMy1aNqoGpe0Ye89tm + N84fnotB3wsbhPrIQT8VfHA1IY24p7Y9qvxUH6u8bJRNA4gnCH//2/8B6aN0mKHQBAA= EOF # PrivacyInfo.xcprivacy is not part of BoringSSL repo, inject it during pod installation diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 6db04ed62fe..f38b2571f6d 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -1076,6 +1076,7 @@ CORE_SOURCE_FILES = [ 'third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c', 'third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c', 'third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c', + 'third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c', 'third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c', 'third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c', 'third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c', diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 57716758103..f0bf5460f02 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -199,7 +199,7 @@ ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Privacy", version - ss.dependency 'BoringSSL-GRPC', '0.0.34' + ss.dependency 'BoringSSL-GRPC', '0.0.35' % for abseil_spec in grpc_abseil_specs: ss.dependency '${abseil_spec}', abseil_version % endfor diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template index 3e2f2c38f12..2c7a26e1721 100644 --- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template +++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template @@ -70,7 +70,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.34' + version = '0.0.35' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel index 5a2bca21248..b8a2bffc598 160000 --- a/third_party/boringssl-with-bazel +++ b/third_party/boringssl-with-bazel @@ -1 +1 @@ -Subproject commit 5a2bca2124800f2861263959b72bc35cdf18949b +Subproject commit b8a2bffc598f230484ff48a247526a9820facfc2 diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 23ca962847a..46a50b714bc 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -28,7 +28,7 @@ cat <"$want_submodules" third_party/abseil-cpp 4a2c63365eff8823a5221db86ef490e828306f9d third_party/benchmark 344117638c8ff7e239044fd0fa7085839fc03021 third_party/bloaty 60209eb1ccc34d5deefb002d1b7f37545204f7f2 -third_party/boringssl-with-bazel 5a2bca2124800f2861263959b72bc35cdf18949b +third_party/boringssl-with-bazel b8a2bffc598f230484ff48a247526a9820facfc2 third_party/cares/cares 6360e96b5cf8e5980c887ce58ef727e53d77243a third_party/envoy-api 78f198cf96ecdc7120ef640406770aa01af775c4 third_party/googleapis 2f9af297c84c55c8b871ba4495e01ade42476c92 From db2d775ffcb860956276b4db2e036632e108a0b0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 29 May 2024 11:39:22 -0700 Subject: [PATCH 10/20] [reorg] move src/core/lib/http -> src/core/util/http_client (#36710) Closes #36710 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36710 from markdroth:reorg_httpcli 6c751e34b21b1a24bad260ff06493edac37b21f9 PiperOrigin-RevId: 638358691 --- BUILD | 12 ++++---- CMakeLists.txt | 14 +++++----- Makefile | 8 +++--- Package.swift | 16 +++++------ build_autogenerated.yaml | 28 +++++++++---------- config.m4 | 10 +++---- config.w32 | 10 +++---- gRPC-C++.podspec | 16 +++++------ gRPC-Core.podspec | 24 ++++++++-------- grpc.gemspec | 16 +++++------ package.xml | 16 +++++------ src/core/BUILD | 4 +-- src/core/ext/gcp/metadata_query.h | 4 +-- .../chttp2/transport/chttp2_transport.cc | 2 +- .../http_connect/http_connect_handshaker.cc | 4 +-- .../aws_external_account_credentials.cc | 2 +- .../aws_external_account_credentials.h | 4 +-- .../external/external_account_credentials.cc | 4 +-- .../external/external_account_credentials.h | 4 +-- .../url_external_account_credentials.cc | 4 +-- .../url_external_account_credentials.h | 2 +- .../google_default_credentials.cc | 4 +-- .../security/credentials/jwt/jwt_verifier.cc | 6 ++-- .../credentials/oauth2/oauth2_credentials.cc | 2 +- .../credentials/oauth2/oauth2_credentials.h | 4 +-- .../http_client}/format_request.cc | 7 +++-- .../http_client}/format_request.h | 11 ++++---- .../{lib/http => util/http_client}/httpcli.cc | 9 +++--- .../{lib/http => util/http_client}/httpcli.h | 11 ++++---- .../httpcli_security_connector.cc | 3 +- .../http_client}/httpcli_ssl_credentials.h | 9 +++--- .../{lib/http => util/http_client}/parser.cc | 5 ++-- .../{lib/http => util/http_client}/parser.h | 9 +++--- src/python/grpcio/grpc_core_dependencies.py | 8 +++--- .../end2end/fixtures/http_proxy_fixture.cc | 2 +- test/core/http/format_request_test.cc | 4 +-- test/core/http/httpcli_test.cc | 2 +- test/core/http/httpscli_test.cc | 6 ++-- test/core/http/parser_test.cc | 2 +- test/core/http/request_fuzzer.cc | 2 +- test/core/http/response_fuzzer.cc | 2 +- test/core/security/credentials_test.cc | 4 +-- test/core/security/jwt_verifier_test.cc | 2 +- test/core/test_util/port_server_client.cc | 4 +-- tools/doxygen/Doxyfile.c++.internal | 16 +++++------ tools/doxygen/Doxyfile.core.internal | 16 +++++------ 46 files changed, 181 insertions(+), 173 deletions(-) rename src/core/{lib/http => util/http_client}/format_request.cc (97%) rename src/core/{lib/http => util/http_client}/format_request.h (86%) rename src/core/{lib/http => util/http_client}/httpcli.cc (99%) rename src/core/{lib/http => util/http_client}/httpcli.h (98%) rename src/core/{lib/http => util/http_client}/httpcli_security_connector.cc (99%) rename src/core/{lib/http => util/http_client}/httpcli_ssl_credentials.h (85%) rename src/core/{lib/http => util/http_client}/parser.cc (99%) rename src/core/{lib/http => util/http_client}/parser.h (96%) diff --git a/BUILD b/BUILD index 79ee22f7510..20b7ed8e86f 100644 --- a/BUILD +++ b/BUILD @@ -3915,14 +3915,14 @@ grpc_cc_library( grpc_cc_library( name = "httpcli", srcs = [ - "//src/core:lib/http/format_request.cc", - "//src/core:lib/http/httpcli.cc", - "//src/core:lib/http/parser.cc", + "//src/core:util/http_client/format_request.cc", + "//src/core:util/http_client/httpcli.cc", + "//src/core:util/http_client/parser.cc", ], hdrs = [ - "//src/core:lib/http/format_request.h", - "//src/core:lib/http/httpcli.h", - "//src/core:lib/http/parser.h", + "//src/core:util/http_client/format_request.h", + "//src/core:util/http_client/httpcli.h", + "//src/core:util/http_client/parser.h", ], external_deps = [ "absl/base:core_headers", diff --git a/CMakeLists.txt b/CMakeLists.txt index f2d496b08b4..3f5c39bfda8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2303,10 +2303,6 @@ add_library(grpc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/windows/directory_reader.cc src/core/lib/gprpp/work_serializer.cc - src/core/lib/http/format_request.cc - src/core/lib/http/httpcli.cc - src/core/lib/http/httpcli_security_connector.cc - src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -2596,6 +2592,10 @@ add_library(grpc src/core/tsi/ssl_transport_security_utils.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/http_client/format_request.cc + src/core/util/http_client/httpcli.cc + src/core/util/http_client/httpcli_security_connector.cc + src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_util.cc @@ -3094,9 +3094,6 @@ add_library(grpc_unsecure src/core/lib/gprpp/uuid_v4.cc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/work_serializer.cc - src/core/lib/http/format_request.cc - src/core/lib/http/httpcli.cc - src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -3314,6 +3311,9 @@ add_library(grpc_unsecure src/core/tsi/local_transport_security.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/http_client/format_request.cc + src/core/util/http_client/httpcli.cc + src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_writer.cc diff --git a/Makefile b/Makefile index 5517ead7d7f..2171dd14b33 100644 --- a/Makefile +++ b/Makefile @@ -1162,10 +1162,6 @@ LIBGRPC_SRC = \ src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ - src/core/lib/http/format_request.cc \ - src/core/lib/http/httpcli.cc \ - src/core/lib/http/httpcli_security_connector.cc \ - src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -1458,6 +1454,10 @@ LIBGRPC_SRC = \ src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ + src/core/util/http_client/format_request.cc \ + src/core/util/http_client/httpcli.cc \ + src/core/util/http_client/httpcli_security_connector.cc \ + src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ diff --git a/Package.swift b/Package.swift index 75efbc101c2..6f315ad9c90 100644 --- a/Package.swift +++ b/Package.swift @@ -1317,14 +1317,6 @@ let package = Package( "src/core/lib/gprpp/work_serializer.cc", "src/core/lib/gprpp/work_serializer.h", "src/core/lib/gprpp/xxhash_inline.h", - "src/core/lib/http/format_request.cc", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.cc", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/httpcli_security_connector.cc", - "src/core/lib/http/httpcli_ssl_credentials.h", - "src/core/lib/http/parser.cc", - "src/core/lib/http/parser.h", "src/core/lib/iomgr/block_annotate.h", "src/core/lib/iomgr/buffer_list.cc", "src/core/lib/iomgr/buffer_list.h", @@ -1917,6 +1909,14 @@ let package = Package( "src/core/util/alloc.h", "src/core/util/android/log.cc", "src/core/util/atm.cc", + "src/core/util/http_client/format_request.cc", + "src/core/util/http_client/format_request.h", + "src/core/util/http_client/httpcli.cc", + "src/core/util/http_client/httpcli.h", + "src/core/util/http_client/httpcli_security_connector.cc", + "src/core/util/http_client/httpcli_ssl_credentials.h", + "src/core/util/http_client/parser.cc", + "src/core/util/http_client/parser.h", "src/core/util/iphone/cpu.cc", "src/core/util/json/json.h", "src/core/util/json/json_args.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 5dea7e76ab5..b2a80770454 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -907,10 +907,6 @@ libs: - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h - src/core/lib/gprpp/xxhash_inline.h - - src/core/lib/http/format_request.h - - src/core/lib/http/httpcli.h - - src/core/lib/http/httpcli_ssl_credentials.h - - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -1206,6 +1202,10 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/http_client/format_request.h + - src/core/util/http_client/httpcli.h + - src/core/util/http_client/httpcli_ssl_credentials.h + - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -1724,10 +1724,6 @@ libs: - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/windows/directory_reader.cc - src/core/lib/gprpp/work_serializer.cc - - src/core/lib/http/format_request.cc - - src/core/lib/http/httpcli.cc - - src/core/lib/http/httpcli_security_connector.cc - - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -2017,6 +2013,10 @@ libs: - src/core/tsi/ssl_transport_security_utils.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/http_client/format_request.cc + - src/core/util/http_client/httpcli.cc + - src/core/util/http_client/httpcli_security_connector.cc + - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_util.cc @@ -2443,9 +2443,6 @@ libs: - src/core/lib/gprpp/uuid_v4.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h - - src/core/lib/http/format_request.h - - src/core/lib/http/httpcli.h - - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -2677,6 +2674,9 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/http_client/format_request.h + - src/core/util/http_client/httpcli.h + - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -2875,9 +2875,6 @@ libs: - src/core/lib/gprpp/uuid_v4.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc - - src/core/lib/http/format_request.cc - - src/core/lib/http/httpcli.cc - - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -3095,6 +3092,9 @@ libs: - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/http_client/format_request.cc + - src/core/util/http_client/httpcli.cc + - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_writer.cc diff --git a/config.m4 b/config.m4 index ce630228f2f..bcb4312e054 100644 --- a/config.m4 +++ b/config.m4 @@ -537,10 +537,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ - src/core/lib/http/format_request.cc \ - src/core/lib/http/httpcli.cc \ - src/core/lib/http/httpcli_security_connector.cc \ - src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -833,6 +829,10 @@ if test "$PHP_GRPC" != "no"; then src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ + src/core/util/http_client/format_request.cc \ + src/core/util/http_client/httpcli.cc \ + src/core/util/http_client/httpcli_security_connector.cc \ + src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ @@ -1531,7 +1531,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/linux) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/posix) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/windows) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr/event_engine_shims) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers) @@ -1602,6 +1601,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/android) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/http_client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/iphone) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/json) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/linux) diff --git a/config.w32 b/config.w32 index 12b8e9df346..08d8febee55 100644 --- a/config.w32 +++ b/config.w32 @@ -502,10 +502,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gprpp\\windows\\stat.cc " + "src\\core\\lib\\gprpp\\windows\\thd.cc " + "src\\core\\lib\\gprpp\\work_serializer.cc " + - "src\\core\\lib\\http\\format_request.cc " + - "src\\core\\lib\\http\\httpcli.cc " + - "src\\core\\lib\\http\\httpcli_security_connector.cc " + - "src\\core\\lib\\http\\parser.cc " + "src\\core\\lib\\iomgr\\buffer_list.cc " + "src\\core\\lib\\iomgr\\call_combiner.cc " + "src\\core\\lib\\iomgr\\cfstream_handle.cc " + @@ -798,6 +794,10 @@ if (PHP_GRPC != "no") { "src\\core\\util\\alloc.cc " + "src\\core\\util\\android\\log.cc " + "src\\core\\util\\atm.cc " + + "src\\core\\util\\http_client\\format_request.cc " + + "src\\core\\util\\http_client\\httpcli.cc " + + "src\\core\\util\\http_client\\httpcli_security_connector.cc " + + "src\\core\\util\\http_client\\parser.cc " + "src\\core\\util\\iphone\\cpu.cc " + "src\\core\\util\\json\\json_object_loader.cc " + "src\\core\\util\\json\\json_reader.cc " + @@ -1668,7 +1668,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\linux"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\posix"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\windows"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\http"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr\\event_engine_shims"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers"); @@ -1742,6 +1741,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\android"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\http_client"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\iphone"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\json"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\linux"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 6b74801bc8c..5865f399235 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -1005,10 +1005,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -1305,6 +1301,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -2276,10 +2276,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -2576,6 +2572,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index e07e1a3dd80..032a6bb22ff 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1436,14 +1436,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/work_serializer.cc', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.cc', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.cc', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_security_connector.cc', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.cc', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/buffer_list.h', @@ -2032,6 +2024,14 @@ Pod::Spec.new do |s| 'src/core/util/alloc.h', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', + 'src/core/util/http_client/format_request.cc', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.cc', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_security_connector.cc', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.cc', + 'src/core/util/http_client/parser.h', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', @@ -3056,10 +3056,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -3356,6 +3352,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/grpc.gemspec b/grpc.gemspec index a940ee87cae..5ce01c4fd1b 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1323,14 +1323,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/work_serializer.cc ) s.files += %w( src/core/lib/gprpp/work_serializer.h ) s.files += %w( src/core/lib/gprpp/xxhash_inline.h ) - s.files += %w( src/core/lib/http/format_request.cc ) - s.files += %w( src/core/lib/http/format_request.h ) - s.files += %w( src/core/lib/http/httpcli.cc ) - s.files += %w( src/core/lib/http/httpcli.h ) - s.files += %w( src/core/lib/http/httpcli_security_connector.cc ) - s.files += %w( src/core/lib/http/httpcli_ssl_credentials.h ) - s.files += %w( src/core/lib/http/parser.cc ) - s.files += %w( src/core/lib/http/parser.h ) s.files += %w( src/core/lib/iomgr/block_annotate.h ) s.files += %w( src/core/lib/iomgr/buffer_list.cc ) s.files += %w( src/core/lib/iomgr/buffer_list.h ) @@ -1919,6 +1911,14 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/alloc.h ) s.files += %w( src/core/util/android/log.cc ) s.files += %w( src/core/util/atm.cc ) + s.files += %w( src/core/util/http_client/format_request.cc ) + s.files += %w( src/core/util/http_client/format_request.h ) + s.files += %w( src/core/util/http_client/httpcli.cc ) + s.files += %w( src/core/util/http_client/httpcli.h ) + s.files += %w( src/core/util/http_client/httpcli_security_connector.cc ) + s.files += %w( src/core/util/http_client/httpcli_ssl_credentials.h ) + s.files += %w( src/core/util/http_client/parser.cc ) + s.files += %w( src/core/util/http_client/parser.h ) s.files += %w( src/core/util/iphone/cpu.cc ) s.files += %w( src/core/util/json/json.h ) s.files += %w( src/core/util/json/json_args.h ) diff --git a/package.xml b/package.xml index 1cd837a3efe..23357d455f1 100644 --- a/package.xml +++ b/package.xml @@ -1305,14 +1305,6 @@ - - - - - - - - @@ -1901,6 +1893,14 @@ + + + + + + + + diff --git a/src/core/BUILD b/src/core/BUILD index b1f10e5fdd8..56aa4f03aa8 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -4420,10 +4420,10 @@ grpc_cc_library( grpc_cc_library( name = "httpcli_ssl_credentials", srcs = [ - "lib/http/httpcli_security_connector.cc", + "util/http_client/httpcli_security_connector.cc", ], hdrs = [ - "lib/http/httpcli_ssl_credentials.h", + "util/http_client/httpcli_ssl_credentials.h", ], external_deps = [ "absl/log:log", diff --git a/src/core/ext/gcp/metadata_query.h b/src/core/ext/gcp/metadata_query.h index 9e3f6931da5..395c1e6d995 100644 --- a/src/core/ext/gcp/metadata_query.h +++ b/src/core/ext/gcp/metadata_query.h @@ -26,11 +26,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 118b1f99488..90cfdf3ad5e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -82,7 +82,6 @@ #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -108,6 +107,7 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/handshaker/http_connect/http_connect_handshaker.cc b/src/core/handshaker/http_connect/http_connect_handshaker.cc index 32d218e06ea..30773fe99b4 100644 --- a/src/core/handshaker/http_connect/http_connect_handshaker.cc +++ b/src/core/handshaker/http_connect/http_connect_handshaker.cc @@ -44,14 +44,14 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/http/format_request.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/http_client/format_request.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index 06122b04a81..27d1b88ef1a 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -39,10 +39,10 @@ #include #include "src/core/lib/gprpp/env.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index 50e7d86b58b..c7dc1f166c3 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -28,11 +28,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc index f604d1e9815..f7fd5a805e1 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/external_account_credentials.cc @@ -46,14 +46,14 @@ #include #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" #include "src/core/lib/security/credentials/external/url_external_account_credentials.h" #include "src/core/lib/security/util/json_util.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h index c194fd60163..f0023ab878e 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.h +++ b/src/core/lib/security/credentials/external/external_account_credentials.h @@ -30,12 +30,12 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc index cf9d646e579..b2a5359c596 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc @@ -37,11 +37,11 @@ #include #include -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index 6a5f00cd23b..209e652a15c 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -28,10 +28,10 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 86602f6c519..3e6b843b972 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -49,8 +49,6 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -70,6 +68,8 @@ #include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/load_balancing/xds/xds_channel_args.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index 02a7c548e98..e88b909696f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -58,9 +58,6 @@ #include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -71,6 +68,9 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/uri/uri_parser.h" #include "src/core/tsi/ssl_types.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 313485e53d6..834dae28305 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -51,7 +51,6 @@ #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/context.h" @@ -62,6 +61,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 5144905284b..199f35f33c8 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -37,8 +37,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -48,6 +46,8 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/http/format_request.cc b/src/core/util/http_client/format_request.cc similarity index 97% rename from src/core/lib/http/format_request.cc rename to src/core/util/http_client/format_request.cc index d358a57f5bc..1d785835e2b 100644 --- a/src/core/lib/http/format_request.cc +++ b/src/core/util/http_client/format_request.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/format_request.h" +#include + +#include "src/core/util/http_client/format_request.h" #include #include @@ -31,9 +33,8 @@ #include "absl/strings/string_view.h" #include -#include -#include "src/core/lib/http/httpcli.h" +#include "src/core/util/http_client/httpcli.h" static void fill_common_header(const grpc_http_request* request, const char* host, const char* path, diff --git a/src/core/lib/http/format_request.h b/src/core/util/http_client/format_request.h similarity index 86% rename from src/core/lib/http/format_request.h rename to src/core/util/http_client/format_request.h index a9e76643556..ab9d6a9d7d5 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/util/http_client/format_request.h @@ -16,13 +16,14 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H -#define GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H -#include #include -#include "src/core/lib/http/parser.h" +#include + +#include "src/core/util/http_client/parser.h" grpc_slice grpc_httpcli_format_get_request(const grpc_http_request* request, const char* host, const char* path); @@ -34,4 +35,4 @@ grpc_slice grpc_httpcli_format_connect_request(const grpc_http_request* request, const char* host, const char* path); -#endif // GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H diff --git a/src/core/lib/http/httpcli.cc b/src/core/util/http_client/httpcli.cc similarity index 99% rename from src/core/lib/http/httpcli.cc rename to src/core/util/http_client/httpcli.cc index ee2a5ad528d..2771787dd00 100644 --- a/src/core/lib/http/httpcli.cc +++ b/src/core/util/http_client/httpcli.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/httpcli.h" +#include + +#include "src/core/util/http_client/httpcli.h" #include @@ -32,7 +34,6 @@ #include #include #include -#include #include "src/core/handshaker/handshaker_registry.h" #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" @@ -41,8 +42,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/format_request.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -52,6 +51,8 @@ #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/http_client/format_request.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/lib/http/httpcli.h b/src/core/util/http_client/httpcli.h similarity index 98% rename from src/core/lib/http/httpcli.h rename to src/core/util/http_client/httpcli.h index 960b46d16c3..2ad2810f027 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/util/http_client/httpcli.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H -#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H + +#include #include @@ -32,7 +34,6 @@ #include #include -#include #include "src/core/handshaker/handshaker.h" #include "src/core/lib/gprpp/debug_location.h" @@ -40,7 +41,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -52,6 +52,7 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/parser.h" // User agent this library reports #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" @@ -264,4 +265,4 @@ class HttpRequest : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/util/http_client/httpcli_security_connector.cc similarity index 99% rename from src/core/lib/http/httpcli_security_connector.cc rename to src/core/util/http_client/httpcli_security_connector.cc index 7db2021b71c..ac0c1adb257 100644 --- a/src/core/lib/http/httpcli_security_connector.cc +++ b/src/core/util/http_client/httpcli_security_connector.cc @@ -16,6 +16,8 @@ // // +#include + #include #include @@ -32,7 +34,6 @@ #include #include #include -#include #include #include "src/core/handshaker/handshaker.h" diff --git a/src/core/lib/http/httpcli_ssl_credentials.h b/src/core/util/http_client/httpcli_ssl_credentials.h similarity index 85% rename from src/core/lib/http/httpcli_ssl_credentials.h rename to src/core/util/http_client/httpcli_ssl_credentials.h index dc6182a0779..45364c64a46 100644 --- a/src/core/lib/http/httpcli_ssl_credentials.h +++ b/src/core/util/http_client/httpcli_ssl_credentials.h @@ -14,12 +14,13 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H -#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H -#include #include +#include + #include "src/core/lib/gprpp/ref_counted_ptr.h" namespace grpc_core { @@ -35,4 +36,4 @@ RefCountedPtr CreateHttpRequestSSLCredentials(); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H diff --git a/src/core/lib/http/parser.cc b/src/core/util/http_client/parser.cc similarity index 99% rename from src/core/lib/http/parser.cc rename to src/core/util/http_client/parser.cc index aad7963f1d7..c344f438cf3 100644 --- a/src/core/lib/http/parser.cc +++ b/src/core/util/http_client/parser.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/parser.h" +#include + +#include "src/core/util/http_client/parser.h" #include @@ -27,7 +29,6 @@ #include #include -#include grpc_core::TraceFlag grpc_http1_trace(false, "http1"); diff --git a/src/core/lib/http/parser.h b/src/core/util/http_client/parser.h similarity index 96% rename from src/core/lib/http/parser.h rename to src/core/util/http_client/parser.h index e9a1088b85f..cfd1ed7ab3a 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/util/http_client/parser.h @@ -16,14 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_PARSER_H -#define GRPC_SRC_CORE_LIB_HTTP_PARSER_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H + +#include #include #include #include -#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" @@ -126,4 +127,4 @@ void grpc_http_response_destroy(grpc_http_response* response); extern grpc_core::TraceFlag grpc_http1_trace; -#endif // GRPC_SRC_CORE_LIB_HTTP_PARSER_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index f38b2571f6d..39fb7a6487f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -511,10 +511,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gprpp/windows/stat.cc', 'src/core/lib/gprpp/windows/thd.cc', 'src/core/lib/gprpp/work_serializer.cc', - 'src/core/lib/http/format_request.cc', - 'src/core/lib/http/httpcli.cc', - 'src/core/lib/http/httpcli_security_connector.cc', - 'src/core/lib/http/parser.cc', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/call_combiner.cc', 'src/core/lib/iomgr/cfstream_handle.cc', @@ -807,6 +803,10 @@ CORE_SOURCE_FILES = [ 'src/core/util/alloc.cc', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', + 'src/core/util/http_client/format_request.cc', + 'src/core/util/http_client/httpcli.cc', + 'src/core/util/http_client/httpcli_security_connector.cc', + 'src/core/util/http_client/parser.cc', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json_object_loader.cc', 'src/core/util/json/json_reader.cc', diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 3eca777e098..ac9acc9ffb4 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -51,7 +51,6 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -65,6 +64,7 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/http_client/parser.h" #include "test/core/test_util/port.h" struct grpc_end2end_http_proxy { diff --git a/test/core/http/format_request_test.cc b/test/core/http/format_request_test.cc index f242221d971..31c73d88100 100644 --- a/test/core/http/format_request_test.cc +++ b/test/core/http/format_request_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/format_request.h" +#include "src/core/util/http_client/format_request.h" #include @@ -24,8 +24,8 @@ #include "gtest/gtest.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/http_client/httpcli.h" #include "test/core/test_util/test_config.h" TEST(FormatRequestTest, FormatGetRequest) { diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 773ee18ed08..e63cbfe4f22 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/httpcli.h" +#include "src/core/util/http_client/httpcli.h" #include #include diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 8bdf220bee2..4c15ea82dcf 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -47,9 +47,6 @@ #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/time_util.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -58,6 +55,9 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/subprocess.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" diff --git a/test/core/http/parser_test.cc b/test/core/http/parser_test.cc index 183dc9eeae3..4e3f508338a 100644 --- a/test/core/http/parser_test.cc +++ b/test/core/http/parser_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" #include #include diff --git a/test/core/http/request_fuzzer.cc b/test/core/http/request_fuzzer.cc index 2272d0427e3..7ca890c7e01 100644 --- a/test/core/http/request_fuzzer.cc +++ b/test/core/http/request_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/http/response_fuzzer.cc b/test/core/http/response_fuzzer.cc index 8310028c455..e2cadb79eb8 100644 --- a/test/core/http/response_fuzzer.cc +++ b/test/core/http/response_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 35e1aad2be8..241baff1d04 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -47,8 +47,6 @@ #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/promise.h" @@ -69,6 +67,8 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" #include "src/core/util/tmpfile.h" diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index 5387edf9451..792fbe670cf 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -31,8 +31,8 @@ #include #include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/security/credentials/jwt/json_token.h" +#include "src/core/util/http_client/httpcli.h" #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/port_server_client.cc b/test/core/test_util/port_server_client.cc index cbd83fcb046..2f59e1c473b 100644 --- a/test/core/test_util/port_server_client.cc +++ b/test/core/test_util/port_server_client.cc @@ -44,8 +44,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -54,6 +52,8 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" typedef struct freereq { gpr_mu* mu = nullptr; diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 319f45d8c2b..a65cdb9fc4f 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -2322,14 +2322,6 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ -src/core/lib/http/format_request.cc \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.cc \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/httpcli_security_connector.cc \ -src/core/lib/http/httpcli_ssl_credentials.h \ -src/core/lib/http/parser.cc \ -src/core/lib/http/parser.h \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/buffer_list.h \ @@ -2918,6 +2910,14 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ +src/core/util/http_client/format_request.cc \ +src/core/util/http_client/format_request.h \ +src/core/util/http_client/httpcli.cc \ +src/core/util/http_client/httpcli.h \ +src/core/util/http_client/httpcli_security_connector.cc \ +src/core/util/http_client/httpcli_ssl_credentials.h \ +src/core/util/http_client/parser.cc \ +src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 28cfb2530bf..4a5484a7c0f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -2095,14 +2095,6 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ -src/core/lib/http/format_request.cc \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.cc \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/httpcli_security_connector.cc \ -src/core/lib/http/httpcli_ssl_credentials.h \ -src/core/lib/http/parser.cc \ -src/core/lib/http/parser.h \ src/core/lib/iomgr/README.md \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ @@ -2700,6 +2692,14 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ +src/core/util/http_client/format_request.cc \ +src/core/util/http_client/format_request.h \ +src/core/util/http_client/httpcli.cc \ +src/core/util/http_client/httpcli.h \ +src/core/util/http_client/httpcli_security_connector.cc \ +src/core/util/http_client/httpcli_ssl_credentials.h \ +src/core/util/http_client/parser.cc \ +src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ From ecee02a22612e65361156df8b8e26461f948e2ab Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 29 May 2024 14:55:50 -0700 Subject: [PATCH 11/20] [CI] Disabled ODR violation from ASAN (#36756) https://github.com/grpc/grpc/pull/36753 has this ASAN test failure with the following error which doesn't seem to make sense. ([full log](https://btx.cloud.google.com/invocations/a587e5cc-ca1e-46ed-a3c3-199c581583db/targets)) ``` Executing tests from //test/cpp/util:grpc_tool_test@poller=epoll1 ----------------------------------------------------------------------------- ================================================================= ==15==ERROR: AddressSanitizer: odr-violation (0x7fcfa2961400): [1] size=66 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Sliblite.so [2] size=66 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Slibfield_Ugenerators.so These globals were registered at these points: [1]: #0 0x5626b4ea1488 in __asan_register_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:369:3 #1 0x5626b4ea2559 in __asan_register_elf_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:352:3 #2 0x7fcfa3fa4b99 (/lib64/ld-linux-x86-64.so.2+0x11b99) (BuildId: 7ae2aaae1a0e5b262df913ee0885582d2e327982) [2]: #0 0x5626b4ea1488 in __asan_register_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:369:3 #1 0x5626b4ea2559 in __asan_register_elf_globals /tmp/clang-build/src/compiler-rt/lib/asan/asan_globals.cpp:352:3 #2 0x7fcfa3fa4b99 (/lib64/ld-linux-x86-64.so.2+0x11b99) (BuildId: 7ae2aaae1a0e5b262df913ee0885582d2e327982) ==15==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0 SUMMARY: AddressSanitizer: odr-violation: global 'typeinfo name for google::protobuf::compiler::java::ImmutableExtensionLiteGenerator' at external/com_google_protobuf/src/google/protobuf/compiler/java/lite/extension.cc in /b/f/w/bazel-out/k8-fastbuild/bin/test/cpp/util/grpc_tool_test@poller=epoll1.runfiles/com_github_grpc_grpc/test/cpp/util/../../../_solib_k8/libexternal_Scom_Ugoogle_Uprotobuf_Ssrc_Sgoogle_Sprotobuf_Scompiler_Sjava_Slite_Sliblite.so ==15==ABORTING ``` This turned out to be a known issue described at https://github.com/google/sanitizers/issues/1017 and there is much to do other than disabling the ODR test. I gave a try to "-mllvm -asan-use-private-alias=1" option but it didn't change the result so I turned into this way. Closes #36756 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36756 from veblush:asan-workaround 622581e8d219b0c9419df3604b9765a06e940e9d PiperOrigin-RevId: 638421967 --- tools/bazel.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/bazel.rc b/tools/bazel.rc index ace09152bdd..a1cec3c7908 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -54,6 +54,7 @@ build:asan --copt=-DADDRESS_SANITIZER # used by absl build:asan --linkopt=-fsanitize=address build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1 +build:asan --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017 build:fuzzer_asan --strip=never build:fuzzer_asan --define=grpc_build_fuzzers=true @@ -68,6 +69,7 @@ build:fuzzer_asan --copt=-DADDRESS_SANITIZER # used by absl build:fuzzer_asan --linkopt=-fsanitize=fuzzer,address build:fuzzer_asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always build:fuzzer_asan --action_env=LSAN_OPTIONS=suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1 +build:fuzzer_asan --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017 build:coverage --copt=-fprofile-instr-generate build:coverage --copt=-fcoverage-mapping @@ -96,6 +98,7 @@ build:asan_macos --copt=-fno-omit-frame-pointer build:asan_macos --copt=-DGPR_NO_DIRECT_SYSCALLS build:asan_macos --linkopt=-fsanitize=address build:asan_macos --action_env=ASAN_OPTIONS=detect_leaks=0 +build:asan_macos --action_env=ASAN_OPTIONS=detect_odr_violation=0 # https://github.com/google/sanitizers/issues/1017 build:asan_macos --dynamic_mode=off build:msan --strip=never From 34871fafa30da908ae3d656433f6637f96b04856 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 29 May 2024 15:03:11 -0700 Subject: [PATCH 12/20] [call-v3] New client channel implementation (#36723) Closes #36723 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36723 from ctiller:transport-refs-7 e019b8f5eae524d25c9db8af2eefaec979a27835 PiperOrigin-RevId: 638424601 --- BUILD | 45 +- CMakeLists.txt | 246 +- Makefile | 3 + Package.swift | 7 + bazel/experiments.bzl | 2 +- build_autogenerated.yaml | 88 +- config.m4 | 3 + config.w32 | 3 + gRPC-C++.podspec | 8 + gRPC-Core.podspec | 11 + grpc.gemspec | 7 + grpc.gyp | 2669 +++++++++++++++++ package.xml | 7 + src/core/BUILD | 17 +- src/core/client_channel/client_channel.cc | 1392 +++++++++ src/core/client_channel/client_channel.h | 245 ++ .../client_channel/client_channel_filter.cc | 27 +- .../client_channel/client_channel_filter.h | 13 +- .../client_channel/client_channel_internal.h | 8 + .../load_balanced_call_destination.cc | 335 +++ .../load_balanced_call_destination.h | 49 + src/core/client_channel/subchannel.cc | 335 ++- src/core/client_channel/subchannel.h | 47 +- .../legacy_channel_idle_filter.cc | 4 - .../channel_idle/legacy_channel_idle_filter.h | 2 + src/core/lib/channel/channel_args.h | 25 +- src/core/lib/channel/channel_stack.h | 6 + src/core/lib/channel/context.h | 25 + src/core/lib/experiments/experiments.cc | 36 +- src/core/lib/experiments/experiments.h | 16 +- src/core/lib/experiments/experiments.yaml | 2 + src/core/lib/promise/activity.h | 6 + src/core/lib/promise/context.h | 5 + src/core/lib/promise/map.h | 17 + src/core/lib/promise/observable.h | 1 + src/core/lib/promise/party.cc | 6 +- src/core/lib/promise/party.h | 5 + src/core/lib/promise/promise.h | 1 + src/core/lib/surface/call.h | 4 +- src/core/lib/surface/channel.cc | 17 +- src/core/lib/surface/channel.h | 25 +- src/core/lib/surface/channel_create.cc | 12 +- src/core/lib/surface/legacy_channel.cc | 5 +- src/core/lib/surface/legacy_channel.h | 13 +- src/core/lib/transport/call_destination.h | 2 + src/core/lib/transport/call_filters.cc | 20 +- src/core/lib/transport/call_filters.h | 7 +- src/core/lib/transport/call_spine.h | 40 +- src/core/lib/transport/metadata_batch.h | 11 +- src/core/load_balancing/lb_policy.h | 10 + src/core/telemetry/call_tracer.h | 16 + src/python/grpcio/grpc_core_dependencies.py | 3 + test/core/call/yodel/grpc_yodel_test.bzl | 11 +- test/core/call/yodel/yodel_test.cc | 60 +- test/core/call/yodel/yodel_test.h | 29 +- test/core/client_channel/BUILD | 35 +- .../client_channel/client_channel_test.cc | 310 +- .../connected_subchannel_test.cc | 178 ++ .../corpus/client_channel/empty | 1 + .../corpus/connected_subchannel/empty | 1 + .../load_balanced_call_destination/empty | 1 + .../load_balanced_call_destination_test.cc | 202 ++ .../client_channel/subchannel_args_test.cc | 90 + test/core/promise/BUILD | 1 + test/core/promise/map_test.cc | 18 +- test/core/promise/observable_test.cc | 10 + .../surface/secure_channel_create_test.cc | 6 +- .../transport/test_suite/transport_test.cc | 10 +- .../transport/test_suite/transport_test.h | 5 +- tools/distrib/fix_build_deps.py | 4 + tools/doxygen/Doxyfile.c++.internal | 7 + tools/doxygen/Doxyfile.core.internal | 7 + tools/run_tests/generated/tests.json | 72 +- 73 files changed, 6570 insertions(+), 397 deletions(-) create mode 100644 grpc.gyp create mode 100644 src/core/client_channel/client_channel.cc create mode 100644 src/core/client_channel/client_channel.h create mode 100644 src/core/client_channel/load_balanced_call_destination.cc create mode 100644 src/core/client_channel/load_balanced_call_destination.h create mode 100644 test/core/client_channel/connected_subchannel_test.cc create mode 100644 test/core/client_channel/corpus/client_channel/empty create mode 100644 test/core/client_channel/corpus/connected_subchannel/empty create mode 100644 test/core/client_channel/corpus/load_balanced_call_destination/empty create mode 100644 test/core/client_channel/load_balanced_call_destination_test.cc create mode 100644 test/core/client_channel/subchannel_args_test.cc diff --git a/BUILD b/BUILD index 20b7ed8e86f..f2caa63ed0d 100644 --- a/BUILD +++ b/BUILD @@ -1797,16 +1797,17 @@ grpc_cc_library( "gpr", "grpc_public_hdrs", "grpc_trace", - "orphanable", "ref_counted_ptr", "stats", "//src/core:arena", + "//src/core:call_arena_allocator", "//src/core:channel_args", "//src/core:channel_stack_type", "//src/core:compression", "//src/core:connectivity_state", "//src/core:iomgr_fwd", "//src/core:ref_counted", + "//src/core:resource_quota", "//src/core:slice", "//src/core:stats_data", "//src/core:time", @@ -1885,6 +1886,7 @@ grpc_cc_library( "config", "gpr", "grpc_base", + "grpc_client_channel", "grpc_public_hdrs", "legacy_channel", "ref_counted_ptr", @@ -1892,6 +1894,7 @@ grpc_cc_library( "//src/core:arena", "//src/core:channel_args", "//src/core:channel_stack_type", + "//src/core:experiments", "//src/core:iomgr_fwd", "//src/core:ref_counted", "//src/core:slice", @@ -3698,11 +3701,13 @@ grpc_cc_library( grpc_cc_library( name = "grpc_client_channel", srcs = [ + "//src/core:client_channel/client_channel.cc", "//src/core:client_channel/client_channel_factory.cc", "//src/core:client_channel/client_channel_filter.cc", "//src/core:client_channel/client_channel_plugin.cc", "//src/core:client_channel/dynamic_filters.cc", "//src/core:client_channel/global_subchannel_pool.cc", + "//src/core:client_channel/load_balanced_call_destination.cc", "//src/core:client_channel/local_subchannel_pool.cc", "//src/core:client_channel/retry_filter.cc", "//src/core:client_channel/retry_filter_legacy_call_data.cc", @@ -3710,10 +3715,12 @@ grpc_cc_library( "//src/core:client_channel/subchannel_stream_client.cc", ], hdrs = [ + "//src/core:client_channel/client_channel.h", "//src/core:client_channel/client_channel_factory.h", "//src/core:client_channel/client_channel_filter.h", "//src/core:client_channel/dynamic_filters.h", "//src/core:client_channel/global_subchannel_pool.h", + "//src/core:client_channel/load_balanced_call_destination.h", "//src/core:client_channel/local_subchannel_pool.h", "//src/core:client_channel/retry_filter.h", "//src/core:client_channel/retry_filter_legacy_call_data.h", @@ -3735,21 +3742,17 @@ grpc_cc_library( "absl/strings:cord", "absl/types:optional", "absl/types:variant", - "@com_google_protobuf//upb:base", - "@com_google_protobuf//upb:mem", - "@com_google_protobuf//upb:message", ], language = "c++", visibility = ["@grpc:client_channel"], deps = [ - "api_trace", "backoff", "call_combiner", "call_tracer", + "channel", "channel_arg_names", "channelz", "config", - "config_vars", "debug_location", "endpoint_addresses", "exec_ctx", @@ -3760,26 +3763,23 @@ grpc_cc_library( "grpc_security_base", "grpc_service_config_impl", "grpc_trace", - "http_connect_handshaker", "iomgr", - "iomgr_timer", "lb_child_policy_handler", "legacy_context", "orphanable", - "parse_address", "promise", - "protobuf_duration_upb", "ref_counted_ptr", "sockaddr_utils", "stats", "uri_parser", "work_serializer", - "xds_orca_service_upb", - "xds_orca_upb", "//src/core:activity", "//src/core:arena", "//src/core:arena_promise", "//src/core:backend_metric_parser", + "//src/core:call_destination", + "//src/core:call_filters", + "//src/core:call_spine", "//src/core:cancel_callback", "//src/core:channel_args", "//src/core:channel_fwd", @@ -3793,33 +3793,33 @@ grpc_cc_library( "//src/core:connectivity_state", "//src/core:construct_destruct", "//src/core:context", - "//src/core:delegating_helper", "//src/core:dual_ref_counted", - "//src/core:env", "//src/core:error", "//src/core:error_utils", + "//src/core:exec_ctx_wakeup_scheduler", "//src/core:experiments", - "//src/core:gpr_atm", "//src/core:gpr_manual_constructor", "//src/core:grpc_backend_metric_data", - "//src/core:grpc_message_size_filter", + "//src/core:grpc_channel_idle_filter", "//src/core:grpc_service_config", + "//src/core:idle_filter_state", "//src/core:init_internally", + "//src/core:interception_chain", "//src/core:iomgr_fwd", "//src/core:json", - "//src/core:json_args", - "//src/core:json_channel_args", - "//src/core:json_object_loader", "//src/core:latch", "//src/core:lb_policy", "//src/core:lb_policy_registry", + "//src/core:loop", "//src/core:map", "//src/core:memory_quota", + "//src/core:metadata", "//src/core:metadata_batch", + "//src/core:metrics", + "//src/core:observable", "//src/core:pipe", "//src/core:poll", "//src/core:pollset_set", - "//src/core:proxy_mapper", "//src/core:proxy_mapper_registry", "//src/core:ref_counted", "//src/core:resolved_address", @@ -3827,11 +3827,13 @@ grpc_cc_library( "//src/core:retry_service_config", "//src/core:retry_throttle", "//src/core:seq", - "//src/core:service_config_parser", + "//src/core:single_set_ptr", + "//src/core:sleep", "//src/core:slice", "//src/core:slice_buffer", "//src/core:slice_refcount", "//src/core:stats_data", + "//src/core:status_flag", "//src/core:status_helper", "//src/core:subchannel_connector", "//src/core:subchannel_interface", @@ -3840,7 +3842,6 @@ grpc_cc_library( "//src/core:try_seq", "//src/core:unique_type_name", "//src/core:useful", - "//src/core:validation_errors", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5c39bfda8..64da739cd32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1002,7 +1002,9 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx client_authority_filter_test) add_dependencies(buildtests_cxx client_callback_end2end_test) add_dependencies(buildtests_cxx client_channel_service_config_test) - add_dependencies(buildtests_cxx client_channel_test) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_cxx client_channel_test) + endif() add_dependencies(buildtests_cxx client_context_test_peer_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx client_fork_test) @@ -1026,6 +1028,9 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx compressed_payload_test) add_dependencies(buildtests_cxx compression_test) add_dependencies(buildtests_cxx concurrent_connectivity_test) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_cxx connected_subchannel_test) + endif() add_dependencies(buildtests_cxx connection_prefix_bad_client_test) add_dependencies(buildtests_cxx connection_refused_test) add_dependencies(buildtests_cxx connectivity_state_test) @@ -1194,6 +1199,9 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx latch_test) add_dependencies(buildtests_cxx lb_get_cpu_stats_test) add_dependencies(buildtests_cxx lb_load_data_store_test) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_cxx load_balanced_call_destination_test) + endif() add_dependencies(buildtests_cxx load_config_test) add_dependencies(buildtests_cxx load_file_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) @@ -1436,6 +1444,7 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx streams_not_seen_test) add_dependencies(buildtests_cxx string_ref_test) add_dependencies(buildtests_cxx string_test) + add_dependencies(buildtests_cxx subchannel_args_test) add_dependencies(buildtests_cxx switch_test) add_dependencies(buildtests_cxx sync_test) add_dependencies(buildtests_cxx system_roots_test) @@ -1830,6 +1839,7 @@ add_library(grpc src/core/channelz/channelz.cc src/core/channelz/channelz_registry.cc src/core/client_channel/backup_poller.cc + src/core/client_channel/client_channel.cc src/core/client_channel/client_channel_factory.cc src/core/client_channel/client_channel_filter.cc src/core/client_channel/client_channel_plugin.cc @@ -1837,6 +1847,7 @@ add_library(grpc src/core/client_channel/config_selector.cc src/core/client_channel/dynamic_filters.cc src/core/client_channel/global_subchannel_pool.cc + src/core/client_channel/load_balanced_call_destination.cc src/core/client_channel/local_subchannel_pool.cc src/core/client_channel/retry_filter.cc src/core/client_channel/retry_filter_legacy_call_data.cc @@ -2292,6 +2303,7 @@ add_library(grpc src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc + src/core/lib/gprpp/dump_args.cc src/core/lib/gprpp/load_file.cc src/core/lib/gprpp/per_cpu.cc src/core/lib/gprpp/posix/directory_reader.cc @@ -2927,6 +2939,7 @@ add_library(grpc_unsecure src/core/channelz/channelz.cc src/core/channelz/channelz_registry.cc src/core/client_channel/backup_poller.cc + src/core/client_channel/client_channel.cc src/core/client_channel/client_channel_factory.cc src/core/client_channel/client_channel_filter.cc src/core/client_channel/client_channel_plugin.cc @@ -2934,6 +2947,7 @@ add_library(grpc_unsecure src/core/client_channel/config_selector.cc src/core/client_channel/dynamic_filters.cc src/core/client_channel/global_subchannel_pool.cc + src/core/client_channel/load_balanced_call_destination.cc src/core/client_channel/local_subchannel_pool.cc src/core/client_channel/retry_filter.cc src/core/client_channel/retry_filter_legacy_call_data.cc @@ -3085,6 +3099,7 @@ add_library(grpc_unsecure src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc + src/core/lib/gprpp/dump_args.cc src/core/lib/gprpp/load_file.cc src/core/lib/gprpp/per_cpu.cc src/core/lib/gprpp/ref_counted_string.cc @@ -5203,6 +5218,7 @@ add_library(grpc_authorization_provider src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc + src/core/lib/gprpp/dump_args.cc src/core/lib/gprpp/load_file.cc src/core/lib/gprpp/per_cpu.cc src/core/lib/gprpp/ref_counted_string.cc @@ -8506,6 +8522,7 @@ add_executable(call_filters_test src/core/lib/debug/trace.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc + src/core/lib/gprpp/dump_args.cc src/core/lib/gprpp/ref_counted_string.cc src/core/lib/gprpp/status_helper.cc src/core/lib/gprpp/time.cc @@ -10526,46 +10543,56 @@ target_link_libraries(client_channel_service_config_test endif() if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) -add_executable(client_channel_test - test/core/client_channel/client_channel_test.cc -) -if(WIN32 AND MSVC) - if(BUILD_SHARED_LIBS) - target_compile_definitions(client_channel_test - PRIVATE - "GPR_DLL_IMPORTS" - "GRPC_DLL_IMPORTS" - ) + add_executable(client_channel_test + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h + test/core/call/yodel/test_main.cc + test/core/call/yodel/yodel_test.cc + test/core/client_channel/client_channel_test.cc + test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(client_channel_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() endif() -endif() -target_compile_features(client_channel_test PUBLIC cxx_std_14) -target_include_directories(client_channel_test - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_RE2_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - third_party/googletest/googletest/include - third_party/googletest/googletest - third_party/googletest/googlemock/include - third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} -) + target_compile_features(client_channel_test PUBLIC cxx_std_14) + target_include_directories(client_channel_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) -target_link_libraries(client_channel_test - ${_gRPC_ALLTARGETS_LIBRARIES} - gtest - grpc_test_util -) + target_link_libraries(client_channel_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + ${_gRPC_PROTOBUF_LIBRARIES} + grpc_test_util + ) +endif() endif() if(gRPC_BUILD_TESTS) @@ -11340,6 +11367,58 @@ target_link_libraries(concurrent_connectivity_test ) +endif() +if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + + add_executable(connected_subchannel_test + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h + test/core/call/yodel/test_main.cc + test/core/call/yodel/yodel_test.cc + test/core/client_channel/connected_subchannel_test.cc + test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(connected_subchannel_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() + endif() + target_compile_features(connected_subchannel_test PUBLIC cxx_std_14) + target_include_directories(connected_subchannel_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) + + target_link_libraries(connected_subchannel_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + ${_gRPC_PROTOBUF_LIBRARIES} + grpc_test_util + ) + + +endif() endif() if(gRPC_BUILD_TESTS) @@ -17832,6 +17911,7 @@ add_executable(interception_chain_test src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc + src/core/lib/gprpp/dump_args.cc src/core/lib/gprpp/load_file.cc src/core/lib/gprpp/per_cpu.cc src/core/lib/gprpp/ref_counted_string.cc @@ -18985,6 +19065,58 @@ target_link_libraries(lb_load_data_store_test ) +endif() +if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) + + add_executable(load_balanced_call_destination_test + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h + ${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h + test/core/call/yodel/test_main.cc + test/core/call/yodel/yodel_test.cc + test/core/client_channel/load_balanced_call_destination_test.cc + test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(load_balanced_call_destination_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() + endif() + target_compile_features(load_balanced_call_destination_test PUBLIC cxx_std_14) + target_include_directories(load_balanced_call_destination_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} + ) + + target_link_libraries(load_balanced_call_destination_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + ${_gRPC_PROTOBUF_LIBRARIES} + grpc_test_util + ) + + +endif() endif() if(gRPC_BUILD_TESTS) @@ -29324,6 +29456,48 @@ target_link_libraries(string_test ) +endif() +if(gRPC_BUILD_TESTS) + +add_executable(subchannel_args_test + test/core/client_channel/subchannel_args_test.cc +) +if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(subchannel_args_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() +endif() +target_compile_features(subchannel_args_test PUBLIC cxx_std_14) +target_include_directories(subchannel_args_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(subchannel_args_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + grpc_test_util +) + + endif() if(gRPC_BUILD_TESTS) diff --git a/Makefile b/Makefile index 2171dd14b33..fc3701d0415 100644 --- a/Makefile +++ b/Makefile @@ -670,6 +670,7 @@ LIBGRPC_SRC = \ src/core/channelz/channelz.cc \ src/core/channelz/channelz_registry.cc \ src/core/client_channel/backup_poller.cc \ + src/core/client_channel/client_channel.cc \ src/core/client_channel/client_channel_factory.cc \ src/core/client_channel/client_channel_filter.cc \ src/core/client_channel/client_channel_plugin.cc \ @@ -677,6 +678,7 @@ LIBGRPC_SRC = \ src/core/client_channel/config_selector.cc \ src/core/client_channel/dynamic_filters.cc \ src/core/client_channel/global_subchannel_pool.cc \ + src/core/client_channel/load_balanced_call_destination.cc \ src/core/client_channel/local_subchannel_pool.cc \ src/core/client_channel/retry_filter.cc \ src/core/client_channel/retry_filter_legacy_call_data.cc \ @@ -1137,6 +1139,7 @@ LIBGRPC_SRC = \ src/core/lib/experiments/config.cc \ src/core/lib/experiments/experiments.cc \ src/core/lib/gprpp/crash.cc \ + src/core/lib/gprpp/dump_args.cc \ src/core/lib/gprpp/examine_stack.cc \ src/core/lib/gprpp/fork.cc \ src/core/lib/gprpp/host_port.cc \ diff --git a/Package.swift b/Package.swift index 6f315ad9c90..6b411d73c85 100644 --- a/Package.swift +++ b/Package.swift @@ -126,6 +126,8 @@ let package = Package( "src/core/channelz/channelz_registry.h", "src/core/client_channel/backup_poller.cc", "src/core/client_channel/backup_poller.h", + "src/core/client_channel/client_channel.cc", + "src/core/client_channel/client_channel.h", "src/core/client_channel/client_channel_factory.cc", "src/core/client_channel/client_channel_factory.h", "src/core/client_channel/client_channel_filter.cc", @@ -141,6 +143,8 @@ let package = Package( "src/core/client_channel/dynamic_filters.h", "src/core/client_channel/global_subchannel_pool.cc", "src/core/client_channel/global_subchannel_pool.h", + "src/core/client_channel/load_balanced_call_destination.cc", + "src/core/client_channel/load_balanced_call_destination.h", "src/core/client_channel/local_subchannel_pool.cc", "src/core/client_channel/local_subchannel_pool.h", "src/core/client_channel/retry_filter.cc", @@ -1255,6 +1259,8 @@ let package = Package( "src/core/lib/gprpp/directory_reader.h", "src/core/lib/gprpp/down_cast.h", "src/core/lib/gprpp/dual_ref_counted.h", + "src/core/lib/gprpp/dump_args.cc", + "src/core/lib/gprpp/dump_args.h", "src/core/lib/gprpp/env.h", "src/core/lib/gprpp/examine_stack.cc", "src/core/lib/gprpp/examine_stack.h", @@ -1480,6 +1486,7 @@ let package = Package( "src/core/lib/promise/latch.h", "src/core/lib/promise/loop.h", "src/core/lib/promise/map.h", + "src/core/lib/promise/observable.h", "src/core/lib/promise/party.cc", "src/core/lib/promise/party.h", "src/core/lib/promise/pipe.h", diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 7b41b29566a..8dffc68bf21 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -18,7 +18,6 @@ EXPERIMENT_ENABLES = { "call_status_override_on_cancellation": "call_status_override_on_cancellation", - "call_v3": "call_v3", "canary_client_privacy": "canary_client_privacy", "client_privacy": "client_privacy", "event_engine_client": "event_engine_client", @@ -45,6 +44,7 @@ EXPERIMENT_ENABLES = { "unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size", "work_serializer_clears_time_cache": "work_serializer_clears_time_cache", "work_serializer_dispatch": "event_engine_client,work_serializer_dispatch", + "call_v3": "call_v3,event_engine_client,event_engine_listener,work_serializer_dispatch", } EXPERIMENT_POLLERS = [ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index b2a80770454..3adafd444e6 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -227,6 +227,7 @@ libs: - src/core/channelz/channelz.h - src/core/channelz/channelz_registry.h - src/core/client_channel/backup_poller.h + - src/core/client_channel/client_channel.h - src/core/client_channel/client_channel_factory.h - src/core/client_channel/client_channel_filter.h - src/core/client_channel/client_channel_internal.h @@ -235,6 +236,7 @@ libs: - src/core/client_channel/connector.h - src/core/client_channel/dynamic_filters.h - src/core/client_channel/global_subchannel_pool.h + - src/core/client_channel/load_balanced_call_destination.h - src/core/client_channel/local_subchannel_pool.h - src/core/client_channel/retry_filter.h - src/core/client_channel/retry_filter_legacy_call_data.h @@ -883,6 +885,7 @@ libs: - src/core/lib/gprpp/directory_reader.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/dump_args.h - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h @@ -991,6 +994,7 @@ libs: - src/core/lib/promise/latch.h - src/core/lib/promise/loop.h - src/core/lib/promise/map.h + - src/core/lib/promise/observable.h - src/core/lib/promise/party.h - src/core/lib/promise/pipe.h - src/core/lib/promise/poll.h @@ -1251,6 +1255,7 @@ libs: - src/core/channelz/channelz.cc - src/core/channelz/channelz_registry.cc - src/core/client_channel/backup_poller.cc + - src/core/client_channel/client_channel.cc - src/core/client_channel/client_channel_factory.cc - src/core/client_channel/client_channel_filter.cc - src/core/client_channel/client_channel_plugin.cc @@ -1258,6 +1263,7 @@ libs: - src/core/client_channel/config_selector.cc - src/core/client_channel/dynamic_filters.cc - src/core/client_channel/global_subchannel_pool.cc + - src/core/client_channel/load_balanced_call_destination.cc - src/core/client_channel/local_subchannel_pool.cc - src/core/client_channel/retry_filter.cc - src/core/client_channel/retry_filter_legacy_call_data.cc @@ -1713,6 +1719,7 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc + - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/posix/directory_reader.cc @@ -2215,6 +2222,7 @@ libs: - src/core/channelz/channelz.h - src/core/channelz/channelz_registry.h - src/core/client_channel/backup_poller.h + - src/core/client_channel/client_channel.h - src/core/client_channel/client_channel_factory.h - src/core/client_channel/client_channel_filter.h - src/core/client_channel/client_channel_internal.h @@ -2223,6 +2231,7 @@ libs: - src/core/client_channel/connector.h - src/core/client_channel/dynamic_filters.h - src/core/client_channel/global_subchannel_pool.h + - src/core/client_channel/load_balanced_call_destination.h - src/core/client_channel/local_subchannel_pool.h - src/core/client_channel/retry_filter.h - src/core/client_channel/retry_filter_legacy_call_data.h @@ -2420,6 +2429,7 @@ libs: - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/dump_args.h - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h @@ -2526,6 +2536,7 @@ libs: - src/core/lib/promise/latch.h - src/core/lib/promise/loop.h - src/core/lib/promise/map.h + - src/core/lib/promise/observable.h - src/core/lib/promise/party.h - src/core/lib/promise/pipe.h - src/core/lib/promise/poll.h @@ -2708,6 +2719,7 @@ libs: - src/core/channelz/channelz.cc - src/core/channelz/channelz_registry.cc - src/core/client_channel/backup_poller.cc + - src/core/client_channel/client_channel.cc - src/core/client_channel/client_channel_factory.cc - src/core/client_channel/client_channel_filter.cc - src/core/client_channel/client_channel_plugin.cc @@ -2715,6 +2727,7 @@ libs: - src/core/client_channel/config_selector.cc - src/core/client_channel/dynamic_filters.cc - src/core/client_channel/global_subchannel_pool.cc + - src/core/client_channel/load_balanced_call_destination.cc - src/core/client_channel/local_subchannel_pool.cc - src/core/client_channel/retry_filter.cc - src/core/client_channel/retry_filter_legacy_call_data.cc @@ -2866,6 +2879,7 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc + - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc @@ -4510,6 +4524,7 @@ libs: - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/dump_args.h - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h @@ -4618,6 +4633,7 @@ libs: - src/core/lib/promise/party.h - src/core/lib/promise/pipe.h - src/core/lib/promise/poll.h + - src/core/lib/promise/prioritized_race.h - src/core/lib/promise/promise.h - src/core/lib/promise/race.h - src/core/lib/promise/seq.h @@ -4833,6 +4849,7 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc + - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc @@ -6378,6 +6395,7 @@ targets: - src/core/lib/gprpp/chunked_vector.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/dump_args.h - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/manual_constructor.h - src/core/lib/gprpp/orphanable.h @@ -6468,6 +6486,7 @@ targets: - src/core/lib/debug/trace.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc + - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc @@ -7869,12 +7888,22 @@ targets: gtest: true build: test language: c++ - headers: [] + headers: + - test/core/call/yodel/yodel_test.h + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h src: + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto + - test/core/call/yodel/test_main.cc + - test/core/call/yodel/yodel_test.cc - test/core/client_channel/client_channel_test.cc + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc deps: - gtest + - protobuf - grpc_test_util + platforms: + - linux + - posix uses_polling: false - name: client_context_test_peer_test gtest: true @@ -8225,6 +8254,27 @@ targets: deps: - gtest - grpc_test_util +- name: connected_subchannel_test + gtest: true + build: test + language: c++ + headers: + - test/core/call/yodel/yodel_test.h + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h + src: + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto + - test/core/call/yodel/test_main.cc + - test/core/call/yodel/yodel_test.cc + - test/core/client_channel/connected_subchannel_test.cc + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc + deps: + - gtest + - protobuf + - grpc_test_util + platforms: + - linux + - posix + uses_polling: false - name: connection_prefix_bad_client_test gtest: true build: test @@ -11669,6 +11719,7 @@ targets: - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h + - src/core/lib/gprpp/dump_args.h - src/core/lib/gprpp/if_list.h - src/core/lib/gprpp/load_file.h - src/core/lib/gprpp/manual_constructor.h @@ -11776,6 +11827,7 @@ targets: - src/core/lib/promise/party.h - src/core/lib/promise/pipe.h - src/core/lib/promise/poll.h + - src/core/lib/promise/prioritized_race.h - src/core/lib/promise/promise.h - src/core/lib/promise/race.h - src/core/lib/promise/seq.h @@ -11961,6 +12013,7 @@ targets: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc + - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc @@ -12733,6 +12786,27 @@ targets: - gtest - grpc++ - grpc_test_util +- name: load_balanced_call_destination_test + gtest: true + build: test + language: c++ + headers: + - test/core/call/yodel/yodel_test.h + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h + src: + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto + - test/core/call/yodel/test_main.cc + - test/core/call/yodel/yodel_test.cc + - test/core/client_channel/load_balanced_call_destination_test.cc + - test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc + deps: + - gtest + - protobuf + - grpc_test_util + platforms: + - linux + - posix + uses_polling: false - name: load_config_test gtest: true build: test @@ -14639,6 +14713,7 @@ targets: - src/core/lib/promise/map.h - src/core/lib/promise/poll.h - src/core/lib/promise/promise.h + - test/core/promise/poll_matcher.h src: - test/core/promise/map_test.cc deps: @@ -18993,6 +19068,17 @@ targets: - gtest - grpc_test_util uses_polling: false +- name: subchannel_args_test + gtest: true + build: test + language: c++ + headers: [] + src: + - test/core/client_channel/subchannel_args_test.cc + deps: + - gtest + - grpc_test_util + uses_polling: false - name: switch_test gtest: true build: test diff --git a/config.m4 b/config.m4 index bcb4312e054..695063579c5 100644 --- a/config.m4 +++ b/config.m4 @@ -45,6 +45,7 @@ if test "$PHP_GRPC" != "no"; then src/core/channelz/channelz.cc \ src/core/channelz/channelz_registry.cc \ src/core/client_channel/backup_poller.cc \ + src/core/client_channel/client_channel.cc \ src/core/client_channel/client_channel_factory.cc \ src/core/client_channel/client_channel_filter.cc \ src/core/client_channel/client_channel_plugin.cc \ @@ -52,6 +53,7 @@ if test "$PHP_GRPC" != "no"; then src/core/client_channel/config_selector.cc \ src/core/client_channel/dynamic_filters.cc \ src/core/client_channel/global_subchannel_pool.cc \ + src/core/client_channel/load_balanced_call_destination.cc \ src/core/client_channel/local_subchannel_pool.cc \ src/core/client_channel/retry_filter.cc \ src/core/client_channel/retry_filter_legacy_call_data.cc \ @@ -512,6 +514,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/experiments/config.cc \ src/core/lib/experiments/experiments.cc \ src/core/lib/gprpp/crash.cc \ + src/core/lib/gprpp/dump_args.cc \ src/core/lib/gprpp/examine_stack.cc \ src/core/lib/gprpp/fork.cc \ src/core/lib/gprpp/host_port.cc \ diff --git a/config.w32 b/config.w32 index 08d8febee55..85a32dc6704 100644 --- a/config.w32 +++ b/config.w32 @@ -10,6 +10,7 @@ if (PHP_GRPC != "no") { "src\\core\\channelz\\channelz.cc " + "src\\core\\channelz\\channelz_registry.cc " + "src\\core\\client_channel\\backup_poller.cc " + + "src\\core\\client_channel\\client_channel.cc " + "src\\core\\client_channel\\client_channel_factory.cc " + "src\\core\\client_channel\\client_channel_filter.cc " + "src\\core\\client_channel\\client_channel_plugin.cc " + @@ -17,6 +18,7 @@ if (PHP_GRPC != "no") { "src\\core\\client_channel\\config_selector.cc " + "src\\core\\client_channel\\dynamic_filters.cc " + "src\\core\\client_channel\\global_subchannel_pool.cc " + + "src\\core\\client_channel\\load_balanced_call_destination.cc " + "src\\core\\client_channel\\local_subchannel_pool.cc " + "src\\core\\client_channel\\retry_filter.cc " + "src\\core\\client_channel\\retry_filter_legacy_call_data.cc " + @@ -477,6 +479,7 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\experiments\\config.cc " + "src\\core\\lib\\experiments\\experiments.cc " + "src\\core\\lib\\gprpp\\crash.cc " + + "src\\core\\lib\\gprpp\\dump_args.cc " + "src\\core\\lib\\gprpp\\examine_stack.cc " + "src\\core\\lib\\gprpp\\fork.cc " + "src\\core\\lib\\gprpp\\host_port.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 5865f399235..90a2f3849fc 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -268,6 +268,7 @@ Pod::Spec.new do |s| 'src/core/channelz/channelz.h', 'src/core/channelz/channelz_registry.h', 'src/core/client_channel/backup_poller.h', + 'src/core/client_channel/client_channel.h', 'src/core/client_channel/client_channel_factory.h', 'src/core/client_channel/client_channel_filter.h', 'src/core/client_channel/client_channel_internal.h', @@ -276,6 +277,7 @@ Pod::Spec.new do |s| 'src/core/client_channel/connector.h', 'src/core/client_channel/dynamic_filters.h', 'src/core/client_channel/global_subchannel_pool.h', + 'src/core/client_channel/load_balanced_call_destination.h', 'src/core/client_channel/local_subchannel_pool.h', 'src/core/client_channel/retry_filter.h', 'src/core/client_channel/retry_filter_legacy_call_data.h', @@ -968,6 +970,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/directory_reader.h', 'src/core/lib/gprpp/down_cast.h', 'src/core/lib/gprpp/dual_ref_counted.h', + 'src/core/lib/gprpp/dump_args.h', 'src/core/lib/gprpp/env.h', 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', @@ -1089,6 +1092,7 @@ Pod::Spec.new do |s| 'src/core/lib/promise/latch.h', 'src/core/lib/promise/loop.h', 'src/core/lib/promise/map.h', + 'src/core/lib/promise/observable.h', 'src/core/lib/promise/party.h', 'src/core/lib/promise/pipe.h', 'src/core/lib/promise/poll.h', @@ -1557,6 +1561,7 @@ Pod::Spec.new do |s| 'src/core/channelz/channelz.h', 'src/core/channelz/channelz_registry.h', 'src/core/client_channel/backup_poller.h', + 'src/core/client_channel/client_channel.h', 'src/core/client_channel/client_channel_factory.h', 'src/core/client_channel/client_channel_filter.h', 'src/core/client_channel/client_channel_internal.h', @@ -1565,6 +1570,7 @@ Pod::Spec.new do |s| 'src/core/client_channel/connector.h', 'src/core/client_channel/dynamic_filters.h', 'src/core/client_channel/global_subchannel_pool.h', + 'src/core/client_channel/load_balanced_call_destination.h', 'src/core/client_channel/local_subchannel_pool.h', 'src/core/client_channel/retry_filter.h', 'src/core/client_channel/retry_filter_legacy_call_data.h', @@ -2239,6 +2245,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/directory_reader.h', 'src/core/lib/gprpp/down_cast.h', 'src/core/lib/gprpp/dual_ref_counted.h', + 'src/core/lib/gprpp/dump_args.h', 'src/core/lib/gprpp/env.h', 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', @@ -2360,6 +2367,7 @@ Pod::Spec.new do |s| 'src/core/lib/promise/latch.h', 'src/core/lib/promise/loop.h', 'src/core/lib/promise/map.h', + 'src/core/lib/promise/observable.h', 'src/core/lib/promise/party.h', 'src/core/lib/promise/pipe.h', 'src/core/lib/promise/poll.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 032a6bb22ff..a8cc8fdda1f 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -245,6 +245,8 @@ Pod::Spec.new do |s| 'src/core/channelz/channelz_registry.h', 'src/core/client_channel/backup_poller.cc', 'src/core/client_channel/backup_poller.h', + 'src/core/client_channel/client_channel.cc', + 'src/core/client_channel/client_channel.h', 'src/core/client_channel/client_channel_factory.cc', 'src/core/client_channel/client_channel_factory.h', 'src/core/client_channel/client_channel_filter.cc', @@ -260,6 +262,8 @@ Pod::Spec.new do |s| 'src/core/client_channel/dynamic_filters.h', 'src/core/client_channel/global_subchannel_pool.cc', 'src/core/client_channel/global_subchannel_pool.h', + 'src/core/client_channel/load_balanced_call_destination.cc', + 'src/core/client_channel/load_balanced_call_destination.h', 'src/core/client_channel/local_subchannel_pool.cc', 'src/core/client_channel/local_subchannel_pool.h', 'src/core/client_channel/retry_filter.cc', @@ -1374,6 +1378,8 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/directory_reader.h', 'src/core/lib/gprpp/down_cast.h', 'src/core/lib/gprpp/dual_ref_counted.h', + 'src/core/lib/gprpp/dump_args.cc', + 'src/core/lib/gprpp/dump_args.h', 'src/core/lib/gprpp/env.h', 'src/core/lib/gprpp/examine_stack.cc', 'src/core/lib/gprpp/examine_stack.h', @@ -1599,6 +1605,7 @@ Pod::Spec.new do |s| 'src/core/lib/promise/latch.h', 'src/core/lib/promise/loop.h', 'src/core/lib/promise/map.h', + 'src/core/lib/promise/observable.h', 'src/core/lib/promise/party.cc', 'src/core/lib/promise/party.h', 'src/core/lib/promise/pipe.h', @@ -2357,6 +2364,7 @@ Pod::Spec.new do |s| 'src/core/channelz/channelz.h', 'src/core/channelz/channelz_registry.h', 'src/core/client_channel/backup_poller.h', + 'src/core/client_channel/client_channel.h', 'src/core/client_channel/client_channel_factory.h', 'src/core/client_channel/client_channel_filter.h', 'src/core/client_channel/client_channel_internal.h', @@ -2365,6 +2373,7 @@ Pod::Spec.new do |s| 'src/core/client_channel/connector.h', 'src/core/client_channel/dynamic_filters.h', 'src/core/client_channel/global_subchannel_pool.h', + 'src/core/client_channel/load_balanced_call_destination.h', 'src/core/client_channel/local_subchannel_pool.h', 'src/core/client_channel/retry_filter.h', 'src/core/client_channel/retry_filter_legacy_call_data.h', @@ -3019,6 +3028,7 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/directory_reader.h', 'src/core/lib/gprpp/down_cast.h', 'src/core/lib/gprpp/dual_ref_counted.h', + 'src/core/lib/gprpp/dump_args.h', 'src/core/lib/gprpp/env.h', 'src/core/lib/gprpp/examine_stack.h', 'src/core/lib/gprpp/fork.h', @@ -3140,6 +3150,7 @@ Pod::Spec.new do |s| 'src/core/lib/promise/latch.h', 'src/core/lib/promise/loop.h', 'src/core/lib/promise/map.h', + 'src/core/lib/promise/observable.h', 'src/core/lib/promise/party.h', 'src/core/lib/promise/pipe.h', 'src/core/lib/promise/poll.h', diff --git a/grpc.gemspec b/grpc.gemspec index 5ce01c4fd1b..5b919662d11 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -132,6 +132,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/channelz/channelz_registry.h ) s.files += %w( src/core/client_channel/backup_poller.cc ) s.files += %w( src/core/client_channel/backup_poller.h ) + s.files += %w( src/core/client_channel/client_channel.cc ) + s.files += %w( src/core/client_channel/client_channel.h ) s.files += %w( src/core/client_channel/client_channel_factory.cc ) s.files += %w( src/core/client_channel/client_channel_factory.h ) s.files += %w( src/core/client_channel/client_channel_filter.cc ) @@ -147,6 +149,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/client_channel/dynamic_filters.h ) s.files += %w( src/core/client_channel/global_subchannel_pool.cc ) s.files += %w( src/core/client_channel/global_subchannel_pool.h ) + s.files += %w( src/core/client_channel/load_balanced_call_destination.cc ) + s.files += %w( src/core/client_channel/load_balanced_call_destination.h ) s.files += %w( src/core/client_channel/local_subchannel_pool.cc ) s.files += %w( src/core/client_channel/local_subchannel_pool.h ) s.files += %w( src/core/client_channel/retry_filter.cc ) @@ -1261,6 +1265,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/directory_reader.h ) s.files += %w( src/core/lib/gprpp/down_cast.h ) s.files += %w( src/core/lib/gprpp/dual_ref_counted.h ) + s.files += %w( src/core/lib/gprpp/dump_args.cc ) + s.files += %w( src/core/lib/gprpp/dump_args.h ) s.files += %w( src/core/lib/gprpp/env.h ) s.files += %w( src/core/lib/gprpp/examine_stack.cc ) s.files += %w( src/core/lib/gprpp/examine_stack.h ) @@ -1486,6 +1492,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/promise/latch.h ) s.files += %w( src/core/lib/promise/loop.h ) s.files += %w( src/core/lib/promise/map.h ) + s.files += %w( src/core/lib/promise/observable.h ) s.files += %w( src/core/lib/promise/party.cc ) s.files += %w( src/core/lib/promise/party.h ) s.files += %w( src/core/lib/promise/pipe.h ) diff --git a/grpc.gyp b/grpc.gyp new file mode 100644 index 00000000000..2327e4ad03a --- /dev/null +++ b/grpc.gyp @@ -0,0 +1,2669 @@ +# GRPC GYP build file + +# This file has been automatically generated from a template file. +# Please look at the templates directory instead. +# This file can be regenerated from the template by running +# tools/buildgen/generate_projects.sh + +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + 'variables': { + # The openssl and zlib dependencies must be passed in as variables + # defined in an included gypi file, usually common.gypi. + 'openssl_gyp_target%': 'Please Define openssl_gyp_target variable', + 'zlib_gyp_target%': 'Please Define zlib_gyp_target variable', + + 'grpc_gcov%': 'false', + 'grpc_alpine%': 'false', + }, + 'target_defaults': { + 'configurations': { + 'Debug': { + 'cflags': [ + '-O0', + ], + 'defines': [ + '_DEBUG', + 'DEBUG', + ], + }, + 'Release': { + 'cflags': [ + '-O2', + '-Wframe-larger-than=16384', + ], + 'defines': [ + 'NDEBUG', + ], + }, + }, + 'cflags': [ + '-g', + '-Wall', + '-Wextra', + '-DOSATOMIC_USE_INLINED=1', + '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', + '-Ithird_party/upb', + '-Isrc/core/ext/upb-gen', + '-Isrc/core/ext/upbdefs-gen', + '-Ithird_party/utf8_range', + '-Ithird_party/xxhash', + ], + 'ldflags': [ + '-g', + ], + 'cflags_c': [ + '-Werror', + '-std=c11', + ], + 'cflags_cc': [ + '-Werror', + '-std=c++14', + ], + 'include_dirs': [ + '.', + '../..', + 'include', + ], + 'defines': [ + 'GRPC_ARES=0', + ], + 'dependencies': [ + '<(openssl_gyp_target)', + '<(zlib_gyp_target)', + ], + 'conditions': [ + ['grpc_gcov=="true"', { + 'cflags': [ + '-O0', + '-fprofile-arcs', + '-ftest-coverage', + '-Wno-return-type', + ], + 'defines': [ + '_DEBUG', + 'DEBUG', + 'GPR_GCOV', + ], + 'ldflags': [ + '-fprofile-arcs', + '-ftest-coverage', + '-rdynamic', + '-lstdc++', + ], + }], + ['grpc_alpine=="true"', { + 'defines': [ + 'GPR_MUSL_LIBC_COMPAT' + ] + }], + ['OS == "win"', { + 'defines': [ + '_WIN32_WINNT=0x0600', + 'WIN32_LEAN_AND_MEAN', + '_HAS_EXCEPTIONS=0', + 'UNICODE', + '_UNICODE', + 'NOMINMAX', + ], + 'msvs_settings': { + 'VCCLCompilerTool': { + 'RuntimeLibrary': 1, # static debug + } + }, + "libraries": [ + "ws2_32" + ] + }], + ['OS == "mac"', { + 'xcode_settings': { + 'OTHER_CFLAGS': [ + '-g', + '-Wall', + '-Wextra', + '-DOSATOMIC_USE_INLINED=1', + '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', + '-Ithird_party/upb', + '-Isrc/core/ext/upb-gen', + '-Isrc/core/ext/upbdefs-gen', + '-Ithird_party/utf8_range', + '-Ithird_party/xxhash', + ], + 'OTHER_CPLUSPLUSFLAGS': [ + '-g', + '-Wall', + '-Wextra', + '-DOSATOMIC_USE_INLINED=1', + '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', + '-Ithird_party/upb', + '-Isrc/core/ext/upb-gen', + '-Isrc/core/ext/upbdefs-gen', + '-Ithird_party/utf8_range', + '-Ithird_party/xxhash', + '-stdlib=libc++', + '-std=c++14', + '-Wno-error=deprecated-declarations', + ], + }, + }] + ] + }, + 'targets': [ + { + 'target_name': 'address_sorting', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/address_sorting/address_sorting.c', + 'third_party/address_sorting/address_sorting_posix.c', + 'third_party/address_sorting/address_sorting_windows.c', + ], + }, + { + 'target_name': 'gpr', + 'type': 'static_library', + 'dependencies': [ + 'absl/base:base', + 'absl/base:core_headers', + 'absl/flags:flag', + 'absl/flags:marshalling', + 'absl/functional:any_invocable', + 'absl/memory:memory', + 'absl/random:random', + 'absl/status:status', + 'absl/strings:cord', + 'absl/strings:str_format', + 'absl/strings:strings', + 'absl/synchronization:synchronization', + 'absl/time:time', + 'absl/types:optional', + 'absl/types:variant', + ], + 'sources': [ + 'src/core/lib/config/config_vars.cc', + 'src/core/lib/config/config_vars_non_generated.cc', + 'src/core/lib/config/load_config.cc', + 'src/core/lib/event_engine/thread_local.cc', + 'src/core/lib/gpr/alloc.cc', + 'src/core/lib/gpr/android/log.cc', + 'src/core/lib/gpr/atm.cc', + 'src/core/lib/gpr/iphone/cpu.cc', + 'src/core/lib/gpr/linux/cpu.cc', + 'src/core/lib/gpr/linux/log.cc', + 'src/core/lib/gpr/log.cc', + 'src/core/lib/gpr/msys/tmpfile.cc', + 'src/core/lib/gpr/posix/cpu.cc', + 'src/core/lib/gpr/posix/log.cc', + 'src/core/lib/gpr/posix/string.cc', + 'src/core/lib/gpr/posix/sync.cc', + 'src/core/lib/gpr/posix/time.cc', + 'src/core/lib/gpr/posix/tmpfile.cc', + 'src/core/lib/gpr/string.cc', + 'src/core/lib/gpr/sync.cc', + 'src/core/lib/gpr/sync_abseil.cc', + 'src/core/lib/gpr/time.cc', + 'src/core/lib/gpr/time_precise.cc', + 'src/core/lib/gpr/windows/cpu.cc', + 'src/core/lib/gpr/windows/log.cc', + 'src/core/lib/gpr/windows/string.cc', + 'src/core/lib/gpr/windows/string_util.cc', + 'src/core/lib/gpr/windows/sync.cc', + 'src/core/lib/gpr/windows/time.cc', + 'src/core/lib/gpr/windows/tmpfile.cc', + 'src/core/lib/gprpp/crash.cc', + 'src/core/lib/gprpp/examine_stack.cc', + 'src/core/lib/gprpp/fork.cc', + 'src/core/lib/gprpp/host_port.cc', + 'src/core/lib/gprpp/linux/env.cc', + 'src/core/lib/gprpp/mpscq.cc', + 'src/core/lib/gprpp/posix/env.cc', + 'src/core/lib/gprpp/posix/stat.cc', + 'src/core/lib/gprpp/posix/thd.cc', + 'src/core/lib/gprpp/strerror.cc', + 'src/core/lib/gprpp/tchar.cc', + 'src/core/lib/gprpp/time_util.cc', + 'src/core/lib/gprpp/windows/env.cc', + 'src/core/lib/gprpp/windows/stat.cc', + 'src/core/lib/gprpp/windows/thd.cc', + ], + }, + { + 'target_name': 'grpc', + 'type': 'static_library', + 'dependencies': [ + 'upb_json_lib', + 'upb_textformat_lib', + 're2', + 'z', + 'absl/algorithm:container', + 'absl/base:config', + 'absl/base:no_destructor', + 'absl/cleanup:cleanup', + 'absl/container:flat_hash_map', + 'absl/container:flat_hash_set', + 'absl/container:inlined_vector', + 'absl/functional:bind_front', + 'absl/functional:function_ref', + 'absl/hash:hash', + 'absl/meta:type_traits', + 'absl/random:bit_gen_ref', + 'absl/random:distributions', + 'absl/status:statusor', + 'absl/types:span', + 'absl/utility:utility', + 'cares', + 'gpr', + 'address_sorting', + ], + 'sources': [ + 'src/core/client_channel/backup_poller.cc', + 'src/core/client_channel/client_channel.cc', + 'src/core/client_channel/client_channel_channelz.cc', + 'src/core/client_channel/client_channel_factory.cc', + 'src/core/client_channel/client_channel_filter.cc', + 'src/core/client_channel/client_channel_plugin.cc', + 'src/core/client_channel/client_channel_service_config.cc', + 'src/core/client_channel/config_selector.cc', + 'src/core/client_channel/dynamic_filters.cc', + 'src/core/client_channel/global_subchannel_pool.cc', + 'src/core/client_channel/http_proxy_mapper.cc', + 'src/core/client_channel/local_subchannel_pool.cc', + 'src/core/client_channel/retry_filter.cc', + 'src/core/client_channel/retry_filter_legacy_call_data.cc', + 'src/core/client_channel/retry_service_config.cc', + 'src/core/client_channel/retry_throttle.cc', + 'src/core/client_channel/subchannel.cc', + 'src/core/client_channel/subchannel_pool_interface.cc', + 'src/core/client_channel/subchannel_stream_client.cc', + 'src/core/ext/filters/backend_metrics/backend_metric_filter.cc', + 'src/core/ext/filters/census/grpc_context.cc', + 'src/core/ext/filters/channel_idle/channel_idle_filter.cc', + 'src/core/ext/filters/channel_idle/idle_filter_state.cc', + 'src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc', + 'src/core/ext/filters/deadline/deadline_filter.cc', + 'src/core/ext/filters/fault_injection/fault_injection_filter.cc', + 'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc', + 'src/core/ext/filters/http/client/http_client_filter.cc', + 'src/core/ext/filters/http/client_authority_filter.cc', + 'src/core/ext/filters/http/http_filters_plugin.cc', + 'src/core/ext/filters/http/message_compress/compression_filter.cc', + 'src/core/ext/filters/http/message_compress/legacy_compression_filter.cc', + 'src/core/ext/filters/http/server/http_server_filter.cc', + 'src/core/ext/filters/message_size/message_size_filter.cc', + 'src/core/ext/filters/rbac/rbac_filter.cc', + 'src/core/ext/filters/rbac/rbac_service_config_parser.cc', + 'src/core/ext/filters/server_config_selector/server_config_selector_filter.cc', + 'src/core/ext/filters/stateful_session/stateful_session_filter.cc', + 'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc', + 'src/core/ext/gcp/metadata_query.cc', + 'src/core/ext/transport/chttp2/alpn/alpn.cc', + 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/transport/chttp2/server/chttp2_server.cc', + 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', + 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', + 'src/core/ext/transport/chttp2/transport/decode_huff.cc', + 'src/core/ext/transport/chttp2/transport/flow_control.cc', + 'src/core/ext/transport/chttp2/transport/frame.cc', + 'src/core/ext/transport/chttp2/transport/frame_data.cc', + 'src/core/ext/transport/chttp2/transport/frame_goaway.cc', + 'src/core/ext/transport/chttp2/transport/frame_ping.cc', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc', + 'src/core/ext/transport/chttp2/transport/frame_settings.cc', + 'src/core/ext/transport/chttp2/transport/frame_window_update.cc', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc', + 'src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parse_result.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parser.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parser_table.cc', + 'src/core/ext/transport/chttp2/transport/http2_settings.cc', + 'src/core/ext/transport/chttp2/transport/http_trace.cc', + 'src/core/ext/transport/chttp2/transport/huffsyms.cc', + 'src/core/ext/transport/chttp2/transport/max_concurrent_streams_policy.cc', + 'src/core/ext/transport/chttp2/transport/parsing.cc', + 'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc', + 'src/core/ext/transport/chttp2/transport/ping_callbacks.cc', + 'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc', + 'src/core/ext/transport/chttp2/transport/stream_lists.cc', + 'src/core/ext/transport/chttp2/transport/varint.cc', + 'src/core/ext/transport/chttp2/transport/write_size_policy.cc', + 'src/core/ext/transport/chttp2/transport/writing.cc', + 'src/core/ext/transport/inproc/inproc_plugin.cc', + 'src/core/ext/transport/inproc/inproc_transport.cc', + 'src/core/ext/transport/inproc/legacy_inproc_transport.cc', + 'src/core/ext/upb-gen/envoy/admin/v3/certs.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/config_dump.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/init_dump.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/listeners.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/memory.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/mutex_stats.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/admin/v3/tap.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/annotations/deprecation.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/annotations/resource.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/cluster/v3/filter.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/backoff.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/event_service_config.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/extension.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/grpc_method_list.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/resolver.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/core/v3/udp_socket_config.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/listener/v3/api_listener.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/listener/v3/udp_listener_config.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/datadog.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/dynamic_ot.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/http_tracer.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/lightstep.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/service.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/common/fault/v3/fault.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/cert.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/service/discovery/v3/ads.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/node.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/number.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/path.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/string.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/struct.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/matcher/v3/value.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/metadata/v3/metadata.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/hash_policy.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/http.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/http_status.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/percent.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/range.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/ratelimit_strategy.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/ratelimit_unit.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/semantic_version.upb_minitable.c', + 'src/core/ext/upb-gen/envoy/type/v3/token_bucket.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/annotations.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/http.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/httpbody.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/empty.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.c', + 'src/core/ext/upb-gen/google/rpc/status.upb_minitable.c', + 'src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.c', + 'src/core/ext/upb-gen/udpa/annotations/migrate.upb_minitable.c', + 'src/core/ext/upb-gen/udpa/annotations/security.upb_minitable.c', + 'src/core/ext/upb-gen/udpa/annotations/sensitive.upb_minitable.c', + 'src/core/ext/upb-gen/udpa/annotations/status.upb_minitable.c', + 'src/core/ext/upb-gen/udpa/annotations/versioning.upb_minitable.c', + 'src/core/ext/upb-gen/validate/validate.upb_minitable.c', + 'src/core/ext/upb-gen/xds/annotations/v3/migrate.upb_minitable.c', + 'src/core/ext/upb-gen/xds/annotations/v3/security.upb_minitable.c', + 'src/core/ext/upb-gen/xds/annotations/v3/sensitive.upb_minitable.c', + 'src/core/ext/upb-gen/xds/annotations/v3/status.upb_minitable.c', + 'src/core/ext/upb-gen/xds/annotations/v3/versioning.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/authority.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/cidr.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/collection_entry.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/context_params.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/extension.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.c', + 'src/core/ext/upb-gen/xds/core/v3/resource_name.upb_minitable.c', + 'src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c', + 'src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/domain.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/range.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/regex.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/matcher/v3/string.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/v3/cel.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/v3/range.upb_minitable.c', + 'src/core/ext/upb-gen/xds/type/v3/typed_struct.upb_minitable.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/certs.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/clusters.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/config_dump.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/config_dump_shared.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/init_dump.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/listeners.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/memory.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/metrics.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/mutex_stats.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/admin/v3/tap.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/annotations/deprecation.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/annotations/resource.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/accesslog/v3/accesslog.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/cluster/v3/circuit_breaker.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/cluster/v3/filter.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/cluster/v3/outlier_detection.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/common/matcher/v3/matcher.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/address.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/backoff.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/config_source.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/event_service_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/extension.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/grpc_method_list.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/grpc_service.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/health_check.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/http_service.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/http_uri.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/proxy_protocol.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/resolver.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/substitution_format_string.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/core/v3/udp_socket_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/load_report.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/listener/v3/api_listener.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener_components.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/listener/v3/quic_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/listener/v3/udp_listener_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/metrics/v3/metrics_service.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/metrics/v3/stats.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/route/v3/route.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/route/v3/scoped_route.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/tap/v3/common.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/datadog.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/dynamic_ot.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/http_tracer.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/lightstep.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/opencensus.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/opentelemetry.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/service.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/skywalking.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/trace.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/xray.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/config/trace/v3/zipkin.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/data/accesslog/v3/accesslog.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/http/rbac/v3/rbac.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/http/router/v3/router.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/http/stateful_session/cookie/v3/cookie.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/service/discovery/v3/ads.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/service/discovery/v3/discovery.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/service/load_stats/v3/lrs.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/http/v3/cookie.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/http/v3/path_transformation.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/filter_state.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/http_inputs.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/metadata.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/node.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/number.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/path.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/regex.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/string.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/struct.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/matcher/v3/value.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/metadata/v3/metadata.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/tracing/v3/custom_tag.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/hash_policy.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/http.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/http_status.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/percent.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/range.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/ratelimit_strategy.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/ratelimit_unit.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/semantic_version.upbdefs.c', + 'src/core/ext/upbdefs-gen/envoy/type/v3/token_bucket.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/api/annotations.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/api/expr/v1alpha1/checked.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/api/expr/v1alpha1/syntax.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/api/http.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/api/httpbody.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/any.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/descriptor.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/duration.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/empty.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/struct.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/timestamp.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/protobuf/wrappers.upbdefs.c', + 'src/core/ext/upbdefs-gen/google/rpc/status.upbdefs.c', + 'src/core/ext/upbdefs-gen/opencensus/proto/trace/v1/trace_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/src/proto/grpc/lookup/v1/rls_config.upbdefs.c', + 'src/core/ext/upbdefs-gen/udpa/annotations/migrate.upbdefs.c', + 'src/core/ext/upbdefs-gen/udpa/annotations/security.upbdefs.c', + 'src/core/ext/upbdefs-gen/udpa/annotations/sensitive.upbdefs.c', + 'src/core/ext/upbdefs-gen/udpa/annotations/status.upbdefs.c', + 'src/core/ext/upbdefs-gen/udpa/annotations/versioning.upbdefs.c', + 'src/core/ext/upbdefs-gen/validate/validate.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/annotations/v3/migrate.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/annotations/v3/security.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/annotations/v3/sensitive.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/annotations/v3/status.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/annotations/v3/versioning.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/authority.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/cidr.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/collection_entry.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/context_params.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/extension.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/resource.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/resource_locator.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/core/v3/resource_name.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/cel.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/domain.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/http_inputs.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/ip.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/matcher.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/range.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/regex.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/matcher/v3/string.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/v3/cel.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/v3/range.upbdefs.c', + 'src/core/ext/upbdefs-gen/xds/type/v3/typed_struct.upbdefs.c', + 'src/core/ext/xds/certificate_provider_store.cc', + 'src/core/ext/xds/file_watcher_certificate_provider_factory.cc', + 'src/core/ext/xds/xds_api.cc', + 'src/core/ext/xds/xds_audit_logger_registry.cc', + 'src/core/ext/xds/xds_bootstrap.cc', + 'src/core/ext/xds/xds_bootstrap_grpc.cc', + 'src/core/ext/xds/xds_certificate_provider.cc', + 'src/core/ext/xds/xds_channel_stack_modifier.cc', + 'src/core/ext/xds/xds_client.cc', + 'src/core/ext/xds/xds_client_grpc.cc', + 'src/core/ext/xds/xds_client_stats.cc', + 'src/core/ext/xds/xds_cluster.cc', + 'src/core/ext/xds/xds_cluster_specifier_plugin.cc', + 'src/core/ext/xds/xds_common_types.cc', + 'src/core/ext/xds/xds_endpoint.cc', + 'src/core/ext/xds/xds_health_status.cc', + 'src/core/ext/xds/xds_http_fault_filter.cc', + 'src/core/ext/xds/xds_http_filters.cc', + 'src/core/ext/xds/xds_http_rbac_filter.cc', + 'src/core/ext/xds/xds_http_stateful_session_filter.cc', + 'src/core/ext/xds/xds_lb_policy_registry.cc', + 'src/core/ext/xds/xds_listener.cc', + 'src/core/ext/xds/xds_route_config.cc', + 'src/core/ext/xds/xds_routing.cc', + 'src/core/ext/xds/xds_server_config_fetcher.cc', + 'src/core/ext/xds/xds_transport_grpc.cc', + 'src/core/lib/address_utils/parse_address.cc', + 'src/core/lib/address_utils/sockaddr_utils.cc', + 'src/core/lib/backoff/backoff.cc', + 'src/core/lib/backoff/random_early_detection.cc', + 'src/core/lib/channel/call_tracer.cc', + 'src/core/lib/channel/channel_args.cc', + 'src/core/lib/channel/channel_args_preconditioning.cc', + 'src/core/lib/channel/channel_stack.cc', + 'src/core/lib/channel/channel_stack_builder.cc', + 'src/core/lib/channel/channel_stack_builder_impl.cc', + 'src/core/lib/channel/channel_stack_trace.cc', + 'src/core/lib/channel/channel_trace.cc', + 'src/core/lib/channel/channelz.cc', + 'src/core/lib/channel/channelz_registry.cc', + 'src/core/lib/channel/connected_channel.cc', + 'src/core/lib/channel/metrics.cc', + 'src/core/lib/channel/promise_based_filter.cc', + 'src/core/lib/channel/server_call_tracer_filter.cc', + 'src/core/lib/channel/status_util.cc', + 'src/core/lib/compression/compression.cc', + 'src/core/lib/compression/compression_internal.cc', + 'src/core/lib/compression/message_compress.cc', + 'src/core/lib/config/core_configuration.cc', + 'src/core/lib/debug/event_log.cc', + 'src/core/lib/debug/histogram_view.cc', + 'src/core/lib/debug/stats.cc', + 'src/core/lib/debug/stats_data.cc', + 'src/core/lib/debug/trace.cc', + 'src/core/lib/event_engine/ares_resolver.cc', + 'src/core/lib/event_engine/cf_engine/cf_engine.cc', + 'src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc', + 'src/core/lib/event_engine/cf_engine/dns_service_resolver.cc', + 'src/core/lib/event_engine/channel_args_endpoint_config.cc', + 'src/core/lib/event_engine/default_event_engine.cc', + 'src/core/lib/event_engine/default_event_engine_factory.cc', + 'src/core/lib/event_engine/event_engine.cc', + 'src/core/lib/event_engine/forkable.cc', + 'src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc', + 'src/core/lib/event_engine/posix_engine/ev_poll_posix.cc', + 'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc', + 'src/core/lib/event_engine/posix_engine/internal_errqueue.cc', + 'src/core/lib/event_engine/posix_engine/lockfree_event.cc', + 'src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc', + 'src/core/lib/event_engine/posix_engine/posix_endpoint.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc', + 'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/posix_engine/timer.cc', + 'src/core/lib/event_engine/posix_engine/timer_heap.cc', + 'src/core/lib/event_engine/posix_engine/timer_manager.cc', + 'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc', + 'src/core/lib/event_engine/resolved_address.cc', + 'src/core/lib/event_engine/shim.cc', + 'src/core/lib/event_engine/slice.cc', + 'src/core/lib/event_engine/slice_buffer.cc', + 'src/core/lib/event_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/thread_pool/thread_count.cc', + 'src/core/lib/event_engine/thread_pool/thread_pool_factory.cc', + 'src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc', + 'src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc', + 'src/core/lib/event_engine/time_util.cc', + 'src/core/lib/event_engine/trace.cc', + 'src/core/lib/event_engine/utils.cc', + 'src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc', + 'src/core/lib/event_engine/windows/iocp.cc', + 'src/core/lib/event_engine/windows/native_windows_dns_resolver.cc', + 'src/core/lib/event_engine/windows/win_socket.cc', + 'src/core/lib/event_engine/windows/windows_endpoint.cc', + 'src/core/lib/event_engine/windows/windows_engine.cc', + 'src/core/lib/event_engine/windows/windows_listener.cc', + 'src/core/lib/event_engine/work_queue/basic_work_queue.cc', + 'src/core/lib/experiments/config.cc', + 'src/core/lib/experiments/experiments.cc', + 'src/core/lib/gprpp/load_file.cc', + 'src/core/lib/gprpp/per_cpu.cc', + 'src/core/lib/gprpp/posix/directory_reader.cc', + 'src/core/lib/gprpp/ref_counted_string.cc', + 'src/core/lib/gprpp/status_helper.cc', + 'src/core/lib/gprpp/time.cc', + 'src/core/lib/gprpp/time_averaged_stats.cc', + 'src/core/lib/gprpp/validation_errors.cc', + 'src/core/lib/gprpp/windows/directory_reader.cc', + 'src/core/lib/gprpp/work_serializer.cc', + 'src/core/lib/handshaker/proxy_mapper_registry.cc', + 'src/core/lib/http/format_request.cc', + 'src/core/lib/http/httpcli.cc', + 'src/core/lib/http/httpcli_security_connector.cc', + 'src/core/lib/http/parser.cc', + 'src/core/lib/iomgr/buffer_list.cc', + 'src/core/lib/iomgr/call_combiner.cc', + 'src/core/lib/iomgr/cfstream_handle.cc', + 'src/core/lib/iomgr/closure.cc', + 'src/core/lib/iomgr/combiner.cc', + 'src/core/lib/iomgr/dualstack_socket_posix.cc', + 'src/core/lib/iomgr/endpoint.cc', + 'src/core/lib/iomgr/endpoint_cfstream.cc', + 'src/core/lib/iomgr/endpoint_pair_posix.cc', + 'src/core/lib/iomgr/endpoint_pair_windows.cc', + 'src/core/lib/iomgr/error.cc', + 'src/core/lib/iomgr/error_cfstream.cc', + 'src/core/lib/iomgr/ev_apple.cc', + 'src/core/lib/iomgr/ev_epoll1_linux.cc', + 'src/core/lib/iomgr/ev_poll_posix.cc', + 'src/core/lib/iomgr/ev_posix.cc', + 'src/core/lib/iomgr/ev_windows.cc', + 'src/core/lib/iomgr/event_engine_shims/closure.cc', + 'src/core/lib/iomgr/event_engine_shims/endpoint.cc', + 'src/core/lib/iomgr/event_engine_shims/tcp_client.cc', + 'src/core/lib/iomgr/exec_ctx.cc', + 'src/core/lib/iomgr/executor.cc', + 'src/core/lib/iomgr/fork_posix.cc', + 'src/core/lib/iomgr/fork_windows.cc', + 'src/core/lib/iomgr/gethostname_fallback.cc', + 'src/core/lib/iomgr/gethostname_host_name_max.cc', + 'src/core/lib/iomgr/gethostname_sysconf.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_posix.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc', + 'src/core/lib/iomgr/internal_errqueue.cc', + 'src/core/lib/iomgr/iocp_windows.cc', + 'src/core/lib/iomgr/iomgr.cc', + 'src/core/lib/iomgr/iomgr_internal.cc', + 'src/core/lib/iomgr/iomgr_posix.cc', + 'src/core/lib/iomgr/iomgr_posix_cfstream.cc', + 'src/core/lib/iomgr/iomgr_windows.cc', + 'src/core/lib/iomgr/lockfree_event.cc', + 'src/core/lib/iomgr/polling_entity.cc', + 'src/core/lib/iomgr/pollset.cc', + 'src/core/lib/iomgr/pollset_set.cc', + 'src/core/lib/iomgr/pollset_set_windows.cc', + 'src/core/lib/iomgr/pollset_windows.cc', + 'src/core/lib/iomgr/resolve_address.cc', + 'src/core/lib/iomgr/resolve_address_posix.cc', + 'src/core/lib/iomgr/resolve_address_windows.cc', + 'src/core/lib/iomgr/sockaddr_utils_posix.cc', + 'src/core/lib/iomgr/socket_factory_posix.cc', + 'src/core/lib/iomgr/socket_mutator.cc', + 'src/core/lib/iomgr/socket_utils_common_posix.cc', + 'src/core/lib/iomgr/socket_utils_linux.cc', + 'src/core/lib/iomgr/socket_utils_posix.cc', + 'src/core/lib/iomgr/socket_utils_windows.cc', + 'src/core/lib/iomgr/socket_windows.cc', + 'src/core/lib/iomgr/systemd_utils.cc', + 'src/core/lib/iomgr/tcp_client.cc', + 'src/core/lib/iomgr/tcp_client_cfstream.cc', + 'src/core/lib/iomgr/tcp_client_posix.cc', + 'src/core/lib/iomgr/tcp_client_windows.cc', + 'src/core/lib/iomgr/tcp_posix.cc', + 'src/core/lib/iomgr/tcp_server.cc', + 'src/core/lib/iomgr/tcp_server_posix.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_windows.cc', + 'src/core/lib/iomgr/tcp_windows.cc', + 'src/core/lib/iomgr/timer.cc', + 'src/core/lib/iomgr/timer_generic.cc', + 'src/core/lib/iomgr/timer_heap.cc', + 'src/core/lib/iomgr/timer_manager.cc', + 'src/core/lib/iomgr/unix_sockets_posix.cc', + 'src/core/lib/iomgr/unix_sockets_posix_noop.cc', + 'src/core/lib/iomgr/vsock.cc', + 'src/core/lib/iomgr/wakeup_fd_eventfd.cc', + 'src/core/lib/iomgr/wakeup_fd_nospecial.cc', + 'src/core/lib/iomgr/wakeup_fd_pipe.cc', + 'src/core/lib/iomgr/wakeup_fd_posix.cc', + 'src/core/lib/json/json_object_loader.cc', + 'src/core/lib/json/json_reader.cc', + 'src/core/lib/json/json_util.cc', + 'src/core/lib/json/json_writer.cc', + 'src/core/lib/matchers/matchers.cc', + 'src/core/lib/promise/activity.cc', + 'src/core/lib/promise/party.cc', + 'src/core/lib/promise/sleep.cc', + 'src/core/lib/promise/trace.cc', + 'src/core/lib/resource_quota/api.cc', + 'src/core/lib/resource_quota/arena.cc', + 'src/core/lib/resource_quota/memory_quota.cc', + 'src/core/lib/resource_quota/periodic_update.cc', + 'src/core/lib/resource_quota/resource_quota.cc', + 'src/core/lib/resource_quota/thread_quota.cc', + 'src/core/lib/resource_quota/trace.cc', + 'src/core/lib/security/authorization/audit_logging.cc', + 'src/core/lib/security/authorization/authorization_policy_provider_vtable.cc', + 'src/core/lib/security/authorization/evaluate_args.cc', + 'src/core/lib/security/authorization/grpc_authorization_engine.cc', + 'src/core/lib/security/authorization/grpc_server_authz_filter.cc', + 'src/core/lib/security/authorization/matchers.cc', + 'src/core/lib/security/authorization/rbac_policy.cc', + 'src/core/lib/security/authorization/stdout_logger.cc', + 'src/core/lib/security/certificate_provider/certificate_provider_registry.cc', + 'src/core/lib/security/context/security_context.cc', + 'src/core/lib/security/credentials/alts/alts_credentials.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc', + 'src/core/lib/security/credentials/call_creds_util.cc', + 'src/core/lib/security/credentials/channel_creds_registry_init.cc', + 'src/core/lib/security/credentials/composite/composite_credentials.cc', + 'src/core/lib/security/credentials/credentials.cc', + 'src/core/lib/security/credentials/external/aws_external_account_credentials.cc', + 'src/core/lib/security/credentials/external/aws_request_signer.cc', + 'src/core/lib/security/credentials/external/external_account_credentials.cc', + 'src/core/lib/security/credentials/external/file_external_account_credentials.cc', + 'src/core/lib/security/credentials/external/url_external_account_credentials.cc', + 'src/core/lib/security/credentials/fake/fake_credentials.cc', + 'src/core/lib/security/credentials/google_default/credentials_generic.cc', + 'src/core/lib/security/credentials/google_default/google_default_credentials.cc', + 'src/core/lib/security/credentials/iam/iam_credentials.cc', + 'src/core/lib/security/credentials/insecure/insecure_credentials.cc', + 'src/core/lib/security/credentials/jwt/json_token.cc', + 'src/core/lib/security/credentials/jwt/jwt_credentials.cc', + 'src/core/lib/security/credentials/jwt/jwt_verifier.cc', + 'src/core/lib/security/credentials/local/local_credentials.cc', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.cc', + 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', + 'src/core/lib/security/credentials/ssl/ssl_credentials.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_certificate_match.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc', + 'src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc', + 'src/core/lib/security/credentials/tls/tls_credentials.cc', + 'src/core/lib/security/credentials/tls/tls_utils.cc', + 'src/core/lib/security/credentials/xds/xds_credentials.cc', + 'src/core/lib/security/security_connector/alts/alts_security_connector.cc', + 'src/core/lib/security/security_connector/fake/fake_security_connector.cc', + 'src/core/lib/security/security_connector/insecure/insecure_security_connector.cc', + 'src/core/lib/security/security_connector/load_system_roots_fallback.cc', + 'src/core/lib/security/security_connector/load_system_roots_supported.cc', + 'src/core/lib/security/security_connector/load_system_roots_windows.cc', + 'src/core/lib/security/security_connector/local/local_security_connector.cc', + 'src/core/lib/security/security_connector/security_connector.cc', + 'src/core/lib/security/security_connector/ssl/ssl_security_connector.cc', + 'src/core/lib/security/security_connector/ssl_utils.cc', + 'src/core/lib/security/security_connector/tls/tls_security_connector.cc', + 'src/core/lib/security/transport/client_auth_filter.cc', + 'src/core/lib/security/transport/legacy_server_auth_filter.cc', + 'src/core/lib/security/transport/secure_endpoint.cc', + 'src/core/lib/security/transport/security_handshaker.cc', + 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/tsi_error.cc', + 'src/core/lib/security/util/json_util.cc', + 'src/core/lib/slice/b64.cc', + 'src/core/lib/slice/percent_encoding.cc', + 'src/core/lib/slice/slice.cc', + 'src/core/lib/slice/slice_buffer.cc', + 'src/core/lib/slice/slice_refcount.cc', + 'src/core/lib/slice/slice_string_helpers.cc', + 'src/core/lib/surface/api_trace.cc', + 'src/core/lib/surface/byte_buffer.cc', + 'src/core/lib/surface/byte_buffer_reader.cc', + 'src/core/lib/surface/call.cc', + 'src/core/lib/surface/call_details.cc', + 'src/core/lib/surface/call_log_batch.cc', + 'src/core/lib/surface/channel.cc', + 'src/core/lib/surface/channel_create.cc', + 'src/core/lib/surface/channel_init.cc', + 'src/core/lib/surface/channel_stack_type.cc', + 'src/core/lib/surface/completion_queue.cc', + 'src/core/lib/surface/completion_queue_factory.cc', + 'src/core/lib/surface/event_string.cc', + 'src/core/lib/surface/init.cc', + 'src/core/lib/surface/init_internally.cc', + 'src/core/lib/surface/lame_client.cc', + 'src/core/lib/surface/legacy_channel.cc', + 'src/core/lib/surface/metadata_array.cc', + 'src/core/lib/surface/server.cc', + 'src/core/lib/surface/validate_metadata.cc', + 'src/core/lib/surface/version.cc', + 'src/core/lib/surface/wait_for_cq_end_op.cc', + 'src/core/lib/transport/batch_builder.cc', + 'src/core/lib/transport/bdp_estimator.cc', + 'src/core/lib/transport/call_filters.cc', + 'src/core/lib/transport/call_final_info.cc', + 'src/core/lib/transport/call_size_estimator.cc', + 'src/core/lib/transport/call_spine.cc', + 'src/core/lib/transport/connectivity_state.cc', + 'src/core/lib/transport/error_utils.cc', + 'src/core/lib/transport/handshaker.cc', + 'src/core/lib/transport/handshaker_registry.cc', + 'src/core/lib/transport/http_connect_handshaker.cc', + 'src/core/lib/transport/message.cc', + 'src/core/lib/transport/metadata.cc', + 'src/core/lib/transport/metadata_batch.cc', + 'src/core/lib/transport/metadata_info.cc', + 'src/core/lib/transport/parsed_metadata.cc', + 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/tcp_connect_handshaker.cc', + 'src/core/lib/transport/timeout_encoding.cc', + 'src/core/lib/transport/transport.cc', + 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', + 'src/core/load_balancing/address_filtering.cc', + 'src/core/load_balancing/backend_metric_parser.cc', + 'src/core/load_balancing/child_policy_handler.cc', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/ring_hash/ring_hash.cc', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', + 'src/core/load_balancing/xds/cds.cc', + 'src/core/load_balancing/xds/xds_cluster_impl.cc', + 'src/core/load_balancing/xds/xds_cluster_manager.cc', + 'src/core/load_balancing/xds/xds_override_host.cc', + 'src/core/load_balancing/xds/xds_wrr_locality.cc', + 'src/core/plugin_registry/grpc_plugin_registry.cc', + 'src/core/plugin_registry/grpc_plugin_registry_extra.cc', + 'src/core/resolver/binder/binder_resolver.cc', + 'src/core/resolver/dns/c_ares/dns_resolver_ares.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc', + 'src/core/resolver/dns/dns_resolver_plugin.cc', + 'src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc', + 'src/core/resolver/dns/event_engine/service_config_helper.cc', + 'src/core/resolver/dns/native/dns_resolver.cc', + 'src/core/resolver/endpoint_addresses.cc', + 'src/core/resolver/fake/fake_resolver.cc', + 'src/core/resolver/google_c2p/google_c2p_resolver.cc', + 'src/core/resolver/polling_resolver.cc', + 'src/core/resolver/resolver.cc', + 'src/core/resolver/resolver_registry.cc', + 'src/core/resolver/sockaddr/sockaddr_resolver.cc', + 'src/core/resolver/xds/xds_dependency_manager.cc', + 'src/core/resolver/xds/xds_resolver.cc', + 'src/core/resolver/xds/xds_resolver_trace.cc', + 'src/core/service_config/service_config_channel_arg_filter.cc', + 'src/core/service_config/service_config_impl.cc', + 'src/core/service_config/service_config_parser.cc', + 'src/core/tsi/alts/crypt/aes_gcm.cc', + 'src/core/tsi/alts/crypt/gsec.cc', + 'src/core/tsi/alts/frame_protector/alts_counter.cc', + 'src/core/tsi/alts/frame_protector/alts_crypter.cc', + 'src/core/tsi/alts/frame_protector/alts_frame_protector.cc', + 'src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.cc', + 'src/core/tsi/alts/frame_protector/alts_seal_privacy_integrity_crypter.cc', + 'src/core/tsi/alts/frame_protector/alts_unseal_privacy_integrity_crypter.cc', + 'src/core/tsi/alts/frame_protector/frame_handler.cc', + 'src/core/tsi/alts/handshaker/alts_handshaker_client.cc', + 'src/core/tsi/alts/handshaker/alts_shared_resource.cc', + 'src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc', + 'src/core/tsi/alts/handshaker/alts_tsi_utils.cc', + 'src/core/tsi/alts/handshaker/transport_security_common_api.cc', + 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc', + 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc', + 'src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc', + 'src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc', + 'src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc', + 'src/core/tsi/fake_transport_security.cc', + 'src/core/tsi/local_transport_security.cc', + 'src/core/tsi/ssl/key_logging/ssl_key_logging.cc', + 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc', + 'src/core/tsi/ssl/session_cache/ssl_session_cache.cc', + 'src/core/tsi/ssl/session_cache/ssl_session_openssl.cc', + 'src/core/tsi/ssl_transport_security.cc', + 'src/core/tsi/ssl_transport_security_utils.cc', + 'src/core/tsi/transport_security.cc', + 'src/core/tsi/transport_security_grpc.cc', + ], + }, + { + 'target_name': 'grpc_test_util', + 'type': 'static_library', + 'dependencies': [ + 'absl/debugging:failure_signal_handler', + 'absl/debugging:stacktrace', + 'absl/debugging:symbolize', + 'grpc', + ], + 'sources': [ + 'test/core/event_engine/test_init.cc', + 'test/core/util/build.cc', + 'test/core/util/port.cc', + 'test/core/util/port_isolated_runtime_environment.cc', + 'test/core/util/port_server_client.cc', + 'test/core/util/reconnect_server.cc', + 'test/core/util/stack_tracer.cc', + 'test/core/util/test_config.cc', + 'test/core/util/test_tcp_server.cc', + 'test/core/util/tls_utils.cc', + ], + }, + { + 'target_name': 'grpc_test_util_unsecure', + 'type': 'static_library', + 'dependencies': [ + 'absl/debugging:failure_signal_handler', + 'absl/debugging:stacktrace', + 'absl/debugging:symbolize', + 'grpc_unsecure', + ], + 'sources': [ + 'test/core/event_engine/test_init.cc', + 'test/core/util/build.cc', + 'test/core/util/port.cc', + 'test/core/util/port_isolated_runtime_environment.cc', + 'test/core/util/port_server_client.cc', + 'test/core/util/reconnect_server.cc', + 'test/core/util/stack_tracer.cc', + 'test/core/util/test_config.cc', + 'test/core/util/test_tcp_server.cc', + ], + }, + { + 'target_name': 'grpc_unsecure', + 'type': 'static_library', + 'dependencies': [ + 'upb_message_lib', + 'utf8_range_lib', + 'z', + 'absl/algorithm:container', + 'absl/base:config', + 'absl/base:no_destructor', + 'absl/cleanup:cleanup', + 'absl/container:flat_hash_map', + 'absl/container:flat_hash_set', + 'absl/container:inlined_vector', + 'absl/functional:bind_front', + 'absl/functional:function_ref', + 'absl/hash:hash', + 'absl/meta:type_traits', + 'absl/random:bit_gen_ref', + 'absl/random:distributions', + 'absl/status:statusor', + 'absl/types:span', + 'absl/utility:utility', + 'cares', + 'gpr', + 'address_sorting', + ], + 'sources': [ + 'src/core/client_channel/backup_poller.cc', + 'src/core/client_channel/client_channel.cc', + 'src/core/client_channel/client_channel_channelz.cc', + 'src/core/client_channel/client_channel_factory.cc', + 'src/core/client_channel/client_channel_filter.cc', + 'src/core/client_channel/client_channel_plugin.cc', + 'src/core/client_channel/client_channel_service_config.cc', + 'src/core/client_channel/config_selector.cc', + 'src/core/client_channel/dynamic_filters.cc', + 'src/core/client_channel/global_subchannel_pool.cc', + 'src/core/client_channel/http_proxy_mapper.cc', + 'src/core/client_channel/local_subchannel_pool.cc', + 'src/core/client_channel/retry_filter.cc', + 'src/core/client_channel/retry_filter_legacy_call_data.cc', + 'src/core/client_channel/retry_service_config.cc', + 'src/core/client_channel/retry_throttle.cc', + 'src/core/client_channel/subchannel.cc', + 'src/core/client_channel/subchannel_pool_interface.cc', + 'src/core/client_channel/subchannel_stream_client.cc', + 'src/core/ext/filters/backend_metrics/backend_metric_filter.cc', + 'src/core/ext/filters/census/grpc_context.cc', + 'src/core/ext/filters/channel_idle/channel_idle_filter.cc', + 'src/core/ext/filters/channel_idle/idle_filter_state.cc', + 'src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc', + 'src/core/ext/filters/deadline/deadline_filter.cc', + 'src/core/ext/filters/fault_injection/fault_injection_filter.cc', + 'src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc', + 'src/core/ext/filters/http/client/http_client_filter.cc', + 'src/core/ext/filters/http/client_authority_filter.cc', + 'src/core/ext/filters/http/http_filters_plugin.cc', + 'src/core/ext/filters/http/message_compress/compression_filter.cc', + 'src/core/ext/filters/http/message_compress/legacy_compression_filter.cc', + 'src/core/ext/filters/http/server/http_server_filter.cc', + 'src/core/ext/filters/message_size/message_size_filter.cc', + 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/transport/chttp2/server/chttp2_server.cc', + 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', + 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', + 'src/core/ext/transport/chttp2/transport/decode_huff.cc', + 'src/core/ext/transport/chttp2/transport/flow_control.cc', + 'src/core/ext/transport/chttp2/transport/frame.cc', + 'src/core/ext/transport/chttp2/transport/frame_data.cc', + 'src/core/ext/transport/chttp2/transport/frame_goaway.cc', + 'src/core/ext/transport/chttp2/transport/frame_ping.cc', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.cc', + 'src/core/ext/transport/chttp2/transport/frame_settings.cc', + 'src/core/ext/transport/chttp2/transport/frame_window_update.cc', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.cc', + 'src/core/ext/transport/chttp2/transport/hpack_encoder_table.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parse_result.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parser.cc', + 'src/core/ext/transport/chttp2/transport/hpack_parser_table.cc', + 'src/core/ext/transport/chttp2/transport/http2_settings.cc', + 'src/core/ext/transport/chttp2/transport/http_trace.cc', + 'src/core/ext/transport/chttp2/transport/huffsyms.cc', + 'src/core/ext/transport/chttp2/transport/max_concurrent_streams_policy.cc', + 'src/core/ext/transport/chttp2/transport/parsing.cc', + 'src/core/ext/transport/chttp2/transport/ping_abuse_policy.cc', + 'src/core/ext/transport/chttp2/transport/ping_callbacks.cc', + 'src/core/ext/transport/chttp2/transport/ping_rate_policy.cc', + 'src/core/ext/transport/chttp2/transport/stream_lists.cc', + 'src/core/ext/transport/chttp2/transport/varint.cc', + 'src/core/ext/transport/chttp2/transport/write_size_policy.cc', + 'src/core/ext/transport/chttp2/transport/writing.cc', + 'src/core/ext/transport/inproc/inproc_plugin.cc', + 'src/core/ext/transport/inproc/inproc_transport.cc', + 'src/core/ext/transport/inproc/legacy_inproc_transport.cc', + 'src/core/ext/upb-gen/google/api/annotations.upb_minitable.c', + 'src/core/ext/upb-gen/google/api/http.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/empty.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.c', + 'src/core/ext/upb-gen/google/rpc/status.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c', + 'src/core/ext/upb-gen/validate/validate.upb_minitable.c', + 'src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c', + 'src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c', + 'src/core/lib/address_utils/parse_address.cc', + 'src/core/lib/address_utils/sockaddr_utils.cc', + 'src/core/lib/backoff/backoff.cc', + 'src/core/lib/backoff/random_early_detection.cc', + 'src/core/lib/channel/call_tracer.cc', + 'src/core/lib/channel/channel_args.cc', + 'src/core/lib/channel/channel_args_preconditioning.cc', + 'src/core/lib/channel/channel_stack.cc', + 'src/core/lib/channel/channel_stack_builder.cc', + 'src/core/lib/channel/channel_stack_builder_impl.cc', + 'src/core/lib/channel/channel_stack_trace.cc', + 'src/core/lib/channel/channel_trace.cc', + 'src/core/lib/channel/channelz.cc', + 'src/core/lib/channel/channelz_registry.cc', + 'src/core/lib/channel/connected_channel.cc', + 'src/core/lib/channel/metrics.cc', + 'src/core/lib/channel/promise_based_filter.cc', + 'src/core/lib/channel/server_call_tracer_filter.cc', + 'src/core/lib/channel/status_util.cc', + 'src/core/lib/compression/compression.cc', + 'src/core/lib/compression/compression_internal.cc', + 'src/core/lib/compression/message_compress.cc', + 'src/core/lib/config/core_configuration.cc', + 'src/core/lib/debug/event_log.cc', + 'src/core/lib/debug/histogram_view.cc', + 'src/core/lib/debug/stats.cc', + 'src/core/lib/debug/stats_data.cc', + 'src/core/lib/debug/trace.cc', + 'src/core/lib/event_engine/ares_resolver.cc', + 'src/core/lib/event_engine/cf_engine/cf_engine.cc', + 'src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc', + 'src/core/lib/event_engine/cf_engine/dns_service_resolver.cc', + 'src/core/lib/event_engine/channel_args_endpoint_config.cc', + 'src/core/lib/event_engine/default_event_engine.cc', + 'src/core/lib/event_engine/default_event_engine_factory.cc', + 'src/core/lib/event_engine/event_engine.cc', + 'src/core/lib/event_engine/forkable.cc', + 'src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc', + 'src/core/lib/event_engine/posix_engine/ev_poll_posix.cc', + 'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc', + 'src/core/lib/event_engine/posix_engine/internal_errqueue.cc', + 'src/core/lib/event_engine/posix_engine/lockfree_event.cc', + 'src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc', + 'src/core/lib/event_engine/posix_engine/posix_endpoint.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc', + 'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/posix_engine/timer.cc', + 'src/core/lib/event_engine/posix_engine/timer_heap.cc', + 'src/core/lib/event_engine/posix_engine/timer_manager.cc', + 'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc', + 'src/core/lib/event_engine/resolved_address.cc', + 'src/core/lib/event_engine/shim.cc', + 'src/core/lib/event_engine/slice.cc', + 'src/core/lib/event_engine/slice_buffer.cc', + 'src/core/lib/event_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/thread_pool/thread_count.cc', + 'src/core/lib/event_engine/thread_pool/thread_pool_factory.cc', + 'src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc', + 'src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc', + 'src/core/lib/event_engine/time_util.cc', + 'src/core/lib/event_engine/trace.cc', + 'src/core/lib/event_engine/utils.cc', + 'src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc', + 'src/core/lib/event_engine/windows/iocp.cc', + 'src/core/lib/event_engine/windows/native_windows_dns_resolver.cc', + 'src/core/lib/event_engine/windows/win_socket.cc', + 'src/core/lib/event_engine/windows/windows_endpoint.cc', + 'src/core/lib/event_engine/windows/windows_engine.cc', + 'src/core/lib/event_engine/windows/windows_listener.cc', + 'src/core/lib/event_engine/work_queue/basic_work_queue.cc', + 'src/core/lib/experiments/config.cc', + 'src/core/lib/experiments/experiments.cc', + 'src/core/lib/gprpp/load_file.cc', + 'src/core/lib/gprpp/per_cpu.cc', + 'src/core/lib/gprpp/ref_counted_string.cc', + 'src/core/lib/gprpp/status_helper.cc', + 'src/core/lib/gprpp/time.cc', + 'src/core/lib/gprpp/time_averaged_stats.cc', + 'src/core/lib/gprpp/validation_errors.cc', + 'src/core/lib/gprpp/work_serializer.cc', + 'src/core/lib/handshaker/proxy_mapper_registry.cc', + 'src/core/lib/http/format_request.cc', + 'src/core/lib/http/httpcli.cc', + 'src/core/lib/http/parser.cc', + 'src/core/lib/iomgr/buffer_list.cc', + 'src/core/lib/iomgr/call_combiner.cc', + 'src/core/lib/iomgr/cfstream_handle.cc', + 'src/core/lib/iomgr/closure.cc', + 'src/core/lib/iomgr/combiner.cc', + 'src/core/lib/iomgr/dualstack_socket_posix.cc', + 'src/core/lib/iomgr/endpoint.cc', + 'src/core/lib/iomgr/endpoint_cfstream.cc', + 'src/core/lib/iomgr/endpoint_pair_posix.cc', + 'src/core/lib/iomgr/endpoint_pair_windows.cc', + 'src/core/lib/iomgr/error.cc', + 'src/core/lib/iomgr/error_cfstream.cc', + 'src/core/lib/iomgr/ev_apple.cc', + 'src/core/lib/iomgr/ev_epoll1_linux.cc', + 'src/core/lib/iomgr/ev_poll_posix.cc', + 'src/core/lib/iomgr/ev_posix.cc', + 'src/core/lib/iomgr/ev_windows.cc', + 'src/core/lib/iomgr/event_engine_shims/closure.cc', + 'src/core/lib/iomgr/event_engine_shims/endpoint.cc', + 'src/core/lib/iomgr/event_engine_shims/tcp_client.cc', + 'src/core/lib/iomgr/exec_ctx.cc', + 'src/core/lib/iomgr/executor.cc', + 'src/core/lib/iomgr/fork_posix.cc', + 'src/core/lib/iomgr/fork_windows.cc', + 'src/core/lib/iomgr/gethostname_fallback.cc', + 'src/core/lib/iomgr/gethostname_host_name_max.cc', + 'src/core/lib/iomgr/gethostname_sysconf.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_posix.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc', + 'src/core/lib/iomgr/internal_errqueue.cc', + 'src/core/lib/iomgr/iocp_windows.cc', + 'src/core/lib/iomgr/iomgr.cc', + 'src/core/lib/iomgr/iomgr_internal.cc', + 'src/core/lib/iomgr/iomgr_posix.cc', + 'src/core/lib/iomgr/iomgr_posix_cfstream.cc', + 'src/core/lib/iomgr/iomgr_windows.cc', + 'src/core/lib/iomgr/lockfree_event.cc', + 'src/core/lib/iomgr/polling_entity.cc', + 'src/core/lib/iomgr/pollset.cc', + 'src/core/lib/iomgr/pollset_set.cc', + 'src/core/lib/iomgr/pollset_set_windows.cc', + 'src/core/lib/iomgr/pollset_windows.cc', + 'src/core/lib/iomgr/resolve_address.cc', + 'src/core/lib/iomgr/resolve_address_posix.cc', + 'src/core/lib/iomgr/resolve_address_windows.cc', + 'src/core/lib/iomgr/sockaddr_utils_posix.cc', + 'src/core/lib/iomgr/socket_factory_posix.cc', + 'src/core/lib/iomgr/socket_mutator.cc', + 'src/core/lib/iomgr/socket_utils_common_posix.cc', + 'src/core/lib/iomgr/socket_utils_linux.cc', + 'src/core/lib/iomgr/socket_utils_posix.cc', + 'src/core/lib/iomgr/socket_utils_windows.cc', + 'src/core/lib/iomgr/socket_windows.cc', + 'src/core/lib/iomgr/systemd_utils.cc', + 'src/core/lib/iomgr/tcp_client.cc', + 'src/core/lib/iomgr/tcp_client_cfstream.cc', + 'src/core/lib/iomgr/tcp_client_posix.cc', + 'src/core/lib/iomgr/tcp_client_windows.cc', + 'src/core/lib/iomgr/tcp_posix.cc', + 'src/core/lib/iomgr/tcp_server.cc', + 'src/core/lib/iomgr/tcp_server_posix.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_windows.cc', + 'src/core/lib/iomgr/tcp_windows.cc', + 'src/core/lib/iomgr/timer.cc', + 'src/core/lib/iomgr/timer_generic.cc', + 'src/core/lib/iomgr/timer_heap.cc', + 'src/core/lib/iomgr/timer_manager.cc', + 'src/core/lib/iomgr/unix_sockets_posix.cc', + 'src/core/lib/iomgr/unix_sockets_posix_noop.cc', + 'src/core/lib/iomgr/vsock.cc', + 'src/core/lib/iomgr/wakeup_fd_eventfd.cc', + 'src/core/lib/iomgr/wakeup_fd_nospecial.cc', + 'src/core/lib/iomgr/wakeup_fd_pipe.cc', + 'src/core/lib/iomgr/wakeup_fd_posix.cc', + 'src/core/lib/json/json_object_loader.cc', + 'src/core/lib/json/json_reader.cc', + 'src/core/lib/json/json_writer.cc', + 'src/core/lib/promise/activity.cc', + 'src/core/lib/promise/party.cc', + 'src/core/lib/promise/sleep.cc', + 'src/core/lib/promise/trace.cc', + 'src/core/lib/resource_quota/api.cc', + 'src/core/lib/resource_quota/arena.cc', + 'src/core/lib/resource_quota/memory_quota.cc', + 'src/core/lib/resource_quota/periodic_update.cc', + 'src/core/lib/resource_quota/resource_quota.cc', + 'src/core/lib/resource_quota/thread_quota.cc', + 'src/core/lib/resource_quota/trace.cc', + 'src/core/lib/security/authorization/authorization_policy_provider_vtable.cc', + 'src/core/lib/security/authorization/evaluate_args.cc', + 'src/core/lib/security/authorization/grpc_server_authz_filter.cc', + 'src/core/lib/security/certificate_provider/certificate_provider_registry.cc', + 'src/core/lib/security/context/security_context.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc', + 'src/core/lib/security/credentials/call_creds_util.cc', + 'src/core/lib/security/credentials/composite/composite_credentials.cc', + 'src/core/lib/security/credentials/credentials.cc', + 'src/core/lib/security/credentials/fake/fake_credentials.cc', + 'src/core/lib/security/credentials/insecure/insecure_credentials.cc', + 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', + 'src/core/lib/security/credentials/tls/tls_utils.cc', + 'src/core/lib/security/security_connector/fake/fake_security_connector.cc', + 'src/core/lib/security/security_connector/insecure/insecure_security_connector.cc', + 'src/core/lib/security/security_connector/load_system_roots_fallback.cc', + 'src/core/lib/security/security_connector/load_system_roots_supported.cc', + 'src/core/lib/security/security_connector/load_system_roots_windows.cc', + 'src/core/lib/security/security_connector/security_connector.cc', + 'src/core/lib/security/transport/client_auth_filter.cc', + 'src/core/lib/security/transport/legacy_server_auth_filter.cc', + 'src/core/lib/security/transport/secure_endpoint.cc', + 'src/core/lib/security/transport/security_handshaker.cc', + 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/tsi_error.cc', + 'src/core/lib/security/util/json_util.cc', + 'src/core/lib/slice/b64.cc', + 'src/core/lib/slice/percent_encoding.cc', + 'src/core/lib/slice/slice.cc', + 'src/core/lib/slice/slice_buffer.cc', + 'src/core/lib/slice/slice_refcount.cc', + 'src/core/lib/slice/slice_string_helpers.cc', + 'src/core/lib/surface/api_trace.cc', + 'src/core/lib/surface/byte_buffer.cc', + 'src/core/lib/surface/byte_buffer_reader.cc', + 'src/core/lib/surface/call.cc', + 'src/core/lib/surface/call_details.cc', + 'src/core/lib/surface/call_log_batch.cc', + 'src/core/lib/surface/channel.cc', + 'src/core/lib/surface/channel_create.cc', + 'src/core/lib/surface/channel_init.cc', + 'src/core/lib/surface/channel_stack_type.cc', + 'src/core/lib/surface/completion_queue.cc', + 'src/core/lib/surface/completion_queue_factory.cc', + 'src/core/lib/surface/event_string.cc', + 'src/core/lib/surface/init.cc', + 'src/core/lib/surface/init_internally.cc', + 'src/core/lib/surface/lame_client.cc', + 'src/core/lib/surface/legacy_channel.cc', + 'src/core/lib/surface/metadata_array.cc', + 'src/core/lib/surface/server.cc', + 'src/core/lib/surface/validate_metadata.cc', + 'src/core/lib/surface/version.cc', + 'src/core/lib/surface/wait_for_cq_end_op.cc', + 'src/core/lib/transport/batch_builder.cc', + 'src/core/lib/transport/bdp_estimator.cc', + 'src/core/lib/transport/call_filters.cc', + 'src/core/lib/transport/call_final_info.cc', + 'src/core/lib/transport/call_size_estimator.cc', + 'src/core/lib/transport/call_spine.cc', + 'src/core/lib/transport/connectivity_state.cc', + 'src/core/lib/transport/error_utils.cc', + 'src/core/lib/transport/handshaker.cc', + 'src/core/lib/transport/handshaker_registry.cc', + 'src/core/lib/transport/http_connect_handshaker.cc', + 'src/core/lib/transport/message.cc', + 'src/core/lib/transport/metadata.cc', + 'src/core/lib/transport/metadata_batch.cc', + 'src/core/lib/transport/metadata_info.cc', + 'src/core/lib/transport/parsed_metadata.cc', + 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/tcp_connect_handshaker.cc', + 'src/core/lib/transport/timeout_encoding.cc', + 'src/core/lib/transport/transport.cc', + 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', + 'src/core/load_balancing/address_filtering.cc', + 'src/core/load_balancing/backend_metric_parser.cc', + 'src/core/load_balancing/child_policy_handler.cc', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', + 'src/core/plugin_registry/grpc_plugin_registry.cc', + 'src/core/plugin_registry/grpc_plugin_registry_noextra.cc', + 'src/core/resolver/binder/binder_resolver.cc', + 'src/core/resolver/dns/c_ares/dns_resolver_ares.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc', + 'src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc', + 'src/core/resolver/dns/dns_resolver_plugin.cc', + 'src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc', + 'src/core/resolver/dns/event_engine/service_config_helper.cc', + 'src/core/resolver/dns/native/dns_resolver.cc', + 'src/core/resolver/endpoint_addresses.cc', + 'src/core/resolver/fake/fake_resolver.cc', + 'src/core/resolver/polling_resolver.cc', + 'src/core/resolver/resolver.cc', + 'src/core/resolver/resolver_registry.cc', + 'src/core/resolver/sockaddr/sockaddr_resolver.cc', + 'src/core/service_config/service_config_channel_arg_filter.cc', + 'src/core/service_config/service_config_impl.cc', + 'src/core/service_config/service_config_parser.cc', + 'src/core/tsi/alts/handshaker/transport_security_common_api.cc', + 'src/core/tsi/fake_transport_security.cc', + 'src/core/tsi/local_transport_security.cc', + 'src/core/tsi/transport_security.cc', + 'src/core/tsi/transport_security_grpc.cc', + 'third_party/upb/upb/message/accessors.c', + 'third_party/upb/upb/mini_descriptor/build_enum.c', + 'third_party/upb/upb/mini_descriptor/decode.c', + 'third_party/upb/upb/mini_descriptor/internal/base92.c', + 'third_party/upb/upb/mini_descriptor/internal/encode.c', + 'third_party/upb/upb/mini_descriptor/link.c', + 'third_party/upb/upb/wire/decode.c', + 'third_party/upb/upb/wire/decode_fast.c', + 'third_party/upb/upb/wire/encode.c', + 'third_party/upb/upb/wire/eps_copy_input_stream.c', + 'third_party/upb/upb/wire/reader.c', + ], + }, + { + 'target_name': 'gtest', + 'type': 'static_library', + 'dependencies': [ + 're2', + 'absl/container:flat_hash_set', + 'absl/debugging:failure_signal_handler', + 'absl/debugging:stacktrace', + 'absl/debugging:symbolize', + 'absl/flags:flag', + 'absl/flags:parse', + 'absl/flags:reflection', + 'absl/flags:usage', + 'absl/strings:strings', + 'absl/types:any', + 'absl/types:optional', + 'absl/types:variant', + ], + 'sources': [ + 'third_party/googletest/googlemock/src/gmock-cardinalities.cc', + 'third_party/googletest/googlemock/src/gmock-internal-utils.cc', + 'third_party/googletest/googlemock/src/gmock-matchers.cc', + 'third_party/googletest/googlemock/src/gmock-spec-builders.cc', + 'third_party/googletest/googlemock/src/gmock.cc', + 'third_party/googletest/googletest/src/gtest-assertion-result.cc', + 'third_party/googletest/googletest/src/gtest-death-test.cc', + 'third_party/googletest/googletest/src/gtest-filepath.cc', + 'third_party/googletest/googletest/src/gtest-matchers.cc', + 'third_party/googletest/googletest/src/gtest-port.cc', + 'third_party/googletest/googletest/src/gtest-printers.cc', + 'third_party/googletest/googletest/src/gtest-test-part.cc', + 'third_party/googletest/googletest/src/gtest-typed-test.cc', + 'third_party/googletest/googletest/src/gtest.cc', + ], + }, + { + 'target_name': 're2', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/re2/re2/bitstate.cc', + 'third_party/re2/re2/compile.cc', + 'third_party/re2/re2/dfa.cc', + 'third_party/re2/re2/filtered_re2.cc', + 'third_party/re2/re2/mimics_pcre.cc', + 'third_party/re2/re2/nfa.cc', + 'third_party/re2/re2/onepass.cc', + 'third_party/re2/re2/parse.cc', + 'third_party/re2/re2/perl_groups.cc', + 'third_party/re2/re2/prefilter.cc', + 'third_party/re2/re2/prefilter_tree.cc', + 'third_party/re2/re2/prog.cc', + 'third_party/re2/re2/re2.cc', + 'third_party/re2/re2/regexp.cc', + 'third_party/re2/re2/set.cc', + 'third_party/re2/re2/simplify.cc', + 'third_party/re2/re2/stringpiece.cc', + 'third_party/re2/re2/tostring.cc', + 'third_party/re2/re2/unicode_casefold.cc', + 'third_party/re2/re2/unicode_groups.cc', + 'third_party/re2/util/rune.cc', + 'third_party/re2/util/strutil.cc', + ], + }, + { + 'target_name': 'upb_base_lib', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/upb/upb/base/status.c', + ], + }, + { + 'target_name': 'upb_json_lib', + 'type': 'static_library', + 'dependencies': [ + 'upb_message_lib', + 'utf8_range_lib', + ], + 'sources': [ + 'src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c', + 'third_party/upb/upb/json/decode.c', + 'third_party/upb/upb/json/encode.c', + 'third_party/upb/upb/lex/atoi.c', + 'third_party/upb/upb/lex/round_trip.c', + 'third_party/upb/upb/lex/strtod.c', + 'third_party/upb/upb/lex/unicode.c', + 'third_party/upb/upb/message/accessors.c', + 'third_party/upb/upb/mini_descriptor/build_enum.c', + 'third_party/upb/upb/mini_descriptor/decode.c', + 'third_party/upb/upb/mini_descriptor/internal/base92.c', + 'third_party/upb/upb/mini_descriptor/internal/encode.c', + 'third_party/upb/upb/mini_descriptor/link.c', + 'third_party/upb/upb/reflection/def_pool.c', + 'third_party/upb/upb/reflection/def_type.c', + 'third_party/upb/upb/reflection/desc_state.c', + 'third_party/upb/upb/reflection/enum_def.c', + 'third_party/upb/upb/reflection/enum_reserved_range.c', + 'third_party/upb/upb/reflection/enum_value_def.c', + 'third_party/upb/upb/reflection/extension_range.c', + 'third_party/upb/upb/reflection/field_def.c', + 'third_party/upb/upb/reflection/file_def.c', + 'third_party/upb/upb/reflection/internal/def_builder.c', + 'third_party/upb/upb/reflection/internal/strdup2.c', + 'third_party/upb/upb/reflection/message.c', + 'third_party/upb/upb/reflection/message_def.c', + 'third_party/upb/upb/reflection/message_reserved_range.c', + 'third_party/upb/upb/reflection/method_def.c', + 'third_party/upb/upb/reflection/oneof_def.c', + 'third_party/upb/upb/reflection/service_def.c', + 'third_party/upb/upb/wire/decode.c', + 'third_party/upb/upb/wire/decode_fast.c', + 'third_party/upb/upb/wire/encode.c', + 'third_party/upb/upb/wire/eps_copy_input_stream.c', + 'third_party/upb/upb/wire/reader.c', + ], + }, + { + 'target_name': 'upb_mem_lib', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/upb/upb/mem/alloc.c', + 'third_party/upb/upb/mem/arena.c', + ], + }, + { + 'target_name': 'upb_message_lib', + 'type': 'static_library', + 'dependencies': [ + 'upb_base_lib', + 'upb_mem_lib', + ], + 'sources': [ + 'third_party/upb/upb/hash/common.c', + 'third_party/upb/upb/message/array.c', + 'third_party/upb/upb/message/map.c', + 'third_party/upb/upb/message/map_sorter.c', + 'third_party/upb/upb/message/message.c', + 'third_party/upb/upb/mini_table/extension_registry.c', + 'third_party/upb/upb/mini_table/internal/message.c', + 'third_party/upb/upb/mini_table/message.c', + ], + }, + { + 'target_name': 'upb_textformat_lib', + 'type': 'static_library', + 'dependencies': [ + 'upb_message_lib', + 'utf8_range_lib', + ], + 'sources': [ + 'src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c', + 'third_party/upb/upb/lex/atoi.c', + 'third_party/upb/upb/lex/round_trip.c', + 'third_party/upb/upb/lex/strtod.c', + 'third_party/upb/upb/lex/unicode.c', + 'third_party/upb/upb/message/accessors.c', + 'third_party/upb/upb/mini_descriptor/build_enum.c', + 'third_party/upb/upb/mini_descriptor/decode.c', + 'third_party/upb/upb/mini_descriptor/internal/base92.c', + 'third_party/upb/upb/mini_descriptor/internal/encode.c', + 'third_party/upb/upb/mini_descriptor/link.c', + 'third_party/upb/upb/reflection/def_pool.c', + 'third_party/upb/upb/reflection/def_type.c', + 'third_party/upb/upb/reflection/desc_state.c', + 'third_party/upb/upb/reflection/enum_def.c', + 'third_party/upb/upb/reflection/enum_reserved_range.c', + 'third_party/upb/upb/reflection/enum_value_def.c', + 'third_party/upb/upb/reflection/extension_range.c', + 'third_party/upb/upb/reflection/field_def.c', + 'third_party/upb/upb/reflection/file_def.c', + 'third_party/upb/upb/reflection/internal/def_builder.c', + 'third_party/upb/upb/reflection/internal/strdup2.c', + 'third_party/upb/upb/reflection/message.c', + 'third_party/upb/upb/reflection/message_def.c', + 'third_party/upb/upb/reflection/message_reserved_range.c', + 'third_party/upb/upb/reflection/method_def.c', + 'third_party/upb/upb/reflection/oneof_def.c', + 'third_party/upb/upb/reflection/service_def.c', + 'third_party/upb/upb/text/encode.c', + 'third_party/upb/upb/wire/decode.c', + 'third_party/upb/upb/wire/decode_fast.c', + 'third_party/upb/upb/wire/encode.c', + 'third_party/upb/upb/wire/eps_copy_input_stream.c', + 'third_party/upb/upb/wire/reader.c', + ], + }, + { + 'target_name': 'utf8_range_lib', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/utf8_range/naive.c', + 'third_party/utf8_range/range2-neon.c', + 'third_party/utf8_range/range2-sse.c', + ], + }, + { + 'target_name': 'z', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/zlib/adler32.c', + 'third_party/zlib/compress.c', + 'third_party/zlib/crc32.c', + 'third_party/zlib/deflate.c', + 'third_party/zlib/infback.c', + 'third_party/zlib/inffast.c', + 'third_party/zlib/inflate.c', + 'third_party/zlib/inftrees.c', + 'third_party/zlib/trees.c', + 'third_party/zlib/uncompr.c', + 'third_party/zlib/zutil.c', + ], + }, + { + 'target_name': 'benchmark_helpers', + 'type': 'static_library', + 'dependencies': [ + 'benchmark', + 'grpc++_unsecure', + 'grpc_test_util_unsecure', + 'grpc++_test_config', + ], + 'sources': [ + 'src/proto/grpc/testing/echo.proto', + 'src/proto/grpc/testing/echo_messages.proto', + 'src/proto/grpc/testing/simple_messages.proto', + 'src/proto/grpc/testing/xds/v3/orca_load_report.proto', + 'test/core/util/cmdline.cc', + 'test/core/util/fuzzer_util.cc', + 'test/core/util/grpc_profiler.cc', + 'test/core/util/histogram.cc', + 'test/core/util/mock_endpoint.cc', + 'test/core/util/parse_hexstring.cc', + 'test/core/util/resolve_localhost_ip46.cc', + 'test/core/util/slice_splitter.cc', + 'test/core/util/tracer_util.cc', + 'test/cpp/microbenchmarks/helpers.cc', + ], + }, + { + 'target_name': 'grpc++', + 'type': 'static_library', + 'dependencies': [ + 'grpc', + 'protobuf', + ], + 'sources': [ + 'src/core/ext/transport/binder/client/binder_connector.cc', + 'src/core/ext/transport/binder/client/channel_create.cc', + 'src/core/ext/transport/binder/client/channel_create_impl.cc', + 'src/core/ext/transport/binder/client/connection_id_generator.cc', + 'src/core/ext/transport/binder/client/endpoint_binder_pool.cc', + 'src/core/ext/transport/binder/client/jni_utils.cc', + 'src/core/ext/transport/binder/client/security_policy_setting.cc', + 'src/core/ext/transport/binder/security_policy/binder_security_policy.cc', + 'src/core/ext/transport/binder/server/binder_server.cc', + 'src/core/ext/transport/binder/server/binder_server_credentials.cc', + 'src/core/ext/transport/binder/transport/binder_transport.cc', + 'src/core/ext/transport/binder/utils/ndk_binder.cc', + 'src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc', + 'src/core/ext/transport/binder/wire_format/binder_android.cc', + 'src/core/ext/transport/binder/wire_format/binder_constants.cc', + 'src/core/ext/transport/binder/wire_format/transaction.cc', + 'src/core/ext/transport/binder/wire_format/wire_reader_impl.cc', + 'src/core/ext/transport/binder/wire_format/wire_writer.cc', + 'src/cpp/client/channel_cc.cc', + 'src/cpp/client/client_callback.cc', + 'src/cpp/client/client_context.cc', + 'src/cpp/client/client_interceptor.cc', + 'src/cpp/client/client_stats_interceptor.cc', + 'src/cpp/client/create_channel.cc', + 'src/cpp/client/create_channel_internal.cc', + 'src/cpp/client/create_channel_posix.cc', + 'src/cpp/client/insecure_credentials.cc', + 'src/cpp/client/secure_credentials.cc', + 'src/cpp/client/xds_credentials.cc', + 'src/cpp/common/alarm.cc', + 'src/cpp/common/auth_property_iterator.cc', + 'src/cpp/common/channel_arguments.cc', + 'src/cpp/common/completion_queue_cc.cc', + 'src/cpp/common/resource_quota_cc.cc', + 'src/cpp/common/rpc_method.cc', + 'src/cpp/common/secure_auth_context.cc', + 'src/cpp/common/secure_channel_arguments.cc', + 'src/cpp/common/secure_create_auth_context.cc', + 'src/cpp/common/tls_certificate_provider.cc', + 'src/cpp/common/tls_certificate_verifier.cc', + 'src/cpp/common/tls_credentials_options.cc', + 'src/cpp/common/validate_service_config.cc', + 'src/cpp/common/version_cc.cc', + 'src/cpp/server/async_generic_service.cc', + 'src/cpp/server/backend_metric_recorder.cc', + 'src/cpp/server/channel_argument_option.cc', + 'src/cpp/server/create_default_thread_pool.cc', + 'src/cpp/server/external_connection_acceptor_impl.cc', + 'src/cpp/server/health/default_health_check_service.cc', + 'src/cpp/server/health/health_check_service.cc', + 'src/cpp/server/health/health_check_service_server_builder_option.cc', + 'src/cpp/server/insecure_server_credentials.cc', + 'src/cpp/server/secure_server_credentials.cc', + 'src/cpp/server/server_builder.cc', + 'src/cpp/server/server_callback.cc', + 'src/cpp/server/server_cc.cc', + 'src/cpp/server/server_context.cc', + 'src/cpp/server/server_posix.cc', + 'src/cpp/server/xds_server_builder.cc', + 'src/cpp/server/xds_server_credentials.cc', + 'src/cpp/thread_manager/thread_manager.cc', + 'src/cpp/util/byte_buffer_cc.cc', + 'src/cpp/util/status.cc', + 'src/cpp/util/string_ref.cc', + 'src/cpp/util/time_cc.cc', + ], + }, + { + 'target_name': 'grpc++_alts', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + ], + 'sources': [ + 'src/cpp/common/alts_context.cc', + 'src/cpp/common/alts_util.cc', + ], + }, + { + 'target_name': 'grpc++_error_details', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + ], + 'sources': [ + 'src/cpp/util/error_details.cc', + ], + }, + { + 'target_name': 'grpc++_reflection', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + ], + 'sources': [ + 'src/proto/grpc/reflection/v1/reflection.proto', + 'src/proto/grpc/reflection/v1alpha/reflection.proto', + 'src/cpp/ext/proto_server_reflection.cc', + 'src/cpp/ext/proto_server_reflection_plugin.cc', + ], + }, + { + 'target_name': 'grpc++_test', + 'type': 'static_library', + 'dependencies': [ + 'gtest', + 'grpc++', + ], + 'sources': [ + 'src/cpp/client/channel_test_peer.cc', + ], + }, + { + 'target_name': 'grpc++_test_config', + 'type': 'static_library', + 'dependencies': [ + 'absl/flags:parse', + 'gpr', + ], + 'sources': [ + 'test/cpp/util/test_config_cc.cc', + ], + }, + { + 'target_name': 'grpc++_test_util', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + 'grpc_test_util', + ], + 'sources': [ + 'src/core/lib/gpr/subprocess_posix.cc', + 'src/core/lib/gpr/subprocess_windows.cc', + 'test/core/end2end/data/client_certs.cc', + 'test/core/end2end/data/server1_cert.cc', + 'test/core/end2end/data/server1_key.cc', + 'test/core/end2end/data/test_root_cert.cc', + 'test/core/util/cmdline.cc', + 'test/core/util/fuzzer_util.cc', + 'test/core/util/grpc_profiler.cc', + 'test/core/util/histogram.cc', + 'test/core/util/mock_endpoint.cc', + 'test/core/util/parse_hexstring.cc', + 'test/core/util/resolve_localhost_ip46.cc', + 'test/core/util/slice_splitter.cc', + 'test/core/util/tracer_util.cc', + 'test/cpp/util/byte_buffer_proto_helper.cc', + 'test/cpp/util/create_test_channel.cc', + 'test/cpp/util/string_ref_helper.cc', + 'test/cpp/util/subprocess.cc', + 'test/cpp/util/test_credentials_provider.cc', + ], + }, + { + 'target_name': 'grpc++_unsecure', + 'type': 'static_library', + 'dependencies': [ + 'grpc_unsecure', + 'protobuf', + ], + 'sources': [ + 'src/cpp/client/channel_cc.cc', + 'src/cpp/client/client_callback.cc', + 'src/cpp/client/client_context.cc', + 'src/cpp/client/client_interceptor.cc', + 'src/cpp/client/client_stats_interceptor.cc', + 'src/cpp/client/create_channel.cc', + 'src/cpp/client/create_channel_internal.cc', + 'src/cpp/client/create_channel_posix.cc', + 'src/cpp/client/insecure_credentials.cc', + 'src/cpp/common/alarm.cc', + 'src/cpp/common/channel_arguments.cc', + 'src/cpp/common/completion_queue_cc.cc', + 'src/cpp/common/insecure_create_auth_context.cc', + 'src/cpp/common/resource_quota_cc.cc', + 'src/cpp/common/rpc_method.cc', + 'src/cpp/common/validate_service_config.cc', + 'src/cpp/common/version_cc.cc', + 'src/cpp/server/async_generic_service.cc', + 'src/cpp/server/backend_metric_recorder.cc', + 'src/cpp/server/channel_argument_option.cc', + 'src/cpp/server/create_default_thread_pool.cc', + 'src/cpp/server/external_connection_acceptor_impl.cc', + 'src/cpp/server/health/default_health_check_service.cc', + 'src/cpp/server/health/health_check_service.cc', + 'src/cpp/server/health/health_check_service_server_builder_option.cc', + 'src/cpp/server/insecure_server_credentials.cc', + 'src/cpp/server/server_builder.cc', + 'src/cpp/server/server_callback.cc', + 'src/cpp/server/server_cc.cc', + 'src/cpp/server/server_context.cc', + 'src/cpp/server/server_posix.cc', + 'src/cpp/thread_manager/thread_manager.cc', + 'src/cpp/util/byte_buffer_cc.cc', + 'src/cpp/util/status.cc', + 'src/cpp/util/string_ref.cc', + 'src/cpp/util/time_cc.cc', + ], + }, + { + 'target_name': 'grpc_authorization_provider', + 'type': 'static_library', + 'dependencies': [ + 'upb_message_lib', + 're2', + 'utf8_range_lib', + 'z', + 'absl/base:config', + 'absl/base:no_destructor', + 'absl/cleanup:cleanup', + 'absl/container:flat_hash_map', + 'absl/container:flat_hash_set', + 'absl/container:inlined_vector', + 'absl/functional:function_ref', + 'absl/hash:hash', + 'absl/meta:type_traits', + 'absl/random:bit_gen_ref', + 'absl/random:distributions', + 'absl/status:statusor', + 'absl/types:span', + 'absl/utility:utility', + 'cares', + 'gpr', + 'address_sorting', + ], + 'sources': [ + 'src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c', + 'src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c', + 'src/core/ext/upb-gen/google/rpc/status.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c', + 'src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c', + 'src/core/lib/address_utils/parse_address.cc', + 'src/core/lib/address_utils/sockaddr_utils.cc', + 'src/core/lib/backoff/backoff.cc', + 'src/core/lib/backoff/random_early_detection.cc', + 'src/core/lib/channel/call_tracer.cc', + 'src/core/lib/channel/channel_args.cc', + 'src/core/lib/channel/channel_args_preconditioning.cc', + 'src/core/lib/channel/channel_stack.cc', + 'src/core/lib/channel/channel_stack_builder.cc', + 'src/core/lib/channel/channel_stack_builder_impl.cc', + 'src/core/lib/channel/channel_stack_trace.cc', + 'src/core/lib/channel/channel_trace.cc', + 'src/core/lib/channel/channelz.cc', + 'src/core/lib/channel/channelz_registry.cc', + 'src/core/lib/channel/connected_channel.cc', + 'src/core/lib/channel/metrics.cc', + 'src/core/lib/channel/promise_based_filter.cc', + 'src/core/lib/channel/status_util.cc', + 'src/core/lib/compression/compression.cc', + 'src/core/lib/compression/compression_internal.cc', + 'src/core/lib/compression/message_compress.cc', + 'src/core/lib/config/core_configuration.cc', + 'src/core/lib/debug/event_log.cc', + 'src/core/lib/debug/histogram_view.cc', + 'src/core/lib/debug/stats.cc', + 'src/core/lib/debug/stats_data.cc', + 'src/core/lib/debug/trace.cc', + 'src/core/lib/event_engine/ares_resolver.cc', + 'src/core/lib/event_engine/cf_engine/cf_engine.cc', + 'src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc', + 'src/core/lib/event_engine/cf_engine/dns_service_resolver.cc', + 'src/core/lib/event_engine/channel_args_endpoint_config.cc', + 'src/core/lib/event_engine/default_event_engine.cc', + 'src/core/lib/event_engine/default_event_engine_factory.cc', + 'src/core/lib/event_engine/event_engine.cc', + 'src/core/lib/event_engine/forkable.cc', + 'src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc', + 'src/core/lib/event_engine/posix_engine/ev_poll_posix.cc', + 'src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc', + 'src/core/lib/event_engine/posix_engine/internal_errqueue.cc', + 'src/core/lib/event_engine/posix_engine/lockfree_event.cc', + 'src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc', + 'src/core/lib/event_engine/posix_engine/posix_endpoint.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener.cc', + 'src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc', + 'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/posix_engine/timer.cc', + 'src/core/lib/event_engine/posix_engine/timer_heap.cc', + 'src/core/lib/event_engine/posix_engine/timer_manager.cc', + 'src/core/lib/event_engine/posix_engine/traced_buffer_list.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc', + 'src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.cc', + 'src/core/lib/event_engine/resolved_address.cc', + 'src/core/lib/event_engine/shim.cc', + 'src/core/lib/event_engine/slice.cc', + 'src/core/lib/event_engine/slice_buffer.cc', + 'src/core/lib/event_engine/tcp_socket_utils.cc', + 'src/core/lib/event_engine/thread_pool/thread_count.cc', + 'src/core/lib/event_engine/thread_pool/thread_pool_factory.cc', + 'src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc', + 'src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc', + 'src/core/lib/event_engine/time_util.cc', + 'src/core/lib/event_engine/trace.cc', + 'src/core/lib/event_engine/utils.cc', + 'src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc', + 'src/core/lib/event_engine/windows/iocp.cc', + 'src/core/lib/event_engine/windows/native_windows_dns_resolver.cc', + 'src/core/lib/event_engine/windows/win_socket.cc', + 'src/core/lib/event_engine/windows/windows_endpoint.cc', + 'src/core/lib/event_engine/windows/windows_engine.cc', + 'src/core/lib/event_engine/windows/windows_listener.cc', + 'src/core/lib/event_engine/work_queue/basic_work_queue.cc', + 'src/core/lib/experiments/config.cc', + 'src/core/lib/experiments/experiments.cc', + 'src/core/lib/gprpp/load_file.cc', + 'src/core/lib/gprpp/per_cpu.cc', + 'src/core/lib/gprpp/ref_counted_string.cc', + 'src/core/lib/gprpp/status_helper.cc', + 'src/core/lib/gprpp/time.cc', + 'src/core/lib/gprpp/time_averaged_stats.cc', + 'src/core/lib/gprpp/validation_errors.cc', + 'src/core/lib/gprpp/work_serializer.cc', + 'src/core/lib/handshaker/proxy_mapper_registry.cc', + 'src/core/lib/iomgr/buffer_list.cc', + 'src/core/lib/iomgr/call_combiner.cc', + 'src/core/lib/iomgr/cfstream_handle.cc', + 'src/core/lib/iomgr/closure.cc', + 'src/core/lib/iomgr/combiner.cc', + 'src/core/lib/iomgr/dualstack_socket_posix.cc', + 'src/core/lib/iomgr/endpoint.cc', + 'src/core/lib/iomgr/endpoint_cfstream.cc', + 'src/core/lib/iomgr/endpoint_pair_posix.cc', + 'src/core/lib/iomgr/endpoint_pair_windows.cc', + 'src/core/lib/iomgr/error.cc', + 'src/core/lib/iomgr/error_cfstream.cc', + 'src/core/lib/iomgr/ev_apple.cc', + 'src/core/lib/iomgr/ev_epoll1_linux.cc', + 'src/core/lib/iomgr/ev_poll_posix.cc', + 'src/core/lib/iomgr/ev_posix.cc', + 'src/core/lib/iomgr/ev_windows.cc', + 'src/core/lib/iomgr/event_engine_shims/closure.cc', + 'src/core/lib/iomgr/event_engine_shims/endpoint.cc', + 'src/core/lib/iomgr/event_engine_shims/tcp_client.cc', + 'src/core/lib/iomgr/exec_ctx.cc', + 'src/core/lib/iomgr/executor.cc', + 'src/core/lib/iomgr/fork_posix.cc', + 'src/core/lib/iomgr/fork_windows.cc', + 'src/core/lib/iomgr/gethostname_fallback.cc', + 'src/core/lib/iomgr/gethostname_host_name_max.cc', + 'src/core/lib/iomgr/gethostname_sysconf.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_posix.cc', + 'src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc', + 'src/core/lib/iomgr/internal_errqueue.cc', + 'src/core/lib/iomgr/iocp_windows.cc', + 'src/core/lib/iomgr/iomgr.cc', + 'src/core/lib/iomgr/iomgr_internal.cc', + 'src/core/lib/iomgr/iomgr_posix.cc', + 'src/core/lib/iomgr/iomgr_posix_cfstream.cc', + 'src/core/lib/iomgr/iomgr_windows.cc', + 'src/core/lib/iomgr/lockfree_event.cc', + 'src/core/lib/iomgr/polling_entity.cc', + 'src/core/lib/iomgr/pollset.cc', + 'src/core/lib/iomgr/pollset_set.cc', + 'src/core/lib/iomgr/pollset_set_windows.cc', + 'src/core/lib/iomgr/pollset_windows.cc', + 'src/core/lib/iomgr/resolve_address.cc', + 'src/core/lib/iomgr/resolve_address_posix.cc', + 'src/core/lib/iomgr/resolve_address_windows.cc', + 'src/core/lib/iomgr/sockaddr_utils_posix.cc', + 'src/core/lib/iomgr/socket_factory_posix.cc', + 'src/core/lib/iomgr/socket_mutator.cc', + 'src/core/lib/iomgr/socket_utils_common_posix.cc', + 'src/core/lib/iomgr/socket_utils_linux.cc', + 'src/core/lib/iomgr/socket_utils_posix.cc', + 'src/core/lib/iomgr/socket_utils_windows.cc', + 'src/core/lib/iomgr/socket_windows.cc', + 'src/core/lib/iomgr/systemd_utils.cc', + 'src/core/lib/iomgr/tcp_client.cc', + 'src/core/lib/iomgr/tcp_client_cfstream.cc', + 'src/core/lib/iomgr/tcp_client_posix.cc', + 'src/core/lib/iomgr/tcp_client_windows.cc', + 'src/core/lib/iomgr/tcp_posix.cc', + 'src/core/lib/iomgr/tcp_server.cc', + 'src/core/lib/iomgr/tcp_server_posix.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_common.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc', + 'src/core/lib/iomgr/tcp_server_windows.cc', + 'src/core/lib/iomgr/tcp_windows.cc', + 'src/core/lib/iomgr/timer.cc', + 'src/core/lib/iomgr/timer_generic.cc', + 'src/core/lib/iomgr/timer_heap.cc', + 'src/core/lib/iomgr/timer_manager.cc', + 'src/core/lib/iomgr/unix_sockets_posix.cc', + 'src/core/lib/iomgr/unix_sockets_posix_noop.cc', + 'src/core/lib/iomgr/vsock.cc', + 'src/core/lib/iomgr/wakeup_fd_eventfd.cc', + 'src/core/lib/iomgr/wakeup_fd_nospecial.cc', + 'src/core/lib/iomgr/wakeup_fd_pipe.cc', + 'src/core/lib/iomgr/wakeup_fd_posix.cc', + 'src/core/lib/json/json_reader.cc', + 'src/core/lib/json/json_writer.cc', + 'src/core/lib/matchers/matchers.cc', + 'src/core/lib/promise/activity.cc', + 'src/core/lib/promise/party.cc', + 'src/core/lib/promise/trace.cc', + 'src/core/lib/resource_quota/api.cc', + 'src/core/lib/resource_quota/arena.cc', + 'src/core/lib/resource_quota/memory_quota.cc', + 'src/core/lib/resource_quota/periodic_update.cc', + 'src/core/lib/resource_quota/resource_quota.cc', + 'src/core/lib/resource_quota/thread_quota.cc', + 'src/core/lib/resource_quota/trace.cc', + 'src/core/lib/security/authorization/audit_logging.cc', + 'src/core/lib/security/authorization/authorization_policy_provider_vtable.cc', + 'src/core/lib/security/authorization/evaluate_args.cc', + 'src/core/lib/security/authorization/grpc_authorization_engine.cc', + 'src/core/lib/security/authorization/grpc_authorization_policy_provider.cc', + 'src/core/lib/security/authorization/grpc_server_authz_filter.cc', + 'src/core/lib/security/authorization/matchers.cc', + 'src/core/lib/security/authorization/rbac_policy.cc', + 'src/core/lib/security/authorization/rbac_translator.cc', + 'src/core/lib/security/authorization/stdout_logger.cc', + 'src/core/lib/security/certificate_provider/certificate_provider_registry.cc', + 'src/core/lib/security/context/security_context.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_linux.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc', + 'src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_client_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_options.cc', + 'src/core/lib/security/credentials/alts/grpc_alts_credentials_server_options.cc', + 'src/core/lib/security/credentials/call_creds_util.cc', + 'src/core/lib/security/credentials/composite/composite_credentials.cc', + 'src/core/lib/security/credentials/credentials.cc', + 'src/core/lib/security/credentials/plugin/plugin_credentials.cc', + 'src/core/lib/security/credentials/tls/tls_utils.cc', + 'src/core/lib/security/security_connector/load_system_roots_fallback.cc', + 'src/core/lib/security/security_connector/load_system_roots_supported.cc', + 'src/core/lib/security/security_connector/load_system_roots_windows.cc', + 'src/core/lib/security/security_connector/security_connector.cc', + 'src/core/lib/security/transport/client_auth_filter.cc', + 'src/core/lib/security/transport/legacy_server_auth_filter.cc', + 'src/core/lib/security/transport/secure_endpoint.cc', + 'src/core/lib/security/transport/security_handshaker.cc', + 'src/core/lib/security/transport/server_auth_filter.cc', + 'src/core/lib/security/transport/tsi_error.cc', + 'src/core/lib/security/util/json_util.cc', + 'src/core/lib/slice/b64.cc', + 'src/core/lib/slice/percent_encoding.cc', + 'src/core/lib/slice/slice.cc', + 'src/core/lib/slice/slice_buffer.cc', + 'src/core/lib/slice/slice_refcount.cc', + 'src/core/lib/slice/slice_string_helpers.cc', + 'src/core/lib/surface/api_trace.cc', + 'src/core/lib/surface/byte_buffer.cc', + 'src/core/lib/surface/byte_buffer_reader.cc', + 'src/core/lib/surface/call.cc', + 'src/core/lib/surface/call_details.cc', + 'src/core/lib/surface/call_log_batch.cc', + 'src/core/lib/surface/channel.cc', + 'src/core/lib/surface/channel_init.cc', + 'src/core/lib/surface/channel_stack_type.cc', + 'src/core/lib/surface/completion_queue.cc', + 'src/core/lib/surface/completion_queue_factory.cc', + 'src/core/lib/surface/event_string.cc', + 'src/core/lib/surface/init_internally.cc', + 'src/core/lib/surface/lame_client.cc', + 'src/core/lib/surface/metadata_array.cc', + 'src/core/lib/surface/validate_metadata.cc', + 'src/core/lib/surface/version.cc', + 'src/core/lib/surface/wait_for_cq_end_op.cc', + 'src/core/lib/transport/batch_builder.cc', + 'src/core/lib/transport/call_filters.cc', + 'src/core/lib/transport/call_final_info.cc', + 'src/core/lib/transport/call_size_estimator.cc', + 'src/core/lib/transport/call_spine.cc', + 'src/core/lib/transport/connectivity_state.cc', + 'src/core/lib/transport/error_utils.cc', + 'src/core/lib/transport/handshaker.cc', + 'src/core/lib/transport/handshaker_registry.cc', + 'src/core/lib/transport/message.cc', + 'src/core/lib/transport/metadata.cc', + 'src/core/lib/transport/metadata_batch.cc', + 'src/core/lib/transport/parsed_metadata.cc', + 'src/core/lib/transport/status_conversion.cc', + 'src/core/lib/transport/timeout_encoding.cc', + 'src/core/lib/transport/transport.cc', + 'src/core/lib/transport/transport_op_string.cc', + 'src/core/lib/uri/uri_parser.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/resolver/endpoint_addresses.cc', + 'src/core/resolver/resolver.cc', + 'src/core/resolver/resolver_registry.cc', + 'src/core/service_config/service_config_parser.cc', + 'src/core/tsi/alts/handshaker/transport_security_common_api.cc', + 'src/core/tsi/transport_security.cc', + 'src/core/tsi/transport_security_grpc.cc', + 'third_party/upb/upb/message/accessors.c', + 'third_party/upb/upb/mini_descriptor/build_enum.c', + 'third_party/upb/upb/mini_descriptor/decode.c', + 'third_party/upb/upb/mini_descriptor/internal/base92.c', + 'third_party/upb/upb/mini_descriptor/internal/encode.c', + 'third_party/upb/upb/mini_descriptor/link.c', + 'third_party/upb/upb/wire/decode.c', + 'third_party/upb/upb/wire/decode_fast.c', + 'third_party/upb/upb/wire/encode.c', + 'third_party/upb/upb/wire/eps_copy_input_stream.c', + 'third_party/upb/upb/wire/reader.c', + ], + }, + { + 'target_name': 'grpc_plugin_support', + 'type': 'static_library', + 'dependencies': [ + 'protobuf', + 'protoc', + ], + 'sources': [ + 'src/compiler/cpp_generator.cc', + 'src/compiler/csharp_generator.cc', + 'src/compiler/node_generator.cc', + 'src/compiler/objective_c_generator.cc', + 'src/compiler/php_generator.cc', + 'src/compiler/proto_parser_helper.cc', + 'src/compiler/python_generator.cc', + 'src/compiler/ruby_generator.cc', + ], + }, + { + 'target_name': 'grpcpp_channelz', + 'type': 'static_library', + 'dependencies': [ + 'grpc++', + ], + 'sources': [ + 'src/proto/grpc/channelz/channelz.proto', + 'src/cpp/server/channelz/channelz_service.cc', + 'src/cpp/server/channelz/channelz_service_plugin.cc', + ], + }, + { + 'target_name': 'boringssl', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/boringssl-with-bazel/err_data.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_strex.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/posix_time.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c', + 'third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c', + 'third_party/boringssl-with-bazel/src/crypto/base64/base64.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/bio.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/connect.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/errno.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/fd.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/file.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/pair.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/printf.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/socket.c', + 'third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c', + 'third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c', + 'third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c', + 'third_party/boringssl-with-bazel/src/crypto/buf/buf.c', + 'third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c', + 'third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c', + 'third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c', + 'third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c', + 'third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c', + 'third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_des.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c', + 'third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c', + 'third_party/boringssl-with-bazel/src/crypto/conf/conf.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_apple.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_fuchsia.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_linux.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_openbsd.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_sysreg.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_aarch64_win.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_arm_freebsd.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.c', + 'third_party/boringssl-with-bazel/src/crypto/cpu_intel.c', + 'third_party/boringssl-with-bazel/src/crypto/crypto.c', + 'third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c', + 'third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_64_adx.c', + 'third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c', + 'third_party/boringssl-with-bazel/src/crypto/des/des.c', + 'third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c', + 'third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c', + 'third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c', + 'third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c', + 'third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c', + 'third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c', + 'third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/engine/engine.c', + 'third_party/boringssl-with-bazel/src/crypto/err/err.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/evp.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_hkdf.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/print.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c', + 'third_party/boringssl-with-bazel/src/crypto/evp/sign.c', + 'third_party/boringssl-with-bazel/src/crypto/ex_data.c', + 'third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c', + 'third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c', + 'third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c', + 'third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c', + 'third_party/boringssl-with-bazel/src/crypto/keccak/keccak.c', + 'third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c', + 'third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c', + 'third_party/boringssl-with-bazel/src/crypto/mem.c', + 'third_party/boringssl-with-bazel/src/crypto/obj/obj.c', + 'third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c', + 'third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c', + 'third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c', + 'third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c', + 'third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c', + 'third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c', + 'third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c', + 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c', + 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c', + 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c', + 'third_party/boringssl-with-bazel/src/crypto/pool/pool.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/getentropy.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c', + 'third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c', + 'third_party/boringssl-with-bazel/src/crypto/refcount.c', + 'third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c', + 'third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_crypt.c', + 'third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c', + 'third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/address.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/fors.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/merkle.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/spx.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/spx_util.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/thash.c', + 'third_party/boringssl-with-bazel/src/crypto/spx/wots.c', + 'third_party/boringssl-with-bazel/src/crypto/stack/stack.c', + 'third_party/boringssl-with-bazel/src/crypto/thread.c', + 'third_party/boringssl-with-bazel/src/crypto/thread_none.c', + 'third_party/boringssl-with-bazel/src/crypto/thread_pthread.c', + 'third_party/boringssl-with-bazel/src/crypto/thread_win.c', + 'third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c', + 'third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c', + 'third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/by_file.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/name_print.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/policy.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/t_req.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_akey.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_akeya.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_alt.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_bcons.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_bitst.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_conf.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_cpols.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_crld.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_enum.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_extku.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_genn.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_ia5.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_info.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_int.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_lib.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_ncons.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_ocsp.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_pcons.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_pmaps.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_prn.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_purp.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_skey.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/v3_utl.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509name.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_all.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_name.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_req.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_val.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c', + 'third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c', + 'third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc', + 'third_party/boringssl-with-bazel/src/ssl/d1_both.cc', + 'third_party/boringssl-with-bazel/src/ssl/d1_lib.cc', + 'third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc', + 'third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc', + 'third_party/boringssl-with-bazel/src/ssl/dtls_method.cc', + 'third_party/boringssl-with-bazel/src/ssl/dtls_record.cc', + 'third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc', + 'third_party/boringssl-with-bazel/src/ssl/extensions.cc', + 'third_party/boringssl-with-bazel/src/ssl/handoff.cc', + 'third_party/boringssl-with-bazel/src/ssl/handshake.cc', + 'third_party/boringssl-with-bazel/src/ssl/handshake_client.cc', + 'third_party/boringssl-with-bazel/src/ssl/handshake_server.cc', + 'third_party/boringssl-with-bazel/src/ssl/s3_both.cc', + 'third_party/boringssl-with-bazel/src/ssl/s3_lib.cc', + 'third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_file.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_session.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc', + 'third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc', + 'third_party/boringssl-with-bazel/src/ssl/t1_enc.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls13_both.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls13_client.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls13_server.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls_method.cc', + 'third_party/boringssl-with-bazel/src/ssl/tls_record.cc', + ], + }, + { + 'target_name': 'boringssl_test_util', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/boringssl-with-bazel/src/crypto/test/abi_test.cc', + 'third_party/boringssl-with-bazel/src/crypto/test/file_test.cc', + 'third_party/boringssl-with-bazel/src/crypto/test/test_util.cc', + 'third_party/boringssl-with-bazel/src/crypto/test/wycheproof_util.cc', + ], + }, + { + 'target_name': 'benchmark', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/benchmark/src/benchmark.cc', + 'third_party/benchmark/src/benchmark_api_internal.cc', + 'third_party/benchmark/src/benchmark_main.cc', + 'third_party/benchmark/src/benchmark_name.cc', + 'third_party/benchmark/src/benchmark_register.cc', + 'third_party/benchmark/src/benchmark_runner.cc', + 'third_party/benchmark/src/check.cc', + 'third_party/benchmark/src/colorprint.cc', + 'third_party/benchmark/src/commandlineflags.cc', + 'third_party/benchmark/src/complexity.cc', + 'third_party/benchmark/src/console_reporter.cc', + 'third_party/benchmark/src/counter.cc', + 'third_party/benchmark/src/csv_reporter.cc', + 'third_party/benchmark/src/json_reporter.cc', + 'third_party/benchmark/src/perf_counters.cc', + 'third_party/benchmark/src/reporter.cc', + 'third_party/benchmark/src/statistics.cc', + 'third_party/benchmark/src/string_util.cc', + 'third_party/benchmark/src/sysinfo.cc', + 'third_party/benchmark/src/timers.cc', + ], + }, + ] +} diff --git a/package.xml b/package.xml index 23357d455f1..d1778bf0607 100644 --- a/package.xml +++ b/package.xml @@ -114,6 +114,8 @@ + + @@ -129,6 +131,8 @@ + + @@ -1243,6 +1247,8 @@ + + @@ -1468,6 +1474,7 @@ + diff --git a/src/core/BUILD b/src/core/BUILD index 56aa4f03aa8..830376847ef 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -3281,12 +3281,12 @@ grpc_cc_library( language = "c++", deps = [ "arena", + "call_destination", "grpc_service_config", "lb_policy", "unique_type_name", "//:call_tracer", - "//:gpr_public_hdrs", - "//:grpc_base", + "//:gpr", "//:legacy_context", ], ) @@ -7509,12 +7509,10 @@ grpc_cc_library( hdrs = [ "lib/transport/call_filters.h", ], - external_deps = [ - "absl/log:check", - "absl/log:log", - ], + external_deps = ["absl/log:check"], deps = [ "call_final_info", + "dump_args", "latch", "map", "message", @@ -7620,20 +7618,19 @@ grpc_cc_library( hdrs = [ "lib/transport/call_spine.h", ], - external_deps = [ - "absl/log:check", - "absl/log:log", - ], + external_deps = ["absl/log:check"], deps = [ "1999", "call_arena_allocator", "call_filters", + "dual_ref_counted", "for_each", "if", "latch", "message", "metadata", "pipe", + "prioritized_race", "promise_status", "status_flag", "try_seq", diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc new file mode 100644 index 00000000000..77de1ab121d --- /dev/null +++ b/src/core/client_channel/client_channel.cc @@ -0,0 +1,1392 @@ +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +#include "src/core/client_channel/client_channel.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "absl/cleanup/cleanup.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/cord.h" +#include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "absl/types/variant.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/client_channel/backup_poller.h" +#include "src/core/client_channel/client_channel_internal.h" +#include "src/core/client_channel/client_channel_service_config.h" +#include "src/core/client_channel/config_selector.h" +#include "src/core/client_channel/dynamic_filters.h" +#include "src/core/client_channel/global_subchannel_pool.h" +#include "src/core/client_channel/local_subchannel_pool.h" +#include "src/core/client_channel/retry_filter.h" +#include "src/core/client_channel/subchannel.h" +#include "src/core/client_channel/subchannel_interface_internal.h" +#include "src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/promise_based_filter.h" +#include "src/core/lib/channel/status_util.h" +#include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/experiments/experiments.h" +#include "src/core/lib/gprpp/crash.h" +#include "src/core/lib/gprpp/debug_location.h" +#include "src/core/lib/gprpp/manual_constructor.h" +#include "src/core/lib/gprpp/status_helper.h" +#include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/lib/gprpp/work_serializer.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/lib/promise/cancel_callback.h" +#include "src/core/lib/promise/context.h" +#include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" +#include "src/core/lib/promise/latch.h" +#include "src/core/lib/promise/loop.h" +#include "src/core/lib/promise/map.h" +#include "src/core/lib/promise/pipe.h" +#include "src/core/lib/promise/poll.h" +#include "src/core/lib/promise/promise.h" +#include "src/core/lib/promise/sleep.h" +#include "src/core/lib/promise/status_flag.h" +#include "src/core/lib/promise/try_seq.h" +#include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/slice/slice.h" +#include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/transport/call_spine.h" +#include "src/core/lib/transport/connectivity_state.h" +#include "src/core/lib/transport/error_utils.h" +#include "src/core/lib/transport/metadata_batch.h" +#include "src/core/load_balancing/backend_metric_parser.h" +#include "src/core/load_balancing/child_policy_handler.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/resolver/endpoint_addresses.h" +#include "src/core/resolver/resolver_registry.h" +#include "src/core/service_config/service_config_call_data.h" +#include "src/core/service_config/service_config_impl.h" +#include "src/core/telemetry/metrics.h" +#include "src/core/util/json/json.h" +#include "src/core/util/useful.h" + +namespace grpc_core { + +using grpc_event_engine::experimental::EventEngine; + +using internal::ClientChannelMethodParsedConfig; + +// Defined in legacy client channel filter. +// TODO(roth): Move these here when we remove the legacy filter. +extern TraceFlag grpc_client_channel_trace; +extern TraceFlag grpc_client_channel_call_trace; +extern TraceFlag grpc_client_channel_lb_call_trace; + +// +// ClientChannel::ResolverResultHandler +// + +class ClientChannel::ResolverResultHandler : public Resolver::ResultHandler { + public: + explicit ResolverResultHandler(RefCountedPtr client_channel) + : client_channel_(std::move(client_channel)) {} + + ~ResolverResultHandler() override { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: resolver shutdown complete", + client_channel_.get()); + } + } + + void ReportResult(Resolver::Result result) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_) { + client_channel_->OnResolverResultChangedLocked(std::move(result)); + } + + private: + RefCountedPtr client_channel_; +}; + +// +// ClientChannel::SubchannelWrapper +// + +// This class is a wrapper for Subchannel that hides details of the +// channel's implementation (such as the connected subchannel) from the +// LB policy API. +// +// Note that no synchronization is needed here, because even if the +// underlying subchannel is shared between channels, this wrapper will only +// be used within one channel, so it will always be synchronized by the +// control plane work_serializer. +class ClientChannel::SubchannelWrapper + : public SubchannelInterfaceWithCallDestination { + public: + SubchannelWrapper(RefCountedPtr client_channel, + RefCountedPtr subchannel); + ~SubchannelWrapper() override; + + void Orphaned() override; + void WatchConnectivityState( + std::unique_ptr watcher) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_); + void CancelConnectivityStateWatch( + ConnectivityStateWatcherInterface* watcher) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_); + + RefCountedPtr call_destination() override { + return subchannel_->call_destination(); + } + + void RequestConnection() override { subchannel_->RequestConnection(); } + + void ResetBackoff() override { subchannel_->ResetBackoff(); } + + void AddDataWatcher(std::unique_ptr watcher) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_); + void CancelDataWatcher(DataWatcherInterface* watcher) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_); + void ThrottleKeepaliveTime(int new_keepalive_time); + + private: + class WatcherWrapper; + + // A heterogenous lookup comparator for data watchers that allows + // unique_ptr keys to be looked up as raw pointers. + struct DataWatcherLessThan { + using is_transparent = void; + bool operator()(const std::unique_ptr& p1, + const std::unique_ptr& p2) const { + return p1 < p2; + } + bool operator()(const std::unique_ptr& p1, + const DataWatcherInterface* p2) const { + return p1.get() < p2; + } + bool operator()(const DataWatcherInterface* p1, + const std::unique_ptr& p2) const { + return p1 < p2.get(); + } + }; + + RefCountedPtr client_channel_; + RefCountedPtr subchannel_; + // Maps from the address of the watcher passed to us by the LB policy + // to the address of the WrapperWatcher that we passed to the underlying + // subchannel. This is needed so that when the LB policy calls + // CancelConnectivityStateWatch() with its watcher, we know the + // corresponding WrapperWatcher to cancel on the underlying subchannel. + std::map watcher_map_ + ABSL_GUARDED_BY(*client_channel_->work_serializer_); + std::set, DataWatcherLessThan> + data_watchers_ ABSL_GUARDED_BY(*client_channel_->work_serializer_); +}; + +// This wrapper provides a bridge between the internal Subchannel API +// and the SubchannelInterface API that we expose to LB policies. +// It implements Subchannel::ConnectivityStateWatcherInterface and wraps +// the instance of SubchannelInterface::ConnectivityStateWatcherInterface +// that was passed in by the LB policy. We pass an instance of this +// class to the underlying Subchannel, and when we get updates from +// the subchannel, we pass those on to the wrapped watcher to return +// the update to the LB policy. +// +// This class handles things like hopping into the WorkSerializer +// before passing notifications to the LB policy and propagating +// keepalive information betwen subchannels. +class ClientChannel::SubchannelWrapper::WatcherWrapper + : public Subchannel::ConnectivityStateWatcherInterface { + public: + WatcherWrapper( + std::unique_ptr + watcher, + RefCountedPtr subchannel_wrapper) + : watcher_(std::move(watcher)), + subchannel_wrapper_(std::move(subchannel_wrapper)) {} + + ~WatcherWrapper() override { + subchannel_wrapper_.reset(DEBUG_LOCATION, "WatcherWrapper"); + } + + void OnConnectivityStateChange( + RefCountedPtr self, + grpc_connectivity_state state, const absl::Status& status) override { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: connectivity change for subchannel " + "wrapper %p subchannel %p; hopping into work_serializer", + subchannel_wrapper_->client_channel_.get(), + subchannel_wrapper_.get(), + subchannel_wrapper_->subchannel_.get()); + } + self.release(); // Held by callback. + subchannel_wrapper_->client_channel_->work_serializer_->Run( + [this, state, status]() ABSL_EXCLUSIVE_LOCKS_REQUIRED( + *subchannel_wrapper_->client_channel_->work_serializer_) { + ApplyUpdateInControlPlaneWorkSerializer(state, status); + Unref(); + }, + DEBUG_LOCATION); + } + + grpc_pollset_set* interested_parties() override { return nullptr; } + + private: + void ApplyUpdateInControlPlaneWorkSerializer(grpc_connectivity_state state, + const absl::Status& status) + ABSL_EXCLUSIVE_LOCKS_REQUIRED( + *subchannel_wrapper_->client_channel_->work_serializer_) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: processing connectivity change in work " + "serializer for subchannel wrapper %p subchannel %p watcher=%p " + "state=%s status=%s", + subchannel_wrapper_->client_channel_.get(), + subchannel_wrapper_.get(), subchannel_wrapper_->subchannel_.get(), + watcher_.get(), ConnectivityStateName(state), + status.ToString().c_str()); + } + absl::optional keepalive_throttling = + status.GetPayload(kKeepaliveThrottlingKey); + if (keepalive_throttling.has_value()) { + int new_keepalive_time = -1; + if (absl::SimpleAtoi(std::string(keepalive_throttling.value()), + &new_keepalive_time)) { + if (new_keepalive_time > + subchannel_wrapper_->client_channel_->keepalive_time_) { + subchannel_wrapper_->client_channel_->keepalive_time_ = + new_keepalive_time; + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: throttling keepalive time to %d", + subchannel_wrapper_->client_channel_.get(), + subchannel_wrapper_->client_channel_->keepalive_time_); + } + // Propagate the new keepalive time to all subchannels. This is so + // that new transports created by any subchannel (and not just the + // subchannel that received the GOAWAY), use the new keepalive time. + for (auto* subchannel_wrapper : + subchannel_wrapper_->client_channel_->subchannel_wrappers_) { + subchannel_wrapper->ThrottleKeepaliveTime(new_keepalive_time); + } + } + } else { + gpr_log(GPR_ERROR, + "client_channel=%p: Illegal keepalive throttling value %s", + subchannel_wrapper_->client_channel_.get(), + std::string(keepalive_throttling.value()).c_str()); + } + } + // Propagate status only in state TF. + // We specifically want to avoid propagating the status for + // state IDLE that the real subchannel gave us only for the + // purpose of keepalive propagation. + watcher_->OnConnectivityStateChange( + state, + state == GRPC_CHANNEL_TRANSIENT_FAILURE ? status : absl::OkStatus()); + } + + std::unique_ptr + watcher_; + RefCountedPtr subchannel_wrapper_; +}; + +ClientChannel::SubchannelWrapper::SubchannelWrapper( + RefCountedPtr client_channel, + RefCountedPtr subchannel) + : SubchannelInterfaceWithCallDestination( + GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace) + ? "SubchannelWrapper" + : nullptr), + client_channel_(std::move(client_channel)), + subchannel_(std::move(subchannel)) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log( + GPR_INFO, + "client_channel=%p: creating subchannel wrapper %p for subchannel %p", + client_channel_.get(), this, subchannel_.get()); + } +#ifndef NDEBUG + DCHECK(client_channel_->work_serializer_->RunningInWorkSerializer()); +#endif + if (client_channel_->channelz_node_ != nullptr) { + auto* subchannel_node = subchannel_->channelz_node(); + if (subchannel_node != nullptr) { + auto it = + client_channel_->subchannel_refcount_map_.find(subchannel_.get()); + if (it == client_channel_->subchannel_refcount_map_.end()) { + client_channel_->channelz_node_->AddChildSubchannel( + subchannel_node->uuid()); + it = client_channel_->subchannel_refcount_map_ + .emplace(subchannel_.get(), 0) + .first; + } + ++it->second; + } + } + client_channel_->subchannel_wrappers_.insert(this); +} + +ClientChannel::SubchannelWrapper::~SubchannelWrapper() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: destroying subchannel wrapper %p " + "for subchannel %p", + client_channel_.get(), this, subchannel_.get()); + } +} + +void ClientChannel::SubchannelWrapper::Orphaned() { + // Make sure we clean up the channel's subchannel maps inside the + // WorkSerializer. + auto self = WeakRefAsSubclass(DEBUG_LOCATION, + "subchannel map cleanup"); + client_channel_->work_serializer_->Run( + [self]() ABSL_EXCLUSIVE_LOCKS_REQUIRED( + *self->client_channel_->work_serializer_) { + self->client_channel_->subchannel_wrappers_.erase(self.get()); + if (self->client_channel_->channelz_node_ != nullptr) { + auto* subchannel_node = self->subchannel_->channelz_node(); + if (subchannel_node != nullptr) { + auto it = self->client_channel_->subchannel_refcount_map_.find( + self->subchannel_.get()); + CHECK(it != self->client_channel_->subchannel_refcount_map_.end()); + --it->second; + if (it->second == 0) { + self->client_channel_->channelz_node_->RemoveChildSubchannel( + subchannel_node->uuid()); + self->client_channel_->subchannel_refcount_map_.erase(it); + } + } + } + }, + DEBUG_LOCATION); +} + +void ClientChannel::SubchannelWrapper::WatchConnectivityState( + std::unique_ptr watcher) { + auto& watcher_wrapper = watcher_map_[watcher.get()]; + CHECK(watcher_wrapper == nullptr); + watcher_wrapper = new WatcherWrapper( + std::move(watcher), + RefAsSubclass(DEBUG_LOCATION, "WatcherWrapper")); + subchannel_->WatchConnectivityState( + RefCountedPtr( + watcher_wrapper)); +} + +void ClientChannel::SubchannelWrapper::CancelConnectivityStateWatch( + ConnectivityStateWatcherInterface* watcher) { + auto it = watcher_map_.find(watcher); + CHECK(it != watcher_map_.end()); + subchannel_->CancelConnectivityStateWatch(it->second); + watcher_map_.erase(it); +} + +void ClientChannel::SubchannelWrapper::AddDataWatcher( + std::unique_ptr watcher) { + static_cast(watcher.get()) + ->SetSubchannel(subchannel_.get()); + CHECK(data_watchers_.insert(std::move(watcher)).second); +} + +void ClientChannel::SubchannelWrapper::CancelDataWatcher( + DataWatcherInterface* watcher) { + auto it = data_watchers_.find(watcher); + if (it != data_watchers_.end()) data_watchers_.erase(it); +} + +void ClientChannel::SubchannelWrapper::ThrottleKeepaliveTime( + int new_keepalive_time) { + subchannel_->ThrottleKeepaliveTime(new_keepalive_time); +} + +// +// ClientChannel::ClientChannelControlHelper +// + +class ClientChannel::ClientChannelControlHelper + : public LoadBalancingPolicy::ChannelControlHelper { + public: + explicit ClientChannelControlHelper( + RefCountedPtr client_channel) + : client_channel_(std::move(client_channel)) {} + + ~ClientChannelControlHelper() override { + client_channel_.reset(DEBUG_LOCATION, "ClientChannelControlHelper"); + } + + RefCountedPtr CreateSubchannel( + const grpc_resolved_address& address, const ChannelArgs& per_address_args, + const ChannelArgs& args) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_) { + // If shutting down, do nothing. + if (client_channel_->resolver_ == nullptr) return nullptr; + ChannelArgs subchannel_args = Subchannel::MakeSubchannelArgs( + args, per_address_args, client_channel_->subchannel_pool_, + client_channel_->default_authority_); + // Create subchannel. + RefCountedPtr subchannel = + client_channel_->client_channel_factory_->CreateSubchannel( + address, subchannel_args); + if (subchannel == nullptr) return nullptr; + // Make sure the subchannel has updated keepalive time. + subchannel->ThrottleKeepaliveTime(client_channel_->keepalive_time_); + // Create and return wrapper for the subchannel. + return MakeRefCounted(client_channel_, + std::move(subchannel)); + } + + void UpdateState( + grpc_connectivity_state state, const absl::Status& status, + RefCountedPtr picker) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_) { + if (client_channel_->resolver_ == nullptr) return; // Shutting down. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + const char* extra = client_channel_->disconnect_error_.ok() + ? "" + : " (ignoring -- channel shutting down)"; + gpr_log(GPR_INFO, + "client_channel=%p: update: state=%s status=(%s) picker=%p%s", + client_channel_.get(), ConnectivityStateName(state), + status.ToString().c_str(), picker.get(), extra); + } + // Do update only if not shutting down. + if (client_channel_->disconnect_error_.ok()) { + client_channel_->UpdateStateAndPickerLocked(state, status, "helper", + std::move(picker)); + } + } + + void RequestReresolution() override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_) { + if (client_channel_->resolver_ == nullptr) return; // Shutting down. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: started name re-resolving", + client_channel_.get()); + } + client_channel_->resolver_->RequestReresolutionLocked(); + } + + absl::string_view GetTarget() override { return client_channel_->target(); } + + absl::string_view GetAuthority() override { + return client_channel_->default_authority_; + } + + RefCountedPtr GetChannelCredentials() override { + return client_channel_->channel_args_.GetObject() + ->duplicate_without_call_credentials(); + } + + RefCountedPtr GetUnsafeChannelCredentials() + override { + return client_channel_->channel_args_.GetObject() + ->Ref(); + } + + EventEngine* GetEventEngine() override { + return client_channel_->event_engine(); + } + + GlobalStatsPluginRegistry::StatsPluginGroup& GetStatsPluginGroup() override { + return client_channel_->stats_plugin_group_; + } + + void AddTraceEvent(TraceSeverity severity, absl::string_view message) override + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_) { + if (client_channel_->resolver_ == nullptr) return; // Shutting down. + if (client_channel_->channelz_node_ != nullptr) { + client_channel_->channelz_node_->AddTraceEvent( + ConvertSeverityEnum(severity), + grpc_slice_from_copied_buffer(message.data(), message.size())); + } + } + + private: + static channelz::ChannelTrace::Severity ConvertSeverityEnum( + TraceSeverity severity) { + if (severity == TRACE_INFO) return channelz::ChannelTrace::Info; + if (severity == TRACE_WARNING) return channelz::ChannelTrace::Warning; + return channelz::ChannelTrace::Error; + } + + RefCountedPtr client_channel_; +}; + +// +// ClientChannel implementation +// + +namespace { + +RefCountedPtr GetSubchannelPool( + const ChannelArgs& args) { + if (args.GetBool(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL).value_or(false)) { + return MakeRefCounted(); + } + return GlobalSubchannelPool::instance(); +} + +} // namespace + +absl::StatusOr> ClientChannel::Create( + std::string target, ChannelArgs channel_args) { + gpr_log(GPR_ERROR, "ARGS: %s", channel_args.ToString().c_str()); + // Get URI to resolve, using proxy mapper if needed. + if (target.empty()) { + return absl::InternalError("target URI is empty in client channel"); + } + std::string uri_to_resolve = CoreConfiguration::Get() + .proxy_mapper_registry() + .MapName(target, &channel_args) + .value_or(target); + // Make sure the URI to resolve is valid, so that we know that + // resolver creation will succeed later. + if (!CoreConfiguration::Get().resolver_registry().IsValidTarget( + uri_to_resolve)) { + return absl::InvalidArgumentError( + absl::StrCat("invalid target URI: ", uri_to_resolve)); + } + // Get default service config. If none is specified via the client API, + // we use an empty config. + absl::optional service_config_json = + channel_args.GetString(GRPC_ARG_SERVICE_CONFIG); + if (!service_config_json.has_value()) service_config_json = "{}"; + auto default_service_config = + ServiceConfigImpl::Create(channel_args, *service_config_json); + if (!default_service_config.ok()) return default_service_config.status(); + // Strip out service config channel arg, so that it doesn't affect + // subchannel uniqueness when the args flow down to that layer. + channel_args = channel_args.Remove(GRPC_ARG_SERVICE_CONFIG); + // Check client channel factory. + auto* client_channel_factory = channel_args.GetObject(); + if (client_channel_factory == nullptr) { + return absl::InternalError( + "Missing client channel factory in args for client channel"); + } + auto* call_destination_factory = + channel_args.GetObject(); + if (call_destination_factory == nullptr) { + return absl::InternalError( + "Missing call destination factory in args for client channel"); + } + if (channel_args.GetObject() == nullptr) { + return absl::InternalError( + "Missing event engine in args for client channel"); + } + // Success. Construct channel. + return MakeOrphanable( + std::move(target), std::move(channel_args), std::move(uri_to_resolve), + std::move(*default_service_config), client_channel_factory, + call_destination_factory); +} + +namespace { +std::string GetDefaultAuthorityFromChannelArgs(const ChannelArgs& channel_args, + absl::string_view target) { + absl::optional default_authority = + channel_args.GetOwnedString(GRPC_ARG_DEFAULT_AUTHORITY); + if (!default_authority.has_value()) { + return CoreConfiguration::Get().resolver_registry().GetDefaultAuthority( + target); + } else { + return std::move(*default_authority); + } +} +} // namespace + +ClientChannel::ClientChannel( + std::string target, ChannelArgs channel_args, std::string uri_to_resolve, + RefCountedPtr default_service_config, + ClientChannelFactory* client_channel_factory, + CallDestinationFactory* call_destination_factory) + : Channel(std::move(target), channel_args), + channel_args_(std::move(channel_args)), + event_engine_(channel_args_.GetObjectRef()), + uri_to_resolve_(std::move(uri_to_resolve)), + service_config_parser_index_( + internal::ClientChannelServiceConfigParser::ParserIndex()), + default_service_config_(std::move(default_service_config)), + client_channel_factory_(client_channel_factory), + default_authority_( + GetDefaultAuthorityFromChannelArgs(channel_args_, this->target())), + channelz_node_(channel_args_.GetObject()), + call_arena_allocator_(MakeRefCounted( + channel_args_.GetObject() + ->memory_quota() + ->CreateMemoryAllocator("client_channel"), + 1024)), + idle_timeout_(GetClientIdleTimeout(channel_args_)), + resolver_data_for_calls_(ResolverDataForCalls{}), + picker_(nullptr), + call_destination_( + call_destination_factory->CreateCallDestination(picker_)), + work_serializer_(std::make_shared(event_engine_)), + state_tracker_("client_channel", GRPC_CHANNEL_IDLE), + subchannel_pool_(GetSubchannelPool(channel_args_)) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: creating client_channel", this); + } + // Set initial keepalive time. + auto keepalive_arg = channel_args_.GetInt(GRPC_ARG_KEEPALIVE_TIME_MS); + if (keepalive_arg.has_value()) { + keepalive_time_ = Clamp(*keepalive_arg, 1, INT_MAX); + } else { + keepalive_time_ = -1; // unset + } + // Get stats plugins for channel. + experimental::StatsPluginChannelScope scope(this->target(), + default_authority_); + stats_plugin_group_ = + GlobalStatsPluginRegistry::GetStatsPluginsForChannel(scope); +} + +ClientChannel::~ClientChannel() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: destroying", this); + } +} + +void ClientChannel::Orphan() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: shutting down", this); + } + auto self = RefAsSubclass(); + work_serializer_->Run( + [self]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*self->work_serializer_) { + self->DestroyResolverAndLbPolicyLocked(); + }, + DEBUG_LOCATION); + // IncreaseCallCount() introduces a phony call and prevents the idle + // timer from being reset by other threads. + idle_state_.IncreaseCallCount(); + idle_activity_.Reset(); + Unref(); +} + +grpc_connectivity_state ClientChannel::CheckConnectivityState( + bool try_to_connect) { + // state_tracker_ is guarded by work_serializer_, which we're not + // holding here. But the one method of state_tracker_ that *is* + // thread-safe to call without external synchronization is the state() + // method, so we can disable thread-safety analysis for this one read. + grpc_connectivity_state state = + ABSL_TS_UNCHECKED_READ(state_tracker_).state(); + if (state == GRPC_CHANNEL_IDLE && try_to_connect) { + auto self = RefAsSubclass(); // Held by callback. + work_serializer_->Run( + [self]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*self->work_serializer_) { + self->TryToConnectLocked(); + }, + DEBUG_LOCATION); + } + return state; +} + +void ClientChannel::WatchConnectivityState(grpc_connectivity_state, Timestamp, + grpc_completion_queue*, void*) { + // TODO(ctiller): implement + Crash("not implemented"); +} + +void ClientChannel::AddConnectivityWatcher( + grpc_connectivity_state, + OrphanablePtr) { + Crash("not implemented"); + // TODO(ctiller): to make this work, need to change WorkSerializer to use + // absl::AnyInvocable<> instead of std::function<> + // work_serializer_->Run( + // [self = RefAsSubclass(), initial_state, + // watcher = std::move(watcher)]() + // ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_) { + // self->state_tracker_.AddWatcher(initial_state, std::move(watcher)); + // }, + // DEBUG_LOCATION); +} + +void ClientChannel::RemoveConnectivityWatcher( + AsyncConnectivityStateWatcherInterface* watcher) { + auto self = RefAsSubclass(); // Held by callback. + work_serializer_->Run( + [self, watcher]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*self->work_serializer_) { + self->state_tracker_.RemoveWatcher(watcher); + }, + DEBUG_LOCATION); +} + +void ClientChannel::GetInfo(const grpc_channel_info* info) { + MutexLock lock(&info_mu_); + if (info->lb_policy_name != nullptr) { + *info->lb_policy_name = gpr_strdup(info_lb_policy_name_.c_str()); + } + if (info->service_config_json != nullptr) { + *info->service_config_json = gpr_strdup(info_service_config_json_.c_str()); + } +} + +void ClientChannel::ResetConnectionBackoff() { + auto self = RefAsSubclass(); + work_serializer_->Run( + [self]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*self->work_serializer_) { + if (self->lb_policy_ != nullptr) self->lb_policy_->ResetBackoffLocked(); + }, + DEBUG_LOCATION); +} + +namespace { + +// A class to handle CQ completion for a ping. +class PingRequest { + public: + PingRequest(grpc_completion_queue* cq, void* tag) : cq_(cq), tag_(tag) { + grpc_cq_begin_op(cq, tag); + } + + // Triggers CQ completion and eventually deletes the PingRequest object. + void Complete(grpc_error_handle error) { + grpc_cq_end_op(cq_, tag_, error, Destroy, this, &completion_storage_); + } + + private: + static void Destroy(void* arg, grpc_cq_completion* /*storage*/) { + delete static_cast(arg); + } + + grpc_completion_queue* cq_; + void* tag_; + grpc_cq_completion completion_storage_; +}; + +} // namespace + +void ClientChannel::Ping(grpc_completion_queue*, void*) { + // TODO(ctiller): implement + Crash("not implemented"); +} + +grpc_call* ClientChannel::CreateCall(grpc_call*, uint32_t, + grpc_completion_queue*, grpc_pollset_set*, + Slice, absl::optional, Timestamp, + bool) { + // TODO(ctiller): code to convert from C-core batch API to v3 call, then + // invoke CreateCall(client_initial_metadata, arena) + // TODO(ctiller): make sure call holds a ref to ClientChannel for its entire + // lifetime + Crash("not implemented"); + return nullptr; +} + +CallInitiator ClientChannel::CreateCall( + ClientMetadataHandle client_initial_metadata) { + // Increment call count. + if (idle_timeout_ != Duration::Zero()) idle_state_.IncreaseCallCount(); + // Exit IDLE if needed. + CheckConnectivityState(/*try_to_connect=*/true); + // Create an initiator/unstarted-handler pair. + auto call = MakeCallPair( + std::move(client_initial_metadata), event_engine_.get(), + call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + // Spawn a promise to wait for the resolver result. + // This will eventually start the call. + call.initiator.SpawnGuardedUntilCallCompletes( + "wait-for-name-resolution", + [self = RefAsSubclass(), + unstarted_handler = std::move(call.handler)]() mutable { + const bool wait_for_ready = + unstarted_handler.UnprocessedClientInitialMetadata() + .GetOrCreatePointer(WaitForReady()) + ->value; + return Map( + // Wait for the resolver result. + CheckDelayed(self->resolver_data_for_calls_.NextWhen( + [wait_for_ready]( + const absl::StatusOr result) { + bool got_result = false; + // If the resolver reports an error but the call is + // wait_for_ready, keep waiting for the next result + // instead of failing the call. + if (!result.ok()) { + got_result = !wait_for_ready; + } else { + // Not an error. Make sure we actually have a result. + got_result = result->config_selector != nullptr; + } + return got_result; + })), + // Handle resolver result. + [self, unstarted_handler]( + std::tuple, bool> + result_and_delayed) mutable { + auto& resolver_data = std::get<0>(result_and_delayed); + const bool was_queued = std::get<1>(result_and_delayed); + if (!resolver_data.ok()) return resolver_data.status(); + // Apply service config to call. + absl::Status status = self->ApplyServiceConfigToCall( + *resolver_data->config_selector, + unstarted_handler.UnprocessedClientInitialMetadata()); + if (!status.ok()) return status; + // If the call was queued, add trace annotation. + if (was_queued) { + auto* call_tracer = + MaybeGetContext(); + if (call_tracer != nullptr) { + call_tracer->RecordAnnotation( + "Delayed name resolution complete."); + } + } + // Start the call on the destination provided by the + // resolver. + resolver_data->call_destination->StartCall( + std::move(unstarted_handler)); + return absl::OkStatus(); + }); + }); + // Return the initiator. + return std::move(call.initiator); +} + +void ClientChannel::CreateResolverLocked() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: starting name resolution for %s", + this, uri_to_resolve_.c_str()); + } + resolver_ = CoreConfiguration::Get().resolver_registry().CreateResolver( + uri_to_resolve_, channel_args_, nullptr, work_serializer_, + std::make_unique(RefAsSubclass())); + // Since the validity of the args was checked when the channel was created, + // CreateResolver() must return a non-null result. + CHECK(resolver_ != nullptr); + UpdateStateLocked(GRPC_CHANNEL_CONNECTING, absl::Status(), + "started resolving"); + resolver_->StartLocked(); + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: created resolver=%p", this, + resolver_.get()); + } +} + +void ClientChannel::DestroyResolverAndLbPolicyLocked() { + if (resolver_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: shutting down resolver=%p", this, + resolver_.get()); + } + resolver_.reset(); + saved_service_config_.reset(); + saved_config_selector_.reset(); + resolver_data_for_calls_.Set(ResolverDataForCalls{nullptr, nullptr}); + // Clear LB policy if set. + if (lb_policy_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: shutting down lb_policy=%p", this, + lb_policy_.get()); + } + lb_policy_.reset(); + picker_.Set(nullptr); + } + } +} + +void ClientChannel::TryToConnectLocked() { + if (disconnect_error_.ok()) { + if (lb_policy_ != nullptr) { + lb_policy_->ExitIdleLocked(); + } else if (resolver_ == nullptr) { + CreateResolverLocked(); + } + } +} + +namespace { + +RefCountedPtr ChooseLbPolicy( + const Resolver::Result& resolver_result, + const internal::ClientChannelGlobalParsedConfig* parsed_service_config) { + // Prefer the LB policy config found in the service config. + if (parsed_service_config->parsed_lb_config() != nullptr) { + return parsed_service_config->parsed_lb_config(); + } + // Try the deprecated LB policy name from the service config. + // If not, try the setting from channel args. + absl::optional policy_name; + if (!parsed_service_config->parsed_deprecated_lb_policy().empty()) { + policy_name = parsed_service_config->parsed_deprecated_lb_policy(); + } else { + policy_name = resolver_result.args.GetString(GRPC_ARG_LB_POLICY_NAME); + bool requires_config = false; + if (policy_name.has_value() && + (!CoreConfiguration::Get() + .lb_policy_registry() + .LoadBalancingPolicyExists(*policy_name, &requires_config) || + requires_config)) { + if (requires_config) { + gpr_log(GPR_ERROR, + "LB policy: %s passed through channel_args must not " + "require a config. Using pick_first instead.", + std::string(*policy_name).c_str()); + } else { + gpr_log(GPR_ERROR, + "LB policy: %s passed through channel_args does not exist. " + "Using pick_first instead.", + std::string(*policy_name).c_str()); + } + policy_name = "pick_first"; + } + } + // Use pick_first if nothing was specified and we didn't select grpclb + // above. + if (!policy_name.has_value()) policy_name = "pick_first"; + // Now that we have the policy name, construct an empty config for it. + Json config_json = Json::FromArray({Json::FromObject({ + {std::string(*policy_name), Json::FromObject({})}, + })}); + auto lb_policy_config = + CoreConfiguration::Get().lb_policy_registry().ParseLoadBalancingConfig( + config_json); + // The policy name came from one of three places: + // - The deprecated loadBalancingPolicy field in the service config, + // in which case the code in ClientChannelServiceConfigParser + // already verified that the policy does not require a config. + // - One of the hard-coded values here, all of which are known to not + // require a config. + // - A channel arg, in which case we check that the specified policy exists + // and accepts an empty config. If not, we revert to using pick_first + // lb_policy + CHECK_OK(lb_policy_config); + return std::move(*lb_policy_config); +} + +} // namespace + +void ClientChannel::OnResolverResultChangedLocked(Resolver::Result result) { + // Handle race conditions. + if (resolver_ == nullptr) return; + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: got resolver result", this); + } + // Grab resolver result health callback. + auto resolver_callback = std::move(result.result_health_callback); + absl::Status resolver_result_status; + // We only want to trace the address resolution in the follow cases: + // (a) Address resolution resulted in service config change. + // (b) Address resolution that causes number of backends to go from + // zero to non-zero. + // (c) Address resolution that causes number of backends to go from + // non-zero to zero. + // (d) Address resolution that causes a new LB policy to be created. + // + // We track a list of strings to eventually be concatenated and traced. + std::vector trace_strings; + const bool resolution_contains_addresses = + result.addresses.ok() && !result.addresses->empty(); + if (!resolution_contains_addresses && + previous_resolution_contained_addresses_) { + trace_strings.push_back("Address list became empty"); + } else if (resolution_contains_addresses && + !previous_resolution_contained_addresses_) { + trace_strings.push_back("Address list became non-empty"); + } + previous_resolution_contained_addresses_ = resolution_contains_addresses; + std::string service_config_error_string_storage; + if (!result.service_config.ok()) { + service_config_error_string_storage = + result.service_config.status().ToString(); + trace_strings.push_back(service_config_error_string_storage.c_str()); + } + // Choose the service config. + RefCountedPtr service_config; + RefCountedPtr config_selector; + if (!result.service_config.ok()) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: resolver returned service config error: %s", + this, result.service_config.status().ToString().c_str()); + } + // If the service config was invalid, then fallback to the + // previously returned service config, if any. + if (saved_service_config_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: resolver returned invalid service config; " + "continuing to use previous service config", + this); + } + service_config = saved_service_config_; + config_selector = saved_config_selector_; + } else { + // We received a service config error and we don't have a + // previous service config to fall back to. Put the channel into + // TRANSIENT_FAILURE. + OnResolverErrorLocked(result.service_config.status()); + trace_strings.push_back("no valid service config"); + resolver_result_status = + absl::UnavailableError("no valid service config"); + } + } else if (*result.service_config == nullptr) { + // Resolver did not return any service config. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, + "client_channel=%p: resolver returned no service config; " + "using default service config for channel", + this); + } + service_config = default_service_config_; + } else { + // Use ServiceConfig and ConfigSelector returned by resolver. + service_config = std::move(*result.service_config); + config_selector = result.args.GetObjectRef(); + } + // Note: The only case in which service_config is null here is if the + // resolver returned a service config error and we don't have a previous + // service config to fall back to. + if (service_config != nullptr) { + // Extract global config for client channel. + const internal::ClientChannelGlobalParsedConfig* parsed_service_config = + static_cast( + service_config->GetGlobalParsedConfig( + service_config_parser_index_)); + // Choose LB policy config. + RefCountedPtr lb_policy_config = + ChooseLbPolicy(result, parsed_service_config); + // Check if the ServiceConfig has changed. + const bool service_config_changed = + saved_service_config_ == nullptr || + service_config->json_string() != saved_service_config_->json_string(); + // Check if the ConfigSelector has changed. + const bool config_selector_changed = !ConfigSelector::Equals( + saved_config_selector_.get(), config_selector.get()); + // If either has changed, apply the global parameters now. + if (service_config_changed || config_selector_changed) { + // Update service config in control plane. + UpdateServiceConfigInControlPlaneLocked( + std::move(service_config), std::move(config_selector), + std::string(lb_policy_config->name())); + // TODO(ncteisen): might be worth somehow including a snippet of the + // config in the trace, at the risk of bloating the trace logs. + trace_strings.push_back("Service config changed"); + } else if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: service config not changed", this); + } + // Create or update LB policy, as needed. + resolver_result_status = CreateOrUpdateLbPolicyLocked( + std::move(lb_policy_config), + parsed_service_config->health_check_service_name(), std::move(result)); + // Start using new service config for calls. + // This needs to happen after the LB policy has been updated, since + // the ConfigSelector may need the LB policy to know about new + // destinations before it can send RPCs to those destinations. + if (service_config_changed || config_selector_changed) { + UpdateServiceConfigInDataPlaneLocked(); + } + } + // Invoke resolver callback if needed. + if (resolver_callback != nullptr) { + resolver_callback(std::move(resolver_result_status)); + } + // Add channel trace event. + if (!trace_strings.empty()) { + std::string message = + absl::StrCat("Resolution event: ", absl::StrJoin(trace_strings, ", ")); + if (channelz_node_ != nullptr) { + channelz_node_->AddTraceEvent(channelz::ChannelTrace::Severity::Info, + grpc_slice_from_cpp_string(message)); + } + } +} + +void ClientChannel::OnResolverErrorLocked(absl::Status status) { + if (resolver_ == nullptr) return; + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: resolver transient failure: %s", this, + status.ToString().c_str()); + } + // If we already have an LB policy from a previous resolution + // result, then we continue to let it set the connectivity state. + // Otherwise, we go into TRANSIENT_FAILURE. + if (lb_policy_ == nullptr) { + // Update connectivity state. + UpdateStateLocked(GRPC_CHANNEL_TRANSIENT_FAILURE, status, + "resolver failure"); + // Send updated resolver result. + resolver_data_for_calls_.Set( + MaybeRewriteIllegalStatusCode(status, "resolver")); + } +} + +absl::Status ClientChannel::CreateOrUpdateLbPolicyLocked( + RefCountedPtr lb_policy_config, + const absl::optional& health_check_service_name, + Resolver::Result result) { + // Construct update. + LoadBalancingPolicy::UpdateArgs update_args; + if (!result.addresses.ok()) { + update_args.addresses = result.addresses.status(); + } else { + update_args.addresses = std::make_shared( + std::move(*result.addresses)); + } + update_args.config = std::move(lb_policy_config); + update_args.resolution_note = std::move(result.resolution_note); + // Remove the config selector from channel args so that we're not holding + // unnecessary refs that cause it to be destroyed somewhere other than in the + // WorkSerializer. + update_args.args = result.args.Remove(GRPC_ARG_CONFIG_SELECTOR); + // Add health check service name to channel args. + if (health_check_service_name.has_value()) { + update_args.args = update_args.args.Set(GRPC_ARG_HEALTH_CHECK_SERVICE_NAME, + *health_check_service_name); + } + // Create policy if needed. + if (lb_policy_ == nullptr) { + lb_policy_ = CreateLbPolicyLocked(update_args.args); + } + // Update the policy. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: Updating child policy %p", this, + lb_policy_.get()); + } + return lb_policy_->UpdateLocked(std::move(update_args)); +} + +// Creates a new LB policy. +OrphanablePtr ClientChannel::CreateLbPolicyLocked( + const ChannelArgs& args) { + // The LB policy will start in state CONNECTING but will not + // necessarily send us an update synchronously, so set state to + // CONNECTING (in case the resolver had previously failed and put the + // channel into TRANSIENT_FAILURE) and make sure we have a queueing picker. + UpdateStateAndPickerLocked( + GRPC_CHANNEL_CONNECTING, absl::Status(), "started resolving", + MakeRefCounted(nullptr)); + // Now create the LB policy. + LoadBalancingPolicy::Args lb_policy_args; + lb_policy_args.work_serializer = work_serializer_; + lb_policy_args.channel_control_helper = + std::make_unique( + RefAsSubclass()); + lb_policy_args.args = args; + OrphanablePtr lb_policy = + MakeOrphanable(std::move(lb_policy_args), + &grpc_client_channel_trace); + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: created new LB policy %p", this, + lb_policy.get()); + } + return lb_policy; +} + +void ClientChannel::UpdateServiceConfigInControlPlaneLocked( + RefCountedPtr service_config, + RefCountedPtr config_selector, std::string lb_policy_name) { + std::string service_config_json(service_config->json_string()); + // Update service config. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: using service config: \"%s\"", this, + service_config_json.c_str()); + } + saved_service_config_ = std::move(service_config); + // Update config selector. + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: using ConfigSelector %p", this, + config_selector.get()); + } + saved_config_selector_ = std::move(config_selector); + // Update the data used by GetChannelInfo(). + { + MutexLock lock(&info_mu_); + info_lb_policy_name_ = std::move(lb_policy_name); + info_service_config_json_ = std::move(service_config_json); + } +} + +void ClientChannel::UpdateServiceConfigInDataPlaneLocked() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: switching to ConfigSelector %p", this, + saved_config_selector_.get()); + } + // Use default config selector if resolver didn't supply one. + RefCountedPtr config_selector = saved_config_selector_; + if (config_selector == nullptr) { + config_selector = + MakeRefCounted(saved_service_config_); + } + // Construct filter stack. + InterceptionChainBuilder builder(channel_args_.SetObject(this)); + if (idle_timeout_ != Duration::Zero()) { + builder.AddOnServerTrailingMetadata([this](ServerMetadata&) { + if (idle_state_.DecreaseCallCount()) StartIdleTimer(); + }); + } + CoreConfiguration::Get().channel_init().AddToInterceptionChainBuilder( + GRPC_CLIENT_CHANNEL, builder); + // TODO(roth): add filters returned by config selector + // Create call destination. + const bool enable_retries = + !channel_args_.WantMinimalStack() && + channel_args_.GetBool(GRPC_ARG_ENABLE_RETRIES).value_or(true); + if (enable_retries) { + Crash("call v3 stack does not yet support retries"); + } + auto top_of_stack_call_destination = builder.Build(call_destination_); + // Send result to data plane. + if (!top_of_stack_call_destination.ok()) { + resolver_data_for_calls_.Set(MaybeRewriteIllegalStatusCode( + top_of_stack_call_destination.status(), "channel construction")); + } else { + resolver_data_for_calls_.Set(ResolverDataForCalls{ + std::move(config_selector), std::move(*top_of_stack_call_destination)}); + } +} + +void ClientChannel::UpdateStateLocked(grpc_connectivity_state state, + const absl::Status& status, + const char* reason) { + if (state != GRPC_CHANNEL_SHUTDOWN && + state_tracker_.state() == GRPC_CHANNEL_SHUTDOWN) { + Crash("Illegal transition SHUTDOWN -> anything"); + } + state_tracker_.SetState(state, status, reason); + if (channelz_node_ != nullptr) { + channelz_node_->SetConnectivityState(state); + channelz_node_->AddTraceEvent( + channelz::ChannelTrace::Severity::Info, + grpc_slice_from_static_string( + channelz::ChannelNode::GetChannelConnectivityStateChangeString( + state))); + } +} + +void ClientChannel::UpdateStateAndPickerLocked( + grpc_connectivity_state state, const absl::Status& status, + const char* reason, + RefCountedPtr picker) { + UpdateStateLocked(state, status, reason); + picker_.Set(std::move(picker)); +} + +void ClientChannel::StartIdleTimer() { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: idle timer started", this); + } + auto self = RefAsSubclass(); + auto promise = Loop([self]() { + return TrySeq(Sleep(Timestamp::Now() + self->idle_timeout_), + [self]() -> Poll> { + if (self->idle_state_.CheckTimer()) { + return Continue{}; + } else { + return absl::OkStatus(); + } + }); + }); + idle_activity_.Set(MakeActivity( + std::move(promise), ExecCtxWakeupScheduler{}, + [self = std::move(self)](absl::Status status) mutable { + if (status.ok()) { + self->work_serializer_->Run( + [self]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*self->work_serializer_) { + self->DestroyResolverAndLbPolicyLocked(); + self->UpdateStateAndPickerLocked( + GRPC_CHANNEL_IDLE, absl::OkStatus(), + "channel entering IDLE", nullptr); + // TODO(roth): In case there's a race condition, we + // might need to check for any calls that are queued + // waiting for a resolver result or an LB pick. + }, + DEBUG_LOCATION); + } + }, + GetContext())); +} + +absl::Status ClientChannel::ApplyServiceConfigToCall( + ConfigSelector& config_selector, + ClientMetadata& client_initial_metadata) const { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) { + gpr_log(GPR_INFO, "client_channel=%p: %sapplying service config to call", + this, GetContext()->DebugTag().c_str()); + } + // Create a ClientChannelServiceConfigCallData for the call. This stores + // a ref to the ServiceConfig and caches the right set of parsed configs + // to use for the call. The ClientChannelServiceConfigCallData will store + // itself in the call context, so that it can be accessed by filters + // below us in the stack, and it will be cleaned up when the call ends. + auto* service_config_call_data = + GetContext()->New( + GetContext(), GetContext()); + // Use the ConfigSelector to determine the config for the call. + absl::Status call_config_status = config_selector.GetCallConfig( + {&client_initial_metadata, GetContext(), + service_config_call_data}); + if (!call_config_status.ok()) { + return MaybeRewriteIllegalStatusCode(call_config_status, "ConfigSelector"); + } + // Apply our own method params to the call. + auto* method_params = static_cast( + service_config_call_data->GetMethodParsedConfig( + service_config_parser_index_)); + if (method_params != nullptr) { + // If the service config specifies a deadline, update the call's + // deadline timer. + if (method_params->timeout() != Duration::Zero()) { + Call* call = GetContext(); + const Timestamp per_method_deadline = + Timestamp::FromCycleCounterRoundUp(call->start_time()) + + method_params->timeout(); + call->UpdateDeadline(per_method_deadline); + } + // If the service config set wait_for_ready and the application + // did not explicitly set it, use the value from the service config. + auto* wait_for_ready = + client_initial_metadata.GetOrCreatePointer(WaitForReady()); + if (method_params->wait_for_ready().has_value() && + !wait_for_ready->explicitly_set) { + wait_for_ready->value = method_params->wait_for_ready().value(); + } + } + return absl::OkStatus(); +} + +} // namespace grpc_core diff --git a/src/core/client_channel/client_channel.h b/src/core/client_channel/client_channel.h new file mode 100644 index 00000000000..77d26f34e95 --- /dev/null +++ b/src/core/client_channel/client_channel.h @@ -0,0 +1,245 @@ +// +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_H +#define GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_H + +#include + +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" + +#include "src/core/client_channel/client_channel_factory.h" +#include "src/core/client_channel/config_selector.h" +#include "src/core/client_channel/subchannel.h" +#include "src/core/ext/filters/channel_idle/idle_filter_state.h" +#include "src/core/lib/gprpp/single_set_ptr.h" +#include "src/core/lib/promise/observable.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/transport/metadata.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/resolver/resolver.h" +#include "src/core/service_config/service_config.h" + +namespace grpc_core { + +class ClientChannel : public Channel { + public: + using PickerObservable = + Observable>; + + class CallDestinationFactory { + public: + struct RawPointerChannelArgTag {}; + + static absl::string_view ChannelArgName() { + return "grpc.internal.client_channel_call_destination"; + } + + virtual RefCountedPtr CreateCallDestination( + PickerObservable) = 0; + + protected: + ~CallDestinationFactory() = default; + }; + + static absl::StatusOr> Create( + std::string target, ChannelArgs channel_args); + + // Do not instantiate directly -- use Create() instead. + ClientChannel(std::string target_uri, ChannelArgs args, + std::string uri_to_resolve, + RefCountedPtr default_service_config, + ClientChannelFactory* client_channel_factory, + CallDestinationFactory* call_destination_factory); + + ~ClientChannel() override; + + void Orphan() override; + + grpc_call* CreateCall(grpc_call* parent_call, uint32_t propagation_mask, + grpc_completion_queue* cq, + grpc_pollset_set* /*pollset_set_alternative*/, + Slice path, absl::optional authority, + Timestamp deadline, bool registered_method) override; + + CallInitiator CreateCall(ClientMetadataHandle client_initial_metadata); + + grpc_event_engine::experimental::EventEngine* event_engine() const override { + return event_engine_.get(); + } + + // TODO(ctiller): lame channels + bool IsLame() const override { return false; } + + bool SupportsConnectivityWatcher() const override { return true; } + + // Returns the current connectivity state. If try_to_connect is true, + // triggers a connection attempt if not already connected. + grpc_connectivity_state CheckConnectivityState(bool try_to_connect) override; + + void WatchConnectivityState(grpc_connectivity_state last_observed_state, + Timestamp deadline, grpc_completion_queue* cq, + void* tag) override; + + // Starts and stops a connectivity watch. The watcher will be initially + // notified as soon as the state changes from initial_state and then on + // every subsequent state change until either the watch is stopped or + // it is notified that the state has changed to SHUTDOWN. + // + // This is intended to be used when starting watches from code inside of + // C-core (e.g., for a nested control plane channel for things like xds). + void AddConnectivityWatcher( + grpc_connectivity_state initial_state, + OrphanablePtr watcher) override; + void RemoveConnectivityWatcher( + AsyncConnectivityStateWatcherInterface* watcher) override; + + void GetInfo(const grpc_channel_info* channel_info) override; + + void ResetConnectionBackoff() override; + + void Ping(grpc_completion_queue* cq, void* tag) override; + + // Flag that this object gets stored in channel args as a raw pointer. + struct RawPointerChannelArgTag {}; + static absl::string_view ChannelArgName() { + return "grpc.internal.client_channel"; + } + + private: + class ClientChannelControlHelper; + class ResolverResultHandler; + class SubchannelWrapper; + + void CreateResolverLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + void DestroyResolverAndLbPolicyLocked() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void TryToConnectLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void OnResolverResultChangedLocked(Resolver::Result result) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + void OnResolverErrorLocked(absl::Status status) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + absl::Status CreateOrUpdateLbPolicyLocked( + RefCountedPtr lb_policy_config, + const absl::optional& health_check_service_name, + Resolver::Result result) ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + OrphanablePtr CreateLbPolicyLocked( + const ChannelArgs& args) ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void UpdateServiceConfigInControlPlaneLocked( + RefCountedPtr service_config, + RefCountedPtr config_selector, std::string lb_policy_name) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void UpdateServiceConfigInDataPlaneLocked() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void UpdateStateLocked(grpc_connectivity_state state, + const absl::Status& status, const char* reason) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void UpdateStateAndPickerLocked( + grpc_connectivity_state state, const absl::Status& status, + const char* reason, + RefCountedPtr picker) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(*work_serializer_); + + void StartIdleTimer(); + + // Applies service config settings from config_selector to the call. + // May modify call context and client_initial_metadata. + absl::Status ApplyServiceConfigToCall( + ConfigSelector& config_selector, + ClientMetadata& client_initial_metadata) const; + + const ChannelArgs channel_args_; + const std::shared_ptr + event_engine_; + const std::string uri_to_resolve_; + const size_t service_config_parser_index_; + const RefCountedPtr default_service_config_; + ClientChannelFactory* const client_channel_factory_; + const std::string default_authority_; + channelz::ChannelNode* const channelz_node_; + // TODO(ctiller): unify with Channel + const RefCountedPtr call_arena_allocator_; + GlobalStatsPluginRegistry::StatsPluginGroup stats_plugin_group_; + + // + // Idleness state. + // + const Duration idle_timeout_; + IdleFilterState idle_state_{false}; + SingleSetPtr idle_activity_; + + // + // Fields related to name resolution. + // + struct ResolverDataForCalls { + RefCountedPtr config_selector; + RefCountedPtr call_destination; + }; + Observable> resolver_data_for_calls_; + + // + // Fields related to LB picks. + // + PickerObservable picker_; + const RefCountedPtr call_destination_; + + // + // Fields used in the control plane. Guarded by work_serializer. + // + std::shared_ptr work_serializer_; + ConnectivityStateTracker state_tracker_ ABSL_GUARDED_BY(*work_serializer_); + OrphanablePtr resolver_ ABSL_GUARDED_BY(*work_serializer_); + bool previous_resolution_contained_addresses_ + ABSL_GUARDED_BY(*work_serializer_) = false; + RefCountedPtr saved_service_config_ + ABSL_GUARDED_BY(*work_serializer_); + RefCountedPtr saved_config_selector_ + ABSL_GUARDED_BY(*work_serializer_); + OrphanablePtr lb_policy_ + ABSL_GUARDED_BY(*work_serializer_); + RefCountedPtr subchannel_pool_ + ABSL_GUARDED_BY(*work_serializer_); + // The number of SubchannelWrapper instances referencing a given Subchannel. + std::map subchannel_refcount_map_ + ABSL_GUARDED_BY(*work_serializer_); + // The set of SubchannelWrappers that currently exist. + // No need to hold a ref, since the set is updated in the control-plane + // work_serializer when the SubchannelWrappers are created and destroyed. + absl::flat_hash_set subchannel_wrappers_ + ABSL_GUARDED_BY(*work_serializer_); + int keepalive_time_ ABSL_GUARDED_BY(*work_serializer_) = -1; + absl::Status disconnect_error_ ABSL_GUARDED_BY(*work_serializer_); + + // + // Fields accessed via GetChannelInfo(). + // + Mutex info_mu_; + std::string info_lb_policy_name_ ABSL_GUARDED_BY(info_mu_); + std::string info_service_config_json_ ABSL_GUARDED_BY(info_mu_); +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_H diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc index 3cb76ff8409..f0c58c1580f 100644 --- a/src/core/client_channel/client_channel_filter.cc +++ b/src/core/client_channel/client_channel_filter.cc @@ -1109,7 +1109,7 @@ class ClientChannelFilter::ClientChannelControlHelper final const ChannelArgs& args) override ABSL_EXCLUSIVE_LOCKS_REQUIRED(*chand_->work_serializer_) { if (chand_->resolver_ == nullptr) return nullptr; // Shutting down. - ChannelArgs subchannel_args = ClientChannelFilter::MakeSubchannelArgs( + ChannelArgs subchannel_args = Subchannel::MakeSubchannelArgs( args, per_address_args, chand_->subchannel_pool_, chand_->default_authority_); // Create subchannel. @@ -1359,31 +1359,6 @@ ClientChannelFilter::CreateLoadBalancedCallPromise( return call_ptr->MakeCallPromise(std::move(call_args), std::move(lb_call)); } -ChannelArgs ClientChannelFilter::MakeSubchannelArgs( - const ChannelArgs& channel_args, const ChannelArgs& address_args, - const RefCountedPtr& subchannel_pool, - const std::string& channel_default_authority) { - // Note that we start with the channel-level args and then apply the - // per-address args, so that if a value is present in both, the one - // in the channel-level args is used. This is particularly important - // for the GRPC_ARG_DEFAULT_AUTHORITY arg, which we want to allow - // resolvers to set on a per-address basis only if the application - // did not explicitly set it at the channel level. - return channel_args.UnionWith(address_args) - .SetObject(subchannel_pool) - // If we haven't already set the default authority arg (i.e., it - // was not explicitly set by the application nor overridden by - // the resolver), add it from the channel's default. - .SetIfUnset(GRPC_ARG_DEFAULT_AUTHORITY, channel_default_authority) - // Remove channel args that should not affect subchannel - // uniqueness. - .Remove(GRPC_ARG_HEALTH_CHECK_SERVICE_NAME) - .Remove(GRPC_ARG_INHIBIT_HEALTH_CHECKING) - .Remove(GRPC_ARG_CHANNELZ_CHANNEL_NODE) - // Remove all keys with the no-subchannel prefix. - .RemoveAllKeysWithPrefix(GRPC_ARG_NO_SUBCHANNEL_PREFIX); -} - void ClientChannelFilter::ReprocessQueuedResolverCalls() { for (CallData* calld : resolver_queued_calls_) { calld->RemoveCallFromResolverQueuedCallsLocked(); diff --git a/src/core/client_channel/client_channel_filter.h b/src/core/client_channel/client_channel_filter.h index 5bbafc68d68..9233c846c6f 100644 --- a/src/core/client_channel/client_channel_filter.h +++ b/src/core/client_channel/client_channel_filter.h @@ -86,9 +86,6 @@ // Channel arg key for server URI string. #define GRPC_ARG_SERVER_URI "grpc.server_uri" -// Channel arg containing a pointer to the ClientChannelFilter object. -#define GRPC_ARG_CLIENT_CHANNEL "grpc.internal.client_channel_filter" - // Max number of batches that can be pending on a call at any given // time. This includes one batch for each of the following ops: // recv_initial_metadata @@ -112,7 +109,9 @@ class ClientChannelFilter final { // Flag that this object gets stored in channel args as a raw pointer. struct RawPointerChannelArgTag {}; - static absl::string_view ChannelArgName() { return GRPC_ARG_CLIENT_CHANNEL; } + static absl::string_view ChannelArgName() { + return "grpc.internal.client_channel_filter"; + } static ArenaPromise MakeCallPromise( grpc_channel_element* elem, CallArgs call_args, @@ -166,12 +165,6 @@ class ClientChannelFilter final { CallArgs call_args, absl::AnyInvocable on_commit, bool is_transparent_retry); - // Exposed for testing only. - static ChannelArgs MakeSubchannelArgs( - const ChannelArgs& channel_args, const ChannelArgs& address_args, - const RefCountedPtr& subchannel_pool, - const std::string& channel_default_authority); - private: class CallData; class FilterBasedCallData; diff --git a/src/core/client_channel/client_channel_internal.h b/src/core/client_channel/client_channel_internal.h index a2c759ec7d6..b4d204834ab 100644 --- a/src/core/client_channel/client_channel_internal.h +++ b/src/core/client_channel/client_channel_internal.h @@ -29,6 +29,7 @@ #include "src/core/lib/channel/context.h" #include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/transport/call_destination.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/telemetry/call_tracer.h" @@ -75,6 +76,13 @@ class ClientChannelServiceConfigCallData final : public ServiceConfigCallData { absl::AnyInvocable on_commit_; }; +class SubchannelInterfaceWithCallDestination : public SubchannelInterface { + public: + using SubchannelInterface::SubchannelInterface; + // Obtain the call destination for this subchannel. + virtual RefCountedPtr call_destination() = 0; +}; + } // namespace grpc_core #endif // GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_INTERNAL_H diff --git a/src/core/client_channel/load_balanced_call_destination.cc b/src/core/client_channel/load_balanced_call_destination.cc new file mode 100644 index 00000000000..4d702a5858c --- /dev/null +++ b/src/core/client_channel/load_balanced_call_destination.cc @@ -0,0 +1,335 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "src/core/client_channel/load_balanced_call_destination.h" + +#include "src/core/client_channel/client_channel.h" +#include "src/core/client_channel/client_channel_internal.h" +#include "src/core/client_channel/subchannel.h" +#include "src/core/lib/channel/status_util.h" +#include "src/core/lib/promise/loop.h" +#include "src/core/telemetry/call_tracer.h" + +namespace grpc_core { + +// Defined in legacy client channel filter. +// TODO(roth): Move these here when we remove the legacy filter. +extern TraceFlag grpc_client_channel_trace; +extern TraceFlag grpc_client_channel_call_trace; +extern TraceFlag grpc_client_channel_lb_call_trace; + +namespace { + +class LbMetadata : public LoadBalancingPolicy::MetadataInterface { + public: + explicit LbMetadata(grpc_metadata_batch* batch) : batch_(batch) {} + + void Add(absl::string_view key, absl::string_view value) override { + if (batch_ == nullptr) return; + // Gross, egregious hack to support legacy grpclb behavior. + // TODO(ctiller): Use a promise context for this once that plumbing is done. + if (key == GrpcLbClientStatsMetadata::key()) { + batch_->Set( + GrpcLbClientStatsMetadata(), + const_cast( + reinterpret_cast(value.data()))); + return; + } + batch_->Append(key, Slice::FromStaticString(value), + [key](absl::string_view error, const Slice& value) { + gpr_log(GPR_ERROR, "%s", + absl::StrCat(error, " key:", key, + " value:", value.as_string_view()) + .c_str()); + }); + } + + std::vector> TestOnlyCopyToVector() + override { + if (batch_ == nullptr) return {}; + Encoder encoder; + batch_->Encode(&encoder); + return encoder.Take(); + } + + absl::optional Lookup(absl::string_view key, + std::string* buffer) const override { + if (batch_ == nullptr) return absl::nullopt; + return batch_->GetStringValue(key, buffer); + } + + private: + class Encoder { + public: + void Encode(const Slice& key, const Slice& value) { + out_.emplace_back(std::string(key.as_string_view()), + std::string(value.as_string_view())); + } + + template + void Encode(Which, const typename Which::ValueType& value) { + auto value_slice = Which::Encode(value); + out_.emplace_back(std::string(Which::key()), + std::string(value_slice.as_string_view())); + } + + void Encode(GrpcTimeoutMetadata, + const typename GrpcTimeoutMetadata::ValueType&) {} + void Encode(HttpPathMetadata, const Slice&) {} + void Encode(HttpMethodMetadata, + const typename HttpMethodMetadata::ValueType&) {} + + std::vector> Take() { + return std::move(out_); + } + + private: + std::vector> out_; + }; + + grpc_metadata_batch* batch_; +}; + +void MaybeCreateCallAttemptTracer(bool is_transparent_retry) { + auto* call_tracer = MaybeGetContext(); + if (call_tracer == nullptr) return; + auto* tracer = call_tracer->StartNewAttempt(is_transparent_retry); + SetContext(tracer); +} + +class LbCallState : public ClientChannelLbCallState { + public: + void* Alloc(size_t size) override { return GetContext()->Alloc(size); } + + // Internal API to allow first-party LB policies to access per-call + // attributes set by the ConfigSelector. + ServiceConfigCallData::CallAttributeInterface* GetCallAttribute( + UniqueTypeName type) const override { + auto* service_config_call_data = GetContext(); + return service_config_call_data->GetCallAttribute(type); + } + + ClientCallTracer::CallAttemptTracer* GetCallAttemptTracer() const override { + auto* legacy_context = GetContext(); + return static_cast( + legacy_context[GRPC_CONTEXT_CALL_TRACER].value); + } +}; + +// TODO(roth): Remove this in favor of the gprpp Match() function once +// we can do that without breaking lock annotations. +template +T HandlePickResult( + LoadBalancingPolicy::PickResult* result, + std::function complete_func, + std::function queue_func, + std::function fail_func, + std::function drop_func) { + auto* complete_pick = + absl::get_if(&result->result); + if (complete_pick != nullptr) { + return complete_func(complete_pick); + } + auto* queue_pick = + absl::get_if(&result->result); + if (queue_pick != nullptr) { + return queue_func(queue_pick); + } + auto* fail_pick = + absl::get_if(&result->result); + if (fail_pick != nullptr) { + return fail_func(fail_pick); + } + auto* drop_pick = + absl::get_if(&result->result); + CHECK(drop_pick != nullptr); + return drop_func(drop_pick); +} + +// Does an LB pick for a call. Returns one of the following things: +// - Continue{}, meaning to queue the pick +// - a non-OK status, meaning to fail the call +// - a call destination, meaning that the pick is complete +// When the pick is complete, pushes client_initial_metadata onto +// call_initiator. Also adds the subchannel call tracker (if any) to +// context. +LoopCtl>> PickSubchannel( + LoadBalancingPolicy::SubchannelPicker& picker, + UnstartedCallHandler& unstarted_handler) { + // Perform LB pick. + auto& client_initial_metadata = + unstarted_handler.UnprocessedClientInitialMetadata(); + LoadBalancingPolicy::PickArgs pick_args; + Slice* path = client_initial_metadata.get_pointer(HttpPathMetadata()); + CHECK(path != nullptr); + pick_args.path = path->as_string_view(); + LbCallState lb_call_state; + pick_args.call_state = &lb_call_state; + LbMetadata initial_metadata(&client_initial_metadata); + pick_args.initial_metadata = &initial_metadata; + auto result = picker.Pick(pick_args); + // Handle result. + return HandlePickResult< + LoopCtl>>>( + &result, + // CompletePick + [&](LoadBalancingPolicy::PickResult::Complete* complete_pick) + -> LoopCtl>> { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_INFO, + "client_channel: %sLB pick succeeded: subchannel=%p", + GetContext()->DebugTag().c_str(), + complete_pick->subchannel.get()); + } + CHECK(complete_pick->subchannel != nullptr); + // Grab a ref to the call destination while we're still + // holding the data plane mutex. + auto call_destination = + DownCast( + complete_pick->subchannel.get()) + ->call_destination(); + // If the subchannel has no call destination (e.g., if the + // subchannel has moved out of state READY but the LB policy hasn't + // yet seen that change and given us a new picker), then just + // queue the pick. We'll try again as soon as we get a new picker. + if (call_destination == nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_INFO, + "client_channel: %ssubchannel returned by LB picker " + "has no connected subchannel; queueing pick", + GetContext()->DebugTag().c_str()); + } + return Continue{}; + } + // If the LB policy returned a call tracker, inform it that the + // call is starting and add it to context, so that we can notify + // it when the call finishes. + if (complete_pick->subchannel_call_tracker != nullptr) { + complete_pick->subchannel_call_tracker->Start(); + SetContext(complete_pick->subchannel_call_tracker.release()); + } + // Return the connected subchannel. + return call_destination; + }, + // QueuePick + [&](LoadBalancingPolicy::PickResult::Queue* /*queue_pick*/) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_INFO, "client_channel: %sLB pick queued", + GetContext()->DebugTag().c_str()); + } + return Continue{}; + }, + // FailPick + [&](LoadBalancingPolicy::PickResult::Fail* fail_pick) + -> LoopCtl>> { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_INFO, "client_channel: %sLB pick failed: %s", + GetContext()->DebugTag().c_str(), + fail_pick->status.ToString().c_str()); + } + // If wait_for_ready is false, then the error indicates the RPC + // attempt's final status. + if (!unstarted_handler.UnprocessedClientInitialMetadata() + .GetOrCreatePointer(WaitForReady()) + ->value) { + return MaybeRewriteIllegalStatusCode(std::move(fail_pick->status), + "LB pick"); + } + // If wait_for_ready is true, then queue to retry when we get a new + // picker. + return Continue{}; + }, + // DropPick + [&](LoadBalancingPolicy::PickResult::Drop* drop_pick) + -> LoopCtl>> { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_lb_call_trace)) { + gpr_log(GPR_INFO, "client_channel: %sLB pick dropped: %s", + GetContext()->DebugTag().c_str(), + drop_pick->status.ToString().c_str()); + } + return grpc_error_set_int(MaybeRewriteIllegalStatusCode( + std::move(drop_pick->status), "LB drop"), + StatusIntProperty::kLbPolicyDrop, 1); + }); +} + +} // namespace + +void LoadBalancedCallDestination::StartCall( + UnstartedCallHandler unstarted_handler) { + // If there is a call tracer, create a call attempt tracer. + bool* is_transparent_retry_metadata = + unstarted_handler.UnprocessedClientInitialMetadata().get_pointer( + IsTransparentRetry()); + bool is_transparent_retry = is_transparent_retry_metadata != nullptr + ? *is_transparent_retry_metadata + : false; + MaybeCreateCallAttemptTracer(is_transparent_retry); + // Spawn a promise to do the LB pick. + // This will eventually start the call. + unstarted_handler.SpawnGuardedUntilCallCompletes( + "lb_pick", [unstarted_handler, picker = picker_]() mutable { + return Map( + // Wait for the LB picker. + CheckDelayed(Loop( + [last_picker = + RefCountedPtr(), + unstarted_handler, picker]() mutable { + return Map( + picker.Next(last_picker), + [unstarted_handler, &last_picker]( + RefCountedPtr + picker) mutable { + last_picker = std::move(picker); + // Returns 3 possible things: + // - Continue to queue the pick + // - non-OK status to fail the pick + // - a connected subchannel to complete the pick + return PickSubchannel(*last_picker, unstarted_handler); + }); + })), + // Create call stack on the connected subchannel. + [unstarted_handler]( + std::tuple< + absl::StatusOr>, + bool> + pick_result) { + auto& call_destination = std::get<0>(pick_result); + const bool was_queued = std::get<1>(pick_result); + if (!call_destination.ok()) { + return call_destination.status(); + } + // LB pick is done, so indicate that we've committed. + auto* on_commit = MaybeGetContext(); + if (on_commit != nullptr && *on_commit != nullptr) { + (*on_commit)(); + } + // If it was queued, add a trace annotation. + if (was_queued) { + auto* tracer = + MaybeGetContext(); + if (tracer != nullptr) { + tracer->RecordAnnotation("Delayed LB pick complete."); + } + } + // Delegate to connected subchannel. + // TODO(ctiller): need to insert LbCallTracingFilter at the top of + // the stack + (*call_destination)->StartCall(unstarted_handler); + return absl::OkStatus(); + }); + }); +} + +} // namespace grpc_core \ No newline at end of file diff --git a/src/core/client_channel/load_balanced_call_destination.h b/src/core/client_channel/load_balanced_call_destination.h new file mode 100644 index 00000000000..2adbdbe3dc3 --- /dev/null +++ b/src/core/client_channel/load_balanced_call_destination.h @@ -0,0 +1,49 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_LOAD_BALANCED_CALL_DESTINATION_H +#define GRPC_SRC_CORE_CLIENT_CHANNEL_LOAD_BALANCED_CALL_DESTINATION_H + +#include "absl/functional/any_invocable.h" + +#include "src/core/client_channel/client_channel.h" +#include "src/core/lib/promise/context.h" +#include "src/core/lib/transport/call_destination.h" +#include "src/core/load_balancing/lb_policy.h" + +namespace grpc_core { + +// Context type for LB on_commit callback. +// TODO(ctiller): make this a struct, so we don't accidentally alias context +// types +using LbOnCommit = absl::AnyInvocable; +template <> +struct ContextType {}; + +class LoadBalancedCallDestination final : public UnstartedCallDestination { + public: + explicit LoadBalancedCallDestination(ClientChannel::PickerObservable picker) + : picker_(std::move(picker)) {} + + void Orphaned() override {} + + void StartCall(UnstartedCallHandler unstarted_handler) override; + + private: + ClientChannel::PickerObservable picker_; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_CLIENT_CHANNEL_LOAD_BALANCED_CALL_DESTINATION_H diff --git a/src/core/client_channel/subchannel.cc b/src/core/client_channel/subchannel.cc index 9ebb91b276e..d12f24b592a 100644 --- a/src/core/client_channel/subchannel.cc +++ b/src/core/client_channel/subchannel.cc @@ -41,6 +41,7 @@ #include "src/core/channelz/channel_trace.h" #include "src/core/channelz/channelz.h" +#include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/subchannel_pool_interface.h" #include "src/core/handshaker/proxy_mapper_registry.h" #include "src/core/lib/address_utils/sockaddr_utils.h" @@ -50,7 +51,10 @@ #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" +#include "src/core/lib/experiments/experiments.h" #include "src/core/lib/gprpp/debug_location.h" +#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" @@ -64,6 +68,7 @@ #include "src/core/lib/surface/init_internally.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/lib/transport/interception_chain.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" @@ -97,75 +102,168 @@ DebugOnlyTraceFlag grpc_trace_subchannel_refcount(false, "subchannel_refcount"); // ConnectedSubchannel::ConnectedSubchannel( - grpc_channel_stack* channel_stack, const ChannelArgs& args, + const ChannelArgs& args, RefCountedPtr channelz_subchannel) : RefCounted( GRPC_TRACE_FLAG_ENABLED(grpc_trace_subchannel_refcount) ? "ConnectedSubchannel" : nullptr), - channel_stack_(channel_stack), args_(args), channelz_subchannel_(std::move(channelz_subchannel)) {} -ConnectedSubchannel::~ConnectedSubchannel() { - GRPC_CHANNEL_STACK_UNREF(channel_stack_, "connected_subchannel_dtor"); -} - -void ConnectedSubchannel::StartWatch( - grpc_pollset_set* interested_parties, - OrphanablePtr watcher) { - grpc_transport_op* op = grpc_make_transport_op(nullptr); - op->start_connectivity_watch = std::move(watcher); - op->start_connectivity_watch_state = GRPC_CHANNEL_READY; - op->bind_pollset_set = interested_parties; - grpc_channel_element* elem = grpc_channel_stack_element(channel_stack_, 0); - elem->filter->start_transport_op(elem, op); -} - -void ConnectedSubchannel::Ping(grpc_closure* on_initiate, - grpc_closure* on_ack) { - grpc_transport_op* op = grpc_make_transport_op(nullptr); - grpc_channel_element* elem; - op->send_ping.on_initiate = on_initiate; - op->send_ping.on_ack = on_ack; - elem = grpc_channel_stack_element(channel_stack_, 0); - elem->filter->start_transport_op(elem, op); -} - -size_t ConnectedSubchannel::GetInitialCallSizeEstimate() const { - return GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(SubchannelCall)) + - channel_stack_->call_stack_size; -} - -ArenaPromise ConnectedSubchannel::MakeCallPromise( - CallArgs call_args) { - // If not using channelz, we just need to call the channel stack. - if (channelz_subchannel() == nullptr) { - return channel_stack_->MakeClientCallPromise(std::move(call_args)); - } - // Otherwise, we need to wrap the channel stack promise with code that - // handles the channelz updates. - return OnCancel( - Seq(channel_stack_->MakeClientCallPromise(std::move(call_args)), - [self = Ref()](ServerMetadataHandle metadata) { - channelz::SubchannelNode* channelz_subchannel = - self->channelz_subchannel(); - CHECK_NE(channelz_subchannel, nullptr); - if (metadata->get(GrpcStatusMetadata()) - .value_or(GRPC_STATUS_UNKNOWN) != GRPC_STATUS_OK) { - channelz_subchannel->RecordCallFailed(); - } else { - channelz_subchannel->RecordCallSucceeded(); - } - return metadata; - }), - [self = Ref()]() { - channelz::SubchannelNode* channelz_subchannel = - self->channelz_subchannel(); - CHECK_NE(channelz_subchannel, nullptr); - channelz_subchannel->RecordCallFailed(); - }); -} +// +// LegacyConnectedSubchannel +// + +class LegacyConnectedSubchannel : public ConnectedSubchannel { + public: + LegacyConnectedSubchannel( + RefCountedPtr channel_stack, const ChannelArgs& args, + RefCountedPtr channelz_subchannel) + : ConnectedSubchannel(args, std::move(channelz_subchannel)), + channel_stack_(std::move(channel_stack)) {} + + ~LegacyConnectedSubchannel() override { + channel_stack_.reset(DEBUG_LOCATION, "ConnectedSubchannel"); + } + + void StartWatch( + grpc_pollset_set* interested_parties, + OrphanablePtr watcher) override { + grpc_transport_op* op = grpc_make_transport_op(nullptr); + op->start_connectivity_watch = std::move(watcher); + op->start_connectivity_watch_state = GRPC_CHANNEL_READY; + op->bind_pollset_set = interested_parties; + grpc_channel_element* elem = + grpc_channel_stack_element(channel_stack_.get(), 0); + elem->filter->start_transport_op(elem, op); + } + + void Ping(absl::AnyInvocable) override { + Crash("call v3 ping method called in legacy impl"); + } + + RefCountedPtr unstarted_call_destination() + const override { + Crash("call v3 unstarted_call_destination method called in legacy impl"); + } + + grpc_channel_stack* channel_stack() const override { + return channel_stack_.get(); + } + + size_t GetInitialCallSizeEstimate() const override { + return GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(SubchannelCall)) + + channel_stack_->call_stack_size; + } + + ArenaPromise MakeCallPromise( + CallArgs call_args) override { + // If not using channelz, we just need to call the channel stack. + if (channelz_subchannel() == nullptr) { + return channel_stack_->MakeClientCallPromise(std::move(call_args)); + } + // Otherwise, we need to wrap the channel stack promise with code that + // handles the channelz updates. + return OnCancel( + Seq(channel_stack_->MakeClientCallPromise(std::move(call_args)), + [self = Ref()](ServerMetadataHandle metadata) { + channelz::SubchannelNode* channelz_subchannel = + self->channelz_subchannel(); + CHECK(channelz_subchannel != nullptr); + if (metadata->get(GrpcStatusMetadata()) + .value_or(GRPC_STATUS_UNKNOWN) != GRPC_STATUS_OK) { + channelz_subchannel->RecordCallFailed(); + } else { + channelz_subchannel->RecordCallSucceeded(); + } + return metadata; + }), + [self = Ref()]() { + channelz::SubchannelNode* channelz_subchannel = + self->channelz_subchannel(); + CHECK(channelz_subchannel != nullptr); + channelz_subchannel->RecordCallFailed(); + }); + } + + void Ping(grpc_closure* on_initiate, grpc_closure* on_ack) override { + grpc_transport_op* op = grpc_make_transport_op(nullptr); + op->send_ping.on_initiate = on_initiate; + op->send_ping.on_ack = on_ack; + grpc_channel_element* elem = + grpc_channel_stack_element(channel_stack_.get(), 0); + elem->filter->start_transport_op(elem, op); + } + + private: + RefCountedPtr channel_stack_; +}; + +// +// NewConnectedSubchannel +// + +class NewConnectedSubchannel : public ConnectedSubchannel { + public: + class TransportCallDestination final : public CallDestination { + public: + explicit TransportCallDestination(OrphanablePtr transport) + : transport_(std::move(transport)) {} + + ClientTransport* transport() { return transport_.get(); } + + void HandleCall(CallHandler handler) override { + transport_->StartCall(std::move(handler)); + } + + void Orphaned() override { transport_.reset(); } + + private: + OrphanablePtr transport_; + }; + + NewConnectedSubchannel( + RefCountedPtr call_destination, + RefCountedPtr transport, + const ChannelArgs& args, + RefCountedPtr channelz_subchannel) + : ConnectedSubchannel(args, std::move(channelz_subchannel)), + call_destination_(std::move(call_destination)), + transport_(std::move(transport)) {} + + void StartWatch( + grpc_pollset_set*, + OrphanablePtr watcher) override { + transport_->transport()->StartConnectivityWatch(std::move(watcher)); + } + + void Ping(absl::AnyInvocable) override { + // TODO(ctiller): add new transport API for this in v3 stack + Crash("not implemented"); + } + + RefCountedPtr unstarted_call_destination() + const override { + return call_destination_; + } + + grpc_channel_stack* channel_stack() const override { return nullptr; } + + size_t GetInitialCallSizeEstimate() const override { return 0; } + + ArenaPromise MakeCallPromise(CallArgs) override { + Crash("legacy MakeCallPromise() method called in call v3 impl"); + } + + void Ping(grpc_closure*, grpc_closure*) override { + Crash("legacy ping method called in call v3 impl"); + } + + private: + RefCountedPtr call_destination_; + RefCountedPtr transport_; +}; // // SubchannelCall @@ -255,8 +353,8 @@ void SubchannelCall::Destroy(void* arg, grpc_error_handle /*error*/) { // Destroy the subchannel call. self->~SubchannelCall(); // Destroy the call stack. This should be after destroying the subchannel - // call, because call->after_call_stack_destroy(), if not null, will free the - // call arena. + // call, because call->after_call_stack_destroy(), if not null, will free + // the call arena. grpc_call_stack_destroy(SUBCHANNEL_CALL_TO_CALL_STACK(self), nullptr, after_call_stack_destroy); // Automatically reset connected_subchannel. This should be after destroying @@ -474,8 +572,8 @@ Subchannel::Subchannel(SubchannelKey key, // result the subchannel destruction happens asynchronously to channel // destruction. If the last channel destruction triggers a grpc_shutdown // before the last subchannel destruction, then there maybe race conditions - // triggering segmentation faults. To prevent this issue, we call a grpc_init - // here and a grpc_shutdown in the subchannel destructor. + // triggering segmentation faults. To prevent this issue, we call a + // grpc_init here and a grpc_shutdown in the subchannel destructor. InitInternally(); global_stats().IncrementClientSubchannelsCreated(); GRPC_CLOSURE_INIT(&on_connecting_finished_, OnConnectingFinished, this, @@ -587,7 +685,8 @@ void Subchannel::CancelConnectivityStateWatch( watcher_list_.RemoveWatcherLocked(watcher); } // Drain any connectivity state notifications after releasing the mutex. - // (Shouldn't actually be necessary in this case, but better safe than sorry.) + // (Shouldn't actually be necessary in this case, but better safe than + // sorry.) work_serializer_.DrainQueue(); } @@ -758,11 +857,11 @@ void Subchannel::OnConnectingFinishedLocked(grpc_error_handle error) { ExecCtx exec_ctx; self->OnRetryTimer(); // Subchannel deletion might require an active ExecCtx. So if - // self.reset() is not called here, the WeakRefCountedPtr destructor - // may run after the ExecCtx declared in the callback is destroyed. - // Since subchannel may get destroyed when the WeakRefCountedPtr - // destructor runs, it may not have an active ExecCtx - thus leading - // to crashes. + // self.reset() is not called here, the WeakRefCountedPtr + // destructor may run after the ExecCtx declared in the callback + // is destroyed. Since subchannel may get destroyed when the + // WeakRefCountedPtr destructor runs, it may not have an active + // ExecCtx - thus leading to crashes. self.reset(); } }); @@ -770,37 +869,60 @@ void Subchannel::OnConnectingFinishedLocked(grpc_error_handle error) { } bool Subchannel::PublishTransportLocked() { - // Construct channel stack. - // Builder takes ownership of transport. - ChannelStackBuilderImpl builder( - "subchannel", GRPC_CLIENT_SUBCHANNEL, - connecting_result_.channel_args.SetObject( - std::exchange(connecting_result_.transport, nullptr))); - if (!CoreConfiguration::Get().channel_init().CreateStack(&builder)) { - return false; - } - absl::StatusOr> stk = builder.Build(); - if (!stk.ok()) { - auto error = absl_status_to_grpc_error(stk.status()); - connecting_result_.Reset(); - gpr_log(GPR_ERROR, - "subchannel %p %s: error initializing subchannel stack: %s", this, - key_.ToString().c_str(), StatusToString(error).c_str()); - return false; + auto socket_node = std::move(connecting_result_.socket_node); + if (connecting_result_.transport->filter_stack_transport() != nullptr || + IsChaoticGoodEnabled()) { + // Construct channel stack. + // Builder takes ownership of transport. + ChannelStackBuilderImpl builder( + "subchannel", GRPC_CLIENT_SUBCHANNEL, + connecting_result_.channel_args.SetObject( + std::exchange(connecting_result_.transport, nullptr))); + if (!CoreConfiguration::Get().channel_init().CreateStack(&builder)) { + return false; + } + absl::StatusOr> stack = builder.Build(); + if (!stack.ok()) { + connecting_result_.Reset(); + gpr_log(GPR_ERROR, + "subchannel %p %s: error initializing subchannel stack: %s", this, + key_.ToString().c_str(), stack.status().ToString().c_str()); + return false; + } + connected_subchannel_ = MakeRefCounted( + std::move(*stack), args_, channelz_node_); + } else { + OrphanablePtr transport( + std::exchange(connecting_result_.transport, nullptr) + ->client_transport()); + InterceptionChainBuilder builder( + connecting_result_.channel_args.SetObject(transport.get())); + CoreConfiguration::Get().channel_init().AddToInterceptionChainBuilder( + GRPC_CLIENT_SUBCHANNEL, builder); + auto transport_destination = + MakeRefCounted( + std::move(transport)); + auto call_destination = builder.Build(transport_destination); + if (!call_destination.ok()) { + connecting_result_.Reset(); + gpr_log(GPR_ERROR, + "subchannel %p %s: error initializing subchannel stack: %s", this, + key_.ToString().c_str(), + call_destination.status().ToString().c_str()); + return false; + } + connected_subchannel_ = MakeRefCounted( + std::move(*call_destination), std::move(transport_destination), args_, + channelz_node_); } - RefCountedPtr socket = - std::move(connecting_result_.socket_node); connecting_result_.Reset(); - if (shutdown_) return false; // Publish. - connected_subchannel_.reset( - new ConnectedSubchannel(stk->release(), args_, channelz_node_)); if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_subchannel)) { gpr_log(GPR_INFO, "subchannel %p %s: new connected subchannel at %p", this, key_.ToString().c_str(), connected_subchannel_.get()); } if (channelz_node_ != nullptr) { - channelz_node_->SetChildSocket(std::move(socket)); + channelz_node_->SetChildSocket(std::move(socket_node)); } // Start watching connected subchannel. connected_subchannel_->StartWatch( @@ -811,4 +933,29 @@ bool Subchannel::PublishTransportLocked() { return true; } +ChannelArgs Subchannel::MakeSubchannelArgs( + const ChannelArgs& channel_args, const ChannelArgs& address_args, + const RefCountedPtr& subchannel_pool, + const std::string& channel_default_authority) { + // Note that we start with the channel-level args and then apply the + // per-address args, so that if a value is present in both, the one + // in the channel-level args is used. This is particularly important + // for the GRPC_ARG_DEFAULT_AUTHORITY arg, which we want to allow + // resolvers to set on a per-address basis only if the application + // did not explicitly set it at the channel level. + return channel_args.UnionWith(address_args) + .SetObject(subchannel_pool) + // If we haven't already set the default authority arg (i.e., it + // was not explicitly set by the application nor overridden by + // the resolver), add it from the channel's default. + .SetIfUnset(GRPC_ARG_DEFAULT_AUTHORITY, channel_default_authority) + // Remove channel args that should not affect subchannel + // uniqueness. + .Remove(GRPC_ARG_HEALTH_CHECK_SERVICE_NAME) + .Remove(GRPC_ARG_INHIBIT_HEALTH_CHECKING) + .Remove(GRPC_ARG_CHANNELZ_CHANNEL_NODE) + // Remove all keys with the no-subchannel prefix. + .RemoveAllKeysWithPrefix(GRPC_ARG_NO_SUBCHANNEL_PREFIX); +} + } // namespace grpc_core diff --git a/src/core/client_channel/subchannel.h b/src/core/client_channel/subchannel.h index f59a3810208..fc2c05ed873 100644 --- a/src/core/client_channel/subchannel.h +++ b/src/core/client_channel/subchannel.h @@ -64,30 +64,35 @@ namespace grpc_core { class SubchannelCall; -class ConnectedSubchannel final : public RefCounted { +class ConnectedSubchannel : public RefCounted { public: - ConnectedSubchannel( - grpc_channel_stack* channel_stack, const ChannelArgs& args, - RefCountedPtr channelz_subchannel); - ~ConnectedSubchannel() override; - - void StartWatch(grpc_pollset_set* interested_parties, - OrphanablePtr watcher); - - void Ping(grpc_closure* on_initiate, grpc_closure* on_ack); - - grpc_channel_stack* channel_stack() const { return channel_stack_; } const ChannelArgs& args() const { return args_; } channelz::SubchannelNode* channelz_subchannel() const { return channelz_subchannel_.get(); } - size_t GetInitialCallSizeEstimate() const; + virtual void StartWatch( + grpc_pollset_set* interested_parties, + OrphanablePtr watcher) = 0; + + // Methods for v3 stack. + virtual void Ping(absl::AnyInvocable on_ack) = 0; + virtual RefCountedPtr unstarted_call_destination() + const = 0; - ArenaPromise MakeCallPromise(CallArgs call_args); + // Methods for legacy stack. + virtual grpc_channel_stack* channel_stack() const = 0; + virtual size_t GetInitialCallSizeEstimate() const = 0; + virtual ArenaPromise MakeCallPromise( + CallArgs call_args) = 0; + virtual void Ping(grpc_closure* on_initiate, grpc_closure* on_ack) = 0; + + protected: + ConnectedSubchannel( + const ChannelArgs& args, + RefCountedPtr channelz_subchannel); private: - grpc_channel_stack* channel_stack_; ChannelArgs args_; // ref counted pointer to the channelz node in this connected subchannel's // owning subchannel. @@ -243,6 +248,12 @@ class Subchannel final : public DualRefCounted { return connected_subchannel_; } + RefCountedPtr call_destination() { + MutexLock lock(&mu_); + if (connected_subchannel_ == nullptr) return nullptr; + return connected_subchannel_->unstarted_call_destination(); + } + // Attempt to connect to the backend. Has no effect if already connected. void RequestConnection() ABSL_LOCKS_EXCLUDED(mu_); @@ -272,6 +283,12 @@ class Subchannel final : public DualRefCounted { return event_engine_; } + // Exposed for testing purposes only. + static ChannelArgs MakeSubchannelArgs( + const ChannelArgs& channel_args, const ChannelArgs& address_args, + const RefCountedPtr& subchannel_pool, + const std::string& channel_default_authority); + private: // Tears down any existing connection, and arranges for destruction void Orphaned() override ABSL_LOCKS_EXCLUDED(mu_); diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc index fd48d034d38..63a886bc991 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc @@ -78,15 +78,11 @@ TraceFlag grpc_trace_client_idle_filter(false, "client_idle_filter"); } \ } while (0) -namespace { - Duration GetClientIdleTimeout(const ChannelArgs& args) { return args.GetDurationFromIntMillis(GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS) .value_or(kDefaultIdleTimeout); } -} // namespace - struct LegacyMaxAgeFilter::Config { Duration max_connection_age; Duration max_connection_idle; diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h index 8e6215cebba..001282276f1 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h @@ -40,6 +40,8 @@ namespace grpc_core { +Duration GetClientIdleTimeout(const ChannelArgs& args); + class LegacyChannelIdleFilter : public ChannelFilter { public: LegacyChannelIdleFilter(grpc_channel_stack* channel_stack, diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 31e0430a7c6..55cb2785abc 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -83,6 +83,16 @@ inline int PointerCompare(void* a_ptr, const grpc_arg_pointer_vtable* a_vtable, // before the crt refcount base class. template using RefType = absl::remove_cvref_t().Ref())>; + +template +struct IsRawPointerTagged { + static constexpr bool kValue = false; +}; +template +struct IsRawPointerTagged> { + static constexpr bool kValue = true; +}; } // namespace channel_args_detail // Specialization for ref-counted pointers. @@ -91,13 +101,14 @@ using RefType = absl::remove_cvref_t().Ref())>; template struct ChannelArgTypeTraits< T, absl::enable_if_t< - std::is_base_of>, - channel_args_detail::RefType>::value || - std::is_base_of, - NonPolymorphicRefCount>, - channel_args_detail::RefType>::value || - std::is_base_of>, - channel_args_detail::RefType>::value, + !channel_args_detail::IsRawPointerTagged::kValue && + (std::is_base_of>, + channel_args_detail::RefType>::value || + std::is_base_of, + NonPolymorphicRefCount>, + channel_args_detail::RefType>::value || + std::is_base_of>, + channel_args_detail::RefType>::value), void>> { static const grpc_arg_pointer_vtable* VTable() { static const grpc_arg_pointer_vtable tbl = { diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 9fc6564c8de..c414b33eb23 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -230,6 +230,7 @@ struct grpc_channel_stack { // full C++-ification for now. void IncrementRefCount(); void Unref(); + void Unref(const grpc_core::DebugLocation& location, const char* reason); grpc_core::RefCountedPtr Ref() { IncrementRefCount(); return grpc_core::RefCountedPtr(this); @@ -345,6 +346,11 @@ inline void grpc_channel_stack::Unref() { GRPC_CHANNEL_STACK_UNREF(this, "smart_pointer"); } +inline void grpc_channel_stack::Unref(const grpc_core::DebugLocation&, + const char* reason) { + GRPC_CHANNEL_STACK_UNREF(this, reason); +} + inline void grpc_call_stack::IncrementRefCount() { GRPC_CALL_STACK_REF(this, "smart_pointer"); } diff --git a/src/core/lib/channel/context.h b/src/core/lib/channel/context.h index 95ce62240bf..1a78e3536ed 100644 --- a/src/core/lib/channel/context.h +++ b/src/core/lib/channel/context.h @@ -59,6 +59,9 @@ typedef enum { /// the server. GRPC_CONTEXT_BACKEND_METRIC_PROVIDER, + /// A LoadBalancingPolicy::SubchannelCallTrackerInterface + GRPC_SUBCHANNEL_CALL_TRACKER_INTERFACE, + /// Special Google context GRPC_CONTEXT_GOOGLE, @@ -73,6 +76,8 @@ struct grpc_call_context_element { namespace grpc_core { class Call; class CallTracerAnnotationInterface; +class CallTracerInterface; +class ServiceConfigCallData; // Bind the legacy context array into the new style structure // TODO(ctiller): remove as we migrate these contexts to the new system. @@ -96,6 +101,17 @@ struct OldStyleContext { GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE; }; +template <> +struct OldStyleContext { + static constexpr grpc_context_index kIndex = GRPC_CONTEXT_CALL_TRACER; +}; + +template <> +struct OldStyleContext { + static constexpr grpc_context_index kIndex = + GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA; +}; + template class Context::kIndex)>> { public: @@ -104,6 +120,15 @@ class Context::kIndex)>> { GetContext()[OldStyleContext::kIndex] .value); } + static void set(T* value) { + auto& elem = + GetContext()[OldStyleContext::kIndex]; + if (elem.destroy != nullptr) { + elem.destroy(elem.value); + elem.destroy = nullptr; + } + elem.value = value; + } }; } // namespace promise_detail diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index b4ba5bdba89..8fc435e0f24 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -29,8 +29,6 @@ const char* const description_call_status_override_on_cancellation = "with cancellation."; const char* const additional_constraints_call_status_override_on_cancellation = "{}"; -const char* const description_call_v3 = "Promise-based call version 3."; -const char* const additional_constraints_call_v3 = "{}"; const char* const description_canary_client_privacy = "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; @@ -133,6 +131,12 @@ const char* const description_work_serializer_dispatch = const char* const additional_constraints_work_serializer_dispatch = "{}"; const uint8_t required_experiments_work_serializer_dispatch[] = { static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const char* const description_call_v3 = "Promise-based call version 3."; +const char* const additional_constraints_call_v3 = "{}"; +const uint8_t required_experiments_call_v3[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener), + static_cast(grpc_core::kExperimentIdWorkSerializerDispatch)}; } // namespace namespace grpc_core { @@ -142,8 +146,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, true, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, - false, true}, {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, {"client_privacy", description_client_privacy, @@ -208,6 +210,8 @@ const ExperimentMetadata g_experiment_metadata[] = { {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, false, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, + required_experiments_call_v3, 3, false, false}, }; } // namespace grpc_core @@ -219,8 +223,6 @@ const char* const description_call_status_override_on_cancellation = "with cancellation."; const char* const additional_constraints_call_status_override_on_cancellation = "{}"; -const char* const description_call_v3 = "Promise-based call version 3."; -const char* const additional_constraints_call_v3 = "{}"; const char* const description_canary_client_privacy = "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; @@ -323,6 +325,12 @@ const char* const description_work_serializer_dispatch = const char* const additional_constraints_work_serializer_dispatch = "{}"; const uint8_t required_experiments_work_serializer_dispatch[] = { static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const char* const description_call_v3 = "Promise-based call version 3."; +const char* const additional_constraints_call_v3 = "{}"; +const uint8_t required_experiments_call_v3[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener), + static_cast(grpc_core::kExperimentIdWorkSerializerDispatch)}; } // namespace namespace grpc_core { @@ -332,8 +340,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, true, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, - false, true}, {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, {"client_privacy", description_client_privacy, @@ -398,6 +404,8 @@ const ExperimentMetadata g_experiment_metadata[] = { {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, false, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, + required_experiments_call_v3, 3, false, false}, }; } // namespace grpc_core @@ -409,8 +417,6 @@ const char* const description_call_status_override_on_cancellation = "with cancellation."; const char* const additional_constraints_call_status_override_on_cancellation = "{}"; -const char* const description_call_v3 = "Promise-based call version 3."; -const char* const additional_constraints_call_v3 = "{}"; const char* const description_canary_client_privacy = "If set, canary client privacy"; const char* const additional_constraints_canary_client_privacy = "{}"; @@ -513,6 +519,12 @@ const char* const description_work_serializer_dispatch = const char* const additional_constraints_work_serializer_dispatch = "{}"; const uint8_t required_experiments_work_serializer_dispatch[] = { static_cast(grpc_core::kExperimentIdEventEngineClient)}; +const char* const description_call_v3 = "Promise-based call version 3."; +const char* const additional_constraints_call_v3 = "{}"; +const uint8_t required_experiments_call_v3[] = { + static_cast(grpc_core::kExperimentIdEventEngineClient), + static_cast(grpc_core::kExperimentIdEventEngineListener), + static_cast(grpc_core::kExperimentIdWorkSerializerDispatch)}; } // namespace namespace grpc_core { @@ -522,8 +534,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_call_status_override_on_cancellation, additional_constraints_call_status_override_on_cancellation, nullptr, 0, true, true}, - {"call_v3", description_call_v3, additional_constraints_call_v3, nullptr, 0, - false, true}, {"canary_client_privacy", description_canary_client_privacy, additional_constraints_canary_client_privacy, nullptr, 0, false, false}, {"client_privacy", description_client_privacy, @@ -588,6 +598,8 @@ const ExperimentMetadata g_experiment_metadata[] = { {"work_serializer_dispatch", description_work_serializer_dispatch, additional_constraints_work_serializer_dispatch, required_experiments_work_serializer_dispatch, 1, true, true}, + {"call_v3", description_call_v3, additional_constraints_call_v3, + required_experiments_call_v3, 3, false, false}, }; } // namespace grpc_core diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index 50dc88d8269..eebbfe2afde 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -59,7 +59,6 @@ namespace grpc_core { #if defined(GRPC_CFSTREAM) #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION inline bool IsCallStatusOverrideOnCancellationEnabled() { return true; } -inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } inline bool IsEventEngineClientEnabled() { return false; } @@ -91,11 +90,11 @@ inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } inline bool IsWorkSerializerDispatchEnabled() { return false; } +inline bool IsCallV3Enabled() { return false; } #elif defined(GPR_WINDOWS) #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION inline bool IsCallStatusOverrideOnCancellationEnabled() { return true; } -inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } inline bool IsEventEngineClientEnabled() { return false; } @@ -129,11 +128,11 @@ inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_CLEARS_TIME_CACHE inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } inline bool IsWorkSerializerDispatchEnabled() { return false; } +inline bool IsCallV3Enabled() { return false; } #else #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION inline bool IsCallStatusOverrideOnCancellationEnabled() { return true; } -inline bool IsCallV3Enabled() { return false; } inline bool IsCanaryClientPrivacyEnabled() { return false; } inline bool IsClientPrivacyEnabled() { return false; } inline bool IsEventEngineClientEnabled() { return false; } @@ -168,12 +167,12 @@ inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } inline bool IsWorkSerializerClearsTimeCacheEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_WORK_SERIALIZER_DISPATCH inline bool IsWorkSerializerDispatchEnabled() { return true; } +inline bool IsCallV3Enabled() { return false; } #endif #else enum ExperimentIds { kExperimentIdCallStatusOverrideOnCancellation, - kExperimentIdCallV3, kExperimentIdCanaryClientPrivacy, kExperimentIdClientPrivacy, kExperimentIdEventEngineClient, @@ -200,16 +199,13 @@ enum ExperimentIds { kExperimentIdUnconstrainedMaxQuotaBufferSize, kExperimentIdWorkSerializerClearsTimeCache, kExperimentIdWorkSerializerDispatch, + kExperimentIdCallV3, kNumExperiments }; #define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION inline bool IsCallStatusOverrideOnCancellationEnabled() { return IsExperimentEnabled(kExperimentIdCallStatusOverrideOnCancellation); } -#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_V3 -inline bool IsCallV3Enabled() { - return IsExperimentEnabled(kExperimentIdCallV3); -} #define GRPC_EXPERIMENT_IS_INCLUDED_CANARY_CLIENT_PRIVACY inline bool IsCanaryClientPrivacyEnabled() { return IsExperimentEnabled(kExperimentIdCanaryClientPrivacy); @@ -314,6 +310,10 @@ inline bool IsWorkSerializerClearsTimeCacheEnabled() { inline bool IsWorkSerializerDispatchEnabled() { return IsExperimentEnabled(kExperimentIdWorkSerializerDispatch); } +#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_V3 +inline bool IsCallV3Enabled() { + return IsExperimentEnabled(kExperimentIdCallV3); +} extern const ExperimentMetadata g_experiment_metadata[kNumExperiments]; diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index f26fc02f27e..5d2678f99d2 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -52,6 +52,8 @@ expiry: 2024/06/01 owner: ctiller@google.com test_tags: [] + requires: ["work_serializer_dispatch", "event_engine_listener", "event_engine_client"] + allow_in_fuzzing_config: false - name: canary_client_privacy description: If set, canary client privacy diff --git a/src/core/lib/promise/activity.h b/src/core/lib/promise/activity.h index daf3e76a6c2..1cbbc01e268 100644 --- a/src/core/lib/promise/activity.h +++ b/src/core/lib/promise/activity.h @@ -26,6 +26,7 @@ #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/status/status.h" +#include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include @@ -121,6 +122,11 @@ class Waker { return wakeable_and_arg_.ActivityDebugTag(); } + std::string DebugString() { + return absl::StrFormat("Waker{%p, %d}", wakeable_and_arg_.wakeable, + wakeable_and_arg_.wakeup_mask); + } + // This is for tests to assert that a waker is occupied or not. bool is_unwakeable() const { return wakeable_and_arg_.wakeable == promise_detail::unwakeable(); diff --git a/src/core/lib/promise/context.h b/src/core/lib/promise/context.h index 47b2bac39f2..e1f1f6511d9 100644 --- a/src/core/lib/promise/context.h +++ b/src/core/lib/promise/context.h @@ -125,6 +125,11 @@ T* MaybeGetContext() { return promise_detail::Context::get(); } +template +void SetContext(T* p) { + promise_detail::Context::set(p); +} + // Given a promise and a context, return a promise that has that context set. template promise_detail::WithContext WithContext(F f, T* context) { diff --git a/src/core/lib/promise/map.h b/src/core/lib/promise/map.h index 6ee27fef83d..b1772ad5b51 100644 --- a/src/core/lib/promise/map.h +++ b/src/core/lib/promise/map.h @@ -72,6 +72,23 @@ promise_detail::Map Map(Promise promise, Fn fn) { return promise_detail::Map(std::move(promise), std::move(fn)); } +// Maps a promise to a new promise that returns a tuple of the original result +// and a bool indicating whether there was ever a Pending{} value observed from +// polling. +template +auto CheckDelayed(Promise promise) { + using P = promise_detail::PromiseLike; + return [delayed = false, promise = P(std::move(promise))]() mutable + -> Poll> { + auto r = promise(); + if (r.pending()) { + delayed = true; + return Pending{}; + } + return std::make_tuple(r.value(), delayed); + }; +} + // Callable that takes a tuple and returns one element template struct JustElem { diff --git a/src/core/lib/promise/observable.h b/src/core/lib/promise/observable.h index edf7a37515a..9337feace3f 100644 --- a/src/core/lib/promise/observable.h +++ b/src/core/lib/promise/observable.h @@ -125,6 +125,7 @@ class Observable { Observer& operator=(const Observer&) = delete; Observer(Observer&& other) noexcept : state_(std::move(other.state_)) { CHECK(other.waker_.is_unwakeable()); + DCHECK(waker_.is_unwakeable()); CHECK(!other.saw_pending_); } Observer& operator=(Observer&& other) noexcept = delete; diff --git a/src/core/lib/promise/party.cc b/src/core/lib/promise/party.cc index c030f43c4e0..58931d978d4 100644 --- a/src/core/lib/promise/party.cc +++ b/src/core/lib/promise/party.cc @@ -308,8 +308,10 @@ void Party::AddParticipants(Participant** participants, size_t count) { for (size_t i = 0; i < count; i++) { if (grpc_trace_party_state.enabled()) { gpr_log(GPR_INFO, - "Party %p AddParticipant: %s @ %" PRIdPTR, - &sync_, std::string(participants[i]->name()).c_str(), slots[i]); + "Party %p AddParticipant: %s @ %" PRIdPTR + " [participant=%p]", + &sync_, std::string(participants[i]->name()).c_str(), slots[i], + participants[i]); } participants_[slots[i]].store(participants[i], std::memory_order_release); } diff --git a/src/core/lib/promise/party.h b/src/core/lib/promise/party.h index 214c36a588f..d2467168c26 100644 --- a/src/core/lib/promise/party.h +++ b/src/core/lib/promise/party.h @@ -379,6 +379,11 @@ class Party : public Activity, private Wakeable { // The on_complete callback will be called with the result of the promise if // it completes. // A maximum of sixteen promises can be spawned onto a party. + // promise_factory called to create the promise with the party lock taken; + // after the promise is created the factory is destroyed. + // This means that pointers or references to factory members will be + // invalidated after the promise is created - so the promise should not retain + // any of these. template void Spawn(absl::string_view name, Factory promise_factory, OnComplete on_complete); diff --git a/src/core/lib/promise/promise.h b/src/core/lib/promise/promise.h index bad6aad81d0..1595f2a8782 100644 --- a/src/core/lib/promise/promise.h +++ b/src/core/lib/promise/promise.h @@ -18,6 +18,7 @@ #include #include "absl/functional/any_invocable.h" +#include "absl/log/log.h" #include "absl/status/status.h" #include "absl/types/optional.h" diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index c0ccaf842cc..d464de2ec89 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -130,6 +130,8 @@ class Call : public CppImplOf, // Implementation of EventEngine::Closure, called when deadline expires void Run() final; + gpr_cycle_counter start_time() const { return start_time_; } + protected: // The maximum number of concurrent batches possible. // Based upon the maximum number of individually queueable ops in the batch @@ -209,8 +211,6 @@ class Call : public CppImplOf, void HandleCompressionAlgorithmNotAccepted( grpc_compression_algorithm compression_algorithm) GPR_ATTRIBUTE_NOINLINE; - gpr_cycle_counter start_time() const { return start_time_; } - virtual grpc_compression_options compression_options() = 0; private: diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index b8134974794..b7f91e6003c 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -65,7 +65,22 @@ Channel::RegisteredCall::~RegisteredCall() {} Channel::Channel(std::string target, const ChannelArgs& channel_args) : target_(std::move(target)), channelz_node_(channel_args.GetObjectRef()), - compression_options_(CompressionOptionsFromChannelArgs(channel_args)) {} + compression_options_(CompressionOptionsFromChannelArgs(channel_args)), + call_size_estimator_(1024), + allocator_(channel_args.GetObject() + ->memory_quota() + ->CreateMemoryOwner()) {} + +Arena* Channel::CreateArena() { + const size_t initial_size = call_size_estimator_.CallSizeEstimate(); + global_stats().IncrementCallInitialSize(initial_size); + return Arena::Create(initial_size, &allocator_); +} + +void Channel::DestroyArena(Arena* arena) { + call_size_estimator_.UpdateCallSizeEstimate(arena->TotalUsedBytes()); + arena->Destroy(); +} Channel::RegisteredCall* Channel::RegisterCall(const char* method, const char* host) { diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 533a944c18c..d0547c5bdf5 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -40,8 +40,10 @@ #include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/lib/transport/call_arena_allocator.h" #include "src/core/lib/transport/connectivity_state.h" // Forward declaration to avoid dependency loop. @@ -52,7 +54,7 @@ namespace grpc_core { // Forward declaration to avoid dependency loop. class Transport; -class Channel : public RefCounted, +class Channel : public InternallyRefCounted, public CppImplOf { public: struct RegisteredCall { @@ -66,10 +68,17 @@ class Channel : public RefCounted, ~RegisteredCall(); }; - virtual void Orphan() = 0; - - virtual Arena* CreateArena() = 0; - virtual void DestroyArena(Arena* arena) = 0; + // Though internally ref counted channels expose their "Ref" method to + // create a RefCountedPtr to themselves. The OrphanablePtr owner is the + // singleton decision maker on whether the channel should be destroyed or + // not. + // TODO(ctiller): in a future change (I have it written) these will be removed + // and substituted with DualRefCounted as a base. + RefCountedPtr Ref() { return InternallyRefCounted::Ref(); } + template + RefCountedPtr RefAsSubclass() { + return InternallyRefCounted::RefAsSubclass(); + } virtual bool IsLame() const = 0; @@ -125,6 +134,8 @@ class Channel : public RefCounted, virtual void Ping(grpc_completion_queue* cq, void* tag) = 0; // TODO(roth): Remove these methods when LegacyChannel goes away. + Arena* CreateArena(); + void DestroyArena(Arena* arena); virtual grpc_channel_stack* channel_stack() const { return nullptr; } virtual bool is_client() const { return true; } virtual bool is_promising() const { return true; } @@ -137,6 +148,10 @@ class Channel : public RefCounted, const RefCountedPtr channelz_node_; const grpc_compression_options compression_options_; + // TODO(ctiller): move to use CallArenaAllocator + CallSizeEstimator call_size_estimator_; + MemoryAllocator allocator_; + Mutex mu_; // The map key needs to be owned strings rather than unowned char*'s to // guarantee that it outlives calls on the core channel (which may outlast diff --git a/src/core/lib/surface/channel_create.cc b/src/core/lib/surface/channel_create.cc index 5ae280171e7..6a22eeec630 100644 --- a/src/core/lib/surface/channel_create.cc +++ b/src/core/lib/surface/channel_create.cc @@ -22,8 +22,10 @@ #include #include "src/core/channelz/channelz.h" +#include "src/core/client_channel/client_channel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/experiments/experiments.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/lame_client.h" #include "src/core/lib/surface/legacy_channel.h" @@ -77,9 +79,13 @@ absl::StatusOr> ChannelCreate( if (optional_transport != nullptr) { args = args.SetObject(optional_transport); } - // Delegate to legacy channel impl. - return LegacyChannel::Create(std::move(target), std::move(args), - channel_stack_type); + // Delegate to appropriate channel impl. + if (!IsCallV3Enabled()) { + return LegacyChannel::Create(std::move(target), std::move(args), + channel_stack_type); + } + CHECK_EQ(channel_stack_type, GRPC_CLIENT_CHANNEL); + return ClientChannel::Create(std::move(target), std::move(args)); } } // namespace grpc_core diff --git a/src/core/lib/surface/legacy_channel.cc b/src/core/lib/surface/legacy_channel.cc index 69a41cf503e..c35e0158c51 100644 --- a/src/core/lib/surface/legacy_channel.cc +++ b/src/core/lib/surface/legacy_channel.cc @@ -113,10 +113,7 @@ LegacyChannel::LegacyChannel(bool is_client, bool is_promising, : Channel(std::move(target), channel_args), is_client_(is_client), is_promising_(is_promising), - channel_stack_(std::move(channel_stack)), - allocator_(channel_args.GetObject() - ->memory_quota() - ->CreateMemoryOwner()) { + channel_stack_(std::move(channel_stack)) { // We need to make sure that grpc_shutdown() does not shut things down // until after the channel is destroyed. However, the channel may not // actually be destroyed by the time grpc_channel_destroy() returns, diff --git a/src/core/lib/surface/legacy_channel.h b/src/core/lib/surface/legacy_channel.h index 0ebf7b4aacb..b5199e80939 100644 --- a/src/core/lib/surface/legacy_channel.h +++ b/src/core/lib/surface/legacy_channel.h @@ -39,6 +39,7 @@ #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/call_arena_allocator.h" +#include "src/core/lib/transport/transport.h" #include "src/core/telemetry/stats.h" namespace grpc_core { @@ -56,16 +57,6 @@ class LegacyChannel final : public Channel { void Orphan() override; - Arena* CreateArena() override { - const size_t initial_size = call_size_estimator_.CallSizeEstimate(); - global_stats().IncrementCallInitialSize(initial_size); - return Arena::Create(initial_size, &allocator_); - } - void DestroyArena(Arena* arena) override { - call_size_estimator_.UpdateCallSizeEstimate(arena->TotalUsedBytes()); - arena->Destroy(); - } - bool IsLame() const override; grpc_call* CreateCall(grpc_call* parent_call, uint32_t propagation_mask, @@ -114,8 +105,6 @@ class LegacyChannel final : public Channel { const bool is_client_; const bool is_promising_; RefCountedPtr channel_stack_; - CallSizeEstimator call_size_estimator_{1024}; - grpc_event_engine::experimental::MemoryAllocator allocator_; }; } // namespace grpc_core diff --git a/src/core/lib/transport/call_destination.h b/src/core/lib/transport/call_destination.h index 938e0fd3725..04d402569c9 100644 --- a/src/core/lib/transport/call_destination.h +++ b/src/core/lib/transport/call_destination.h @@ -31,6 +31,8 @@ namespace grpc_core { class UnstartedCallDestination : public DualRefCounted { public: + using DualRefCounted::DualRefCounted; + ~UnstartedCallDestination() override = default; // Start a call. The UnstartedCallHandler will be consumed by the Destination // and started. diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index 2b89babdde4..c4b18721c86 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -170,8 +170,15 @@ Poll InfallibleOperationExecutor::ContinueStep(void* call_data) { template class OperationExecutor; template class OperationExecutor; template class InfallibleOperationExecutor; + } // namespace filters_detail +namespace { +// Call data for those calls that don't have any call data +// (we form pointers to this that aren't allowed to be nullptr) +char g_empty_call_data; +} // namespace + /////////////////////////////////////////////////////////////////////////////// // CallFilters @@ -181,7 +188,7 @@ CallFilters::CallFilters(ClientMetadataHandle client_initial_metadata) client_initial_metadata_(std::move(client_initial_metadata)) {} CallFilters::~CallFilters() { - if (call_data_ != nullptr) { + if (call_data_ != nullptr && call_data_ != &g_empty_call_data) { for (const auto& destructor : stack_->data_.filter_destructor) { destructor.call_destroy(Offset(call_data_, destructor.call_offset)); } @@ -192,8 +199,12 @@ CallFilters::~CallFilters() { void CallFilters::SetStack(RefCountedPtr stack) { CHECK_EQ(call_data_, nullptr); stack_ = std::move(stack); - call_data_ = gpr_malloc_aligned(stack_->data_.call_data_size, - stack_->data_.call_data_alignment); + if (stack_->data_.call_data_size != 0) { + call_data_ = gpr_malloc_aligned(stack_->data_.call_data_size, + stack_->data_.call_data_alignment); + } else { + call_data_ = &g_empty_call_data; + } for (const auto& constructor : stack_->data_.filter_constructor) { constructor.call_init(Offset(call_data_, constructor.call_offset), constructor.channel_data); @@ -232,7 +243,8 @@ void CallFilters::PushServerTrailingMetadata(ServerMetadataHandle md) { md->DebugString().c_str(), DebugString().c_str()); } CHECK(md != nullptr); - if (server_trailing_metadata_ != nullptr) return; + if (cancelled_.is_set()) return; + cancelled_.Set(md->get(GrpcCallWasCancelled()).value_or(false)); server_trailing_metadata_ = std::move(md); client_initial_metadata_state_.CloseWithError(); server_initial_metadata_state_.CloseSending(); diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index fd267fd1685..c69ef82c1dc 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -23,6 +23,7 @@ #include +#include "src/core/lib/gprpp/dump_args.h" #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/latch.h" @@ -1944,11 +1945,7 @@ inline auto CallFilters::PullServerToClientMessage() { } inline auto CallFilters::PullServerTrailingMetadata() { - return Map(PullServerTrailingMetadataPromise(this), - [this](ServerMetadataHandle h) { - cancelled_.Set(h->get(GrpcCallWasCancelled()).value_or(false)); - return h; - }); + return PullServerTrailingMetadataPromise(this); } inline auto CallFilters::WasCancelled() { return cancelled_.Wait(); } diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h index 59c1fc2da16..8a27c95f593 100644 --- a/src/core/lib/transport/call_spine.h +++ b/src/core/lib/transport/call_spine.h @@ -21,13 +21,16 @@ #include #include "src/core/lib/channel/context.h" +#include "src/core/lib/gprpp/dual_ref_counted.h" #include "src/core/lib/promise/detail/status.h" #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/latch.h" #include "src/core/lib/promise/party.h" #include "src/core/lib/promise/pipe.h" +#include "src/core/lib/promise/prioritized_race.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/promise/status_flag.h" +#include "src/core/lib/promise/try_seq.h" #include "src/core/lib/transport/call_arena_allocator.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/message.h" @@ -135,6 +138,23 @@ class CallSpineInterface { }); } + // Wrap a promise so that if the call completes that promise is cancelled. + template + auto UntilCallCompletes(Promise promise) { + using Result = PromiseResult; + return PrioritizedRace(std::move(promise), Map(WasCancelled(), [](bool) { + return FailureStatusCast(Failure{}); + })); + } + + template + void SpawnGuardedUntilCallCompletes(absl::string_view name, + PromiseFactory promise_factory) { + SpawnGuarded(name, [this, promise_factory]() mutable { + return UntilCallCompletes(promise_factory()); + }); + } + private: absl::AnyInvocable on_done_{nullptr}; }; @@ -272,7 +292,7 @@ class CallSpine final : public CallSpineInterface, public Party { if (legacy_context_is_owned_) { for (size_t i = 0; i < GRPC_CONTEXT_COUNT; i++) { grpc_call_context_element& elem = legacy_context_[i]; - if (elem.destroy != nullptr) elem.destroy(&elem); + if (elem.destroy != nullptr) elem.destroy(elem.value); } } } @@ -472,6 +492,12 @@ class CallInitiator { spine_->SpawnGuarded(name, std::move(promise_factory)); } + template + void SpawnGuardedUntilCallCompletes(absl::string_view name, + PromiseFactory promise_factory) { + spine_->SpawnGuardedUntilCallCompletes(name, std::move(promise_factory)); + } + template void SpawnInfallible(absl::string_view name, PromiseFactory promise_factory) { spine_->SpawnInfallible(name, std::move(promise_factory)); @@ -526,6 +552,12 @@ class CallHandler { spine_->SpawnGuarded(name, std::move(promise_factory), whence); } + template + void SpawnGuardedUntilCallCompletes(absl::string_view name, + PromiseFactory promise_factory) { + spine_->SpawnGuardedUntilCallCompletes(name, std::move(promise_factory)); + } + template void SpawnInfallible(absl::string_view name, PromiseFactory promise_factory) { spine_->SpawnInfallible(name, std::move(promise_factory)); @@ -577,6 +609,12 @@ class UnstartedCallHandler { spine_->SpawnGuarded(name, std::move(promise_factory), whence); } + template + void SpawnGuardedUntilCallCompletes(absl::string_view name, + PromiseFactory promise_factory) { + spine_->SpawnGuardedUntilCallCompletes(name, std::move(promise_factory)); + } + template void SpawnInfallible(absl::string_view name, PromiseFactory promise_factory) { spine_->SpawnInfallible(name, std::move(promise_factory)); diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index c8611a225fa..a5a934803ee 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -528,6 +528,14 @@ struct WaitForReady { static std::string DisplayValue(ValueType x); }; +// Annotation added by retry code to indicate a transparent retry. +struct IsTransparentRetry { + static absl::string_view DebugKey() { return "IsTransparentRetry"; } + static constexpr bool kRepeatable = false; + using ValueType = bool; + static std::string DisplayValue(ValueType x) { return x ? "true" : "false"; } +}; + // Annotation added by a transport to note that server trailing metadata // is a Trailers-Only response. struct GrpcTrailersOnly { @@ -1536,7 +1544,8 @@ using grpc_metadata_batch_base = grpc_core::MetadataMap< grpc_core::GrpcStreamNetworkState, grpc_core::PeerString, grpc_core::GrpcStatusContext, grpc_core::GrpcStatusFromWire, grpc_core::GrpcCallWasCancelled, grpc_core::WaitForReady, - grpc_core::GrpcTrailersOnly, grpc_core::GrpcTarPit, + grpc_core::IsTransparentRetry, grpc_core::GrpcTrailersOnly, + grpc_core::GrpcTarPit, grpc_core::GrpcRegisteredMethod GRPC_CUSTOM_CLIENT_METADATA GRPC_CUSTOM_SERVER_METADATA>; diff --git a/src/core/load_balancing/lb_policy.h b/src/core/load_balancing/lb_policy.h index 838d89ae2d5..91441547414 100644 --- a/src/core/load_balancing/lb_policy.h +++ b/src/core/load_balancing/lb_policy.h @@ -484,6 +484,16 @@ class LoadBalancingPolicy : public InternallyRefCounted { ChannelArgs channel_args_; }; +namespace promise_detail { + +template <> +struct OldStyleContext { + static constexpr grpc_context_index kIndex = + GRPC_SUBCHANNEL_CALL_TRACKER_INTERFACE; +}; + +} // namespace promise_detail + } // namespace grpc_core #endif // GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H diff --git a/src/core/telemetry/call_tracer.h b/src/core/telemetry/call_tracer.h index 3f98c7098e0..967658fa36b 100644 --- a/src/core/telemetry/call_tracer.h +++ b/src/core/telemetry/call_tracer.h @@ -33,6 +33,7 @@ #include "src/core/lib/channel/context.h" #include "src/core/lib/gprpp/ref_counted_string.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/call_final_info.h" @@ -221,6 +222,21 @@ void AddClientCallTracerToContext(grpc_call_context_element* call_context, void AddServerCallTracerToContext(grpc_call_context_element* call_context, ServerCallTracer* tracer); +template <> +struct ContextSubclass { + using Base = CallTracerInterface; +}; + +template <> +struct ContextSubclass { + using Base = CallTracerInterface; +}; + +template <> +struct ContextSubclass { + using Base = CallTracerAnnotationInterface; +}; + } // namespace grpc_core #endif // GRPC_SRC_CORE_TELEMETRY_CALL_TRACER_H diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 39fb7a6487f..3ed50fe703b 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -19,6 +19,7 @@ CORE_SOURCE_FILES = [ 'src/core/channelz/channelz.cc', 'src/core/channelz/channelz_registry.cc', 'src/core/client_channel/backup_poller.cc', + 'src/core/client_channel/client_channel.cc', 'src/core/client_channel/client_channel_factory.cc', 'src/core/client_channel/client_channel_filter.cc', 'src/core/client_channel/client_channel_plugin.cc', @@ -26,6 +27,7 @@ CORE_SOURCE_FILES = [ 'src/core/client_channel/config_selector.cc', 'src/core/client_channel/dynamic_filters.cc', 'src/core/client_channel/global_subchannel_pool.cc', + 'src/core/client_channel/load_balanced_call_destination.cc', 'src/core/client_channel/local_subchannel_pool.cc', 'src/core/client_channel/retry_filter.cc', 'src/core/client_channel/retry_filter_legacy_call_data.cc', @@ -486,6 +488,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/experiments/config.cc', 'src/core/lib/experiments/experiments.cc', 'src/core/lib/gprpp/crash.cc', + 'src/core/lib/gprpp/dump_args.cc', 'src/core/lib/gprpp/examine_stack.cc', 'src/core/lib/gprpp/fork.cc', 'src/core/lib/gprpp/host_port.cc', diff --git a/test/core/call/yodel/grpc_yodel_test.bzl b/test/core/call/yodel/grpc_yodel_test.bzl index ab43116e481..de21e4d20f6 100644 --- a/test/core/call/yodel/grpc_yodel_test.bzl +++ b/test/core/call/yodel/grpc_yodel_test.bzl @@ -16,7 +16,7 @@ Generate one transport test & associated fuzzer """ -load("//bazel:grpc_build_system.bzl", "grpc_cc_test") +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test") load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_proto_fuzzer") def grpc_yodel_test(name, deps): @@ -57,3 +57,12 @@ def grpc_yodel_test(name, deps): corpus = "corpus/%s" % name, proto = None, ) + +def grpc_yodel_simple_test(name, **kwargs): + grpc_cc_library( + name = "%s_test_lib" % name, + testonly = True, + alwayslink = 1, + **kwargs + ) + grpc_yodel_test(name, deps = ["%s_test_lib" % name]) diff --git a/test/core/call/yodel/yodel_test.cc b/test/core/call/yodel/yodel_test.cc index 88a3c4033ff..bf9d5da8e82 100644 --- a/test/core/call/yodel/yodel_test.cc +++ b/test/core/call/yodel/yodel_test.cc @@ -14,8 +14,12 @@ #include "test/core/call/yodel/yodel_test.h" +#include + #include "absl/random/random.h" +#include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/resource_quota/resource_quota.h" @@ -117,13 +121,13 @@ void SimpleTestRegistry::ContributeTests(std::vector& tests) { class YodelTest::WatchDog { public: explicit WatchDog(YodelTest* test) : test_(test) {} - ~WatchDog() { test_->event_engine_->Cancel(timer_); } + ~WatchDog() { test_->state_->event_engine->Cancel(timer_); } private: YodelTest* const test_; grpc_event_engine::experimental::EventEngine::TaskHandle const timer_{ - test_->event_engine_->RunAfter(Duration::Minutes(5), - [this]() { test_->Timeout(); })}; + test_->state_->event_engine->RunAfter(Duration::Minutes(5), + [this]() { test_->Timeout(); })}; }; /////////////////////////////////////////////////////////////////////////////// @@ -131,36 +135,46 @@ class YodelTest::WatchDog { YodelTest::YodelTest(const fuzzing_event_engine::Actions& actions, absl::BitGenRef rng) - : rng_(rng), - event_engine_{ - std::make_shared( - []() { - grpc_timer_manager_set_threading(false); - grpc_event_engine::experimental::FuzzingEventEngine::Options - options; - return options; - }(), - actions)}, - call_arena_allocator_{MakeRefCounted( - MakeResourceQuota("test-quota") - ->memory_quota() - ->CreateMemoryAllocator("test-allocator"), - 1024)} {} + : rng_(rng), actions_(actions) {} void YodelTest::RunTest() { - TestImpl(); + CoreConfiguration::Reset(); + InitCoreConfiguration(); + state_ = std::make_unique(); + state_->event_engine = + std::make_shared( + []() { + grpc_timer_manager_set_threading(false); + grpc_event_engine::experimental::FuzzingEventEngine::Options + options; + return options; + }(), + actions_); + state_->call_arena_allocator = MakeRefCounted( + ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( + "test-allocator"), + 1024); + { + ExecCtx exec_ctx; + InitTest(); + } + { + ExecCtx exec_ctx; + TestImpl(); + } EXPECT_EQ(pending_actions_.size(), 0) << "There are still pending actions: did you forget to call " "WaitForAllPendingWork()?"; Shutdown(); - event_engine_->TickUntilIdle(); - event_engine_->UnsetGlobalHooks(); + state_->event_engine->TickUntilIdle(); + state_->event_engine->UnsetGlobalHooks(); } void YodelTest::TickUntilTrue(absl::FunctionRef poll) { WatchDog watchdog(this); while (!poll()) { - event_engine_->Tick(); + ExecCtx exec_ctx; + state_->event_engine->Tick(); } } @@ -171,7 +185,7 @@ void YodelTest::WaitForAllPendingWork() { pending_actions_.pop(); continue; } - event_engine_->Tick(); + state_->event_engine->Tick(); } } diff --git a/test/core/call/yodel/yodel_test.h b/test/core/call/yodel/yodel_test.h index bca587eff41..d80675750d2 100644 --- a/test/core/call/yodel/yodel_test.h +++ b/test/core/call/yodel/yodel_test.h @@ -350,7 +350,7 @@ class YodelTest : public ::testing::Test { yodel_detail::SequenceSpawner( name_and_location, yodel_detail::SpawnerForContext(std::move(context), - event_engine_.get()), + state_->event_engine.get()), [this](yodel_detail::NameAndLocation name_and_location, int step) { auto action = std::make_shared( name_and_location, step); @@ -361,9 +361,10 @@ class YodelTest : public ::testing::Test { } auto MakeCall(ClientMetadataHandle client_initial_metadata) { - auto* arena = call_arena_allocator_->MakeArena(); - return MakeCallPair(std::move(client_initial_metadata), event_engine_.get(), - arena, call_arena_allocator_, nullptr); + auto* arena = state_->call_arena_allocator->MakeArena(); + return MakeCallPair(std::move(client_initial_metadata), + state_->event_engine.get(), arena, + state_->call_arena_allocator, nullptr); } void WaitForAllPendingWork(); @@ -384,25 +385,35 @@ class YodelTest : public ::testing::Test { const std::shared_ptr& event_engine() { - return event_engine_; + return state_->event_engine; } private: class WatchDog; + struct State { + grpc::testing::TestGrpcScope grpc_scope; + std::shared_ptr + event_engine; + RefCountedPtr call_arena_allocator; + }; virtual void TestImpl() = 0; void Timeout(); void TickUntilTrue(absl::FunctionRef poll); + // Called before the test runs, after core configuration has been reset + // and before the event engine is started. + // This is a good time to register any custom core configuration builders. + virtual void InitCoreConfiguration() {} + // Called after the event engine has been started, but before the test runs. + virtual void InitTest() {} // Called after the test has run, but before the event engine is shut down. virtual void Shutdown() {} - grpc::testing::TestGrpcScope grpc_scope_; absl::BitGenRef rng_; - const std::shared_ptr - event_engine_; - const RefCountedPtr call_arena_allocator_; + fuzzing_event_engine::Actions actions_; + std::unique_ptr state_; std::queue> pending_actions_; }; diff --git a/test/core/client_channel/BUILD b/test/core/client_channel/BUILD index 3e014705200..eaeccd3b414 100644 --- a/test/core/client_channel/BUILD +++ b/test/core/client_channel/BUILD @@ -13,14 +13,15 @@ # limitations under the License. load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") +load("//test/core/call/yodel:grpc_yodel_test.bzl", "grpc_yodel_simple_test") grpc_package(name = "test/core/client_channel") licenses(["notice"]) grpc_cc_test( - name = "client_channel_test", - srcs = ["client_channel_test.cc"], + name = "subchannel_args_test", + srcs = ["subchannel_args_test.cc"], external_deps = ["gtest"], language = "C++", uses_event_engine = False, @@ -33,6 +34,36 @@ grpc_cc_test( ], ) +grpc_yodel_simple_test( + name = "client_channel", + srcs = ["client_channel_test.cc"], + external_deps = ["gtest"], + deps = [ + "//:grpc_client_channel", + "//test/core/call/yodel:yodel_test", + ], +) + +grpc_yodel_simple_test( + name = "connected_subchannel", + srcs = ["connected_subchannel_test.cc"], + external_deps = ["gtest"], + deps = [ + "//:grpc_client_channel", + "//test/core/call/yodel:yodel_test", + ], +) + +grpc_yodel_simple_test( + name = "load_balanced_call_destination", + srcs = ["load_balanced_call_destination_test.cc"], + external_deps = ["gtest"], + deps = [ + "//:grpc_client_channel", + "//test/core/call/yodel:yodel_test", + ], +) + grpc_cc_test( name = "retry_throttle_test", srcs = ["retry_throttle_test.cc"], diff --git a/test/core/client_channel/client_channel_test.cc b/test/core/client_channel/client_channel_test.cc index 7fe497d91e8..78b44db971c 100644 --- a/test/core/client_channel/client_channel_test.cc +++ b/test/core/client_channel/client_channel_test.cc @@ -1,5 +1,4 @@ -// -// Copyright 2022 gRPC authors. +// Copyright 2024 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,79 +11,272 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// +#include "src/core/client_channel/client_channel.h" + +#include #include -#include "absl/types/optional.h" +#include "absl/strings/string_view.h" #include "gtest/gtest.h" -#include -#include +#include -#include "src/core/client_channel/client_channel_filter.h" -#include "src/core/client_channel/subchannel_pool_interface.h" -#include "src/core/lib/channel/channel_args.h" -#include "src/core/resolver/endpoint_addresses.h" -#include "test/core/test_util/test_config.h" +#include "src/core/lib/address_utils/parse_address.h" +#include "src/core/lib/config/core_configuration.h" +#include "test/core/call/yodel/yodel_test.h" namespace grpc_core { -namespace testing { -namespace { -TEST(MakeSubchannelArgs, UsesChannelDefaultAuthorityByDefault) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs(), ChannelArgs(), nullptr, "foo.example.com"); - EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "foo.example.com"); -} +using EventEngine = grpc_event_engine::experimental::EventEngine; -TEST(MakeSubchannelArgs, DefaultAuthorityFromChannelArgs) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), - ChannelArgs(), nullptr, "foo.example.com"); - EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); +namespace { +const absl::string_view kTestScheme = "test"; +const absl::string_view kTestTarget = "/target"; +const absl::string_view kTestPath = "/test_method"; +std::string TestTarget() { + return absl::StrCat(kTestScheme, "://", kTestTarget); } +} // namespace -TEST(MakeSubchannelArgs, DefaultAuthorityFromResolver) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs(), - ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), nullptr, - "foo.example.com"); - EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); -} +class ClientChannelTest : public YodelTest { + protected: + using YodelTest::YodelTest; -TEST(MakeSubchannelArgs, - DefaultAuthorityFromChannelArgsOverridesValueFromResolver) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), - ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "baz.example.com"), nullptr, - "foo.example.com"); - EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); -} + ClientChannel& InitChannel(const ChannelArgs& args) { + auto channel = ClientChannel::Create(TestTarget(), CompleteArgs(args)); + CHECK_OK(channel); + channel_ = OrphanablePtr( + DownCast(channel->release())); + return *channel_; + } + + ClientChannel& channel() { return *channel_; } + + ClientMetadataHandle MakeClientInitialMetadata() { + auto client_initial_metadata = Arena::MakePooled(); + client_initial_metadata->Set(HttpPathMetadata(), + Slice::FromCopiedString(kTestPath)); + return client_initial_metadata; + } + + CallHandler TickUntilCallStarted() { + return TickUntil([this]() -> Poll { + auto handler = call_destination_->PopHandler(); + if (handler.has_value()) return std::move(*handler); + return Pending(); + }); + } + + void QueueNameResolutionResult(Resolver::Result result) { + if (resolver_ != nullptr) { + resolver_->QueueNameResolutionResult(std::move(result)); + } else { + early_resolver_results_.push(std::move(result)); + } + } + + Resolver::Result MakeSuccessfulResolutionResult( + absl::string_view endpoint_address) { + Resolver::Result result; + grpc_resolved_address address; + CHECK(grpc_parse_uri(URI::Parse(endpoint_address).value(), &address)); + result.addresses = EndpointAddressesList({EndpointAddresses{address, {}}}); + return result; + } + + private: + class TestConnector final : public SubchannelConnector { + public: + void Connect(const Args&, Result*, grpc_closure* notify) override { + CHECK_EQ(notify_, nullptr); + notify_ = notify; + } + + void Shutdown(grpc_error_handle error) override { + if (notify_ != nullptr) ExecCtx::Run(DEBUG_LOCATION, notify_, error); + } + + private: + grpc_closure* notify_ = nullptr; + }; + + class TestClientChannelFactory final : public ClientChannelFactory { + public: + RefCountedPtr CreateSubchannel( + const grpc_resolved_address& address, + const ChannelArgs& args) override { + gpr_log(GPR_INFO, "CreateSubchannel: args=%s", args.ToString().c_str()); + return Subchannel::Create(MakeOrphanable(), address, args); + } + }; + + class TestCallDestination final : public UnstartedCallDestination { + public: + void StartCall(UnstartedCallHandler unstarted_call_handler) override { + handlers_.push( + unstarted_call_handler.V2HackToStartCallWithoutACallFilterStack()); + } + + absl::optional PopHandler() { + if (handlers_.empty()) return absl::nullopt; + auto handler = std::move(handlers_.front()); + handlers_.pop(); + return handler; + } + + void Orphaned() override {} + + private: + std::queue handlers_; + }; -TEST(MakeSubchannelArgs, ArgsFromChannelTrumpPerAddressArgs) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs().Set("foo", 1), ChannelArgs().Set("foo", 2), nullptr, - "foo.example.com"); - EXPECT_EQ(args.GetInt("foo"), 1); + class TestCallDestinationFactory final + : public ClientChannel::CallDestinationFactory { + public: + explicit TestCallDestinationFactory(ClientChannelTest* test) + : test_(test) {} + + RefCountedPtr CreateCallDestination( + ClientChannel::PickerObservable picker) override { + CHECK(!test_->picker_.has_value()); + test_->picker_ = std::move(picker); + return test_->call_destination_; + } + + private: + ClientChannelTest* const test_; + }; + + class TestResolver final : public Resolver { + public: + explicit TestResolver( + ClientChannelTest* test, ChannelArgs args, + std::unique_ptr result_handler, + std::shared_ptr work_serializer) + : test_(test), + args_(std::move(args)), + result_handler_(std::move(result_handler)), + work_serializer_(std::move(work_serializer)) { + CHECK(test_->resolver_ == nullptr); + test_->resolver_ = this; + } + + ~TestResolver() override { + CHECK_EQ(test_->resolver_, this); + test_->resolver_ = nullptr; + } + + void StartLocked() override { + while (!test_->early_resolver_results_.empty()) { + QueueNameResolutionResult( + std::move(test_->early_resolver_results_.front())); + test_->early_resolver_results_.pop(); + } + } + void ShutdownLocked() override {} + + void QueueNameResolutionResult(Resolver::Result result) { + result.args = result.args.UnionWith(args_); + work_serializer_->Run( + [self = RefAsSubclass(), + result = std::move(result)]() mutable { + self->result_handler_->ReportResult(std::move(result)); + }, + DEBUG_LOCATION); + } + + private: + ClientChannelTest* const test_; + const ChannelArgs args_; + const std::unique_ptr result_handler_; + const std::shared_ptr work_serializer_; + }; + + class TestResolverFactory final : public ResolverFactory { + public: + explicit TestResolverFactory(ClientChannelTest* test) : test_(test) {} + + OrphanablePtr CreateResolver(ResolverArgs args) const override { + CHECK_EQ(args.uri.scheme(), kTestScheme); + CHECK_EQ(args.uri.path(), kTestTarget); + return MakeOrphanable(test_, std::move(args.args), + std::move(args.result_handler), + std::move(args.work_serializer)); + } + + absl::string_view scheme() const override { return "test"; } + bool IsValidUri(const URI&) const override { return true; } + + private: + ClientChannelTest* const test_; + }; + + ChannelArgs CompleteArgs(const ChannelArgs& args) { + return args.SetObject(&call_destination_factory_) + .SetObject(&client_channel_factory_) + .SetObject(ResourceQuota::Default()) + .SetObject(std::static_pointer_cast(event_engine())) + // TODO(ctiller): remove once v3 supports retries? + .SetIfUnset(GRPC_ARG_ENABLE_RETRIES, 0); + } + + void InitCoreConfiguration() override { + CoreConfiguration::RegisterBuilder( + [this](CoreConfiguration::Builder* builder) { + builder->resolver_registry()->RegisterResolverFactory( + std::make_unique(this)); + }); + } + + void Shutdown() override { + ExecCtx exec_ctx; + channel_.reset(); + picker_.reset(); + } + + OrphanablePtr channel_; + absl::optional picker_; + TestCallDestinationFactory call_destination_factory_{this}; + TestClientChannelFactory client_channel_factory_; + RefCountedPtr call_destination_ = + MakeRefCounted(); + // Resolver results that have been reported before the resolver has been + // instantiated. + std::queue early_resolver_results_; + TestResolver* resolver_ = nullptr; +}; + +#define CLIENT_CHANNEL_TEST(name) YODEL_TEST(ClientChannelTest, name) + +CLIENT_CHANNEL_TEST(NoOp) { InitChannel(ChannelArgs()); } + +CLIENT_CHANNEL_TEST(CreateCall) { + auto& channel = InitChannel(ChannelArgs()); + auto call_initiator = channel.CreateCall(MakeClientInitialMetadata()); + SpawnTestSeq(call_initiator, "cancel", [call_initiator]() mutable { + call_initiator.Cancel(); + return Empty{}; + }); + WaitForAllPendingWork(); } -TEST(MakeSubchannelArgs, StripsOutNoSubchannelArgs) { - ChannelArgs args = ClientChannelFilter::MakeSubchannelArgs( - ChannelArgs().Set(GRPC_ARG_NO_SUBCHANNEL_PREFIX "foo", 1), - ChannelArgs().Set(GRPC_ARG_NO_SUBCHANNEL_PREFIX "bar", 1), nullptr, - "foo.example.com"); - EXPECT_EQ(args.GetString(GRPC_ARG_NO_SUBCHANNEL_PREFIX "foo"), absl::nullopt); - EXPECT_EQ(args.GetString(GRPC_ARG_NO_SUBCHANNEL_PREFIX "bar"), absl::nullopt); +CLIENT_CHANNEL_TEST(StartCall) { + auto& channel = InitChannel(ChannelArgs()); + auto call_initiator = channel.CreateCall(MakeClientInitialMetadata()); + QueueNameResolutionResult( + MakeSuccessfulResolutionResult("ipv4:127.0.0.1:1234")); + auto call_handler = TickUntilCallStarted(); + SpawnTestSeq(call_initiator, "cancel", [call_initiator]() mutable { + call_initiator.Cancel(); + return Empty{}; + }); + WaitForAllPendingWork(); } -} // namespace -} // namespace testing -} // namespace grpc_core +// TODO(ctiller, roth): MANY more test cases +// - Resolver returns an error for the initial result, then returns a valid +// result. +// - Resolver returns a service config (various permutations). -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - grpc::testing::TestEnvironment env(&argc, argv); - auto result = RUN_ALL_TESTS(); - return result; -} +} // namespace grpc_core diff --git a/test/core/client_channel/connected_subchannel_test.cc b/test/core/client_channel/connected_subchannel_test.cc new file mode 100644 index 00000000000..613509d7456 --- /dev/null +++ b/test/core/client_channel/connected_subchannel_test.cc @@ -0,0 +1,178 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include + +#include "absl/status/status.h" +#include "absl/strings/string_view.h" +#include "gtest/gtest.h" + +#include + +#include "src/core/client_channel/client_channel.h" +#include "src/core/client_channel/local_subchannel_pool.h" +#include "src/core/lib/address_utils/parse_address.h" +#include "src/core/lib/config/core_configuration.h" +#include "test/core/call/yodel/yodel_test.h" + +namespace grpc_core { + +using EventEngine = grpc_event_engine::experimental::EventEngine; + +namespace { +const absl::string_view kTestPath = "/test_method"; +const absl::string_view kTestAddress = "ipv4:127.0.0.1:1234"; +const absl::string_view kDefaultAuthority = "test-authority"; +} // namespace + +class ConnectedSubchannelTest : public YodelTest { + protected: + using YodelTest::YodelTest; + + RefCountedPtr InitChannel(const ChannelArgs& args) { + grpc_resolved_address addr; + CHECK(grpc_parse_uri(URI::Parse(kTestAddress).value(), &addr)); + auto subchannel = Subchannel::Create(MakeOrphanable(this), + addr, CompleteArgs(args)); + { + ExecCtx exec_ctx; + subchannel->RequestConnection(); + } + return TickUntil>( + [subchannel]() -> Poll> { + auto connected_subchannel = subchannel->connected_subchannel(); + if (connected_subchannel != nullptr) return connected_subchannel; + return Pending(); + }); + } + + ClientMetadataHandle MakeClientInitialMetadata() { + auto client_initial_metadata = Arena::MakePooled(); + client_initial_metadata->Set(HttpPathMetadata(), + Slice::FromCopiedString(kTestPath)); + return client_initial_metadata; + } + + CallInitiatorAndHandler MakeCall( + ClientMetadataHandle client_initial_metadata) { + return MakeCallPair( + std::move(client_initial_metadata), event_engine().get(), + call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + } + + CallHandler TickUntilCallStarted() { + return TickUntil([this]() -> Poll { + auto handler = PopHandler(); + if (handler.has_value()) return std::move(*handler); + return Pending(); + }); + } + + private: + class TestTransport final : public ClientTransport { + public: + explicit TestTransport(ConnectedSubchannelTest* test) : test_(test) {} + + void Orphan() override { + state_tracker_.SetState(GRPC_CHANNEL_SHUTDOWN, absl::OkStatus(), + "transport-orphaned"); + Unref(); + } + + FilterStackTransport* filter_stack_transport() override { return nullptr; } + ClientTransport* client_transport() override { return this; } + ServerTransport* server_transport() override { return nullptr; } + absl::string_view GetTransportName() const override { return "test"; } + void SetPollset(grpc_stream*, grpc_pollset*) override {} + void SetPollsetSet(grpc_stream*, grpc_pollset_set*) override {} + void PerformOp(grpc_transport_op* op) override { + LOG(INFO) << "PerformOp: " << grpc_transport_op_string(op); + if (op->start_connectivity_watch != nullptr) { + state_tracker_.AddWatcher(op->start_connectivity_watch_state, + std::move(op->start_connectivity_watch)); + } + ExecCtx::Run(DEBUG_LOCATION, op->on_consumed, absl::OkStatus()); + } + + void StartCall(CallHandler call_handler) override { + test_->handlers_.push(std::move(call_handler)); + } + + private: + ConnectedSubchannelTest* const test_; + ConnectivityStateTracker state_tracker_{"test-transport"}; + }; + + class TestConnector final : public SubchannelConnector { + public: + explicit TestConnector(ConnectedSubchannelTest* test) : test_(test) {} + + void Connect(const Args& args, Result* result, + grpc_closure* notify) override { + result->channel_args = args.channel_args; + result->transport = MakeOrphanable(test_).release(); + ExecCtx::Run(DEBUG_LOCATION, notify, absl::OkStatus()); + } + + void Shutdown(grpc_error_handle) override {} + + private: + ConnectedSubchannelTest* const test_; + }; + + ChannelArgs CompleteArgs(const ChannelArgs& args) { + return args.SetObject(ResourceQuota::Default()) + .SetObject(std::static_pointer_cast(event_engine())) + .SetObject(MakeRefCounted()) + .Set(GRPC_ARG_DEFAULT_AUTHORITY, kDefaultAuthority); + } + + void InitCoreConfiguration() override {} + + void Shutdown() override {} + + absl::optional PopHandler() { + if (handlers_.empty()) return absl::nullopt; + auto handler = std::move(handlers_.front()); + handlers_.pop(); + return handler; + } + + std::queue handlers_; + RefCountedPtr call_arena_allocator_ = + MakeRefCounted( + ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( + "test"), + 1024); +}; + +#define CONNECTED_SUBCHANNEL_CHANNEL_TEST(name) \ + YODEL_TEST(ConnectedSubchannelTest, name) + +CONNECTED_SUBCHANNEL_CHANNEL_TEST(NoOp) { InitChannel(ChannelArgs()); } + +CONNECTED_SUBCHANNEL_CHANNEL_TEST(StartCall) { + auto channel = InitChannel(ChannelArgs()); + auto call = MakeCall(MakeClientInitialMetadata()); + SpawnTestSeq( + call.handler, "start-call", [channel, handler = call.handler]() mutable { + channel->unstarted_call_destination()->StartCall(std::move(handler)); + return Empty{}; + }); + auto handler = TickUntilCallStarted(); + WaitForAllPendingWork(); +} + +} // namespace grpc_core diff --git a/test/core/client_channel/corpus/client_channel/empty b/test/core/client_channel/corpus/client_channel/empty new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/test/core/client_channel/corpus/client_channel/empty @@ -0,0 +1 @@ + diff --git a/test/core/client_channel/corpus/connected_subchannel/empty b/test/core/client_channel/corpus/connected_subchannel/empty new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/test/core/client_channel/corpus/connected_subchannel/empty @@ -0,0 +1 @@ + diff --git a/test/core/client_channel/corpus/load_balanced_call_destination/empty b/test/core/client_channel/corpus/load_balanced_call_destination/empty new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/test/core/client_channel/corpus/load_balanced_call_destination/empty @@ -0,0 +1 @@ + diff --git a/test/core/client_channel/load_balanced_call_destination_test.cc b/test/core/client_channel/load_balanced_call_destination_test.cc new file mode 100644 index 00000000000..c8651fc305f --- /dev/null +++ b/test/core/client_channel/load_balanced_call_destination_test.cc @@ -0,0 +1,202 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "src/core/client_channel/load_balanced_call_destination.h" + +#include +#include +#include + +#include "absl/strings/string_view.h" +#include "gmock/gmock.h" +#include "gtest/gtest.h" + +#include + +#include "test/core/call/yodel/yodel_test.h" + +using testing::StrictMock; + +namespace grpc_core { + +using EventEngine = grpc_event_engine::experimental::EventEngine; + +namespace { +const absl::string_view kTestPath = "/test_method"; +} // namespace + +class LoadBalancedCallDestinationTest : public YodelTest { + protected: + using YodelTest::YodelTest; + + ClientMetadataHandle MakeClientInitialMetadata() { + auto client_initial_metadata = Arena::MakePooled(); + client_initial_metadata->Set(HttpPathMetadata(), + Slice::FromCopiedString(kTestPath)); + return client_initial_metadata; + } + + CallInitiatorAndHandler MakeCall( + ClientMetadataHandle client_initial_metadata) { + return MakeCallPair( + std::move(client_initial_metadata), event_engine().get(), + call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + } + + CallHandler TickUntilCallStarted() { + auto poll = [this]() -> Poll { + auto handler = call_destination_->PopHandler(); + if (handler.has_value()) return std::move(*handler); + return Pending(); + }; + return TickUntil(absl::FunctionRef()>(poll)); + } + + LoadBalancedCallDestination& destination_under_test() { + return *destination_under_test_; + } + + ClientChannel::PickerObservable& picker() { return picker_; } + + RefCountedPtr subchannel() { return subchannel_; } + + private: + class TestCallDestination final : public UnstartedCallDestination { + public: + void StartCall(UnstartedCallHandler unstarted_call_handler) override { + handlers_.push( + unstarted_call_handler.V2HackToStartCallWithoutACallFilterStack()); + } + + absl::optional PopHandler() { + if (handlers_.empty()) return absl::nullopt; + auto handler = std::move(handlers_.front()); + handlers_.pop(); + return handler; + } + + void Orphaned() override {} + + private: + std::queue handlers_; + }; + + class TestSubchannel : public SubchannelInterfaceWithCallDestination { + public: + explicit TestSubchannel( + RefCountedPtr call_destination) + : call_destination_(std::move(call_destination)) {} + + void WatchConnectivityState( + std::unique_ptr) override { + Crash("not implemented"); + } + void CancelConnectivityStateWatch( + ConnectivityStateWatcherInterface*) override { + Crash("not implemented"); + } + void RequestConnection() override { Crash("not implemented"); } + void ResetBackoff() override { Crash("not implemented"); } + void AddDataWatcher(std::unique_ptr) override { + Crash("not implemented"); + } + void CancelDataWatcher(DataWatcherInterface*) override { + Crash("not implemented"); + } + RefCountedPtr call_destination() override { + return call_destination_; + } + + private: + const RefCountedPtr call_destination_; + }; + + void InitCoreConfiguration() override {} + + void Shutdown() override { + channel_.reset(); + picker_ = ClientChannel::PickerObservable(nullptr); + call_destination_.reset(); + destination_under_test_.reset(); + call_arena_allocator_.reset(); + subchannel_.reset(); + } + + OrphanablePtr channel_; + ClientChannel::PickerObservable picker_{nullptr}; + RefCountedPtr call_destination_ = + MakeRefCounted(); + RefCountedPtr destination_under_test_ = + MakeRefCounted(picker_); + RefCountedPtr call_arena_allocator_ = + MakeRefCounted( + ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( + "test"), + 1024); + RefCountedPtr subchannel_ = + MakeRefCounted(call_destination_); +}; + +#define LOAD_BALANCED_CALL_DESTINATION_TEST(name) \ + YODEL_TEST(LoadBalancedCallDestinationTest, name) + +class MockPicker : public LoadBalancingPolicy::SubchannelPicker { + public: + MOCK_METHOD(LoadBalancingPolicy::PickResult, Pick, + (LoadBalancingPolicy::PickArgs)); +}; + +LOAD_BALANCED_CALL_DESTINATION_TEST(NoOp) {} + +LOAD_BALANCED_CALL_DESTINATION_TEST(CreateCall) { + auto call = MakeCall(MakeClientInitialMetadata()); + SpawnTestSeq( + call.initiator, "initiator", + [this, handler = std::move(call.handler)]() { + destination_under_test().StartCall(handler); + return Empty{}; + }, + [call_initiator = call.initiator]() mutable { + call_initiator.Cancel(); + return Empty{}; + }); + WaitForAllPendingWork(); +} + +LOAD_BALANCED_CALL_DESTINATION_TEST(StartCall) { + auto call = MakeCall(MakeClientInitialMetadata()); + SpawnTestSeq(call.initiator, "initiator", + [this, handler = std::move(call.handler)]() { + destination_under_test().StartCall(handler); + return Empty{}; + }); + auto mock_picker = MakeRefCounted>(); + EXPECT_CALL(*mock_picker, Pick) + .WillOnce([this](LoadBalancingPolicy::PickArgs) { + return LoadBalancingPolicy::PickResult::Complete{subchannel()}; + }); + picker().Set(mock_picker); + auto handler = TickUntilCallStarted(); + SpawnTestSeq(call.initiator, "cancel", + [call_initiator = call.initiator]() mutable { + call_initiator.Cancel(); + return Empty{}; + }); + WaitForAllPendingWork(); +} + +// TODO(roth, ctiller): more tests +// - tests for the picker returning queue, fail, and drop results. + +} // namespace grpc_core diff --git a/test/core/client_channel/subchannel_args_test.cc b/test/core/client_channel/subchannel_args_test.cc new file mode 100644 index 00000000000..3750a8dc42b --- /dev/null +++ b/test/core/client_channel/subchannel_args_test.cc @@ -0,0 +1,90 @@ +// +// Copyright 2022 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "absl/types/optional.h" +#include "gtest/gtest.h" + +#include +#include + +#include "src/core/client_channel/subchannel.h" +#include "src/core/client_channel/subchannel_pool_interface.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/resolver/endpoint_addresses.h" +#include "test/core/test_util/test_config.h" + +namespace grpc_core { +namespace testing { +namespace { + +TEST(MakeSubchannelArgs, UsesChannelDefaultAuthorityByDefault) { + ChannelArgs args = Subchannel::MakeSubchannelArgs( + ChannelArgs(), ChannelArgs(), nullptr, "foo.example.com"); + EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "foo.example.com"); +} + +TEST(MakeSubchannelArgs, DefaultAuthorityFromChannelArgs) { + ChannelArgs args = Subchannel::MakeSubchannelArgs( + ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), + ChannelArgs(), nullptr, "foo.example.com"); + EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); +} + +TEST(MakeSubchannelArgs, DefaultAuthorityFromResolver) { + ChannelArgs args = Subchannel::MakeSubchannelArgs( + ChannelArgs(), + ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), nullptr, + "foo.example.com"); + EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); +} + +TEST(MakeSubchannelArgs, + DefaultAuthorityFromChannelArgsOverridesValueFromResolver) { + ChannelArgs args = Subchannel::MakeSubchannelArgs( + ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "bar.example.com"), + ChannelArgs().Set(GRPC_ARG_DEFAULT_AUTHORITY, "baz.example.com"), nullptr, + "foo.example.com"); + EXPECT_EQ(args.GetString(GRPC_ARG_DEFAULT_AUTHORITY), "bar.example.com"); +} + +TEST(MakeSubchannelArgs, ArgsFromChannelTrumpPerAddressArgs) { + ChannelArgs args = Subchannel::MakeSubchannelArgs(ChannelArgs().Set("foo", 1), + ChannelArgs().Set("foo", 2), + nullptr, "foo.example.com"); + EXPECT_EQ(args.GetInt("foo"), 1); +} + +TEST(MakeSubchannelArgs, StripsOutNoSubchannelArgs) { + ChannelArgs args = Subchannel::MakeSubchannelArgs( + ChannelArgs().Set(GRPC_ARG_NO_SUBCHANNEL_PREFIX "foo", 1), + ChannelArgs().Set(GRPC_ARG_NO_SUBCHANNEL_PREFIX "bar", 1), nullptr, + "foo.example.com"); + EXPECT_EQ(args.GetString(GRPC_ARG_NO_SUBCHANNEL_PREFIX "foo"), absl::nullopt); + EXPECT_EQ(args.GetString(GRPC_ARG_NO_SUBCHANNEL_PREFIX "bar"), absl::nullopt); +} + +} // namespace +} // namespace testing +} // namespace grpc_core + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + grpc::testing::TestEnvironment env(&argc, argv); + auto result = RUN_ALL_TESTS(); + return result; +} diff --git a/test/core/promise/BUILD b/test/core/promise/BUILD index 2b2b2cb9943..973dfaa88d3 100644 --- a/test/core/promise/BUILD +++ b/test/core/promise/BUILD @@ -145,6 +145,7 @@ grpc_cc_test( uses_event_engine = False, uses_polling = False, deps = [ + "poll_matcher", "//:promise", "//src/core:map", ], diff --git a/test/core/promise/map_test.cc b/test/core/promise/map_test.cc index c153327971c..85697084084 100644 --- a/test/core/promise/map_test.cc +++ b/test/core/promise/map_test.cc @@ -20,12 +20,13 @@ #include "gtest/gtest.h" #include "src/core/lib/promise/promise.h" +#include "test/core/promise/poll_matcher.h" namespace grpc_core { TEST(MapTest, Works) { Promise x = Map([]() { return 42; }, [](int i) { return i / 2; }); - EXPECT_EQ(x(), Poll(21)); + EXPECT_THAT(x(), IsReady(21)); } TEST(MapTest, JustElem) { @@ -34,6 +35,21 @@ TEST(MapTest, JustElem) { EXPECT_EQ(JustElem<0>()(t), 1); } +TEST(CheckDelayedTest, SeesImmediate) { + auto x = CheckDelayed([]() { return 42; }); + EXPECT_THAT(x(), IsReady(std::make_tuple(42, false))); +} + +TEST(CheckDelayedTest, SeesDelayed) { + auto x = CheckDelayed([n = 1]() mutable -> Poll { + if (n == 0) return 42; + --n; + return Pending{}; + }); + EXPECT_THAT(x(), IsPending()); + EXPECT_THAT(x(), IsReady(std::make_tuple(42, true))); +} + } // namespace grpc_core int main(int argc, char** argv) { diff --git a/test/core/promise/observable_test.cc b/test/core/promise/observable_test.cc index e3c74332f04..b6a2268ad99 100644 --- a/test/core/promise/observable_test.cc +++ b/test/core/promise/observable_test.cc @@ -140,6 +140,16 @@ TEST(ObservableTest, MultipleActivitiesWakeUp) { EXPECT_THAT(next2(), IsReady(2)); } +TEST(ObservableTest, NoDeadlockOnDestruction) { + StrictMock activity; + Observable observable(1); + activity.Activate(); + { + auto next = observable.Next(1); + EXPECT_THAT(next(), IsPending()); + } +} + class ThreadWakeupScheduler { public: template diff --git a/test/core/surface/secure_channel_create_test.cc b/test/core/surface/secure_channel_create_test.cc index 89f21615e98..e22aa5cd61b 100644 --- a/test/core/surface/secure_channel_create_test.cc +++ b/test/core/surface/secure_channel_create_test.cc @@ -39,7 +39,7 @@ void test_unknown_scheme_target(void) { grpc_core::Channel::FromC(chan)->channel_stack(), 0); ASSERT_STREQ(elem->filter->name, "lame-client"); grpc_core::ExecCtx exec_ctx; - grpc_core::Channel::FromC(chan)->Unref(); + grpc_core::Channel::FromC(chan)->Orphan(); creds->Unref(); } @@ -53,7 +53,7 @@ void test_security_connector_already_in_arg(void) { grpc_core::Channel::FromC(chan)->channel_stack(), 0); ASSERT_STREQ(elem->filter->name, "lame-client"); grpc_core::ExecCtx exec_ctx; - grpc_core::Channel::FromC(chan)->Unref(); + grpc_core::Channel::FromC(chan)->Orphan(); } void test_null_creds(void) { @@ -62,7 +62,7 @@ void test_null_creds(void) { grpc_core::Channel::FromC(chan)->channel_stack(), 0); ASSERT_STREQ(elem->filter->name, "lame-client"); grpc_core::ExecCtx exec_ctx; - grpc_core::Channel::FromC(chan)->Unref(); + grpc_core::Channel::FromC(chan)->Orphan(); } TEST(SecureChannelCreateTest, MainTest) { diff --git a/test/core/transport/test_suite/transport_test.cc b/test/core/transport/test_suite/transport_test.cc index 1dd3d9db500..12e2932faa7 100644 --- a/test/core/transport/test_suite/transport_test.cc +++ b/test/core/transport/test_suite/transport_test.cc @@ -58,12 +58,10 @@ void TransportTest::ServerCallDestination::StartCall( } absl::optional TransportTest::ServerCallDestination::PopHandler() { - if (!handlers_.empty()) { - auto handler = std::move(handlers_.front()); - handlers_.pop(); - return handler; - } - return absl::nullopt; + if (handlers_.empty()) return absl::nullopt; + auto handler = std::move(handlers_.front()); + handlers_.pop(); + return handler; } } // namespace grpc_core diff --git a/test/core/transport/test_suite/transport_test.h b/test/core/transport/test_suite/transport_test.h index 6122b42cf91..97e099f348a 100644 --- a/test/core/transport/test_suite/transport_test.h +++ b/test/core/transport/test_suite/transport_test.h @@ -42,7 +42,7 @@ class TransportTest : public YodelTest { TransportTest(const TransportFixture& fixture, const fuzzing_event_engine::Actions& actions, absl::BitGenRef rng) - : YodelTest(actions, rng), transport_pair_(fixture(event_engine())) {} + : YodelTest(actions, rng), fixture_(std::move(fixture)) {} void SetServerCallDestination(); CallInitiator CreateCall(ClientMetadataHandle client_initial_metadata); @@ -60,6 +60,8 @@ class TransportTest : public YodelTest { std::queue handlers_; }; + void InitTest() override { transport_pair_ = fixture_(event_engine()); } + void Shutdown() override { transport_pair_.client.reset(); transport_pair_.server.reset(); @@ -67,6 +69,7 @@ class TransportTest : public YodelTest { RefCountedPtr server_call_destination_ = MakeRefCounted(); + const TransportFixture& fixture_; ClientAndServerTransportPair transport_pair_; }; diff --git a/tools/distrib/fix_build_deps.py b/tools/distrib/fix_build_deps.py index d34a0c03f03..8e4acb81ca7 100755 --- a/tools/distrib/fix_build_deps.py +++ b/tools/distrib/fix_build_deps.py @@ -400,6 +400,7 @@ for dirname in [ "src/cpp/ext/otel", "test/core/backoff", "test/core/call/yodel", + "test/core/client_channel", "test/core/experiments", "test/core/uri", "test/core/test_util", @@ -430,7 +431,10 @@ for dirname in [ "grpc_cc_library": grpc_cc_library, "grpc_cc_test": grpc_cc_library, "grpc_core_end2end_test": lambda **kwargs: None, + "grpc_filegroup": lambda **kwargs: None, "grpc_transport_test": lambda **kwargs: None, + "grpc_yodel_test": lambda **kwargs: None, + "grpc_yodel_simple_test": lambda **kwargs: None, "grpc_fuzzer": grpc_cc_library, "grpc_fuzz_test": grpc_cc_library, "grpc_proto_fuzzer": grpc_cc_library, diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a65cdb9fc4f..c3428fdd3a1 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1093,6 +1093,8 @@ src/core/channelz/channelz_registry.cc \ src/core/channelz/channelz_registry.h \ src/core/client_channel/backup_poller.cc \ src/core/client_channel/backup_poller.h \ +src/core/client_channel/client_channel.cc \ +src/core/client_channel/client_channel.h \ src/core/client_channel/client_channel_factory.cc \ src/core/client_channel/client_channel_factory.h \ src/core/client_channel/client_channel_filter.cc \ @@ -1108,6 +1110,8 @@ src/core/client_channel/dynamic_filters.cc \ src/core/client_channel/dynamic_filters.h \ src/core/client_channel/global_subchannel_pool.cc \ src/core/client_channel/global_subchannel_pool.h \ +src/core/client_channel/load_balanced_call_destination.cc \ +src/core/client_channel/load_balanced_call_destination.h \ src/core/client_channel/local_subchannel_pool.cc \ src/core/client_channel/local_subchannel_pool.h \ src/core/client_channel/retry_filter.cc \ @@ -2260,6 +2264,8 @@ src/core/lib/gprpp/debug_location.h \ src/core/lib/gprpp/directory_reader.h \ src/core/lib/gprpp/down_cast.h \ src/core/lib/gprpp/dual_ref_counted.h \ +src/core/lib/gprpp/dump_args.cc \ +src/core/lib/gprpp/dump_args.h \ src/core/lib/gprpp/env.h \ src/core/lib/gprpp/examine_stack.cc \ src/core/lib/gprpp/examine_stack.h \ @@ -2485,6 +2491,7 @@ src/core/lib/promise/interceptor_list.h \ src/core/lib/promise/latch.h \ src/core/lib/promise/loop.h \ src/core/lib/promise/map.h \ +src/core/lib/promise/observable.h \ src/core/lib/promise/party.cc \ src/core/lib/promise/party.h \ src/core/lib/promise/pipe.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 4a5484a7c0f..1439a0c8d46 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -896,6 +896,8 @@ src/core/channelz/channelz_registry.h \ src/core/client_channel/README.md \ src/core/client_channel/backup_poller.cc \ src/core/client_channel/backup_poller.h \ +src/core/client_channel/client_channel.cc \ +src/core/client_channel/client_channel.h \ src/core/client_channel/client_channel_factory.cc \ src/core/client_channel/client_channel_factory.h \ src/core/client_channel/client_channel_filter.cc \ @@ -911,6 +913,8 @@ src/core/client_channel/dynamic_filters.cc \ src/core/client_channel/dynamic_filters.h \ src/core/client_channel/global_subchannel_pool.cc \ src/core/client_channel/global_subchannel_pool.h \ +src/core/client_channel/load_balanced_call_destination.cc \ +src/core/client_channel/load_balanced_call_destination.h \ src/core/client_channel/local_subchannel_pool.cc \ src/core/client_channel/local_subchannel_pool.h \ src/core/client_channel/retry_filter.cc \ @@ -2033,6 +2037,8 @@ src/core/lib/gprpp/debug_location.h \ src/core/lib/gprpp/directory_reader.h \ src/core/lib/gprpp/down_cast.h \ src/core/lib/gprpp/dual_ref_counted.h \ +src/core/lib/gprpp/dump_args.cc \ +src/core/lib/gprpp/dump_args.h \ src/core/lib/gprpp/env.h \ src/core/lib/gprpp/examine_stack.cc \ src/core/lib/gprpp/examine_stack.h \ @@ -2259,6 +2265,7 @@ src/core/lib/promise/interceptor_list.h \ src/core/lib/promise/latch.h \ src/core/lib/promise/loop.h \ src/core/lib/promise/map.h \ +src/core/lib/promise/observable.h \ src/core/lib/promise/party.cc \ src/core/lib/promise/party.h \ src/core/lib/promise/pipe.h \ diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 8dc1a7348a1..17e26c19e11 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -2118,9 +2118,7 @@ "benchmark": false, "ci_platforms": [ "linux", - "mac", - "posix", - "windows" + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -2131,9 +2129,7 @@ "name": "client_channel_test", "platforms": [ "linux", - "mac", - "posix", - "windows" + "posix" ], "uses_polling": false }, @@ -2445,6 +2441,26 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "connected_subchannel_test", + "platforms": [ + "linux", + "posix" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, @@ -5533,6 +5549,26 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "load_balanced_call_destination_test", + "platforms": [ + "linux", + "posix" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, @@ -10065,6 +10101,30 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "subchannel_args_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, From fbd8ebe7cde8761ce88bf848642ee9d4f00cd3c8 Mon Sep 17 00:00:00 2001 From: gRPC Team Bot Date: Wed, 29 May 2024 16:06:17 -0700 Subject: [PATCH 13/20] Automated rollback of commit db2d775ffcb860956276b4db2e036632e108a0b0. PiperOrigin-RevId: 638442984 --- BUILD | 12 ++++---- CMakeLists.txt | 14 +++++----- Makefile | 8 +++--- Package.swift | 16 +++++------ build_autogenerated.yaml | 28 +++++++++---------- config.m4 | 10 +++---- config.w32 | 10 +++---- gRPC-C++.podspec | 16 +++++------ gRPC-Core.podspec | 24 ++++++++-------- grpc.gemspec | 16 +++++------ package.xml | 16 +++++------ src/core/BUILD | 4 +-- src/core/ext/gcp/metadata_query.h | 4 +-- .../chttp2/transport/chttp2_transport.cc | 2 +- .../http_connect/http_connect_handshaker.cc | 4 +-- .../http}/format_request.cc | 7 ++--- .../http_client => lib/http}/format_request.h | 11 ++++---- .../{util/http_client => lib/http}/httpcli.cc | 9 +++--- .../{util/http_client => lib/http}/httpcli.h | 11 ++++---- .../http}/httpcli_security_connector.cc | 3 +- .../http}/httpcli_ssl_credentials.h | 9 +++--- .../{util/http_client => lib/http}/parser.cc | 5 ++-- .../{util/http_client => lib/http}/parser.h | 9 +++--- .../aws_external_account_credentials.cc | 2 +- .../aws_external_account_credentials.h | 4 +-- .../external/external_account_credentials.cc | 4 +-- .../external/external_account_credentials.h | 4 +-- .../url_external_account_credentials.cc | 4 +-- .../url_external_account_credentials.h | 2 +- .../google_default_credentials.cc | 4 +-- .../security/credentials/jwt/jwt_verifier.cc | 6 ++-- .../credentials/oauth2/oauth2_credentials.cc | 2 +- .../credentials/oauth2/oauth2_credentials.h | 4 +-- src/python/grpcio/grpc_core_dependencies.py | 8 +++--- .../end2end/fixtures/http_proxy_fixture.cc | 2 +- test/core/http/format_request_test.cc | 4 +-- test/core/http/httpcli_test.cc | 2 +- test/core/http/httpscli_test.cc | 6 ++-- test/core/http/parser_test.cc | 2 +- test/core/http/request_fuzzer.cc | 2 +- test/core/http/response_fuzzer.cc | 2 +- test/core/security/credentials_test.cc | 4 +-- test/core/security/jwt_verifier_test.cc | 2 +- test/core/test_util/port_server_client.cc | 4 +-- tools/doxygen/Doxyfile.c++.internal | 16 +++++------ tools/doxygen/Doxyfile.core.internal | 16 +++++------ 46 files changed, 173 insertions(+), 181 deletions(-) rename src/core/{util/http_client => lib/http}/format_request.cc (97%) rename src/core/{util/http_client => lib/http}/format_request.h (86%) rename src/core/{util/http_client => lib/http}/httpcli.cc (99%) rename src/core/{util/http_client => lib/http}/httpcli.h (98%) rename src/core/{util/http_client => lib/http}/httpcli_security_connector.cc (99%) rename src/core/{util/http_client => lib/http}/httpcli_ssl_credentials.h (85%) rename src/core/{util/http_client => lib/http}/parser.cc (99%) rename src/core/{util/http_client => lib/http}/parser.h (96%) diff --git a/BUILD b/BUILD index f2caa63ed0d..91e125bac85 100644 --- a/BUILD +++ b/BUILD @@ -3916,14 +3916,14 @@ grpc_cc_library( grpc_cc_library( name = "httpcli", srcs = [ - "//src/core:util/http_client/format_request.cc", - "//src/core:util/http_client/httpcli.cc", - "//src/core:util/http_client/parser.cc", + "//src/core:lib/http/format_request.cc", + "//src/core:lib/http/httpcli.cc", + "//src/core:lib/http/parser.cc", ], hdrs = [ - "//src/core:util/http_client/format_request.h", - "//src/core:util/http_client/httpcli.h", - "//src/core:util/http_client/parser.h", + "//src/core:lib/http/format_request.h", + "//src/core:lib/http/httpcli.h", + "//src/core:lib/http/parser.h", ], external_deps = [ "absl/base:core_headers", diff --git a/CMakeLists.txt b/CMakeLists.txt index 64da739cd32..28872783538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2315,6 +2315,10 @@ add_library(grpc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/windows/directory_reader.cc src/core/lib/gprpp/work_serializer.cc + src/core/lib/http/format_request.cc + src/core/lib/http/httpcli.cc + src/core/lib/http/httpcli_security_connector.cc + src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -2604,10 +2608,6 @@ add_library(grpc src/core/tsi/ssl_transport_security_utils.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc - src/core/util/http_client/format_request.cc - src/core/util/http_client/httpcli.cc - src/core/util/http_client/httpcli_security_connector.cc - src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_util.cc @@ -3109,6 +3109,9 @@ add_library(grpc_unsecure src/core/lib/gprpp/uuid_v4.cc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/work_serializer.cc + src/core/lib/http/format_request.cc + src/core/lib/http/httpcli.cc + src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -3326,9 +3329,6 @@ add_library(grpc_unsecure src/core/tsi/local_transport_security.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc - src/core/util/http_client/format_request.cc - src/core/util/http_client/httpcli.cc - src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_writer.cc diff --git a/Makefile b/Makefile index fc3701d0415..295a09561bc 100644 --- a/Makefile +++ b/Makefile @@ -1165,6 +1165,10 @@ LIBGRPC_SRC = \ src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ + src/core/lib/http/format_request.cc \ + src/core/lib/http/httpcli.cc \ + src/core/lib/http/httpcli_security_connector.cc \ + src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -1457,10 +1461,6 @@ LIBGRPC_SRC = \ src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ - src/core/util/http_client/format_request.cc \ - src/core/util/http_client/httpcli.cc \ - src/core/util/http_client/httpcli_security_connector.cc \ - src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ diff --git a/Package.swift b/Package.swift index 6b411d73c85..87ed22dd266 100644 --- a/Package.swift +++ b/Package.swift @@ -1323,6 +1323,14 @@ let package = Package( "src/core/lib/gprpp/work_serializer.cc", "src/core/lib/gprpp/work_serializer.h", "src/core/lib/gprpp/xxhash_inline.h", + "src/core/lib/http/format_request.cc", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.cc", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/httpcli_security_connector.cc", + "src/core/lib/http/httpcli_ssl_credentials.h", + "src/core/lib/http/parser.cc", + "src/core/lib/http/parser.h", "src/core/lib/iomgr/block_annotate.h", "src/core/lib/iomgr/buffer_list.cc", "src/core/lib/iomgr/buffer_list.h", @@ -1916,14 +1924,6 @@ let package = Package( "src/core/util/alloc.h", "src/core/util/android/log.cc", "src/core/util/atm.cc", - "src/core/util/http_client/format_request.cc", - "src/core/util/http_client/format_request.h", - "src/core/util/http_client/httpcli.cc", - "src/core/util/http_client/httpcli.h", - "src/core/util/http_client/httpcli_security_connector.cc", - "src/core/util/http_client/httpcli_ssl_credentials.h", - "src/core/util/http_client/parser.cc", - "src/core/util/http_client/parser.h", "src/core/util/iphone/cpu.cc", "src/core/util/json/json.h", "src/core/util/json/json_args.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 3adafd444e6..b2d77583ecf 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -910,6 +910,10 @@ libs: - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h - src/core/lib/gprpp/xxhash_inline.h + - src/core/lib/http/format_request.h + - src/core/lib/http/httpcli.h + - src/core/lib/http/httpcli_ssl_credentials.h + - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -1206,10 +1210,6 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h - - src/core/util/http_client/format_request.h - - src/core/util/http_client/httpcli.h - - src/core/util/http_client/httpcli_ssl_credentials.h - - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -1731,6 +1731,10 @@ libs: - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/windows/directory_reader.cc - src/core/lib/gprpp/work_serializer.cc + - src/core/lib/http/format_request.cc + - src/core/lib/http/httpcli.cc + - src/core/lib/http/httpcli_security_connector.cc + - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -2020,10 +2024,6 @@ libs: - src/core/tsi/ssl_transport_security_utils.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc - - src/core/util/http_client/format_request.cc - - src/core/util/http_client/httpcli.cc - - src/core/util/http_client/httpcli_security_connector.cc - - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_util.cc @@ -2453,6 +2453,9 @@ libs: - src/core/lib/gprpp/uuid_v4.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h + - src/core/lib/http/format_request.h + - src/core/lib/http/httpcli.h + - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -2685,9 +2688,6 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h - - src/core/util/http_client/format_request.h - - src/core/util/http_client/httpcli.h - - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -2889,6 +2889,9 @@ libs: - src/core/lib/gprpp/uuid_v4.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc + - src/core/lib/http/format_request.cc + - src/core/lib/http/httpcli.cc + - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -3106,9 +3109,6 @@ libs: - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc - - src/core/util/http_client/format_request.cc - - src/core/util/http_client/httpcli.cc - - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_writer.cc diff --git a/config.m4 b/config.m4 index 695063579c5..735a0535aa4 100644 --- a/config.m4 +++ b/config.m4 @@ -540,6 +540,10 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ + src/core/lib/http/format_request.cc \ + src/core/lib/http/httpcli.cc \ + src/core/lib/http/httpcli_security_connector.cc \ + src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -832,10 +836,6 @@ if test "$PHP_GRPC" != "no"; then src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ - src/core/util/http_client/format_request.cc \ - src/core/util/http_client/httpcli.cc \ - src/core/util/http_client/httpcli_security_connector.cc \ - src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ @@ -1534,6 +1534,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/linux) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/posix) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/windows) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr/event_engine_shims) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers) @@ -1604,7 +1605,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/android) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/http_client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/iphone) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/json) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/linux) diff --git a/config.w32 b/config.w32 index 85a32dc6704..d77e8ab6972 100644 --- a/config.w32 +++ b/config.w32 @@ -505,6 +505,10 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gprpp\\windows\\stat.cc " + "src\\core\\lib\\gprpp\\windows\\thd.cc " + "src\\core\\lib\\gprpp\\work_serializer.cc " + + "src\\core\\lib\\http\\format_request.cc " + + "src\\core\\lib\\http\\httpcli.cc " + + "src\\core\\lib\\http\\httpcli_security_connector.cc " + + "src\\core\\lib\\http\\parser.cc " + "src\\core\\lib\\iomgr\\buffer_list.cc " + "src\\core\\lib\\iomgr\\call_combiner.cc " + "src\\core\\lib\\iomgr\\cfstream_handle.cc " + @@ -797,10 +801,6 @@ if (PHP_GRPC != "no") { "src\\core\\util\\alloc.cc " + "src\\core\\util\\android\\log.cc " + "src\\core\\util\\atm.cc " + - "src\\core\\util\\http_client\\format_request.cc " + - "src\\core\\util\\http_client\\httpcli.cc " + - "src\\core\\util\\http_client\\httpcli_security_connector.cc " + - "src\\core\\util\\http_client\\parser.cc " + "src\\core\\util\\iphone\\cpu.cc " + "src\\core\\util\\json\\json_object_loader.cc " + "src\\core\\util\\json\\json_reader.cc " + @@ -1671,6 +1671,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\linux"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\posix"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\windows"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\http"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr\\event_engine_shims"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers"); @@ -1744,7 +1745,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\android"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\http_client"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\iphone"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\json"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\linux"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 90a2f3849fc..c3ff293654b 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -1008,6 +1008,10 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/httpcli_ssl_credentials.h', + 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -1305,10 +1309,6 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', - 'src/core/util/http_client/format_request.h', - 'src/core/util/http_client/httpcli.h', - 'src/core/util/http_client/httpcli_ssl_credentials.h', - 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -2283,6 +2283,10 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/httpcli_ssl_credentials.h', + 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -2580,10 +2584,6 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', - 'src/core/util/http_client/format_request.h', - 'src/core/util/http_client/httpcli.h', - 'src/core/util/http_client/httpcli_ssl_credentials.h', - 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a8cc8fdda1f..a3fa819e7cb 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1442,6 +1442,14 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/work_serializer.cc', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', + 'src/core/lib/http/format_request.cc', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.cc', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/httpcli_security_connector.cc', + 'src/core/lib/http/httpcli_ssl_credentials.h', + 'src/core/lib/http/parser.cc', + 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/buffer_list.h', @@ -2031,14 +2039,6 @@ Pod::Spec.new do |s| 'src/core/util/alloc.h', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', - 'src/core/util/http_client/format_request.cc', - 'src/core/util/http_client/format_request.h', - 'src/core/util/http_client/httpcli.cc', - 'src/core/util/http_client/httpcli.h', - 'src/core/util/http_client/httpcli_security_connector.cc', - 'src/core/util/http_client/httpcli_ssl_credentials.h', - 'src/core/util/http_client/parser.cc', - 'src/core/util/http_client/parser.h', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', @@ -3066,6 +3066,10 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/httpcli_ssl_credentials.h', + 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -3363,10 +3367,6 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', - 'src/core/util/http_client/format_request.h', - 'src/core/util/http_client/httpcli.h', - 'src/core/util/http_client/httpcli_ssl_credentials.h', - 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/grpc.gemspec b/grpc.gemspec index 5b919662d11..aaaa9738475 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1329,6 +1329,14 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/work_serializer.cc ) s.files += %w( src/core/lib/gprpp/work_serializer.h ) s.files += %w( src/core/lib/gprpp/xxhash_inline.h ) + s.files += %w( src/core/lib/http/format_request.cc ) + s.files += %w( src/core/lib/http/format_request.h ) + s.files += %w( src/core/lib/http/httpcli.cc ) + s.files += %w( src/core/lib/http/httpcli.h ) + s.files += %w( src/core/lib/http/httpcli_security_connector.cc ) + s.files += %w( src/core/lib/http/httpcli_ssl_credentials.h ) + s.files += %w( src/core/lib/http/parser.cc ) + s.files += %w( src/core/lib/http/parser.h ) s.files += %w( src/core/lib/iomgr/block_annotate.h ) s.files += %w( src/core/lib/iomgr/buffer_list.cc ) s.files += %w( src/core/lib/iomgr/buffer_list.h ) @@ -1918,14 +1926,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/alloc.h ) s.files += %w( src/core/util/android/log.cc ) s.files += %w( src/core/util/atm.cc ) - s.files += %w( src/core/util/http_client/format_request.cc ) - s.files += %w( src/core/util/http_client/format_request.h ) - s.files += %w( src/core/util/http_client/httpcli.cc ) - s.files += %w( src/core/util/http_client/httpcli.h ) - s.files += %w( src/core/util/http_client/httpcli_security_connector.cc ) - s.files += %w( src/core/util/http_client/httpcli_ssl_credentials.h ) - s.files += %w( src/core/util/http_client/parser.cc ) - s.files += %w( src/core/util/http_client/parser.h ) s.files += %w( src/core/util/iphone/cpu.cc ) s.files += %w( src/core/util/json/json.h ) s.files += %w( src/core/util/json/json_args.h ) diff --git a/package.xml b/package.xml index d1778bf0607..5dee87fa874 100644 --- a/package.xml +++ b/package.xml @@ -1311,6 +1311,14 @@ + + + + + + + + @@ -1900,14 +1908,6 @@ - - - - - - - - diff --git a/src/core/BUILD b/src/core/BUILD index 830376847ef..480e3f9431b 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -4420,10 +4420,10 @@ grpc_cc_library( grpc_cc_library( name = "httpcli_ssl_credentials", srcs = [ - "util/http_client/httpcli_security_connector.cc", + "lib/http/httpcli_security_connector.cc", ], hdrs = [ - "util/http_client/httpcli_ssl_credentials.h", + "lib/http/httpcli_ssl_credentials.h", ], external_deps = [ "absl/log:log", diff --git a/src/core/ext/gcp/metadata_query.h b/src/core/ext/gcp/metadata_query.h index 395c1e6d995..9e3f6931da5 100644 --- a/src/core/ext/gcp/metadata_query.h +++ b/src/core/ext/gcp/metadata_query.h @@ -26,11 +26,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 90cfdf3ad5e..118b1f99488 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -82,6 +82,7 @@ #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -107,7 +108,6 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/telemetry/tcp_tracer.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/handshaker/http_connect/http_connect_handshaker.cc b/src/core/handshaker/http_connect/http_connect_handshaker.cc index 30773fe99b4..32d218e06ea 100644 --- a/src/core/handshaker/http_connect/http_connect_handshaker.cc +++ b/src/core/handshaker/http_connect/http_connect_handshaker.cc @@ -44,14 +44,14 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/http/format_request.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/util/http_client/format_request.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" namespace grpc_core { diff --git a/src/core/util/http_client/format_request.cc b/src/core/lib/http/format_request.cc similarity index 97% rename from src/core/util/http_client/format_request.cc rename to src/core/lib/http/format_request.cc index 1d785835e2b..d358a57f5bc 100644 --- a/src/core/util/http_client/format_request.cc +++ b/src/core/lib/http/format_request.cc @@ -16,9 +16,7 @@ // // -#include - -#include "src/core/util/http_client/format_request.h" +#include "src/core/lib/http/format_request.h" #include #include @@ -33,8 +31,9 @@ #include "absl/strings/string_view.h" #include +#include -#include "src/core/util/http_client/httpcli.h" +#include "src/core/lib/http/httpcli.h" static void fill_common_header(const grpc_http_request* request, const char* host, const char* path, diff --git a/src/core/util/http_client/format_request.h b/src/core/lib/http/format_request.h similarity index 86% rename from src/core/util/http_client/format_request.h rename to src/core/lib/http/format_request.h index ab9d6a9d7d5..a9e76643556 100644 --- a/src/core/util/http_client/format_request.h +++ b/src/core/lib/http/format_request.h @@ -16,14 +16,13 @@ // // -#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H -#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H - -#include +#ifndef GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#define GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H #include +#include -#include "src/core/util/http_client/parser.h" +#include "src/core/lib/http/parser.h" grpc_slice grpc_httpcli_format_get_request(const grpc_http_request* request, const char* host, const char* path); @@ -35,4 +34,4 @@ grpc_slice grpc_httpcli_format_connect_request(const grpc_http_request* request, const char* host, const char* path); -#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H +#endif // GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H diff --git a/src/core/util/http_client/httpcli.cc b/src/core/lib/http/httpcli.cc similarity index 99% rename from src/core/util/http_client/httpcli.cc rename to src/core/lib/http/httpcli.cc index 2771787dd00..ee2a5ad528d 100644 --- a/src/core/util/http_client/httpcli.cc +++ b/src/core/lib/http/httpcli.cc @@ -16,9 +16,7 @@ // // -#include - -#include "src/core/util/http_client/httpcli.h" +#include "src/core/lib/http/httpcli.h" #include @@ -34,6 +32,7 @@ #include #include #include +#include #include "src/core/handshaker/handshaker_registry.h" #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" @@ -42,6 +41,8 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/gprpp/status_helper.h" +#include "src/core/lib/http/format_request.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -51,8 +52,6 @@ #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/error_utils.h" -#include "src/core/util/http_client/format_request.h" -#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/util/http_client/httpcli.h b/src/core/lib/http/httpcli.h similarity index 98% rename from src/core/util/http_client/httpcli.h rename to src/core/lib/http/httpcli.h index 2ad2810f027..960b46d16c3 100644 --- a/src/core/util/http_client/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -16,10 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H -#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H - -#include +#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H +#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H #include @@ -34,6 +32,7 @@ #include #include +#include #include "src/core/handshaker/handshaker.h" #include "src/core/lib/gprpp/debug_location.h" @@ -41,6 +40,7 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -52,7 +52,6 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/parser.h" // User agent this library reports #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" @@ -265,4 +264,4 @@ class HttpRequest : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H +#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H diff --git a/src/core/util/http_client/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc similarity index 99% rename from src/core/util/http_client/httpcli_security_connector.cc rename to src/core/lib/http/httpcli_security_connector.cc index ac0c1adb257..7db2021b71c 100644 --- a/src/core/util/http_client/httpcli_security_connector.cc +++ b/src/core/lib/http/httpcli_security_connector.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -34,6 +32,7 @@ #include #include #include +#include #include #include "src/core/handshaker/handshaker.h" diff --git a/src/core/util/http_client/httpcli_ssl_credentials.h b/src/core/lib/http/httpcli_ssl_credentials.h similarity index 85% rename from src/core/util/http_client/httpcli_ssl_credentials.h rename to src/core/lib/http/httpcli_ssl_credentials.h index 45364c64a46..dc6182a0779 100644 --- a/src/core/util/http_client/httpcli_ssl_credentials.h +++ b/src/core/lib/http/httpcli_ssl_credentials.h @@ -14,12 +14,11 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H -#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H - -#include +#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H +#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H #include +#include #include "src/core/lib/gprpp/ref_counted_ptr.h" @@ -36,4 +35,4 @@ RefCountedPtr CreateHttpRequestSSLCredentials(); } // namespace grpc_core -#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H +#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H diff --git a/src/core/util/http_client/parser.cc b/src/core/lib/http/parser.cc similarity index 99% rename from src/core/util/http_client/parser.cc rename to src/core/lib/http/parser.cc index c344f438cf3..aad7963f1d7 100644 --- a/src/core/util/http_client/parser.cc +++ b/src/core/lib/http/parser.cc @@ -16,9 +16,7 @@ // // -#include - -#include "src/core/util/http_client/parser.h" +#include "src/core/lib/http/parser.h" #include @@ -29,6 +27,7 @@ #include #include +#include grpc_core::TraceFlag grpc_http1_trace(false, "http1"); diff --git a/src/core/util/http_client/parser.h b/src/core/lib/http/parser.h similarity index 96% rename from src/core/util/http_client/parser.h rename to src/core/lib/http/parser.h index cfd1ed7ab3a..e9a1088b85f 100644 --- a/src/core/util/http_client/parser.h +++ b/src/core/lib/http/parser.h @@ -16,15 +16,14 @@ // // -#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H -#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H - -#include +#ifndef GRPC_SRC_CORE_LIB_HTTP_PARSER_H +#define GRPC_SRC_CORE_LIB_HTTP_PARSER_H #include #include #include +#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" @@ -127,4 +126,4 @@ void grpc_http_response_destroy(grpc_http_response* response); extern grpc_core::TraceFlag grpc_http1_trace; -#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H +#endif // GRPC_SRC_CORE_LIB_HTTP_PARSER_H diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index 27d1b88ef1a..06122b04a81 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -39,10 +39,10 @@ #include #include "src/core/lib/gprpp/env.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index c7dc1f166c3..50e7d86b58b 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -28,11 +28,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc index f7fd5a805e1..f604d1e9815 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/external_account_credentials.cc @@ -46,14 +46,14 @@ #include #include "src/core/lib/gprpp/status_helper.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" #include "src/core/lib/security/credentials/external/url_external_account_credentials.h" #include "src/core/lib/security/util/json_util.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h index f0023ab878e..c194fd60163 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.h +++ b/src/core/lib/security/credentials/external/external_account_credentials.h @@ -30,12 +30,12 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc index b2a5359c596..cf9d646e579 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc @@ -37,11 +37,11 @@ #include #include +#include "src/core/lib/http/httpcli_ssl_credentials.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/error_utils.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index 209e652a15c..6a5f00cd23b 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -28,10 +28,10 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/http/httpcli.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 3e6b843b972..86602f6c519 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -49,6 +49,8 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -68,8 +70,6 @@ #include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/load_balancing/xds/xds_channel_args.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index e88b909696f..02a7c548e98 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -58,6 +58,9 @@ #include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -68,9 +71,6 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/uri/uri_parser.h" #include "src/core/tsi/ssl_types.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 834dae28305..313485e53d6 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -51,6 +51,7 @@ #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/context.h" @@ -61,7 +62,6 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 199f35f33c8..5144905284b 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -37,6 +37,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -46,8 +48,6 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/useful.h" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 3ed50fe703b..d04415e7801 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -514,6 +514,10 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gprpp/windows/stat.cc', 'src/core/lib/gprpp/windows/thd.cc', 'src/core/lib/gprpp/work_serializer.cc', + 'src/core/lib/http/format_request.cc', + 'src/core/lib/http/httpcli.cc', + 'src/core/lib/http/httpcli_security_connector.cc', + 'src/core/lib/http/parser.cc', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/call_combiner.cc', 'src/core/lib/iomgr/cfstream_handle.cc', @@ -806,10 +810,6 @@ CORE_SOURCE_FILES = [ 'src/core/util/alloc.cc', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', - 'src/core/util/http_client/format_request.cc', - 'src/core/util/http_client/httpcli.cc', - 'src/core/util/http_client/httpcli_security_connector.cc', - 'src/core/util/http_client/parser.cc', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json_object_loader.cc', 'src/core/util/json/json_reader.cc', diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index ac9acc9ffb4..3eca777e098 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -51,6 +51,7 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -64,7 +65,6 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/util/http_client/parser.h" #include "test/core/test_util/port.h" struct grpc_end2end_http_proxy { diff --git a/test/core/http/format_request_test.cc b/test/core/http/format_request_test.cc index 31c73d88100..f242221d971 100644 --- a/test/core/http/format_request_test.cc +++ b/test/core/http/format_request_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/util/http_client/format_request.h" +#include "src/core/lib/http/format_request.h" #include @@ -24,8 +24,8 @@ #include "gtest/gtest.h" +#include "src/core/lib/http/httpcli.h" #include "src/core/lib/slice/slice_internal.h" -#include "src/core/util/http_client/httpcli.h" #include "test/core/test_util/test_config.h" TEST(FormatRequestTest, FormatGetRequest) { diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index e63cbfe4f22..773ee18ed08 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/util/http_client/httpcli.h" +#include "src/core/lib/http/httpcli.h" #include #include diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 4c15ea82dcf..8bdf220bee2 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -47,6 +47,9 @@ #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/time_util.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -55,9 +58,6 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" -#include "src/core/util/http_client/parser.h" #include "src/core/util/subprocess.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" diff --git a/test/core/http/parser_test.cc b/test/core/http/parser_test.cc index 4e3f508338a..183dc9eeae3 100644 --- a/test/core/http/parser_test.cc +++ b/test/core/http/parser_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/util/http_client/parser.h" +#include "src/core/lib/http/parser.h" #include #include diff --git a/test/core/http/request_fuzzer.cc b/test/core/http/request_fuzzer.cc index 7ca890c7e01..2272d0427e3 100644 --- a/test/core/http/request_fuzzer.cc +++ b/test/core/http/request_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/util/http_client/parser.h" +#include "src/core/lib/http/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/http/response_fuzzer.cc b/test/core/http/response_fuzzer.cc index e2cadb79eb8..8310028c455 100644 --- a/test/core/http/response_fuzzer.cc +++ b/test/core/http/response_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/util/http_client/parser.h" +#include "src/core/lib/http/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 241baff1d04..35e1aad2be8 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -47,6 +47,8 @@ #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/promise.h" @@ -67,8 +69,6 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" #include "src/core/util/tmpfile.h" diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index 792fbe670cf..5387edf9451 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -31,8 +31,8 @@ #include #include "src/core/lib/gprpp/crash.h" +#include "src/core/lib/http/httpcli.h" #include "src/core/lib/security/credentials/jwt/json_token.h" -#include "src/core/util/http_client/httpcli.h" #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/port_server_client.cc b/test/core/test_util/port_server_client.cc index 2f59e1c473b..cbd83fcb046 100644 --- a/test/core/test_util/port_server_client.cc +++ b/test/core/test_util/port_server_client.cc @@ -44,6 +44,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -52,8 +54,6 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" -#include "src/core/util/http_client/httpcli.h" -#include "src/core/util/http_client/parser.h" typedef struct freereq { gpr_mu* mu = nullptr; diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index c3428fdd3a1..1a40d6aa032 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -2328,6 +2328,14 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ +src/core/lib/http/format_request.cc \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.cc \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/httpcli_security_connector.cc \ +src/core/lib/http/httpcli_ssl_credentials.h \ +src/core/lib/http/parser.cc \ +src/core/lib/http/parser.h \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/buffer_list.h \ @@ -2917,14 +2925,6 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ -src/core/util/http_client/format_request.cc \ -src/core/util/http_client/format_request.h \ -src/core/util/http_client/httpcli.cc \ -src/core/util/http_client/httpcli.h \ -src/core/util/http_client/httpcli_security_connector.cc \ -src/core/util/http_client/httpcli_ssl_credentials.h \ -src/core/util/http_client/parser.cc \ -src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1439a0c8d46..96df93bf306 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -2101,6 +2101,14 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ +src/core/lib/http/format_request.cc \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.cc \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/httpcli_security_connector.cc \ +src/core/lib/http/httpcli_ssl_credentials.h \ +src/core/lib/http/parser.cc \ +src/core/lib/http/parser.h \ src/core/lib/iomgr/README.md \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ @@ -2699,14 +2707,6 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ -src/core/util/http_client/format_request.cc \ -src/core/util/http_client/format_request.h \ -src/core/util/http_client/httpcli.cc \ -src/core/util/http_client/httpcli.h \ -src/core/util/http_client/httpcli_security_connector.cc \ -src/core/util/http_client/httpcli_ssl_credentials.h \ -src/core/util/http_client/parser.cc \ -src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ From 39afbf49f275a501753c2c81d90c8e759b0d1c0d Mon Sep 17 00:00:00 2001 From: Paulo Castello da Costa Date: Thu, 30 May 2024 09:17:48 -0700 Subject: [PATCH 14/20] [benchmark] Disable benchmarks for dotnet in CI. (#36759) Build is failing, so temporarily removing dotnet from benchmarks CI. Closes #36759 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36759 from paulosjca:dotnet 71337a07550b0a2dacd06c30f47a15adca28d330 PiperOrigin-RevId: 638676595 --- tools/internal_ci/linux/grpc_e2e_performance_gke.sh | 6 +++--- .../linux/grpc_e2e_performance_gke_experiment.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/internal_ci/linux/grpc_e2e_performance_gke.sh b/tools/internal_ci/linux/grpc_e2e_performance_gke.sh index 15951cccc75..a8da8a9fae6 100755 --- a/tools/internal_ci/linux/grpc_e2e_performance_gke.sh +++ b/tools/internal_ci/linux/grpc_e2e_performance_gke.sh @@ -131,9 +131,9 @@ configLangArgs32core+=( -l c++ ) runnerLangArgs+=( -l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}" ) # dotnet -configLangArgs8core+=( -l dotnet ) -configLangArgs32core+=( -l dotnet ) -runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) +# configLangArgs8core+=( -l dotnet ) +# configLangArgs32core+=( -l dotnet ) +# runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) # # go configLangArgs8core+=( -l go ) diff --git a/tools/internal_ci/linux/grpc_e2e_performance_gke_experiment.sh b/tools/internal_ci/linux/grpc_e2e_performance_gke_experiment.sh index f62d9920b72..c3b99af80eb 100755 --- a/tools/internal_ci/linux/grpc_e2e_performance_gke_experiment.sh +++ b/tools/internal_ci/linux/grpc_e2e_performance_gke_experiment.sh @@ -125,9 +125,9 @@ configLangArgs32core+=( -l c++ ) runnerLangArgs+=( -l "cxx:${GRPC_CORE_REPO}:${GRPC_CORE_COMMIT}" ) # dotnet -configLangArgs8core+=( -l dotnet ) -configLangArgs32core+=( -l dotnet ) -runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) +# configLangArgs8core+=( -l dotnet ) +# configLangArgs32core+=( -l dotnet ) +# runnerLangArgs+=( -l "dotnet:${GRPC_DOTNET_REPO}:${GRPC_DOTNET_COMMIT}" ) # # go configLangArgs8core+=( -l go ) From 1a96ce76207f5a70f43842d554a07fc84f890536 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Thu, 30 May 2024 09:34:07 -0700 Subject: [PATCH 15/20] [Python AIO] Return EOF from UnaryStreamCall.read() as documented (#36660) Fix: https://github.com/grpc/grpc/issues/36581 Based on our documentation, we should return `grpc.aio.EOF` to indicate the end of the stream: https://github.com/grpc/grpc/blob/fb6a57b153c1290c08028cd909d759fcd393ff22/src/python/grpcio/grpc/aio/_base_call.py#L166-L178 But if the call was intercepted, we're raising `StopAsyncIteration`, This Pr changes the return to match the documentation (Which is also the behavior for non-intercepted call). Closes #36660 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36660 from XuanWang-Amos:fix_aio_read_return 4b679ba4295fee549d9a81d66062636390cc9a02 PiperOrigin-RevId: 638681673 --- src/python/grpcio/grpc/aio/_call.py | 13 ++++- src/python/grpcio/grpc/aio/_interceptor.py | 12 +++-- .../client_unary_stream_interceptor_test.py | 48 +++++++++++++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio/grpc/aio/_call.py b/src/python/grpcio/grpc/aio/_call.py index 82b0d3ce522..24f2090651a 100644 --- a/src/python/grpcio/grpc/aio/_call.py +++ b/src/python/grpcio/grpc/aio/_call.py @@ -19,7 +19,15 @@ from functools import partial import inspect import logging import traceback -from typing import Any, AsyncIterator, Generator, Generic, Optional, Tuple +from typing import ( + Any, + AsyncIterator, + Generator, + Generic, + Optional, + Tuple, + Union, +) import grpc from grpc import _common @@ -29,6 +37,7 @@ from . import _base_call from ._metadata import Metadata from ._typing import DeserializingFunction from ._typing import DoneCallbackType +from ._typing import EOFType from ._typing import MetadatumType from ._typing import RequestIterableType from ._typing import RequestType @@ -380,7 +389,7 @@ class _StreamResponseMixin(Call): raw_response, self._response_deserializer ) - async def read(self) -> ResponseType: + async def read(self) -> Union[EOFType, ResponseType]: if self.done(): await self._raise_for_status() return cygrpc.EOF diff --git a/src/python/grpcio/grpc/aio/_interceptor.py b/src/python/grpcio/grpc/aio/_interceptor.py index e7ceb00fbbf..1401a08ee4c 100644 --- a/src/python/grpcio/grpc/aio/_interceptor.py +++ b/src/python/grpcio/grpc/aio/_interceptor.py @@ -43,6 +43,7 @@ from ._call import _RPC_HALF_CLOSED_DETAILS from ._metadata import Metadata from ._typing import DeserializingFunction from ._typing import DoneCallbackType +from ._typing import EOFType from ._typing import RequestIterableType from ._typing import RequestType from ._typing import ResponseIterableType @@ -494,12 +495,15 @@ class _InterceptedStreamResponseMixin: ) return self._response_aiter - async def read(self) -> ResponseType: + async def read(self) -> Union[EOFType, ResponseType]: if self._response_aiter is None: self._response_aiter = ( self._wait_for_interceptor_task_response_iterator() ) - return await self._response_aiter.asend(None) + try: + return await self._response_aiter.asend(None) + except StopAsyncIteration: + return cygrpc.EOF class _InterceptedStreamRequestMixin: @@ -1141,7 +1145,7 @@ class UnaryStreamCallResponseIterator( ): """UnaryStreamCall class wich uses an alternative response iterator.""" - async def read(self) -> ResponseType: + async def read(self) -> Union[EOFType, ResponseType]: # Behind the scenes everyting goes through the # async iterator. So this path should not be reached. raise NotImplementedError() @@ -1152,7 +1156,7 @@ class StreamStreamCallResponseIterator( ): """StreamStreamCall class wich uses an alternative response iterator.""" - async def read(self) -> ResponseType: + async def read(self) -> Union[EOFType, ResponseType]: # Behind the scenes everyting goes through the # async iterator. So this path should not be reached. raise NotImplementedError() diff --git a/src/python/grpcio_tests/tests_aio/unit/client_unary_stream_interceptor_test.py b/src/python/grpcio_tests/tests_aio/unit/client_unary_stream_interceptor_test.py index c86cb36b02b..5f6bdd50f44 100644 --- a/src/python/grpcio_tests/tests_aio/unit/client_unary_stream_interceptor_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/client_unary_stream_interceptor_test.py @@ -223,6 +223,54 @@ class TestUnaryStreamClientInterceptor(AioTestBase): await channel.close() + async def test_too_many_reads(self): + for interceptor_class in ( + [_UnaryStreamInterceptorEmpty], + [_UnaryStreamInterceptorWithResponseIterator], + [], + ): + with self.subTest(name=interceptor_class): + if interceptor_class: + interceptor = interceptor_class[0]() + channel = aio.insecure_channel( + self._server_target, interceptors=[interceptor] + ) + else: + channel = aio.insecure_channel(self._server_target) + stub = test_pb2_grpc.TestServiceStub(channel) + + request = messages_pb2.StreamingOutputCallRequest() + request.response_parameters.extend( + [ + messages_pb2.ResponseParameters( + size=_RESPONSE_PAYLOAD_SIZE + ) + ] + * _NUM_STREAM_RESPONSES + ) + + call = stub.StreamingOutputCall(request) + + response_cnt = 0 + for response in range(_NUM_STREAM_RESPONSES): + response = await call.read() + response_cnt += 1 + self.assertIs( + type(response), messages_pb2.StreamingOutputCallResponse + ) + self.assertEqual( + _RESPONSE_PAYLOAD_SIZE, len(response.payload.body) + ) + + # Additional read() should return EOF + self.assertIs(await call.read(), aio.EOF) + + self.assertEqual(await call.code(), grpc.StatusCode.OK) + # After the RPC finished, the read should also produce EOF + self.assertIs(await call.read(), aio.EOF) + + await channel.close() + async def test_multiple_interceptors_response_iterator(self): for interceptor_class in ( _UnaryStreamInterceptorEmpty, From 4423bfd0c68d6244c5fd08bc7dee57750568f2ca Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 May 2024 11:31:49 -0700 Subject: [PATCH 16/20] [dual-ref-counted] Add tuning knobs per RefCounted (#36754) Imbue `DualRefCounted` with the same customization arguments as `RefCounted`. Closes #36754 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36754 from ctiller:duality 24e7755287e5f42001e9314d8588bba2aca5e9c5 PiperOrigin-RevId: 638724845 --- src/core/BUILD | 1 + src/core/lib/gprpp/dual_ref_counted.h | 18 +++++++---- test/core/gprpp/dual_ref_counted_test.cc | 38 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/src/core/BUILD b/src/core/BUILD index 480e3f9431b..77b6dccd7a5 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -1236,6 +1236,7 @@ grpc_cc_library( public_hdrs = ["lib/gprpp/dual_ref_counted.h"], deps = [ "down_cast", + "ref_counted", "//:debug_location", "//:gpr", "//:orphanable", diff --git a/src/core/lib/gprpp/dual_ref_counted.h b/src/core/lib/gprpp/dual_ref_counted.h index 5641b0970d4..38365db381b 100644 --- a/src/core/lib/gprpp/dual_ref_counted.h +++ b/src/core/lib/gprpp/dual_ref_counted.h @@ -28,6 +28,7 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/down_cast.h" #include "src/core/lib/gprpp/orphanable.h" +#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" namespace grpc_core { @@ -46,15 +47,16 @@ namespace grpc_core { // // This will be used by CRTP (curiously-recurring template pattern), e.g.: // class MyClass : public RefCounted { ... }; -template -class DualRefCounted { +// +// Impl & UnrefBehavior are as per RefCounted. +template +class DualRefCounted : public Impl { public: // Not copyable nor movable. DualRefCounted(const DualRefCounted&) = delete; DualRefCounted& operator=(const DualRefCounted&) = delete; - virtual ~DualRefCounted() = default; - GRPC_MUST_USE_RESULT RefCountedPtr Ref() { IncrementRefCount(); return RefCountedPtr(static_cast(this)); @@ -215,7 +217,7 @@ class DualRefCounted { CHECK_GT(weak_refs, 0u); #endif if (GPR_UNLIKELY(prev_ref_pair == MakeRefPair(0, 1))) { - delete static_cast(this); + unref_behavior_(static_cast(this)); } } void WeakUnref(const DebugLocation& location, const char* reason) { @@ -242,7 +244,7 @@ class DualRefCounted { (void)reason; #endif if (GPR_UNLIKELY(prev_ref_pair == MakeRefPair(0, 1))) { - delete static_cast(this); + unref_behavior_(static_cast(this)); } } @@ -266,6 +268,9 @@ class DualRefCounted { // Ref count has dropped to zero, so the object is now orphaned. virtual void Orphaned() = 0; + // Note: Depending on the Impl used, this dtor can be implicitly virtual. + ~DualRefCounted() = default; + private: // Allow RefCountedPtr<> to access IncrementRefCount(). template @@ -358,6 +363,7 @@ class DualRefCounted { const char* trace_; #endif std::atomic refs_{0}; + GPR_NO_UNIQUE_ADDRESS UnrefBehavior unref_behavior_; }; } // namespace grpc_core diff --git a/test/core/gprpp/dual_ref_counted_test.cc b/test/core/gprpp/dual_ref_counted_test.cc index f34a3b8949b..1f7cf80e41d 100644 --- a/test/core/gprpp/dual_ref_counted_test.cc +++ b/test/core/gprpp/dual_ref_counted_test.cc @@ -21,6 +21,8 @@ #include "absl/log/check.h" #include "gtest/gtest.h" +#include "src/core/lib/gprpp/manual_constructor.h" +#include "src/core/lib/gprpp/ref_counted.h" #include "test/core/test_util/test_config.h" namespace grpc_core { @@ -115,6 +117,42 @@ TEST(DualRefCountedWithTracing, Basic) { foo->Unref(DEBUG_LOCATION, "original_ref"); } +class FooWithNoDelete final + : public DualRefCounted { + public: + FooWithNoDelete(bool* orphaned_called, bool* destructor_called) + : DualRefCounted( + "FooWithNoDelete"), + orphaned_called_(orphaned_called), + destructor_called_(destructor_called) {} + ~FooWithNoDelete() { *destructor_called_ = true; } + + void Orphaned() override { *orphaned_called_ = true; } + + private: + bool* const orphaned_called_; + bool* const destructor_called_; +}; + +TEST(DualRefCountedWithNoDelete, Basic) { + ManualConstructor foo; + bool destructor_called = false; + bool orphaned_called = false; + foo.Init(&orphaned_called, &destructor_called); + EXPECT_FALSE(orphaned_called); + EXPECT_FALSE(destructor_called); + foo->WeakRef().release(); + EXPECT_FALSE(orphaned_called); + EXPECT_FALSE(destructor_called); + foo->Unref(); + EXPECT_TRUE(orphaned_called); + EXPECT_FALSE(destructor_called); + foo->WeakUnref(); + EXPECT_TRUE(orphaned_called); + EXPECT_TRUE(destructor_called); +} + } // namespace } // namespace testing } // namespace grpc_core From 53c42e9daeb2aba26d4abf159ae5b94574c2d877 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 May 2024 13:40:01 -0700 Subject: [PATCH 17/20] [arena] Make arena refcounted (#36758) Make `Arena` be a refcounted object. Solves a bunch of issues: our stack right now needs a very complicated dance between transport and surface to destroy a call, but with this scheme we can just hold a ref to what we need in each place and everything works out. Removes some `ifdef`'d out code that had been sitting dormant for a year or two also -- I'd left it in as a hedge against it being maybe a bad idea, but it looks like it's not needed. Closes #36758 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36758 from ctiller:arena-counting d1b672fe30cd9c3ad4c20a05dbdc1969cb2804ef PiperOrigin-RevId: 638767768 --- CMakeLists.txt | 3 + build_autogenerated.yaml | 7 + src/core/BUILD | 1 + src/core/client_channel/client_channel.cc | 11 +- src/core/client_channel/client_channel.h | 2 - .../subchannel_stream_client.cc | 9 +- .../client_channel/subchannel_stream_client.h | 4 +- .../client/chaotic_good_connector.cc | 2 +- .../client/chaotic_good_connector.h | 5 +- .../chaotic_good/client_transport.cc | 7 +- .../server/chaotic_good_server.cc | 6 +- .../chaotic_good/server/chaotic_good_server.h | 11 +- .../chaotic_good/server_transport.cc | 7 +- .../ext/transport/inproc/inproc_transport.cc | 6 +- src/core/lib/promise/activity.h | 25 +- src/core/lib/resource_quota/arena.cc | 109 +++----- src/core/lib/resource_quota/arena.h | 253 +++--------------- src/core/lib/surface/call.cc | 47 ++-- src/core/lib/surface/channel.cc | 20 +- src/core/lib/surface/channel.h | 11 +- src/core/lib/transport/call_arena_allocator.h | 16 +- src/core/lib/transport/call_spine.cc | 12 +- src/core/lib/transport/call_spine.h | 46 ++-- src/core/lib/transport/interception_chain.cc | 2 +- test/core/call/yodel/yodel_test.h | 5 +- test/core/channel/call_finalization_test.cc | 4 +- .../connected_subchannel_test.cc | 11 +- .../load_balanced_call_destination_test.cc | 6 +- test/core/filters/filter_test.cc | 3 +- test/core/filters/filter_test.h | 9 +- test/core/gprpp/chunked_vector_fuzzer.cc | 2 +- test/core/gprpp/chunked_vector_test.cc | 30 +-- test/core/promise/arena_promise_test.cc | 26 +- test/core/promise/for_each_test.cc | 20 +- test/core/promise/interceptor_list_test.cc | 4 +- test/core/promise/map_pipe_test.cc | 14 +- test/core/promise/pipe_test.cc | 64 ++--- test/core/resource_quota/arena_test.cc | 78 ++---- test/core/security/credentials_test.cc | 4 +- test/core/security/oauth2_utils.cc | 6 +- test/core/surface/channel_init_test.cc | 2 +- test/core/telemetry/call_tracer_test.cc | 21 +- .../transport/binder/binder_transport_test.cc | 23 +- test/core/transport/call_filters_test.cc | 60 ++--- .../client_transport_error_test.cc | 3 +- .../transport/chaotic_good/frame_fuzzer.cc | 4 +- .../core/transport/chaotic_good/frame_test.cc | 2 +- .../transport/chaotic_good/transport_test.h | 7 +- .../transport/chttp2/hpack_encoder_test.cc | 17 -- .../chttp2/hpack_parser_fuzzer_test.cc | 2 +- .../chttp2/hpack_parser_input_size_fuzzer.cc | 4 +- .../transport/chttp2/hpack_parser_test.cc | 4 - .../transport/chttp2/hpack_sync_fuzzer.cc | 4 - .../core/transport/interception_chain_test.cc | 3 +- test/core/transport/metadata_map_test.cc | 28 +- test/cpp/microbenchmarks/bm_arena.cc | 42 +-- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 32 --- 57 files changed, 342 insertions(+), 824 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28872783538..c30ffda6257 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8535,8 +8535,11 @@ add_executable(call_filters_test src/core/lib/promise/activity.cc src/core/lib/promise/trace.cc src/core/lib/resource_quota/arena.cc + src/core/lib/resource_quota/connection_quota.cc src/core/lib/resource_quota/memory_quota.cc src/core/lib/resource_quota/periodic_update.cc + src/core/lib/resource_quota/resource_quota.cc + src/core/lib/resource_quota/thread_quota.cc src/core/lib/resource_quota/trace.cc src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index b2d77583ecf..b17bdd226ea 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -6393,6 +6393,7 @@ targets: - src/core/lib/gprpp/atomic_utils.h - src/core/lib/gprpp/bitset.h - src/core/lib/gprpp/chunked_vector.h + - src/core/lib/gprpp/cpp_impl_of.h - src/core/lib/gprpp/down_cast.h - src/core/lib/gprpp/dual_ref_counted.h - src/core/lib/gprpp/dump_args.h @@ -6432,8 +6433,11 @@ targets: - src/core/lib/promise/status_flag.h - src/core/lib/promise/trace.h - src/core/lib/resource_quota/arena.h + - src/core/lib/resource_quota/connection_quota.h - src/core/lib/resource_quota/memory_quota.h - src/core/lib/resource_quota/periodic_update.h + - src/core/lib/resource_quota/resource_quota.h + - src/core/lib/resource_quota/thread_quota.h - src/core/lib/resource_quota/trace.h - src/core/lib/slice/percent_encoding.h - src/core/lib/slice/slice.h @@ -6499,8 +6503,11 @@ targets: - src/core/lib/promise/activity.cc - src/core/lib/promise/trace.cc - src/core/lib/resource_quota/arena.cc + - src/core/lib/resource_quota/connection_quota.cc - src/core/lib/resource_quota/memory_quota.cc - src/core/lib/resource_quota/periodic_update.cc + - src/core/lib/resource_quota/resource_quota.cc + - src/core/lib/resource_quota/thread_quota.cc - src/core/lib/resource_quota/trace.cc - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc diff --git a/src/core/BUILD b/src/core/BUILD index 77b6dccd7a5..99ce258ea65 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -1489,6 +1489,7 @@ grpc_cc_library( "context", "event_engine_memory_allocator", "memory_quota", + "resource_quota", "//:gpr", ], ) diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc index 77de1ab121d..5395efce7b9 100644 --- a/src/core/client_channel/client_channel.cc +++ b/src/core/client_channel/client_channel.cc @@ -653,11 +653,6 @@ ClientChannel::ClientChannel( default_authority_( GetDefaultAuthorityFromChannelArgs(channel_args_, this->target())), channelz_node_(channel_args_.GetObject()), - call_arena_allocator_(MakeRefCounted( - channel_args_.GetObject() - ->memory_quota() - ->CreateMemoryAllocator("client_channel"), - 1024)), idle_timeout_(GetClientIdleTimeout(channel_args_)), resolver_data_for_calls_(ResolverDataForCalls{}), picker_(nullptr), @@ -825,9 +820,9 @@ CallInitiator ClientChannel::CreateCall( // Exit IDLE if needed. CheckConnectivityState(/*try_to_connect=*/true); // Create an initiator/unstarted-handler pair. - auto call = MakeCallPair( - std::move(client_initial_metadata), event_engine_.get(), - call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + auto call = + MakeCallPair(std::move(client_initial_metadata), event_engine_.get(), + call_arena_allocator()->MakeArena(), nullptr); // Spawn a promise to wait for the resolver result. // This will eventually start the call. call.initiator.SpawnGuardedUntilCallCompletes( diff --git a/src/core/client_channel/client_channel.h b/src/core/client_channel/client_channel.h index 77d26f34e95..abe53bbf689 100644 --- a/src/core/client_channel/client_channel.h +++ b/src/core/client_channel/client_channel.h @@ -179,8 +179,6 @@ class ClientChannel : public Channel { ClientChannelFactory* const client_channel_factory_; const std::string default_authority_; channelz::ChannelNode* const channelz_node_; - // TODO(ctiller): unify with Channel - const RefCountedPtr call_arena_allocator_; GlobalStatsPluginRegistry::StatsPluginGroup stats_plugin_group_; // diff --git a/src/core/client_channel/subchannel_stream_client.cc b/src/core/client_channel/subchannel_stream_client.cc index 2ee082ef1fa..ab3118d4442 100644 --- a/src/core/client_channel/subchannel_stream_client.cc +++ b/src/core/client_channel/subchannel_stream_client.cc @@ -59,12 +59,13 @@ SubchannelStreamClient::SubchannelStreamClient( connected_subchannel_(std::move(connected_subchannel)), interested_parties_(interested_parties), tracer_(tracer), - call_allocator_( + call_allocator_(MakeRefCounted( connected_subchannel_->args() .GetObject() ->memory_quota() ->CreateMemoryAllocator( - (tracer != nullptr) ? tracer : "SubchannelStreamClient")), + (tracer != nullptr) ? tracer : "SubchannelStreamClient"), + 1024)), event_handler_(std::move(event_handler)), retry_backoff_( BackOff::Options() @@ -171,9 +172,7 @@ SubchannelStreamClient::CallState::CallState( grpc_pollset_set* interested_parties) : subchannel_stream_client_(std::move(health_check_client)), pollent_(grpc_polling_entity_create_from_pollset_set(interested_parties)), - arena_(Arena::Create(subchannel_stream_client_->connected_subchannel_ - ->GetInitialCallSizeEstimate(), - &subchannel_stream_client_->call_allocator_)), + arena_(subchannel_stream_client_->call_allocator_->MakeArena()), payload_(context_) {} SubchannelStreamClient::CallState::~CallState() { diff --git a/src/core/client_channel/subchannel_stream_client.h b/src/core/client_channel/subchannel_stream_client.h index 38d25c755d3..d84f4b3cc1f 100644 --- a/src/core/client_channel/subchannel_stream_client.h +++ b/src/core/client_channel/subchannel_stream_client.h @@ -146,7 +146,7 @@ class SubchannelStreamClient final RefCountedPtr subchannel_stream_client_; grpc_polling_entity pollent_; - ScopedArenaPtr arena_; + RefCountedPtr arena_; CallCombiner call_combiner_; grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {}; @@ -201,7 +201,7 @@ class SubchannelStreamClient final RefCountedPtr connected_subchannel_; grpc_pollset_set* interested_parties_; // Do not own. const char* tracer_; - MemoryAllocator call_allocator_; + RefCountedPtr call_allocator_; Mutex mu_; std::unique_ptr event_handler_ ABSL_GUARDED_BY(mu_); diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc index d22d3bbb02c..a5cf2893951 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc @@ -333,7 +333,7 @@ void ChaoticGoodConnector::OnHandshakeDone(void* arg, grpc_error_handle error) { status); } }, - self->arena_.get(), self->event_engine_.get()); + self->arena_, self->event_engine_.get()); MutexLock lock(&self->mu_); if (!self->is_shutdown_) { self->connect_activity_ = std::move(activity); diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h index 90b4abff267..b8db7a52502 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h @@ -79,10 +79,7 @@ class ChaoticGoodConnector : public SubchannelConnector { RefCountedPtr self); static void OnHandshakeDone(void* arg, grpc_error_handle error); - grpc_event_engine::experimental::MemoryAllocator memory_allocator_ = - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "connect_activity"); - ScopedArenaPtr arena_ = MakeScopedArena(1024, &memory_allocator_); + RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); Mutex mu_; Args args_; Result* result_ ABSL_GUARDED_BY(mu_); diff --git a/src/core/ext/transport/chaotic_good/client_transport.cc b/src/core/ext/transport/chaotic_good/client_transport.cc index cc1fd8b9a18..511d04f6ed1 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.cc +++ b/src/core/ext/transport/chaotic_good/client_transport.cc @@ -146,10 +146,9 @@ auto ChaoticGoodClientTransport::TransportReadLoop( frame_limits); } else { // Stream not found, skip the frame. - auto arena = MakeScopedArena(1024, &allocator_); - deserialize_status = - transport->DeserializeFrame(frame_header, std::move(buffers), - arena.get(), frame, frame_limits); + deserialize_status = transport->DeserializeFrame( + frame_header, std::move(buffers), + SimpleArenaAllocator()->MakeArena().get(), frame, frame_limits); } return If( deserialize_status.ok() && call_handler.has_value(), diff --git a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc index 8af652a292c..524d9e68349 100644 --- a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc +++ b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc @@ -149,8 +149,7 @@ absl::Status ChaoticGoodServerListener::StartListening() { ChaoticGoodServerListener::ActiveConnection::ActiveConnection( RefCountedPtr listener, std::unique_ptr endpoint) - : memory_allocator_(listener->memory_allocator_), - listener_(std::move(listener)) { + : listener_(std::move(listener)) { handshaking_state_ = MakeRefCounted(Ref()); handshaking_state_->Start(std::move(endpoint)); } @@ -208,8 +207,7 @@ void ChaoticGoodServerListener::ActiveConnection::Done( ChaoticGoodServerListener::ActiveConnection::HandshakingState::HandshakingState( RefCountedPtr connection) - : memory_allocator_(connection->memory_allocator_), - connection_(std::move(connection)), + : connection_(std::move(connection)), handshake_mgr_(MakeRefCounted()) {} void ChaoticGoodServerListener::ActiveConnection::HandshakingState::Start( diff --git a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h index 0479016c15b..8511790c03b 100644 --- a/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h +++ b/src/core/ext/transport/chaotic_good/server/chaotic_good_server.h @@ -106,8 +106,6 @@ class ChaoticGoodServerListener final : public Server::ListenerInterface { static void OnHandshakeDone(void* arg, grpc_error_handle error); Timestamp GetConnectionDeadline(); - const std::shared_ptr - memory_allocator_; const RefCountedPtr connection_; const RefCountedPtr handshake_mgr_; }; @@ -115,9 +113,7 @@ class ChaoticGoodServerListener final : public Server::ListenerInterface { private: void Done(absl::optional error = absl::nullopt); void NewConnectionID(); - const std::shared_ptr - memory_allocator_; - ScopedArenaPtr arena_ = MakeScopedArena(1024, memory_allocator_.get()); + RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); const RefCountedPtr listener_; RefCountedPtr handshaking_state_; Mutex mu_; @@ -161,11 +157,6 @@ class ChaoticGoodServerListener final : public Server::ListenerInterface { absl::AnyInvocable connection_id_generator_ ABSL_GUARDED_BY(mu_); grpc_closure* on_destroy_done_ ABSL_GUARDED_BY(mu_) = nullptr; - std::shared_ptr - memory_allocator_ = - std::make_shared( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "server_connection")); }; } // namespace chaotic_good diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc index 98fbf4e915e..bc4fbed3334 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.cc +++ b/src/core/ext/transport/chaotic_good/server_transport.cc @@ -235,15 +235,14 @@ auto ChaoticGoodServerTransport::DeserializeAndPushFragmentToNewCall( FrameHeader frame_header, BufferPair buffers, ChaoticGoodTransport& transport) { ClientFragmentFrame fragment_frame; - ScopedArenaPtr arena(call_arena_allocator_->MakeArena()); + RefCountedPtr arena(call_arena_allocator_->MakeArena()); absl::Status status = transport.DeserializeFrame( frame_header, std::move(buffers), arena.get(), fragment_frame, FrameLimits{1024 * 1024 * 1024, aligned_bytes_ - 1}); absl::optional call_initiator; if (status.ok()) { - auto call = - MakeCallPair(std::move(fragment_frame.headers), event_engine_.get(), - arena.release(), call_arena_allocator_, nullptr); + auto call = MakeCallPair(std::move(fragment_frame.headers), + event_engine_.get(), std::move(arena), nullptr); call_initiator.emplace(std::move(call.initiator)); auto add_result = NewStream(frame_header.stream_id, *call_initiator); if (add_result.ok()) { diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 7913e631fe8..c5ea01739f4 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -105,9 +105,9 @@ class InprocServerTransport final : public ServerTransport { case ConnectionState::kReady: break; } - auto* arena = call_arena_allocator_->MakeArena(); - auto server_call = MakeCallPair(std::move(md), event_engine_.get(), arena, - call_arena_allocator_, nullptr); + auto server_call = + MakeCallPair(std::move(md), event_engine_.get(), + call_arena_allocator_->MakeArena(), nullptr); unstarted_call_handler_->StartCall(std::move(server_call.handler)); return std::move(server_call.initiator); } diff --git a/src/core/lib/promise/activity.h b/src/core/lib/promise/activity.h index 1cbbc01e268..715de5317f2 100644 --- a/src/core/lib/promise/activity.h +++ b/src/core/lib/promise/activity.h @@ -289,6 +289,19 @@ class ContextHolder> { std::unique_ptr value_; }; +template +class ContextHolder> { + public: + using ContextType = Context; + + explicit ContextHolder(RefCountedPtr value) + : value_(std::move(value)) {} + Context* GetContext() { return value_.get(); } + + private: + RefCountedPtr value_; +}; + template <> class Context { public: @@ -296,19 +309,23 @@ class Context { }; template -using ContextTypeFromHeld = typename ContextHolder::ContextType; +using ContextTypeFromHeld = typename ContextHolder< + typename std::remove_reference::type>::ContextType; template -class ActivityContexts : public ContextHolder... { +class ActivityContexts + : public ContextHolder::type>... { public: explicit ActivityContexts(Contexts&&... contexts) - : ContextHolder(std::forward(contexts))... {} + : ContextHolder::type>( + std::forward(contexts))... {} class ScopedContext : public Context>... { public: explicit ScopedContext(ActivityContexts* contexts) : Context>( - static_cast*>(contexts) + static_cast::type>*>(contexts) ->GetContext())... { // Silence `unused-but-set-parameter` in case of Contexts = {} (void)contexts; diff --git a/src/core/lib/resource_quota/arena.cc b/src/core/lib/resource_quota/arena.cc index a2969abe241..2f9e3c851e5 100644 --- a/src/core/lib/resource_quota/arena.cc +++ b/src/core/lib/resource_quota/arena.cc @@ -24,6 +24,7 @@ #include #include +#include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/alloc.h" namespace { @@ -46,6 +47,10 @@ void* ArenaStorage(size_t initial_size) { namespace grpc_core { Arena::~Arena() { + DestroyManagedNewObjects(); + arena_factory_->FinalizeArena(this); + arena_factory_->allocator().Release( + total_allocated_.load(std::memory_order_relaxed)); Zone* z = last_zone_; while (z) { Zone* prev_z = z->prev; @@ -58,19 +63,19 @@ Arena::~Arena() { #endif } -Arena* Arena::Create(size_t initial_size, MemoryAllocator* memory_allocator) { - return new (ArenaStorage(initial_size)) - Arena(initial_size, 0, memory_allocator); +RefCountedPtr Arena::Create(size_t initial_size, + RefCountedPtr arena_factory) { + return RefCountedPtr(new (ArenaStorage(initial_size)) Arena( + initial_size, 0, std::move(arena_factory))); } -std::pair Arena::CreateWithAlloc( - size_t initial_size, size_t alloc_size, MemoryAllocator* memory_allocator) { - static constexpr size_t base_size = - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(Arena)); - auto* new_arena = new (ArenaStorage(initial_size)) - Arena(initial_size, alloc_size, memory_allocator); - void* first_alloc = reinterpret_cast(new_arena) + base_size; - return std::make_pair(new_arena, first_alloc); +Arena::Arena(size_t initial_size, size_t initial_alloc, + RefCountedPtr arena_factory) + : total_used_(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)), + initial_zone_size_(initial_size), + arena_factory_(std::move(arena_factory)) { + arena_factory_->allocator().Reserve( + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)); } void Arena::DestroyManagedNewObjects() { @@ -86,11 +91,9 @@ void Arena::DestroyManagedNewObjects() { } } -void Arena::Destroy() { - DestroyManagedNewObjects(); - memory_allocator_->Release(total_allocated_.load(std::memory_order_relaxed)); +void Arena::Destroy() const { this->~Arena(); - gpr_free_aligned(this); + gpr_free_aligned(const_cast(this)); } void* Arena::AllocZone(size_t size) { @@ -102,7 +105,7 @@ void* Arena::AllocZone(size_t size) { static constexpr size_t zone_base_size = GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(Zone)); size_t alloc_size = zone_base_size + size; - memory_allocator_->Reserve(alloc_size); + arena_factory_->allocator().Reserve(alloc_size); total_allocated_.fetch_add(alloc_size, std::memory_order_relaxed); Zone* z = new (gpr_malloc_aligned(alloc_size, GPR_MAX_ALIGNMENT)) Zone(); auto* prev = last_zone_.load(std::memory_order_relaxed); @@ -120,63 +123,27 @@ void Arena::ManagedNewObject::Link(std::atomic* head) { } } -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC -void* Arena::AllocPooled(size_t obj_size, size_t alloc_size, - std::atomic* head) { - // ABA mitigation: - // AllocPooled may be called by multiple threads, and to remove a node from - // the free list we need to manipulate the next pointer, which may be done - // differently by each thread in a naive implementation. - // The literature contains various ways of dealing with this. Here we expect - // to be mostly single threaded - Arena's are owned by calls and calls don't - // do a lot of concurrent work with the pooled allocator. The place that they - // do is allocating metadata batches for decoding HPACK headers in chttp2. - // So we adopt an approach that is simple and fast for the single threaded - // case, and that is also correct in the multi threaded case. - - // First, take ownership of the entire free list. At this point we know that - // no other thread can see free nodes and will be forced to allocate. - // We think we're mostly single threaded and so that's ok. - FreePoolNode* p = head->exchange(nullptr, std::memory_order_acquire); - // If there are no nodes in the free list, then go ahead and allocate from the - // arena. - if (p == nullptr) { - void* r = Alloc(alloc_size); - TracePoolAlloc(obj_size, r); - return r; - } - // We had a non-empty free list... but we own the *entire* free list. - // We only want one node, so if there are extras we'd better give them back. - if (p->next != nullptr) { - // We perform an exchange to do so, but if there were concurrent frees with - // this allocation then there'll be a free list that needs to be merged with - // ours. - FreePoolNode* extra = head->exchange(p->next, std::memory_order_acq_rel); - // If there was a free list concurrently created, we merge it into the - // overall free list here by simply freeing each node in turn. This is O(n), - // but only O(n) in the number of nodes that were freed concurrently, and - // again: we think real world use cases are going to see this as mostly - // single threaded. - while (extra != nullptr) { - FreePoolNode* next = extra->next; - FreePooled(extra, head); - extra = next; +RefCountedPtr SimpleArenaAllocator(size_t initial_size) { + class Allocator : public ArenaFactory { + public: + explicit Allocator(size_t initial_size) + : ArenaFactory( + ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( + "simple-arena-allocator")), + initial_size_(initial_size) {} + + RefCountedPtr MakeArena() override { + return Arena::Create(initial_size_, Ref()); } - } - TracePoolAlloc(obj_size, p); - return p; -} -void Arena::FreePooled(void* p, std::atomic* head) { - // May spuriously trace a free of an already freed object - see AllocPooled - // ABA mitigation. - TracePoolFree(p); - FreePoolNode* node = static_cast(p); - node->next = head->load(std::memory_order_acquire); - while (!head->compare_exchange_weak( - node->next, node, std::memory_order_acq_rel, std::memory_order_relaxed)) { - } + void FinalizeArena(Arena*) override { + // No-op. + } + + private: + size_t initial_size_; + }; + return MakeRefCounted(initial_size); } -#endif } // namespace grpc_core diff --git a/src/core/lib/resource_quota/arena.h b/src/core/lib/resource_quota/arena.h index 813004087b7..61fc917badf 100644 --- a/src/core/lib/resource_quota/arena.h +++ b/src/core/lib/resource_quota/arena.h @@ -40,76 +40,12 @@ #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/alloc.h" -#define GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC -// #define GRPC_ARENA_TRACE_POOLED_ALLOCATIONS - namespace grpc_core { -namespace arena_detail { - -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC -struct PoolAndSize { - size_t alloc_size; - size_t pool_index; -}; - -template -struct PoolIndexForSize; - -template -struct PoolIndexForSize< - absl::enable_if_t, kIndex, - kObjectSize, kSmallestRemainingBucket, kBucketSizes...> { - static constexpr size_t kPool = kIndex; - static constexpr size_t kSize = kSmallestRemainingBucket; -}; - -template -struct PoolIndexForSize< - absl::enable_if_t<(kObjectSize > kSmallestRemainingBucket)>, kIndex, - kObjectSize, kSmallestRemainingBucket, kBucketSizes...> - : public PoolIndexForSize { -}; - -template -constexpr size_t PoolFromObjectSize( - absl::integer_sequence) { - return PoolIndexForSize::kPool; -} - -template -constexpr size_t AllocationSizeFromObjectSize( - absl::integer_sequence) { - return PoolIndexForSize::kSize; -} - -template -struct ChoosePoolForAllocationSizeImpl; - -template -struct ChoosePoolForAllocationSizeImpl { - static PoolAndSize Fn(size_t n) { - if (n <= kBucketSize) return {kBucketSize, kIndex}; - return ChoosePoolForAllocationSizeImpl::Fn(n); - } -}; +class Arena; -template -struct ChoosePoolForAllocationSizeImpl { - static PoolAndSize Fn(size_t n) { - return PoolAndSize{n, std::numeric_limits::max()}; - } -}; +namespace arena_detail { -template -PoolAndSize ChoosePoolForAllocationSize( - size_t n, absl::integer_sequence) { - return ChoosePoolForAllocationSizeImpl<0, kBucketSizes...>::Fn(n); -} -#else template struct IfArray { using Result = A; @@ -119,30 +55,36 @@ template struct IfArray { using Result = B; }; -#endif + +struct UnrefDestroy { + void operator()(const Arena* arena) const; +}; } // namespace arena_detail -class Arena { -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC - // Selected pool sizes. - // How to tune: see tools/codegen/core/optimize_arena_pool_sizes.py - using PoolSizes = absl::integer_sequence; - struct FreePoolNode { - FreePoolNode* next; - }; -#endif +class ArenaFactory : public RefCounted { + public: + virtual RefCountedPtr MakeArena() = 0; + virtual void FinalizeArena(Arena* arena) = 0; + MemoryAllocator& allocator() { return allocator_; } + + protected: + explicit ArenaFactory(MemoryAllocator allocator) + : allocator_(std::move(allocator)) {} + + private: + MemoryAllocator allocator_; +}; + +RefCountedPtr SimpleArenaAllocator(size_t initial_size = 1024); + +class Arena final : public RefCounted { public: // Create an arena, with \a initial_size bytes in the first allocated buffer. - static Arena* Create(size_t initial_size, MemoryAllocator* memory_allocator); - - // Create an arena, with \a initial_size bytes in the first allocated buffer, - // and return both a void pointer to the returned arena and a void* with the - // first allocation. - static std::pair CreateWithAlloc( - size_t initial_size, size_t alloc_size, - MemoryAllocator* memory_allocator); + static RefCountedPtr Create(size_t initial_size, + RefCountedPtr arena_factory); // Destroy all `ManagedNew` allocated objects. // Allows safe destruction of these objects even if they need context held by @@ -151,9 +93,6 @@ class Arena { // TODO(ctiller): eliminate ManagedNew. void DestroyManagedNewObjects(); - // Destroy an arena. - void Destroy(); - // Return the total amount of memory allocated by this arena. size_t TotalUsedBytes() const { return total_used_.load(std::memory_order_relaxed); @@ -194,95 +133,6 @@ class Arena { return &p->t; } -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC - class PooledDeleter { - public: - explicit PooledDeleter(std::atomic* free_list) - : free_list_(free_list) {} - PooledDeleter() = default; - template - void operator()(T* p) { - // TODO(ctiller): promise based filter hijacks ownership of some pointers - // to make them appear as PoolPtr without really transferring ownership, - // by setting the arena to nullptr. - // This is a transitional hack and should be removed once promise based - // filter is removed. - if (free_list_ != nullptr) { - p->~T(); - FreePooled(p, free_list_); - } - } - - bool has_freelist() const { return free_list_ != nullptr; } - - private: - std::atomic* free_list_; - }; - - template - using PoolPtr = std::unique_ptr; - - // Make a unique_ptr to T that is allocated from the arena. - // When the pointer is released, the memory may be reused for other - // MakePooled(.*) calls. - // CAUTION: The amount of memory allocated is rounded up to the nearest - // value in Arena::PoolSizes, and so this may pessimize total - // arena size. - template - PoolPtr MakePooled(Args&&... args) { - auto* free_list = - &pools_[arena_detail::PoolFromObjectSize(PoolSizes())]; - return PoolPtr( - new (AllocPooled( - sizeof(T), - arena_detail::AllocationSizeFromObjectSize(PoolSizes()), - free_list)) T(std::forward(args)...), - PooledDeleter(free_list)); - } - - // Make a unique_ptr to an array of T that is allocated from the arena. - // When the pointer is released, the memory may be reused for other - // MakePooled(.*) calls. - // One can use MakePooledArray to allocate a buffer of bytes. - // CAUTION: The amount of memory allocated is rounded up to the nearest - // value in Arena::PoolSizes, and so this may pessimize total - // arena size. - template - PoolPtr MakePooledArray(size_t n) { - auto where = - arena_detail::ChoosePoolForAllocationSize(n * sizeof(T), PoolSizes()); - if (where.pool_index == std::numeric_limits::max()) { - return PoolPtr(new (Alloc(where.alloc_size)) T[n], - PooledDeleter(nullptr)); - } else { - return PoolPtr(new (AllocPooled(where.alloc_size, where.alloc_size, - &pools_[where.pool_index])) T[n], - PooledDeleter(&pools_[where.pool_index])); - } - } - - // Like MakePooled, but with manual memory management. - // The caller is responsible for calling DeletePooled() on the returned - // pointer, and expected to call it with the same type T as was passed to this - // function (else the free list returned to the arena will be corrupted). - template - T* NewPooled(Args&&... args) { - auto* free_list = - &pools_[arena_detail::PoolFromObjectSize(PoolSizes())]; - return new (AllocPooled( - sizeof(T), - arena_detail::AllocationSizeFromObjectSize(PoolSizes()), - free_list)) T(std::forward(args)...); - } - - template - void DeletePooled(T* p) { - auto* free_list = - &pools_[arena_detail::PoolFromObjectSize(PoolSizes())]; - p->~T(); - FreePooled(p, free_list); - } -#else class PooledDeleter { public: PooledDeleter() = default; @@ -364,9 +214,10 @@ class Arena { void DeletePooled(T* p) { delete p; } -#endif private: + friend struct arena_detail::UnrefDestroy; + struct Zone { Zone* prev; }; @@ -397,34 +248,12 @@ class Arena { // where we wish to create an arena and then perform an immediate // allocation. explicit Arena(size_t initial_size, size_t initial_alloc, - MemoryAllocator* memory_allocator) - : total_used_(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)), - initial_zone_size_(initial_size), - memory_allocator_(memory_allocator) {} + RefCountedPtr arena_factory); ~Arena(); void* AllocZone(size_t size); - -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC - void* AllocPooled(size_t obj_size, size_t alloc_size, - std::atomic* head); - static void FreePooled(void* p, std::atomic* head); -#endif - - void TracePoolAlloc(size_t size, void* ptr) { - (void)size; - (void)ptr; -#ifdef GRPC_ARENA_TRACE_POOLED_ALLOCATIONS - gpr_log(GPR_ERROR, "ARENA %p ALLOC %" PRIdPTR " @ %p", this, size, ptr); -#endif - } - static void TracePoolFree(void* ptr) { - (void)ptr; -#ifdef GRPC_ARENA_TRACE_POOLED_ALLOCATIONS - gpr_log(GPR_ERROR, "FREE %p", ptr); -#endif - } + void Destroy() const; // Keep track of the total used size. We use this in our call sizing // hysteresis. @@ -438,27 +267,19 @@ class Arena { // last zone; the zone list is reverse-walked during arena destruction only. std::atomic last_zone_{nullptr}; std::atomic managed_new_head_{nullptr}; -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC - std::atomic pools_[PoolSizes::size()]{}; -#endif - // The backing memory quota - MemoryAllocator* const memory_allocator_; + RefCountedPtr arena_factory_; }; -// Smart pointer for arenas when the final size is not required. -struct ScopedArenaDeleter { - void operator()(Arena* arena) { arena->Destroy(); } -}; -using ScopedArenaPtr = std::unique_ptr; -inline ScopedArenaPtr MakeScopedArena(size_t initial_size, - MemoryAllocator* memory_allocator) { - return ScopedArenaPtr(Arena::Create(initial_size, memory_allocator)); -} - // Arenas form a context for activities template <> struct ContextType {}; +namespace arena_detail { +inline void UnrefDestroy::operator()(const Arena* arena) const { + arena->Destroy(); +} +} // namespace arena_detail + } // namespace grpc_core #endif // GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_ARENA_H diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 9a54226862b..5f0d4a99310 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -380,15 +380,15 @@ void Call::Run() { class ChannelBasedCall : public Call { protected: - ChannelBasedCall(Arena* arena, bool is_client, Timestamp send_deadline, - RefCountedPtr channel) + ChannelBasedCall(RefCountedPtr arena, bool is_client, + Timestamp send_deadline, RefCountedPtr channel) : Call(is_client, send_deadline, channel->event_engine()), - arena_(arena), + arena_(std::move(arena)), channel_(std::move(channel)) { - DCHECK_NE(arena_, nullptr); + DCHECK_NE(arena_.get(), nullptr); } - Arena* arena() final { return arena_; } + Arena* arena() final { return arena_.get(); } char* GetPeer() final { Slice peer_slice = GetPeerString(); @@ -415,18 +415,17 @@ class ChannelBasedCall : public Call { void DeleteThis() { RefCountedPtr channel = std::move(channel_); - Arena* arena = arena_; + RefCountedPtr arena = arena_; this->~ChannelBasedCall(); - channel->DestroyArena(arena); } Channel* channel() const { return channel_.get(); } // Non-virtual arena accessor -- needed by PipeBasedCall - Arena* GetArena() { return arena_; } + Arena* GetArena() { return arena_.get(); } private: - Arena* const arena_; + const RefCountedPtr arena_; RefCountedPtr channel_; }; @@ -597,8 +596,9 @@ class FilterStackCall final : public ChannelBasedCall { void FinishBatch(grpc_error_handle error); }; - FilterStackCall(Arena* arena, const grpc_call_create_args& args) - : ChannelBasedCall(arena, args.server_transport_data == nullptr, + FilterStackCall(RefCountedPtr arena, const grpc_call_create_args& args) + : ChannelBasedCall(std::move(arena), + args.server_transport_data == nullptr, args.send_deadline, args.channel->Ref()), cq_(args.cq), stream_op_payload_(context_) { @@ -732,7 +732,7 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args, GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(FilterStackCall)) + channel_stack->call_stack_size; - Arena* arena = channel->CreateArena(); + RefCountedPtr arena = channel->call_arena_allocator()->MakeArena(); call = new (arena->Alloc(call_alloc_size)) FilterStackCall(arena, *args); DCHECK(FromC(call->c_ptr()) == call); DCHECK(FromCallStack(call->call_stack()) == call); @@ -771,7 +771,7 @@ grpc_error_handle FilterStackCall::Create(grpc_call_create_args* args, args->server->server_call_tracer_factory() != nullptr) { auto* server_call_tracer = args->server->server_call_tracer_factory()->CreateNewServerCallTracer( - arena, args->server->channel_args()); + arena.get(), args->server->channel_args()); if (server_call_tracer != nullptr) { // Note that we are setting both // GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE and @@ -1906,10 +1906,12 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party { public: using Call::arena; - BasicPromiseBasedCall(Arena* arena, uint32_t initial_external_refs, + BasicPromiseBasedCall(RefCountedPtr arena, + uint32_t initial_external_refs, uint32_t initial_internal_refs, const grpc_call_create_args& args) - : ChannelBasedCall(arena, args.server_transport_data == nullptr, + : ChannelBasedCall(std::move(arena), + args.server_transport_data == nullptr, args.send_deadline, args.channel->Ref()), Party(initial_internal_refs), external_refs_(initial_external_refs), @@ -2067,7 +2069,7 @@ class BasicPromiseBasedCall : public ChannelBasedCall, public Party { class PromiseBasedCall : public BasicPromiseBasedCall { public: - PromiseBasedCall(Arena* arena, uint32_t initial_external_refs, + PromiseBasedCall(RefCountedPtr arena, uint32_t initial_external_refs, const grpc_call_create_args& args); bool Completed() final { return finished_.IsSet(); } @@ -2348,17 +2350,17 @@ template grpc_error_handle MakePromiseBasedCall(grpc_call_create_args* args, grpc_call** out_call) { Channel* channel = args->channel.get(); - - auto* arena = channel->CreateArena(); + auto arena = channel->call_arena_allocator()->MakeArena(); PromiseBasedCall* call = arena->New(arena, args); *out_call = call->c_ptr(); DCHECK(Call::FromC(*out_call) == call); return absl::OkStatus(); } -PromiseBasedCall::PromiseBasedCall(Arena* arena, uint32_t initial_external_refs, +PromiseBasedCall::PromiseBasedCall(RefCountedPtr arena, + uint32_t initial_external_refs, const grpc_call_create_args& args) - : BasicPromiseBasedCall(arena, initial_external_refs, + : BasicPromiseBasedCall(std::move(arena), initial_external_refs, initial_external_refs != 0 ? 1 : 0, args) {} static void CToMetadata(grpc_metadata* metadata, size_t count, @@ -2591,8 +2593,9 @@ void PublishMetadataArray(grpc_metadata_batch* md, grpc_metadata_array* array, #ifdef GRPC_EXPERIMENT_IS_INCLUDED_PROMISE_BASED_CLIENT_CALL class ClientPromiseBasedCall final : public PromiseBasedCall { public: - ClientPromiseBasedCall(Arena* arena, grpc_call_create_args* args) - : PromiseBasedCall(arena, 1, *args), + ClientPromiseBasedCall(RefCountedPtr arena, + grpc_call_create_args* args) + : PromiseBasedCall(std::move(arena), 1, *args), polling_entity_( args->cq != nullptr ? grpc_polling_entity_create_from_pollset( diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index b7f91e6003c..3d2deba0698 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -66,21 +66,11 @@ Channel::Channel(std::string target, const ChannelArgs& channel_args) : target_(std::move(target)), channelz_node_(channel_args.GetObjectRef()), compression_options_(CompressionOptionsFromChannelArgs(channel_args)), - call_size_estimator_(1024), - allocator_(channel_args.GetObject() - ->memory_quota() - ->CreateMemoryOwner()) {} - -Arena* Channel::CreateArena() { - const size_t initial_size = call_size_estimator_.CallSizeEstimate(); - global_stats().IncrementCallInitialSize(initial_size); - return Arena::Create(initial_size, &allocator_); -} - -void Channel::DestroyArena(Arena* arena) { - call_size_estimator_.UpdateCallSizeEstimate(arena->TotalUsedBytes()); - arena->Destroy(); -} + call_arena_allocator_(MakeRefCounted( + channel_args.GetObject() + ->memory_quota() + ->CreateMemoryOwner(), + 1024)) {} Channel::RegisteredCall* Channel::RegisterCall(const char* method, const char* host) { diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index d0547c5bdf5..9d207ae5f2c 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -134,12 +134,14 @@ class Channel : public InternallyRefCounted, virtual void Ping(grpc_completion_queue* cq, void* tag) = 0; // TODO(roth): Remove these methods when LegacyChannel goes away. - Arena* CreateArena(); - void DestroyArena(Arena* arena); virtual grpc_channel_stack* channel_stack() const { return nullptr; } virtual bool is_client() const { return true; } virtual bool is_promising() const { return true; } + CallArenaAllocator* call_arena_allocator() const { + return call_arena_allocator_.get(); + } + protected: Channel(std::string target, const ChannelArgs& channel_args); @@ -148,16 +150,13 @@ class Channel : public InternallyRefCounted, const RefCountedPtr channelz_node_; const grpc_compression_options compression_options_; - // TODO(ctiller): move to use CallArenaAllocator - CallSizeEstimator call_size_estimator_; - MemoryAllocator allocator_; - Mutex mu_; // The map key needs to be owned strings rather than unowned char*'s to // guarantee that it outlives calls on the core channel (which may outlast // the C++ or other wrapped language Channel that registered these calls). std::map, RegisteredCall> registration_table_ ABSL_GUARDED_BY(mu_); + const RefCountedPtr call_arena_allocator_; }; } // namespace grpc_core diff --git a/src/core/lib/transport/call_arena_allocator.h b/src/core/lib/transport/call_arena_allocator.h index 1db02bf6902..ebc748854ec 100644 --- a/src/core/lib/transport/call_arena_allocator.h +++ b/src/core/lib/transport/call_arena_allocator.h @@ -28,7 +28,7 @@ namespace grpc_core { -class CallSizeEstimator { +class CallSizeEstimator final { public: explicit CallSizeEstimator(size_t initial_estimate) : call_size_estimate_(initial_estimate) {} @@ -52,19 +52,21 @@ class CallSizeEstimator { std::atomic call_size_estimate_; }; -class CallArenaAllocator : public RefCounted { +class CallArenaAllocator final : public ArenaFactory { public: CallArenaAllocator(MemoryAllocator allocator, size_t initial_size) - : allocator_(std::move(allocator)), call_size_estimator_(initial_size) {} + : ArenaFactory(std::move(allocator)), + call_size_estimator_(initial_size) {} - Arena* MakeArena() { - return Arena::Create(call_size_estimator_.CallSizeEstimate(), &allocator_); + RefCountedPtr MakeArena() override { + return Arena::Create(call_size_estimator_.CallSizeEstimate(), Ref()); } - void Destroy(Arena* arena) { arena->Destroy(); } + void FinalizeArena(Arena* arena) override { + call_size_estimator_.UpdateCallSizeEstimate(arena->TotalUsedBytes()); + } private: - MemoryAllocator allocator_; CallSizeEstimator call_size_estimator_; }; diff --git a/src/core/lib/transport/call_spine.cc b/src/core/lib/transport/call_spine.cc index eb05608663f..99270ae09d1 100644 --- a/src/core/lib/transport/call_spine.cc +++ b/src/core/lib/transport/call_spine.cc @@ -94,12 +94,12 @@ void ForwardCall(CallHandler call_handler, CallInitiator call_initiator) { CallInitiatorAndHandler MakeCallPair( ClientMetadataHandle client_initial_metadata, - grpc_event_engine::experimental::EventEngine* event_engine, Arena* arena, - RefCountedPtr call_arena_allocator_if_arena_is_owned, - grpc_call_context_element* legacy_context) { - auto spine = CallSpine::Create( - std::move(client_initial_metadata), event_engine, arena, - std::move(call_arena_allocator_if_arena_is_owned), legacy_context); + grpc_event_engine::experimental::EventEngine* event_engine, + RefCountedPtr arena, grpc_call_context_element* legacy_context) { + CHECK_NE(arena.get(), nullptr); + auto spine = + CallSpine::Create(std::move(client_initial_metadata), event_engine, + std::move(arena), legacy_context); return {CallInitiator(spine), UnstartedCallHandler(spine)}; } diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h index 8a27c95f593..1dbc939d915 100644 --- a/src/core/lib/transport/call_spine.h +++ b/src/core/lib/transport/call_spine.h @@ -280,12 +280,12 @@ class CallSpine final : public CallSpineInterface, public Party { public: static RefCountedPtr Create( ClientMetadataHandle client_initial_metadata, - grpc_event_engine::experimental::EventEngine* event_engine, Arena* arena, - RefCountedPtr call_arena_allocator_if_arena_is_owned, - grpc_call_context_element* legacy_context) { - return RefCountedPtr(arena->New( - std::move(client_initial_metadata), event_engine, arena, - std::move(call_arena_allocator_if_arena_is_owned), legacy_context)); + grpc_event_engine::experimental::EventEngine* event_engine, + RefCountedPtr arena, grpc_call_context_element* legacy_context) { + auto* arena_ptr = arena.get(); + return RefCountedPtr(arena_ptr->New( + std::move(client_initial_metadata), event_engine, std::move(arena), + legacy_context)); } ~CallSpine() override { @@ -301,7 +301,7 @@ class CallSpine final : public CallSpineInterface, public Party { Party& party() override { return *this; } - Arena* arena() override { return arena_; } + Arena* arena() override { return arena_.get(); } void IncrementRefCount() override { Party::IncrementRefCount(); } @@ -385,18 +385,15 @@ class CallSpine final : public CallSpineInterface, public Party { friend class Arena; CallSpine(ClientMetadataHandle client_initial_metadata, grpc_event_engine::experimental::EventEngine* event_engine, - Arena* arena, - RefCountedPtr call_arena_allocator, + RefCountedPtr arena, grpc_call_context_element* legacy_context) : Party(1), + arena_(std::move(arena)), call_filters_(std::move(client_initial_metadata)), - arena_(arena), - event_engine_(event_engine), - call_arena_allocator_if_arena_is_owned_( - std::move(call_arena_allocator)) { + event_engine_(event_engine) { if (legacy_context == nullptr) { - legacy_context_ = static_cast( - arena->Alloc(sizeof(grpc_call_context_element) * GRPC_CONTEXT_COUNT)); + legacy_context_ = static_cast(arena_->Alloc( + sizeof(grpc_call_context_element) * GRPC_CONTEXT_COUNT)); memset(legacy_context_, 0, sizeof(grpc_call_context_element) * GRPC_CONTEXT_COUNT); legacy_context_is_owned_ = true; @@ -415,7 +412,7 @@ class CallSpine final : public CallSpineInterface, public Party { public: explicit ScopedContext(CallSpine* spine) : ScopedActivity(spine), - Context(spine->arena_), + Context(spine->arena_.get()), Context( spine->event_engine()), Context(spine->legacy_context_) {} @@ -427,29 +424,23 @@ class CallSpine final : public CallSpineInterface, public Party { } void PartyOver() override { - Arena* a = arena_; - RefCountedPtr call_arena_allocator_if_arena_is_owned = - std::move(call_arena_allocator_if_arena_is_owned_); + auto arena = arena_; { ScopedContext context(this); CancelRemainingParticipants(); - a->DestroyManagedNewObjects(); + arena->DestroyManagedNewObjects(); } this->~CallSpine(); - if (call_arena_allocator_if_arena_is_owned != nullptr) { - call_arena_allocator_if_arena_is_owned->Destroy(a); - } } + const RefCountedPtr arena_; // Call filters/pipes part of the spine CallFilters call_filters_; - Arena* const arena_; // Event engine associated with this call grpc_event_engine::experimental::EventEngine* const event_engine_; // Legacy context // TODO(ctiller): remove grpc_call_context_element* legacy_context_; - RefCountedPtr call_arena_allocator_if_arena_is_owned_; bool legacy_context_is_owned_; }; @@ -654,9 +645,8 @@ struct CallInitiatorAndHandler { CallInitiatorAndHandler MakeCallPair( ClientMetadataHandle client_initial_metadata, - grpc_event_engine::experimental::EventEngine* event_engine, Arena* arena, - RefCountedPtr call_arena_allocator_if_arena_is_owned, - grpc_call_context_element* legacy_context); + grpc_event_engine::experimental::EventEngine* event_engine, + RefCountedPtr arena, grpc_call_context_element* legacy_context); template auto OutgoingMessages(CallHalf h) { diff --git a/src/core/lib/transport/interception_chain.cc b/src/core/lib/transport/interception_chain.cc index 4d6ad34e315..667077af586 100644 --- a/src/core/lib/transport/interception_chain.cc +++ b/src/core/lib/transport/interception_chain.cc @@ -40,7 +40,7 @@ CallInitiator HijackedCall::MakeCall() { CallInitiator HijackedCall::MakeCallWithMetadata( ClientMetadataHandle metadata) { auto call = MakeCallPair(std::move(metadata), call_handler_.event_engine(), - call_handler_.arena(), nullptr, + call_handler_.arena()->Ref(), call_handler_.legacy_context()); destination_->StartCall(std::move(call.handler)); return std::move(call.initiator); diff --git a/test/core/call/yodel/yodel_test.h b/test/core/call/yodel/yodel_test.h index d80675750d2..75b9b96a997 100644 --- a/test/core/call/yodel/yodel_test.h +++ b/test/core/call/yodel/yodel_test.h @@ -361,10 +361,9 @@ class YodelTest : public ::testing::Test { } auto MakeCall(ClientMetadataHandle client_initial_metadata) { - auto* arena = state_->call_arena_allocator->MakeArena(); return MakeCallPair(std::move(client_initial_metadata), - state_->event_engine.get(), arena, - state_->call_arena_allocator, nullptr); + state_->event_engine.get(), + state_->call_arena_allocator->MakeArena(), nullptr); } void WaitForAllPendingWork(); diff --git a/test/core/channel/call_finalization_test.cc b/test/core/channel/call_finalization_test.cc index 38b3eaec280..2539d753ac3 100644 --- a/test/core/channel/call_finalization_test.cc +++ b/test/core/channel/call_finalization_test.cc @@ -30,9 +30,7 @@ namespace grpc_core { TEST(CallFinalizationTest, Works) { - auto memory_allocator = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); std::string evidence; TestContext context(arena.get()); CallFinalization finalization; diff --git a/test/core/client_channel/connected_subchannel_test.cc b/test/core/client_channel/connected_subchannel_test.cc index 613509d7456..78b00078da8 100644 --- a/test/core/client_channel/connected_subchannel_test.cc +++ b/test/core/client_channel/connected_subchannel_test.cc @@ -67,9 +67,9 @@ class ConnectedSubchannelTest : public YodelTest { CallInitiatorAndHandler MakeCall( ClientMetadataHandle client_initial_metadata) { - return MakeCallPair( - std::move(client_initial_metadata), event_engine().get(), - call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + return MakeCallPair(std::move(client_initial_metadata), + event_engine().get(), + SimpleArenaAllocator()->MakeArena(), nullptr); } CallHandler TickUntilCallStarted() { @@ -151,11 +151,6 @@ class ConnectedSubchannelTest : public YodelTest { } std::queue handlers_; - RefCountedPtr call_arena_allocator_ = - MakeRefCounted( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "test"), - 1024); }; #define CONNECTED_SUBCHANNEL_CHANNEL_TEST(name) \ diff --git a/test/core/client_channel/load_balanced_call_destination_test.cc b/test/core/client_channel/load_balanced_call_destination_test.cc index c8651fc305f..6e7004bf471 100644 --- a/test/core/client_channel/load_balanced_call_destination_test.cc +++ b/test/core/client_channel/load_balanced_call_destination_test.cc @@ -49,9 +49,9 @@ class LoadBalancedCallDestinationTest : public YodelTest { CallInitiatorAndHandler MakeCall( ClientMetadataHandle client_initial_metadata) { - return MakeCallPair( - std::move(client_initial_metadata), event_engine().get(), - call_arena_allocator_->MakeArena(), call_arena_allocator_, nullptr); + return MakeCallPair(std::move(client_initial_metadata), + event_engine().get(), + call_arena_allocator_->MakeArena(), nullptr); } CallHandler TickUntilCallStarted() { diff --git a/test/core/filters/filter_test.cc b/test/core/filters/filter_test.cc index d3178163c33..c6d11ddd56f 100644 --- a/test/core/filters/filter_test.cc +++ b/test/core/filters/filter_test.cc @@ -83,8 +83,7 @@ class FilterTestBase::Call::Impl Call* const call_; std::shared_ptr const channel_; - ScopedArenaPtr arena_{MakeScopedArena(channel_->initial_arena_size, - &channel_->memory_allocator)}; + RefCountedPtr arena_ = channel_->arena_factory->MakeArena(); bool run_call_finalization_ = false; CallFinalization call_finalization_; absl::optional> promise_; diff --git a/test/core/filters/filter_test.h b/test/core/filters/filter_test.h index c557e6aee16..f48890f2a58 100644 --- a/test/core/filters/filter_test.h +++ b/test/core/filters/filter_test.h @@ -101,19 +101,12 @@ class FilterTestBase : public ::testing::Test { struct Impl { Impl(std::unique_ptr filter, FilterTestBase* test) : filter(std::move(filter)), test(test) {} - size_t initial_arena_size = 1024; - MemoryAllocator memory_allocator = - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "test"); + RefCountedPtr arena_factory = SimpleArenaAllocator(); std::unique_ptr filter; FilterTestBase* const test; }; public: - void set_initial_arena_size(size_t size) { - impl_->initial_arena_size = size; - } - Call MakeCall(); protected: diff --git a/test/core/gprpp/chunked_vector_fuzzer.cc b/test/core/gprpp/chunked_vector_fuzzer.cc index 8463fdd797f..2a83b3df935 100644 --- a/test/core/gprpp/chunked_vector_fuzzer.cc +++ b/test/core/gprpp/chunked_vector_fuzzer.cc @@ -169,7 +169,7 @@ class Fuzzer { MemoryAllocator memory_allocator_ = MemoryAllocator( ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - ScopedArenaPtr arena_ = MakeScopedArena(128, &memory_allocator_); + RefCountedPtr arena_ = SimpleArenaAllocator(128)->MakeArena(); std::map vectors_; }; } // namespace grpc_core diff --git a/test/core/gprpp/chunked_vector_test.cc b/test/core/gprpp/chunked_vector_test.cc index 535374c9b2b..6299b0209d7 100644 --- a/test/core/gprpp/chunked_vector_test.cc +++ b/test/core/gprpp/chunked_vector_test.cc @@ -31,20 +31,14 @@ namespace testing { static constexpr size_t kInitialArenaSize = 1024; static constexpr size_t kChunkSize = 3; -class ChunkedVectorTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(ChunkedVectorTest, Noop) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, Noop) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); EXPECT_EQ(0, v.size()); } -TEST_F(ChunkedVectorTest, Stack) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, Stack) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); // Populate 2 chunks of memory, and 2/3 of a final chunk. @@ -85,8 +79,8 @@ TEST_F(ChunkedVectorTest, Stack) { EXPECT_EQ(0, v.size()); } -TEST_F(ChunkedVectorTest, Iterate) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, Iterate) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); v.EmplaceBack(1); v.EmplaceBack(2); @@ -117,8 +111,8 @@ TEST_F(ChunkedVectorTest, Iterate) { EXPECT_EQ(v.end(), it); } -TEST_F(ChunkedVectorTest, ConstIterate) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, ConstIterate) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); v.EmplaceBack(1); v.EmplaceBack(2); @@ -149,8 +143,8 @@ TEST_F(ChunkedVectorTest, ConstIterate) { EXPECT_EQ(v.cend(), it); } -TEST_F(ChunkedVectorTest, Clear) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, Clear) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); v.EmplaceBack(1); EXPECT_EQ(v.size(), 1); @@ -159,8 +153,8 @@ TEST_F(ChunkedVectorTest, Clear) { EXPECT_EQ(v.begin(), v.end()); } -TEST_F(ChunkedVectorTest, RemoveIf) { - auto arena = MakeScopedArena(kInitialArenaSize, &memory_allocator_); +TEST(ChunkedVectorTest, RemoveIf) { + auto arena = SimpleArenaAllocator(kInitialArenaSize)->MakeArena(); ChunkedVector v(arena.get()); v.EmplaceBack(1); v.SetEnd(std::remove_if(v.begin(), v.end(), [](int i) { return i == 1; })); diff --git a/test/core/promise/arena_promise_test.cc b/test/core/promise/arena_promise_test.cc index 7a412035a5d..d8f43426012 100644 --- a/test/core/promise/arena_promise_test.cc +++ b/test/core/promise/arena_promise_test.cc @@ -30,22 +30,16 @@ namespace grpc_core { -class ArenaPromiseTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(ArenaPromiseTest, DefaultInitializationYieldsNoValue) { - auto arena = MakeScopedArena(1024, &memory_allocator_); +TEST(ArenaPromiseTest, DefaultInitializationYieldsNoValue) { + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext context(arena.get()); ArenaPromise p; EXPECT_FALSE(p.has_value()); } -TEST_F(ArenaPromiseTest, AllocatedWorks) { +TEST(ArenaPromiseTest, AllocatedWorks) { ExecCtx exec_ctx; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext context(arena.get()); int x = 42; ArenaPromise p([x] { return Poll(x); }); @@ -55,9 +49,9 @@ TEST_F(ArenaPromiseTest, AllocatedWorks) { EXPECT_EQ(p(), Poll(43)); } -TEST_F(ArenaPromiseTest, DestructionWorks) { +TEST(ArenaPromiseTest, DestructionWorks) { ExecCtx exec_ctx; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext context(arena.get()); auto x = std::make_shared(42); auto p = ArenaPromise([x] { return Poll(*x); }); @@ -65,18 +59,18 @@ TEST_F(ArenaPromiseTest, DestructionWorks) { EXPECT_EQ(q(), Poll(42)); } -TEST_F(ArenaPromiseTest, MoveAssignmentWorks) { +TEST(ArenaPromiseTest, MoveAssignmentWorks) { ExecCtx exec_ctx; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext context(arena.get()); auto x = std::make_shared(42); auto p = ArenaPromise([x] { return Poll(*x); }); p = ArenaPromise(); } -TEST_F(ArenaPromiseTest, AllocatedUniquePtrWorks) { +TEST(ArenaPromiseTest, AllocatedUniquePtrWorks) { ExecCtx exec_ctx; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext context(arena.get()); std::array garbage = {0, 1, 2, 3, 4}; auto freer = [garbage](int* p) { free(p + garbage[0]); }; diff --git a/test/core/promise/for_each_test.cc b/test/core/promise/for_each_test.cc index b251176a332..4ce3914004f 100644 --- a/test/core/promise/for_each_test.cc +++ b/test/core/promise/for_each_test.cc @@ -40,13 +40,7 @@ using testing::StrictMock; namespace grpc_core { -class ForEachTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(ForEachTest, SendThriceWithPipe) { +TEST(ForEachTest, SendThriceWithPipe) { int num_received = 0; StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); @@ -76,12 +70,12 @@ TEST_F(ForEachTest, SendThriceWithPipe) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); Mock::VerifyAndClearExpectations(&on_done); EXPECT_EQ(num_received, 3); } -TEST_F(ForEachTest, SendThriceWithInterActivityPipe) { +TEST(ForEachTest, SendThriceWithInterActivityPipe) { int num_received = 0; StrictMock> on_done_sender; StrictMock> on_done_receiver; @@ -148,7 +142,7 @@ class MoveableUntilPolled { int polls_ = 0; }; -TEST_F(ForEachTest, NoMoveAfterPoll) { +TEST(ForEachTest, NoMoveAfterPoll) { int num_received = 0; StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); @@ -179,12 +173,12 @@ TEST_F(ForEachTest, NoMoveAfterPoll) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); Mock::VerifyAndClearExpectations(&on_done); EXPECT_EQ(num_received, 1); } -TEST_F(ForEachTest, NextResultHeldThroughCallback) { +TEST(ForEachTest, NextResultHeldThroughCallback) { int num_received = 0; StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); @@ -230,7 +224,7 @@ TEST_F(ForEachTest, NextResultHeldThroughCallback) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); Mock::VerifyAndClearExpectations(&on_done); EXPECT_EQ(num_received, 1); } diff --git a/test/core/promise/interceptor_list_test.cc b/test/core/promise/interceptor_list_test.cc index ad8941e72b1..f9ff107d289 100644 --- a/test/core/promise/interceptor_list_test.cc +++ b/test/core/promise/interceptor_list_test.cc @@ -31,9 +31,7 @@ namespace { class InterceptorListTest : public ::testing::Test { protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - ScopedArenaPtr arena_ = MakeScopedArena(1024, &memory_allocator_); + RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); TestContext arena_ctx_{arena_.get()}; }; diff --git a/test/core/promise/map_pipe_test.cc b/test/core/promise/map_pipe_test.cc index f8faa3d01bd..0bcc4f7c739 100644 --- a/test/core/promise/map_pipe_test.cc +++ b/test/core/promise/map_pipe_test.cc @@ -58,13 +58,7 @@ class Delayed { T x_; }; -class MapPipeTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(MapPipeTest, SendThriceWithPipeInterceptingReceive) { +TEST(MapPipeTest, SendThriceWithPipeInterceptingReceive) { int num_received = 0; StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); @@ -99,12 +93,12 @@ TEST_F(MapPipeTest, SendThriceWithPipeInterceptingReceive) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); Mock::VerifyAndClearExpectations(&on_done); EXPECT_EQ(num_received, 3); } -TEST_F(MapPipeTest, SendThriceWithPipeInterceptingSend) { +TEST(MapPipeTest, SendThriceWithPipeInterceptingSend) { int num_received = 0; StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); @@ -139,7 +133,7 @@ TEST_F(MapPipeTest, SendThriceWithPipeInterceptingSend) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); Mock::VerifyAndClearExpectations(&on_done); EXPECT_EQ(num_received, 3); } diff --git a/test/core/promise/pipe_test.cc b/test/core/promise/pipe_test.cc index abc7e44f904..e1219c55400 100644 --- a/test/core/promise/pipe_test.cc +++ b/test/core/promise/pipe_test.cc @@ -41,13 +41,7 @@ using testing::StrictMock; namespace grpc_core { -class PipeTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(PipeTest, CanSendAndReceive) { +TEST(PipeTest, CanSendAndReceive) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -68,10 +62,10 @@ TEST_F(PipeTest, CanSendAndReceive) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanInterceptAndMapAtSender) { +TEST(PipeTest, CanInterceptAndMapAtSender) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -93,10 +87,10 @@ TEST_F(PipeTest, CanInterceptAndMapAtSender) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanInterceptAndMapAtReceiver) { +TEST(PipeTest, CanInterceptAndMapAtReceiver) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -118,10 +112,10 @@ TEST_F(PipeTest, CanInterceptAndMapAtReceiver) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, InterceptionOrderingIsCorrect) { +TEST(PipeTest, InterceptionOrderingIsCorrect) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -154,10 +148,10 @@ TEST_F(PipeTest, InterceptionOrderingIsCorrect) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanReceiveAndSend) { +TEST(PipeTest, CanReceiveAndSend) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -178,10 +172,10 @@ TEST_F(PipeTest, CanReceiveAndSend) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanSeeClosedOnSend) { +TEST(PipeTest, CanSeeClosedOnSend) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -208,10 +202,10 @@ TEST_F(PipeTest, CanSeeClosedOnSend) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanSeeClosedOnReceive) { +TEST(PipeTest, CanSeeClosedOnReceive) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -240,10 +234,10 @@ TEST_F(PipeTest, CanSeeClosedOnReceive) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanCloseSend) { +TEST(PipeTest, CanCloseSend) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -270,10 +264,10 @@ TEST_F(PipeTest, CanCloseSend) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanCloseWithErrorSend) { +TEST(PipeTest, CanCloseWithErrorSend) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -300,10 +294,10 @@ TEST_F(PipeTest, CanCloseWithErrorSend) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanCloseWithErrorRecv) { +TEST(PipeTest, CanCloseWithErrorRecv) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -330,10 +324,10 @@ TEST_F(PipeTest, CanCloseWithErrorRecv) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanCloseSendWithInterceptor) { +TEST(PipeTest, CanCloseSendWithInterceptor) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -361,10 +355,10 @@ TEST_F(PipeTest, CanCloseSendWithInterceptor) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanCancelSendWithInterceptor) { +TEST(PipeTest, CanCancelSendWithInterceptor) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -389,10 +383,10 @@ TEST_F(PipeTest, CanCancelSendWithInterceptor) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } -TEST_F(PipeTest, CanFlowControlThroughManyStages) { +TEST(PipeTest, CanFlowControlThroughManyStages) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); auto done = std::make_shared(false); @@ -437,11 +431,11 @@ TEST_F(PipeTest, CanFlowControlThroughManyStages) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); ASSERT_TRUE(*done); } -TEST_F(PipeTest, AwaitClosedWorks) { +TEST(PipeTest, AwaitClosedWorks) { StrictMock> on_done; EXPECT_CALL(on_done, Call(absl::OkStatus())); MakeActivity( @@ -468,7 +462,7 @@ TEST_F(PipeTest, AwaitClosedWorks) { }, NoWakeupScheduler(), [&on_done](absl::Status status) { on_done.Call(std::move(status)); }, - MakeScopedArena(1024, &memory_allocator_)); + SimpleArenaAllocator()->MakeArena()); } class FakeActivity final : public Activity { @@ -483,7 +477,7 @@ class FakeActivity final : public Activity { } }; -TEST_F(PipeTest, PollAckWaitsForReadyClosed) { +TEST(PipeTest, PollAckWaitsForReadyClosed) { FakeActivity().Run([]() { pipe_detail::Center c; int i = 1; diff --git a/test/core/resource_quota/arena_test.cc b/test/core/resource_quota/arena_test.cc index c6055a1e0e5..27ea809eddc 100644 --- a/test/core/resource_quota/arena_test.cc +++ b/test/core/resource_quota/arena_test.cc @@ -57,9 +57,8 @@ class AllocTest : public ::testing::TestWithParam {}; TEST_P(AllocTest, Works) { ExecCtx exec_ctx; - MemoryAllocator memory_allocator = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - Arena* a = Arena::Create(GetParam().initial_size, &memory_allocator); + RefCountedPtr a = + SimpleArenaAllocator(GetParam().initial_size)->MakeArena(); std::vector allocated; for (auto alloc : GetParam().allocs) { void* p = a->Alloc(alloc); @@ -73,7 +72,6 @@ TEST_P(AllocTest, Works) { memset(p, 1, alloc); allocated.push_back(p); } - a->Destroy(); } INSTANTIATE_TEST_SUITE_P( @@ -92,33 +90,23 @@ size_t concurrent_test_iterations() { typedef struct { gpr_event ev_start; - Arena* arena; + RefCountedPtr arena; } concurrent_test_args; -class ArenaTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(ArenaTest, NoOp) { - ExecCtx exec_ctx; - Arena::Create(1, &memory_allocator_)->Destroy(); -} +TEST(ArenaTest, NoOp) { SimpleArenaAllocator()->MakeArena(); } -TEST_F(ArenaTest, ManagedNew) { +TEST(ArenaTest, ManagedNew) { ExecCtx exec_ctx; - Arena* arena = Arena::Create(1, &memory_allocator_); + auto arena = SimpleArenaAllocator(1)->MakeArena(); for (int i = 0; i < 100; i++) { arena->ManagedNew>(std::make_unique(i)); } - arena->Destroy(); } -TEST_F(ArenaTest, ConcurrentAlloc) { +TEST(ArenaTest, ConcurrentAlloc) { concurrent_test_args args; gpr_event_init(&args.ev_start); - args.arena = Arena::Create(1024, &memory_allocator_); + args.arena = SimpleArenaAllocator()->MakeArena(); Thread thds[CONCURRENT_TEST_THREADS]; @@ -141,14 +129,12 @@ TEST_F(ArenaTest, ConcurrentAlloc) { for (auto& th : thds) { th.Join(); } - - args.arena->Destroy(); } -TEST_F(ArenaTest, ConcurrentManagedNew) { +TEST(ArenaTest, ConcurrentManagedNew) { concurrent_test_args args; gpr_event_init(&args.ev_start); - args.arena = Arena::Create(1024, &memory_allocator_); + args.arena = SimpleArenaAllocator()->MakeArena(); Thread thds[CONCURRENT_TEST_THREADS]; @@ -172,8 +158,6 @@ TEST_F(ArenaTest, ConcurrentManagedNew) { for (auto& th : thds) { th.Join(); } - - args.arena->Destroy(); } template @@ -191,31 +175,11 @@ bool IsScribbled(Int* ints, int n, int offset) { return true; } -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC -TEST_F(ArenaTest, PooledObjectsArePooled) { +TEST(ArenaTest, CreateManyObjects) { struct TestObj { char a[100]; }; - - auto arena = MakeScopedArena(1024, &memory_allocator_); - auto obj = arena->MakePooled(); - Scribble(obj->a, 100, 1); - EXPECT_TRUE(IsScribbled(obj->a, 100, 1)); - void* p = obj.get(); - obj.reset(); - obj = arena->MakePooled(); - EXPECT_FALSE(IsScribbled(obj->a, 100, 1)); - EXPECT_EQ(p, obj.get()); - Scribble(obj->a, 100, 2); - EXPECT_TRUE(IsScribbled(obj->a, 100, 2)); -} -#endif - -TEST_F(ArenaTest, CreateManyObjects) { - struct TestObj { - char a[100]; - }; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); std::vector> objs; objs.reserve(1000); for (int i = 0; i < 1000; i++) { @@ -227,9 +191,9 @@ TEST_F(ArenaTest, CreateManyObjects) { } } -TEST_F(ArenaTest, CreateManyObjectsWithDestructors) { +TEST(ArenaTest, CreateManyObjectsWithDestructors) { using TestObj = std::unique_ptr; - auto arena = MakeScopedArena(1024, &memory_allocator_); + auto arena = SimpleArenaAllocator()->MakeArena(); std::vector> objs; objs.reserve(1000); for (int i = 0; i < 1000; i++) { @@ -237,24 +201,20 @@ TEST_F(ArenaTest, CreateManyObjectsWithDestructors) { } } -TEST_F(ArenaTest, CreatePoolArray) { - auto arena = MakeScopedArena(1024, &memory_allocator_); +TEST(ArenaTest, CreatePoolArray) { + auto arena = SimpleArenaAllocator()->MakeArena(); auto p = arena->MakePooledArray(1024); -#ifndef GRPC_ARENA_POOLED_ALLOCATIONS_USE_MALLOC - EXPECT_FALSE(p.get_deleter().has_freelist()); -#else EXPECT_TRUE(p.get_deleter().has_freelist()); -#endif p = arena->MakePooledArray(5); EXPECT_TRUE(p.get_deleter().has_freelist()); Scribble(p.get(), 5, 1); EXPECT_TRUE(IsScribbled(p.get(), 5, 1)); } -TEST_F(ArenaTest, ConcurrentMakePooled) { +TEST(ArenaTest, ConcurrentMakePooled) { concurrent_test_args args; gpr_event_init(&args.ev_start); - args.arena = Arena::Create(1024, &memory_allocator_); + args.arena = SimpleArenaAllocator()->MakeArena(); class BaseClass { public: @@ -309,8 +269,6 @@ TEST_F(ArenaTest, ConcurrentMakePooled) { for (auto& th : thds2) { th.Join(); } - - args.arena->Destroy(); } } // namespace grpc_core diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 35e1aad2be8..0e3ed6b59c0 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -515,9 +515,7 @@ class RequestMetadataState : public RefCounted { grpc_error_handle expected_error_; std::string expected_; - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - ScopedArenaPtr arena_ = MakeScopedArena(1024, &memory_allocator_); + RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); grpc_metadata_batch md_; grpc_call_credentials::GetRequestMetadataArgs get_request_metadata_args_; grpc_polling_entity pollent_; diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index 9bc6845db86..b135ac3eef2 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -51,11 +51,7 @@ char* grpc_test_fetch_oauth2_token_with_credentials( auto pops = grpc_polling_entity_create_from_pollset(pollset); bool is_done = false; grpc_core::Notification done; - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); + auto arena = grpc_core::SimpleArenaAllocator()->MakeArena(); grpc_metadata_batch initial_metadata; char* token = nullptr; diff --git a/test/core/surface/channel_init_test.cc b/test/core/surface/channel_init_test.cc index a548b221eac..67c35c482fd 100644 --- a/test/core/surface/channel_init_test.cc +++ b/test/core/surface/channel_init_test.cc @@ -268,7 +268,7 @@ TEST(ChannelInitTest, CanCreateFilterWithCall) { "test"), 1024); auto call = MakeCallPair(Arena::MakePooled(), nullptr, - allocator->MakeArena(), allocator, nullptr); + allocator->MakeArena(), nullptr); (*stack)->StartCall(std::move(call.handler)); EXPECT_EQ(p, 1); EXPECT_EQ(handled, 1); diff --git a/test/core/telemetry/call_tracer_test.cc b/test/core/telemetry/call_tracer_test.cc index 3adfb0903d5..3adbc5d6204 100644 --- a/test/core/telemetry/call_tracer_test.cc +++ b/test/core/telemetry/call_tracer_test.cc @@ -37,20 +37,7 @@ namespace { class CallTracerTest : public ::testing::Test { protected: - void SetUp() override { - memory_allocator_ = new MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "test")); - arena_ = Arena::Create(1024, memory_allocator_); - } - - void TearDown() override { - arena_->Destroy(); - delete memory_allocator_; - } - - MemoryAllocator* memory_allocator_ = nullptr; - Arena* arena_ = nullptr; + RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); grpc_call_context_element context_[GRPC_CONTEXT_COUNT] = {}; std::vector annotation_logger_; }; @@ -65,7 +52,7 @@ TEST_F(CallTracerTest, BasicClientCallTracer) { } TEST_F(CallTracerTest, MultipleClientCallTracers) { - promise_detail::Context arena_ctx(arena_); + promise_detail::Context arena_ctx(arena_.get()); FakeClientCallTracer client_call_tracer1(&annotation_logger_); FakeClientCallTracer client_call_tracer2(&annotation_logger_); FakeClientCallTracer client_call_tracer3(&annotation_logger_); @@ -80,7 +67,7 @@ TEST_F(CallTracerTest, MultipleClientCallTracers) { } TEST_F(CallTracerTest, MultipleClientCallAttemptTracers) { - promise_detail::Context arena_ctx(arena_); + promise_detail::Context arena_ctx(arena_.get()); FakeClientCallTracer client_call_tracer1(&annotation_logger_); FakeClientCallTracer client_call_tracer2(&annotation_logger_); FakeClientCallTracer client_call_tracer3(&annotation_logger_); @@ -110,7 +97,7 @@ TEST_F(CallTracerTest, BasicServerCallTracerTest) { } TEST_F(CallTracerTest, MultipleServerCallTracers) { - promise_detail::Context arena_ctx(arena_); + promise_detail::Context arena_ctx(arena_.get()); FakeServerCallTracer server_call_tracer1(&annotation_logger_); FakeServerCallTracer server_call_tracer2(&annotation_logger_); FakeServerCallTracer server_call_tracer3(&annotation_logger_); diff --git a/test/core/transport/binder/binder_transport_test.cc b/test/core/transport/binder/binder_transport_test.cc index 24ddd071b77..933648a6a22 100644 --- a/test/core/transport/binder/binder_transport_test.cc +++ b/test/core/transport/binder/binder_transport_test.cc @@ -64,7 +64,6 @@ class BinderTransportTest : public ::testing::Test { gbs->~grpc_binder_stream(); gpr_free(gbs); } - arena_->Destroy(); } void PerformStreamOp(grpc_binder_stream* gbs, @@ -81,7 +80,7 @@ class BinderTransportTest : public ::testing::Test { grpc_binder_stream* gbs = static_cast( gpr_malloc(transport_->filter_stack_transport()->SizeOfStream())); transport_->filter_stack_transport()->InitStream( - reinterpret_cast(gbs), &ref_, nullptr, arena_); + reinterpret_cast(gbs), &ref_, nullptr, arena_.get()); stream_buffer_.push_back(gbs); return gbs; } @@ -95,12 +94,8 @@ class BinderTransportTest : public ::testing::Test { static void TearDownTestSuite() { grpc_shutdown(); } protected: - grpc_core::MemoryAllocator memory_allocator_ = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - grpc_core::Arena* arena_ = - grpc_core::Arena::Create(/* initial_size = */ 1, &memory_allocator_); + grpc_core::RefCountedPtr arena_ = + grpc_core::SimpleArenaAllocator()->MakeArena(); grpc_core::Transport* transport_; grpc_stream_refcount ref_; std::vector stream_buffer_; @@ -234,12 +229,6 @@ struct MakeSendInitialMetadata { } ~MakeSendInitialMetadata() {} - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - grpc_core::ScopedArenaPtr arena = - grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch grpc_initial_metadata; }; @@ -269,8 +258,6 @@ struct MakeSendTrailingMetadata { grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() ->memory_quota() ->CreateMemoryAllocator("test")); - grpc_core::ScopedArenaPtr arena = - grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch grpc_trailing_metadata; }; @@ -297,8 +284,6 @@ struct MakeRecvInitialMetadata { grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() ->memory_quota() ->CreateMemoryAllocator("test")); - grpc_core::ScopedArenaPtr arena = - grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch grpc_initial_metadata; grpc_core::Notification notification; }; @@ -345,8 +330,6 @@ struct MakeRecvTrailingMetadata { grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() ->memory_quota() ->CreateMemoryAllocator("test")); - grpc_core::ScopedArenaPtr arena = - grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch grpc_trailing_metadata; grpc_core::Notification notification; }; diff --git a/test/core/transport/call_filters_test.cc b/test/core/transport/call_filters_test.cc index 750f16b2ec1..da58188eec6 100644 --- a/test/core/transport/call_filters_test.cc +++ b/test/core/transport/call_filters_test.cc @@ -407,9 +407,7 @@ TEST(StackDataTest, InstantClientInitialMetadataReturningAbslStatus) { // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -467,9 +465,7 @@ TEST(StackDataTest, // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -526,9 +522,7 @@ TEST(StackDataTest, InstantClientInitialMetadataReturningServerMetadata) { // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -588,9 +582,7 @@ TEST(StackDataTest, // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -648,9 +640,7 @@ TEST(StackDataTest, PromiseClientInitialMetadataReturningAbslStatus) { // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -731,9 +721,7 @@ TEST(StackDataTest, // Check promise init void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); d.filter_constructor[0].call_init(call_data, &f1); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); promise_detail::Context ctx(arena.get()); // A succeeding call @@ -801,9 +789,7 @@ TEST(StackDataTest, InstantServerInitialMetadataReturningVoid) { EXPECT_EQ(d.server_initial_metadata.ops[0].poll, nullptr); EXPECT_EQ(d.server_initial_metadata.ops[0].early_destroy, nullptr); // Check promise init - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); EXPECT_EQ(md->get_pointer(HttpPathMetadata()), nullptr); char call_data; @@ -838,9 +824,7 @@ TEST(StackDataTest, InstantClientToServerMessagesReturningVoid) { EXPECT_EQ(d.client_to_server_messages.ops[0].poll, nullptr); EXPECT_EQ(d.client_to_server_messages.ops[0].early_destroy, nullptr); // Check promise init - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto message = Arena::MakePooled(SliceBuffer(), 0); char call_data; auto r = d.client_to_server_messages.ops[0].promise_init( @@ -873,9 +857,7 @@ TEST(StackDataTest, InstantServerToClientMessagesReturningVoid) { EXPECT_EQ(d.server_to_client_messages.ops[0].poll, nullptr); EXPECT_EQ(d.server_to_client_messages.ops[0].early_destroy, nullptr); // Check promise init - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto message = Arena::MakePooled(SliceBuffer(), 0); char call_data; auto r = d.server_to_client_messages.ops[0].promise_init( @@ -908,9 +890,7 @@ TEST(StackDataTest, InstantServerTrailingMetadataReturningVoid) { EXPECT_EQ(d.server_trailing_metadata.ops[0].poll, nullptr); EXPECT_EQ(d.server_trailing_metadata.ops[0].early_destroy, nullptr); // Check promise init - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); EXPECT_EQ(md->get_pointer(HttpPathMetadata()), nullptr); char call_data; @@ -948,9 +928,7 @@ TEST(StackDataTest, EXPECT_EQ(d.server_trailing_metadata.ops[0].poll, nullptr); EXPECT_EQ(d.server_trailing_metadata.ops[0].early_destroy, nullptr); // Check promise init - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); auto md = Arena::MakePooled(); EXPECT_EQ(md->get_pointer(HttpPathMetadata()), nullptr); char call_data; @@ -1038,9 +1016,7 @@ TEST(OperationExecutorTest, InstantTwo) { d.filter_constructor[0].call_init(call_data1, &f1); d.filter_constructor[1].call_init(call_data2, &f2); OperationExecutor transformer; - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); promise_detail::Context ctx(arena.get()); // First call succeeds auto md = Arena::MakePooled(); @@ -1103,9 +1079,7 @@ TEST(OperationExecutorTest, PromiseTwo) { d.filter_constructor[0].call_init(call_data1, &f1); d.filter_constructor[1].call_init(call_data2, &f2); OperationExecutor transformer; - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); promise_detail::Context ctx(arena.get()); // First call succeeds after two sets of two step delays. auto md = Arena::MakePooled(); @@ -1175,9 +1149,7 @@ TEST(InfallibleOperationExecutor, InstantTwo) { ASSERT_EQ(d.server_trailing_metadata.ops.size(), 2u); void* call_data = gpr_malloc_aligned(d.call_data_size, d.call_data_alignment); InfallibleOperationExecutor transformer; - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); promise_detail::Context ctx(arena.get()); auto md = Arena::MakePooled(); EXPECT_EQ(md->get_pointer(HttpPathMetadata()), nullptr); @@ -1381,9 +1353,7 @@ TEST(CallFiltersTest, UnaryCall) { CallFilters::StackBuilder builder; builder.Add(&f1); builder.Add(&f2); - auto memory_allocator = - MakeMemoryQuota("test-quota")->CreateMemoryAllocator("foo"); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); CallFilters filters(Arena::MakePooled()); filters.SetStack(builder.Build()); promise_detail::Context ctx(arena.get()); diff --git a/test/core/transport/chaotic_good/client_transport_error_test.cc b/test/core/transport/chaotic_good/client_transport_error_test.cc index 737f71a7aa2..0dcc5595c07 100644 --- a/test/core/transport/chaotic_good/client_transport_error_test.cc +++ b/test/core/transport/chaotic_good/client_transport_error_test.cc @@ -141,9 +141,8 @@ class ClientTransportTest : public ::testing::Test { } auto MakeCall(ClientMetadataHandle client_initial_metadata) { - auto* arena = call_arena_allocator_->MakeArena(); return MakeCallPair(std::move(client_initial_metadata), event_engine_.get(), - arena, call_arena_allocator_, nullptr); + call_arena_allocator_->MakeArena(), nullptr); } private: diff --git a/test/core/transport/chaotic_good/frame_fuzzer.cc b/test/core/transport/chaotic_good/frame_fuzzer.cc index d8e2e4499fb..92dc762e4ac 100644 --- a/test/core/transport/chaotic_good/frame_fuzzer.cc +++ b/test/core/transport/chaotic_good/frame_fuzzer.cc @@ -103,9 +103,7 @@ void Run(const frame_fuzzer::Test& test) { LOG(INFO) << "Read frame header: " << r->ToString(); control_data += 24; control_size -= 24; - MemoryAllocator memory_allocator = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); TestContext ctx(arena.get()); BufferPair buffers{ SliceBuffer(Slice::FromCopiedBuffer(control_data, control_size)), diff --git a/test/core/transport/chaotic_good/frame_test.cc b/test/core/transport/chaotic_good/frame_test.cc index 15389751a76..ba61e0b9f0c 100644 --- a/test/core/transport/chaotic_good/frame_test.cc +++ b/test/core/transport/chaotic_good/frame_test.cc @@ -50,7 +50,7 @@ void AssertRoundTrips(const T& input, FrameType expected_frame_type) { MemoryAllocator allocator = MakeResourceQuota("test-quota") ->memory_quota() ->CreateMemoryAllocator("test-allocator"); - ScopedArenaPtr arena = MakeScopedArena(1024, &allocator); + RefCountedPtr arena = SimpleArenaAllocator()->MakeArena(); auto deser = output.Deserialize(&hpack_parser, header.value(), absl::BitGenRef(bitgen), arena.get(), std::move(serialized), TestFrameLimits()); diff --git a/test/core/transport/chaotic_good/transport_test.h b/test/core/transport/chaotic_good/transport_test.h index 3604be1f190..a67a5ca7065 100644 --- a/test/core/transport/chaotic_good/transport_test.h +++ b/test/core/transport/chaotic_good/transport_test.h @@ -36,16 +36,17 @@ class TransportTest : public ::testing::Test { return event_engine_; } - Arena* MakeArena() { return call_arena_allocator_->MakeArena(); } + RefCountedPtr MakeArena() { + return call_arena_allocator_->MakeArena(); + } RefCountedPtr call_arena_allocator() { return call_arena_allocator_; } auto MakeCall(ClientMetadataHandle client_initial_metadata) { - auto* arena = call_arena_allocator_->MakeArena(); return MakeCallPair(std::move(client_initial_metadata), event_engine_.get(), - arena, call_arena_allocator_, nullptr); + MakeArena(), nullptr); } private: diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 28668b730da..68a3e4fd93b 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -153,12 +153,6 @@ grpc_slice EncodeHeaderIntoBytes( const std::vector>& header_fields) { std::unique_ptr compressor = std::make_unique(); - - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; for (const auto& field : header_fields) { @@ -307,7 +301,6 @@ static void verify_continuation_headers(const char* key, const char* value, grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() ->memory_quota() ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_slice_buffer output; grpc_metadata_batch b; b.Append(key, grpc_core::Slice::FromStaticString(value), CrashOnAppendError); @@ -344,11 +337,6 @@ TEST(HpackEncoderTest, TestContinuationHeaders) { } TEST(HpackEncoderTest, EncodeBinaryAsBase64) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; // Haiku by Bard b.Append("grpc-trace-bin", @@ -374,11 +362,6 @@ TEST(HpackEncoderTest, EncodeBinaryAsBase64) { } TEST(HpackEncoderTest, EncodeBinaryAsTrueBinary) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; // Haiku by Bard b.Append("grpc-trace-bin", diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index 44edee9f029..1b21b228935 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -69,7 +69,7 @@ DEFINE_PROTO_FUZZER(const hpack_parser_fuzzer::Msg& msg) { bool can_update_max_length = true; bool can_add_priority = true; for (int i = 0; i < msg.frames_size(); i++) { - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); + auto arena = grpc_core::SimpleArenaAllocator()->MakeArena(); grpc_core::ExecCtx exec_ctx; grpc_metadata_batch b; const auto& frame = msg.frames(i); diff --git a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc index ab31d065399..4094a669b3c 100644 --- a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc @@ -82,9 +82,7 @@ bool IsStreamError(const absl::Status& status) { absl::StatusOr TestVector(grpc_slice_split_mode mode, Slice input) { - MemoryAllocator memory_allocator = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); - auto arena = MakeScopedArena(1024, &memory_allocator); + auto arena = SimpleArenaAllocator()->MakeArena(); ExecCtx exec_ctx; grpc_slice* slices; size_t nslices; diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index ffed5b8ab52..d735ebc2b7c 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -107,10 +107,6 @@ class ParseTest : public ::testing::TestWithParam { absl::optional max_metadata_size, std::string hexstring, absl::StatusOr expect, uint32_t flags) { - MemoryAllocator memory_allocator = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "test")); - auto arena = MakeScopedArena(1024, &memory_allocator); ExecCtx exec_ctx; auto input = ParseHexstring(hexstring); grpc_slice* slices; diff --git a/test/core/transport/chttp2/hpack_sync_fuzzer.cc b/test/core/transport/chttp2/hpack_sync_fuzzer.cc index 31372ab876c..230ddc8a5cb 100644 --- a/test/core/transport/chttp2/hpack_sync_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_sync_fuzzer.cc @@ -117,10 +117,6 @@ void FuzzOneInput(const hpack_sync_fuzzer::Msg& msg) { // STAGE 2: Decode the buffer (encode_output) into a list of headers HPackParser parser; - auto memory_allocator = - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( - "test-allocator"); - auto arena = MakeScopedArena(1024, &memory_allocator); ExecCtx exec_ctx; grpc_metadata_batch read_metadata; parser.BeginFrame( diff --git a/test/core/transport/interception_chain_test.cc b/test/core/transport/interception_chain_test.cc index ba0b42d7f99..0763ab01a81 100644 --- a/test/core/transport/interception_chain_test.cc +++ b/test/core/transport/interception_chain_test.cc @@ -230,9 +230,8 @@ class InterceptionChainTest : public ::testing::Test { // Run a call through a UnstartedCallDestination until it's complete. FinishedCall RunCall(UnstartedCallDestination* destination) { - auto* arena = call_arena_allocator_->MakeArena(); auto call = MakeCallPair(Arena::MakePooled(), nullptr, - arena, call_arena_allocator_, nullptr); + call_arena_allocator_->MakeArena(), nullptr); Poll trailing_md; call.initiator.SpawnInfallible( "run_call", [destination, &call, &trailing_md]() mutable { diff --git a/test/core/transport/metadata_map_test.cc b/test/core/transport/metadata_map_test.cc index 5a3fb59c16b..12e42c7167a 100644 --- a/test/core/transport/metadata_map_test.cc +++ b/test/core/transport/metadata_map_test.cc @@ -56,24 +56,11 @@ struct StreamNetworkStateMetadataMap GrpcStreamNetworkState>::MetadataMap; }; -class MetadataMapTest : public ::testing::Test { - protected: - MemoryAllocator memory_allocator_ = MemoryAllocator( - ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator("test")); -}; - -TEST_F(MetadataMapTest, Noop) { - auto arena = MakeScopedArena(1024, &memory_allocator_); - EmptyMetadataMap(); -} +TEST(MetadataMapTest, Noop) { EmptyMetadataMap(); } -TEST_F(MetadataMapTest, NoopWithDeadline) { - auto arena = MakeScopedArena(1024, &memory_allocator_); - TimeoutOnlyMetadataMap(); -} +TEST(MetadataMapTest, NoopWithDeadline) { TimeoutOnlyMetadataMap(); } -TEST_F(MetadataMapTest, SimpleOps) { - auto arena = MakeScopedArena(1024, &memory_allocator_); +TEST(MetadataMapTest, SimpleOps) { TimeoutOnlyMetadataMap map; EXPECT_EQ(map.get_pointer(GrpcTimeoutMetadata()), nullptr); EXPECT_EQ(map.get(GrpcTimeoutMetadata()), absl::nullopt); @@ -110,17 +97,15 @@ class FakeEncoder { std::string output_; }; -TEST_F(MetadataMapTest, EmptyEncodeTest) { +TEST(MetadataMapTest, EmptyEncodeTest) { FakeEncoder encoder; - auto arena = MakeScopedArena(1024, &memory_allocator_); TimeoutOnlyMetadataMap map; map.Encode(&encoder); EXPECT_EQ(encoder.output(), ""); } -TEST_F(MetadataMapTest, TimeoutEncodeTest) { +TEST(MetadataMapTest, TimeoutEncodeTest) { FakeEncoder encoder; - auto arena = MakeScopedArena(1024, &memory_allocator_); TimeoutOnlyMetadataMap map; map.Set(GrpcTimeoutMetadata(), Timestamp::FromMillisecondsAfterProcessEpoch(1234)); @@ -128,13 +113,12 @@ TEST_F(MetadataMapTest, TimeoutEncodeTest) { EXPECT_EQ(encoder.output(), "grpc-timeout: deadline=1234\n"); } -TEST_F(MetadataMapTest, NonEncodableTrait) { +TEST(MetadataMapTest, NonEncodableTrait) { struct EncoderWithNoTraitEncodeFunctions { void Encode(const Slice&, const Slice&) { abort(); // should not be called } }; - auto arena = MakeScopedArena(1024, &memory_allocator_); StreamNetworkStateMetadataMap map; map.Set(GrpcStreamNetworkState(), GrpcStreamNetworkState::kNotSentOnWire); EXPECT_EQ(map.get(GrpcStreamNetworkState()), diff --git a/test/cpp/microbenchmarks/bm_arena.cc b/test/cpp/microbenchmarks/bm_arena.cc index f5f8bba1a13..98b9b080354 100644 --- a/test/cpp/microbenchmarks/bm_arena.cc +++ b/test/cpp/microbenchmarks/bm_arena.cc @@ -26,50 +26,36 @@ #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" -using grpc_core::Arena; - static void BM_Arena_NoOp(benchmark::State& state) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); + auto factory = grpc_core::SimpleArenaAllocator(); for (auto _ : state) { - Arena::Create(state.range(0), &memory_allocator)->Destroy(); + factory->MakeArena(); } } BENCHMARK(BM_Arena_NoOp)->Range(1, 1024 * 1024); static void BM_Arena_ManyAlloc(benchmark::State& state) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - Arena* a = Arena::Create(state.range(0), &memory_allocator); + auto allocator = grpc_core::SimpleArenaAllocator(state.range(0)); + auto a = allocator->MakeArena(); const size_t realloc_after = 1024 * 1024 * 1024 / ((state.range(1) + 15) & 0xffffff0u); while (state.KeepRunning()) { a->Alloc(state.range(1)); // periodically recreate arena to avoid OOM if (state.iterations() % realloc_after == 0) { - a->Destroy(); - a = Arena::Create(state.range(0), &memory_allocator); + a = allocator->MakeArena(); } } - a->Destroy(); } BENCHMARK(BM_Arena_ManyAlloc)->Ranges({{1, 1024 * 1024}, {1, 32 * 1024}}); static void BM_Arena_Batch(benchmark::State& state) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); + auto allocator = grpc_core::SimpleArenaAllocator(state.range(0)); for (auto _ : state) { - Arena* a = Arena::Create(state.range(0), &memory_allocator); + auto a = allocator->MakeArena(); for (int i = 0; i < state.range(1); i++) { a->Alloc(state.range(2)); } - a->Destroy(); } } BENCHMARK(BM_Arena_Batch)->Ranges({{1, 64 * 1024}, {1, 64}, {1, 1024}}); @@ -82,30 +68,20 @@ struct TestThingToAllocate { }; static void BM_Arena_MakePooled_Small(benchmark::State& state) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - Arena* a = Arena::Create(1024, &memory_allocator); + auto a = grpc_core::SimpleArenaAllocator()->MakeArena(); for (auto _ : state) { a->MakePooled(); } - a->Destroy(); } BENCHMARK(BM_Arena_MakePooled_Small); static void BM_Arena_MakePooled3_Small(benchmark::State& state) { - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - Arena* a = Arena::Create(1024, &memory_allocator); + auto a = grpc_core::SimpleArenaAllocator()->MakeArena(); for (auto _ : state) { auto x = a->MakePooled(); auto y = a->MakePooled(); auto z = a->MakePooled(); } - a->Destroy(); } BENCHMARK(BM_Arena_MakePooled3_Small); diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 9c752a6342f..2f18b1de233 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -75,7 +75,6 @@ static void BM_HpackEncoderEncodeDeadline(benchmark::State& state) { grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() ->memory_quota() ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; b.Set(grpc_core::GrpcTimeoutMetadata(), saved_now + grpc_core::Duration::Seconds(30)); @@ -107,11 +106,6 @@ static void BM_HpackEncoderEncodeHeader(benchmark::State& state) { grpc_core::ExecCtx exec_ctx; static bool logged_representative_output = false; - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; Fixture::Prepare(&b); @@ -345,12 +339,6 @@ static void BM_HpackParserParseHeader(benchmark::State& state) { std::vector benchmark_slices = Fixture::GetBenchmarkSlices(); grpc_core::ExecCtx exec_ctx; grpc_core::HPackParser p; - const int kArenaSize = 4096 * 4096; - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto* arena = grpc_core::Arena::Create(kArenaSize, &memory_allocator); grpc_core::ManualConstructor b; b.Init(); p.BeginFrame(&*b, std::numeric_limits::max(), @@ -373,25 +361,11 @@ static void BM_HpackParserParseHeader(benchmark::State& state) { b->Clear(); parse_vec(benchmark_slices); grpc_core::ExecCtx::Get()->Flush(); - // Recreate arena every 4k iterations to avoid oom - if (0 == (state.iterations() & 0xfff)) { - b.Destroy(); - arena->Destroy(); - arena = grpc_core::Arena::Create(kArenaSize, &memory_allocator); - b.Init(); - p.BeginFrame(&*b, std::numeric_limits::max(), - std::numeric_limits::max(), - grpc_core::HPackParser::Boundary::None, - grpc_core::HPackParser::Priority::None, - grpc_core::HPackParser::LogInfo{ - 1, grpc_core::HPackParser::LogInfo::kHeaders, false}); - } } // Clean up b.Destroy(); for (auto slice : init_slices) grpc_slice_unref(slice); for (auto slice : benchmark_slices) grpc_slice_unref(slice); - arena->Destroy(); } namespace hpack_parser_fixtures { @@ -405,12 +379,6 @@ class FromEncoderFixture { private: static std::vector Generate(int iteration) { grpc_core::ExecCtx exec_ctx; - - grpc_core::MemoryAllocator memory_allocator = - grpc_core::MemoryAllocator(grpc_core::ResourceQuota::Default() - ->memory_quota() - ->CreateMemoryAllocator("test")); - auto arena = grpc_core::MakeScopedArena(1024, &memory_allocator); grpc_metadata_batch b; EncoderFixture::Prepare(&b); From 766813f164be580e6edb74f30ca8ec504bd634f8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 May 2024 14:21:22 -0700 Subject: [PATCH 18/20] [arena] Add a test for FinalizeArena being called (#36772) Built on #36758 which should be merged first Closes #36772 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36772 from ctiller:arena-test 3cded84c73580fd227fce9f1a4109ce2956e7bbb PiperOrigin-RevId: 638781890 --- test/core/resource_quota/arena_test.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/core/resource_quota/arena_test.cc b/test/core/resource_quota/arena_test.cc index 27ea809eddc..cd3d3f55f8d 100644 --- a/test/core/resource_quota/arena_test.cc +++ b/test/core/resource_quota/arena_test.cc @@ -29,6 +29,7 @@ #include #include "absl/strings/str_join.h" +#include "gmock/gmock.h" #include "gtest/gtest.h" #include @@ -40,6 +41,8 @@ #include "src/core/lib/resource_quota/resource_quota.h" #include "test/core/test_util/test_config.h" +using testing::StrictMock; + namespace grpc_core { struct AllocShape { @@ -271,6 +274,23 @@ TEST(ArenaTest, ConcurrentMakePooled) { } } +class MockArenaFactory : public ArenaFactory { + public: + MockArenaFactory() + : ArenaFactory( + ResourceQuota::Default()->memory_quota()->CreateMemoryAllocator( + "test")) {} + MOCK_METHOD(RefCountedPtr, MakeArena, (), (override)); + MOCK_METHOD(void, FinalizeArena, (Arena * arena), (override)); +}; + +TEST(ArenaTest, FinalizeArenaIsCalled) { + auto factory = MakeRefCounted>(); + auto arena = Arena::Create(1, factory); + EXPECT_CALL(*factory, FinalizeArena(arena.get())); + arena.reset(); +} + } // namespace grpc_core int main(int argc, char* argv[]) { From 3562094389a13fbcaa96db0456bfbec581c92b4f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 May 2024 15:46:56 -0700 Subject: [PATCH 19/20] [arena+context] Begin merging the concepts of context and arenas for calls (#36773) Add a dynamic registration mechanism for a new kind of context: one that lives in an arena. An upcoming set of changes will move all of the legacy context types into this mechanism. It's likely we'll move other promise based context types to this mechanism also, until the only promise-based context type is `Arena`. Closes #36773 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36773 from ctiller:transport-refs-7.8 e6892031ca32baf54881e47e8561eba85a4a08e6 PiperOrigin-RevId: 638810722 --- src/core/lib/resource_quota/arena.cc | 38 ++++++---- src/core/lib/resource_quota/arena.h | 84 ++++++++++++++++++++- src/core/lib/resource_quota/memory_quota.cc | 6 +- test/core/resource_quota/arena_test.cc | 18 +++++ 4 files changed, 125 insertions(+), 21 deletions(-) diff --git a/src/core/lib/resource_quota/arena.cc b/src/core/lib/resource_quota/arena.cc index 2f9e3c851e5..e30bd1047ca 100644 --- a/src/core/lib/resource_quota/arena.cc +++ b/src/core/lib/resource_quota/arena.cc @@ -21,18 +21,23 @@ #include #include +#include "absl/log/log.h" + #include #include #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/util/alloc.h" +namespace grpc_core { namespace { -void* ArenaStorage(size_t initial_size) { +void* ArenaStorage(size_t& initial_size) { static constexpr size_t base_size = - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(grpc_core::Arena)); + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(Arena)); initial_size = GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_size); + initial_size = std::max(initial_size, + arena_detail::BaseArenaContextTraits::ContextSize()); size_t alloc_size = base_size + initial_size; static constexpr size_t alignment = (GPR_CACHELINE_SIZE > GPR_MAX_ALIGNMENT && @@ -44,9 +49,11 @@ void* ArenaStorage(size_t initial_size) { } // namespace -namespace grpc_core { - Arena::~Arena() { + for (size_t i = 0; i < arena_detail::BaseArenaContextTraits::NumContexts(); + ++i) { + arena_detail::BaseArenaContextTraits::Destroy(i, contexts()[i]); + } DestroyManagedNewObjects(); arena_factory_->FinalizeArena(this); arena_factory_->allocator().Release( @@ -58,24 +65,25 @@ Arena::~Arena() { gpr_free_aligned(z); z = prev_z; } -#ifdef GRPC_ARENA_TRACE_POOLED_ALLOCATIONS - gpr_log(GPR_ERROR, "DESTRUCT_ARENA %p", this); -#endif } RefCountedPtr Arena::Create(size_t initial_size, RefCountedPtr arena_factory) { - return RefCountedPtr(new (ArenaStorage(initial_size)) Arena( - initial_size, 0, std::move(arena_factory))); + void* p = ArenaStorage(initial_size); + return RefCountedPtr( + new (p) Arena(initial_size, std::move(arena_factory))); } -Arena::Arena(size_t initial_size, size_t initial_alloc, - RefCountedPtr arena_factory) - : total_used_(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)), - initial_zone_size_(initial_size), +Arena::Arena(size_t initial_size, RefCountedPtr arena_factory) + : initial_zone_size_(initial_size), + total_used_(arena_detail::BaseArenaContextTraits::ContextSize()), arena_factory_(std::move(arena_factory)) { - arena_factory_->allocator().Reserve( - GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)); + for (size_t i = 0; i < arena_detail::BaseArenaContextTraits::NumContexts(); + ++i) { + contexts()[i] = nullptr; + } + CHECK_GE(initial_size, arena_detail::BaseArenaContextTraits::ContextSize()); + arena_factory_->allocator().Reserve(initial_size); } void Arena::DestroyManagedNewObjects() { diff --git a/src/core/lib/resource_quota/arena.h b/src/core/lib/resource_quota/arena.h index 61fc917badf..0b92e4b5b74 100644 --- a/src/core/lib/resource_quota/arena.h +++ b/src/core/lib/resource_quota/arena.h @@ -44,8 +44,59 @@ namespace grpc_core { class Arena; +template +struct ArenaContextType; + namespace arena_detail { +// Tracks all registered arena context types (these should only be registered +// via ArenaContextTraits at static initialization time). +class BaseArenaContextTraits { + public: + // Count of number of contexts that have been allocated. + static uint16_t NumContexts() { + return static_cast(RegisteredTraits().size()); + } + + // Number of bytes required to store the context pointers on an arena. + static size_t ContextSize() { return NumContexts() * sizeof(void*); } + + // Call the registered destruction function for a context. + static void Destroy(uint16_t id, void* ptr) { + if (ptr == nullptr) return; + RegisteredTraits()[id](ptr); + } + + protected: + // Allocate a new context id and register the destruction function. + static uint16_t MakeId(void (*destroy)(void* ptr)) { + auto& traits = RegisteredTraits(); + const uint16_t id = static_cast(traits.size()); + traits.push_back(destroy); + return id; + } + + private: + static std::vector& RegisteredTraits() { + static NoDestruct> registered_traits; + return *registered_traits; + } +}; + +// Traits for a specific context type. +template +class ArenaContextTraits : public BaseArenaContextTraits { + public: + static uint16_t id() { return id_; } + + private: + static const uint16_t id_; +}; + +template +const uint16_t ArenaContextTraits::id_ = BaseArenaContextTraits::MakeId( + [](void* ptr) { ArenaContextType::Destroy(static_cast(ptr)); }); + template struct IfArray { using Result = A; @@ -215,6 +266,21 @@ class Arena final : public RefCounted + T* GetContext() { + return static_cast( + contexts()[arena_detail::ArenaContextTraits::id()]); + } + + template + void SetContext(T* context) { + void*& slot = contexts()[arena_detail::ArenaContextTraits::id()]; + if (slot != nullptr) { + ArenaContextType::Destroy(static_cast(slot)); + } + slot = context; + } + private: friend struct arena_detail::UnrefDestroy; @@ -247,19 +313,20 @@ class Arena final : public RefCounted arena_factory); ~Arena(); void* AllocZone(size_t size); void Destroy() const; + void** contexts() { return reinterpret_cast(this + 1); } // Keep track of the total used size. We use this in our call sizing // hysteresis. - std::atomic total_used_{0}; - std::atomic total_allocated_{0}; const size_t initial_zone_size_; + std::atomic total_used_; + std::atomic total_allocated_{initial_zone_size_}; // If the initial arena allocation wasn't enough, we allocate additional zones // in a reverse linked list. Each additional zone consists of (1) a pointer to // the zone added before this zone (null if this is the first additional zone) @@ -280,6 +347,17 @@ inline void UnrefDestroy::operator()(const Arena* arena) const { } } // namespace arena_detail +namespace promise_detail { + +template +class Context::Destroy)>> { + public: + static T* get() { return GetContext()->GetContext(); } + static void set(T* value) { GetContext()->SetContext(value); } +}; + +} // namespace promise_detail + } // namespace grpc_core #endif // GRPC_SRC_CORE_LIB_RESOURCE_QUOTA_ARENA_H diff --git a/src/core/lib/resource_quota/memory_quota.cc b/src/core/lib/resource_quota/memory_quota.cc index 79702ce7fff..458597da5da 100644 --- a/src/core/lib/resource_quota/memory_quota.cc +++ b/src/core/lib/resource_quota/memory_quota.cc @@ -253,9 +253,9 @@ GrpcMemoryAllocatorImpl::GrpcMemoryAllocatorImpl( } GrpcMemoryAllocatorImpl::~GrpcMemoryAllocatorImpl() { - CHECK(free_bytes_.load(std::memory_order_acquire) + - sizeof(GrpcMemoryAllocatorImpl) == - taken_bytes_.load(std::memory_order_relaxed)); + CHECK_EQ(free_bytes_.load(std::memory_order_acquire) + + sizeof(GrpcMemoryAllocatorImpl), + taken_bytes_.load(std::memory_order_relaxed)); memory_quota_->Return(taken_bytes_.load(std::memory_order_relaxed)); } diff --git a/test/core/resource_quota/arena_test.cc b/test/core/resource_quota/arena_test.cc index cd3d3f55f8d..83e9721ec8e 100644 --- a/test/core/resource_quota/arena_test.cc +++ b/test/core/resource_quota/arena_test.cc @@ -274,6 +274,24 @@ TEST(ArenaTest, ConcurrentMakePooled) { } } +struct Foo { + explicit Foo(int x) : p(std::make_unique(x)) {} + std::unique_ptr p; +}; + +template <> +struct ArenaContextType { + static void Destroy(Foo* p) { p->~Foo(); } +}; + +TEST(ArenaTest, FooContext) { + auto arena = SimpleArenaAllocator()->MakeArena(); + EXPECT_EQ(arena->GetContext(), nullptr); + arena->SetContext(arena->New(42)); + ASSERT_NE(arena->GetContext(), nullptr); + EXPECT_EQ(*arena->GetContext()->p, 42); +} + class MockArenaFactory : public ArenaFactory { public: MockArenaFactory() From 82756e9ce0b3941dbf49551ca53d9a72eb5ff187 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 30 May 2024 16:21:11 -0700 Subject: [PATCH 20/20] Automated rollback of commit fbd8ebe7cde8761ce88bf848642ee9d4f00cd3c8. PiperOrigin-RevId: 638821486 --- BUILD | 12 ++++---- CMakeLists.txt | 14 +++++----- Makefile | 8 +++--- Package.swift | 16 +++++------ build_autogenerated.yaml | 28 +++++++++---------- config.m4 | 10 +++---- config.w32 | 10 +++---- gRPC-C++.podspec | 16 +++++------ gRPC-Core.podspec | 24 ++++++++-------- grpc.gemspec | 16 +++++------ package.xml | 16 +++++------ src/core/BUILD | 4 +-- src/core/ext/gcp/metadata_query.h | 4 +-- .../chttp2/transport/chttp2_transport.cc | 2 +- .../http_connect/http_connect_handshaker.cc | 4 +-- .../aws_external_account_credentials.cc | 2 +- .../aws_external_account_credentials.h | 4 +-- .../external/external_account_credentials.cc | 4 +-- .../external/external_account_credentials.h | 4 +-- .../url_external_account_credentials.cc | 4 +-- .../url_external_account_credentials.h | 2 +- .../google_default_credentials.cc | 4 +-- .../security/credentials/jwt/jwt_verifier.cc | 6 ++-- .../credentials/oauth2/oauth2_credentials.cc | 2 +- .../credentials/oauth2/oauth2_credentials.h | 4 +-- .../http_client}/format_request.cc | 7 +++-- .../http_client}/format_request.h | 11 ++++---- .../{lib/http => util/http_client}/httpcli.cc | 9 +++--- .../{lib/http => util/http_client}/httpcli.h | 11 ++++---- .../httpcli_security_connector.cc | 3 +- .../http_client}/httpcli_ssl_credentials.h | 9 +++--- .../{lib/http => util/http_client}/parser.cc | 5 ++-- .../{lib/http => util/http_client}/parser.h | 9 +++--- src/python/grpcio/grpc_core_dependencies.py | 8 +++--- .../end2end/fixtures/http_proxy_fixture.cc | 2 +- test/core/http/format_request_test.cc | 4 +-- test/core/http/httpcli_test.cc | 2 +- test/core/http/httpscli_test.cc | 6 ++-- test/core/http/parser_test.cc | 2 +- test/core/http/request_fuzzer.cc | 2 +- test/core/http/response_fuzzer.cc | 2 +- test/core/security/credentials_test.cc | 4 +-- test/core/security/jwt_verifier_test.cc | 2 +- test/core/test_util/port_server_client.cc | 4 +-- tools/doxygen/Doxyfile.c++.internal | 16 +++++------ tools/doxygen/Doxyfile.core.internal | 16 +++++------ 46 files changed, 181 insertions(+), 173 deletions(-) rename src/core/{lib/http => util/http_client}/format_request.cc (97%) rename src/core/{lib/http => util/http_client}/format_request.h (86%) rename src/core/{lib/http => util/http_client}/httpcli.cc (99%) rename src/core/{lib/http => util/http_client}/httpcli.h (98%) rename src/core/{lib/http => util/http_client}/httpcli_security_connector.cc (99%) rename src/core/{lib/http => util/http_client}/httpcli_ssl_credentials.h (85%) rename src/core/{lib/http => util/http_client}/parser.cc (99%) rename src/core/{lib/http => util/http_client}/parser.h (96%) diff --git a/BUILD b/BUILD index 91e125bac85..f2caa63ed0d 100644 --- a/BUILD +++ b/BUILD @@ -3916,14 +3916,14 @@ grpc_cc_library( grpc_cc_library( name = "httpcli", srcs = [ - "//src/core:lib/http/format_request.cc", - "//src/core:lib/http/httpcli.cc", - "//src/core:lib/http/parser.cc", + "//src/core:util/http_client/format_request.cc", + "//src/core:util/http_client/httpcli.cc", + "//src/core:util/http_client/parser.cc", ], hdrs = [ - "//src/core:lib/http/format_request.h", - "//src/core:lib/http/httpcli.h", - "//src/core:lib/http/parser.h", + "//src/core:util/http_client/format_request.h", + "//src/core:util/http_client/httpcli.h", + "//src/core:util/http_client/parser.h", ], external_deps = [ "absl/base:core_headers", diff --git a/CMakeLists.txt b/CMakeLists.txt index c30ffda6257..6595ee1d494 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2315,10 +2315,6 @@ add_library(grpc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/windows/directory_reader.cc src/core/lib/gprpp/work_serializer.cc - src/core/lib/http/format_request.cc - src/core/lib/http/httpcli.cc - src/core/lib/http/httpcli_security_connector.cc - src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -2608,6 +2604,10 @@ add_library(grpc src/core/tsi/ssl_transport_security_utils.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/http_client/format_request.cc + src/core/util/http_client/httpcli.cc + src/core/util/http_client/httpcli_security_connector.cc + src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_util.cc @@ -3109,9 +3109,6 @@ add_library(grpc_unsecure src/core/lib/gprpp/uuid_v4.cc src/core/lib/gprpp/validation_errors.cc src/core/lib/gprpp/work_serializer.cc - src/core/lib/http/format_request.cc - src/core/lib/http/httpcli.cc - src/core/lib/http/parser.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -3329,6 +3326,9 @@ add_library(grpc_unsecure src/core/tsi/local_transport_security.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/http_client/format_request.cc + src/core/util/http_client/httpcli.cc + src/core/util/http_client/parser.cc src/core/util/json/json_object_loader.cc src/core/util/json/json_reader.cc src/core/util/json/json_writer.cc diff --git a/Makefile b/Makefile index 295a09561bc..fc3701d0415 100644 --- a/Makefile +++ b/Makefile @@ -1165,10 +1165,6 @@ LIBGRPC_SRC = \ src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ - src/core/lib/http/format_request.cc \ - src/core/lib/http/httpcli.cc \ - src/core/lib/http/httpcli_security_connector.cc \ - src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -1461,6 +1457,10 @@ LIBGRPC_SRC = \ src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ + src/core/util/http_client/format_request.cc \ + src/core/util/http_client/httpcli.cc \ + src/core/util/http_client/httpcli_security_connector.cc \ + src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ diff --git a/Package.swift b/Package.swift index 87ed22dd266..6b411d73c85 100644 --- a/Package.swift +++ b/Package.swift @@ -1323,14 +1323,6 @@ let package = Package( "src/core/lib/gprpp/work_serializer.cc", "src/core/lib/gprpp/work_serializer.h", "src/core/lib/gprpp/xxhash_inline.h", - "src/core/lib/http/format_request.cc", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.cc", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/httpcli_security_connector.cc", - "src/core/lib/http/httpcli_ssl_credentials.h", - "src/core/lib/http/parser.cc", - "src/core/lib/http/parser.h", "src/core/lib/iomgr/block_annotate.h", "src/core/lib/iomgr/buffer_list.cc", "src/core/lib/iomgr/buffer_list.h", @@ -1924,6 +1916,14 @@ let package = Package( "src/core/util/alloc.h", "src/core/util/android/log.cc", "src/core/util/atm.cc", + "src/core/util/http_client/format_request.cc", + "src/core/util/http_client/format_request.h", + "src/core/util/http_client/httpcli.cc", + "src/core/util/http_client/httpcli.h", + "src/core/util/http_client/httpcli_security_connector.cc", + "src/core/util/http_client/httpcli_ssl_credentials.h", + "src/core/util/http_client/parser.cc", + "src/core/util/http_client/parser.h", "src/core/util/iphone/cpu.cc", "src/core/util/json/json.h", "src/core/util/json/json_args.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index b17bdd226ea..26b1d9d6beb 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -910,10 +910,6 @@ libs: - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h - src/core/lib/gprpp/xxhash_inline.h - - src/core/lib/http/format_request.h - - src/core/lib/http/httpcli.h - - src/core/lib/http/httpcli_ssl_credentials.h - - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -1210,6 +1206,10 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/http_client/format_request.h + - src/core/util/http_client/httpcli.h + - src/core/util/http_client/httpcli_ssl_credentials.h + - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -1731,10 +1731,6 @@ libs: - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/windows/directory_reader.cc - src/core/lib/gprpp/work_serializer.cc - - src/core/lib/http/format_request.cc - - src/core/lib/http/httpcli.cc - - src/core/lib/http/httpcli_security_connector.cc - - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -2024,6 +2020,10 @@ libs: - src/core/tsi/ssl_transport_security_utils.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/http_client/format_request.cc + - src/core/util/http_client/httpcli.cc + - src/core/util/http_client/httpcli_security_connector.cc + - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_util.cc @@ -2453,9 +2453,6 @@ libs: - src/core/lib/gprpp/uuid_v4.h - src/core/lib/gprpp/validation_errors.h - src/core/lib/gprpp/work_serializer.h - - src/core/lib/http/format_request.h - - src/core/lib/http/httpcli.h - - src/core/lib/http/parser.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -2688,6 +2685,9 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/http_client/format_request.h + - src/core/util/http_client/httpcli.h + - src/core/util/http_client/parser.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -2889,9 +2889,6 @@ libs: - src/core/lib/gprpp/uuid_v4.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc - - src/core/lib/http/format_request.cc - - src/core/lib/http/httpcli.cc - - src/core/lib/http/parser.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -3109,6 +3106,9 @@ libs: - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/http_client/format_request.cc + - src/core/util/http_client/httpcli.cc + - src/core/util/http_client/parser.cc - src/core/util/json/json_object_loader.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_writer.cc diff --git a/config.m4 b/config.m4 index 735a0535aa4..695063579c5 100644 --- a/config.m4 +++ b/config.m4 @@ -540,10 +540,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/gprpp/windows/stat.cc \ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ - src/core/lib/http/format_request.cc \ - src/core/lib/http/httpcli.cc \ - src/core/lib/http/httpcli_security_connector.cc \ - src/core/lib/http/parser.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -836,6 +832,10 @@ if test "$PHP_GRPC" != "no"; then src/core/util/alloc.cc \ src/core/util/android/log.cc \ src/core/util/atm.cc \ + src/core/util/http_client/format_request.cc \ + src/core/util/http_client/httpcli.cc \ + src/core/util/http_client/httpcli_security_connector.cc \ + src/core/util/http_client/parser.cc \ src/core/util/iphone/cpu.cc \ src/core/util/json/json_object_loader.cc \ src/core/util/json/json_reader.cc \ @@ -1534,7 +1534,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/linux) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/posix) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/windows) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr/event_engine_shims) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers) @@ -1605,6 +1604,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/ssl/session_cache) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/android) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/http_client) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/iphone) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/json) PHP_ADD_BUILD_DIR($ext_builddir/src/core/util/linux) diff --git a/config.w32 b/config.w32 index d77e8ab6972..85a32dc6704 100644 --- a/config.w32 +++ b/config.w32 @@ -505,10 +505,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\gprpp\\windows\\stat.cc " + "src\\core\\lib\\gprpp\\windows\\thd.cc " + "src\\core\\lib\\gprpp\\work_serializer.cc " + - "src\\core\\lib\\http\\format_request.cc " + - "src\\core\\lib\\http\\httpcli.cc " + - "src\\core\\lib\\http\\httpcli_security_connector.cc " + - "src\\core\\lib\\http\\parser.cc " + "src\\core\\lib\\iomgr\\buffer_list.cc " + "src\\core\\lib\\iomgr\\call_combiner.cc " + "src\\core\\lib\\iomgr\\cfstream_handle.cc " + @@ -801,6 +797,10 @@ if (PHP_GRPC != "no") { "src\\core\\util\\alloc.cc " + "src\\core\\util\\android\\log.cc " + "src\\core\\util\\atm.cc " + + "src\\core\\util\\http_client\\format_request.cc " + + "src\\core\\util\\http_client\\httpcli.cc " + + "src\\core\\util\\http_client\\httpcli_security_connector.cc " + + "src\\core\\util\\http_client\\parser.cc " + "src\\core\\util\\iphone\\cpu.cc " + "src\\core\\util\\json\\json_object_loader.cc " + "src\\core\\util\\json\\json_reader.cc " + @@ -1671,7 +1671,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\linux"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\posix"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\windows"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\http"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr\\event_engine_shims"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers"); @@ -1745,6 +1744,7 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\ssl\\session_cache"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\android"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\http_client"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\iphone"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\json"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\util\\linux"); diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index c3ff293654b..90a2f3849fc 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -1008,10 +1008,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -1309,6 +1305,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -2283,10 +2283,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -2584,6 +2580,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a3fa819e7cb..a8cc8fdda1f 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1442,14 +1442,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/work_serializer.cc', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.cc', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.cc', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_security_connector.cc', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.cc', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/buffer_list.h', @@ -2039,6 +2031,14 @@ Pod::Spec.new do |s| 'src/core/util/alloc.h', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', + 'src/core/util/http_client/format_request.cc', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.cc', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_security_connector.cc', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.cc', + 'src/core/util/http_client/parser.h', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', @@ -3066,10 +3066,6 @@ Pod::Spec.new do |s| 'src/core/lib/gprpp/validation_errors.h', 'src/core/lib/gprpp/work_serializer.h', 'src/core/lib/gprpp/xxhash_inline.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/httpcli_ssl_credentials.h', - 'src/core/lib/http/parser.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -3367,6 +3363,10 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/http_client/format_request.h', + 'src/core/util/http_client/httpcli.h', + 'src/core/util/http_client/httpcli_ssl_credentials.h', + 'src/core/util/http_client/parser.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', diff --git a/grpc.gemspec b/grpc.gemspec index aaaa9738475..5b919662d11 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1329,14 +1329,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/gprpp/work_serializer.cc ) s.files += %w( src/core/lib/gprpp/work_serializer.h ) s.files += %w( src/core/lib/gprpp/xxhash_inline.h ) - s.files += %w( src/core/lib/http/format_request.cc ) - s.files += %w( src/core/lib/http/format_request.h ) - s.files += %w( src/core/lib/http/httpcli.cc ) - s.files += %w( src/core/lib/http/httpcli.h ) - s.files += %w( src/core/lib/http/httpcli_security_connector.cc ) - s.files += %w( src/core/lib/http/httpcli_ssl_credentials.h ) - s.files += %w( src/core/lib/http/parser.cc ) - s.files += %w( src/core/lib/http/parser.h ) s.files += %w( src/core/lib/iomgr/block_annotate.h ) s.files += %w( src/core/lib/iomgr/buffer_list.cc ) s.files += %w( src/core/lib/iomgr/buffer_list.h ) @@ -1926,6 +1918,14 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/alloc.h ) s.files += %w( src/core/util/android/log.cc ) s.files += %w( src/core/util/atm.cc ) + s.files += %w( src/core/util/http_client/format_request.cc ) + s.files += %w( src/core/util/http_client/format_request.h ) + s.files += %w( src/core/util/http_client/httpcli.cc ) + s.files += %w( src/core/util/http_client/httpcli.h ) + s.files += %w( src/core/util/http_client/httpcli_security_connector.cc ) + s.files += %w( src/core/util/http_client/httpcli_ssl_credentials.h ) + s.files += %w( src/core/util/http_client/parser.cc ) + s.files += %w( src/core/util/http_client/parser.h ) s.files += %w( src/core/util/iphone/cpu.cc ) s.files += %w( src/core/util/json/json.h ) s.files += %w( src/core/util/json/json_args.h ) diff --git a/package.xml b/package.xml index 5dee87fa874..d1778bf0607 100644 --- a/package.xml +++ b/package.xml @@ -1311,14 +1311,6 @@ - - - - - - - - @@ -1908,6 +1900,14 @@ + + + + + + + + diff --git a/src/core/BUILD b/src/core/BUILD index 99ce258ea65..9d23ed2f1a4 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -4422,10 +4422,10 @@ grpc_cc_library( grpc_cc_library( name = "httpcli_ssl_credentials", srcs = [ - "lib/http/httpcli_security_connector.cc", + "util/http_client/httpcli_security_connector.cc", ], hdrs = [ - "lib/http/httpcli_ssl_credentials.h", + "util/http_client/httpcli_ssl_credentials.h", ], external_deps = [ "absl/log:log", diff --git a/src/core/ext/gcp/metadata_query.h b/src/core/ext/gcp/metadata_query.h index 9e3f6931da5..395c1e6d995 100644 --- a/src/core/ext/gcp/metadata_query.h +++ b/src/core/ext/gcp/metadata_query.h @@ -26,11 +26,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 118b1f99488..90cfdf3ad5e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -82,7 +82,6 @@ #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -108,6 +107,7 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/handshaker/http_connect/http_connect_handshaker.cc b/src/core/handshaker/http_connect/http_connect_handshaker.cc index 32d218e06ea..30773fe99b4 100644 --- a/src/core/handshaker/http_connect/http_connect_handshaker.cc +++ b/src/core/handshaker/http_connect/http_connect_handshaker.cc @@ -44,14 +44,14 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/http/format_request.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/http_client/format_request.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/string.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index 06122b04a81..27d1b88ef1a 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -39,10 +39,10 @@ #include #include "src/core/lib/gprpp/env.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index 50e7d86b58b..c7dc1f166c3 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -28,11 +28,11 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc index f604d1e9815..f7fd5a805e1 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/external_account_credentials.cc @@ -46,14 +46,14 @@ #include #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" #include "src/core/lib/security/credentials/external/url_external_account_credentials.h" #include "src/core/lib/security/util/json_util.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h index c194fd60163..f0023ab878e 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.h +++ b/src/core/lib/security/credentials/external/external_account_credentials.h @@ -30,12 +30,12 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/src/core/lib/security/credentials/external/url_external_account_credentials.cc index cf9d646e579..b2a5359c596 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.cc @@ -37,11 +37,11 @@ #include #include -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index 6a5f00cd23b..209e652a15c 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -28,10 +28,10 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index 86602f6c519..3e6b843b972 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -49,8 +49,6 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -70,6 +68,8 @@ #include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/load_balancing/xds/xds_channel_args.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index 02a7c548e98..e88b909696f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -58,9 +58,6 @@ #include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -71,6 +68,9 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/uri/uri_parser.h" #include "src/core/tsi/ssl_types.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 313485e53d6..834dae28305 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -51,7 +51,6 @@ #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/context.h" @@ -62,6 +61,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 5144905284b..199f35f33c8 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -37,8 +37,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -48,6 +46,8 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/http/format_request.cc b/src/core/util/http_client/format_request.cc similarity index 97% rename from src/core/lib/http/format_request.cc rename to src/core/util/http_client/format_request.cc index d358a57f5bc..1d785835e2b 100644 --- a/src/core/lib/http/format_request.cc +++ b/src/core/util/http_client/format_request.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/format_request.h" +#include + +#include "src/core/util/http_client/format_request.h" #include #include @@ -31,9 +33,8 @@ #include "absl/strings/string_view.h" #include -#include -#include "src/core/lib/http/httpcli.h" +#include "src/core/util/http_client/httpcli.h" static void fill_common_header(const grpc_http_request* request, const char* host, const char* path, diff --git a/src/core/lib/http/format_request.h b/src/core/util/http_client/format_request.h similarity index 86% rename from src/core/lib/http/format_request.h rename to src/core/util/http_client/format_request.h index a9e76643556..ab9d6a9d7d5 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/util/http_client/format_request.h @@ -16,13 +16,14 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H -#define GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H -#include #include -#include "src/core/lib/http/parser.h" +#include + +#include "src/core/util/http_client/parser.h" grpc_slice grpc_httpcli_format_get_request(const grpc_http_request* request, const char* host, const char* path); @@ -34,4 +35,4 @@ grpc_slice grpc_httpcli_format_connect_request(const grpc_http_request* request, const char* host, const char* path); -#endif // GRPC_SRC_CORE_LIB_HTTP_FORMAT_REQUEST_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_FORMAT_REQUEST_H diff --git a/src/core/lib/http/httpcli.cc b/src/core/util/http_client/httpcli.cc similarity index 99% rename from src/core/lib/http/httpcli.cc rename to src/core/util/http_client/httpcli.cc index ee2a5ad528d..2771787dd00 100644 --- a/src/core/lib/http/httpcli.cc +++ b/src/core/util/http_client/httpcli.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/httpcli.h" +#include + +#include "src/core/util/http_client/httpcli.h" #include @@ -32,7 +34,6 @@ #include #include #include -#include #include "src/core/handshaker/handshaker_registry.h" #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" @@ -41,8 +42,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/http/format_request.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -52,6 +51,8 @@ #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/http_client/format_request.h" +#include "src/core/util/http_client/parser.h" namespace grpc_core { diff --git a/src/core/lib/http/httpcli.h b/src/core/util/http_client/httpcli.h similarity index 98% rename from src/core/lib/http/httpcli.h rename to src/core/util/http_client/httpcli.h index 960b46d16c3..2ad2810f027 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/util/http_client/httpcli.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H -#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H + +#include #include @@ -32,7 +34,6 @@ #include #include -#include #include "src/core/handshaker/handshaker.h" #include "src/core/lib/gprpp/debug_location.h" @@ -40,7 +41,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -52,6 +52,7 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/parser.h" // User agent this library reports #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" @@ -264,4 +265,4 @@ class HttpRequest : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_H diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/util/http_client/httpcli_security_connector.cc similarity index 99% rename from src/core/lib/http/httpcli_security_connector.cc rename to src/core/util/http_client/httpcli_security_connector.cc index 7db2021b71c..ac0c1adb257 100644 --- a/src/core/lib/http/httpcli_security_connector.cc +++ b/src/core/util/http_client/httpcli_security_connector.cc @@ -16,6 +16,8 @@ // // +#include + #include #include @@ -32,7 +34,6 @@ #include #include #include -#include #include #include "src/core/handshaker/handshaker.h" diff --git a/src/core/lib/http/httpcli_ssl_credentials.h b/src/core/util/http_client/httpcli_ssl_credentials.h similarity index 85% rename from src/core/lib/http/httpcli_ssl_credentials.h rename to src/core/util/http_client/httpcli_ssl_credentials.h index dc6182a0779..45364c64a46 100644 --- a/src/core/lib/http/httpcli_ssl_credentials.h +++ b/src/core/util/http_client/httpcli_ssl_credentials.h @@ -14,12 +14,13 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H -#define GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H -#include #include +#include + #include "src/core/lib/gprpp/ref_counted_ptr.h" namespace grpc_core { @@ -35,4 +36,4 @@ RefCountedPtr CreateHttpRequestSSLCredentials(); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_HTTP_HTTPCLI_SSL_CREDENTIALS_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_HTTPCLI_SSL_CREDENTIALS_H diff --git a/src/core/lib/http/parser.cc b/src/core/util/http_client/parser.cc similarity index 99% rename from src/core/lib/http/parser.cc rename to src/core/util/http_client/parser.cc index aad7963f1d7..c344f438cf3 100644 --- a/src/core/lib/http/parser.cc +++ b/src/core/util/http_client/parser.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/http/parser.h" +#include + +#include "src/core/util/http_client/parser.h" #include @@ -27,7 +29,6 @@ #include #include -#include grpc_core::TraceFlag grpc_http1_trace(false, "http1"); diff --git a/src/core/lib/http/parser.h b/src/core/util/http_client/parser.h similarity index 96% rename from src/core/lib/http/parser.h rename to src/core/util/http_client/parser.h index e9a1088b85f..cfd1ed7ab3a 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/util/http_client/parser.h @@ -16,14 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_HTTP_PARSER_H -#define GRPC_SRC_CORE_LIB_HTTP_PARSER_H +#ifndef GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H +#define GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H + +#include #include #include #include -#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/error.h" @@ -126,4 +127,4 @@ void grpc_http_response_destroy(grpc_http_response* response); extern grpc_core::TraceFlag grpc_http1_trace; -#endif // GRPC_SRC_CORE_LIB_HTTP_PARSER_H +#endif // GRPC_SRC_CORE_UTIL_HTTP_CLIENT_PARSER_H diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index d04415e7801..3ed50fe703b 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -514,10 +514,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/gprpp/windows/stat.cc', 'src/core/lib/gprpp/windows/thd.cc', 'src/core/lib/gprpp/work_serializer.cc', - 'src/core/lib/http/format_request.cc', - 'src/core/lib/http/httpcli.cc', - 'src/core/lib/http/httpcli_security_connector.cc', - 'src/core/lib/http/parser.cc', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/call_combiner.cc', 'src/core/lib/iomgr/cfstream_handle.cc', @@ -810,6 +806,10 @@ CORE_SOURCE_FILES = [ 'src/core/util/alloc.cc', 'src/core/util/android/log.cc', 'src/core/util/atm.cc', + 'src/core/util/http_client/format_request.cc', + 'src/core/util/http_client/httpcli.cc', + 'src/core/util/http_client/httpcli_security_connector.cc', + 'src/core/util/http_client/parser.cc', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json_object_loader.cc', 'src/core/util/json/json_reader.cc', diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 3eca777e098..ac9acc9ffb4 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -51,7 +51,6 @@ #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -65,6 +64,7 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/http_client/parser.h" #include "test/core/test_util/port.h" struct grpc_end2end_http_proxy { diff --git a/test/core/http/format_request_test.cc b/test/core/http/format_request_test.cc index f242221d971..31c73d88100 100644 --- a/test/core/http/format_request_test.cc +++ b/test/core/http/format_request_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/format_request.h" +#include "src/core/util/http_client/format_request.h" #include @@ -24,8 +24,8 @@ #include "gtest/gtest.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/http_client/httpcli.h" #include "test/core/test_util/test_config.h" TEST(FormatRequestTest, FormatGetRequest) { diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index 773ee18ed08..e63cbfe4f22 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/httpcli.h" +#include "src/core/util/http_client/httpcli.h" #include #include diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 8bdf220bee2..4c15ea82dcf 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -47,9 +47,6 @@ #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/time_util.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -58,6 +55,9 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" +#include "src/core/util/http_client/parser.h" #include "src/core/util/subprocess.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" diff --git a/test/core/http/parser_test.cc b/test/core/http/parser_test.cc index 183dc9eeae3..4e3f508338a 100644 --- a/test/core/http/parser_test.cc +++ b/test/core/http/parser_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" #include #include diff --git a/test/core/http/request_fuzzer.cc b/test/core/http/request_fuzzer.cc index 2272d0427e3..7ca890c7e01 100644 --- a/test/core/http/request_fuzzer.cc +++ b/test/core/http/request_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/http/response_fuzzer.cc b/test/core/http/response_fuzzer.cc index 8310028c455..e2cadb79eb8 100644 --- a/test/core/http/response_fuzzer.cc +++ b/test/core/http/response_fuzzer.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/http/parser.h" +#include "src/core/util/http_client/parser.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 0e3ed6b59c0..9dc514b2d49 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -47,8 +47,6 @@ #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/httpcli_ssl_credentials.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/promise.h" @@ -69,6 +67,8 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" #include "src/core/util/tmpfile.h" diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index 5387edf9451..792fbe670cf 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -31,8 +31,8 @@ #include #include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/http/httpcli.h" #include "src/core/lib/security/credentials/jwt/json_token.h" +#include "src/core/util/http_client/httpcli.h" #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/port_server_client.cc b/test/core/test_util/port_server_client.cc index cbd83fcb046..2f59e1c473b 100644 --- a/test/core/test_util/port_server_client.cc +++ b/test/core/test_util/port_server_client.cc @@ -44,8 +44,6 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -54,6 +52,8 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/http_client/httpcli.h" +#include "src/core/util/http_client/parser.h" typedef struct freereq { gpr_mu* mu = nullptr; diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 1a40d6aa032..c3428fdd3a1 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -2328,14 +2328,6 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ -src/core/lib/http/format_request.cc \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.cc \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/httpcli_security_connector.cc \ -src/core/lib/http/httpcli_ssl_credentials.h \ -src/core/lib/http/parser.cc \ -src/core/lib/http/parser.h \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/buffer_list.h \ @@ -2925,6 +2917,14 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ +src/core/util/http_client/format_request.cc \ +src/core/util/http_client/format_request.h \ +src/core/util/http_client/httpcli.cc \ +src/core/util/http_client/httpcli.h \ +src/core/util/http_client/httpcli_security_connector.cc \ +src/core/util/http_client/httpcli_ssl_credentials.h \ +src/core/util/http_client/parser.cc \ +src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 96df93bf306..1439a0c8d46 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -2101,14 +2101,6 @@ src/core/lib/gprpp/windows/thd.cc \ src/core/lib/gprpp/work_serializer.cc \ src/core/lib/gprpp/work_serializer.h \ src/core/lib/gprpp/xxhash_inline.h \ -src/core/lib/http/format_request.cc \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.cc \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/httpcli_security_connector.cc \ -src/core/lib/http/httpcli_ssl_credentials.h \ -src/core/lib/http/parser.cc \ -src/core/lib/http/parser.h \ src/core/lib/iomgr/README.md \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ @@ -2707,6 +2699,14 @@ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/android/log.cc \ src/core/util/atm.cc \ +src/core/util/http_client/format_request.cc \ +src/core/util/http_client/format_request.h \ +src/core/util/http_client/httpcli.cc \ +src/core/util/http_client/httpcli.h \ +src/core/util/http_client/httpcli_security_connector.cc \ +src/core/util/http_client/httpcli_ssl_credentials.h \ +src/core/util/http_client/parser.cc \ +src/core/util/http_client/parser.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \