From 798399b9842ce2ab409faabefc694c98e21ede4b Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Mon, 8 Apr 2024 17:00:57 -0700 Subject: [PATCH 01/18] Automated rollback of commit 7c57fb70e9b80648d2a99086f7fe206437ffe84f. PiperOrigin-RevId: 622990471 --- BUILD | 5 - CMakeLists.txt | 6 - Makefile | 1 - Package.swift | 1 - build_autogenerated.yaml | 7 - gRPC-C++.podspec | 1 - gRPC-Core.podspec | 1 - grpc.gemspec | 1 - include/grpc/module.modulemap | 1 - include/grpc/passive_listener.h | 63 ---- include/grpcpp/passive_listener.h | 27 -- include/grpcpp/security/server_credentials.h | 1 - include/grpcpp/server_builder.h | 29 -- package.xml | 1 - src/core/BUILD | 2 - .../transport/binder/server/binder_server.cc | 7 +- .../server/chaotic_good_server.cc | 7 +- .../chaotic_good/server/chaotic_good_server.h | 4 +- .../transport/chttp2/server/chttp2_server.cc | 287 ++++++------------ .../transport/chttp2/server/chttp2_server.h | 34 --- .../lib/event_engine/extensions/supports_fd.h | 7 - .../event_engine/posix_engine/posix_engine.cc | 18 +- .../event_engine/posix_engine/posix_engine.h | 2 - src/core/lib/surface/server.h | 14 +- src/cpp/server/server_builder.cc | 60 ---- .../event_engine/event_engine_test_utils.h | 65 ---- test/cpp/server/BUILD | 1 - test/cpp/server/server_builder_test.cc | 55 ---- .../distrib/check_namespace_qualification.py | 4 - .../check_redundant_namespace_qualifiers.py | 9 - tools/doxygen/Doxyfile.c++ | 2 - tools/doxygen/Doxyfile.c++.internal | 2 - tools/doxygen/Doxyfile.core | 1 - tools/doxygen/Doxyfile.core.internal | 1 - 34 files changed, 113 insertions(+), 614 deletions(-) delete mode 100644 include/grpc/passive_listener.h delete mode 100644 include/grpcpp/passive_listener.h diff --git a/BUILD b/BUILD index 3164a0c391e..744d7458b2b 100644 --- a/BUILD +++ b/BUILD @@ -291,7 +291,6 @@ GRPC_PUBLIC_HDRS = [ "include/grpc/grpc_posix.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", - "include/grpc/passive_listener.h", "include/grpc/slice.h", "include/grpc/slice_buffer.h", "include/grpc/status.h", @@ -453,7 +452,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/impl/service_type.h", "include/grpcpp/impl/status.h", "include/grpcpp/impl/sync.h", - "include/grpcpp/passive_listener.h", "include/grpcpp/resource_quota.h", "include/grpcpp/security/audit_logging.h", "include/grpcpp/security/tls_crl_provider.h", @@ -2460,7 +2458,6 @@ grpc_cc_library( "//src/core:grpc_backend_metric_provider", "//src/core:grpc_crl_provider", "//src/core:grpc_service_config", - "//src/core:grpc_transport_chttp2_server", "//src/core:grpc_transport_inproc", "//src/core:json", "//src/core:json_reader", @@ -2517,7 +2514,6 @@ grpc_cc_library( "grpc_security_base", "grpc_service_config_impl", "grpc_trace", - "grpc_transport_chttp2", "grpc_unsecure", "grpcpp_backend_metric_recorder", "grpcpp_call_metric_recorder", @@ -2539,7 +2535,6 @@ grpc_cc_library( "//src/core:grpc_backend_metric_provider", "//src/core:grpc_insecure_credentials", "//src/core:grpc_service_config", - "//src/core:grpc_transport_chttp2_server", "//src/core:grpc_transport_inproc", "//src/core:ref_counted", "//src/core:resource_quota", diff --git a/CMakeLists.txt b/CMakeLists.txt index f4c9825d0f3..6e930947999 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2738,7 +2738,6 @@ foreach(_hdr include/grpc/impl/propagation_bits.h include/grpc/impl/slice_type.h include/grpc/load_reporting.h - include/grpc/passive_listener.h include/grpc/slice.h include/grpc/slice_buffer.h include/grpc/status.h @@ -3441,7 +3440,6 @@ foreach(_hdr include/grpc/impl/propagation_bits.h include/grpc/impl/slice_type.h include/grpc/load_reporting.h - include/grpc/passive_listener.h include/grpc/slice.h include/grpc/slice_buffer.h include/grpc/status.h @@ -4310,7 +4308,6 @@ foreach(_hdr include/grpcpp/impl/service_type.h include/grpcpp/impl/status.h include/grpcpp/impl/sync.h - include/grpcpp/passive_listener.h include/grpcpp/resource_quota.h include/grpcpp/security/audit_logging.h include/grpcpp/security/auth_context.h @@ -5051,7 +5048,6 @@ foreach(_hdr include/grpcpp/impl/service_type.h include/grpcpp/impl/status.h include/grpcpp/impl/sync.h - include/grpcpp/passive_listener.h include/grpcpp/resource_quota.h include/grpcpp/security/audit_logging.h include/grpcpp/security/auth_context.h @@ -5502,7 +5498,6 @@ foreach(_hdr include/grpc/impl/propagation_bits.h include/grpc/impl/slice_type.h include/grpc/load_reporting.h - include/grpc/passive_listener.h include/grpc/slice.h include/grpc/slice_buffer.h include/grpc/status.h @@ -26547,7 +26542,6 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.cc ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.h ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.h - test/core/event_engine/event_engine_test_utils.cc test/core/util/cmdline.cc test/core/util/fuzzer_util.cc test/core/util/grpc_profiler.cc diff --git a/Makefile b/Makefile index 6ef6a28e855..8aa1a2a0fbf 100644 --- a/Makefile +++ b/Makefile @@ -1773,7 +1773,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/propagation_bits.h \ include/grpc/impl/slice_type.h \ include/grpc/load_reporting.h \ - include/grpc/passive_listener.h \ include/grpc/slice.h \ include/grpc/slice_buffer.h \ include/grpc/status.h \ diff --git a/Package.swift b/Package.swift index 62551abe3a1..6f255c34e3e 100644 --- a/Package.swift +++ b/Package.swift @@ -92,7 +92,6 @@ let package = Package( "include/grpc/impl/propagation_bits.h", "include/grpc/impl/slice_type.h", "include/grpc/load_reporting.h", - "include/grpc/passive_listener.h", "include/grpc/slice.h", "include/grpc/slice_buffer.h", "include/grpc/status.h", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index d48f7694ce5..8fd93c9dd0a 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -196,7 +196,6 @@ libs: - include/grpc/impl/propagation_bits.h - include/grpc/impl/slice_type.h - include/grpc/load_reporting.h - - include/grpc/passive_listener.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h @@ -2184,7 +2183,6 @@ libs: - include/grpc/impl/propagation_bits.h - include/grpc/impl/slice_type.h - include/grpc/load_reporting.h - - include/grpc/passive_listener.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h @@ -3793,7 +3791,6 @@ libs: - include/grpcpp/impl/service_type.h - include/grpcpp/impl/status.h - include/grpcpp/impl/sync.h - - include/grpcpp/passive_listener.h - include/grpcpp/resource_quota.h - include/grpcpp/security/audit_logging.h - include/grpcpp/security/auth_context.h @@ -4222,7 +4219,6 @@ libs: - include/grpcpp/impl/service_type.h - include/grpcpp/impl/status.h - include/grpcpp/impl/sync.h - - include/grpcpp/passive_listener.h - include/grpcpp/resource_quota.h - include/grpcpp/security/audit_logging.h - include/grpcpp/security/auth_context.h @@ -4370,7 +4366,6 @@ libs: - include/grpc/impl/propagation_bits.h - include/grpc/impl/slice_type.h - include/grpc/load_reporting.h - - include/grpc/passive_listener.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h @@ -17295,7 +17290,6 @@ targets: build: test language: c++ headers: - - test/core/event_engine/event_engine_test_utils.h - test/core/util/cmdline.h - test/core/util/evaluate_args_test_util.h - test/core/util/fuzzer_util.h @@ -17312,7 +17306,6 @@ targets: - 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/event_engine/event_engine_test_utils.cc - test/core/util/cmdline.cc - test/core/util/fuzzer_util.cc - test/core/util/grpc_profiler.cc diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 4ad62619d91..f527925e000 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -175,7 +175,6 @@ Pod::Spec.new do |s| 'include/grpcpp/impl/service_type.h', 'include/grpcpp/impl/status.h', 'include/grpcpp/impl/sync.h', - 'include/grpcpp/passive_listener.h', 'include/grpcpp/resource_quota.h', 'include/grpcpp/security/audit_logging.h', 'include/grpcpp/security/auth_context.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 74eaa089d56..b7fa52ec420 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -166,7 +166,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/propagation_bits.h', 'include/grpc/impl/slice_type.h', 'include/grpc/load_reporting.h', - 'include/grpc/passive_listener.h', 'include/grpc/slice.h', 'include/grpc/slice_buffer.h', 'include/grpc/status.h', diff --git a/grpc.gemspec b/grpc.gemspec index 15083336659..59a44e0d669 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -98,7 +98,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/propagation_bits.h ) s.files += %w( include/grpc/impl/slice_type.h ) s.files += %w( include/grpc/load_reporting.h ) - s.files += %w( include/grpc/passive_listener.h ) s.files += %w( include/grpc/slice.h ) s.files += %w( include/grpc/slice_buffer.h ) s.files += %w( include/grpc/status.h ) diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap index f7375a82eeb..7adee5b69e5 100644 --- a/include/grpc/module.modulemap +++ b/include/grpc/module.modulemap @@ -37,7 +37,6 @@ header "byte_buffer.h" header "impl/propagation_bits.h" header "impl/slice_type.h" header "load_reporting.h" - header "passive_listener.h" header "slice.h" header "slice_buffer.h" header "status.h" diff --git a/include/grpc/passive_listener.h b/include/grpc/passive_listener.h deleted file mode 100644 index be9389405f2..00000000000 --- a/include/grpc/passive_listener.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 The 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_PASSIVE_LISTENER_H -#define GRPC_PASSIVE_LISTENER_H - -#include - -#include - -#include -#include - -namespace grpc_core { -class Server; - -namespace experimental { -class PassiveListenerImpl; - -/// -- EXPERIMENTAL API -- -/// Interface for used for Server Endpoint injection. -class PassiveListener { - public: - virtual ~PassiveListener() = default; - /// -- EXPERIMENTAL API -- - /// - /// Takes an Endpoint for an established connection, and treats it as if the - /// connection had been accepted by the server. - /// - /// The server must be started before endpoints can be accepted. - virtual absl::Status AcceptConnectedEndpoint( - std::unique_ptr - endpoint) = 0; - - /// -- EXPERIMENTAL API -- - /// - /// Takes a connected file descriptor, and treats it as if the server had - /// accepted the connection itself. - /// - /// Returns a failure status if the server's active EventEngine does not - /// support Endpoint creation from fds. - virtual absl::Status AcceptConnectedFd(int fd) = 0; -}; - -} // namespace experimental -} // namespace grpc_core - -absl::Status grpc_server_add_passive_listener( - grpc_core::Server* server, grpc_server_credentials* credentials, - std::shared_ptr - passive_listener); - -#endif /* GRPC_PASSIVE_LISTENER_H */ diff --git a/include/grpcpp/passive_listener.h b/include/grpcpp/passive_listener.h deleted file mode 100644 index 8def9592b5e..00000000000 --- a/include/grpcpp/passive_listener.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 The 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 GRPCPP_PASSIVE_LISTENER_H -#define GRPCPP_PASSIVE_LISTENER_H - -#include - -namespace grpc { -namespace experimental { - -using grpc_core::experimental::PassiveListener; - -} // namespace experimental -} // namespace grpc - -#endif // GRPCPP_PASSIVE_LISTENER_H diff --git a/include/grpcpp/security/server_credentials.h b/include/grpcpp/security/server_credentials.h index e3f5c2bbbfe..fe8c546190d 100644 --- a/include/grpcpp/security/server_credentials.h +++ b/include/grpcpp/security/server_credentials.h @@ -84,7 +84,6 @@ class ServerCredentials : private grpc::internal::GrpcLibrary { // Needed for access to AddPortToServer. friend class Server; // Needed for access to c_creds_. - friend class ServerBuilder; friend std::shared_ptr grpc::XdsServerCredentials( const std::shared_ptr& fallback_credentials); diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 80eb94c8ec1..9f5e2cc7dc2 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -27,16 +27,12 @@ #include #include -#include -#include #include #include #include #include #include -#include #include -#include #include #include #include @@ -63,7 +59,6 @@ class ExternalConnectionAcceptorImpl; class CallbackGenericService; namespace experimental { - // EXPERIMENTAL API: // Interface for a grpc server to build transports with connections created out // of band. @@ -297,18 +292,6 @@ class ServerBuilder { void EnableCallMetricRecording( experimental::ServerMetricRecorder* server_metric_recorder = nullptr); - // Creates a passive listener for Server Endpoint injection. - /// - /// \a PasiveListener lets applications provide pre-established connections - /// to gRPC Servers. The server will behave as if it accepted the connection - /// itself on its own listening addresses. - /// - /// This can be called multiple times to create passive listeners with - /// different server credentials. - ServerBuilder& AddPassiveListener( - std::shared_ptr creds, - std::unique_ptr& passive_listener); - private: ServerBuilder* builder_; }; @@ -382,17 +365,6 @@ class ServerBuilder { private: friend class grpc::testing::ServerBuilderPluginTest; - struct UnstartedPassiveListener { - std::weak_ptr - passive_listener; - std::shared_ptr credentials; - UnstartedPassiveListener( - std::weak_ptr listener, - std::shared_ptr creds) - : passive_listener(std::move(listener)), - credentials(std::move(creds)) {} - }; - struct SyncServerSettings { SyncServerSettings() : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} @@ -417,7 +389,6 @@ class ServerBuilder { std::vector> options_; std::vector> services_; std::vector ports_; - std::vector unstarted_passive_listeners_; SyncServerSettings sync_server_settings_; diff --git a/package.xml b/package.xml index 13dd673fb3c..3e64fab15c1 100644 --- a/package.xml +++ b/package.xml @@ -80,7 +80,6 @@ - diff --git a/src/core/BUILD b/src/core/BUILD index 1ce86ff5599..e98a754d9c6 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -6786,8 +6786,6 @@ grpc_cc_library( "connection_quota", "error", "error_utils", - "event_engine_extensions", - "event_engine_query_extensions", "grpc_insecure_credentials", "handshaker_registry", "iomgr_fwd", diff --git a/src/core/ext/transport/binder/server/binder_server.cc b/src/core/ext/transport/binder/server/binder_server.cc index 58d26b6949c..994d8f82cb8 100644 --- a/src/core/ext/transport/binder/server/binder_server.cc +++ b/src/core/ext/transport/binder/server/binder_server.cc @@ -159,7 +159,7 @@ class BinderServerListener : public Server::ListenerInterface { on_destroy_done_ = on_destroy_done; } - void Orphan() override { Unref(); } + void Orphan() override { delete this; } ~BinderServerListener() override { ExecCtx::Get()->Flush(); @@ -239,8 +239,9 @@ bool AddBinderPort(const std::string& addr, grpc_server* server, } std::string conn_id = addr.substr(kBinderUriScheme.size()); Server* core_server = Server::FromC(server); - core_server->AddListener(MakeOrphanable( - core_server, conn_id, std::move(factory), security_policy)); + core_server->AddListener( + OrphanablePtr(new BinderServerListener( + core_server, conn_id, std::move(factory), security_policy))); return true; } 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 cb6f104e1a0..8c172bd87ef 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 @@ -103,8 +103,8 @@ absl::StatusOr ChaoticGoodServerListener::Bind( str.ok() ? str->c_str() : str.status().ToString().c_str()); } EventEngine::Listener::AcceptCallback accept_cb = - [self = RefAsSubclass()]( - std::unique_ptr ep, MemoryAllocator) { + [self = Ref()](std::unique_ptr ep, + MemoryAllocator) { ExecCtx exec_ctx; MutexLock lock(&self->mu_); if (self->shutdown_) return; @@ -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)) { + : memory_allocator_(listener->memory_allocator_), listener_(listener) { handshaking_state_ = MakeRefCounted(Ref()); handshaking_state_->Start(std::move(endpoint)); } 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 cd7fd5d8f6b..a925e10218e 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 @@ -50,7 +50,9 @@ namespace grpc_core { namespace chaotic_good { -class ChaoticGoodServerListener final : public Server::ListenerInterface { +class ChaoticGoodServerListener final + : public Server::ListenerInterface, + public RefCounted { public: static absl::AnyInvocable DefaultConnectionIDGenerator() { return [bitgen = absl::BitGen()]() mutable { diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index bdb4aa7da7b..d55590e30e0 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -57,8 +56,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/event_engine/extensions/supports_fd.h" -#include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" @@ -68,7 +65,6 @@ #include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -97,11 +93,9 @@ #endif // GPR_SUPPORT_CHANNELS_FROM_FD namespace grpc_core { +namespace { -using grpc_event_engine::experimental::ChannelArgsEndpointConfig; -using grpc_event_engine::experimental::EventEngine; -using grpc_event_engine::experimental::EventEngineSupportsFdExtension; -using grpc_event_engine::experimental::QueryExtension; +using ::grpc_event_engine::experimental::EventEngine; const char kUnixUriPrefix[] = "unix:"; const char kUnixAbstractUriPrefix[] = "unix-abstract:"; @@ -118,23 +112,14 @@ class Chttp2ServerListener : public Server::ListenerInterface { Server* server, const char* name, const ChannelArgs& args, Chttp2ServerArgsModifier args_modifier); - static Chttp2ServerListener* CreateForPassiveListener( - Server* server, const ChannelArgs& args, - std::shared_ptr passive_listener); - // Do not instantiate directly. Use one of the factory methods above. Chttp2ServerListener(Server* server, const ChannelArgs& args, - Chttp2ServerArgsModifier args_modifier, - grpc_server_config_fetcher* config_fetcher, - std::shared_ptr - passive_listener = nullptr); + Chttp2ServerArgsModifier args_modifier); ~Chttp2ServerListener() override; void Start(Server* server, const std::vector* pollsets) override; - void AcceptConnectedEndpoint(std::unique_ptr endpoint); - channelz::ListenSocketNode* channelz_listen_socket_node() const override { return channelz_listen_socket_.get(); } @@ -144,8 +129,6 @@ class Chttp2ServerListener : public Server::ListenerInterface { void Orphan() override; private: - friend class experimental::PassiveListenerImpl; - class ConfigFetcherWatcher : public grpc_server_config_fetcher::WatcherInterface { public: @@ -252,8 +235,34 @@ class Chttp2ServerListener : public Server::ListenerInterface { static void DestroyListener(Server* /*server*/, void* arg, grpc_closure* destroy_done); - Server* const server_ = nullptr; - grpc_tcp_server* tcp_server_ = nullptr; + // The interface required by RefCountedPtr<> has been manually implemented + // here to take a ref on tcp_server_ instead. Note that, the handshaker + // needs tcp_server_ to exist for the lifetime of the handshake since it's + // needed by acceptor. Sharing refs between the listener and tcp_server_ is + // just an optimization to avoid taking additional refs on the listener, + // since TcpServerShutdownComplete already holds a ref to the listener. + void IncrementRefCount() { grpc_tcp_server_ref(tcp_server_); } + void IncrementRefCount(const DebugLocation& /* location */, + const char* /* reason */) { + IncrementRefCount(); + } + + GRPC_MUST_USE_RESULT RefCountedPtr Ref() { + IncrementRefCount(); + return RefCountedPtr(this); + } + GRPC_MUST_USE_RESULT RefCountedPtr Ref( + const DebugLocation& /* location */, const char* /* reason */) { + return Ref(); + } + + void Unref() { grpc_tcp_server_unref(tcp_server_); } + void Unref(const DebugLocation& /* location */, const char* /* reason */) { + Unref(); + } + + Server* const server_; + grpc_tcp_server* tcp_server_; grpc_resolved_address resolved_address_; Chttp2ServerArgsModifier const args_modifier_; ConfigFetcherWatcher* config_fetcher_watcher_ = nullptr; @@ -276,10 +285,6 @@ class Chttp2ServerListener : public Server::ListenerInterface { RefCountedPtr channelz_listen_socket_; MemoryQuotaRefPtr memory_quota_; ConnectionQuotaRefPtr connection_quota_; - grpc_server_config_fetcher* config_fetcher_ = nullptr; - // TODO(yashykt): consider using absl::variant<> to minimize memory usage for - // disjoint cases where different fields are used. - std::shared_ptr passive_listener_; }; // @@ -376,17 +381,13 @@ Chttp2ServerListener::ActiveConnection::HandshakingState::HandshakingState( handshake_mgr_(MakeRefCounted()), deadline_(GetConnectionDeadline(args)), interested_parties_(grpc_pollset_set_create()) { - if (accepting_pollset != nullptr) { - grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_); - } + grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_); CoreConfiguration::Get().handshaker_registry().AddHandshakers( HANDSHAKER_SERVER, args, interested_parties_, handshake_mgr_.get()); } Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() { - if (accepting_pollset_ != nullptr) { - grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_); - } + grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_); grpc_pollset_set_destroy(interested_parties_); gpr_free(acceptor_); } @@ -708,82 +709,83 @@ void Chttp2ServerListener::ActiveConnection::OnDrainGraceTimeExpiry() { grpc_error_handle Chttp2ServerListener::Create( Server* server, grpc_resolved_address* addr, const ChannelArgs& args, Chttp2ServerArgsModifier args_modifier, int* port_num) { - // Create Chttp2ServerListener. - OrphanablePtr listener = - MakeOrphanable(server, args, args_modifier, - server->config_fetcher()); - // The tcp_server will be unreffed when the listener is orphaned, which could - // be at the end of this function if the listener was not added to the - // server's set of listeners. - grpc_error_handle error = grpc_tcp_server_create( - &listener->tcp_server_shutdown_complete_, ChannelArgsEndpointConfig(args), - OnAccept, listener.get(), &listener->tcp_server_); - if (!error.ok()) return error; - if (listener->config_fetcher_ != nullptr) { - listener->resolved_address_ = *addr; - // TODO(yashykt): Consider binding so as to be able to return the port - // number. - } else { - error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num); + Chttp2ServerListener* listener = nullptr; + // The bulk of this method is inside of a lambda to make cleanup + // easier without using goto. + grpc_error_handle error = [&]() { + grpc_error_handle error; + // Create Chttp2ServerListener. + listener = new Chttp2ServerListener(server, args, args_modifier); + error = grpc_tcp_server_create( + &listener->tcp_server_shutdown_complete_, + grpc_event_engine::experimental::ChannelArgsEndpointConfig(args), + OnAccept, listener, &listener->tcp_server_); if (!error.ok()) return error; - } - // Create channelz node. - if (args.GetBool(GRPC_ARG_ENABLE_CHANNELZ) - .value_or(GRPC_ENABLE_CHANNELZ_DEFAULT)) { - auto string_address = grpc_sockaddr_to_uri(addr); - if (!string_address.ok()) { - return GRPC_ERROR_CREATE(string_address.status().ToString()); + if (server->config_fetcher() != nullptr) { + listener->resolved_address_ = *addr; + // TODO(yashykt): Consider binding so as to be able to return the port + // number. + } else { + error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num); + if (!error.ok()) return error; + } + // Create channelz node. + if (args.GetBool(GRPC_ARG_ENABLE_CHANNELZ) + .value_or(GRPC_ENABLE_CHANNELZ_DEFAULT)) { + auto string_address = grpc_sockaddr_to_uri(addr); + if (!string_address.ok()) { + return GRPC_ERROR_CREATE(string_address.status().ToString()); + } + listener->channelz_listen_socket_ = + MakeRefCounted( + *string_address, + absl::StrCat("chttp2 listener ", *string_address)); + } + // Register with the server only upon success + server->AddListener(OrphanablePtr(listener)); + return absl::OkStatus(); + }(); + if (!error.ok()) { + if (listener != nullptr) { + if (listener->tcp_server_ != nullptr) { + // listener is deleted when tcp_server_ is shutdown. + grpc_tcp_server_unref(listener->tcp_server_); + } else { + delete listener; + } } - listener->channelz_listen_socket_ = - MakeRefCounted( - *string_address, absl::StrCat("chttp2 listener ", *string_address)); } - // Register with the server only upon success - server->AddListener(std::move(listener)); - return absl::OkStatus(); + return error; } grpc_error_handle Chttp2ServerListener::CreateWithAcceptor( Server* server, const char* name, const ChannelArgs& args, Chttp2ServerArgsModifier args_modifier) { - auto listener = MakeOrphanable( - server, args, args_modifier, server->config_fetcher()); + Chttp2ServerListener* listener = + new Chttp2ServerListener(server, args, args_modifier); grpc_error_handle error = grpc_tcp_server_create( - &listener->tcp_server_shutdown_complete_, ChannelArgsEndpointConfig(args), - OnAccept, listener.get(), &listener->tcp_server_); - if (!error.ok()) return error; + &listener->tcp_server_shutdown_complete_, + grpc_event_engine::experimental::ChannelArgsEndpointConfig(args), + OnAccept, listener, &listener->tcp_server_); + if (!error.ok()) { + delete listener; + return error; + } // TODO(yangg) channelz TcpServerFdHandler** arg_val = args.GetPointer(name); *arg_val = grpc_tcp_server_create_fd_handler(listener->tcp_server_); - server->AddListener(std::move(listener)); + server->AddListener(OrphanablePtr(listener)); return absl::OkStatus(); } -Chttp2ServerListener* Chttp2ServerListener::CreateForPassiveListener( - Server* server, const ChannelArgs& args, - std::shared_ptr passive_listener) { - // TODO(hork): figure out how to handle channelz in this case - auto listener = MakeOrphanable( - server, args, /*args_modifier=*/ - [](const ChannelArgs& args, grpc_error_handle*) { return args; }, nullptr, - std::move(passive_listener)); - auto listener_ptr = listener.get(); - server->AddListener(std::move(listener)); - return listener_ptr; -} - Chttp2ServerListener::Chttp2ServerListener( Server* server, const ChannelArgs& args, - Chttp2ServerArgsModifier args_modifier, - grpc_server_config_fetcher* config_fetcher, - std::shared_ptr passive_listener) + Chttp2ServerArgsModifier args_modifier) : server_(server), args_modifier_(args_modifier), args_(args), memory_quota_(args.GetObject()->memory_quota()), - connection_quota_(MakeRefCounted()), - config_fetcher_(config_fetcher), - passive_listener_(std::move(passive_listener)) { + connection_quota_(MakeRefCounted()) { auto max_allowed_incoming_connections = args.GetInt(GRPC_ARG_MAX_ALLOWED_INCOMING_CONNECTIONS); if (max_allowed_incoming_connections.has_value()) { @@ -798,9 +800,6 @@ Chttp2ServerListener::~Chttp2ServerListener() { // Flush queued work before destroying handshaker factory, since that // may do a synchronous unref. ExecCtx::Get()->Flush(); - if (passive_listener_ != nullptr) { - passive_listener_->ListenerDestroyed(); - } if (on_destroy_done_ != nullptr) { ExecCtx::Run(DEBUG_LOCATION, on_destroy_done_, absl::OkStatus()); ExecCtx::Get()->Flush(); @@ -810,11 +809,10 @@ Chttp2ServerListener::~Chttp2ServerListener() { // Server callback: start listening on our ports void Chttp2ServerListener::Start( Server* /*server*/, const std::vector* /* pollsets */) { - if (config_fetcher_ != nullptr) { - auto watcher = std::make_unique( - RefAsSubclass()); + if (server_->config_fetcher() != nullptr) { + auto watcher = std::make_unique(Ref()); config_fetcher_watcher_ = watcher.get(); - config_fetcher_->StartWatch( + server_->config_fetcher()->StartWatch( grpc_sockaddr_to_string(&resolved_address_, false).value(), std::move(watcher)); } else { @@ -828,9 +826,7 @@ void Chttp2ServerListener::Start( } void Chttp2ServerListener::StartListening() { - if (tcp_server_ != nullptr) { - grpc_tcp_server_start(tcp_server_, &server_->pollsets()); - } + grpc_tcp_server_start(tcp_server_, &server_->pollsets()); } void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) { @@ -838,12 +834,6 @@ void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) { on_destroy_done_ = on_destroy_done; } -void Chttp2ServerListener::AcceptConnectedEndpoint( - std::unique_ptr endpoint) { - OnAccept(this, grpc_event_engine_endpoint_create(std::move(endpoint)), - /*accepting_pollset=*/nullptr, /*acceptor=*/nullptr); -} - void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp, grpc_pollset* accepting_pollset, grpc_tcp_server_acceptor* acceptor) { @@ -868,7 +858,7 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp, endpoint_cleanup(error); return; } - if (self->config_fetcher_ != nullptr) { + if (self->server_->config_fetcher() != nullptr) { if (connection_manager == nullptr) { grpc_error_handle error = GRPC_ERROR_CREATE( "No ConnectionManager configured. Closing connection."); @@ -909,7 +899,7 @@ void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp, // heap-use-after-free issues where `Ref()` is invoked when the ref of // tcp_server_ has already reached 0. (Ref() implementation of // Chttp2ServerListener is grpc_tcp_server_ref().) - listener_ref = self->RefAsSubclass(); + listener_ref = self->Ref(); self->connections_.emplace(connection.get(), std::move(connection)); } } @@ -924,7 +914,7 @@ void Chttp2ServerListener::TcpServerShutdownComplete( void* arg, grpc_error_handle /*error*/) { Chttp2ServerListener* self = static_cast(arg); self->channelz_listen_socket_.reset(); - self->Unref(); + delete self; } // Server callback: destroy the tcp listener (so we don't generate further @@ -933,8 +923,7 @@ void Chttp2ServerListener::Orphan() { // Cancel the watch before shutting down so as to avoid holding a ref to the // listener in the watcher. if (config_fetcher_watcher_ != nullptr) { - GPR_ASSERT(config_fetcher_ != nullptr); - config_fetcher_->CancelWatch(config_fetcher_watcher_); + server_->config_fetcher()->CancelWatch(config_fetcher_watcher_); } std::map> connections; grpc_tcp_server* tcp_server; @@ -952,14 +941,12 @@ void Chttp2ServerListener::Orphan() { } tcp_server = tcp_server_; } - if (tcp_server != nullptr) { - grpc_tcp_server_shutdown_listeners(tcp_server); - grpc_tcp_server_unref(tcp_server); - } else { - Unref(); - } + grpc_tcp_server_shutdown_listeners(tcp_server); + grpc_tcp_server_unref(tcp_server); } +} // namespace + // // Chttp2ServerAddPort() // @@ -1060,50 +1047,6 @@ ChannelArgs ModifyArgsForConnection(const ChannelArgs& args, } } // namespace - -namespace experimental { - -absl::Status PassiveListenerImpl::AcceptConnectedEndpoint( - std::unique_ptr endpoint) { - GPR_ASSERT(server_ != nullptr); - RefCountedPtr listener; - { - MutexLock lock(&mu_); - if (listener_ != nullptr) { - listener = - listener_->RefIfNonZero().TakeAsSubclass(); - } - } - if (listener == nullptr) { - return absl::UnavailableError("passive listener already shut down"); - } - ExecCtx exec_ctx; - listener->AcceptConnectedEndpoint(std::move(endpoint)); - return absl::OkStatus(); -} - -absl::Status PassiveListenerImpl::AcceptConnectedFd(int fd) { - GPR_ASSERT(server_ != nullptr); - ExecCtx exec_ctx; - auto& args = server_->channel_args(); - auto* supports_fd = QueryExtension( - /*engine=*/args.GetObjectRef().get()); - if (supports_fd == nullptr) { - return absl::UnimplementedError( - "The server's EventEngine does not support adding endpoints from " - "connected file descriptors."); - } - auto endpoint = - supports_fd->CreateEndpointFromFd(fd, ChannelArgsEndpointConfig(args)); - return AcceptConnectedEndpoint(std::move(endpoint)); -} - -void PassiveListenerImpl::ListenerDestroyed() { - MutexLock lock(&mu_); - listener_ = nullptr; -} - -} // namespace experimental } // namespace grpc_core int grpc_server_add_http2_port(grpc_server* server, const char* addr, @@ -1201,31 +1144,3 @@ void grpc_server_add_channel_from_fd(grpc_server* /* server */, int /* fd */, } #endif // GPR_SUPPORT_CHANNELS_FROM_FD - -absl::Status grpc_server_add_passive_listener( - grpc_core::Server* server, grpc_server_credentials* credentials, - std::shared_ptr - passive_listener) { - grpc_core::ExecCtx exec_ctx; - GRPC_API_TRACE("grpc_server_add_passive_listener(server=%p, credentials=%p)", - 2, (server, credentials)); - // Create security context. - if (credentials == nullptr) { - return absl::UnavailableError( - "No credentials specified for passive listener"); - } - auto sc = credentials->create_security_connector(grpc_core::ChannelArgs()); - if (sc == nullptr) { - return absl::UnavailableError( - absl::StrCat("Unable to create secure server with credentials of type ", - credentials->type().name())); - } - auto args = server->channel_args() - .SetObject(credentials->Ref()) - .SetObject(std::move(sc)); - passive_listener->listener_ = - grpc_core::Chttp2ServerListener::CreateForPassiveListener( - server, args, passive_listener); - passive_listener->server_ = server->Ref(); - return absl::OkStatus(); -} diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index 90d1cf6ccab..e587c851e26 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -23,8 +23,6 @@ #include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/server.h" @@ -44,38 +42,6 @@ grpc_error_handle Chttp2ServerAddPort( Server* server, const char* addr, const ChannelArgs& args, Chttp2ServerArgsModifier connection_args_modifier, int* port_num); -class Chttp2ServerListener; -namespace experimental { - -// An implementation of the public C++ passive listener interface. -// The server builder holds a weak_ptr to one of these objects, and the -// application owns the instance. -class PassiveListenerImpl final : public PassiveListener { - public: - absl::Status AcceptConnectedEndpoint( - std::unique_ptr - endpoint) override ABSL_LOCKS_EXCLUDED(mu_); - - absl::Status AcceptConnectedFd(GRPC_UNUSED int fd) override - ABSL_LOCKS_EXCLUDED(mu_); - - void ListenerDestroyed() ABSL_LOCKS_EXCLUDED(mu_); - - private: - // note: the grpc_core::Server redundant namespace qualification is - // required for older gcc versions. - friend absl::Status(::grpc_server_add_passive_listener)( - grpc_core::Server* server, grpc_server_credentials* credentials, - std::shared_ptr - passive_listener); - - Mutex mu_; - // Data members will be populated when initialized. - RefCountedPtr server_; - Chttp2ServerListener* listener_; -}; - -} // namespace experimental } // namespace grpc_core #endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H diff --git a/src/core/lib/event_engine/extensions/supports_fd.h b/src/core/lib/event_engine/extensions/supports_fd.h index 8339b0f27fd..ae5fd6986c8 100644 --- a/src/core/lib/event_engine/extensions/supports_fd.h +++ b/src/core/lib/event_engine/extensions/supports_fd.h @@ -113,13 +113,6 @@ class EventEngineSupportsFdExtension { int fd, const EndpointConfig& config, MemoryAllocator memory_allocator) = 0; - /// Creates an EventEngine::Endpoint from an fd which is already assumed to be - /// connected to a remote peer. See \a CreatePosixEndpointFromFd for details. - /// This has the same behavior, but the \a memory_allocator is taken from the - /// EndpointConfig's resource quota. - virtual std::unique_ptr CreateEndpointFromFd( - int fd, const EndpointConfig& config) = 0; - /// Called when the posix listener has accepted a new client connection. /// \a listener_fd - The listening socket fd that accepted the new client /// connection. diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.cc b/src/core/lib/event_engine/posix_engine/posix_engine.cc index 548311d1911..7c989337431 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine.cc @@ -662,7 +662,7 @@ PosixEventEngine::CreatePosixEndpointFromFd(int fd, const EndpointConfig& config, MemoryAllocator memory_allocator) { #if GRPC_PLATFORM_SUPPORTS_POSIX_POLLING - GPR_ASSERT(fd > 0); + GPR_DEBUG_ASSERT(fd > 0); PosixEventPoller* poller = poller_manager_->Poller(); GPR_DEBUG_ASSERT(poller != nullptr); EventHandle* handle = @@ -677,22 +677,6 @@ PosixEventEngine::CreatePosixEndpointFromFd(int fd, #endif // GRPC_PLATFORM_SUPPORTS_POSIX_POLLING } -std::unique_ptr PosixEventEngine::CreateEndpointFromFd( - int fd, const EndpointConfig& config) { - auto options = TcpOptionsFromEndpointConfig(config); - MemoryAllocator allocator; - if (options.memory_allocator_factory != nullptr) { - return CreatePosixEndpointFromFd( - fd, config, - options.memory_allocator_factory->CreateMemoryAllocator( - absl::StrCat("allocator:", fd))); - } - return CreatePosixEndpointFromFd( - fd, config, - options.resource_quota->memory_quota()->CreateMemoryAllocator( - absl::StrCat("allocator:", fd))); -} - absl::StatusOr> PosixEventEngine::CreateListener( Listener::AcceptCallback on_accept, diff --git a/src/core/lib/event_engine/posix_engine/posix_engine.h b/src/core/lib/event_engine/posix_engine/posix_engine.h index f4c6c2f21ce..e47c619a508 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine.h @@ -173,8 +173,6 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport, std::unique_ptr CreatePosixEndpointFromFd( int fd, const EndpointConfig& config, MemoryAllocator memory_allocator) override; - std::unique_ptr CreateEndpointFromFd( - int fd, const EndpointConfig& config) override; absl::StatusOr> CreateListener( Listener::AcceptCallback on_accept, diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index 310d4b7280c..3623ffa0653 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -41,7 +41,6 @@ #include "absl/types/optional.h" #include -#include #include #include @@ -76,9 +75,6 @@ "grpc.server.max_pending_requests_hard_limit" namespace grpc_core { -namespace experimental { -class PassiveListenerImpl; -} // namespace experimental extern TraceFlag grpc_server_channel_trace; @@ -117,7 +113,7 @@ class Server : public ServerInterface, /// Interface for listeners. /// Implementations must override the Orphan() method, which should stop /// listening and initiate destruction of the listener. - class ListenerInterface : public InternallyRefCounted { + class ListenerInterface : public Orphanable { public: ~ListenerInterface() override = default; @@ -217,14 +213,6 @@ class Server : public ServerInterface, void SendGoaways() ABSL_LOCKS_EXCLUDED(mu_global_, mu_call_); private: - // note: the grpc_core::Server redundant namespace qualification is - // required for older gcc versions. - // TODO(yashykt): eliminate this friend statement as part of your upcoming - // server listener refactoring. - friend absl::Status(::grpc_server_add_passive_listener)( - grpc_core::Server* server, grpc_server_credentials* credentials, - std::shared_ptr - passive_listener); struct RequestedCall; class RequestMatcherInterface; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index a4a4babe74e..6d5924404f4 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -15,7 +15,6 @@ // limitations under the License. // // -#include #include #include @@ -46,38 +45,11 @@ #include #include -#include "src/core/ext/transport/chttp2/server/chttp2_server.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" -#include "src/core/lib/surface/server.h" #include "src/cpp/server/external_connection_acceptor_impl.h" namespace grpc { -namespace { - -// A PIMPL wrapper class that owns the only ref to the passive listener -// implementation. This is returned to the application. -class PassiveListenerOwner final - : public grpc_core::experimental::PassiveListener { - public: - explicit PassiveListenerOwner(std::shared_ptr listener) - : listener_(std::move(listener)) {} - - absl::Status AcceptConnectedEndpoint( - std::unique_ptr - endpoint) override { - return listener_->AcceptConnectedEndpoint(std::move(endpoint)); - } - - absl::Status AcceptConnectedFd(int fd) override { - return listener_->AcceptConnectedFd(fd); - } - - private: - std::shared_ptr listener_; -}; - -} // namespace static std::vector (*)()>* g_plugin_factory_list; @@ -251,18 +223,6 @@ ServerBuilder& ServerBuilder::SetResourceQuota( return *this; } -ServerBuilder& ServerBuilder::experimental_type::AddPassiveListener( - std::shared_ptr creds, - std::unique_ptr& passive_listener) { - auto core_passive_listener = - std::make_shared(); - builder_->unstarted_passive_listeners_.emplace_back(core_passive_listener, - std::move(creds)); - passive_listener = - std::make_unique(std::move(core_passive_listener)); - return *builder_; -} - ServerBuilder& ServerBuilder::AddListeningPort( const std::string& addr_uri, std::shared_ptr creds, int* selected_port) { @@ -436,26 +396,6 @@ std::unique_ptr ServerBuilder::BuildAndStart() { cq->RegisterServer(server.get()); } - for (auto& unstarted_listener : unstarted_passive_listeners_) { - has_frequently_polled_cqs = true; - auto passive_listener = unstarted_listener.passive_listener.lock(); - auto* core_server = grpc_core::Server::FromC(server->c_server()); - if (passive_listener != nullptr) { - auto* creds = unstarted_listener.credentials->c_creds(); - if (creds == nullptr) { - gpr_log(GPR_ERROR, "Credentials missing for PassiveListener"); - return nullptr; - } - auto success = grpc_server_add_passive_listener( - core_server, creds, std::move(passive_listener)); - if (!success.ok()) { - gpr_log(GPR_ERROR, "Failed to create a passive listener: %s", - success.ToString().c_str()); - return nullptr; - } - } - } - if (!has_frequently_polled_cqs) { gpr_log(GPR_ERROR, "At least one of the completion queues must be frequently polled"); diff --git a/test/core/event_engine/event_engine_test_utils.h b/test/core/event_engine/event_engine_test_utils.h index debef7a0449..67bbe42d35d 100644 --- a/test/core/event_engine/event_engine_test_utils.h +++ b/test/core/event_engine/event_engine_test_utils.h @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -160,70 +159,6 @@ class NotifyOnDelete { grpc_core::Notification* signal_; }; -// An endpoint implementation that supports Read and Write via std::threads. -// Passing a grpc_core::Notification will allow owners to know when all -// in-flight callbacks have been run, and all endpoint state has been destroyed. -class ThreadedNoopEndpoint : public EventEngine::Endpoint { - public: - explicit ThreadedNoopEndpoint(grpc_core::Notification* destroyed) - : state_(std::make_shared(destroyed)) {} - ~ThreadedNoopEndpoint() override { - std::thread deleter([state = state_]() { - CleanupThread(state->read); - CleanupThread(state->write); - }); - deleter.detach(); - } - - bool Read(absl::AnyInvocable on_read, SliceBuffer* buffer, - const ReadArgs* /* args */) override { - buffer->Clear(); - CleanupThread(state_->read); - state_->read = new std::thread([cb = std::move(on_read)]() mutable { - cb(absl::UnknownError("test")); - }); - return false; - } - - bool Write(absl::AnyInvocable on_writable, - SliceBuffer* data, const WriteArgs* /* args */) override { - data->Clear(); - CleanupThread(state_->write); - state_->write = new std::thread([cb = std::move(on_writable)]() mutable { - cb(absl::UnknownError("test")); - }); - return false; - } - - const EventEngine::ResolvedAddress& GetPeerAddress() const override { - return peer_; - } - - const EventEngine::ResolvedAddress& GetLocalAddress() const override { - return local_; - } - - private: - struct EndpointState { - explicit EndpointState(grpc_core::Notification* deleter) - : delete_notifier_(deleter) {} - std::thread* read = nullptr; - std::thread* write = nullptr; - NotifyOnDelete delete_notifier_; - }; - - static void CleanupThread(std::thread* thd) { - if (thd != nullptr) { - thd->join(); - delete thd; - } - } - - std::shared_ptr state_; - EventEngine::ResolvedAddress peer_; - EventEngine::ResolvedAddress local_; -}; - } // namespace experimental } // namespace grpc_event_engine diff --git a/test/cpp/server/BUILD b/test/cpp/server/BUILD index 063e6cf2a4c..0927de6c7a0 100644 --- a/test/cpp/server/BUILD +++ b/test/cpp/server/BUILD @@ -28,7 +28,6 @@ grpc_cc_test( deps = [ "//:grpc++_unsecure", "//src/proto/grpc/testing:echo_proto", - "//test/core/event_engine:event_engine_test_utils", "//test/core/util:grpc_test_util_base", "//test/core/util:grpc_test_util_unsecure", ], diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index 476eb41686c..14eaa5efb7d 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -16,19 +16,14 @@ // // -#include - #include -#include #include #include #include #include -#include "src/core/lib/gprpp/notification.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" -#include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -88,56 +83,6 @@ TEST_F(ServerBuilderTest, CreateServerRepeatedPortWithDisallowedReusePort) { nullptr); } -TEST_F(ServerBuilderTest, AddPassiveListener) { - std::unique_ptr passive_listener; - auto server = - ServerBuilder() - .experimental() - .AddPassiveListener(InsecureServerCredentials(), passive_listener) - .BuildAndStart(); - server->Shutdown(); -} - -TEST_F(ServerBuilderTest, PassiveListenerAcceptConnectedFd) { - std::unique_ptr passive_listener; - ServerBuilder builder; - auto cq = builder.AddCompletionQueue(); - // TODO(hork): why is the service necessary? Queue isn't drained otherwise. - auto server = - builder.RegisterService(&g_service) - .experimental() - .AddPassiveListener(InsecureServerCredentials(), passive_listener) - .BuildAndStart(); - ASSERT_NE(server.get(), nullptr); -#ifdef GPR_SUPPORT_CHANNELS_FROM_FD - int fd = socket(AF_INET, SOCK_STREAM, 0); - auto accept_status = passive_listener->AcceptConnectedFd(fd); - ASSERT_TRUE(accept_status.ok()) << accept_status; -#else - int fd = -1; - auto accept_status = passive_listener->AcceptConnectedFd(fd); - ASSERT_FALSE(accept_status.ok()) << accept_status; -#endif - server->Shutdown(); -} - -TEST_F(ServerBuilderTest, PassiveListenerAcceptConnectedEndpoint) { - std::unique_ptr passive_listener; - auto server = - ServerBuilder() - .experimental() - .AddPassiveListener(InsecureServerCredentials(), passive_listener) - .BuildAndStart(); - grpc_core::Notification endpoint_destroyed; - auto success = passive_listener->AcceptConnectedEndpoint( - std::make_unique( - &endpoint_destroyed)); - ASSERT_TRUE(success.ok()) - << "AcceptConnectedEndpoint failure: " << success.ToString(); - endpoint_destroyed.WaitForNotification(); - server->Shutdown(); -} - } // namespace } // namespace grpc diff --git a/tools/distrib/check_namespace_qualification.py b/tools/distrib/check_namespace_qualification.py index bf13f0cd729..6634d8b8830 100755 --- a/tools/distrib/check_namespace_qualification.py +++ b/tools/distrib/check_namespace_qualification.py @@ -77,10 +77,6 @@ IGNORED_FILES = [ "src/core/lib/gprpp/global_config_env.h", "src/core/lib/profiling/timers.h", "src/core/lib/gprpp/crash.h", - # The grpc_core::Server redundant namespace qualification is required for - # older gcc versions. - "src/core/ext/transport/chttp2/server/chttp2_server.h", - "src/core/lib/surface/server.h", ] # find our home diff --git a/tools/distrib/check_redundant_namespace_qualifiers.py b/tools/distrib/check_redundant_namespace_qualifiers.py index db89796db6f..0322332209b 100755 --- a/tools/distrib/check_redundant_namespace_qualifiers.py +++ b/tools/distrib/check_redundant_namespace_qualifiers.py @@ -21,13 +21,6 @@ import os import re import sys -IGNORED_FILES = [ - # note: the grpc_core::Server redundant namespace qualification is required - # for older gcc versions. - "src/core/ext/transport/chttp2/server/chttp2_server.h", - "src/core/lib/surface/server.h", -] - def find_closing_mustache(contents, initial_depth): """Find the closing mustache for a given number of open mustaches.""" @@ -173,8 +166,6 @@ for config in _CONFIGURATION: for file in files: if file.endswith(".cc") or file.endswith(".h"): path = os.path.join(root, file) - if path in IGNORED_FILES: - continue try: with open(path) as f: contents = f.read() diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 3ef9e5d8bbe..992dc36ace4 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -927,7 +927,6 @@ include/grpc/impl/grpc_types.h \ include/grpc/impl/propagation_bits.h \ include/grpc/impl/slice_type.h \ include/grpc/load_reporting.h \ -include/grpc/passive_listener.h \ include/grpc/slice.h \ include/grpc/slice_buffer.h \ include/grpc/status.h \ @@ -1040,7 +1039,6 @@ include/grpcpp/impl/server_initializer.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/impl/status.h \ include/grpcpp/impl/sync.h \ -include/grpcpp/passive_listener.h \ include/grpcpp/resource_quota.h \ include/grpcpp/security/audit_logging.h \ include/grpcpp/security/auth_context.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 12f51cf1d0d..5a03ce25466 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -927,7 +927,6 @@ include/grpc/impl/grpc_types.h \ include/grpc/impl/propagation_bits.h \ include/grpc/impl/slice_type.h \ include/grpc/load_reporting.h \ -include/grpc/passive_listener.h \ include/grpc/slice.h \ include/grpc/slice_buffer.h \ include/grpc/status.h \ @@ -1040,7 +1039,6 @@ include/grpcpp/impl/server_initializer.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/impl/status.h \ include/grpcpp/impl/sync.h \ -include/grpcpp/passive_listener.h \ include/grpcpp/resource_quota.h \ include/grpcpp/security/audit_logging.h \ include/grpcpp/security/auth_context.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index cb66020e461..583debb20df 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -860,7 +860,6 @@ include/grpc/impl/grpc_types.h \ include/grpc/impl/propagation_bits.h \ include/grpc/impl/slice_type.h \ include/grpc/load_reporting.h \ -include/grpc/passive_listener.h \ include/grpc/slice.h \ include/grpc/slice_buffer.h \ include/grpc/status.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index eb1b3fe46bd..24c94af4c46 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -860,7 +860,6 @@ include/grpc/impl/grpc_types.h \ include/grpc/impl/propagation_bits.h \ include/grpc/impl/slice_type.h \ include/grpc/load_reporting.h \ -include/grpc/passive_listener.h \ include/grpc/slice.h \ include/grpc/slice_buffer.h \ include/grpc/status.h \ From e5015e71f39ab998f1afd303bfe4d27d23575239 Mon Sep 17 00:00:00 2001 From: Nana Pang Date: Mon, 8 Apr 2024 17:04:09 -0700 Subject: [PATCH 02/18] [gRPC telemetry] Collect TCP connection metrics PiperOrigin-RevId: 622991342 --- src/core/lib/channel/tcp_tracer.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/lib/channel/tcp_tracer.h b/src/core/lib/channel/tcp_tracer.h index f93b0e139d8..5b218bc17b0 100644 --- a/src/core/lib/channel/tcp_tracer.h +++ b/src/core/lib/channel/tcp_tracer.h @@ -131,8 +131,12 @@ class TcpTracerInterface { }; virtual ~TcpTracerInterface() = default; + // Records a per-message event with an optional snapshot of connection + // metrics. virtual void RecordEvent(Type type, absl::Time time, size_t byte_offset, absl::optional metrics) = 0; + // Records a snapshot of connection metrics. + virtual void RecordConnectionMetrics(ConnectionMetrics metrics) = 0; }; } // namespace grpc_core From 3eb3e63eb32b5ab49548613df40cd507729dcdf7 Mon Sep 17 00:00:00 2001 From: Arvind Bright Date: Mon, 8 Apr 2024 17:10:34 -0700 Subject: [PATCH 03/18] [interop] Add v1.62.2 release of grpc-go to interop matrix (#36251) Closes #36251 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36251 from arvindbr8:go_release_1.62.2 470fb3752abe01a8959546f78093740d7b163523 PiperOrigin-RevId: 622992946 --- tools/interop_matrix/client_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index f792aab12a2..5020b9bea17 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -297,7 +297,7 @@ LANG_RELEASE_MATRIX = { ("v1.59.0", ReleaseInfo(runtimes=["go1.19"])), ("v1.60.1", ReleaseInfo(runtimes=["go1.19"])), ("v1.61.0", ReleaseInfo(runtimes=["go1.19"])), - ("v1.62.1", ReleaseInfo(runtimes=["go1.19"])), + ("v1.62.2", ReleaseInfo(runtimes=["go1.19"])), ("v1.63.0", ReleaseInfo(runtimes=["go1.19"])), ] ), From b361574a0b647b81129ed33749aaa74585acd779 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 8 Apr 2024 18:48:00 -0700 Subject: [PATCH 04/18] Fix fuzzer builds internally for core e2e tests The build layout I chose in https://github.com/grpc/grpc/pull/36198 causes problems for Google's internal build systems. This change fixes things so that link order is correct - unfortunately at the cost of adding 90-some C++ compilations. I've made a new .cc file that is as minimal as possible to reduce the cost of those compilations down as far as I can. PiperOrigin-RevId: 623012695 --- test/core/end2end/BUILD | 4 +- test/core/end2end/end2end_test_fuzzer.cc | 60 +++++++++---------- test/core/end2end/end2end_test_fuzzer.h | 24 ++++++++ test/core/end2end/end2end_test_fuzzer_main.cc | 20 +++++++ test/core/end2end/grpc_core_end2end_test.bzl | 6 +- 5 files changed, 79 insertions(+), 35 deletions(-) create mode 100644 test/core/end2end/end2end_test_fuzzer.h create mode 100644 test/core/end2end/end2end_test_fuzzer_main.cc diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index fa72459cd91..c3062c1d3a8 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -256,12 +256,14 @@ grpc_cc_library( srcs = [ "end2end_test_fuzzer.cc", ], + hdrs = [ + "end2end_test_fuzzer.h", + ], external_deps = [ "absl/functional:any_invocable", "absl/strings", "absl/types:optional", "gtest", - "libprotobuf_mutator", ], tags = ["nofixdeps"], deps = [ diff --git a/test/core/end2end/end2end_test_fuzzer.cc b/test/core/end2end/end2end_test_fuzzer.cc index 2c723c49a7d..450a4ec51b8 100644 --- a/test/core/end2end/end2end_test_fuzzer.cc +++ b/test/core/end2end/end2end_test_fuzzer.cc @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "test/core/end2end/end2end_test_fuzzer.h" + #include #include @@ -24,11 +26,6 @@ #include -#include "absl/functional/any_invocable.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" -#include "absl/types/optional.h" - #include #include @@ -39,8 +36,6 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/timer_manager.h" -#include "src/libfuzzer/libfuzzer_macro.h" -#include "test/core/end2end/end2end_test_fuzzer.pb.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/fixtures/h2_tls_common.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" @@ -53,23 +48,23 @@ using ::grpc_event_engine::experimental::GetDefaultEventEngine; bool squelch = true; static void dont_log(gpr_log_func_args* /*args*/) {} -DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) { +namespace grpc_core { + +void RunEnd2endFuzzer(const core_end2end_test_fuzzer::Msg& msg) { struct Test { std::string name; - absl::AnyInvocable() const> - factory; + absl::AnyInvocable() const> factory; }; - static const auto only_suite = grpc_core::GetEnv("GRPC_TEST_FUZZER_SUITE"); - static const auto only_test = grpc_core::GetEnv("GRPC_TEST_FUZZER_TEST"); - static const auto only_config = grpc_core::GetEnv("GRPC_TEST_FUZZER_CONFIG"); + static const auto only_suite = GetEnv("GRPC_TEST_FUZZER_SUITE"); + static const auto only_test = GetEnv("GRPC_TEST_FUZZER_TEST"); + static const auto only_config = GetEnv("GRPC_TEST_FUZZER_CONFIG"); - static const auto all_tests = - grpc_core::CoreEnd2endTestRegistry::Get().AllTests(); + static const auto all_tests = CoreEnd2endTestRegistry::Get().AllTests(); static const auto tests = []() { - grpc_core::g_is_fuzzing_core_e2e_tests = true; - grpc_core::ForceEnableExperiment("event_engine_client", true); - grpc_core::ForceEnableExperiment("event_engine_listener", true); + g_is_fuzzing_core_e2e_tests = true; + ForceEnableExperiment("event_engine_client", true); + ForceEnableExperiment("event_engine_listener", true); std::vector tests; for (const auto& test : all_tests) { @@ -81,11 +76,10 @@ DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) { } std::string test_name = absl::StrCat(test.suite, ".", test.name, "/", test.config->name); - tests.emplace_back( - Test{std::move(test_name), [&test]() { - return std::unique_ptr( - test.make_test(test.config)); - }}); + tests.emplace_back(Test{std::move(test_name), [&test]() { + return std::unique_ptr( + test.make_test(test.config)); + }}); } std::sort(tests.begin(), tests.end(), [](const Test& a, const Test& b) { return a.name < b.name; }); @@ -95,16 +89,16 @@ DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) { const int test_id = msg.test_id() % tests.size(); - if (squelch && !grpc_core::GetEnv("GRPC_TRACE_FUZZER").has_value()) { + if (squelch && !GetEnv("GRPC_TRACE_FUZZER").has_value()) { gpr_set_log_function(dont_log); } // TODO(ctiller): make this per fixture? - grpc_core::ConfigVars::Overrides overrides = - grpc_core::OverridesFromFuzzConfigVars(msg.config_vars()); + ConfigVars::Overrides overrides = + OverridesFromFuzzConfigVars(msg.config_vars()); overrides.default_ssl_roots_file_path = CA_CERT_PATH; - grpc_core::ConfigVars::SetOverrides(overrides); - grpc_core::TestOnlyReloadExperimentsFromConfigVariables(); + ConfigVars::SetOverrides(overrides); + TestOnlyReloadExperimentsFromConfigVariables(); grpc_event_engine::experimental::SetEventEngineFactory( [actions = msg.event_engine_actions()]() { FuzzingEventEngine::Options options; @@ -126,18 +120,20 @@ DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) { test->SetCqVerifierStepFn( [engine = std::move(engine)]( grpc_event_engine::experimental::EventEngine::Duration max_step) { - grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; - grpc_core::ExecCtx exec_ctx; + ApplicationCallbackExecCtx callback_exec_ctx; + ExecCtx exec_ctx; engine->Tick(max_step); grpc_timer_manager_tick(); }); test->SetPostGrpcInitFunc([]() { grpc_timer_manager_set_threading(false); - grpc_core::ExecCtx exec_ctx; - grpc_core::Executor::SetThreadingAll(false); + ExecCtx exec_ctx; + Executor::SetThreadingAll(false); }); test->SetUp(); test->RunTest(); test->TearDown(); GPR_ASSERT(!::testing::Test::HasFailure()); } + +} // namespace grpc_core diff --git a/test/core/end2end/end2end_test_fuzzer.h b/test/core/end2end/end2end_test_fuzzer.h new file mode 100644 index 00000000000..f80349b8f21 --- /dev/null +++ b/test/core/end2end/end2end_test_fuzzer.h @@ -0,0 +1,24 @@ +// 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_TEST_CORE_END2END_END2END_TEST_FUZZER_H +#define GRPC_TEST_CORE_END2END_END2END_TEST_FUZZER_H + +#include "test/core/end2end/end2end_test_fuzzer.pb.h" + +namespace grpc_core { +void RunEnd2endFuzzer(const core_end2end_test_fuzzer::Msg& msg); +} + +#endif diff --git a/test/core/end2end/end2end_test_fuzzer_main.cc b/test/core/end2end/end2end_test_fuzzer_main.cc new file mode 100644 index 00000000000..ffd98e7e75a --- /dev/null +++ b/test/core/end2end/end2end_test_fuzzer_main.cc @@ -0,0 +1,20 @@ +// 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/libfuzzer/libfuzzer_macro.h" +#include "test/core/end2end/end2end_test_fuzzer.h" + +DEFINE_PROTO_FUZZER(const core_end2end_test_fuzzer::Msg& msg) { + grpc_core::RunEnd2endFuzzer(msg); +} diff --git a/test/core/end2end/grpc_core_end2end_test.bzl b/test/core/end2end/grpc_core_end2end_test.bzl index fb682b5a407..caf64cd16a3 100644 --- a/test/core/end2end/grpc_core_end2end_test.bzl +++ b/test/core/end2end/grpc_core_end2end_test.bzl @@ -114,7 +114,9 @@ def grpc_core_end2end_test(name, shard_count = 10, tags = []): grpc_proto_fuzzer( name = "%s_fuzzer" % name, - srcs = [], + srcs = [ + "end2end_test_fuzzer_main.cc", + ], corpus = "end2end_test_corpus/%s" % name, data = END2END_TEST_DATA, external_deps = [ @@ -135,7 +137,7 @@ def grpc_core_end2end_test(name, shard_count = 10, tags = []): uses_event_engine = False, uses_polling = False, deps = [ - "end2end_test_fuzzer", "%s_library" % name, + "end2end_test_fuzzer", ], ) From 0a6f1c81f6741fa44d7b044f79063442c18fe57f Mon Sep 17 00:00:00 2001 From: Arvind Bright Date: Tue, 9 Apr 2024 08:06:15 -0700 Subject: [PATCH 05/18] [interop] Add v1.61.2 release of grpc-go to interop matrix (#36252) Closes #36252 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36252 from arvindbr8:go_release_1.61.2 d5e69b79b57af080a2b109e4f9fb1023dc8cbb53 PiperOrigin-RevId: 623169766 --- tools/interop_matrix/client_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 5020b9bea17..c899df165ec 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -296,7 +296,7 @@ LANG_RELEASE_MATRIX = { ("v1.58.3", ReleaseInfo(runtimes=["go1.19"])), ("v1.59.0", ReleaseInfo(runtimes=["go1.19"])), ("v1.60.1", ReleaseInfo(runtimes=["go1.19"])), - ("v1.61.0", ReleaseInfo(runtimes=["go1.19"])), + ("v1.61.2", ReleaseInfo(runtimes=["go1.19"])), ("v1.62.2", ReleaseInfo(runtimes=["go1.19"])), ("v1.63.0", ReleaseInfo(runtimes=["go1.19"])), ] From d8f4a0efdd98db05382166cdf6228203304177a4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:32:15 -0700 Subject: [PATCH 06/18] [clang-format] Remove requirement that port_platform.h is at the top (#36283) Closes #36283 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36283 from ctiller:port_platform-src-compiler-clang-format e5289caa6a719963d0d886167588fae5f5178f3d PiperOrigin-RevId: 623176077 --- src/compiler/.clang-format | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/.clang-format b/src/compiler/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/src/compiler/.clang-format +++ b/src/compiler/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 From e378d0b22916baa0ca1a3c8508cf58310e688669 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:32:59 -0700 Subject: [PATCH 07/18] [clang-format] Remove requirement that port_platform.h is at the top (#36279) Closes #36279 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36279 from ctiller:port_platform-include-grpcpp-security-clang-format fc03b264c0daadedcbe3f08bca8819a7dee5f3f5 PiperOrigin-RevId: 623176265 --- include/grpcpp/security/.clang-format | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/grpcpp/security/.clang-format b/include/grpcpp/security/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/include/grpcpp/security/.clang-format +++ b/include/grpcpp/security/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 From 2bcca152cf17b9a1680fa7a05a4aed447d7a4aec Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:33:35 -0700 Subject: [PATCH 08/18] [clang-format] Remove requirement that port_platform.h is at the top (#36277) Closes #36277 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36277 from ctiller:port_platform-include-grpcpp-impl-codegen-clang-format 2670fb8c35ef741c778abd2338fea826b4cfe224 PiperOrigin-RevId: 623176416 --- include/grpcpp/impl/codegen/.clang-format | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/grpcpp/impl/codegen/.clang-format b/include/grpcpp/impl/codegen/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/include/grpcpp/impl/codegen/.clang-format +++ b/include/grpcpp/impl/codegen/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 From b0cf42d86e59a629b22ccb87fb494c837a6167d3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:35:20 -0700 Subject: [PATCH 09/18] [clang-format] Remove requirement that port_platform.h is at the top (#36281) Closes #36281 PiperOrigin-RevId: 623176865 --- .clang-format | 3 --- test/core/address_utils/sockaddr_utils_test.cc | 4 ++-- test/core/client_channel/client_channel_test.cc | 3 +-- test/core/client_channel/lb_policy/lb_policy_test_lib.h | 3 +-- .../compiler_bugs/miscompile_with_no_unique_address_test.cc | 4 ++-- test/core/end2end/invalid_call_argument_test.cc | 3 +-- test/core/event_engine/common_closures_test.cc | 4 ++-- test/core/event_engine/default_engine_methods_test.cc | 3 +-- test/core/event_engine/endpoint_config_test.cc | 4 ++-- test/core/event_engine/factory_test.cc | 3 +-- test/core/event_engine/forkable_test.cc | 4 ++-- .../fuzzing_event_engine/fuzzing_event_engine_unittest.cc | 4 ++-- test/core/event_engine/handle_tests.cc | 3 +-- test/core/event_engine/query_extensions_test.cc | 3 +-- test/core/event_engine/slice_buffer_test.cc | 3 +-- test/core/event_engine/smoke_test.cc | 3 +-- test/core/event_engine/tcp_socket_utils_test.cc | 4 ++-- test/core/event_engine/test_init.cc | 4 ++-- test/core/event_engine/test_init.h | 4 ++-- test/core/event_engine/test_suite/tests/dns_test.cc | 3 +-- test/core/event_engine/test_suite/tools/echo_client.cc | 3 +-- .../test_suite/tools/posix_event_engine_factory.cc | 3 +-- .../test_suite/tools/windows_event_engine_factory.cc | 3 +-- test/core/event_engine/util/aborting_event_engine.h | 3 +-- test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc | 3 +-- test/core/event_engine/work_queue/basic_work_queue_test.cc | 3 +-- test/core/experiments/experiments_tag_test.cc | 4 ++-- test/core/experiments/experiments_test.cc | 4 ++-- test/core/experiments/fixtures/experiments.cc | 4 ++-- .../event_engine_client_channel_resolver/resolver_fuzzer.cc | 3 +-- test/core/gpr/useful_test.cc | 4 ++-- test/core/http/httpcli_test_util.cc | 3 +-- test/core/resolver/endpoint_addresses_test.cc | 3 +-- test/core/security/authorization_matchers_test.cc | 3 +-- test/core/security/certificate_provider_registry_test.cc | 4 ++-- test/core/security/check_gcp_environment_linux_test.cc | 3 +-- test/core/security/check_gcp_environment_windows_test.cc | 3 +-- test/core/security/credentials_test.cc | 3 +-- test/core/security/evaluate_args_test.cc | 4 ++-- test/core/security/grpc_audit_logging_test.cc | 3 +-- test/core/security/grpc_authorization_engine_test.cc | 3 +-- test/core/security/grpc_authorization_policy_provider_test.cc | 3 +-- test/core/security/system_roots_test.cc | 4 ++-- test/core/slice/slice_buffer_test.cc | 3 +-- test/core/slice/slice_test.cc | 3 +-- test/core/transport/chttp2/graceful_shutdown_test.cc | 3 +-- test/core/transport/chttp2/hpack_utils_test.cc | 4 ++-- .../transport/chttp2/remove_stream_from_stalled_lists_test.cc | 3 +-- .../stream_leak_with_queued_flow_control_update_test.cc | 3 +-- test/core/transport/chttp2/streams_not_seen_test.cc | 3 +-- test/core/transport/chttp2/too_many_pings_test.cc | 3 +-- .../tsi/alts/handshaker/alts_concurrent_connectivity_test.cc | 3 +-- test/core/util/audit_logging_utils.cc | 3 +-- test/core/util/audit_logging_utils.h | 3 +-- test/core/util/cmdline.h | 4 ++-- test/core/util/evaluate_args_test_util.h | 3 +-- test/core/util/fake_udp_and_tcp_server.cc | 3 +-- test/core/util/fake_udp_and_tcp_server.h | 3 +-- test/core/util/fuzz_config_vars_helpers.h | 4 ++-- test/core/util/fuzzing_channel_args.cc | 4 ++-- test/core/util/fuzzing_channel_args.h | 4 ++-- test/core/util/histogram.cc | 3 +-- test/core/util/histogram.h | 4 ++-- test/core/util/mock_authorization_endpoint.h | 4 ++-- test/core/util/port_server_client.cc | 3 +-- test/core/util/proto_bit_gen.h | 4 ++-- test/core/util/socket_use_after_close_detector.cc | 4 ++-- test/core/util/socket_use_after_close_detector.h | 3 +-- test/core/util/stack_tracer.cc | 4 ++-- test/core/util/stack_tracer.h | 4 ++-- test/core/util/test_lb_policies.h | 4 ++-- test/core/xds/xds_client_test_peer.h | 4 ++-- test/core/xds/xds_transport_fake.cc | 3 +-- test/core/xds/xds_transport_fake.h | 4 ++-- test/cpp/end2end/channelz_service_test.cc | 3 +-- test/cpp/end2end/exception_test.cc | 3 +-- test/cpp/end2end/flaky_network_test.cc | 3 +-- test/cpp/end2end/server_load_reporting_end2end_test.cc | 3 +-- test/cpp/ext/otel/otel_test_library.h | 3 +-- test/cpp/interop/backend_metrics_lb_policy.cc | 4 ++-- test/cpp/interop/backend_metrics_lb_policy.h | 1 - test/cpp/interop/grpclb_fallback_test.cc | 3 +-- test/cpp/interop/pre_stop_hook_server.h | 1 - test/cpp/interop/rpc_behavior_lb_policy.cc | 4 ++-- test/cpp/microbenchmarks/bm_basic_work_queue.cc | 3 +-- test/cpp/microbenchmarks/helpers.h | 3 +-- .../huffman_geometries/decode_huff_10_10_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_10_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_11_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_11_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_12_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_12_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_13_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_13_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_14_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_14_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_15_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_15_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_5_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_5_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_6_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_6_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_7_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_7_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_8_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_8_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_9_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_10_9_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_10_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_10_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_11_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_11_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_12_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_12_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_13_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_13_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_14_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_14_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_5_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_5_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_6_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_6_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_7_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_7_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_8_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_9_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_11_9_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_10_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_10_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_11_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_11_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_12_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_12_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_13_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_13_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_5_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_5_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_6_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_6_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_7_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_7_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_8_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_8_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_9_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_12_9_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_10_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_10_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_11_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_11_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_12_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_12_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_5_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_5_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_6_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_6_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_7_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_7_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_8_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_8_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_9_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_13_9_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_10_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_10_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_11_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_11_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_5_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_5_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_6_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_6_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_7_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_7_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_8_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_8_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_9_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_14_9_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_10_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_10_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_5_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_5_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_6_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_6_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_7_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_7_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_8_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_8_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_9_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_15_9_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_5_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_5_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_6_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_6_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_7_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_7_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_8_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_8_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_9_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_16_9_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_10_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_10_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_11_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_11_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_12_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_12_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_13_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_13_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_14_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_14_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_15_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_15_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_16_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_16_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_7_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_7_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_8_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_8_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_9_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_7_9_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_10_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_10_12.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_11_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_11_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_12_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_12_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_13_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_13_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_14_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_14_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_15_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_15_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_16_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_16_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_6_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_6_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_7_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_7_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_8_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_8_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_9_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_8_9_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_10_11.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_10_11.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_11_10.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_11_10.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_12_9.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_12_9.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_13_8.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_13_8.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_14_7.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_14_7.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_15_6.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_15_6.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_16_5.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_16_5.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_5_16.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_5_16.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_6_15.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_6_15.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_7_14.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_7_14.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_8_13.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_8_13.h | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_9_12.cc | 4 ++-- .../microbenchmarks/huffman_geometries/decode_huff_9_9_12.h | 4 ++-- test/cpp/naming/resolver_component_test.cc | 3 +-- test/cpp/naming/resolver_component_tests_runner_invoker.cc | 4 ++-- test/cpp/server/load_reporter/get_cpu_stats_test.cc | 3 +-- test/cpp/server/load_reporter/load_data_store_test.cc | 3 +-- test/cpp/server/load_reporter/load_reporter_test.cc | 3 +-- test/cpp/thread_manager/thread_manager_test.cc | 3 +-- test/cpp/util/channel_trace_proto_helper.cc | 3 +-- test/cpp/util/channelz_sampler.cc | 3 +-- test/cpp/util/channelz_sampler_test.cc | 3 +-- test/cpp/util/grpc_tool.cc | 3 +-- test/cpp/util/windows/manifest_file.cc | 4 ++-- 325 files changed, 584 insertions(+), 649 deletions(-) diff --git a/.clang-format b/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/.clang-format +++ b/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 diff --git a/test/core/address_utils/sockaddr_utils_test.cc b/test/core/address_utils/sockaddr_utils_test.cc index 74bb201cc1a..81c774f51f0 100644 --- a/test/core/address_utils/sockaddr_utils_test.cc +++ b/test/core/address_utils/sockaddr_utils_test.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "src/core/lib/address_utils/sockaddr_utils.h" #include @@ -27,6 +25,8 @@ #include "absl/strings/str_cat.h" #include "gtest/gtest.h" +#include + #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" #ifdef GRPC_HAVE_UNIX_SOCKET diff --git a/test/core/client_channel/client_channel_test.cc b/test/core/client_channel/client_channel_test.cc index b7ce9652087..1286cdfeeed 100644 --- a/test/core/client_channel/client_channel_test.cc +++ b/test/core/client_channel/client_channel_test.cc @@ -14,14 +14,13 @@ // limitations under the License. // -#include - #include #include "absl/types/optional.h" #include "gtest/gtest.h" #include +#include #include "src/core/client_channel/client_channel_filter.h" #include "src/core/client_channel/subchannel_pool_interface.h" diff --git a/test/core/client_channel/lb_policy/lb_policy_test_lib.h b/test/core/client_channel/lb_policy/lb_policy_test_lib.h index d8581f36a22..3f42dbba0bf 100644 --- a/test/core/client_channel/lb_policy/lb_policy_test_lib.h +++ b/test/core/client_channel/lb_policy/lb_policy_test_lib.h @@ -17,8 +17,6 @@ #ifndef GRPC_TEST_CORE_CLIENT_CHANNEL_LB_POLICY_LB_POLICY_TEST_LIB_H #define GRPC_TEST_CORE_CLIENT_CHANNEL_LB_POLICY_LB_POLICY_TEST_LIB_H -#include - #include #include @@ -53,6 +51,7 @@ #include #include #include +#include #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/subchannel_interface_internal.h" diff --git a/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc b/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc index 81aa23d06cf..49d723884ca 100644 --- a/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc +++ b/test/core/compiler_bugs/miscompile_with_no_unique_address_test.cc @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include "gtest/gtest.h" +#include + // Make a template argument to test which bit pattern remains in A's destructor // to try and detect similar bugs in non-MSAN builds (none have been detected // yet thankfully) diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc index 7977aa3086b..7f5d2345aa7 100644 --- a/test/core/end2end/invalid_call_argument_test.cc +++ b/test/core/end2end/invalid_call_argument_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -32,6 +30,7 @@ #include #include #include +#include #include #include "src/core/lib/gprpp/host_port.h" diff --git a/test/core/event_engine/common_closures_test.cc b/test/core/event_engine/common_closures_test.cc index c1a184a011b..ee4f71937d1 100644 --- a/test/core/event_engine/common_closures_test.cc +++ b/test/core/event_engine/common_closures_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/event_engine/common_closures.h" #include @@ -21,6 +19,8 @@ #include "absl/functional/any_invocable.h" #include "gtest/gtest.h" +#include + #include "src/core/lib/gprpp/notification.h" using ::grpc_event_engine::experimental::AnyInvocableClosure; diff --git a/test/core/event_engine/default_engine_methods_test.cc b/test/core/event_engine/default_engine_methods_test.cc index 6ec63318409..b240209b3e7 100644 --- a/test/core/event_engine/default_engine_methods_test.cc +++ b/test/core/event_engine/default_engine_methods_test.cc @@ -11,8 +11,6 @@ // 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 #include @@ -29,6 +27,7 @@ #include #include #include +#include #include "src/core/lib/event_engine/default_event_engine.h" #include "test/core/util/test_config.h" diff --git a/test/core/event_engine/endpoint_config_test.cc b/test/core/event_engine/endpoint_config_test.cc index 329f09ee639..5a23b5e3263 100644 --- a/test/core/event_engine/endpoint_config_test.cc +++ b/test/core/event_engine/endpoint_config_test.cc @@ -11,13 +11,13 @@ // 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/types/optional.h" #include "gtest/gtest.h" +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" diff --git a/test/core/event_engine/factory_test.cc b/test/core/event_engine/factory_test.cc index 54721938c16..b826aac2650 100644 --- a/test/core/event_engine/factory_test.cc +++ b/test/core/event_engine/factory_test.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include "gtest/gtest.h" #include #include +#include #include "src/core/lib/event_engine/default_event_engine.h" #include "test/core/event_engine/util/aborting_event_engine.h" diff --git a/test/core/event_engine/forkable_test.cc b/test/core/event_engine/forkable_test.cc index d299a447fdf..9c7fdf69405 100644 --- a/test/core/event_engine/forkable_test.cc +++ b/test/core/event_engine/forkable_test.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/event_engine/forkable.h" +#include + #ifdef GPR_POSIX_SUBPROCESS #include #include diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc index 2279d41421d..e78e4aaa01e 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine_unittest.cc @@ -14,13 +14,13 @@ // limitations under the License. // -#include - #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "absl/synchronization/notification.h" #include "gtest/gtest.h" +#include + #include "src/core/lib/gprpp/time.h" using ::grpc_event_engine::experimental::FuzzingEventEngine; diff --git a/test/core/event_engine/handle_tests.cc b/test/core/event_engine/handle_tests.cc index 335d48bb938..418dcb40dd1 100644 --- a/test/core/event_engine/handle_tests.cc +++ b/test/core/event_engine/handle_tests.cc @@ -11,13 +11,12 @@ // 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 "gtest/gtest.h" #include +#include using ::grpc_event_engine::experimental::EventEngine; diff --git a/test/core/event_engine/query_extensions_test.cc b/test/core/event_engine/query_extensions_test.cc index e22274a9571..5f9f43ab55e 100644 --- a/test/core/event_engine/query_extensions_test.cc +++ b/test/core/event_engine/query_extensions_test.cc @@ -11,8 +11,6 @@ // 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/lib/event_engine/query_extensions.h" #include @@ -23,6 +21,7 @@ #include #include +#include #include "src/core/lib/gprpp/crash.h" diff --git a/test/core/event_engine/slice_buffer_test.cc b/test/core/event_engine/slice_buffer_test.cc index 7ebf7ba4bc4..482485c05f4 100644 --- a/test/core/event_engine/slice_buffer_test.cc +++ b/test/core/event_engine/slice_buffer_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include @@ -26,6 +24,7 @@ #include #include #include +#include using ::grpc_event_engine::experimental::Slice; using ::grpc_event_engine::experimental::SliceBuffer; diff --git a/test/core/event_engine/smoke_test.cc b/test/core/event_engine/smoke_test.cc index 731f960c4e2..bf1f2509041 100644 --- a/test/core/event_engine/smoke_test.cc +++ b/test/core/event_engine/smoke_test.cc @@ -11,8 +11,6 @@ // 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 "gmock/gmock.h" @@ -20,6 +18,7 @@ #include #include +#include #include "test/core/util/test_config.h" diff --git a/test/core/event_engine/tcp_socket_utils_test.cc b/test/core/event_engine/tcp_socket_utils_test.cc index b18c51eb28d..0a00c3c1d4f 100644 --- a/test/core/event_engine/tcp_socket_utils_test.cc +++ b/test/core/event_engine/tcp_socket_utils_test.cc @@ -11,12 +11,12 @@ // 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/lib/event_engine/tcp_socket_utils.h" #include +#include + #include "src/core/lib/iomgr/port.h" // IWYU pragma: keep #ifdef GRPC_HAVE_VSOCK diff --git a/test/core/event_engine/test_init.cc b/test/core/event_engine/test_init.cc index a8aa559894f..2b7600ce0d2 100644 --- a/test/core/event_engine/test_init.cc +++ b/test/core/event_engine/test_init.cc @@ -11,14 +11,14 @@ // 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 "test/core/event_engine/test_init.h" #include #include "absl/strings/str_cat.h" +#include + namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_init.h b/test/core/event_engine/test_init.h index 2af682f523f..7ab584d07f3 100644 --- a/test/core/event_engine/test_init.h +++ b/test/core/event_engine/test_init.h @@ -13,11 +13,11 @@ // limitations under the License. #ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H #define GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H -#include - #include "absl/status/status.h" #include "absl/strings/string_view.h" +#include + namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_suite/tests/dns_test.cc b/test/core/event_engine/test_suite/tests/dns_test.cc index 9cea1c3c84a..ce1f0fa4760 100644 --- a/test/core/event_engine/test_suite/tests/dns_test.cc +++ b/test/core/event_engine/test_suite/tests/dns_test.cc @@ -15,8 +15,6 @@ // IWYU pragma: no_include // IWYU pragma: no_include -#include - #include #include #include @@ -34,6 +32,7 @@ #include "gtest/gtest.h" #include +#include #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" diff --git a/test/core/event_engine/test_suite/tools/echo_client.cc b/test/core/event_engine/test_suite/tools/echo_client.cc index 17a88792c4d..26be36b2a1c 100644 --- a/test/core/event_engine/test_suite/tools/echo_client.cc +++ b/test/core/event_engine/test_suite/tools/echo_client.cc @@ -11,11 +11,10 @@ // 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 +#include // The echo client wraps an EventEngine::Connect and EventEngine::Endpoint // implementations, allowing third-party TCP listeners to interact with your diff --git a/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc b/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc index 05cf8ea2bad..a08c0956ef2 100644 --- a/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc +++ b/test/core/event_engine/test_suite/tools/posix_event_engine_factory.cc @@ -12,13 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include "absl/functional/any_invocable.h" #include +#include #include "src/core/lib/iomgr/port.h" diff --git a/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc b/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc index b890f9396b0..3f8c69b0bc7 100644 --- a/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc +++ b/test/core/event_engine/test_suite/tools/windows_event_engine_factory.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include "absl/functional/any_invocable.h" #include #include +#include #ifdef GPR_WINDOWS diff --git a/test/core/event_engine/util/aborting_event_engine.h b/test/core/event_engine/util/aborting_event_engine.h index 3144e015a9e..ecc2db968dd 100644 --- a/test/core/event_engine/util/aborting_event_engine.h +++ b/test/core/event_engine/util/aborting_event_engine.h @@ -14,8 +14,6 @@ #ifndef GRPC_TEST_CORE_EVENT_ENGINE_UTIL_ABORTING_EVENT_ENGINE_H #define GRPC_TEST_CORE_EVENT_ENGINE_UTIL_ABORTING_EVENT_ENGINE_H -#include - #include #include @@ -27,6 +25,7 @@ #include #include #include +#include namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc b/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc index 81595dfbfcc..be59f7ecdb8 100644 --- a/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc +++ b/test/core/event_engine/work_queue/basic_work_queue_fuzzer.cc @@ -11,8 +11,6 @@ // 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 @@ -23,6 +21,7 @@ #include "absl/types/optional.h" #include +#include #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" diff --git a/test/core/event_engine/work_queue/basic_work_queue_test.cc b/test/core/event_engine/work_queue/basic_work_queue_test.cc index 668c0ede28f..1c63541e4ed 100644 --- a/test/core/event_engine/work_queue/basic_work_queue_test.cc +++ b/test/core/event_engine/work_queue/basic_work_queue_test.cc @@ -11,8 +11,6 @@ // 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/lib/event_engine/work_queue/basic_work_queue.h" #include @@ -22,6 +20,7 @@ #include "gtest/gtest.h" #include +#include #include "src/core/lib/event_engine/common_closures.h" #include "test/core/util/test_config.h" diff --git a/test/core/experiments/experiments_tag_test.cc b/test/core/experiments/experiments_tag_test.cc index bc1bfa4f041..51643148209 100644 --- a/test/core/experiments/experiments_tag_test.cc +++ b/test/core/experiments/experiments_tag_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include "absl/status/status.h" @@ -23,6 +21,8 @@ #include "absl/strings/strip.h" #include "gtest/gtest.h" +#include + #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/config.h" #include "test/core/experiments/fixtures/experiments.h" diff --git a/test/core/experiments/experiments_test.cc b/test/core/experiments/experiments_test.cc index f9513624f7f..f604efa05ff 100644 --- a/test/core/experiments/experiments_test.cc +++ b/test/core/experiments/experiments_test.cc @@ -14,14 +14,14 @@ // Auto generated by tools/codegen/core/gen_experiments.py -#include - #include "test/core/experiments/fixtures/experiments.h" #include #include "gtest/gtest.h" +#include + #include "src/core/lib/experiments/config.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL diff --git a/test/core/experiments/fixtures/experiments.cc b/test/core/experiments/fixtures/experiments.cc index 37b5e9ad9d3..8352ffb7ee4 100644 --- a/test/core/experiments/fixtures/experiments.cc +++ b/test/core/experiments/fixtures/experiments.cc @@ -14,10 +14,10 @@ // Auto generated by tools/codegen/core/gen_experiments.py -#include - #include "test/core/experiments/fixtures/experiments.h" +#include + #ifndef GRPC_EXPERIMENTS_ARE_FINAL #if defined(GRPC_CFSTREAM) diff --git a/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc b/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc index 3bb9afeb4d2..7766e5b4591 100644 --- a/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc +++ b/test/core/ext/filters/event_engine_client_channel_resolver/resolver_fuzzer.cc @@ -11,8 +11,6 @@ // 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 #include @@ -29,6 +27,7 @@ #include #include +#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/gpr/useful_test.cc b/test/core/gpr/useful_test.cc index f2742d15214..b203226dbd4 100644 --- a/test/core/gpr/useful_test.cc +++ b/test/core/gpr/useful_test.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/core/lib/gpr/useful.h" #include @@ -27,6 +25,8 @@ #include "gtest/gtest.h" +#include + namespace grpc_core { TEST(UsefulTest, ClampWorks) { diff --git a/test/core/http/httpcli_test_util.cc b/test/core/http/httpcli_test_util.cc index 93fb3a70281..2fb8271cb5a 100644 --- a/test/core/http/httpcli_test_util.cc +++ b/test/core/http/httpcli_test_util.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "test/core/http/httpcli_test_util.h" #include @@ -29,6 +27,7 @@ #include #include +#include #include #include diff --git a/test/core/resolver/endpoint_addresses_test.cc b/test/core/resolver/endpoint_addresses_test.cc index 2a4f75c73d9..1f7564914e1 100644 --- a/test/core/resolver/endpoint_addresses_test.cc +++ b/test/core/resolver/endpoint_addresses_test.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "src/core/resolver/endpoint_addresses.h" #include @@ -26,6 +24,7 @@ #include "gtest/gtest.h" #include +#include #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/test/core/security/authorization_matchers_test.cc b/test/core/security/authorization_matchers_test.cc index c4f6512efe2..17f9a99da1a 100644 --- a/test/core/security/authorization_matchers_test.cc +++ b/test/core/security/authorization_matchers_test.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include #include +#include #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/matchers.h" diff --git a/test/core/security/certificate_provider_registry_test.cc b/test/core/security/certificate_provider_registry_test.cc index 2fbf1cd4210..332bb2d2642 100644 --- a/test/core/security/certificate_provider_registry_test.cc +++ b/test/core/security/certificate_provider_registry_test.cc @@ -16,12 +16,12 @@ // // -#include - #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" #include +#include + #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/check_gcp_environment_linux_test.cc b/test/core/security/check_gcp_environment_linux_test.cc index 8eb5dc4960f..83f5fc91889 100644 --- a/test/core/security/check_gcp_environment_linux_test.cc +++ b/test/core/security/check_gcp_environment_linux_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -25,6 +23,7 @@ #include #include +#include #include "src/core/lib/gpr/tmpfile.h" #include "src/core/lib/gprpp/crash.h" diff --git a/test/core/security/check_gcp_environment_windows_test.cc b/test/core/security/check_gcp_environment_windows_test.cc index a5bb469d471..6270bdd913b 100644 --- a/test/core/security/check_gcp_environment_windows_test.cc +++ b/test/core/security/check_gcp_environment_windows_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -25,6 +23,7 @@ #include #include +#include #include "src/core/lib/gpr/tmpfile.h" #include "src/core/lib/gprpp/crash.h" diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index c73336dbca4..5afafcf50a3 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/core/lib/security/credentials/credentials.h" #include @@ -37,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/test/core/security/evaluate_args_test.cc b/test/core/security/evaluate_args_test.cc index 2592555b27c..34c7476a52d 100644 --- a/test/core/security/evaluate_args_test.cc +++ b/test/core/security/evaluate_args_test.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/security/authorization/evaluate_args.h" #include #include +#include + #include "src/core/lib/address_utils/sockaddr_utils.h" #include "test/core/util/evaluate_args_test_util.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/grpc_audit_logging_test.cc b/test/core/security/grpc_audit_logging_test.cc index be89611b550..46252d6808a 100644 --- a/test/core/security/grpc_audit_logging_test.cc +++ b/test/core/security/grpc_audit_logging_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -31,6 +29,7 @@ #include "absl/time/time.h" #include +#include #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_reader.h" diff --git a/test/core/security/grpc_authorization_engine_test.cc b/test/core/security/grpc_authorization_engine_test.cc index e446d324563..b04ae10aa39 100644 --- a/test/core/security/grpc_authorization_engine_test.cc +++ b/test/core/security/grpc_authorization_engine_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/security/authorization/grpc_authorization_engine.h" #include @@ -23,6 +21,7 @@ #include #include +#include #include "src/core/lib/json/json.h" #include "src/core/lib/security/authorization/audit_logging.h" diff --git a/test/core/security/grpc_authorization_policy_provider_test.cc b/test/core/security/grpc_authorization_policy_provider_test.cc index af235590f2e..29831e8036c 100644 --- a/test/core/security/grpc_authorization_policy_provider_test.cc +++ b/test/core/security/grpc_authorization_policy_provider_test.cc @@ -12,14 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" #include #include #include +#include #include "src/core/lib/security/authorization/grpc_authorization_engine.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/system_roots_test.cc b/test/core/security/system_roots_test.cc index 0bc6f251972..27e8402be41 100644 --- a/test/core/security/system_roots_test.cc +++ b/test/core/security/system_roots_test.cc @@ -16,10 +16,10 @@ // // -#include - #include +#include + #if defined(GPR_LINUX) || defined(GPR_FREEBSD) || defined(GPR_APPLE) || \ defined(GPR_WINDOWS) #include diff --git a/test/core/slice/slice_buffer_test.cc b/test/core/slice/slice_buffer_test.cc index a440ed0d3b8..7a64d6566af 100644 --- a/test/core/slice/slice_buffer_test.cc +++ b/test/core/slice/slice_buffer_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "src/core/lib/slice/slice_buffer.h" #include @@ -26,6 +24,7 @@ #include #include #include +#include #include "src/core/lib/slice/slice.h" diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc index 36e509a3662..a4b89707815 100644 --- a/test/core/slice/slice_test.cc +++ b/test/core/slice/slice_test.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/core/lib/slice/slice.h" #include @@ -35,6 +33,7 @@ #include #include +#include #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/no_destruct.h" diff --git a/test/core/transport/chttp2/graceful_shutdown_test.cc b/test/core/transport/chttp2/graceful_shutdown_test.cc index 3107db10885..bd9d8623793 100644 --- a/test/core/transport/chttp2/graceful_shutdown_test.cc +++ b/test/core/transport/chttp2/graceful_shutdown_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -43,6 +41,7 @@ #include #include #include +#include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" diff --git a/test/core/transport/chttp2/hpack_utils_test.cc b/test/core/transport/chttp2/hpack_utils_test.cc index d41fa98b123..a37fa073cf2 100644 --- a/test/core/transport/chttp2/hpack_utils_test.cc +++ b/test/core/transport/chttp2/hpack_utils_test.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include #include +#include + #include "src/core/ext/transport/chttp2/transport/hpack_encoder_index.h" namespace grpc_core { diff --git a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc index 95092f9ff8a..c81b5dea487 100644 --- a/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc +++ b/test/core/transport/chttp2/remove_stream_from_stalled_lists_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -39,6 +37,7 @@ #include #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/flow_control.h" diff --git a/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc b/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc index 0c3aed882cf..2efcee3ab95 100644 --- a/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc +++ b/test/core/transport/chttp2/stream_leak_with_queued_flow_control_update_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include @@ -31,6 +29,7 @@ #include #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" diff --git a/test/core/transport/chttp2/streams_not_seen_test.cc b/test/core/transport/chttp2/streams_not_seen_test.cc index 420686ea6e6..82db8cd0131 100644 --- a/test/core/transport/chttp2/streams_not_seen_test.cc +++ b/test/core/transport/chttp2/streams_not_seen_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -48,6 +46,7 @@ #include #include #include +#include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" diff --git a/test/core/transport/chttp2/too_many_pings_test.cc b/test/core/transport/chttp2/too_many_pings_test.cc index 3477fe2041c..cf13696a367 100644 --- a/test/core/transport/chttp2/too_many_pings_test.cc +++ b/test/core/transport/chttp2/too_many_pings_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -40,6 +38,7 @@ #include #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" diff --git a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc index 789e2d45839..e7c50708564 100644 --- a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc +++ b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -41,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/test/core/util/audit_logging_utils.cc b/test/core/util/audit_logging_utils.cc index 61c6823f49c..06a091bb0bd 100644 --- a/test/core/util/audit_logging_utils.cc +++ b/test/core/util/audit_logging_utils.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "test/core/util/audit_logging_utils.h" #include @@ -28,6 +26,7 @@ #include #include +#include #include "src/core/lib/json/json_writer.h" diff --git a/test/core/util/audit_logging_utils.h b/test/core/util/audit_logging_utils.h index 39e866afd31..d2db306af66 100644 --- a/test/core/util/audit_logging_utils.h +++ b/test/core/util/audit_logging_utils.h @@ -17,8 +17,6 @@ #ifndef GRPC_TEST_CORE_UTIL_AUDIT_LOGGING_UTILS_H #define GRPC_TEST_CORE_UTIL_AUDIT_LOGGING_UTILS_H -#include - #include #include #include @@ -28,6 +26,7 @@ #include #include +#include namespace grpc_core { namespace testing { diff --git a/test/core/util/cmdline.h b/test/core/util/cmdline.h index 1771d7cb8af..362e2258d12 100644 --- a/test/core/util/cmdline.h +++ b/test/core/util/cmdline.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CORE_UTIL_CMDLINE_H #define GRPC_TEST_CORE_UTIL_CMDLINE_H -#include - #include +#include + /// Simple command line parser. /// Supports flags that can be specified as -foo, --foo, --no-foo, -no-foo, etc diff --git a/test/core/util/evaluate_args_test_util.h b/test/core/util/evaluate_args_test_util.h index 0c97e8d7226..276967d7d02 100644 --- a/test/core/util/evaluate_args_test_util.h +++ b/test/core/util/evaluate_args_test_util.h @@ -15,8 +15,6 @@ #ifndef GRPC_TEST_CORE_UTIL_EVALUATE_ARGS_TEST_UTIL_H #define GRPC_TEST_CORE_UTIL_EVALUATE_ARGS_TEST_UTIL_H -#include - #include #include @@ -25,6 +23,7 @@ #include #include +#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" diff --git a/test/core/util/fake_udp_and_tcp_server.cc b/test/core/util/fake_udp_and_tcp_server.cc index cd184c33350..46e49d947b3 100644 --- a/test/core/util/fake_udp_and_tcp_server.cc +++ b/test/core/util/fake_udp_and_tcp_server.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "test/core/util/fake_udp_and_tcp_server.h" #include @@ -29,6 +27,7 @@ #include "absl/strings/str_cat.h" #include +#include #include #include "src/core/lib/address_utils/sockaddr_utils.h" diff --git a/test/core/util/fake_udp_and_tcp_server.h b/test/core/util/fake_udp_and_tcp_server.h index 36beadf6fd6..f7b6fcccf1d 100644 --- a/test/core/util/fake_udp_and_tcp_server.h +++ b/test/core/util/fake_udp_and_tcp_server.h @@ -17,13 +17,12 @@ #ifndef GRPC_TEST_CORE_UTIL_FAKE_UDP_AND_TCP_SERVER_H #define GRPC_TEST_CORE_UTIL_FAKE_UDP_AND_TCP_SERVER_H -#include - #include #include #include #include +#include #include namespace grpc_core { diff --git a/test/core/util/fuzz_config_vars_helpers.h b/test/core/util/fuzz_config_vars_helpers.h index 9550b75bd7d..6a84cbbe4ff 100644 --- a/test/core/util/fuzz_config_vars_helpers.h +++ b/test/core/util/fuzz_config_vars_helpers.h @@ -15,12 +15,12 @@ #ifndef GRPC_TEST_CORE_UTIL_FUZZ_CONFIG_VARS_HELPERS_H #define GRPC_TEST_CORE_UTIL_FUZZ_CONFIG_VARS_HELPERS_H -#include - #include #include +#include + namespace grpc_core { std::string ValidateExperimentsStringForFuzzing(uint64_t experiments); diff --git a/test/core/util/fuzzing_channel_args.cc b/test/core/util/fuzzing_channel_args.cc index 8e25f4d4003..970a7e46d48 100644 --- a/test/core/util/fuzzing_channel_args.cc +++ b/test/core/util/fuzzing_channel_args.cc @@ -11,10 +11,10 @@ // 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 "test/core/util/fuzzing_channel_args.h" +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "test/core/util/fuzzing_channel_args.pb.h" diff --git a/test/core/util/fuzzing_channel_args.h b/test/core/util/fuzzing_channel_args.h index c8d1b84afd3..123373d240c 100644 --- a/test/core/util/fuzzing_channel_args.h +++ b/test/core/util/fuzzing_channel_args.h @@ -15,10 +15,10 @@ #ifndef GRPC_TEST_CORE_UTIL_FUZZING_CHANNEL_ARGS_H #define GRPC_TEST_CORE_UTIL_FUZZING_CHANNEL_ARGS_H -#include - #include +#include + #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/resource_quota.h" diff --git a/test/core/util/histogram.cc b/test/core/util/histogram.cc index b02cde8ea5a..64165f7b0a9 100644 --- a/test/core/util/histogram.cc +++ b/test/core/util/histogram.cc @@ -16,8 +16,6 @@ // // -#include - #include "test/core/util/histogram.h" #include @@ -25,6 +23,7 @@ #include #include +#include #include "src/core/lib/gpr/useful.h" diff --git a/test/core/util/histogram.h b/test/core/util/histogram.h index d221cc811d2..f11419b0ea4 100644 --- a/test/core/util/histogram.h +++ b/test/core/util/histogram.h @@ -19,11 +19,11 @@ #ifndef GRPC_TEST_CORE_UTIL_HISTOGRAM_H #define GRPC_TEST_CORE_UTIL_HISTOGRAM_H -#include - #include #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/test/core/util/mock_authorization_endpoint.h b/test/core/util/mock_authorization_endpoint.h index 6d9fbd2efaa..0644ba38e60 100644 --- a/test/core/util/mock_authorization_endpoint.h +++ b/test/core/util/mock_authorization_endpoint.h @@ -15,12 +15,12 @@ #ifndef GRPC_TEST_CORE_UTIL_MOCK_AUTHORIZATION_ENDPOINT_H #define GRPC_TEST_CORE_UTIL_MOCK_AUTHORIZATION_ENDPOINT_H -#include - #include #include "absl/strings/string_view.h" +#include + #include "src/core/lib/iomgr/endpoint.h" namespace grpc_core { diff --git a/test/core/util/port_server_client.cc b/test/core/util/port_server_client.cc index 632d644c0bb..8dc073fc7e2 100644 --- a/test/core/util/port_server_client.cc +++ b/test/core/util/port_server_client.cc @@ -16,8 +16,6 @@ // // -#include - #include "test/core/util/port_server_client.h" #include @@ -36,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/test/core/util/proto_bit_gen.h b/test/core/util/proto_bit_gen.h index 8d1f34ce21d..3154acb674f 100644 --- a/test/core/util/proto_bit_gen.h +++ b/test/core/util/proto_bit_gen.h @@ -15,8 +15,6 @@ #ifndef GRPC_TEST_CORE_UTIL_PROTO_BIT_GEN_H #define GRPC_TEST_CORE_UTIL_PROTO_BIT_GEN_H -#include - #include #include @@ -24,6 +22,8 @@ #include #include +#include + namespace grpc_core { // Set of random numbers from a proto file (or other container) forming a bit diff --git a/test/core/util/socket_use_after_close_detector.cc b/test/core/util/socket_use_after_close_detector.cc index 1deaa67831d..058dcd7bb74 100644 --- a/test/core/util/socket_use_after_close_detector.cc +++ b/test/core/util/socket_use_after_close_detector.cc @@ -16,14 +16,14 @@ // // -#include - #include "test/core/util/socket_use_after_close_detector.h" #include #include #include +#include + // IWYU pragma: no_include // IWYU pragma: no_include diff --git a/test/core/util/socket_use_after_close_detector.h b/test/core/util/socket_use_after_close_detector.h index 37c6773b28a..4df0c548038 100644 --- a/test/core/util/socket_use_after_close_detector.h +++ b/test/core/util/socket_use_after_close_detector.h @@ -19,11 +19,10 @@ #ifndef GRPC_TEST_CORE_UTIL_SOCKET_USE_AFTER_CLOSE_DETECTOR_H #define GRPC_TEST_CORE_UTIL_SOCKET_USE_AFTER_CLOSE_DETECTOR_H -#include - #include #include +#include #include namespace grpc_core { diff --git a/test/core/util/stack_tracer.cc b/test/core/util/stack_tracer.cc index 4ae0218f28d..8b0e9ed4f39 100644 --- a/test/core/util/stack_tracer.cc +++ b/test/core/util/stack_tracer.cc @@ -16,8 +16,6 @@ // // -#include - #include "test/core/util/stack_tracer.h" #include @@ -26,6 +24,8 @@ #include "absl/debugging/stacktrace.h" #include "absl/debugging/symbolize.h" +#include + #include "src/core/lib/gprpp/examine_stack.h" namespace { diff --git a/test/core/util/stack_tracer.h b/test/core/util/stack_tracer.h index 4065a27fafd..378f47e4f63 100644 --- a/test/core/util/stack_tracer.h +++ b/test/core/util/stack_tracer.h @@ -19,10 +19,10 @@ #ifndef GRPC_TEST_CORE_UTIL_STACK_TRACER_H #define GRPC_TEST_CORE_UTIL_STACK_TRACER_H -#include - #include +#include + namespace grpc_core { namespace testing { diff --git a/test/core/util/test_lb_policies.h b/test/core/util/test_lb_policies.h index c3f8b473fad..5db30222754 100644 --- a/test/core/util/test_lb_policies.h +++ b/test/core/util/test_lb_policies.h @@ -17,8 +17,6 @@ #ifndef GRPC_TEST_CORE_UTIL_TEST_LB_POLICIES_H #define GRPC_TEST_CORE_UTIL_TEST_LB_POLICIES_H -#include - #include #include #include @@ -28,6 +26,8 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" +#include + #include "src/core/lib/config/core_configuration.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/resolver/endpoint_addresses.h" diff --git a/test/core/xds/xds_client_test_peer.h b/test/core/xds/xds_client_test_peer.h index 64cbd841499..c05baa3ac00 100644 --- a/test/core/xds/xds_client_test_peer.h +++ b/test/core/xds/xds_client_test_peer.h @@ -17,13 +17,13 @@ #ifndef GRPC_TEST_CORE_XDS_XDS_CLIENT_TEST_PEER_H #define GRPC_TEST_CORE_XDS_XDS_CLIENT_TEST_PEER_H -#include - #include #include "absl/functional/function_ref.h" #include "absl/strings/str_cat.h" +#include + #include "src/core/ext/xds/xds_client.h" namespace grpc_core { diff --git a/test/core/xds/xds_transport_fake.cc b/test/core/xds/xds_transport_fake.cc index 1153d870151..734c622889d 100644 --- a/test/core/xds/xds_transport_fake.cc +++ b/test/core/xds/xds_transport_fake.cc @@ -14,8 +14,6 @@ // limitations under the License. // -#include - #include "test/core/xds/xds_transport_fake.h" #include @@ -27,6 +25,7 @@ #include #include +#include #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/lib/event_engine/default_event_engine.h" diff --git a/test/core/xds/xds_transport_fake.h b/test/core/xds/xds_transport_fake.h index a3f50caae25..7628df6b897 100644 --- a/test/core/xds/xds_transport_fake.h +++ b/test/core/xds/xds_transport_fake.h @@ -17,8 +17,6 @@ #ifndef GRPC_TEST_CORE_XDS_XDS_TRANSPORT_FAKE_H #define GRPC_TEST_CORE_XDS_XDS_TRANSPORT_FAKE_H -#include - #include #include @@ -34,6 +32,8 @@ #include "absl/time/time.h" #include "absl/types/optional.h" +#include + #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/ext/xds/xds_transport.h" #include "src/core/lib/gprpp/orphanable.h" diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc index 681e6a1a712..2a707af9243 100644 --- a/test/cpp/end2end/channelz_service_test.cc +++ b/test/cpp/end2end/channelz_service_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -25,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/test/cpp/end2end/exception_test.cc b/test/cpp/end2end/exception_test.cc index 6f80e2203fe..017bb334a5f 100644 --- a/test/cpp/end2end/exception_test.cc +++ b/test/cpp/end2end/exception_test.cc @@ -16,13 +16,12 @@ // // -#include - #include #include #include +#include #include #include #include diff --git a/test/cpp/end2end/flaky_network_test.cc b/test/cpp/end2end/flaky_network_test.cc index f40f583301c..0eb99b998f3 100644 --- a/test/cpp/end2end/flaky_network_test.cc +++ b/test/cpp/end2end/flaky_network_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -33,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/test/cpp/end2end/server_load_reporting_end2end_test.cc b/test/cpp/end2end/server_load_reporting_end2end_test.cc index 393af8614e3..e717129c627 100644 --- a/test/cpp/end2end/server_load_reporting_end2end_test.cc +++ b/test/cpp/end2end/server_load_reporting_end2end_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include @@ -26,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/test/cpp/ext/otel/otel_test_library.h b/test/cpp/ext/otel/otel_test_library.h index a11dc177934..49430eeac54 100644 --- a/test/cpp/ext/otel/otel_test_library.h +++ b/test/cpp/ext/otel/otel_test_library.h @@ -19,8 +19,6 @@ #ifndef GRPC_TEST_CPP_EXT_OTEL_OTEL_TEST_LIBRARY_H #define GRPC_TEST_CPP_EXT_OTEL_OTEL_TEST_LIBRARY_H -#include - #include #include @@ -31,6 +29,7 @@ #include "opentelemetry/sdk/metrics/meter_provider.h" #include "opentelemetry/sdk/metrics/metric_reader.h" +#include #include #include diff --git a/test/cpp/interop/backend_metrics_lb_policy.cc b/test/cpp/interop/backend_metrics_lb_policy.cc index cbe64559c72..af694622fd5 100644 --- a/test/cpp/interop/backend_metrics_lb_policy.cc +++ b/test/cpp/interop/backend_metrics_lb_policy.cc @@ -16,12 +16,12 @@ // // -#include - #include "test/cpp/interop/backend_metrics_lb_policy.h" #include "absl/strings/str_format.h" +#include + #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/oob_backend_metric.h" diff --git a/test/cpp/interop/backend_metrics_lb_policy.h b/test/cpp/interop/backend_metrics_lb_policy.h index 0f8c1cc7756..2012132b03c 100644 --- a/test/cpp/interop/backend_metrics_lb_policy.h +++ b/test/cpp/interop/backend_metrics_lb_policy.h @@ -20,7 +20,6 @@ #define GRPC_TEST_CPP_INTEROP_BACKEND_METRICS_LB_POLICY_H #include - #include #include "src/core/lib/config/core_configuration.h" diff --git a/test/cpp/interop/grpclb_fallback_test.cc b/test/cpp/interop/grpclb_fallback_test.cc index 48189d6c692..ebb7e2926f2 100644 --- a/test/cpp/interop/grpclb_fallback_test.cc +++ b/test/cpp/interop/grpclb_fallback_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -38,6 +36,7 @@ #include #include +#include #include #include #include diff --git a/test/cpp/interop/pre_stop_hook_server.h b/test/cpp/interop/pre_stop_hook_server.h index a86e5964804..c491d4140df 100644 --- a/test/cpp/interop/pre_stop_hook_server.h +++ b/test/cpp/interop/pre_stop_hook_server.h @@ -20,7 +20,6 @@ #define GRPC_TEST_CPP_INTEROP_PRE_STOP_HOOK_SERVER_H #include - #include #include "src/core/lib/gprpp/sync.h" diff --git a/test/cpp/interop/rpc_behavior_lb_policy.cc b/test/cpp/interop/rpc_behavior_lb_policy.cc index 9a7398789f6..2c13a529dcb 100644 --- a/test/cpp/interop/rpc_behavior_lb_policy.cc +++ b/test/cpp/interop/rpc_behavior_lb_policy.cc @@ -16,12 +16,12 @@ // // -#include - #include "test/cpp/interop/rpc_behavior_lb_policy.h" #include "absl/strings/str_format.h" +#include + #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" diff --git a/test/cpp/microbenchmarks/bm_basic_work_queue.cc b/test/cpp/microbenchmarks/bm_basic_work_queue.cc index efbed93d150..094c61c0524 100644 --- a/test/cpp/microbenchmarks/bm_basic_work_queue.cc +++ b/test/cpp/microbenchmarks/bm_basic_work_queue.cc @@ -11,14 +11,13 @@ // 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 #include #include +#include #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" diff --git a/test/cpp/microbenchmarks/helpers.h b/test/cpp/microbenchmarks/helpers.h index 2b8eb2ad21d..11b7b9b642a 100644 --- a/test/cpp/microbenchmarks/helpers.h +++ b/test/cpp/microbenchmarks/helpers.h @@ -19,13 +19,12 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HELPERS_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HELPERS_H -#include - #include #include #include +#include #include #include "src/core/lib/debug/stats.h" diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.cc index 61954055881..4e41892d5c1 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.h" + +#include namespace grpc_core { namespace geometry_10_10_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.h index 7cb612f89a8..224fa8e09ea 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_10_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_10_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_10_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_10_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.cc index 4b00768bf36..2141af8cc19 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.h" + +#include namespace grpc_core { namespace geometry_10_11_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.h index 9687222441c..1b6d8770b06 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_11_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_11_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_11_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_11_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.cc index f07b38ad3f6..c06295dbf18 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.h" + +#include namespace grpc_core { namespace geometry_10_12_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.h index 134300308a3..e1e57d73584 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_12_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_12_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_12_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_12_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.cc index d2d9c339a20..b101bf9fc06 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.h" + +#include namespace grpc_core { namespace geometry_10_13_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.h index 943bbd06958..f9c53fcabcc 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_13_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_13_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_13_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_13_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.cc index 50f810b278c..1284fb87c98 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.h" + +#include namespace grpc_core { namespace geometry_10_14_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.h index 69cdea1b7f3..6e94c4101d8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_14_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_14_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_14_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_14_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.cc index 1512d13ec74..0cc14f69391 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.h" + +#include namespace grpc_core { namespace geometry_10_15_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.h index e260364924d..e67d0d8551c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_15_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_15_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_15_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_15_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.cc index ddb4a178129..48513f175b8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.h" + +#include namespace grpc_core { namespace geometry_10_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.h index 68bb9455b77..5c67e2fc765 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.cc index c99662008ad..d1ca2fa8155 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.h" + +#include namespace grpc_core { namespace geometry_10_5_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.h index 2b325a2d551..b506f33ea2e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_5_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_5_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_5_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_5_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.cc index bbc078d3b70..1be61761f98 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.h" + +#include namespace grpc_core { namespace geometry_10_6_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.h index e87da7bc7a3..3d4caace6e8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_6_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_6_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_6_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_6_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.cc index 1fccf48fa0b..761d1f5a73e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.h" + +#include namespace grpc_core { namespace geometry_10_7_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.h index 4b78b543dd4..63f71988498 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_7_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_7_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_7_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_7_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.cc index 70c00bdae4c..b843aea96ed 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.h" + +#include namespace grpc_core { namespace geometry_10_8_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.h index 4f09f254aad..25481b3985b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_8_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_8_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_8_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_8_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.cc index c912d5f32d1..8505a46f6ea 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.h" + +#include namespace grpc_core { namespace geometry_10_9_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.h index 2f321d8db9c..89ad9f8f907 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_10_9_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_9_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_10_9_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_10_9_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.cc index 3a4fe20b3d9..4a4cbbedd7a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.h" + +#include namespace grpc_core { namespace geometry_11_10_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.h index c467ca0652d..34c6d1f2c2c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_10_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_10_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_10_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_10_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.cc index f1525b60210..4da659bf1b1 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.h" + +#include namespace grpc_core { namespace geometry_11_11_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.h index 997c2929ae2..3ddddd7d403 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_11_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_11_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_11_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_11_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.cc index 22e4701ea58..3ff9c518ba9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.h" + +#include namespace grpc_core { namespace geometry_11_12_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.h index 686ffcbbc4b..8d1b379e1f0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_12_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_12_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_12_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_12_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.cc index 825597c3dd6..b5a769c26e7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.h" + +#include namespace grpc_core { namespace geometry_11_13_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.h index 5e9714b2d22..067dbb83cb3 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_13_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_13_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_13_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_13_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.cc index 7834321b1a3..2b48e9758b6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.h" + +#include namespace grpc_core { namespace geometry_11_14_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.h index 812905e7aa2..9ba6cee6332 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_14_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_14_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_14_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_14_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.cc index 2a6fbba8b68..40287a5d944 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.h" + +#include namespace grpc_core { namespace geometry_11_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.h index 44e75a5b1ad..a2e8f22d81a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.cc index e73c416d5b8..8631beaf3b0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.h" + +#include namespace grpc_core { namespace geometry_11_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.h index 04a8ec258af..a74909bb20a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.cc index e20f9d6361b..268d1ed6602 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.h" + +#include namespace grpc_core { namespace geometry_11_5_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.h index 3b6a5ad72de..028fdf52291 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_5_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_5_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_5_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_5_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.cc index b697cdb7c79..91eec3b54c4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.h" + +#include namespace grpc_core { namespace geometry_11_6_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.h index 6e1082349b6..0fa3263245a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_6_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_6_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_6_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_6_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.cc index b32ca1153b4..706a4e8a0cf 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.h" + +#include namespace grpc_core { namespace geometry_11_7_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.h index ddfccfda4df..72297c98cdb 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_7_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_7_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_7_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_7_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc index 3fa0c1390ec..ae7ab9fbef7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.h" + +#include namespace grpc_core { namespace geometry_11_8_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.h index ab8cde1f44f..d4b59f4fe4d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_8_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_8_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_8_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_8_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.cc index b6726fec3fa..a0aa6291ce3 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.h" + +#include namespace grpc_core { namespace geometry_11_9_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.h index a42c25dd655..f0d9f92d2ae 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_11_9_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_9_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_11_9_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_11_9_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.cc index ee52ac12faa..019874000c4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.h" + +#include namespace grpc_core { namespace geometry_12_10_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.h index 9a3595a8023..11f06fe45c2 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_10_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_10_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_10_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_10_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.cc index 96c2bd385ef..110565a436c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.h" + +#include namespace grpc_core { namespace geometry_12_11_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.h index 7441ae12c83..4fc7a89c5c7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_11_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_11_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_11_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_11_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.cc index 3f748e00824..6ca22799ccc 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.h" + +#include namespace grpc_core { namespace geometry_12_12_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.h index c9f90810ddd..48b2a785675 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_12_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_12_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_12_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_12_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.cc index a36407d3fc1..711c4aa658f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.h" + +#include namespace grpc_core { namespace geometry_12_13_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.h index 29571739b28..a1d3bb25d3e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_13_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_13_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_13_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_13_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.cc index bdfd981bbf0..b2a9dbedc5f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.h" + +#include namespace grpc_core { namespace geometry_12_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.h index 20971b3fb07..1f821280e62 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.cc index f6bbc8c133d..fa198d8b4d1 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.h" + +#include namespace grpc_core { namespace geometry_12_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.h index 264fd08a910..bbb71de408a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.cc index c92b36f7bb0..75f5c17be28 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.h" + +#include namespace grpc_core { namespace geometry_12_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.h index 733afddcb11..b31ac1bdee0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.cc index 44905fe1627..2c8d00972d6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.h" + +#include namespace grpc_core { namespace geometry_12_5_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.h index 3738f37ddb3..8710b114e1f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_5_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_5_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_5_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_5_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.cc index 2075d1a7686..0cec537b3d0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.h" + +#include namespace grpc_core { namespace geometry_12_6_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.h index e41fe3b2738..447a2739738 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_6_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_6_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_6_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_6_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.cc index 05920993241..d45531e282f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.h" + +#include namespace grpc_core { namespace geometry_12_7_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.h index 6ef0eeb0692..704980c04f8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_7_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_7_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_7_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_7_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.cc index 4b1728f5762..28ef95e55a5 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.h" + +#include namespace grpc_core { namespace geometry_12_8_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.h index 62850885924..e873b94a71d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_8_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_8_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_8_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_8_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.cc index 576d300d56b..e0de8d47e3e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.h" + +#include namespace grpc_core { namespace geometry_12_9_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.h index b9cd32998e7..fe41533ed5f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_12_9_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_9_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_12_9_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_12_9_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.cc index f54b33cc4f7..435c322f16d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.h" + +#include namespace grpc_core { namespace geometry_13_10_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.h index 3fc3d0ceb2d..719bc1b373e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_10_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_10_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_10_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_10_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.cc index 88ec62ae3c1..0b5c8cb4ce6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.h" + +#include namespace grpc_core { namespace geometry_13_11_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.h index cf153631b79..f3271d92ed7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_11_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_11_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_11_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_11_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.cc index c98fd8fae38..101df0fcfc4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.h" + +#include namespace grpc_core { namespace geometry_13_12_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.h index 3424dacabf5..374e220033c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_12_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_12_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_12_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_12_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.cc index 7d17a5329dc..bffc2d702fd 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.h" + +#include namespace grpc_core { namespace geometry_13_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.h index 86641765630..1e0de177c81 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.cc index e1867eb3189..39a76092415 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.h" + +#include namespace grpc_core { namespace geometry_13_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.h index a6681855558..b7a98a752d6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.cc index 85367b6411a..48218b955f6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.h" + +#include namespace grpc_core { namespace geometry_13_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.h index 1328f115bd5..65d366d3ab6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.cc index 9ede94dfbb8..5dfaf938c4f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.h" + +#include namespace grpc_core { namespace geometry_13_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.h index 0fc7219383b..77dc3b78f99 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.cc index 20dd3f6212c..ae4cd9bc307 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.h" + +#include namespace grpc_core { namespace geometry_13_5_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.h index 8c2d72a33fe..c4e797c3350 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_5_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_5_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_5_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_5_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.cc index e353fa7c49d..016ffe28b37 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.h" + +#include namespace grpc_core { namespace geometry_13_6_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.h index e6749923ed7..c3122863abb 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_6_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_6_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_6_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_6_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.cc index 5717339ead9..fb38f4dd533 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.h" + +#include namespace grpc_core { namespace geometry_13_7_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.h index b6bdab909ab..377bed52e26 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_7_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_7_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_7_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_7_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.cc index 96eb970b617..bd411b644b3 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.h" + +#include namespace grpc_core { namespace geometry_13_8_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.h index 5d4d06bd54c..064cd4eef7a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_8_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_8_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_8_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_8_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.cc index d7aecac33eb..ad707fe2cf6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.h" + +#include namespace grpc_core { namespace geometry_13_9_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.h index f2ed82263bc..26174060f9d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_13_9_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_9_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_13_9_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_13_9_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.cc index 3fc44f90a7d..f2b101dd7c7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.h" + +#include namespace grpc_core { namespace geometry_14_10_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.h index 7a0afdd5ba5..fded10a26e8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_10_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_10_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_10_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_10_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.cc index a2a7a9de722..0c1b0cfba62 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.h" + +#include namespace grpc_core { namespace geometry_14_11_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.h index 03eefc51530..362b3718f58 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_11_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_11_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_11_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_11_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.cc index 619403a9a40..90b3a8b3252 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.h" + +#include namespace grpc_core { namespace geometry_14_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.h index 9080e2df40d..eb01276b7c1 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.cc index fc210de3ec3..6b7b237b55c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.h" + +#include namespace grpc_core { namespace geometry_14_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.h index d5cd4414eb5..18c6abe6a5a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.cc index f352080ef74..d437eaacd63 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.h" + +#include namespace grpc_core { namespace geometry_14_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.h index fa118417c06..264c643f746 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.cc index b11670bb936..4bc546e1662 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.h" + +#include namespace grpc_core { namespace geometry_14_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.h index 2bc44984553..f58c64a6647 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.cc index 2d51191001c..c475e2a6a35 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.h" + +#include namespace grpc_core { namespace geometry_14_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.h index 13022737594..272fa17f68f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.cc index 7ebc29f9d09..57ea5a16e9e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.h" + +#include namespace grpc_core { namespace geometry_14_5_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.h index 98ef66ec575..7b0733e8b69 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_5_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_5_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_5_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_5_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.cc index 48cccb0bf75..cafe6e02f9a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.h" + +#include namespace grpc_core { namespace geometry_14_6_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.h index aa7ead69b02..773972315c6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_6_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_6_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_6_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_6_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.cc index 5390aca7b3c..f91f444c504 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.h" + +#include namespace grpc_core { namespace geometry_14_7_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.h index 1df41199b9a..992ddcc6e10 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_7_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_7_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_7_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_7_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.cc index 302ebe0ff7b..2137dd260c6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.h" + +#include namespace grpc_core { namespace geometry_14_8_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.h index 4fac8f0345c..4fc0eb75aba 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_8_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_8_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_8_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_8_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.cc index 9d5f9c23302..d91a0bb6d90 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.h" + +#include namespace grpc_core { namespace geometry_14_9_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.h index a451b3fe10e..79ddbcfcd9d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_14_9_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_9_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_14_9_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_14_9_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.cc index e823aa8998f..36499e52245 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.h" + +#include namespace grpc_core { namespace geometry_15_10_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.h index a444fd361ce..7559b09eff4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_10_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_10_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_10_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_10_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.cc index 7ff1b3768b5..3bd5f4eb497 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.h" + +#include namespace grpc_core { namespace geometry_15_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.h index 4f419b4bf46..3a0355c7ab0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.cc index 03ffe2b4996..9ad27421b18 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.h" + +#include namespace grpc_core { namespace geometry_15_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.h index 657c3c1033d..a136a28105c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.cc index 15aa7e52d96..7b81267e050 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.h" + +#include namespace grpc_core { namespace geometry_15_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.h index dfe4daf0d5c..ae727957a44 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.cc index e154d0fd51e..6f5793bc202 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.h" + +#include namespace grpc_core { namespace geometry_15_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.h index 23ff4d11556..bdd617f7451 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.cc index ebe63ca812b..fd093332937 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.h" + +#include namespace grpc_core { namespace geometry_15_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.h index 4903d2162f2..87402a165f8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.cc index 3158f11defb..4148fac04b9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.h" + +#include namespace grpc_core { namespace geometry_15_5_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.h index 8c7d1399573..ec3aa7c9a26 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_5_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_5_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_5_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_5_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.cc index b16c90f081f..cf07847699e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.h" + +#include namespace grpc_core { namespace geometry_15_6_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.h index f1bfb63654f..bea961d3f45 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_6_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_6_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_6_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_6_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.cc index 803f189fbb4..5c2efe440c7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.h" + +#include namespace grpc_core { namespace geometry_15_7_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.h index 26ea2e9eb9b..9bd88ccd91a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_7_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_7_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_7_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_7_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.cc index 55a86f66fd9..49caf45a54f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.h" + +#include namespace grpc_core { namespace geometry_15_8_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.h index 79e220f8c99..2a73e27dd88 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_8_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_8_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_8_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_8_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.cc index 2f1962a1f38..66ba74fe20b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.h" + +#include namespace grpc_core { namespace geometry_15_9_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.h index a36b0813660..db99f0c18b5 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_15_9_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_9_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_15_9_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_15_9_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.cc index 3761be5dd83..8f07bc21e5a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.h" + +#include namespace grpc_core { namespace geometry_16_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.h index 875ec2bcc71..9026715a8c9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.cc index 88adecaf856..d3371eca09b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.h" + +#include namespace grpc_core { namespace geometry_16_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.h index ce0d8cf88ee..2fe26e4e64b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.cc index 20f5540c43e..1bd3f4dbdaf 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.h" + +#include namespace grpc_core { namespace geometry_16_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.h index 123d24bb39a..a90771c9e2a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.cc index cf0e669ac3b..4a4c90f1e03 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.h" + +#include namespace grpc_core { namespace geometry_16_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.h index a8d1e224cb7..83d3b9b49d6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.cc index 972cfc75899..a66b5d6a0e9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.h" + +#include namespace grpc_core { namespace geometry_16_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.h index 2345b43add1..c933c5514e5 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.cc index b04ba698fda..8d7f45adfb2 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.h" + +#include namespace grpc_core { namespace geometry_16_5_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.h index 60a136383af..25893843b6e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_5_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_5_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_5_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_5_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.cc index e34ea11466a..e246f48c8a5 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.h" + +#include namespace grpc_core { namespace geometry_16_6_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.h index 0aec6b7fada..899ed710524 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_6_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_6_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_6_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_6_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.cc index 9e0e140e33d..cb8f78b39df 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.h" + +#include namespace grpc_core { namespace geometry_16_7_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.h index 203b44f3e12..653e1ecd75e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_7_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_7_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_7_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_7_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.cc index 17fc1cfbd99..af96ec3c9ec 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.h" + +#include namespace grpc_core { namespace geometry_16_8_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.h index 08073fd1308..c94c7dd6c1c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_8_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_8_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_8_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_8_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.cc index 1173ab5b598..36cbdbcd7f5 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.h" + +#include namespace grpc_core { namespace geometry_16_9_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.h index 8c368ee450e..3fd53b20bb8 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_16_9_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_9_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_16_9_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_16_9_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.cc index d527730ffeb..ba689c7d149 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.h" + +#include namespace grpc_core { namespace geometry_7_10_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.h index 7758081add5..20b45791577 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_10_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_10_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_10_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_10_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.cc index 94d43162480..0651dde6247 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.h" + +#include namespace grpc_core { namespace geometry_7_11_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.h index b1a7380289d..81e158bfb28 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_11_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_11_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_11_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_11_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.cc index 7f29582575a..6443ccd4f8f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.h" + +#include namespace grpc_core { namespace geometry_7_12_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.h index eb0099245d7..4934179b948 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_12_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_12_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_12_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_12_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.cc index e0bd97a4cc2..20adda50751 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.h" + +#include namespace grpc_core { namespace geometry_7_13_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.h index d9914e5ae6c..6eb00ff7f5b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_13_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_13_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_13_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_13_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.cc index 707b3aee77f..18afbf499a4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.h" + +#include namespace grpc_core { namespace geometry_7_14_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.h index a3aeb5a4081..8a0372eb985 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_14_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_14_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_14_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_14_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.cc index 0671b745c4a..ff80c2abfaf 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.h" + +#include namespace grpc_core { namespace geometry_7_15_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.h index 369c9df56b7..c8dc87de5ea 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_15_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_15_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_15_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_15_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.cc index 071c24513dc..ddde294adb6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.h" + +#include namespace grpc_core { namespace geometry_7_16_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.h index f22218889f2..3153e5e17cd 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_16_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_16_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_16_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_16_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.cc index 92b0934a7d2..981ae513610 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.h" + +#include namespace grpc_core { namespace geometry_7_7_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.h index a195da6843c..43919ceabf9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_7_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_7_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_7_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_7_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.cc index 10035737668..891835c8ccc 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.h" + +#include namespace grpc_core { namespace geometry_7_8_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.h index 3500458b969..c722fc93e84 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_8_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_8_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_8_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_8_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.cc index 41015740973..7e6ad7e7b58 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.h" + +#include namespace grpc_core { namespace geometry_7_9_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.h index 8f26c0fe275..2edce646636 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_7_9_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_9_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_7_9_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_7_9_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.cc index 70dc8cf8657..53bf21ecff4 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.h" + +#include namespace grpc_core { namespace geometry_8_10_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.h index 70c4a8e3461..c630d80d3a6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_10_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_10_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_10_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_10_12 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.cc index 56a515445b2..488146c0e25 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.h" + +#include namespace grpc_core { namespace geometry_8_11_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.h index 7585cca928a..61f2dea4f6c 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_11_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_11_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_11_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_11_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.cc index cfd64e2e70b..9e666132139 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.h" + +#include namespace grpc_core { namespace geometry_8_12_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.h index 45e816ff445..7f1933c9a5f 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_12_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_12_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_12_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_12_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.cc index be2ee28cdf5..39ad790935d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.h" + +#include namespace grpc_core { namespace geometry_8_13_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.h index d7a0e34b47a..a376dc815d9 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_13_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_13_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_13_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_13_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.cc index ffc3f9f8662..8d6cbd415ff 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.h" + +#include namespace grpc_core { namespace geometry_8_14_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.h index 599606835c4..1ed17f9e0cd 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_14_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_14_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_14_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_14_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.cc index 943d8382faa..e3f77889ba7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.h" + +#include namespace grpc_core { namespace geometry_8_15_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.h index 60300f61be2..950eb20e835 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_15_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_15_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_15_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_15_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.cc index 7a3290d1246..9dc43d8e754 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.h" + +#include namespace grpc_core { namespace geometry_8_16_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.h index aa7ad24b997..da5c118548b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_16_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_16_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_16_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_16_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.cc index f98332d1dc7..9d0d2a36906 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.h" + +#include namespace grpc_core { namespace geometry_8_6_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.h index 203b97e9c68..5909e5057a0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_6_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_6_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_6_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_6_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.cc index 5ea04f49d9f..7633319a576 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.h" + +#include namespace grpc_core { namespace geometry_8_7_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.h index 2916720adf2..09a43f7c8f7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_7_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_7_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_7_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_7_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.cc index f205267b30e..958b259899a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.h" + +#include namespace grpc_core { namespace geometry_8_8_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.h index ddee51539e9..fde9d5affa6 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_8_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_8_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_8_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_8_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.cc index 9a81934367e..8b2b95c5e54 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.h" + +#include namespace grpc_core { namespace geometry_8_9_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.h index fc8a114967e..d5725985466 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_8_9_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_9_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_8_9_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_8_9_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.cc index f01ee50dc75..263b330c8ac 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.h" + +#include namespace grpc_core { namespace geometry_9_10_11 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.h index d1d026aa298..68bf93479fc 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_10_11.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_10_11_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_10_11_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_10_11 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.cc index c8d5da618d8..3ada1455d4b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.h" + +#include namespace grpc_core { namespace geometry_9_11_10 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.h index 4254a984e37..06e32116acc 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_11_10.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_11_10_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_11_10_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_11_10 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.cc index 0fec1b27612..961e27f8628 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.h" + +#include namespace grpc_core { namespace geometry_9_12_9 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.h index 8a63dbdb7b6..9e74147f8b1 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_12_9.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_12_9_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_12_9_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_12_9 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.cc index d9b384e6998..961e9c0d597 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.h" + +#include namespace grpc_core { namespace geometry_9_13_8 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.h index 017fea5fa7f..6e4bd042589 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_13_8.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_13_8_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_13_8_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_13_8 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.cc index 469a7e8743b..a23d476723a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.h" + +#include namespace grpc_core { namespace geometry_9_14_7 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.h index 66a928e7434..7ae02a2938e 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_14_7.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_14_7_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_14_7_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_14_7 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.cc index 319e9f9b65f..fdeee070f1a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.h" + +#include namespace grpc_core { namespace geometry_9_15_6 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.h index 59e07ec2e82..869c4190471 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_15_6.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_15_6_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_15_6_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_15_6 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.cc index 5ca819e076b..600db56b0ab 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.h" + +#include namespace grpc_core { namespace geometry_9_16_5 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.h index 5cdf27307f4..12d24a6f2e7 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_16_5.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_16_5_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_16_5_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_16_5 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.cc index e9d4e38edb8..5de303dcdbb 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.h" + +#include namespace grpc_core { namespace geometry_9_5_16 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.h index 6b5c7564ca5..4713176d8c0 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_5_16.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_5_16_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_5_16_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_5_16 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.cc index 1094d1a7626..8f39500d921 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.h" + +#include namespace grpc_core { namespace geometry_9_6_15 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.h index 4bc2bd9e266..93705a2be4a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_6_15.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_6_15_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_6_15_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_6_15 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.cc index bd0535fdab8..5601074b006 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.h" + +#include namespace grpc_core { namespace geometry_9_7_14 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.h index de2b0fce4a9..29b1387c47d 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_7_14.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_7_14_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_7_14_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_7_14 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.cc index 600a7d2aab0..779f7552c5a 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.h" + +#include namespace grpc_core { namespace geometry_9_8_13 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.h index 7ab4d5a5428..e966da8395b 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_8_13.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_8_13_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_8_13_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_8_13 { class HuffDecoderCommon { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.cc b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.cc index 37d4769052f..f4db1156071 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.cc +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.cc @@ -15,9 +15,9 @@ // This file is autogenerated: see // tools/codegen/core/gen_huffman_decompressor.cc -#include - #include "test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.h" + +#include namespace grpc_core { namespace geometry_9_9_12 { const uint8_t HuffDecoderCommon::table2_0_emit_[10] = { diff --git a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.h b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.h index f973b2f99c4..10618a503fe 100644 --- a/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.h +++ b/test/cpp/microbenchmarks/huffman_geometries/decode_huff_9_9_12.h @@ -17,10 +17,10 @@ #ifndef GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_9_12_H #define GRPC_TEST_CPP_MICROBENCHMARKS_HUFFMAN_GEOMETRIES_DECODE_HUFF_9_9_12_H -#include - #include #include + +#include namespace grpc_core { namespace geometry_9_9_12 { class HuffDecoderCommon { diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index bfbb0956c69..d7aaef9921f 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -16,8 +16,6 @@ // // -#include - #include #include #include @@ -37,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/test/cpp/naming/resolver_component_tests_runner_invoker.cc b/test/cpp/naming/resolver_component_tests_runner_invoker.cc index 382f57bd386..f5b8c455e9e 100644 --- a/test/cpp/naming/resolver_component_tests_runner_invoker.cc +++ b/test/cpp/naming/resolver_component_tests_runner_invoker.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include #include +#include + #ifndef GPR_WINDOWS #include #endif // GPR_WINDOWS diff --git a/test/cpp/server/load_reporter/get_cpu_stats_test.cc b/test/cpp/server/load_reporter/get_cpu_stats_test.cc index 95ef6352f60..245b48ce0b3 100644 --- a/test/cpp/server/load_reporter/get_cpu_stats_test.cc +++ b/test/cpp/server/load_reporter/get_cpu_stats_test.cc @@ -16,13 +16,12 @@ // // -#include - #include "src/cpp/server/load_reporter/get_cpu_stats.h" #include #include +#include #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/server/load_reporter/load_data_store_test.cc b/test/cpp/server/load_reporter/load_data_store_test.cc index e5f9cf0a57b..ff8617ca6f7 100644 --- a/test/cpp/server/load_reporter/load_data_store_test.cc +++ b/test/cpp/server/load_reporter/load_data_store_test.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/server/load_reporter/load_data_store.h" #include @@ -26,6 +24,7 @@ #include #include +#include #include "src/cpp/server/load_reporter/constants.h" #include "test/core/util/port.h" diff --git a/test/cpp/server/load_reporter/load_reporter_test.cc b/test/cpp/server/load_reporter/load_reporter_test.cc index a5acdda391c..b88ebb5ef2a 100644 --- a/test/cpp/server/load_reporter/load_reporter_test.cc +++ b/test/cpp/server/load_reporter/load_reporter_test.cc @@ -16,8 +16,6 @@ // // -#include - #include "src/cpp/server/load_reporter/load_reporter.h" #include @@ -30,6 +28,7 @@ #include "opencensus/stats/testing/test_utils.h" #include +#include #include "src/core/ext/filters/load_reporting/registered_opencensus_objects.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 1b72d7b0558..393f4a3082f 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -16,8 +16,6 @@ // is % allowed in string // -#include - #include "src/cpp/thread_manager/thread_manager.h" #include @@ -29,6 +27,7 @@ #include #include +#include #include #include "src/core/lib/gprpp/crash.h" diff --git a/test/cpp/util/channel_trace_proto_helper.cc b/test/cpp/util/channel_trace_proto_helper.cc index a4c22182476..9667b1c09b0 100644 --- a/test/cpp/util/channel_trace_proto_helper.cc +++ b/test/cpp/util/channel_trace_proto_helper.cc @@ -16,14 +16,13 @@ // // -#include - #include "test/cpp/util/channel_trace_proto_helper.h" #include #include #include +#include #include #include diff --git a/test/cpp/util/channelz_sampler.cc b/test/cpp/util/channelz_sampler.cc index db9c600c516..4515aa60e21 100644 --- a/test/cpp/util/channelz_sampler.cc +++ b/test/cpp/util/channelz_sampler.cc @@ -15,8 +15,6 @@ // limitations under the License. // // -#include - #include #include @@ -34,6 +32,7 @@ #include "google/protobuf/text_format.h" #include +#include #include #include #include diff --git a/test/cpp/util/channelz_sampler_test.cc b/test/cpp/util/channelz_sampler_test.cc index 209721f1544..3b5520a76e4 100644 --- a/test/cpp/util/channelz_sampler_test.cc +++ b/test/cpp/util/channelz_sampler_test.cc @@ -15,8 +15,6 @@ // limitations under the License. // // -#include - #include #include @@ -31,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc index 90da1b6113f..c1ebecd333b 100644 --- a/test/cpp/util/grpc_tool.cc +++ b/test/cpp/util/grpc_tool.cc @@ -16,8 +16,6 @@ // // -#include - #include "test/cpp/util/grpc_tool.h" #include @@ -32,6 +30,7 @@ #include "absl/memory/memory.h" #include +#include #include #include #include diff --git a/test/cpp/util/windows/manifest_file.cc b/test/cpp/util/windows/manifest_file.cc index 1008e9d09b4..455095dcc1e 100644 --- a/test/cpp/util/windows/manifest_file.cc +++ b/test/cpp/util/windows/manifest_file.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include - #include "test/cpp/util/windows/manifest_file.h" +#include + #ifdef GPR_WINDOWS #include From 83a17ff4684dc1fb3493a151ac0b655b1c55e766 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:42:03 -0700 Subject: [PATCH 10/18] [clang-format] Remove requirement that port_platform.h is at the top (#36275) Closes #36275 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36275 from ctiller:port_platform-include-grpcpp-impl-clang-format 89c43491d0ff4385c24c235854ab220d923307b1 PiperOrigin-RevId: 623178498 --- include/grpcpp/impl/.clang-format | 3 --- include/grpcpp/impl/status.h | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/grpcpp/impl/.clang-format b/include/grpcpp/impl/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/include/grpcpp/impl/.clang-format +++ b/include/grpcpp/impl/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 diff --git a/include/grpcpp/impl/status.h b/include/grpcpp/impl/status.h index a068f9b0af2..94c0e80a9b6 100644 --- a/include/grpcpp/impl/status.h +++ b/include/grpcpp/impl/status.h @@ -21,9 +21,8 @@ // IWYU pragma: private, include -#include - #include +#include #include #include From 3383b8182fb8397ed56787cf2bd43e79199f962d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 08:57:27 -0700 Subject: [PATCH 11/18] [clang-format] Remove requirement that port_platform.h is at the top (#36274) Closes #36274 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36274 from ctiller:port_platform-include-grpc-clang-format e368acfad9ba00b401ed3483ccee7fe29f50c351 PiperOrigin-RevId: 623182400 --- include/grpc/.clang-format | 3 --- include/grpc/byte_buffer.h | 3 +-- include/grpc/census.h | 3 +-- include/grpc/compression.h | 3 +-- include/grpc/event_engine/endpoint_config.h | 4 ++-- include/grpc/event_engine/event_engine.h | 3 +-- include/grpc/event_engine/extensible.h | 4 ++-- include/grpc/event_engine/internal/memory_allocator_impl.h | 3 +-- include/grpc/event_engine/memory_allocator.h | 3 +-- include/grpc/event_engine/memory_request.h | 4 ++-- include/grpc/event_engine/slice.h | 3 +-- include/grpc/event_engine/slice_buffer.h | 3 +-- include/grpc/grpc.h | 3 +-- include/grpc/grpc_audit_logging.h | 3 +-- include/grpc/grpc_crl_provider.h | 3 +-- include/grpc/grpc_cronet.h | 3 +-- include/grpc/grpc_posix.h | 3 +-- include/grpc/grpc_security.h | 3 +-- include/grpc/impl/call.h | 3 +-- include/grpc/impl/grpc_types.h | 3 +-- include/grpc/impl/slice_type.h | 4 ++-- include/grpc/slice.h | 3 +-- include/grpc/slice_buffer.h | 3 +-- include/grpc/support/alloc.h | 4 ++-- include/grpc/support/json.h | 4 ++-- include/grpc/support/log.h | 4 ++-- include/grpc/support/metrics.h | 4 ++-- include/grpc/support/string_util.h | 1 - include/grpc/support/sync.h | 1 - include/grpc/support/sync_abseil.h | 1 - include/grpc/support/sync_custom.h | 1 - include/grpc/support/sync_generic.h | 3 +-- include/grpc/support/sync_posix.h | 3 +-- include/grpc/support/time.h | 4 ++-- 34 files changed, 38 insertions(+), 65 deletions(-) diff --git a/include/grpc/.clang-format b/include/grpc/.clang-format index 64387e9e515..5f150ef6edb 100644 --- a/include/grpc/.clang-format +++ b/include/grpc/.clang-format @@ -5,9 +5,6 @@ DerivePointerAlignment: false PointerAlignment: Left IncludeBlocks: Regroup IncludeCategories: - # port_platform.h is before almost everything - - Regex: '^' - Priority: -100 # ruby.h is even more first if it's included - Regex: '^' Priority: -200 diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 65b526496d5..dc8fc5739ef 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -19,10 +19,9 @@ #ifndef GRPC_BYTE_BUFFER_H #define GRPC_BYTE_BUFFER_H -#include - #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/census.h b/include/grpc/census.h index 4894f1c0965..64db78b0d07 100644 --- a/include/grpc/census.h +++ b/include/grpc/census.h @@ -19,9 +19,8 @@ #ifndef GRPC_CENSUS_H #define GRPC_CENSUS_H -#include - #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/compression.h b/include/grpc/compression.h index ce8ec4ef038..0f07a514b2b 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -19,12 +19,11 @@ #ifndef GRPC_COMPRESSION_H #define GRPC_COMPRESSION_H -#include - #include #include // IWYU pragma: export #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/event_engine/endpoint_config.h b/include/grpc/event_engine/endpoint_config.h index 68dae44caee..ea1699afc52 100644 --- a/include/grpc/event_engine/endpoint_config.h +++ b/include/grpc/event_engine/endpoint_config.h @@ -14,13 +14,13 @@ #ifndef GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H #define GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H -#include - #include #include "absl/strings/string_view.h" #include "absl/types/optional.h" +#include + namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/event_engine.h b/include/grpc/event_engine/event_engine.h index 93c94664bc5..7e2cd0346aa 100644 --- a/include/grpc/event_engine/event_engine.h +++ b/include/grpc/event_engine/event_engine.h @@ -14,8 +14,6 @@ #ifndef GRPC_EVENT_ENGINE_EVENT_ENGINE_H #define GRPC_EVENT_ENGINE_EVENT_ENGINE_H -#include - #include #include "absl/functional/any_invocable.h" @@ -27,6 +25,7 @@ #include #include #include +#include // TODO(vigneshbabu): Define the Endpoint::Write metrics collection system namespace grpc_event_engine { diff --git a/include/grpc/event_engine/extensible.h b/include/grpc/event_engine/extensible.h index 77483c82ab1..51812f935c6 100644 --- a/include/grpc/event_engine/extensible.h +++ b/include/grpc/event_engine/extensible.h @@ -15,10 +15,10 @@ #ifndef GRPC_EVENT_ENGINE_EXTENSIBLE_H #define GRPC_EVENT_ENGINE_EXTENSIBLE_H -#include - #include "absl/strings/string_view.h" +#include + namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/internal/memory_allocator_impl.h b/include/grpc/event_engine/internal/memory_allocator_impl.h index e34ffc7f9c2..91cba5a9491 100644 --- a/include/grpc/event_engine/internal/memory_allocator_impl.h +++ b/include/grpc/event_engine/internal/memory_allocator_impl.h @@ -14,8 +14,6 @@ #ifndef GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H #define GRPC_EVENT_ENGINE_INTERNAL_MEMORY_ALLOCATOR_IMPL_H -#include - #include #include #include @@ -23,6 +21,7 @@ #include #include +#include namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/memory_allocator.h b/include/grpc/event_engine/memory_allocator.h index cd14e3a9337..3a347c3b5cf 100644 --- a/include/grpc/event_engine/memory_allocator.h +++ b/include/grpc/event_engine/memory_allocator.h @@ -14,8 +14,6 @@ #ifndef GRPC_EVENT_ENGINE_MEMORY_ALLOCATOR_H #define GRPC_EVENT_ENGINE_MEMORY_ALLOCATOR_H -#include - #include // for abort() #include @@ -25,6 +23,7 @@ #include #include +#include namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/memory_request.h b/include/grpc/event_engine/memory_request.h index fa15e26cbf6..2018b3d476a 100644 --- a/include/grpc/event_engine/memory_request.h +++ b/include/grpc/event_engine/memory_request.h @@ -14,12 +14,12 @@ #ifndef GRPC_EVENT_ENGINE_MEMORY_REQUEST_H #define GRPC_EVENT_ENGINE_MEMORY_REQUEST_H -#include - #include #include "absl/strings/string_view.h" +#include + namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/event_engine/slice.h b/include/grpc/event_engine/slice.h index ce7693f6489..8153f983a40 100644 --- a/include/grpc/event_engine/slice.h +++ b/include/grpc/event_engine/slice.h @@ -15,8 +15,6 @@ #ifndef GRPC_EVENT_ENGINE_SLICE_H #define GRPC_EVENT_ENGINE_SLICE_H -#include - #include #include @@ -28,6 +26,7 @@ #include #include #include +#include // This public slice definition largely based of the internal grpc_core::Slice // implementation. Changes to this implementation might warrant changes to the diff --git a/include/grpc/event_engine/slice_buffer.h b/include/grpc/event_engine/slice_buffer.h index 0e94db056f4..0009089a6bc 100644 --- a/include/grpc/event_engine/slice_buffer.h +++ b/include/grpc/event_engine/slice_buffer.h @@ -15,8 +15,6 @@ #ifndef GRPC_EVENT_ENGINE_SLICE_BUFFER_H #define GRPC_EVENT_ENGINE_SLICE_BUFFER_H -#include - #include #include @@ -31,6 +29,7 @@ #include #include #include +#include namespace grpc_event_engine { namespace experimental { diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index ad475897b17..20527730358 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -19,8 +19,6 @@ #ifndef GRPC_GRPC_H #define GRPC_GRPC_H -#include - #include #include @@ -29,6 +27,7 @@ #include #include #include +#include #include #ifdef __cplusplus diff --git a/include/grpc/grpc_audit_logging.h b/include/grpc/grpc_audit_logging.h index 0fda1043952..4c30593f2fd 100644 --- a/include/grpc/grpc_audit_logging.h +++ b/include/grpc/grpc_audit_logging.h @@ -19,8 +19,6 @@ #ifndef GRPC_GRPC_AUDIT_LOGGING_H #define GRPC_GRPC_AUDIT_LOGGING_H -#include - #include #include @@ -28,6 +26,7 @@ #include "absl/strings/string_view.h" #include +#include namespace grpc_core { namespace experimental { diff --git a/include/grpc/grpc_crl_provider.h b/include/grpc/grpc_crl_provider.h index 5baea14e2ad..04e8ffa0901 100644 --- a/include/grpc/grpc_crl_provider.h +++ b/include/grpc/grpc_crl_provider.h @@ -19,8 +19,6 @@ #ifndef GRPC_GRPC_CRL_PROVIDER_H #define GRPC_GRPC_CRL_PROVIDER_H -#include - #include #include @@ -28,6 +26,7 @@ #include "absl/strings/string_view.h" #include +#include namespace grpc_core { namespace experimental { diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h index 289cfcda675..b8ce11da6e2 100644 --- a/include/grpc/grpc_cronet.h +++ b/include/grpc/grpc_cronet.h @@ -19,9 +19,8 @@ #ifndef GRPC_GRPC_CRONET_H #define GRPC_GRPC_CRONET_H -#include - #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index a237cb36c7e..3f59a4423d3 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -19,12 +19,11 @@ #ifndef GRPC_GRPC_POSIX_H #define GRPC_GRPC_POSIX_H -#include - #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index c81b81a207b..5524170a2ac 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -19,13 +19,12 @@ #ifndef GRPC_GRPC_SECURITY_H #define GRPC_GRPC_SECURITY_H -#include - #include #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/impl/call.h b/include/grpc/impl/call.h index d1f7c2642b0..ea298f2ef5c 100644 --- a/include/grpc/impl/call.h +++ b/include/grpc/impl/call.h @@ -15,11 +15,10 @@ #ifndef GRPC_IMPL_CALL_H #define GRPC_IMPL_CALL_H -#include - #include "absl/functional/any_invocable.h" #include +#include // Run a callback in the call's EventEngine. // Internal-only diff --git a/include/grpc/impl/grpc_types.h b/include/grpc/impl/grpc_types.h index 9250ce8f6b6..b1305114eb1 100644 --- a/include/grpc/impl/grpc_types.h +++ b/include/grpc/impl/grpc_types.h @@ -21,14 +21,13 @@ // IWYU pragma: private, include -#include - #include #include #include #include #include +#include #include #ifdef __cplusplus diff --git a/include/grpc/impl/slice_type.h b/include/grpc/impl/slice_type.h index 4776f4b6c4d..5e35446ef93 100644 --- a/include/grpc/impl/slice_type.h +++ b/include/grpc/impl/slice_type.h @@ -21,10 +21,10 @@ // IWYU pragma: private, include -#include - #include +#include + typedef struct grpc_slice grpc_slice; /** Slice API diff --git a/include/grpc/slice.h b/include/grpc/slice.h index 7318a0e7157..8b50cf28bd7 100644 --- a/include/grpc/slice.h +++ b/include/grpc/slice.h @@ -19,9 +19,8 @@ #ifndef GRPC_SLICE_H #define GRPC_SLICE_H -#include - #include // IWYU pragma: export +#include #include #ifdef __cplusplus diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index d8c6b918186..ea0afa5469e 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -19,9 +19,8 @@ #ifndef GRPC_SLICE_BUFFER_H #define GRPC_SLICE_BUFFER_H -#include - #include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/support/alloc.h b/include/grpc/support/alloc.h index d440e4be8c2..fdfa63c8e88 100644 --- a/include/grpc/support/alloc.h +++ b/include/grpc/support/alloc.h @@ -19,10 +19,10 @@ #ifndef GRPC_SUPPORT_ALLOC_H #define GRPC_SUPPORT_ALLOC_H -#include - #include +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/grpc/support/json.h b/include/grpc/support/json.h index bae9268271f..7b850e1cc28 100644 --- a/include/grpc/support/json.h +++ b/include/grpc/support/json.h @@ -17,8 +17,6 @@ #ifndef GRPC_SUPPORT_JSON_H #define GRPC_SUPPORT_JSON_H -#include - #include #include @@ -29,6 +27,8 @@ #include "absl/strings/str_cat.h" #include "absl/types/variant.h" +#include + namespace grpc_core { namespace experimental { diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 1f987fd35d5..a118561904d 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -19,11 +19,11 @@ #ifndef GRPC_SUPPORT_LOG_H #define GRPC_SUPPORT_LOG_H -#include - #include #include /* for abort() */ +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/grpc/support/metrics.h b/include/grpc/support/metrics.h index bf80f91c387..7462e6aba65 100644 --- a/include/grpc/support/metrics.h +++ b/include/grpc/support/metrics.h @@ -15,10 +15,10 @@ #ifndef GRPC_SUPPORT_METRICS_H #define GRPC_SUPPORT_METRICS_H -#include - #include "absl/strings/string_view.h" +#include + namespace grpc_core { namespace experimental { diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index d047369eab1..07f296ed7c6 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -20,7 +20,6 @@ #define GRPC_SUPPORT_STRING_UTIL_H #include - #include #ifdef __cplusplus diff --git a/include/grpc/support/sync.h b/include/grpc/support/sync.h index 2ed89ca086e..76d2a10c478 100644 --- a/include/grpc/support/sync.h +++ b/include/grpc/support/sync.h @@ -21,7 +21,6 @@ /* Platform-specific type declarations of gpr_mu and gpr_cv. */ #include - #include /* for gpr_timespec */ #ifdef __cplusplus diff --git a/include/grpc/support/sync_abseil.h b/include/grpc/support/sync_abseil.h index 85153191999..f10283c5d70 100644 --- a/include/grpc/support/sync_abseil.h +++ b/include/grpc/support/sync_abseil.h @@ -20,7 +20,6 @@ #define GRPC_SUPPORT_SYNC_ABSEIL_H #include - #include #ifdef GPR_ABSEIL_SYNC diff --git a/include/grpc/support/sync_custom.h b/include/grpc/support/sync_custom.h index c0e6975f07f..f80db780271 100644 --- a/include/grpc/support/sync_custom.h +++ b/include/grpc/support/sync_custom.h @@ -20,7 +20,6 @@ #define GRPC_SUPPORT_SYNC_CUSTOM_H #include - #include /* Users defining GPR_CUSTOM_SYNC need to define the following macros. */ diff --git a/include/grpc/support/sync_generic.h b/include/grpc/support/sync_generic.h index 9e92eb2fec7..b3e638ce549 100644 --- a/include/grpc/support/sync_generic.h +++ b/include/grpc/support/sync_generic.h @@ -21,9 +21,8 @@ /* Generic type definitions for gpr_sync. */ -#include - #include +#include /* gpr_event */ typedef struct { diff --git a/include/grpc/support/sync_posix.h b/include/grpc/support/sync_posix.h index b7aba572443..5348bac951f 100644 --- a/include/grpc/support/sync_posix.h +++ b/include/grpc/support/sync_posix.h @@ -19,10 +19,9 @@ #ifndef GRPC_SUPPORT_SYNC_POSIX_H #define GRPC_SUPPORT_SYNC_POSIX_H -#include - #include +#include #include #ifdef GRPC_ASAN_ENABLED diff --git a/include/grpc/support/time.h b/include/grpc/support/time.h index 6f0ae9f7873..7adbfcedd1f 100644 --- a/include/grpc/support/time.h +++ b/include/grpc/support/time.h @@ -19,11 +19,11 @@ #ifndef GRPC_SUPPORT_TIME_H #define GRPC_SUPPORT_TIME_H -#include - #include #include +#include + #ifdef __cplusplus extern "C" { #endif From a2ec6005586e768534f395840d8ff64236a38441 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Apr 2024 09:38:31 -0700 Subject: [PATCH 12/18] [call-v3] Updates to CallFilter (#36240) Updates to `CallFilter` to get it ready for integration to `CallSpine`. This is a bundle commit grabbed from my working branch so there's a few things rolled in here: * PipeState picks up methods to close it cleanly and in error, and expands its Pull API to signify that error * Add a `NextMessage` type that encapsulates one message pulled from a pipe (much like `Pipe::NextResult` - except that we know this is a message, and it's built on the `CallFilters` types) * Add debug stringifiers to many CallFilters types, and better tracing * Eliminate unused `CallFilters::PipePromise::Pull` type -- other variants are better for all cases * Add support for filters having the signature `(Handle, Filter*) -> promise returning StatusOr` - will support `ClientAuthFilter` in a future commit asynchronously mutating client initial metadata Closes #36240 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36240 from ctiller:cally-1 aa5fe997bf7b037925d2f8a0099ec9e2c1e0471b PiperOrigin-RevId: 623194327 --- build_autogenerated.yaml | 1 + src/core/BUILD | 2 + src/core/lib/promise/status_flag.h | 8 + src/core/lib/transport/call_filters.cc | 118 ++++++++- src/core/lib/transport/call_filters.h | 299 +++++++++++++++++++++-- test/core/transport/call_filters_test.cc | 16 +- 6 files changed, 408 insertions(+), 36 deletions(-) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 8fd93c9dd0a..1332875ffe9 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -6411,6 +6411,7 @@ targets: - src/core/lib/promise/detail/seq_state.h - src/core/lib/promise/detail/status.h - src/core/lib/promise/exec_ctx_wakeup_scheduler.h + - src/core/lib/promise/latch.h - src/core/lib/promise/loop.h - src/core/lib/promise/map.h - src/core/lib/promise/poll.h diff --git a/src/core/BUILD b/src/core/BUILD index e98a754d9c6..9e247f4fb70 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -7252,6 +7252,8 @@ grpc_cc_library( ], deps = [ "call_final_info", + "latch", + "map", "message", "metadata", "ref_counted", diff --git a/src/core/lib/promise/status_flag.h b/src/core/lib/promise/status_flag.h index 700ad9c856b..1790a83ce52 100644 --- a/src/core/lib/promise/status_flag.h +++ b/src/core/lib/promise/status_flag.h @@ -176,6 +176,14 @@ class ValueOrFailure { return value_ == other.value_; } + bool operator!=(const ValueOrFailure& other) const { + return value_ != other.value_; + } + + bool operator==(const T& other) const { return value_ == other; } + + bool operator!=(const T& other) const { return value_ != other; } + private: absl::optional value_; }; diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index db849b2798b..59a1ed07429 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -202,15 +202,53 @@ void CallFilters::Finalize(const grpc_call_final_info* final_info) { } } -void CallFilters::CancelDueToFailedPipeOperation() { +void CallFilters::CancelDueToFailedPipeOperation(SourceLocation but_where) { // We expect something cancelled before now if (server_trailing_metadata_ == nullptr) return; - gpr_log(GPR_DEBUG, "Cancelling due to failed pipe operation"); + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + gpr_log(but_where.file(), but_where.line(), GPR_LOG_SEVERITY_DEBUG, + "Cancelling due to failed pipe operation: %s", + DebugString().c_str()); + } server_trailing_metadata_ = ServerMetadataFromStatus(absl::CancelledError("Failed pipe operation")); server_trailing_metadata_waiter_.Wake(); } +void CallFilters::PushServerTrailingMetadata(ServerMetadataHandle md) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + gpr_log(GPR_DEBUG, "%s Push server trailing metadata: %s into %s", + GetContext()->DebugTag().c_str(), + md->DebugString().c_str(), DebugString().c_str()); + } + GPR_ASSERT(md != nullptr); + if (server_trailing_metadata_ != nullptr) return; + server_trailing_metadata_ = std::move(md); + client_initial_metadata_state_.CloseWithError(); + server_initial_metadata_state_.CloseSending(); + client_to_server_message_state_.CloseWithError(); + server_to_client_message_state_.CloseWithError(); + server_trailing_metadata_waiter_.Wake(); +} + +std::string CallFilters::DebugString() const { + std::vector components = { + absl::StrFormat("this:%p", this), + absl::StrCat("client_initial_metadata:", + client_initial_metadata_state_.DebugString()), + ServerInitialMetadataPromises::DebugString("server_initial_metadata", + this), + ClientToServerMessagePromises::DebugString("client_to_server_message", + this), + ServerToClientMessagePromises::DebugString("server_to_client_message", + this), + absl::StrCat("server_trailing_metadata:", + server_trailing_metadata_ == nullptr + ? "not-set" + : server_trailing_metadata_->DebugString())}; + return absl::StrCat("CallFilters{", absl::StrJoin(components, ", "), "}"); +}; + /////////////////////////////////////////////////////////////////////////////// // CallFilters::Stack @@ -251,6 +289,49 @@ void filters_detail::PipeState::Start() { wait_recv_.Wake(); } +void filters_detail::PipeState::CloseWithError() { + if (state_ == ValueState::kClosed) return; + state_ = ValueState::kError; + wait_recv_.Wake(); + wait_send_.Wake(); +} + +Poll filters_detail::PipeState::PollClosed() { + switch (state_) { + case ValueState::kIdle: + case ValueState::kWaiting: + case ValueState::kQueued: + case ValueState::kReady: + case ValueState::kProcessing: + return wait_recv_.pending(); + case ValueState::kClosed: + return false; + case ValueState::kError: + return true; + } + GPR_UNREACHABLE_CODE(return Pending{}); +} + +void filters_detail::PipeState::CloseSending() { + switch (state_) { + case ValueState::kIdle: + state_ = ValueState::kClosed; + break; + case ValueState::kWaiting: + state_ = ValueState::kClosed; + wait_recv_.Wake(); + break; + case ValueState::kClosed: + case ValueState::kError: + break; + case ValueState::kQueued: + case ValueState::kReady: + case ValueState::kProcessing: + Crash("Only one push allowed to be outstanding"); + break; + } +} + void filters_detail::PipeState::BeginPush() { switch (state_) { case ValueState::kIdle: @@ -320,7 +401,7 @@ Poll filters_detail::PipeState::PollPush() { GPR_UNREACHABLE_CODE(return Pending{}); } -Poll filters_detail::PipeState::PollPull() { +Poll> filters_detail::PipeState::PollPull() { switch (state_) { case ValueState::kWaiting: return wait_recv_.pending(); @@ -331,10 +412,11 @@ Poll filters_detail::PipeState::PollPull() { case ValueState::kQueued: if (!started_) return wait_recv_.pending(); state_ = ValueState::kProcessing; - return Success{}; + return true; case ValueState::kProcessing: Crash("Only one pull allowed to be outstanding"); case ValueState::kClosed: + return false; case ValueState::kError: return Failure{}; } @@ -358,4 +440,32 @@ void filters_detail::PipeState::AckPull() { } } +std::string filters_detail::PipeState::DebugString() const { + const char* state_str = "<>"; + switch (state_) { + case ValueState::kIdle: + state_str = "Idle"; + break; + case ValueState::kWaiting: + state_str = "Waiting"; + break; + case ValueState::kQueued: + state_str = "Queued"; + break; + case ValueState::kReady: + state_str = "Ready"; + break; + case ValueState::kProcessing: + state_str = "Processing"; + break; + case ValueState::kClosed: + state_str = "Closed"; + break; + case ValueState::kError: + state_str = "Error"; + break; + } + return absl::StrCat(state_str, started_ ? "" : " (not started)"); +} + } // namespace grpc_core diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index 013db5e0b3b..802e784d728 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -23,6 +23,8 @@ #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/promise/latch.h" +#include "src/core/lib/promise/map.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/promise/status_flag.h" #include "src/core/lib/transport/call_final_info.h" @@ -771,6 +773,55 @@ struct AddOpImpl< } }; +// PROMISE_RETURNING(absl::StatusOr<$VALUE_HANDLE>) +// $INTERCEPTOR_NAME($VALUE_HANDLE, FilterType*) +template +struct AddOpImpl, + PromiseResult>::value>> { + static void Add(FilterType* channel_data, size_t call_offset, + Layout>& to) { + class Promise { + public: + Promise(T value, typename FilterType::Call* call_data, + FilterType* channel_data) + : impl_((call_data->*impl)(std::move(value), channel_data)) {} + + Poll> PollOnce() { + auto p = impl_(); + auto* r = p.value_if_ready(); + if (r == nullptr) return Pending{}; + this->~Promise(); + if (r->ok()) return ResultOr{std::move(**r), nullptr}; + return ResultOr{nullptr, ServerMetadataFromStatus(r->status())}; + } + + private: + GPR_NO_UNIQUE_ADDRESS R impl_; + }; + to.Add(sizeof(Promise), alignof(Promise), + FallibleOperator{ + channel_data, + call_offset, + [](void* promise_data, void* call_data, void* channel_data, + T value) -> Poll> { + auto* promise = new (promise_data) + Promise(std::move(value), + static_cast(call_data), + static_cast(channel_data)); + return promise->PollOnce(); + }, + [](void* promise_data) { + return static_cast(promise_data)->PollOnce(); + }, + [](void* promise_data) { + static_cast(promise_data)->~Promise(); + }, + }); + } +}; + struct ChannelDataDestructor { void (*destroy)(void* channel_data); void* channel_data; @@ -783,7 +834,7 @@ struct ChannelDataDestructor { // in-flight calls. struct StackData { // Overall size and alignment of the call data for this stack. - size_t call_data_alignment = 0; + size_t call_data_alignment = 1; size_t call_data_size = 0; // A complete list of filters for this call, so that we can construct the // call data for each filter. @@ -1104,14 +1155,25 @@ class PipeState { void DropPush(); // Poll for push completion: occurs after the corresponding Pull() Poll PollPush(); - Poll PollPull(); + // Poll for pull completion; returns Failure{} if closed with error, + // true if a value is available, or false if the pipe was closed without + // error. + Poll> PollPull(); // A pulled value has been consumed: we can unblock the push void AckPull(); // A previously started pull operation has completed void DropPull(); + // Close sending + void CloseSending(); + // Close sending with error + void CloseWithError(); + // Poll for closedness - if true, closed with error + Poll PollClosed(); bool holds_error() const { return state_ == ValueState::kError; } + std::string DebugString() const; + private: enum class ValueState : uint8_t { // Nothing sending nor receiving @@ -1248,6 +1310,44 @@ class CallFilters { filters_detail::StackData data_; }; + class NextMessage { + public: + NextMessage() : has_value_(false), cancelled_(false) {} + explicit NextMessage(MessageHandle value) + : has_value_(true), value_(std::move(value)) {} + explicit NextMessage(bool cancelled) + : has_value_(false), cancelled_(cancelled) {} + NextMessage(const NextMessage&) = delete; + NextMessage& operator=(const NextMessage&) = delete; + NextMessage(NextMessage&& other) noexcept = default; + NextMessage& operator=(NextMessage&& other) = default; + + using value_type = MessageHandle; + + void reset() { + has_value_ = false; + cancelled_ = false; + value_.reset(); + } + bool has_value() const { return has_value_; } + const MessageHandle& value() const { + GPR_DEBUG_ASSERT(has_value_); + return value_; + } + MessageHandle& value() { + GPR_DEBUG_ASSERT(has_value_); + return value_; + } + const MessageHandle& operator*() const { return value(); } + MessageHandle& operator*() { return value(); } + bool cancelled() const { return !has_value_ && cancelled_; } + + private: + bool has_value_; + bool cancelled_; + MessageHandle value_; + }; + explicit CallFilters(ClientMetadataHandle client_initial_metadata); ~CallFilters(); @@ -1258,25 +1358,59 @@ class CallFilters { void SetStack(RefCountedPtr stack); + // Access client initial metadata before it's processed ClientMetadata* unprocessed_client_initial_metadata() { return client_initial_metadata_.get(); } + + // Client: Fetch client initial metadata + // Returns a promise that resolves to ValueOrFailure GRPC_MUST_USE_RESULT auto PullClientInitialMetadata(); + // Server: Indicate that no server initial metadata will be sent + void NoServerInitialMetadata() { + server_initial_metadata_state_.CloseSending(); + } + // Server: Push server initial metadata + // Returns a promise that resolves to a StatusFlag indicating success GRPC_MUST_USE_RESULT auto PushServerInitialMetadata(ServerMetadataHandle md); + // Client: Fetch server initial metadata + // Returns a promise that resolves to ValueOrFailure GRPC_MUST_USE_RESULT auto PullServerInitialMetadata(); + // Client: Push client to server message + // Returns a promise that resolves to a StatusFlag indicating success GRPC_MUST_USE_RESULT auto PushClientToServerMessage(MessageHandle message); + // Client: Indicate that no more messages will be sent + void FinishClientToServerSends() { + client_to_server_message_state_.CloseSending(); + } + // Server: Fetch client to server message + // Returns a promise that resolves to ValueOrFailure GRPC_MUST_USE_RESULT auto PullClientToServerMessage(); + // Server: Push server to client message + // Returns a promise that resolves to a StatusFlag indicating success GRPC_MUST_USE_RESULT auto PushServerToClientMessage(MessageHandle message); + // Server: Fetch server to client message + // Returns a promise that resolves to ValueOrFailure GRPC_MUST_USE_RESULT auto PullServerToClientMessage(); - void PushServerTrailingMetadata(ServerMetadataHandle md) { - GPR_ASSERT(md != nullptr); - if (server_trailing_metadata_ != nullptr) return; - server_trailing_metadata_ = std::move(md); - server_trailing_metadata_waiter_.Wake(); - } + // Server: Indicate end of response + // Closes the request entirely - no messages can be sent/received + // If no server initial metadata has been sent, implies + // NoServerInitialMetadata() called. + void PushServerTrailingMetadata(ServerMetadataHandle md); + // Client: Fetch server trailing metadata + // Returns a promise that resolves to ServerMetadataHandle GRPC_MUST_USE_RESULT auto PullServerTrailingMetadata(); + // Server: Wait for server trailing metadata to have been sent + // Returns a promise that resolves to a StatusFlag indicating whether the + // request was cancelled or not -- failure to send trailing metadata is + // considered a cancellation, as is actual cancellation -- but not application + // errors. + GRPC_MUST_USE_RESULT auto WasCancelled(); + // Client & server: fill in final_info with the final status of the call. void Finalize(const grpc_call_final_info* final_info); + std::string DebugString() const; + private: template *state_ptr; } void*& push_slot() { return filters_->*push_ptr; } @@ -1323,24 +1461,36 @@ class CallFilters { T value_; }; - class Pull { + static std::string DebugString(absl::string_view name, + const CallFilters* filters) { + auto* push = static_cast(filters->*push_ptr); + return absl::StrCat(name, ":", (filters->*state_ptr).DebugString(), + push == nullptr ? "" : push->DebugString()); + } + + class PullMaybe { public: - explicit Pull(CallFilters* filters) : filters_(filters) {} - ~Pull() { + explicit PullMaybe(CallFilters* filters) : filters_(filters) {} + ~PullMaybe() { if (filters_ != nullptr) { state().DropPull(); } } - Pull(const Pull&) = delete; - Pull& operator=(const Pull&) = delete; - Pull(Pull&& other) noexcept + PullMaybe(const PullMaybe&) = delete; + PullMaybe& operator=(const PullMaybe&) = delete; + PullMaybe(PullMaybe&& other) noexcept : filters_(std::exchange(other.filters_, nullptr)), executor_(std::move(other.executor_)) {} - Pull& operator=(Pull&&) = delete; + PullMaybe& operator=(PullMaybe&&) = delete; - Poll> operator()() { + Poll>> operator()() { if (executor_.IsRunning()) { + auto c = state().PollClosed(); + if (c.ready() && c.value()) { + filters_->CancelDueToFailedPipeOperation(); + return Failure{}; + } return FinishOperationExecutor(executor_.Step(filters_->call_data_)); } auto p = state().PollPull(); @@ -1350,6 +1500,7 @@ class CallFilters { filters_->CancelDueToFailedPipeOperation(); return Failure{}; } + if (!**r) return absl::nullopt; return FinishOperationExecutor(executor_.Start( layout(), push()->TakeValue(), filters_->call_data_)); } @@ -1362,7 +1513,7 @@ class CallFilters { return &(filters_->stack_->data_.*layout_ptr); } - Poll> FinishOperationExecutor( + Poll>> FinishOperationExecutor( Poll> p) { auto* r = p.value_if_ready(); if (r == nullptr) return Pending{}; @@ -1376,6 +1527,66 @@ class CallFilters { CallFilters* filters_; filters_detail::OperationExecutor executor_; }; + + class PullMessage { + public: + explicit PullMessage(CallFilters* filters) : filters_(filters) {} + ~PullMessage() { + if (filters_ != nullptr) { + state().DropPull(); + } + } + + PullMessage(const PullMessage&) = delete; + PullMessage& operator=(const PullMessage&) = delete; + PullMessage(PullMessage&& other) noexcept + : filters_(std::exchange(other.filters_, nullptr)), + executor_(std::move(other.executor_)) {} + PullMessage& operator=(PullMessage&&) = delete; + + Poll operator()() { + if (executor_.IsRunning()) { + auto c = state().PollClosed(); + if (c.ready() && c.value()) { + filters_->CancelDueToFailedPipeOperation(); + return NextMessage(true); + } + return FinishOperationExecutor(executor_.Step(filters_->call_data_)); + } + auto p = state().PollPull(); + auto* r = p.value_if_ready(); + if (r == nullptr) return Pending{}; + if (!r->ok()) { + filters_->CancelDueToFailedPipeOperation(); + return NextMessage(true); + } + if (!**r) return NextMessage(false); + return FinishOperationExecutor(executor_.Start( + layout(), push()->TakeValue(), filters_->call_data_)); + } + + private: + filters_detail::PipeState& state() { return filters_->*state_ptr; } + Push* push() { return static_cast(filters_->*push_ptr); } + const filters_detail::Layout>* + layout() { + return &(filters_->stack_->data_.*layout_ptr); + } + + Poll FinishOperationExecutor( + Poll> p) { + auto* r = p.value_if_ready(); + if (r == nullptr) return Pending{}; + GPR_DEBUG_ASSERT(!executor_.IsRunning()); + state().AckPull(); + if (r->ok != nullptr) return NextMessage(std::move(r->ok)); + filters_->PushServerTrailingMetadata(std::move(r->error)); + return NextMessage(true); + } + + CallFilters* filters_; + filters_detail::OperationExecutor executor_; + }; }; class PullClientInitialMetadataPromise { @@ -1400,7 +1611,12 @@ class CallFilters { } auto p = state().PollPull(); auto* r = p.value_if_ready(); - gpr_log(GPR_INFO, "%s", r == nullptr ? "PENDING" : r->ToString().c_str()); + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + gpr_log(GPR_INFO, "%s", + r == nullptr + ? "PENDING" + : (r->ok() ? (r->value() ? "TRUE" : "FALSE") : "FAILURE")); + } if (r == nullptr) return Pending{}; if (!r->ok()) { filters_->CancelDueToFailedPipeOperation(); @@ -1450,11 +1666,39 @@ class CallFilters { Poll operator()() { if (executor_.IsRunning()) { - return executor_.Step(filters_->call_data_); + auto r = executor_.Step(filters_->call_data_); + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + if (r.pending()) { + gpr_log(GPR_INFO, + "%s PullServerTrailingMetadata[%p]: Pending(but executing)", + GetContext()->DebugTag().c_str(), filters_); + } else { + gpr_log(GPR_INFO, "%s PullServerTrailingMetadata[%p]: Ready: %s", + GetContext()->DebugTag().c_str(), filters_, + r.value()->DebugString().c_str()); + } + } + return r; } if (filters_->server_trailing_metadata_ == nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + gpr_log(GPR_INFO, + "%s PullServerTrailingMetadata[%p]: Pending(not pushed)", + GetContext()->DebugTag().c_str(), filters_); + } return filters_->server_trailing_metadata_waiter_.pending(); } + // If no stack has been set, we can just return the result of the call + if (filters_->stack_ == nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { + gpr_log(GPR_INFO, + "%s PullServerTrailingMetadata[%p]: Ready(no-stack): %s", + GetContext()->DebugTag().c_str(), filters_, + filters_->server_trailing_metadata_->DebugString().c_str()); + } + return std::move(filters_->server_trailing_metadata_); + } + // Otherwise we need to process it through all the filters. return executor_.Start(&filters_->stack_->data_.server_trailing_metadata, std::move(filters_->server_trailing_metadata_), filters_->call_data_); @@ -1465,7 +1709,7 @@ class CallFilters { filters_detail::InfallibleOperationExecutor executor_; }; - void CancelDueToFailedPipeOperation(); + void CancelDueToFailedPipeOperation(SourceLocation but_where = {}); RefCountedPtr stack_; @@ -1475,6 +1719,7 @@ class CallFilters { filters_detail::PipeState client_to_server_message_state_; filters_detail::PipeState server_to_client_message_state_; IntraActivityWaiter server_trailing_metadata_waiter_; + Latch cancelled_; void* call_data_; ClientMetadataHandle client_initial_metadata_; @@ -1516,7 +1761,7 @@ inline auto CallFilters::PushServerInitialMetadata(ServerMetadataHandle md) { } inline auto CallFilters::PullServerInitialMetadata() { - return ServerInitialMetadataPromises::Pull{this}; + return ServerInitialMetadataPromises::PullMaybe{this}; } inline auto CallFilters::PushClientToServerMessage(MessageHandle message) { @@ -1526,7 +1771,7 @@ inline auto CallFilters::PushClientToServerMessage(MessageHandle message) { } inline auto CallFilters::PullClientToServerMessage() { - return ClientToServerMessagePromises::Pull{this}; + return ClientToServerMessagePromises::PullMessage{this}; } inline auto CallFilters::PushServerToClientMessage(MessageHandle message) { @@ -1536,13 +1781,19 @@ inline auto CallFilters::PushServerToClientMessage(MessageHandle message) { } inline auto CallFilters::PullServerToClientMessage() { - return ServerToClientMessagePromises::Pull{this}; + return ServerToClientMessagePromises::PullMessage{this}; } inline auto CallFilters::PullServerTrailingMetadata() { - return PullServerTrailingMetadataPromise(this); + return Map(PullServerTrailingMetadataPromise(this), + [this](ServerMetadataHandle h) { + cancelled_.Set(h->get(GrpcCallWasCancelled()).value_or(false)); + return h; + }); } +inline auto CallFilters::WasCancelled() { return cancelled_.Wait(); } + } // namespace grpc_core #endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H diff --git a/test/core/transport/call_filters_test.cc b/test/core/transport/call_filters_test.cc index d2a97643f29..a2431a909f8 100644 --- a/test/core/transport/call_filters_test.cc +++ b/test/core/transport/call_filters_test.cc @@ -119,7 +119,7 @@ namespace filters_detail { TEST(StackDataTest, Empty) { StackData d; - EXPECT_EQ(d.call_data_alignment, 0u); + EXPECT_EQ(d.call_data_alignment, 1u); EXPECT_EQ(d.call_data_size, 0u); } @@ -1243,7 +1243,7 @@ TEST(PipeStateTest, OnePull) { ps.BeginPush(); Mock::VerifyAndClearExpectations(&activity); // now we should see a value on the pull poll - EXPECT_THAT(ps.PollPull(), IsReady(Success{})); + EXPECT_THAT(ps.PollPull(), IsReady(true)); // push should be pending though! EXPECT_THAT(ps.PollPush(), IsPending()); // ack the pull, should see a wakeup @@ -1251,7 +1251,7 @@ TEST(PipeStateTest, OnePull) { ps.AckPull(); Mock::VerifyAndClearExpectations(&activity); // now the push is complete - EXPECT_THAT(ps.PollPush(), IsReady(Success{})); + EXPECT_THAT(ps.PollPush(), IsReady(Success())); ps.DropPush(); ps.DropPull(); EXPECT_FALSE(ps.holds_error()); @@ -1270,7 +1270,7 @@ TEST(PipeStateTest, StartThenPull) { ps.BeginPush(); Mock::VerifyAndClearExpectations(&activity); // now we should see a value on the pull poll - EXPECT_THAT(ps.PollPull(), IsReady(Success{})); + EXPECT_THAT(ps.PollPull(), IsReady(true)); // push should be pending though! EXPECT_THAT(ps.PollPush(), IsPending()); // ack the pull, should see a wakeup @@ -1278,7 +1278,7 @@ TEST(PipeStateTest, StartThenPull) { ps.AckPull(); Mock::VerifyAndClearExpectations(&activity); // now the push is complete - EXPECT_THAT(ps.PollPush(), IsReady(Success{})); + EXPECT_THAT(ps.PollPush(), IsReady(Success())); ps.DropPush(); ps.DropPull(); EXPECT_FALSE(ps.holds_error()); @@ -1294,7 +1294,7 @@ TEST(PipeStateTest, PushFirst) { // push should be pending EXPECT_THAT(ps.PollPush(), IsPending()); // pull should immediately see a value - EXPECT_THAT(ps.PollPull(), IsReady(Success{})); + EXPECT_THAT(ps.PollPull(), IsReady(true)); // push should still be pending though! EXPECT_THAT(ps.PollPush(), IsPending()); // ack the pull, should see a wakeup @@ -1302,7 +1302,7 @@ TEST(PipeStateTest, PushFirst) { ps.AckPull(); Mock::VerifyAndClearExpectations(&activity); // now the push is complete - EXPECT_THAT(ps.PollPush(), IsReady(Success{})); + EXPECT_THAT(ps.PollPush(), IsReady(Success())); ps.DropPush(); ps.DropPull(); EXPECT_FALSE(ps.holds_error()); @@ -1339,7 +1339,7 @@ TEST(PipeStateTest, DropProcessing) { activity.Activate(); ps.Start(); ps.BeginPush(); - EXPECT_THAT(ps.PollPull(), IsReady(Success{})); + EXPECT_THAT(ps.PollPull(), IsReady(true)); ps.DropPull(); EXPECT_TRUE(ps.holds_error()); EXPECT_THAT(ps.PollPull(), IsReady(Failure())); From 33f56657d213bbc9d4c68a20b8ca581c42a46483 Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Tue, 9 Apr 2024 10:12:03 -0700 Subject: [PATCH 13/18] [Samples] Health checking example (#36235) Closes #36235 PiperOrigin-RevId: 623204716 --- examples/cpp/health/BUILD | 42 ++++++++ examples/cpp/health/CMakeLists.txt | 98 +++++++++++++++++++ examples/cpp/health/README.md | 6 ++ examples/cpp/health/health_client.cc | 140 +++++++++++++++++++++++++++ examples/cpp/health/health_server.cc | 100 +++++++++++++++++++ 5 files changed, 386 insertions(+) create mode 100644 examples/cpp/health/BUILD create mode 100644 examples/cpp/health/CMakeLists.txt create mode 100644 examples/cpp/health/README.md create mode 100644 examples/cpp/health/health_client.cc create mode 100644 examples/cpp/health/health_server.cc diff --git a/examples/cpp/health/BUILD b/examples/cpp/health/BUILD new file mode 100644 index 00000000000..21929369895 --- /dev/null +++ b/examples/cpp/health/BUILD @@ -0,0 +1,42 @@ +# Copyright 2024 the 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. + +licenses(["notice"]) + +cc_binary( + name = "health_client", + srcs = ["health_client.cc"], + defines = ["BAZEL_BUILD"], + deps = [ + "//:grpc++", + "//examples/protos:helloworld_cc_grpc", + "//src/proto/grpc/health/v1:health_proto", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + ], +) + +cc_binary( + name = "health_server", + srcs = ["health_server.cc"], + defines = ["BAZEL_BUILD"], + deps = [ + "//:grpc++", + "//:grpc++_reflection", + "//examples/protos:helloworld_cc_grpc", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + "@com_google_absl//absl/strings:str_format", + ], +) diff --git a/examples/cpp/health/CMakeLists.txt b/examples/cpp/health/CMakeLists.txt new file mode 100644 index 00000000000..963e82f0a3e --- /dev/null +++ b/examples/cpp/health/CMakeLists.txt @@ -0,0 +1,98 @@ +# 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. +# +# cmake build file for C++ helloworld example. +# Assumes protobuf and gRPC have been installed using cmake. +# See cmake_externalproject/CMakeLists.txt for all-in-one cmake build +# that automatically builds all the dependencies before building helloworld. + +cmake_minimum_required(VERSION 3.8) + +project(HelloWorld C CXX) + +include(../cmake/common.cmake) + +# Proto file +get_filename_component(hw_proto "../../protos/helloworld.proto" ABSOLUTE) +get_filename_component(hw_proto_path "${hw_proto}" PATH) +get_filename_component(health_proto "../../../src/proto/grpc/health/v1/health.proto" ABSOLUTE) +get_filename_component(health_proto_path "${health_proto}" PATH) + +# Generated sources +set(hw_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc") +set(hw_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.h") +set(hw_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc") +set(hw_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.h") +add_custom_command( + OUTPUT "${hw_proto_srcs}" "${hw_proto_hdrs}" "${hw_grpc_srcs}" "${hw_grpc_hdrs}" + COMMAND ${_PROTOBUF_PROTOC} + ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" + --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" + -I "${hw_proto_path}" + --plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}" + "${hw_proto}" + DEPENDS "${hw_proto}") + +# Health protos +set(health_proto_srcs "${CMAKE_CURRENT_BINARY_DIR}/health.pb.cc") +set(health_proto_hdrs "${CMAKE_CURRENT_BINARY_DIR}/health.pb.h") +set(health_grpc_srcs "${CMAKE_CURRENT_BINARY_DIR}/health.grpc.pb.cc") +set(health_grpc_hdrs "${CMAKE_CURRENT_BINARY_DIR}/health.grpc.pb.h") +add_custom_command( + OUTPUT "${health_proto_srcs}" "${health_proto_hdrs}" "${health_grpc_srcs}" "${health_grpc_hdrs}" + COMMAND ${_PROTOBUF_PROTOC} + ARGS --grpc_out "${CMAKE_CURRENT_BINARY_DIR}" + --cpp_out "${CMAKE_CURRENT_BINARY_DIR}" + -I "${health_proto_path}" + --plugin=protoc-gen-grpc="${_GRPC_CPP_PLUGIN_EXECUTABLE}" + "${health_proto}" + DEPENDS "${health_proto}") + +# Include generated *.pb.h files +include_directories("${CMAKE_CURRENT_BINARY_DIR}") + +# hw_grpc_proto +add_library(hw_grpc_proto + ${hw_grpc_srcs} + ${hw_grpc_hdrs} + ${hw_proto_srcs} + ${hw_proto_hdrs}) +target_link_libraries(hw_grpc_proto + ${_REFLECTION} + ${_GRPC_GRPCPP} + ${_PROTOBUF_LIBPROTOBUF}) + +#health_grpc_proto +add_library(health_grpc_proto + ${health_grpc_srcs} + ${health_grpc_hdrs} + ${health_proto_srcs} + ${health_proto_hdrs}) +target_link_libraries(health_grpc_proto + ${_PROTOBUF_LIBPROTOBUF}) + + +# Targets greeter_[async_](client|server) +foreach(_target + health_client health_server) + add_executable(${_target} "${_target}.cc") + target_link_libraries(${_target} + hw_grpc_proto + health_grpc_proto + absl::flags + absl::flags_parse + ${_REFLECTION} + ${_GRPC_GRPCPP} + ${_PROTOBUF_LIBPROTOBUF}) +endforeach() diff --git a/examples/cpp/health/README.md b/examples/cpp/health/README.md new file mode 100644 index 00000000000..6e65d73db47 --- /dev/null +++ b/examples/cpp/health/README.md @@ -0,0 +1,6 @@ +# gRPC C++ Health Check Example + +You can find a complete set of instructions for building gRPC and running the +example in the [C++ Quick Start][]. + +[C++ Quick Start]: https://grpc.io/docs/languages/cpp/quickstart diff --git a/examples/cpp/health/health_client.cc b/examples/cpp/health/health_client.cc new file mode 100644 index 00000000000..488dbdf4d31 --- /dev/null +++ b/examples/cpp/health/health_client.cc @@ -0,0 +1,140 @@ +/* + * + * 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 +#include +#include + +#include "absl/flags/flag.h" +#include "absl/flags/parse.h" + +#include + +#ifdef BAZEL_BUILD +#include "examples/protos/helloworld.grpc.pb.h" + +#include "src/proto/grpc/health/v1/health.grpc.pb.h" +#else +#include "health.grpc.pb.h" +#include "helloworld.grpc.pb.h" +#endif + +ABSL_FLAG(std::string, target, "localhost:50051", "Server address"); + +using grpc::Channel; +using grpc::ClientContext; +using grpc::Status; +using grpc::health::v1::Health; +using grpc::health::v1::HealthCheckRequest; +using grpc::health::v1::HealthCheckResponse; +using helloworld::Greeter; +using helloworld::HelloReply; +using helloworld::HelloRequest; + +class GreeterClient { + public: + GreeterClient(std::shared_ptr channel) + : stub_(Greeter::NewStub(channel)), + health_stub_(Health::NewStub(channel)) {} + + // Assembles the client's payload, sends it and presents the response back + // from the server. + std::string SayHello(const std::string& user) { + // Data we are sending to the server. + HelloRequest request; + request.set_name(user); + + // Container for the data we expect from the server. + HelloReply reply; + + // Context for the client. It could be used to convey extra information to + // the server and/or tweak certain RPC behaviors. + ClientContext context; + + // The actual RPC. + std::mutex mu; + std::condition_variable cv; + bool done = false; + Status status; + stub_->async()->SayHello(&context, &request, &reply, + [&mu, &cv, &done, &status](Status s) { + status = std::move(s); + std::lock_guard lock(mu); + done = true; + cv.notify_one(); + }); + + std::unique_lock lock(mu); + while (!done) { + cv.wait(lock); + } + + // Act upon its status. + if (status.ok()) { + return reply.message(); + } else { + std::cout << status.error_code() << ": " << status.error_message() + << std::endl; + return "RPC failed"; + } + } + + void CheckHealth(const std::string& message) { + ClientContext context; + HealthCheckResponse response; + Status status = health_stub_->Check( + &context, HealthCheckRequest::default_instance(), &response); + if (!status.ok()) { + std::cerr << "Failed to check service health: " << status.error_code() + << ": " << status.error_message() << "\n"; + return; + } + std::cout << message << ": " << response.DebugString(); + } + + private: + std::unique_ptr stub_; + std::unique_ptr health_stub_; +}; + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + // Instantiate the client. It requires a channel, out of which the actual RPCs + // are created. This channel models a connection to an endpoint specified by + // the argument "--target=" which is the only expected argument. + std::string target_str = absl::GetFlag(FLAGS_target); + // We indicate that the channel isn't authenticated (use of + // InsecureChannelCredentials()). + grpc::ChannelArguments args; + args.SetServiceConfigJSON( + "{\"healthCheckConfig\": " + "{\"serviceName\": \"\"}}"); + GreeterClient greeter(grpc::CreateCustomChannel( + target_str, grpc::InsecureChannelCredentials(), args)); + std::string user = "world"; + greeter.CheckHealth("Before call"); + std::string reply = greeter.SayHello(user); + std::cout << "Greeter received: " << reply << std::endl; + greeter.CheckHealth("After call"); + reply = greeter.SayHello(user); + std::cout << "Greeter received: " << reply << std::endl; + greeter.CheckHealth("After second call"); + return 0; +} diff --git a/examples/cpp/health/health_server.cc b/examples/cpp/health/health_server.cc new file mode 100644 index 00000000000..ac78435ea1e --- /dev/null +++ b/examples/cpp/health/health_server.cc @@ -0,0 +1,100 @@ +/* + * + * 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 + +#include "absl/flags/flag.h" +#include "absl/flags/parse.h" +#include "absl/strings/str_format.h" + +#include +#include +#include + +#ifdef BAZEL_BUILD +#include "examples/protos/helloworld.grpc.pb.h" +#else +#include "helloworld.grpc.pb.h" +#endif + +ABSL_FLAG(uint16_t, port, 50051, "Server port for the service"); + +using grpc::CallbackServerContext; +using grpc::Server; +using grpc::ServerBuilder; +using grpc::ServerUnaryReactor; +using grpc::Status; +using helloworld::Greeter; +using helloworld::HelloReply; +using helloworld::HelloRequest; + +// Logic and data behind the server's behavior. +class GreeterServiceImpl final : public Greeter::CallbackService { + public: + void set_health_check_service( + grpc::HealthCheckServiceInterface* health_check_service) { + health_check_service_ = health_check_service; + } + + private: + ServerUnaryReactor* SayHello(CallbackServerContext* context, + const HelloRequest* request, + HelloReply* reply) override { + std::string prefix("Hello "); + reply->set_message(prefix + request->name()); + ServerUnaryReactor* reactor = context->DefaultReactor(); + reactor->Finish(Status::OK); + // Goes down, then up + is_serving_ = !is_serving_; + health_check_service_->SetServingStatus(is_serving_); + return reactor; + } + + grpc::HealthCheckServiceInterface* health_check_service_ = nullptr; + bool is_serving_ = true; +}; + +void RunServer(uint16_t port) { + std::string server_address = absl::StrFormat("0.0.0.0:%d", port); + GreeterServiceImpl service; + + grpc::EnableDefaultHealthCheckService(true); + grpc::reflection::InitProtoReflectionServerBuilderPlugin(); + ServerBuilder builder; + // Listen on the given address without any authentication mechanism. + builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); + // Register "service" as the instance through which we'll communicate with + // clients. In this case it corresponds to an *synchronous* service. + builder.RegisterService(&service); + // Finally assemble the server. + std::unique_ptr server(builder.BuildAndStart()); + service.set_health_check_service(server->GetHealthCheckService()); + std::cout << "Server listening on " << server_address << std::endl; + + // Wait for the server to shutdown. Note that some other thread must be + // responsible for shutting down the server for this call to ever return. + server->Wait(); +} + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + RunServer(absl::GetFlag(FLAGS_port)); + return 0; +} From bbaf87b2644b9b081c1881c44ef7a10e6f6e76cf Mon Sep 17 00:00:00 2001 From: Sergii Tkachenko Date: Tue, 9 Apr 2024 10:25:48 -0700 Subject: [PATCH 14/18] [PSM Interop] Migrate to Artifact Registry (#36273) Migrate PSM Interop images from Container Registry (gcr.io) to Artifact Registry (pkg.dev). Closes #36273 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36273 from sergiitk:psm-interop-pkg-dev a831ad48bb467d7303cb705ca832c4c3928eadcc PiperOrigin-RevId: 623209428 --- tools/internal_ci/linux/grpc_xds_k8s_lb.sh | 7 ++++--- tools/internal_ci/linux/grpc_xds_k8s_lb_python.sh | 7 ++++--- tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh | 2 +- tools/internal_ci/linux/grpc_xds_url_map.sh | 5 +++-- tools/internal_ci/linux/grpc_xds_url_map_python.sh | 5 +++-- tools/internal_ci/linux/psm-csm-python.sh | 7 ++++--- tools/internal_ci/linux/psm-csm.sh | 7 ++++--- tools/internal_ci/linux/psm-security-python.sh | 7 ++++--- tools/internal_ci/linux/psm-security.sh | 7 ++++--- 9 files changed, 31 insertions(+), 23 deletions(-) diff --git a/tools/internal_ci/linux/grpc_xds_k8s_lb.sh b/tools/internal_ci/linux/grpc_xds_k8s_lb.sh index b0fe742e6f8..63579d7e752 100755 --- a/tools/internal_ci/linux/grpc_xds_k8s_lb.sh +++ b/tools/internal_ci/linux/grpc_xds_k8s_lb.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" @@ -40,7 +41,7 @@ build_test_app_docker_images() { echo "Building C++ xDS interop test app Docker images" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_client" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_server" -t "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" if is_version_branch "${TESTING_VERSION}"; then diff --git a/tools/internal_ci/linux/grpc_xds_k8s_lb_python.sh b/tools/internal_ci/linux/grpc_xds_k8s_lb_python.sh index 23047a17209..31444e7225b 100755 --- a/tools/internal_ci/linux/grpc_xds_k8s_lb_python.sh +++ b/tools/internal_ci/linux/grpc_xds_k8s_lb_python.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" readonly LANGUAGE_NAME="Python" @@ -52,7 +53,7 @@ build_test_app_docker_images() { popd - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" diff --git a/tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh b/tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh index 2fa8cfdc8d1..269a235b761 100755 --- a/tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh +++ b/tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh @@ -14,7 +14,7 @@ # limitations under the License. ## xDS test server/client Docker images -readonly IMAGE_REPO="gcr.io/grpc-testing/xds-interop" +readonly IMAGE_REPO="us-docker.pkg.dev/grpc-testing/psm-interop" find_latest() { gcloud container images list-tags --filter='tags~v1\.\d+\.x' "${IMAGE_REPO}/${1}-${2}" --flatten='tags[]' --format='value(tags)' | sort --version-sort | tail -n 1 diff --git a/tools/internal_ci/linux/grpc_xds_url_map.sh b/tools/internal_ci/linux/grpc_xds_url_map.sh index 17f66a326e1..bc90935573f 100755 --- a/tools/internal_ci/linux/grpc_xds_url_map.sh +++ b/tools/internal_ci/linux/grpc_xds_url_map.sh @@ -19,7 +19,8 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test client Docker images -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" @@ -37,7 +38,7 @@ readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" build_test_app_docker_images() { echo "Building C++ xDS interop test app Docker images" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_client" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" if is_version_branch "${TESTING_VERSION}"; then tag_and_push_docker_image "${CLIENT_IMAGE_NAME}" "${GIT_COMMIT}" "${TESTING_VERSION}" diff --git a/tools/internal_ci/linux/grpc_xds_url_map_python.sh b/tools/internal_ci/linux/grpc_xds_url_map_python.sh index 0bf795f4bac..e12cda8afe7 100755 --- a/tools/internal_ci/linux/grpc_xds_url_map_python.sh +++ b/tools/internal_ci/linux/grpc_xds_url_map_python.sh @@ -19,7 +19,8 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test client Docker images -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" readonly LANGUAGE_NAME="Python" @@ -46,7 +47,7 @@ build_test_app_docker_images() { popd - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" if is_version_branch "${TESTING_VERSION}"; then diff --git a/tools/internal_ci/linux/psm-csm-python.sh b/tools/internal_ci/linux/psm-csm-python.sh index 22c1ac2f994..4b6ee20ce3d 100755 --- a/tools/internal_ci/linux/psm-csm-python.sh +++ b/tools/internal_ci/linux/psm-csm-python.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test server/client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" @@ -53,7 +54,7 @@ build_test_app_docker_images() { popd - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" diff --git a/tools/internal_ci/linux/psm-csm.sh b/tools/internal_ci/linux/psm-csm.sh index d2cc11a2498..7b0c596e431 100755 --- a/tools/internal_ci/linux/psm-csm.sh +++ b/tools/internal_ci/linux/psm-csm.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test server/client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" @@ -41,7 +42,7 @@ build_test_app_docker_images() { echo "Building C++ xDS interop test app Docker images" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_client" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_server" -t "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" if is_version_branch "${TESTING_VERSION}"; then diff --git a/tools/internal_ci/linux/psm-security-python.sh b/tools/internal_ci/linux/psm-security-python.sh index cddfa085589..ee1aa70e7c0 100755 --- a/tools/internal_ci/linux/psm-security-python.sh +++ b/tools/internal_ci/linux/psm-security-python.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test server/client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/python-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/python-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" readonly LANGUAGE_NAME="Python" @@ -54,7 +55,7 @@ build_test_app_docker_images() { popd - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" diff --git a/tools/internal_ci/linux/psm-security.sh b/tools/internal_ci/linux/psm-security.sh index 2cebf9da0b4..9a55367e097 100755 --- a/tools/internal_ci/linux/psm-security.sh +++ b/tools/internal_ci/linux/psm-security.sh @@ -19,8 +19,9 @@ set -eo pipefail readonly GITHUB_REPOSITORY_NAME="grpc" readonly TEST_DRIVER_INSTALL_SCRIPT_URL="https://raw.githubusercontent.com/${TEST_DRIVER_REPO_OWNER:-grpc}/psm-interop/${TEST_DRIVER_BRANCH:-main}/.kokoro/psm_interop_kokoro_lib.sh" ## xDS test server/client Docker images -readonly SERVER_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-server" -readonly CLIENT_IMAGE_NAME="gcr.io/grpc-testing/xds-interop/cpp-client" +readonly DOCKER_REGISTRY="us-docker.pkg.dev" +readonly SERVER_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-server" +readonly CLIENT_IMAGE_NAME="us-docker.pkg.dev/grpc-testing/psm-interop/cpp-client" readonly FORCE_IMAGE_BUILD="${FORCE_IMAGE_BUILD:-0}" readonly BUILD_APP_PATH="interop-testing/build/install/grpc-interop-testing" @@ -41,7 +42,7 @@ build_test_app_docker_images() { echo "Building C++ xDS interop test app Docker images" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_client" -t "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" docker build -f "${SRC_DIR}/tools/dockerfile/interoptest/grpc_interop_cxx_xds/Dockerfile.xds_server" -t "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" "${SRC_DIR}" - gcloud -q auth configure-docker + gcloud -q auth configure-docker "${DOCKER_REGISTRY}" docker push "${CLIENT_IMAGE_NAME}:${GIT_COMMIT}" docker push "${SERVER_IMAGE_NAME}:${GIT_COMMIT}" if is_version_branch "${TESTING_VERSION}"; then From 4e735be35aee0f494d619348aed2476b77e8c31b Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Tue, 9 Apr 2024 10:32:08 -0700 Subject: [PATCH 15/18] [xds] Fallback implementation (#36145) As per [gRFC A71](https://github.com/grpc/proposal/blob/master/A71-xds-fallback.md). Closes #36145 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36145 from eugeneo:fallback-review 4871c0b316e1a67ee63b4da12c1f5e65b9ca20b7 PiperOrigin-RevId: 623211613 --- CMakeLists.txt | 177 ++++++ build_autogenerated.yaml | 57 ++ src/core/ext/xds/xds_client.cc | 269 ++++++--- src/core/ext/xds/xds_client.h | 12 +- src/core/ext/xds/xds_client_grpc.cc | 4 +- test/core/xds/xds_client_test.cc | 540 +++++++++++++++--- test/core/xds/xds_transport_fake.cc | 3 +- test/core/xds/xds_transport_fake.h | 2 + test/cpp/end2end/xds/BUILD | 21 + test/cpp/end2end/xds/xds_end2end_test_lib.cc | 18 +- test/cpp/end2end/xds/xds_end2end_test_lib.h | 14 +- .../end2end/xds/xds_fallback_end2end_test.cc | 311 ++++++++++ test/cpp/end2end/xds/xds_server.cc | 21 +- test/cpp/end2end/xds/xds_server.h | 82 ++- test/cpp/end2end/xds/xds_utils.cc | 2 +- test/cpp/end2end/xds/xds_utils.h | 12 +- tools/run_tests/generated/tests.json | 22 + 17 files changed, 1346 insertions(+), 221 deletions(-) create mode 100644 test/cpp/end2end/xds/xds_fallback_end2end_test.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e930947999..dcf0155ed6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1557,6 +1557,9 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx xds_end2end_test) endif() add_dependencies(buildtests_cxx xds_endpoint_resource_type_test) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) + add_dependencies(buildtests_cxx xds_fallback_end2end_test) + endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx xds_fault_injection_end2end_test) endif() @@ -34244,6 +34247,180 @@ target_link_libraries(xds_endpoint_resource_type_test ) +endif() +if(gRPC_BUILD_TESTS) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) + + add_executable(xds_fallback_end2end_test + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/echo_messages.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/simple_messages.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/address.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/address.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/address.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/address.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/ads.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/ads.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/ads.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/ads.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/base.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/base.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/base.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/base.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/cluster.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/cluster.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/cluster.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/config_source.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/config_source.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/config_source.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/config_source.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/discovery.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/discovery.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/discovery.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/discovery.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/endpoint.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/endpoint.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/endpoint.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/endpoint.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/expr.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/expr.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/expr.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/expr.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/extension.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/extension.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/extension.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/extension.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/health_check.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/health_check.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/health_check.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/health_check.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_connection_manager.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_connection_manager.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_connection_manager.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_connection_manager.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_filter_rbac.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_filter_rbac.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_filter_rbac.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/http_filter_rbac.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/listener.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/listener.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/listener.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/listener.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/load_report.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/load_report.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/load_report.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/load_report.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/lrs.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/lrs.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/lrs.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/lrs.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/metadata.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/metadata.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/metadata.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/metadata.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/orca_load_report.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/outlier_detection.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/outlier_detection.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/outlier_detection.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/outlier_detection.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/path.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/path.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/path.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/path.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/percent.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/protocol.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/protocol.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/protocol.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/protocol.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/range.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/range.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/range.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/range.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/rbac.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/rbac.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/rbac.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/rbac.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/regex.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/regex.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/regex.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/regex.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/route.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/route.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/route.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/route.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/router.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/router.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/router.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/router.grpc.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/string.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/string.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/string.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/xds/v3/string.grpc.pb.h + test/cpp/end2end/test_service_impl.cc + test/cpp/end2end/xds/xds_end2end_test_lib.cc + test/cpp/end2end/xds/xds_fallback_end2end_test.cc + test/cpp/end2end/xds/xds_server.cc + test/cpp/end2end/xds/xds_utils.cc + test/cpp/util/tls_test_utils.cc + ) + if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(xds_fallback_end2end_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + "GRPCXX_DLL_IMPORTS" + ) + endif() + endif() + target_compile_features(xds_fallback_end2end_test PUBLIC cxx_std_14) + target_include_directories(xds_fallback_end2end_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(xds_fallback_end2end_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + grpc++_test_util + ) + + +endif() endif() if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 1332875ffe9..122ed5f7064 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -20861,6 +20861,63 @@ targets: - protobuf - grpc_test_util uses_polling: false +- name: xds_fallback_end2end_test + gtest: true + build: test + language: c++ + headers: + - test/core/util/scoped_env_var.h + - test/cpp/end2end/counted_service.h + - test/cpp/end2end/test_service_impl.h + - test/cpp/end2end/xds/xds_end2end_test_lib.h + - test/cpp/end2end/xds/xds_server.h + - test/cpp/end2end/xds/xds_utils.h + - test/cpp/util/tls_test_utils.h + src: + - src/proto/grpc/testing/duplicate/echo_duplicate.proto + - 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/address.proto + - src/proto/grpc/testing/xds/v3/ads.proto + - src/proto/grpc/testing/xds/v3/base.proto + - src/proto/grpc/testing/xds/v3/cluster.proto + - src/proto/grpc/testing/xds/v3/config_source.proto + - src/proto/grpc/testing/xds/v3/discovery.proto + - src/proto/grpc/testing/xds/v3/endpoint.proto + - src/proto/grpc/testing/xds/v3/expr.proto + - src/proto/grpc/testing/xds/v3/extension.proto + - src/proto/grpc/testing/xds/v3/health_check.proto + - src/proto/grpc/testing/xds/v3/http_connection_manager.proto + - src/proto/grpc/testing/xds/v3/http_filter_rbac.proto + - src/proto/grpc/testing/xds/v3/listener.proto + - src/proto/grpc/testing/xds/v3/load_report.proto + - src/proto/grpc/testing/xds/v3/lrs.proto + - src/proto/grpc/testing/xds/v3/metadata.proto + - src/proto/grpc/testing/xds/v3/orca_load_report.proto + - src/proto/grpc/testing/xds/v3/outlier_detection.proto + - src/proto/grpc/testing/xds/v3/path.proto + - src/proto/grpc/testing/xds/v3/percent.proto + - src/proto/grpc/testing/xds/v3/protocol.proto + - src/proto/grpc/testing/xds/v3/range.proto + - src/proto/grpc/testing/xds/v3/rbac.proto + - src/proto/grpc/testing/xds/v3/regex.proto + - src/proto/grpc/testing/xds/v3/route.proto + - src/proto/grpc/testing/xds/v3/router.proto + - src/proto/grpc/testing/xds/v3/string.proto + - test/cpp/end2end/test_service_impl.cc + - test/cpp/end2end/xds/xds_end2end_test_lib.cc + - test/cpp/end2end/xds/xds_fallback_end2end_test.cc + - test/cpp/end2end/xds/xds_server.cc + - test/cpp/end2end/xds/xds_utils.cc + - test/cpp/util/tls_test_utils.cc + deps: + - gtest + - grpc++_test_util + platforms: + - linux + - posix + - mac - name: xds_fault_injection_end2end_test gtest: true build: test diff --git a/src/core/ext/xds/xds_client.cc b/src/core/ext/xds/xds_client.cc index e239c8cc307..819649b596c 100644 --- a/src/core/ext/xds/xds_client.cc +++ b/src/core/ext/xds/xds_client.cc @@ -24,7 +24,9 @@ #include #include #include +#include #include +#include #include "absl/cleanup/cleanup.h" #include "absl/strings/match.h" @@ -555,6 +557,67 @@ void XdsClient::XdsChannel::UnsubscribeLocked(const XdsResourceType* type, } } +bool XdsClient::XdsChannel::MaybeFallbackLocked( + const std::string& authority, AuthorityState& authority_state) { + if (!xds_client_->HasUncachedResources(authority_state)) { + return false; + } + std::vector xds_servers; + if (authority != kOldStyleAuthority) { + xds_servers = + xds_client_->bootstrap().LookupAuthority(authority)->servers(); + } + if (xds_servers.empty()) xds_servers = xds_client_->bootstrap().servers(); + for (size_t i = authority_state.xds_channels.size(); i < xds_servers.size(); + ++i) { + authority_state.xds_channels.emplace_back( + xds_client_->GetOrCreateXdsChannelLocked(*xds_servers[i], "fallback")); + for (const auto& type_resource : authority_state.resource_map) { + for (const auto& key_state : type_resource.second) { + authority_state.xds_channels.back()->SubscribeLocked( + type_resource.first, {authority, key_state.first}); + } + } + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] authority %s: added fallback server %s (%s)", + xds_client_.get(), authority.c_str(), + xds_servers[i]->server_uri().c_str(), + authority_state.xds_channels.back()->status().ToString().c_str()); + } + if (authority_state.xds_channels.back()->status().ok()) return true; + } + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, "[xds_client %p] authority %s: No fallback server", + xds_client_.get(), authority.c_str()); + } + return false; +} + +void XdsClient::XdsChannel::SetHealthyLocked() { + status_ = absl::OkStatus(); + // Make this channel active iff: + // 1. Channel is on the list of authority channels + // 2. Channel is not the last channel on the list (i.e. not the active + // channel) + for (auto& authority : xds_client_->authority_state_map_) { + auto& channels = authority.second.xds_channels; + // Skip if channel is active. + if (channels.back() == this) continue; + auto channel_it = std::find(channels.begin(), channels.end(), this); + // Skip if this is not on the list + if (channel_it != channels.end()) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, "[xds_client %p] authority %s: Falling forward to %s", + xds_client_.get(), authority.first.c_str(), + server_.server_uri().c_str()); + } + // Lower priority channels are no longer needed, connection is back! + channels.erase(channel_it + 1, channels.end()); + } + } +} + void XdsClient::XdsChannel::OnConnectivityFailure(absl::Status status) { { MutexLock lock(&xds_client_->mu_); @@ -584,8 +647,11 @@ void XdsClient::XdsChannel::SetChannelStatusLocked(absl::Status status) { status_ = status; // Find all watchers for this channel. std::set> watchers; - for (const auto& a : xds_client_->authority_state_map_) { // authority - if (a.second.xds_channel != this) continue; + for (auto& a : xds_client_->authority_state_map_) { // authority + if (a.second.xds_channels.empty() || a.second.xds_channels.back() != this || + MaybeFallbackLocked(a.first, a.second)) { + continue; + } for (const auto& t : a.second.resource_map) { // type for (const auto& r : t.second) { // resource id for (const auto& w : r.second.watchers) { // watchers @@ -594,15 +660,17 @@ void XdsClient::XdsChannel::SetChannelStatusLocked(absl::Status status) { } } } - // Enqueue notification for the watchers. - xds_client_->work_serializer_.Schedule( - [watchers = std::move(watchers), status = std::move(status)]() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(xds_client_->work_serializer_) { - for (const auto& watcher : watchers) { - watcher->OnError(status, ReadDelayHandle::NoWait()); - } - }, - DEBUG_LOCATION); + if (!watchers.empty()) { + // Enqueue notification for the watchers. + xds_client_->work_serializer_.Schedule( + [watchers = std::move(watchers), status = std::move(status)]() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(xds_client_->work_serializer_) { + for (const auto& watcher : watchers) { + watcher->OnError(status, ReadDelayHandle::NoWait()); + } + }, + DEBUG_LOCATION); + } } // @@ -955,10 +1023,13 @@ XdsClient::XdsChannel::AdsCall::AdsCall( } // If this is a reconnect, add any necessary subscriptions from what's // already in the cache. - for (const auto& a : xds_client()->authority_state_map_) { + for (auto& a : xds_client()->authority_state_map_) { const std::string& authority = a.first; - // Skip authorities that are not using this xDS channel. - if (a.second.xds_channel != xds_channel()) continue; + auto it = std::find(a.second.xds_channels.begin(), + a.second.xds_channels.end(), xds_channel()); + // Skip authorities that are not using this xDS channel. The channel can be + // anywhere in the list. + if (it == a.second.xds_channels.end()) continue; for (const auto& t : a.second.resource_map) { const XdsResourceType* type = t.first; for (const auto& r : t.second) { @@ -1097,7 +1168,7 @@ void XdsClient::XdsChannel::AdsCall::OnRecvMessage(absl::string_view payload) { status.ToString().c_str()); } else { seen_response_ = true; - xds_channel()->status_ = absl::OkStatus(); + xds_channel()->SetHealthyLocked(); // Update nonce. auto& state = state_map_[result.type]; state.nonce = result.nonce; @@ -1120,7 +1191,9 @@ void XdsClient::XdsChannel::AdsCall::OnRecvMessage(absl::string_view payload) { const std::string& authority = a.first; AuthorityState& authority_state = a.second; // Skip authorities that are not using this xDS channel. - if (authority_state.xds_channel != xds_channel()) continue; + if (authority_state.xds_channels.back() != xds_channel()) { + continue; + } auto seen_authority_it = result.resources_seen.find(authority); // Find this resource type. auto type_it = authority_state.resource_map.find(result.type); @@ -1567,6 +1640,18 @@ RefCountedPtr XdsClient::GetOrCreateXdsChannelLocked( return xds_channel; } +bool XdsClient::HasUncachedResources(const AuthorityState& authority_state) { + for (const auto& type_resource : authority_state.resource_map) { + for (const auto& key_state : type_resource.second) { + if (key_state.second.meta.client_status == + XdsApi::ResourceMetadata::REQUESTED) { + return true; + } + } + } + return false; +} + void XdsClient::WatchResource(const XdsResourceType* type, absl::string_view name, RefCountedPtr watcher) { @@ -1592,7 +1677,7 @@ void XdsClient::WatchResource(const XdsResourceType* type, return; } // Find server to use. - const XdsBootstrap::XdsServer* xds_server = nullptr; + std::vector xds_servers; if (resource_name->authority != kOldStyleAuthority) { auto* authority = bootstrap_->LookupAuthority(std::string(resource_name->authority)); @@ -1602,75 +1687,100 @@ void XdsClient::WatchResource(const XdsResourceType* type, "\" not present in bootstrap config"))); return; } - xds_server = - authority->servers().empty() ? nullptr : authority->servers().front(); + xds_servers = authority->servers(); } - if (xds_server == nullptr) xds_server = bootstrap_->servers().front(); + if (xds_servers.empty()) xds_servers = bootstrap_->servers(); { MutexLock lock(&mu_); MaybeRegisterResourceTypeLocked(type); + AuthorityState& authority_state = authority_state_map_[resource_name->authority]; - ResourceState& resource_state = - authority_state.resource_map[type][resource_name->key]; + auto it_is_new = authority_state.resource_map[type].emplace( + resource_name->key, ResourceState()); + bool first_watcher_for_resource = it_is_new.second; + ResourceState& resource_state = it_is_new.first->second; resource_state.watchers[w] = watcher; - // If we already have a cached value for the resource, notify the new - // watcher immediately. - if (resource_state.resource != nullptr) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { - gpr_log(GPR_INFO, - "[xds_client %p] returning cached listener data for %s", this, - std::string(name).c_str()); - } - work_serializer_.Schedule( - [watcher, value = resource_state.resource]() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { - watcher->OnGenericResourceChanged(value, - ReadDelayHandle::NoWait()); - }, - DEBUG_LOCATION); - } else if (resource_state.meta.client_status == - XdsApi::ResourceMetadata::DOES_NOT_EXIST) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { - gpr_log(GPR_INFO, - "[xds_client %p] reporting cached does-not-exist for %s", this, - std::string(name).c_str()); + if (first_watcher_for_resource) { + // We try to add new channels in 2 cases: + // - This is the first resource for this authority (i.e., the list + // of channels is empty). + // - The last channel in the list is failing. That failure may not + // have previously triggered fallback if there were no uncached + // resources, but we've just added a new uncached resource, + // so we need to trigger fallback now. + // + // Note that when we add a channel, it might already be failing + // due to being used in a different authority. So we keep going + // until either we add one that isn't failing or we've added them all. + if (authority_state.xds_channels.empty() || + !authority_state.xds_channels.back()->status().ok()) { + for (size_t i = authority_state.xds_channels.size(); + i < xds_servers.size(); ++i) { + authority_state.xds_channels.emplace_back( + GetOrCreateXdsChannelLocked(*xds_servers[i], "start watch")); + if (authority_state.xds_channels.back()->status().ok()) { + break; + } + } } - work_serializer_.Schedule( - [watcher]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { - watcher->OnResourceDoesNotExist(ReadDelayHandle::NoWait()); - }, - DEBUG_LOCATION); - } else if (resource_state.meta.client_status == - XdsApi::ResourceMetadata::NACKED) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { - gpr_log( - GPR_INFO, - "[xds_client %p] reporting cached validation failure for %s: %s", - this, std::string(name).c_str(), - resource_state.meta.failed_details.c_str()); + for (const auto& channel : authority_state.xds_channels) { + channel->SubscribeLocked(type, *resource_name); } - std::string details = resource_state.meta.failed_details; - const auto* node = bootstrap_->node(); - if (node != nullptr) { - absl::StrAppend(&details, " (node ID:", bootstrap_->node()->id(), ")"); + } else { + // If we already have a cached value for the resource, notify the new + // watcher immediately. + if (resource_state.resource != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] returning cached listener data for %s", this, + std::string(name).c_str()); + } + work_serializer_.Schedule( + [watcher, value = resource_state.resource]() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { + watcher->OnGenericResourceChanged(value, + ReadDelayHandle::NoWait()); + }, + DEBUG_LOCATION); + } else if (resource_state.meta.client_status == + XdsApi::ResourceMetadata::DOES_NOT_EXIST) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log(GPR_INFO, + "[xds_client %p] reporting cached does-not-exist for %s", + this, std::string(name).c_str()); + } + work_serializer_.Schedule( + [watcher]() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { + watcher->OnResourceDoesNotExist(ReadDelayHandle::NoWait()); + }, + DEBUG_LOCATION); + } else if (resource_state.meta.client_status == + XdsApi::ResourceMetadata::NACKED) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { + gpr_log( + GPR_INFO, + "[xds_client %p] reporting cached validation failure for %s: %s", + this, std::string(name).c_str(), + resource_state.meta.failed_details.c_str()); + } + std::string details = resource_state.meta.failed_details; + const auto* node = bootstrap_->node(); + if (node != nullptr) { + absl::StrAppend(&details, " (node ID:", bootstrap_->node()->id(), + ")"); + } + work_serializer_.Schedule( + [watcher, details = std::move(details)]() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { + watcher->OnError(absl::UnavailableError(absl::StrCat( + "invalid resource: ", details)), + ReadDelayHandle::NoWait()); + }, + DEBUG_LOCATION); } - work_serializer_.Schedule( - [watcher, details = std::move(details)]() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&work_serializer_) { - watcher->OnError(absl::UnavailableError(absl::StrCat( - "invalid resource: ", details)), - ReadDelayHandle::NoWait()); - }, - DEBUG_LOCATION); } - // If the authority doesn't yet have a channel, set it, creating it if - // needed. - if (authority_state.xds_channel == nullptr) { - authority_state.xds_channel = - GetOrCreateXdsChannelLocked(*xds_server, "start watch"); - } - absl::Status channel_status = authority_state.xds_channel->status(); + absl::Status channel_status = authority_state.xds_channels.back()->status(); if (!channel_status.ok()) { if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { gpr_log(GPR_INFO, @@ -1685,7 +1795,6 @@ void XdsClient::WatchResource(const XdsResourceType* type, }, DEBUG_LOCATION); } - authority_state.xds_channel->SubscribeLocked(type, *resource_name); } work_serializer_.DrainQueue(); } @@ -1723,13 +1832,15 @@ void XdsClient::CancelResourceWatch(const XdsResourceType* type, this, std::string(type->type_url()).c_str(), std::string(name).c_str()); } - authority_state.xds_channel->UnsubscribeLocked(type, *resource_name, - delay_unsubscription); + for (const auto& xds_channel : authority_state.xds_channels) { + xds_channel->UnsubscribeLocked(type, *resource_name, + delay_unsubscription); + } type_map.erase(resource_it); if (type_map.empty()) { authority_state.resource_map.erase(type_it); if (authority_state.resource_map.empty()) { - authority_state.xds_channel.reset(); + authority_state.xds_channels.clear(); } } } diff --git a/src/core/ext/xds/xds_client.h b/src/core/ext/xds/xds_client.h index 5d99255bd15..d39bf7ad23e 100644 --- a/src/core/ext/xds/xds_client.h +++ b/src/core/ext/xds/xds_client.h @@ -201,6 +201,8 @@ class XdsClient : public DualRefCounted { } }; + struct AuthorityState; + struct XdsResourceName { std::string authority; XdsResourceKey key; @@ -244,6 +246,12 @@ class XdsClient : public DualRefCounted { absl::string_view server_uri() const { return server_.server_uri(); } private: + // Attempts to find a suitable Xds fallback server. Returns true if + // a connection to a suitable server had been established. + bool MaybeFallbackLocked(const std::string& authority, + XdsClient::AuthorityState& authority_state) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); + void SetHealthyLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); void Orphaned() override; void OnConnectivityFailure(absl::Status status); @@ -283,7 +291,7 @@ class XdsClient : public DualRefCounted { }; struct AuthorityState { - RefCountedPtr xds_channel; + std::vector> xds_channels; std::map> resource_map; }; @@ -339,10 +347,10 @@ class XdsClient : public DualRefCounted { XdsApi::ClusterLoadReportMap BuildLoadReportSnapshotLocked( const XdsBootstrap::XdsServer& xds_server, bool send_all_clusters, const std::set& clusters) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); - RefCountedPtr GetOrCreateXdsChannelLocked( const XdsBootstrap::XdsServer& server, const char* reason) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + bool HasUncachedResources(const AuthorityState& authority_state); std::unique_ptr bootstrap_; OrphanablePtr transport_factory_; diff --git a/src/core/ext/xds/xds_client_grpc.cc b/src/core/ext/xds/xds_client_grpc.cc index 169257da5f9..1d9a6b157d0 100644 --- a/src/core/ext/xds/xds_client_grpc.cc +++ b/src/core/ext/xds/xds_client_grpc.cc @@ -257,8 +257,8 @@ absl::StatusOr> GrpcXdsClient::GetOrCreate( MakeOrphanable(channel_args)); g_xds_client_map->emplace(xds_client->key(), xds_client.get()); if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { - gpr_log(GPR_INFO, "xDS client for key: %s was created", - std::string(key).c_str()); + gpr_log(GPR_INFO, "[xds_client %p] Created xDS client for key %s", + xds_client.get(), std::string(key).c_str()); } return xds_client; } diff --git a/test/core/xds/xds_client_test.cc b/test/core/xds/xds_client_test.cc index b6036e35e96..ed31e44d1b8 100644 --- a/test/core/xds/xds_client_test.cc +++ b/test/core/xds/xds_client_test.cc @@ -24,8 +24,10 @@ #include #include +#include #include #include +#include #include #include @@ -49,6 +51,7 @@ #include "src/core/ext/xds/xds_resource_type_impl.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/gprpp/debug_location.h" +#include "src/core/lib/gprpp/match.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" @@ -76,6 +79,8 @@ namespace grpc_core { namespace testing { namespace { +constexpr absl::string_view kDefaultXdsServerUrl = "default_xds_server"; + class XdsClientTest : public ::testing::Test { protected: // A fake bootstrap implementation that allows tests to populate the @@ -124,6 +129,11 @@ class XdsClientTest : public ::testing::Test { class FakeXdsServer : public XdsServer { public: + explicit FakeXdsServer( + absl::string_view server_uri = kDefaultXdsServerUrl, + bool ignore_resource_deletion = false) + : server_uri_(server_uri), + ignore_resource_deletion_(ignore_resource_deletion) {} const std::string& server_uri() const override { return server_uri_; } bool IgnoreResourceDeletion() const override { return ignore_resource_deletion_; @@ -137,15 +147,8 @@ class XdsClientTest : public ::testing::Test { return absl::StrCat(server_uri_, "#", ignore_resource_deletion_); } - void set_server_uri(std::string server_uri) { - server_uri_ = std::move(server_uri); - } - void set_ignore_resource_deletion(bool ignore_resource_deletion) { - ignore_resource_deletion_ = ignore_resource_deletion; - } - private: - std::string server_uri_ = "default_xds_server"; + std::string server_uri_; bool ignore_resource_deletion_ = false; }; @@ -170,7 +173,6 @@ class XdsClientTest : public ::testing::Test { class Builder { public: Builder() { node_.emplace(); } - Builder& set_node_id(std::string id) { if (!node_.has_value()) node_.emplace(); node_->set_id(std::move(id)); @@ -180,20 +182,20 @@ class XdsClientTest : public ::testing::Test { authorities_[std::move(name)] = std::move(authority); return *this; } - Builder& set_ignore_resource_deletion(bool ignore_resource_deletion) { - server_.set_ignore_resource_deletion(ignore_resource_deletion); + Builder& SetServers(absl::Span servers) { + servers_.assign(servers.begin(), servers.end()); return *this; } std::unique_ptr Build() { auto bootstrap = std::make_unique(); - bootstrap->server_ = std::move(server_); + bootstrap->servers_ = std::move(servers_); bootstrap->node_ = std::move(node_); bootstrap->authorities_ = std::move(authorities_); return bootstrap; } private: - FakeXdsServer server_; + std::vector servers_ = {FakeXdsServer()}; absl::optional node_; std::map authorities_; }; @@ -201,7 +203,12 @@ class XdsClientTest : public ::testing::Test { std::string ToString() const override { return ""; } std::vector servers() const override { - return {&server_}; + std::vector result; + result.reserve(servers_.size()); + for (size_t i = 0; i < servers_.size(); ++i) { + result.emplace_back(&servers_[i]); + } + return result; } const Node* node() const override { @@ -214,7 +221,7 @@ class XdsClientTest : public ::testing::Test { } private: - FakeXdsServer server_; + std::vector servers_; absl::optional node_; std::map authorities_; }; @@ -246,6 +253,24 @@ class XdsClientTest : public ::testing::Test { all_resources_required_in_sotw>, ResourceStruct>::WatcherInterface { public: + ~Watcher() override { + MutexLock lock(&mu_); + EXPECT_THAT(queue_, ::testing::IsEmpty()) + << this << " " + << Match( + queue_[0], + [&](const ResourceAndReadDelayHandle& resource) { + return absl::StrFormat("Resource %s", + resource.resource->name); + }, + [&](const absl::Status& status) { + return status.ToString(); + }, + [&](const DoesNotExist& /* tag */) -> std::string { + return ""; + }); + } + // Returns true if no event is received during the timeout period. bool ExpectNoEvent(absl::Duration timeout) { MutexLock lock(&mu_); @@ -859,7 +884,7 @@ TEST_F(XdsClientTest, BasicWatch) { EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre()); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); EXPECT_THAT(GetResourceCounts(), ::testing::ElementsAre(::testing::Pair( ResourceCountLabelsEq(XdsClient::kOldStyleAuthority, @@ -894,7 +919,7 @@ TEST_F(XdsClientTest, BasicWatch) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -906,7 +931,7 @@ TEST_F(XdsClientTest, BasicWatch) { XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -920,7 +945,7 @@ TEST_F(XdsClientTest, BasicWatch) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -961,7 +986,7 @@ TEST_F(XdsClientTest, UpdateFromServer) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -994,7 +1019,7 @@ TEST_F(XdsClientTest, UpdateFromServer) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1049,7 +1074,7 @@ TEST_F(XdsClientTest, MultipleWatchersForSameResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1096,7 +1121,7 @@ TEST_F(XdsClientTest, MultipleWatchersForSameResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1166,7 +1191,7 @@ TEST_F(XdsClientTest, SubscribeToMultipleResources) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1221,7 +1246,7 @@ TEST_F(XdsClientTest, SubscribeToMultipleResources) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1319,7 +1344,7 @@ TEST_F(XdsClientTest, UpdateContainsOnlyChangedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1352,7 +1377,7 @@ TEST_F(XdsClientTest, UpdateContainsOnlyChangedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 3))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1432,7 +1457,7 @@ TEST_F(XdsClientTest, ResourceValidationFailure) { ::testing::ElementsAre()); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(GetResourceCounts(), @@ -1483,12 +1508,12 @@ TEST_F(XdsClientTest, ResourceValidationFailure) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT( @@ -1652,12 +1677,12 @@ TEST_F(XdsClientTest, ResourceValidationFailureMultipleResources) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 5))); EXPECT_THAT( @@ -1747,7 +1772,7 @@ TEST_F(XdsClientTest, ResourceValidationFailureForCachedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1784,12 +1809,12 @@ TEST_F(XdsClientTest, ResourceValidationFailureForCachedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(GetResourceCounts(), @@ -1866,13 +1891,13 @@ TEST_F(XdsClientTest, WildcardCapableResponseWithEmptyResource) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT( metrics_reporter_->resource_updates_invalid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT( @@ -1936,7 +1961,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -1968,7 +1993,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2011,7 +2036,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2039,7 +2064,8 @@ TEST_F(XdsClientTest, ResourceDeletion) { // This tests that when we ignore resource deletions from the server // when configured to do so. TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { - InitXdsClient(FakeXdsBootstrap::Builder().set_ignore_resource_deletion(true)); + InitXdsClient(FakeXdsBootstrap::Builder().SetServers( + {FakeXdsBootstrap::FakeXdsServer(kDefaultXdsServerUrl, true)})); // Start a watch for "wc1". auto watcher = StartWildcardCapableWatch("wc1"); // Watcher should initially not see any resource reported. @@ -2071,7 +2097,7 @@ TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2104,7 +2130,7 @@ TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2150,7 +2176,7 @@ TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { EXPECT_THAT( metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsWildcardCapableResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2183,7 +2209,7 @@ TEST_F(XdsClientTest, StreamClosedByServer) { auto watcher = StartFooWatch("foo1"); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // Watcher should initially not see any resource reported. EXPECT_FALSE(watcher->HasEvent()); // XdsClient should have created an ADS stream. @@ -2224,7 +2250,7 @@ TEST_F(XdsClientTest, StreamClosedByServer) { EXPECT_TRUE(stream->Orphaned()); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should create a new stream. stream = WaitForAdsStream(); ASSERT_TRUE(stream != nullptr); @@ -2276,7 +2302,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { auto watcher = StartFooWatch("foo1"); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // Watcher should initially not see any resource reported. EXPECT_FALSE(watcher->HasEvent()); // XdsClient should have created an ADS stream. @@ -2294,7 +2320,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { stream->MaybeSendStatusToClient(absl::UnavailableError("ugh")); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", false))); + kDefaultXdsServerUrl, false))); // XdsClient should report an error to the watcher. auto error = watcher->WaitForNextError(); ASSERT_TRUE(error.has_value()); @@ -2317,7 +2343,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { CheckRequestNode(*request); // Should be present on the first request. // Connection still reported as unhappy until we get a response. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", false))); + kDefaultXdsServerUrl, false))); // Server now sends the requested resource. stream->SendMessageToClient( ResponseBuilder(XdsFooResourceType::Get()->type_url()) @@ -2332,7 +2358,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { EXPECT_EQ(resource->value, 6); // Connection now reported as happy. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient sends an ACK. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -2358,7 +2384,7 @@ TEST_F(XdsClientTest, ConnectionFails) { auto watcher = StartFooWatch("foo1"); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // Watcher should initially not see any resource reported. EXPECT_FALSE(watcher->HasEvent()); // XdsClient should have created an ADS stream. @@ -2385,7 +2411,7 @@ TEST_F(XdsClientTest, ConnectionFails) { << *error; // Connection reported as unhappy. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", false))); + kDefaultXdsServerUrl, false))); // We should not see a resource-does-not-exist event, because the // timer should not be running while the channel is disconnected. EXPECT_TRUE(watcher->ExpectNoEvent(absl::Seconds(4))); @@ -2413,7 +2439,7 @@ TEST_F(XdsClientTest, ConnectionFails) { .Serialize()); // Connection now reported as happy. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have delivered the response to the watchers. auto resource = watcher->WaitForNextResource(); ASSERT_NE(resource, nullptr); @@ -2502,7 +2528,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2623,7 +2649,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2767,7 +2793,7 @@ TEST_F(XdsClientTest, // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2850,7 +2876,7 @@ TEST_F(XdsClientTest, // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 3))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2916,7 +2942,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2957,7 +2983,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2980,7 +3006,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -2992,7 +3018,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -3038,7 +3064,7 @@ TEST_F(XdsClientTest, ResourceWrappedInResourceMessage) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3093,7 +3119,7 @@ TEST_F(XdsClientTest, MultipleResourceTypes) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3138,11 +3164,11 @@ TEST_F(XdsClientTest, MultipleResourceTypes) { EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre( ::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsBarResourceType::Get()->type_url()), 1), ::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3182,8 +3208,7 @@ TEST_F(XdsClientTest, Federation) { constexpr char kAuthority[] = "xds.example.com"; const std::string kXdstpResourceName = absl::StrCat( "xdstp://", kAuthority, "/", XdsFooResource::TypeUrl(), "/foo2"); - FakeXdsBootstrap::FakeXdsServer authority_server; - authority_server.set_server_uri("other_xds_server"); + FakeXdsBootstrap::FakeXdsServer authority_server("other_xds_server"); FakeXdsBootstrap::FakeAuthority authority; authority.set_server(authority_server); InitXdsClient( @@ -3225,7 +3250,7 @@ TEST_F(XdsClientTest, Federation) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3237,7 +3262,7 @@ TEST_F(XdsClientTest, Federation) { XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -3263,7 +3288,7 @@ TEST_F(XdsClientTest, Federation) { 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre( - ::testing::Pair("default_xds_server", true), + ::testing::Pair(kDefaultXdsServerUrl, true), ::testing::Pair(authority_server.server_uri(), true))); // XdsClient will create a new stream to the server for this authority. auto stream2 = WaitForAdsStream(authority_server); @@ -3294,7 +3319,7 @@ TEST_F(XdsClientTest, Federation) { EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre( ::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1), ::testing::Pair( @@ -3316,7 +3341,7 @@ TEST_F(XdsClientTest, Federation) { 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre( - ::testing::Pair("default_xds_server", true), + ::testing::Pair(kDefaultXdsServerUrl, true), ::testing::Pair(authority_server.server_uri(), true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream2.get()); @@ -3371,7 +3396,7 @@ TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3383,7 +3408,7 @@ TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -3419,7 +3444,7 @@ TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 2))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3436,7 +3461,7 @@ TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { kAuthority, XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -3542,8 +3567,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { constexpr char kAuthority[] = "xds.example.com"; const std::string kXdstpResourceName = absl::StrCat( "xdstp://", kAuthority, "/", XdsFooResource::TypeUrl(), "/foo2"); - FakeXdsBootstrap::FakeXdsServer authority_server; - authority_server.set_server_uri("other_xds_server"); + FakeXdsBootstrap::FakeXdsServer authority_server("other_xds_server"); FakeXdsBootstrap::FakeAuthority authority; authority.set_server(authority_server); InitXdsClient( @@ -3578,7 +3602,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { // Check metric data. EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre(::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1))); EXPECT_THAT(metrics_reporter_->resource_updates_invalid(), @@ -3590,7 +3614,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { XdsFooResourceType::Get()->type_url(), "acked"), 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( - "default_xds_server", true))); + kDefaultXdsServerUrl, true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream.get()); ASSERT_TRUE(request.has_value()); @@ -3603,7 +3627,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre( - ::testing::Pair("default_xds_server", true), + ::testing::Pair(kDefaultXdsServerUrl, true), ::testing::Pair(authority_server.server_uri(), true))); // Watcher should initially not see any resource reported. EXPECT_FALSE(watcher2->HasEvent()); @@ -3636,7 +3660,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { EXPECT_THAT(metrics_reporter_->resource_updates_valid(), ::testing::ElementsAre( ::testing::Pair( - ::testing::Pair("default_xds_server", + ::testing::Pair(kDefaultXdsServerUrl, XdsFooResourceType::Get()->type_url()), 1), ::testing::Pair( @@ -3658,7 +3682,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { 1))); EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre( - ::testing::Pair("default_xds_server", true), + ::testing::Pair(kDefaultXdsServerUrl, true), ::testing::Pair(authority_server.server_uri(), true))); // XdsClient should have sent an ACK message to the xDS server. request = WaitForRequest(stream2.get()); @@ -3683,7 +3707,7 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre( - ::testing::Pair("default_xds_server", true), + ::testing::Pair(kDefaultXdsServerUrl, true), ::testing::Pair(authority_server.server_uri(), false))); // Cancel watch for "foo1". CancelFooWatch(watcher.get(), "foo1"); @@ -3779,6 +3803,354 @@ TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { EXPECT_TRUE(stream->Orphaned()); } +TEST_F(XdsClientTest, FallbackAndRecover) { + FakeXdsBootstrap::FakeXdsServer primary_server(kDefaultXdsServerUrl); + FakeXdsBootstrap::FakeXdsServer fallback_server("fallback_xds_server"); + // Regular operation + InitXdsClient(FakeXdsBootstrap::Builder().SetServers( + {primary_server, fallback_server})); + // Start a watch for "foo1". + auto watcher = StartFooWatch("foo1"); + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, true))); + EXPECT_THAT(GetResourceCounts(), + ::testing::ElementsAre(::testing::Pair( + ResourceCountLabelsEq(XdsClient::kOldStyleAuthority, + XdsFooResourceType::Get()->type_url(), + "requested"), + 1))); + EXPECT_THAT(metrics_reporter_->resource_updates_valid(), + ::testing::IsEmpty()); + // XdsClient should have created an ADS stream. + auto stream = WaitForAdsStream(); + ASSERT_TRUE(stream != nullptr); + // XdsClient should have sent a subscription request on the ADS stream. + auto request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + // Input: Get initial response from primary server. + stream->SendMessageToClient( + ResponseBuilder(XdsFooResourceType::Get()->type_url()) + .set_version_info("20") + .set_nonce("O") + .AddFooResource(XdsFooResource("foo1", 6)) + .Serialize()); + // Result (local): Resource is delivered to watcher. + auto resource = watcher->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 6); + // Result (local): Metrics show 1 resource update and 1 cached resource. + EXPECT_THAT(metrics_reporter_->resource_updates_valid(), + ::testing::ElementsAre(::testing::Pair( + ::testing::Pair(kDefaultXdsServerUrl, + XdsFooResourceType::Get()->type_url()), + 1))); + EXPECT_THAT( + GetResourceCounts(), + ::testing::ElementsAre(::testing::Pair( + ResourceCountLabelsEq(XdsClient::kOldStyleAuthority, + XdsFooResourceType::Get()->type_url(), "acked"), + 1))); + // Result (remote): Client sends ACK to server. + request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"20", /*response_nonce=*/"O", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + // Input: Trigger connection failure to primary. + TriggerConnectionFailure(primary_server, + absl::UnavailableError("Server down")); + // Result (local): The error is reported to the watcher. + auto error = watcher->WaitForNextError(); + ASSERT_TRUE(error.has_value()); + EXPECT_EQ(error->code(), absl::StatusCode::kUnavailable); + EXPECT_EQ(error->message(), + "xDS channel for server default_xds_server: Server down (node " + "ID:xds_client_test)"); + // Result (local): The metrics show the channel as being unhealthy. + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, false))); + // Input: Trigger stream failure. + stream->MaybeSendStatusToClient(absl::UnavailableError("Stream failure")); + // Result (local): The metrics still show the channel as being unhealthy. + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, false))); + // Result (remote): The client starts a new stream and sends a subscription + // message. Note that the server does not respond, so the channel will still + // have non-OK status. + stream = WaitForAdsStream(); + ASSERT_NE(stream, nullptr); + request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"20", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + // Input: Start second watch for foo1 (already cached). + auto watcher_cached = StartFooWatch("foo1"); + // Result (local): New watcher gets the cached resource. + resource = watcher_cached->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 6); + // Result (local): New watcher gets the error from the channel state. + error = watcher_cached->WaitForNextError(); + ASSERT_TRUE(error.has_value()); + EXPECT_EQ(error->message(), + "xDS channel for server default_xds_server: Server down (node " + "ID:xds_client_test)") + << error->message(); + CancelFooWatch(watcher_cached.get(), "foo1"); + // Input: Start watch for foo2 (not already cached). + auto watcher2 = StartFooWatch("foo2"); + // Result (local): Metrics show a healthy channel to the fallback server. + EXPECT_THAT(GetServerConnections(), + ::testing::ElementsAre( + ::testing::Pair(kDefaultXdsServerUrl, false), + ::testing::Pair(fallback_server.server_uri(), true))); + // Result (remote): Client sent a new request for both resources on the + // stream to the primary. + request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"20", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1", "foo2"}); + // Result (remote): Client created a stream to the fallback server and sent a + // request on that stream for both resources. + auto stream2 = WaitForAdsStream(fallback_server); + ASSERT_TRUE(stream2 != nullptr); + request = WaitForRequest(stream2.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1", "foo2"}); + // Input: Fallback server sends a response with both resources. + stream2->SendMessageToClient( + ResponseBuilder(XdsFooResourceType::Get()->type_url()) + .set_version_info("5") + .set_nonce("A") + .AddFooResource(XdsFooResource("foo1", 20)) + .AddFooResource(XdsFooResource("foo2", 30)) + .Serialize()); + // Result (local): Resources are delivered to watchers. + resource = watcher->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 20); + resource = watcher2->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo2"); + EXPECT_EQ(resource->value, 30); + // Result (local): Metrics show an update from fallback server. + EXPECT_THAT(metrics_reporter_->resource_updates_valid(), + ::testing::ElementsAre( + ::testing::Pair( + ::testing::Pair(kDefaultXdsServerUrl, + XdsFooResourceType::Get()->type_url()), + 1), + ::testing::Pair( + ::testing::Pair(fallback_server.server_uri(), + XdsFooResourceType::Get()->type_url()), + 2))); + EXPECT_THAT(GetServerConnections(), + ::testing::ElementsAre( + ::testing::Pair(kDefaultXdsServerUrl, false), + ::testing::Pair(fallback_server.server_uri(), true))); + EXPECT_THAT( + GetResourceCounts(), + ::testing::ElementsAre(::testing::Pair( + ResourceCountLabelsEq(XdsClient::kOldStyleAuthority, + XdsFooResourceType::Get()->type_url(), "acked"), + 2))); + // Result (remote): Client sends ACK to fallback server. + request = WaitForRequest(stream2.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"5", /*response_nonce=*/"A", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1", "foo2"}); + // Input: Primary server sends a response containing both resources. + stream->SendMessageToClient( + ResponseBuilder(XdsFooResourceType::Get()->type_url()) + .set_version_info("15") + .set_nonce("B") + .AddFooResource(XdsFooResource("foo1", 35)) + .AddFooResource(XdsFooResource("foo2", 25)) + .Serialize()); + // Result (local): Metrics show that we've closed the channel to the fallback + // server and received resource updates from the primary server. + EXPECT_THAT(metrics_reporter_->resource_updates_valid(), + ::testing::ElementsAre( + ::testing::Pair( + ::testing::Pair(kDefaultXdsServerUrl, + XdsFooResourceType::Get()->type_url()), + 3), + ::testing::Pair( + ::testing::Pair(fallback_server.server_uri(), + XdsFooResourceType::Get()->type_url()), + 2))); + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, true))); + // Result (remote): The stream to the fallback server has been orphaned. + EXPECT_TRUE(stream2->Orphaned()); + // Result (local): Resources are delivered to watchers. + resource = watcher->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 35); + resource = watcher2->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo2"); + EXPECT_EQ(resource->value, 25); + // Result (remote): Client sends ACK to server. + request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"15", /*response_nonce=*/"B", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1", "foo2"}); + // Clean up. + CancelFooWatch(watcher.get(), "foo1", /*delay_unsubscription=*/true); + CancelFooWatch(watcher2.get(), "foo2"); + // Result (remote): The stream to the primary server has been orphaned. + EXPECT_TRUE(stream->Orphaned()); +} + +// Test for both servers being unavailable +TEST_F(XdsClientTest, FallbackReportsError) { + FakeXdsBootstrap::FakeXdsServer primary_server(kDefaultXdsServerUrl); + FakeXdsBootstrap::FakeXdsServer fallback_server("fallback_xds_server"); + InitXdsClient(FakeXdsBootstrap::Builder().SetServers( + {primary_server, fallback_server})); + auto watcher = StartFooWatch("foo1"); + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, true))); + auto stream = WaitForAdsStream(); + ASSERT_TRUE(stream != nullptr); + // XdsClient should have sent a subscription request on the ADS stream. + auto request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + EXPECT_THAT(GetResourceCounts(), + ::testing::ElementsAre(::testing::Pair( + ResourceCountLabelsEq(XdsClient::kOldStyleAuthority, + XdsFooResourceType::Get()->type_url(), + "requested"), + 1))); + TriggerConnectionFailure(primary_server, + absl::UnavailableError("Server down")); + EXPECT_THAT(GetServerConnections(), + ::testing::ElementsAre( + ::testing::Pair(kDefaultXdsServerUrl, false), + ::testing::Pair(fallback_server.server_uri(), true))); + // Fallback happens now + stream = WaitForAdsStream(fallback_server); + ASSERT_NE(stream, nullptr); + request = WaitForRequest(stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + TriggerConnectionFailure(fallback_server, + absl::UnavailableError("Another server down")); + EXPECT_THAT(GetServerConnections(), + ::testing::ElementsAre( + ::testing::Pair(kDefaultXdsServerUrl, false), + ::testing::Pair(fallback_server.server_uri(), false))); + auto error = watcher->WaitForNextError(); + ASSERT_TRUE(error.has_value()); + EXPECT_THAT(error->code(), absl::StatusCode::kUnavailable); + EXPECT_EQ(error->message(), + "xDS channel for server fallback_xds_server: Another server down " + "(node ID:xds_client_test)") + << error->message(); +} + +TEST_F(XdsClientTest, FallbackOnStartup) { + FakeXdsBootstrap::FakeXdsServer primary_server; + FakeXdsBootstrap::FakeXdsServer fallback_server("fallback_xds_server"); + // Regular operation + InitXdsClient(FakeXdsBootstrap::Builder().SetServers( + {primary_server, fallback_server})); + // Start a watch for "foo1". + auto watcher = StartFooWatch("foo1"); + auto primary_stream = WaitForAdsStream(primary_server); + ASSERT_NE(primary_stream, nullptr); + // XdsClient should have sent a subscription request on the ADS stream. + auto request = WaitForRequest(primary_stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + TriggerConnectionFailure(primary_server, + absl::UnavailableError("Primary server is down")); + // XdsClient should have created an ADS stream. + auto fallback_stream = WaitForAdsStream(fallback_server); + ASSERT_NE(fallback_stream, nullptr); + // XdsClient should have sent a subscription request on the ADS stream. + request = WaitForRequest(fallback_stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"", /*response_nonce=*/"", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + // Send a response. + fallback_stream->SendMessageToClient( + ResponseBuilder(XdsFooResourceType::Get()->type_url()) + .set_version_info("1") + .set_nonce("A") + .AddFooResource(XdsFooResource("foo1", 6)) + .Serialize()); + EXPECT_THAT(GetServerConnections(), + ::testing::ElementsAre( + ::testing::Pair(kDefaultXdsServerUrl, false), + ::testing::Pair(fallback_server.server_uri(), true))); + // XdsClient should have delivered the response to the watcher. + auto resource = watcher->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 6); + // Client sends an ACK. + request = WaitForRequest(fallback_stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"1", /*response_nonce=*/"A", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); + // Recover to primary + primary_stream->SendMessageToClient( + ResponseBuilder(XdsFooResourceType::Get()->type_url()) + .set_version_info("5") + .set_nonce("D") + .AddFooResource(XdsFooResource("foo1", 42)) + .Serialize()); + EXPECT_TRUE(fallback_stream->Orphaned()); + resource = watcher->WaitForNextResource(); + ASSERT_NE(resource, nullptr); + EXPECT_EQ(resource->name, "foo1"); + EXPECT_EQ(resource->value, 42); + EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( + kDefaultXdsServerUrl, true))); + request = WaitForRequest(primary_stream.get()); + ASSERT_TRUE(request.has_value()); + CheckRequest(*request, XdsFooResourceType::Get()->type_url(), + /*version_info=*/"5", /*response_nonce=*/"D", + /*error_detail=*/absl::OkStatus(), + /*resource_names=*/{"foo1"}); +} + } // namespace } // namespace testing } // namespace grpc_core diff --git a/test/core/xds/xds_transport_fake.cc b/test/core/xds/xds_transport_fake.cc index 734c622889d..4fe426bb6b6 100644 --- a/test/core/xds/xds_transport_fake.cc +++ b/test/core/xds/xds_transport_fake.cc @@ -48,7 +48,8 @@ FakeXdsTransportFactory::FakeStreamingCall::~FakeStreamingCall() { MutexLock lock(&mu_); if (transport_->abort_on_undrained_messages()) { for (const auto& message : from_client_messages_) { - gpr_log(GPR_ERROR, "From client message left in queue: %s", + gpr_log(GPR_ERROR, "[%s] %p From client message left in queue: %s", + transport_->server()->server_uri().c_str(), this, message.c_str()); } GPR_ASSERT(from_client_messages_.empty()); diff --git a/test/core/xds/xds_transport_fake.h b/test/core/xds/xds_transport_fake.h index 7628df6b897..b9cf7dc4ee6 100644 --- a/test/core/xds/xds_transport_fake.h +++ b/test/core/xds/xds_transport_fake.h @@ -214,6 +214,8 @@ class FakeXdsTransportFactory : public XdsTransportFactory { FakeXdsTransportFactory* factory() const { return factory_.get(); } + const XdsBootstrap::XdsServer* server() const { return &server_; } + private: class RefCountedOnConnectivityFailure : public RefCounted { diff --git a/test/cpp/end2end/xds/BUILD b/test/cpp/end2end/xds/BUILD index 1851b075015..90d11c03b98 100644 --- a/test/cpp/end2end/xds/BUILD +++ b/test/cpp/end2end/xds/BUILD @@ -494,3 +494,24 @@ grpc_cc_test( "//test/cpp/end2end:connection_attempt_injector", ], ) + +grpc_cc_test( + name = "xds_fallback_end2end_test", + srcs = ["xds_fallback_end2end_test.cc"], + external_deps = [ + "gtest", + ], + linkstatic = True, # Fixes dyld error on MacOS + tags = [ + "no_test_ios", + "no_windows", + "xds_end2end_test", + ], # TODO(jtattermusch): fix test on windows + deps = [ + ":xds_end2end_test_lib", + "//:gpr", + "//:grpc", + "//:grpc++", + "//test/core/util:scoped_env_var", + ], +) diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.cc b/test/cpp/end2end/xds/xds_end2end_test_lib.cc index db2c5a48f4a..eaa222d9da7 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.cc +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.cc @@ -286,10 +286,11 @@ void XdsEnd2endTest::BackendServerThread::ShutdownAllServices() { // XdsEnd2endTest::BalancerServerThread::BalancerServerThread( - XdsEnd2endTest* test_obj) + XdsEnd2endTest* test_obj, absl::string_view debug_label) : ServerThread(test_obj, /*use_xds_enabled_server=*/false), ads_service_(new AdsServiceImpl( - // First request must have node set with the right client features. + // First request must have node set with the right client + // features. [&](const DiscoveryRequest& request) { EXPECT_TRUE(request.has_node()); EXPECT_THAT(request.node().client_features(), @@ -300,7 +301,8 @@ XdsEnd2endTest::BalancerServerThread::BalancerServerThread( // NACKs must use the right status code. [&](absl::StatusCode code) { EXPECT_EQ(code, absl::StatusCode::kInvalidArgument); - })), + }, + debug_label)), lrs_service_(new LrsServiceImpl( (GetParam().enable_load_reporting() ? 20 : 0), {kDefaultClusterName}, // Fail if load reporting is used when not enabled. @@ -311,7 +313,8 @@ XdsEnd2endTest::BalancerServerThread::BalancerServerThread( EXPECT_THAT( request.node().client_features(), ::testing::Contains("envoy.lrs.supports_send_all_clusters")); - })) {} + }, + debug_label)) {} void XdsEnd2endTest::BalancerServerThread::RegisterAllServices( ServerBuilder* builder) { @@ -377,7 +380,8 @@ const char XdsEnd2endTest::kServerKeyPath[] = const char XdsEnd2endTest::kRequestMessage[] = "Live long and prosper."; -XdsEnd2endTest::XdsEnd2endTest() : balancer_(CreateAndStartBalancer()) { +XdsEnd2endTest::XdsEnd2endTest() + : balancer_(CreateAndStartBalancer("Default Balancer")) { // Initialize default client-side xDS resources. default_listener_ = XdsResourceUtils::DefaultListener(); default_route_config_ = XdsResourceUtils::DefaultRouteConfig(); @@ -409,9 +413,9 @@ void XdsEnd2endTest::TearDown() { } std::unique_ptr -XdsEnd2endTest::CreateAndStartBalancer() { +XdsEnd2endTest::CreateAndStartBalancer(absl::string_view debug_label) { std::unique_ptr balancer = - std::make_unique(this); + std::make_unique(this, debug_label); balancer->Start(); return balancer; } diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.h b/test/cpp/end2end/xds/xds_end2end_test_lib.h index feff26b608a..c80a37ee739 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.h +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.h @@ -239,7 +239,11 @@ class XdsEnd2endTest : public ::testing::TestWithParam, port_(grpc_pick_unused_port_or_die()), use_xds_enabled_server_(use_xds_enabled_server) {} - virtual ~ServerThread() { Shutdown(); } + virtual ~ServerThread() { + // Shutdown should be called manually. Shutdown calls virtual methods and + // can't be called from the base class destructor. + GPR_ASSERT(!running_); + } void Start(); void Shutdown(); @@ -249,6 +253,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam, grpc_fake_transport_security_server_credentials_create()); } + std::string target() const { return absl::StrCat("localhost:", port_); } + int port() const { return port_; } bool use_xds_enabled_server() const { return use_xds_enabled_server_; } @@ -398,7 +404,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // A server thread for the xDS server. class BalancerServerThread : public ServerThread { public: - explicit BalancerServerThread(XdsEnd2endTest* test_obj); + explicit BalancerServerThread(XdsEnd2endTest* test_obj, + absl::string_view debug_label); AdsServiceImpl* ads_service() { return ads_service_.get(); } LrsServiceImpl* lrs_service() { return lrs_service_.get(); } @@ -439,7 +446,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // Creates and starts a new balancer, running in its own thread. // Most tests will not need to call this; instead, they can use // balancer_, which is already populated with default resources. - std::unique_ptr CreateAndStartBalancer(); + std::unique_ptr CreateAndStartBalancer( + absl::string_view debug_label = ""); // Sets the Listener and RouteConfiguration resource on the specified // balancer. If RDS is in use, they will be set as separate resources; diff --git a/test/cpp/end2end/xds/xds_fallback_end2end_test.cc b/test/cpp/end2end/xds/xds_fallback_end2end_test.cc new file mode 100644 index 00000000000..9f933f3804f --- /dev/null +++ b/test/cpp/end2end/xds/xds_fallback_end2end_test.cc @@ -0,0 +1,311 @@ +// Copyright 2017 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 +#include +#include + +#include +#include + +#include "absl/cleanup/cleanup.h" +#include "absl/strings/str_format.h" +#include "absl/strings/strip.h" + +#include +#include +#include + +#include "src/core/client_channel/backup_poller.h" +#include "src/core/lib/config/config_vars.h" +#include "src/core/lib/gprpp/env.h" +#include "src/cpp/client/secure_credentials.h" +#include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "src/proto/grpc/testing/echo_messages.pb.h" +#include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" +#include "src/proto/grpc/testing/xds/v3/endpoint.grpc.pb.h" +#include "src/proto/grpc/testing/xds/v3/http_connection_manager.grpc.pb.h" +#include "src/proto/grpc/testing/xds/v3/listener.grpc.pb.h" +#include "src/proto/grpc/testing/xds/v3/route.grpc.pb.h" +#include "test/core/util/resolve_localhost_ip46.h" +#include "test/core/util/scoped_env_var.h" +#include "test/core/util/test_config.h" +#include "test/cpp/end2end/xds/xds_end2end_test_lib.h" +#include "test/cpp/end2end/xds/xds_utils.h" + +namespace grpc { +namespace testing { +namespace { + +constexpr char const* kErrorMessage = "test forced ADS stream failure"; + +class XdsFallbackTest : public XdsEnd2endTest { + public: + XdsFallbackTest() + : fallback_balancer_(CreateAndStartBalancer("Fallback Balancer")) {} + + void SetUp() override { + // Overrides SetUp from a base class so we can call InitClient per-test case + } + + void TearDown() override { + fallback_balancer_->Shutdown(); + XdsEnd2endTest::TearDown(); + } + + void SetXdsResourcesForServer(BalancerServerThread* balancer, size_t backend, + absl::string_view server_name = "", + absl::string_view authority = "") { + Listener listener = default_listener_; + RouteConfiguration route_config = default_route_config_; + Cluster cluster = default_cluster_; + // Default server uses default resources when no authority, to enable using + // more test framework functions. + if (!server_name.empty() || !authority.empty()) { + auto get_resource_name = [&](absl::string_view resource_type) { + absl::string_view stripped_resource_type = + absl::StripPrefix(resource_type, "type.googleapis.com/"); + if (authority.empty()) { + if (resource_type == kLdsTypeUrl) return std::string(server_name); + return absl::StrFormat("%s_%s", stripped_resource_type, server_name); + } + return absl::StrFormat("xdstp://%s/%s/%s", authority, + stripped_resource_type, server_name); + }; + listener.set_name(get_resource_name(kLdsTypeUrl)); + cluster.set_name(get_resource_name(kCdsTypeUrl)); + cluster.mutable_eds_cluster_config()->set_service_name( + get_resource_name(kEdsTypeUrl)); + route_config.set_name(get_resource_name(kRdsTypeUrl)); + route_config.mutable_virtual_hosts(0) + ->mutable_routes(0) + ->mutable_route() + ->set_cluster(cluster.name()); + } + SetListenerAndRouteConfiguration(balancer, listener, route_config); + balancer->ads_service()->SetCdsResource(cluster); + balancer->ads_service()->SetEdsResource(BuildEdsResource( + EdsResourceArgs( + {{"locality0", CreateEndpointsForBackends(backend, backend + 1)}}), + cluster.eds_cluster_config().service_name())); + } + + void ExpectBackendCall(EchoTestService::Stub* stub, int backend, + grpc_core::DebugLocation location) { + ClientContext context; + EchoRequest request; + EchoResponse response; + RpcOptions().SetupRpc(&context, &request); + Status status = stub->Echo(&context, request, &response); + EXPECT_TRUE(status.ok()) << "code=" << status.error_code() + << " message=" << status.error_message() << "\n" + << location.file() << ':' << location.line(); + EXPECT_EQ(1U, backends_[backend]->backend_service()->request_count()) + << "\n" + << location.file() << ':' << location.line(); + } + + protected: + std::unique_ptr fallback_balancer_; +}; + +TEST_P(XdsFallbackTest, FallbackAndRecover) { + grpc_core::testing::ScopedEnvVar fallback_enabled( + "GRPC_EXPERIMENTAL_XDS_FALLBACK", "1"); + auto broken_balancer = CreateAndStartBalancer("Broken balancer"); + broken_balancer->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + InitClient(XdsBootstrapBuilder().SetServers({ + balancer_->target(), + broken_balancer->target(), + fallback_balancer_->target(), + })); + // Primary xDS server has backends_[0] configured and fallback server has + // backends_[1] + CreateAndStartBackends(2); + SetXdsResourcesForServer(balancer_.get(), 0); + SetXdsResourcesForServer(fallback_balancer_.get(), 1); + balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + // Primary server down, fallback server data is used (backends_[1]) + CheckRpcSendOk(DEBUG_LOCATION); + EXPECT_EQ(backends_[0]->backend_service()->request_count(), 0); + EXPECT_EQ(backends_[1]->backend_service()->request_count(), 1); + // Primary server is back. backends_[0] will be used when the data makes it + // all way to the client + balancer_->ads_service()->ClearADSFailure(); + WaitForBackend(DEBUG_LOCATION, 0); + broken_balancer->Shutdown(); +} + +TEST_P(XdsFallbackTest, EnvVarNotSet) { + InitClient(XdsBootstrapBuilder().SetServers({ + balancer_->target(), + fallback_balancer_->target(), + })); + // Primary xDS server has backends_[0] configured and fallback server has + // backends_[1] + CreateAndStartBackends(2); + SetXdsResourcesForServer(balancer_.get(), 0); + SetXdsResourcesForServer(fallback_balancer_.get(), 1); + balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + // Primary server down, failure should be reported + CheckRpcSendFailure( + DEBUG_LOCATION, StatusCode::UNAVAILABLE, + absl::StrFormat("server.example.com: UNAVAILABLE: xDS channel for server " + "localhost:%d: xDS call failed with no responses " + "received; status: RESOURCE_EXHAUSTED: test forced ADS " + "stream failure \\(node ID:xds_end2end_test\\)", + balancer_->port())); +} + +TEST_P(XdsFallbackTest, PrimarySecondaryNotAvailable) { + grpc_core::testing::ScopedEnvVar fallback_enabled( + "GRPC_EXPERIMENTAL_XDS_FALLBACK", "1"); + InitClient(XdsBootstrapBuilder().SetServers( + {balancer_->target(), fallback_balancer_->target()})); + balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + fallback_balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + CheckRpcSendFailure( + DEBUG_LOCATION, StatusCode::UNAVAILABLE, + absl::StrFormat( + "server.example.com: UNAVAILABLE: xDS channel for server " + "localhost:%d: xDS call failed with no responses received; " + "status: RESOURCE_EXHAUSTED: test forced ADS stream failure \\(node " + "ID:xds_end2end_test\\)", + fallback_balancer_->port())); +} + +TEST_P(XdsFallbackTest, UsesCachedResourcesAfterFailure) { + constexpr absl::string_view kServerName2 = "server2.example.com"; + grpc_core::testing::ScopedEnvVar fallback_enabled( + "GRPC_EXPERIMENTAL_XDS_FALLBACK", "1"); + InitClient(XdsBootstrapBuilder().SetServers( + {balancer_->target(), fallback_balancer_->target()})); + // 4 backends - cross product of two data plane targets and two balancers + CreateAndStartBackends(4); + SetXdsResourcesForServer(balancer_.get(), 0); + SetXdsResourcesForServer(fallback_balancer_.get(), 1); + SetXdsResourcesForServer(balancer_.get(), 2, kServerName2); + SetXdsResourcesForServer(fallback_balancer_.get(), 3, kServerName2); + CheckRpcSendOk(DEBUG_LOCATION); + EXPECT_EQ(backends_[0]->backend_service()->request_count(), 1); + balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + auto channel = CreateChannel(0, std::string(kServerName2).c_str()); + auto stub = grpc::testing::EchoTestService::NewStub(channel); + // server2.example.com is configured from the fallback server + ExpectBackendCall(stub.get(), 3, DEBUG_LOCATION); + // Calling server.example.com still uses cached value + CheckRpcSendOk(DEBUG_LOCATION); + EXPECT_EQ(backends_[0]->backend_service()->request_count(), 2); + EXPECT_EQ(backends_[1]->backend_service()->request_count(), 0); +} + +TEST_P(XdsFallbackTest, PerAuthorityFallback) { + auto fallback_balancer2 = CreateAndStartBalancer("Fallback for Authority2"); + // Use cleanup in case test assertion fails + auto balancer2_cleanup = + absl::MakeCleanup([&]() { fallback_balancer2->Shutdown(); }); + grpc_core::testing::ScopedEnvVar fallback_enabled( + "GRPC_EXPERIMENTAL_XDS_FALLBACK", "1"); + grpc_core::testing::ScopedExperimentalEnvVar env_var( + "GRPC_EXPERIMENTAL_XDS_FEDERATION"); + const char* kAuthority1 = "xds1.example.com"; + const char* kAuthority2 = "xds2.example.com"; + constexpr absl::string_view kServer1Name = "server1.example.com"; + constexpr absl::string_view kServer2Name = "server2.example.com"; + // Authority1 uses balancer_ and fallback_balancer_ + // Authority2 uses balancer_ and fallback_balancer2 + XdsBootstrapBuilder builder; + builder.SetServers({balancer_->target()}); + builder.AddAuthority(kAuthority1, + {balancer_->target(), fallback_balancer_->target()}); + builder.AddAuthority(kAuthority2, + {balancer_->target(), fallback_balancer2->target()}); + InitClient(builder); + CreateAndStartBackends(4); + SetXdsResourcesForServer(fallback_balancer_.get(), 0, kServer1Name, + kAuthority1); + SetXdsResourcesForServer(fallback_balancer2.get(), 1, kServer2Name, + kAuthority2); + SetXdsResourcesForServer(balancer_.get(), 2, kServer1Name, kAuthority1); + SetXdsResourcesForServer(balancer_.get(), 3, kServer2Name, kAuthority2); + // Primary balancer is down, using the fallback servers + balancer_->ads_service()->ForceADSFailure( + Status(StatusCode::RESOURCE_EXHAUSTED, kErrorMessage)); + // Create second channel to new target URI and send 1 RPC. + auto authority1_stub = grpc::testing::EchoTestService::NewStub(CreateChannel( + /*failover_timeout_ms=*/0, std::string(kServer1Name).c_str(), + kAuthority1)); + auto authority2_stub = grpc::testing::EchoTestService::NewStub(CreateChannel( + /*failover_timeout_ms=*/0, std::string(kServer2Name).c_str(), + kAuthority2)); + ExpectBackendCall(authority1_stub.get(), 0, DEBUG_LOCATION); + ExpectBackendCall(authority2_stub.get(), 1, DEBUG_LOCATION); + // Primary balancer is up, its data will be used now. + balancer_->ads_service()->ClearADSFailure(); + auto deadline = + absl::Now() + (absl::Seconds(5) * grpc_test_slowdown_factor()); + while (absl::Now() < deadline && + (backends_[2]->backend_service()->request_count() == 0 || + backends_[3]->backend_service()->request_count() == 0)) { + ClientContext context; + EchoRequest request; + EchoResponse response; + RpcOptions().SetupRpc(&context, &request); + Status status = authority1_stub->Echo(&context, request, &response); + EXPECT_TRUE(status.ok()) << status.error_message(); + ClientContext context2; + EchoRequest request2; + EchoResponse response2; + RpcOptions().SetupRpc(&context2, &request2); + status = authority2_stub->Echo(&context2, request2, &response2); + EXPECT_TRUE(status.ok()) << status.error_message(); + } + ASSERT_LE(1U, backends_[2]->backend_service()->request_count()); + ASSERT_LE(1U, backends_[3]->backend_service()->request_count()); +} + +INSTANTIATE_TEST_SUITE_P(XdsTest, XdsFallbackTest, + ::testing::Values(XdsTestType().set_bootstrap_source( + XdsTestType::kBootstrapFromEnvVar)), + &XdsTestType::Name); + +} // namespace +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(&argc, argv); + ::testing::InitGoogleTest(&argc, argv); + // Make the backup poller poll very frequently in order to pick up + // updates from all the subchannels's FDs. + grpc_core::ConfigVars::Overrides overrides; + overrides.client_channel_backup_poll_interval_ms = 1; + grpc_core::ConfigVars::SetOverrides(overrides); +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + grpc_core::SetEnv("grpc_cfstream", "0"); +#endif + grpc_init(); + const auto result = RUN_ALL_TESTS(); + grpc_shutdown(); + return result; +} diff --git a/test/cpp/end2end/xds/xds_server.cc b/test/cpp/end2end/xds/xds_server.cc index b4a657cb297..ef5c92beb47 100644 --- a/test/cpp/end2end/xds/xds_server.cc +++ b/test/cpp/end2end/xds/xds_server.cc @@ -51,8 +51,8 @@ void AdsServiceImpl::SetResource(google::protobuf::Any resource, resource_type_state.resource_type_version; resource_state.resource = std::move(resource); gpr_log(GPR_INFO, - "ADS[%p]: Updating %s resource %s; resource_type_version now %u", - this, type_url.c_str(), name.c_str(), + "ADS[%s]: Updating %s resource %s; resource_type_version now %u", + debug_label_.c_str(), type_url.c_str(), name.c_str(), resource_type_state.resource_type_version); for (SubscriptionState* subscription : resource_state.subscriptions) { subscription->update_queue->emplace_back(type_url, name); @@ -69,8 +69,8 @@ void AdsServiceImpl::UnsetResource(const std::string& type_url, resource_type_state.resource_type_version; resource_state.resource.reset(); gpr_log(GPR_INFO, - "ADS[%p]: Unsetting %s resource %s; resource_type_version now %u", - this, type_url.c_str(), name.c_str(), + "ADS[%s]: Unsetting %s resource %s; resource_type_version now %u", + debug_label_.c_str(), type_url.c_str(), name.c_str(), resource_type_state.resource_type_version); for (SubscriptionState* subscription : resource_state.subscriptions) { subscription->update_queue->emplace_back(type_url, name); @@ -100,8 +100,8 @@ bool AdsServiceImpl::MaybeSubscribe(const std::string& resource_type, if (subscription_state->update_queue != nullptr) return false; subscription_state->update_queue = update_queue; resource_state->subscriptions.emplace(subscription_state); - gpr_log(GPR_INFO, "ADS[%p]: subscribe to resource type %s name %s state %p", - this, resource_type.c_str(), resource_name.c_str(), + gpr_log(GPR_INFO, "ADS[%s]: subscribe to resource type %s name %s state %p", + debug_label_.c_str(), resource_type.c_str(), resource_name.c_str(), &subscription_state); return true; } @@ -122,8 +122,9 @@ void AdsServiceImpl::ProcessUnsubscriptions( ++it; continue; } - gpr_log(GPR_INFO, "ADS[%p]: Unsubscribe to type=%s name=%s state=%p", this, - resource_type.c_str(), resource_name.c_str(), &subscription_state); + gpr_log(GPR_INFO, "ADS[%s]: Unsubscribe to type=%s name=%s state=%p", + debug_label_.c_str(), resource_type.c_str(), resource_name.c_str(), + &subscription_state); auto resource_it = resource_name_map->find(resource_name); GPR_ASSERT(resource_it != resource_name_map->end()); auto& resource_state = resource_it->second; @@ -150,7 +151,7 @@ void AdsServiceImpl::Shutdown() { } resource_type_response_state_.clear(); } - gpr_log(GPR_INFO, "ADS[%p]: shut down", this); + gpr_log(GPR_INFO, "ADS[%s]: shut down", debug_label_.c_str()); } // @@ -231,7 +232,7 @@ void LrsServiceImpl::Shutdown() { lrs_cv_.SignalAll(); } } - gpr_log(GPR_INFO, "LRS[%p]: shut down", this); + gpr_log(GPR_INFO, "LRS[%s]: shut down", debug_label_.c_str()); } std::vector LrsServiceImpl::WaitForLoadReport( diff --git a/test/cpp/end2end/xds/xds_server.h b/test/cpp/end2end/xds/xds_server.h index b4fa2713cb6..55620c3393d 100644 --- a/test/cpp/end2end/xds/xds_server.h +++ b/test/cpp/end2end/xds/xds_server.h @@ -26,6 +26,7 @@ #include "absl/types/optional.h" #include +#include #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/gprpp/crash.h" @@ -75,9 +76,12 @@ class AdsServiceImpl explicit AdsServiceImpl( std::function check_first_request = nullptr, - std::function check_nack_status_code = nullptr) + std::function check_nack_status_code = nullptr, + absl::string_view debug_label = "") : check_first_request_(std::move(check_first_request)), - check_nack_status_code_(std::move(check_nack_status_code)) {} + check_nack_status_code_(std::move(check_nack_status_code)), + debug_label_(absl::StrFormat( + "%p%s%s", this, debug_label.empty() ? "" : ":", debug_label)) {} void set_wrap_resources(bool wrap_resources) { grpc_core::MutexLock lock(&ads_mu_); @@ -174,6 +178,11 @@ class AdsServiceImpl forced_ads_failure_ = std::move(status); } + void ClearADSFailure() { + grpc_core::MutexLock lock(&ads_mu_); + forced_ads_failure_ = absl::nullopt; + } + private: // A queue of resource type/name pairs that have changed since the client // subscribed to them. @@ -223,14 +232,15 @@ class AdsServiceImpl Status StreamAggregatedResources(ServerContext* context, Stream* stream) override { - gpr_log(GPR_INFO, "ADS[%p]: StreamAggregatedResources starts", this); + gpr_log(GPR_INFO, "ADS[%s]: StreamAggregatedResources starts", + debug_label_.c_str()); { grpc_core::MutexLock lock(&ads_mu_); if (forced_ads_failure_.has_value()) { gpr_log(GPR_INFO, - "ADS[%p]: StreamAggregatedResources forcing early failure " + "ADS[%s]: StreamAggregatedResources forcing early failure " "with status code: %d, message: %s", - this, forced_ads_failure_.value().error_code(), + debug_label_.c_str(), forced_ads_failure_.value().error_code(), forced_ads_failure_.value().error_message().c_str()); return forced_ads_failure_.value(); } @@ -273,8 +283,9 @@ class AdsServiceImpl requests.pop_front(); did_work = true; gpr_log(GPR_INFO, - "ADS[%p]: Received request for type %s with content %s", this, - request.type_url().c_str(), request.DebugString().c_str()); + "ADS[%s]: Received request for type %s with content %s", + debug_label_.c_str(), request.type_url().c_str(), + request.DebugString().c_str()); SentState& sent_state = sent_state_map[request.type_url()]; // Process request. ProcessRequest(request, &update_queue, &subscription_map, &sent_state, @@ -282,7 +293,7 @@ class AdsServiceImpl } } if (response.has_value()) { - gpr_log(GPR_INFO, "ADS[%p]: Sending response: %s", this, + gpr_log(GPR_INFO, "ADS[%s]: Sending response: %s", debug_label_.c_str(), response->DebugString().c_str()); stream->Write(response.value()); } @@ -303,8 +314,8 @@ class AdsServiceImpl } } if (response.has_value()) { - gpr_log(GPR_INFO, "ADS[%p]: Sending update response: %s", this, - response->DebugString().c_str()); + gpr_log(GPR_INFO, "ADS[%s]: Sending update response: %s", + debug_label_.c_str(), response->DebugString().c_str()); stream->Write(response.value()); } { @@ -338,7 +349,8 @@ class AdsServiceImpl } } } - gpr_log(GPR_INFO, "ADS[%p]: StreamAggregatedResources done", this); + gpr_log(GPR_INFO, "ADS[%s]: StreamAggregatedResources done", + debug_label_.c_str()); RemoveClient(context->peer()); return Status::OK; } @@ -369,8 +381,8 @@ class AdsServiceImpl ResponseState response_state; if (!request.has_error_detail()) { response_state.state = ResponseState::ACKED; - gpr_log(GPR_INFO, "ADS[%p]: client ACKed resource_type=%s version=%s", - this, request.type_url().c_str(), + gpr_log(GPR_INFO, "ADS[%s]: client ACKed resource_type=%s version=%s", + debug_label_.c_str(), request.type_url().c_str(), request.version_info().c_str()); } else { response_state.state = ResponseState::NACKED; @@ -380,8 +392,9 @@ class AdsServiceImpl } response_state.error_message = request.error_detail().message(); gpr_log(GPR_INFO, - "ADS[%p]: client NACKed resource_type=%s version=%s: %s", this, - request.type_url().c_str(), request.version_info().c_str(), + "ADS[%s]: client NACKed resource_type=%s version=%s: %s", + debug_label_.c_str(), request.type_url().c_str(), + request.version_info().c_str(), response_state.error_message.c_str()); } resource_type_response_state_[request.type_url()].emplace_back( @@ -412,8 +425,9 @@ class AdsServiceImpl &resource_state, update_queue) || ClientNeedsResourceUpdate(resource_type_state, resource_state, sent_state->resource_type_version)) { - gpr_log(GPR_INFO, "ADS[%p]: Sending update for type=%s name=%s", this, - request.type_url().c_str(), resource_name.c_str()); + gpr_log(GPR_INFO, "ADS[%s]: Sending update for type=%s name=%s", + debug_label_.c_str(), request.type_url().c_str(), + resource_name.c_str()); resources_added_to_response.emplace(resource_name); if (!response->has_value()) response->emplace(); if (resource_state.resource.has_value()) { @@ -427,8 +441,9 @@ class AdsServiceImpl } } else { gpr_log(GPR_INFO, - "ADS[%p]: client does not need update for type=%s name=%s", - this, request.type_url().c_str(), resource_name.c_str()); + "ADS[%s]: client does not need update for type=%s name=%s", + debug_label_.c_str(), request.type_url().c_str(), + resource_name.c_str()); } } // Process unsubscriptions for any resource no longer @@ -451,8 +466,8 @@ class AdsServiceImpl SubscriptionMap* subscription_map, SentState* sent_state, absl::optional* response) ABSL_EXCLUSIVE_LOCKS_REQUIRED(ads_mu_) { - gpr_log(GPR_INFO, "ADS[%p]: Received update for type=%s name=%s", this, - resource_type.c_str(), resource_name.c_str()); + gpr_log(GPR_INFO, "ADS[%s]: Received update for type=%s name=%s", + debug_label_.c_str(), resource_type.c_str(), resource_name.c_str()); auto& subscription_name_map = (*subscription_map)[resource_type]; auto& resource_type_state = resource_map_[resource_type]; auto& resource_name_map = resource_type_state.resource_name_map; @@ -461,8 +476,9 @@ class AdsServiceImpl ResourceState& resource_state = resource_name_map[resource_name]; if (ClientNeedsResourceUpdate(resource_type_state, resource_state, sent_state->resource_type_version)) { - gpr_log(GPR_INFO, "ADS[%p]: Sending update for type=%s name=%s", this, - resource_type.c_str(), resource_name.c_str()); + gpr_log(GPR_INFO, "ADS[%s]: Sending update for type=%s name=%s", + debug_label_.c_str(), resource_type.c_str(), + resource_name.c_str()); response->emplace(); if (resource_state.resource.has_value()) { auto* resource = (*response)->add_resources(); @@ -493,7 +509,8 @@ class AdsServiceImpl requests->emplace_back(std::move(request)); } } - gpr_log(GPR_INFO, "ADS[%p]: Null read, stream closed", this); + gpr_log(GPR_INFO, "ADS[%s]: Null read, stream closed", + debug_label_.c_str()); grpc_core::MutexLock lock(&ads_mu_); *stream_closed = true; } @@ -564,6 +581,7 @@ class AdsServiceImpl std::function check_first_request_; std::function check_nack_status_code_; + std::string debug_label_; grpc_core::CondVar ads_cond_; grpc_core::Mutex ads_mu_; @@ -700,12 +718,15 @@ class LrsServiceImpl std::set cluster_names, std::function stream_started_callback = nullptr, std::function - check_first_request = nullptr) + check_first_request = nullptr, + absl::string_view debug_label = "") : client_load_reporting_interval_seconds_( client_load_reporting_interval_seconds), cluster_names_(std::move(cluster_names)), stream_started_callback_(std::move(stream_started_callback)), - check_first_request_(std::move(check_first_request)) {} + check_first_request_(std::move(check_first_request)), + debug_label_(absl::StrFormat( + "%p%s%s", this, debug_label.empty() ? "" : ":", debug_label)) {} // Must be called before the LRS call is started. void set_send_all_clusters(bool send_all_clusters) { @@ -729,7 +750,7 @@ class LrsServiceImpl using Stream = ServerReaderWriter; Status StreamLoadStats(ServerContext* /*context*/, Stream* stream) override { - gpr_log(GPR_INFO, "LRS[%p]: StreamLoadStats starts", this); + gpr_log(GPR_INFO, "LRS[%s]: StreamLoadStats starts", debug_label_.c_str()); if (stream_started_callback_ != nullptr) stream_started_callback_(); // Take a reference of the LrsServiceImpl object, reference will go // out of scope after this method exits. @@ -756,8 +777,8 @@ class LrsServiceImpl // Wait for report. request.Clear(); while (stream->Read(&request)) { - gpr_log(GPR_INFO, "LRS[%p]: received client load report message: %s", - this, request.DebugString().c_str()); + gpr_log(GPR_INFO, "LRS[%s]: received client load report message: %s", + debug_label_.c_str(), request.DebugString().c_str()); std::vector stats; for (const auto& cluster_stats : request.cluster_stats()) { stats.emplace_back(cluster_stats); @@ -774,7 +795,7 @@ class LrsServiceImpl lrs_cv_.Wait(&lrs_mu_); } } - gpr_log(GPR_INFO, "LRS[%p]: StreamLoadStats done", this); + gpr_log(GPR_INFO, "LRS[%s]: StreamLoadStats done", debug_label_.c_str()); return Status::OK; } @@ -783,6 +804,7 @@ class LrsServiceImpl std::set cluster_names_; std::function stream_started_callback_; std::function check_first_request_; + std::string debug_label_; grpc_core::CondVar lrs_cv_; grpc_core::Mutex lrs_mu_; diff --git a/test/cpp/end2end/xds/xds_utils.cc b/test/cpp/end2end/xds/xds_utils.cc index c47302ec66b..bb49a737c74 100644 --- a/test/cpp/end2end/xds/xds_utils.cc +++ b/test/cpp/end2end/xds/xds_utils.cc @@ -151,7 +151,7 @@ std::string XdsBootstrapBuilder::MakeAuthorityText() { const std::string& name = p.first; const AuthorityInfo& authority_info = p.second; std::vector fields = { - MakeXdsServersText({authority_info.server})}; + MakeXdsServersText(authority_info.servers)}; if (!authority_info.client_listener_resource_name_template.empty()) { fields.push_back(absl::StrCat( "\"client_listener_resource_name_template\": \"", diff --git a/test/cpp/end2end/xds/xds_utils.h b/test/cpp/end2end/xds/xds_utils.h index c3695125ae6..10b552ea62c 100644 --- a/test/cpp/end2end/xds/xds_utils.h +++ b/test/cpp/end2end/xds/xds_utils.h @@ -62,7 +62,15 @@ class XdsBootstrapBuilder { XdsBootstrapBuilder& AddAuthority( const std::string& authority, const std::string& server = "", const std::string& client_listener_resource_name_template = "") { - authorities_[authority] = {server, client_listener_resource_name_template}; + return AddAuthority(authority, + server.empty() ? std::vector() + : std::vector({server}), + client_listener_resource_name_template); + } + XdsBootstrapBuilder& AddAuthority( + const std::string& authority, const std::vector& servers, + const std::string& client_listener_resource_name_template = "") { + authorities_[authority] = {servers, client_listener_resource_name_template}; return *this; } XdsBootstrapBuilder& SetServerListenerResourceNameTemplate( @@ -80,7 +88,7 @@ class XdsBootstrapBuilder { std::string plugin_config; }; struct AuthorityInfo { - std::string server; + std::vector servers; std::string client_listener_resource_name_template; }; diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 7c210923d8e..15ad36dca3e 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -11907,6 +11907,28 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "xds_fallback_end2end_test", + "platforms": [ + "linux", + "mac", + "posix" + ], + "uses_polling": true + }, { "args": [], "benchmark": false, From d3a92c937eb876d25ce70f3932d9bb232b45ec11 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 9 Apr 2024 12:13:36 -0700 Subject: [PATCH 16/18] [CI] Added MSVC 2022 test (#36236) - Added Visual C++ 2022 test to Windows C/C++ test set - Windows potability test is now running two tests - CMake / Ninja / Visual C++ 2019 on x86 - CMake / MSBuild / Visual C++ 2022 on x64 Closes #36236 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36236 from veblush:vc2022 100085366f449cb519f4816052ccc83c5f3b5c1a PiperOrigin-RevId: 623244062 --- tools/run_tests/helper_scripts/build_cxx.bat | 24 +++++++--- tools/run_tests/run_tests.py | 5 +++ tools/run_tests/run_tests_matrix.py | 47 ++++---------------- 3 files changed, 33 insertions(+), 43 deletions(-) diff --git a/tools/run_tests/helper_scripts/build_cxx.bat b/tools/run_tests/helper_scripts/build_cxx.bat index a7d9a10449e..72908286c9e 100644 --- a/tools/run_tests/helper_scripts/build_cxx.bat +++ b/tools/run_tests/helper_scripts/build_cxx.bat @@ -29,6 +29,18 @@ If "%GRPC_BUILD_ACTIVATE_VS_TOOLS%" == "2019" ( echo on ) +If "%GRPC_BUILD_ACTIVATE_VS_TOOLS%" == "2022" ( + @rem set cl.exe build environment to build with VS2022 tooling + @rem this is required for Ninja build to work + call "%VS170COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat" %GRPC_BUILD_VS_TOOLS_ARCHITECTURE% + @rem restore command echo + echo on +) + +@rem Setting the env variable to a single space translates to passing no argument +@rem when evaluated on the command line. +set "CMAKE_SYSTEM_VERSION_ARG= " + If "%GRPC_CMAKE_GENERATOR%" == "Visual Studio 16 2019" ( @rem Always use the newest Windows 10 SDK available. @rem A new-enough Windows 10 SDK that supports C++11's stdalign.h is required @@ -41,10 +53,11 @@ If "%GRPC_CMAKE_GENERATOR%" == "Visual Studio 16 2019" ( @rem When using Ninja generator, this problem doesn't happen. @rem See b/275694647 and https://gitlab.kitware.com/cmake/cmake/-/issues/16202#note_140259 set "CMAKE_SYSTEM_VERSION_ARG=-DCMAKE_SYSTEM_VERSION=10.0" -) else ( - @rem Setting the env variable to a single space translates to passing no argument - @rem when evaluated on the command line. - set "CMAKE_SYSTEM_VERSION_ARG= " +) + +If "%GRPC_CMAKE_GENERATOR%" == "Visual Studio 17 2022" ( + @rem The same as above. + set "CMAKE_SYSTEM_VERSION_ARG=-DCMAKE_SYSTEM_VERSION=10.0" ) If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( @@ -105,7 +118,8 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" ( cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" %CMAKE_SYSTEM_VERSION_ARG% -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON -DgRPC_ABSL_PROVIDER=package -DgRPC_BUILD_TESTS=ON -DgRPC_BUILD_MSVC_MP_COUNT=%GRPC_RUN_TESTS_JOBS% -DCMAKE_INSTALL_PREFIX="%INSTALL_PATH%" %* ../.. || goto :error @rem GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX will be set to either "c" or "cxx" - cmake --build . --target buildtests_%GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX% --config %MSBUILD_CONFIG% -j%GRPC_RUN_TESTS_JOBS% || goto :error + @rem Don't add -j option here because it will disable gRPC_BUILD_MSVC_MP_COUNT option + cmake --build . --target buildtests_%GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX% --config %MSBUILD_CONFIG% || goto :error ) endlocal diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 061f00f11c8..d59a20afbd4 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -284,6 +284,7 @@ class CLanguage(object): "default", "cmake", "cmake_ninja_vs2019", + "cmake_ninja_vs2022", "cmake_vs2019", "cmake_vs2022", ], @@ -300,6 +301,9 @@ class CLanguage(object): # the compiler used is exactly the same as for cmake_vs2017 cmake_generator = "Ninja" activate_vs_tools = "2019" + elif self.args.compiler == "cmake_ninja_vs2022": + cmake_generator = "Ninja" + activate_vs_tools = "2022" elif self.args.compiler == "cmake_vs2019": cmake_generator = "Visual Studio 16 2019" elif self.args.compiler == "cmake_vs2022": @@ -1678,6 +1682,7 @@ argp.add_argument( "coreclr", "cmake", "cmake_ninja_vs2019", + "cmake_ninja_vs2022", "cmake_vs2019", "cmake_vs2022", "mono", diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index 531f38ea499..577642440ac 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -377,62 +377,33 @@ def _create_portability_test_jobs( timeout_seconds=_CPP_RUNTESTS_TIMEOUT, ) - # portability C on Windows 64-bit (x86 is the default) + # portability C & C++ on Windows 64-bit test_jobs += _generate_jobs( - languages=["c"], + languages=["c", "c++"], configs=["dbg"], platforms=["windows"], - arch="x64", - compiler="default", + arch="default", + compiler="cmake_ninja_vs2019", labels=["portability", "corelang"], extra_args=extra_args, inner_jobs=inner_jobs, + timeout_seconds=_CPP_RUNTESTS_TIMEOUT, ) - # portability C on Windows with the "Visual Studio" cmake + # portability C and C++ on Windows with the "Visual Studio 2022" cmake # generator, i.e. not using Ninja (to verify that we can still build with msbuild) test_jobs += _generate_jobs( - languages=["c"], + languages=["c", "c++"], configs=["dbg"], platforms=["windows"], - arch="default", - compiler="cmake_vs2019", + arch="x64", + compiler="cmake_vs2022", labels=["portability", "corelang"], extra_args=extra_args, inner_jobs=inner_jobs, - ) - - # portability C++ on Windows - # TODO(jtattermusch): some of the tests are failing, so we force --build_only - test_jobs += _generate_jobs( - languages=["c++"], - configs=["dbg"], - platforms=["windows"], - arch="default", - compiler="default", - labels=["portability", "corelang"], - extra_args=extra_args + ["--build_only"], - inner_jobs=inner_jobs, timeout_seconds=_CPP_RUNTESTS_TIMEOUT, ) - # portability C and C++ on Windows using VS2019 (build only) - # TODO(jtattermusch): The C tests with exactly the same config are already running as part of the - # basictests_c suite (so we force --build_only to avoid running them twice). - # The C++ tests aren't all passing, so also force --build_only. - # NOTE(veblush): This is not neded as default=cmake_ninja_vs2019 - # test_jobs += _generate_jobs( - # languages=["c", "c++"], - # configs=["dbg"], - # platforms=["windows"], - # arch="x64", - # compiler="cmake_ninja_vs2019", - # labels=["portability", "corelang"], - # extra_args=extra_args + ["--build_only"], - # inner_jobs=inner_jobs, - # timeout_seconds=_CPP_RUNTESTS_TIMEOUT, - # ) - # C and C++ with no-exceptions on Linux test_jobs += _generate_jobs( languages=["c", "c++"], From 4feb98e82b30e973a2fe3426af6829bba801a403 Mon Sep 17 00:00:00 2001 From: Xuan Wang Date: Tue, 9 Apr 2024 12:21:50 -0700 Subject: [PATCH 17/18] [Python test] Fix a typo in bazelify_tests target (#36292) Typo introduced in: https://github.com/grpc/grpc/pull/34450 --- tools/bazelify_tests/test/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bazelify_tests/test/BUILD b/tools/bazelify_tests/test/BUILD index 3907af29206..7deb5fcd640 100644 --- a/tools/bazelify_tests/test/BUILD +++ b/tools/bazelify_tests/test/BUILD @@ -422,7 +422,7 @@ test_suite( ":artifact_protoc_linux_x64_build_test", ":artifact_protoc_linux_x86_build_test", ":artifact_python_linux_x64_manylinux2014_cp312_build_test", - ":artifact_python_linux_x64_manylinux2014_cp38_build_test", + ":artifact_python_linux_x64_manylinux2014_cp39_build_test", ":package_csharp_linux_build_test", ":package_python_linux_build_test", ], From 493d8734112399276e57a4b28b3c40fb80b08cde Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Tue, 9 Apr 2024 12:37:25 -0700 Subject: [PATCH 18/18] [test] increase timeout (#36308) This fixes rare failure under MSAN. This does not increate the test run time: MSAN build: ``` //test/cpp/interop:backend_metrics_lb_policy_test@poller=poll PASSED in 59.2s Stats over 5000 runs: max = 59.2s, min = 4.9s, avg = 6.5s, dev = 2.8s ``` Opt/no MSAN: ``` //test/cpp/interop:backend_metrics_lb_policy_test@poller=poll PASSED in 26.7s Stats over 5000 runs: max = 26.7s, min = 4.9s, avg = 7.7s, dev = 2.8s ``` Closes #36308 COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36308 from eugeneo:333396468-msan-backend_metrics_lb_policy_test 4ad9443131e2cbe50a0c214dbba93cfc7dd7db60 PiperOrigin-RevId: 623250444 --- test/cpp/interop/backend_metrics_lb_policy_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/interop/backend_metrics_lb_policy_test.cc b/test/cpp/interop/backend_metrics_lb_policy_test.cc index 8ceae112fa8..39b52f2f123 100644 --- a/test/cpp/interop/backend_metrics_lb_policy_test.cc +++ b/test/cpp/interop/backend_metrics_lb_policy_test.cc @@ -124,7 +124,7 @@ TEST(BackendMetricsLbPolicyTest, TestOobMetricsReceipt) { // This report is sent on start, available immediately auto report = tracker.WaitForOobLoadReport( [](auto report) { return report.cpu_utilization() == 0.5; }, - absl::Milliseconds(1500), 3); + absl::Seconds(5) * grpc_test_slowdown_factor(), 3); ASSERT_TRUE(report.has_value()); EXPECT_EQ(report->cpu_utilization(), 0.5); for (size_t i = 0; i < 3; i++) {