diff --git a/BUILD b/BUILD index 8600d1f7e8632..093cddb95af8f 100644 --- a/BUILD +++ b/BUILD @@ -227,11 +227,11 @@ config_setting( python_config_settings() # This should be updated along with build_handwritten.yaml -g_stands_for = "gesundheit" # @unused +g_stands_for = "groovy" # @unused -core_version = "43.0.0" # @unused +core_version = "44.0.0" # @unused -version = "1.67.0-dev" # @unused +version = "1.68.0-dev" # @unused GPR_PUBLIC_HDRS = [ "include/grpc/support/alloc.h", @@ -571,6 +571,7 @@ grpc_cc_library( external_deps = [ "absl/base:core_headers", "absl/log:log", + "absl/time:time", ], language = "c++", public_hdrs = GRPC_PUBLIC_HDRS, @@ -642,6 +643,7 @@ grpc_cc_library( external_deps = [ "absl/base:core_headers", "absl/log:log", + "absl/time:time", ], language = "c++", public_hdrs = GRPC_PUBLIC_HDRS, @@ -681,7 +683,7 @@ grpc_cc_library( "server", "sockaddr_utils", "tsi_base", - "uri_parser", + "uri", "//src/core:channel_args", "//src/core:channel_init", "//src/core:channel_stack_type", @@ -719,50 +721,50 @@ grpc_cc_library( grpc_cc_library( name = "gpr", srcs = [ - "//src/core:lib/gprpp/crash.cc", - "//src/core:lib/gprpp/fork.cc", - "//src/core:lib/gprpp/host_port.cc", - "//src/core:lib/gprpp/mpscq.cc", - "//src/core:lib/gprpp/posix/stat.cc", - "//src/core:lib/gprpp/posix/thd.cc", - "//src/core:lib/gprpp/time_util.cc", - "//src/core:lib/gprpp/windows/stat.cc", - "//src/core:lib/gprpp/windows/thd.cc", "//src/core:util/alloc.cc", + "//src/core:util/crash.cc", + "//src/core:util/fork.cc", + "//src/core:util/gpr_time.cc", + "//src/core:util/host_port.cc", "//src/core:util/iphone/cpu.cc", "//src/core:util/linux/cpu.cc", "//src/core:util/log.cc", + "//src/core:util/mpscq.cc", "//src/core:util/msys/tmpfile.cc", "//src/core:util/posix/cpu.cc", + "//src/core:util/posix/stat.cc", "//src/core:util/posix/string.cc", "//src/core:util/posix/sync.cc", + "//src/core:util/posix/thd.cc", "//src/core:util/posix/time.cc", "//src/core:util/posix/tmpfile.cc", "//src/core:util/string.cc", "//src/core:util/sync.cc", "//src/core:util/sync_abseil.cc", - "//src/core:util/time.cc", "//src/core:util/time_precise.cc", + "//src/core:util/time_util.cc", "//src/core:util/windows/cpu.cc", + "//src/core:util/windows/stat.cc", "//src/core:util/windows/string.cc", "//src/core:util/windows/string_util.cc", "//src/core:util/windows/sync.cc", + "//src/core:util/windows/thd.cc", "//src/core:util/windows/time.cc", "//src/core:util/windows/tmpfile.cc", ], hdrs = [ - "//src/core:lib/gprpp/crash.h", - "//src/core:lib/gprpp/fork.h", - "//src/core:lib/gprpp/host_port.h", - "//src/core:lib/gprpp/memory.h", - "//src/core:lib/gprpp/mpscq.h", - "//src/core:lib/gprpp/stat.h", - "//src/core:lib/gprpp/sync.h", - "//src/core:lib/gprpp/thd.h", - "//src/core:lib/gprpp/time_util.h", "//src/core:util/alloc.h", + "//src/core:util/crash.h", + "//src/core:util/fork.h", + "//src/core:util/host_port.h", + "//src/core:util/memory.h", + "//src/core:util/mpscq.h", + "//src/core:util/stat.h", "//src/core:util/string.h", + "//src/core:util/sync.h", + "//src/core:util/thd.h", "//src/core:util/time_precise.h", + "//src/core:util/time_util.h", "//src/core:util/tmpfile.h", ], external_deps = [ @@ -820,7 +822,7 @@ grpc_cc_library( grpc_cc_library( name = "cpp_impl_of", - hdrs = ["//src/core:lib/gprpp/cpp_impl_of.h"], + hdrs = ["//src/core:util/cpp_impl_of.h"], language = "c++", ) @@ -892,6 +894,7 @@ grpc_cc_library( "absl/log:log", "absl/log:absl_check", "absl/log:absl_log", + "absl/status:statusor", "absl/strings:cord", "absl/synchronization", "protobuf_headers", @@ -1245,6 +1248,7 @@ grpc_cc_library( "absl/log:log", "absl/log:absl_check", "absl/log:absl_log", + "absl/status:statusor", "absl/strings", "absl/synchronization", ], @@ -1392,7 +1396,7 @@ grpc_cc_library( "parse_address", "ref_counted_ptr", "sockaddr_utils", - "uri_parser", + "uri", "//src/core:channel_args", "//src/core:connectivity_state", "//src/core:json", @@ -1507,9 +1511,6 @@ grpc_cc_library( "//src/core:lib/iomgr/ev_posix.cc", "//src/core:lib/iomgr/fork_posix.cc", "//src/core:lib/iomgr/fork_windows.cc", - "//src/core:lib/iomgr/gethostname_fallback.cc", - "//src/core:lib/iomgr/gethostname_host_name_max.cc", - "//src/core:lib/iomgr/gethostname_sysconf.cc", "//src/core:lib/iomgr/iocp_windows.cc", "//src/core:lib/iomgr/iomgr.cc", "//src/core:lib/iomgr/iomgr_posix.cc", @@ -1548,6 +1549,9 @@ grpc_cc_library( "//src/core:lib/iomgr/wakeup_fd_nospecial.cc", "//src/core:lib/iomgr/wakeup_fd_pipe.cc", "//src/core:lib/iomgr/wakeup_fd_posix.cc", + "//src/core:util/gethostname_fallback.cc", + "//src/core:util/gethostname_host_name_max.cc", + "//src/core:util/gethostname_sysconf.cc", ] + # TODO(vigneshbabu): remove these # These headers used to be vended by this target, but they have to be @@ -1568,7 +1572,6 @@ grpc_cc_library( "//src/core:lib/iomgr/ev_epoll1_linux.h", "//src/core:lib/iomgr/ev_poll_posix.h", "//src/core:lib/iomgr/ev_posix.h", - "//src/core:lib/iomgr/gethostname.h", "//src/core:lib/iomgr/iocp_windows.h", "//src/core:lib/iomgr/iomgr.h", "//src/core:lib/iomgr/lockfree_event.h", @@ -1599,6 +1602,7 @@ grpc_cc_library( "//src/core:lib/iomgr/vsock.h", "//src/core:lib/iomgr/wakeup_fd_pipe.h", "//src/core:lib/iomgr/wakeup_fd_posix.h", + "//src/core:util/gethostname.h", ] + # TODO(vigneshbabu): remove these # These headers used to be vended by this target, but they have to be @@ -2489,6 +2493,7 @@ grpc_cc_library( "//src/core:grpc_backend_metric_provider", "//src/core:grpc_crl_provider", "//src/core:grpc_service_config", + "//src/core:grpc_tls_credentials", "//src/core:grpc_transport_chttp2_server", "//src/core:grpc_transport_inproc", "//src/core:json", @@ -2982,10 +2987,10 @@ grpc_cc_library( grpc_cc_library( name = "work_serializer", srcs = [ - "//src/core:lib/gprpp/work_serializer.cc", + "//src/core:util/work_serializer.cc", ], hdrs = [ - "//src/core:lib/gprpp/work_serializer.h", + "//src/core:util/work_serializer.h", ], external_deps = [ "absl/base:core_headers", @@ -3114,7 +3119,7 @@ grpc_cc_library( name = "debug_location", external_deps = ["absl/strings"], language = "c++", - public_hdrs = ["//src/core:lib/gprpp/debug_location.h"], + public_hdrs = ["//src/core:util/debug_location.h"], visibility = ["@grpc:debug_location"], deps = ["gpr_platform"], ) @@ -3122,7 +3127,7 @@ grpc_cc_library( grpc_cc_library( name = "orphanable", language = "c++", - public_hdrs = ["//src/core:lib/gprpp/orphanable.h"], + public_hdrs = ["//src/core:util/orphanable.h"], visibility = [ "@grpc:client_channel", "@grpc:xds_client_core", @@ -3159,7 +3164,7 @@ grpc_cc_library( name = "ref_counted_ptr", external_deps = ["absl/hash"], language = "c++", - public_hdrs = ["//src/core:lib/gprpp/ref_counted_ptr.h"], + public_hdrs = ["//src/core:util/ref_counted_ptr.h"], visibility = ["@grpc:ref_counted_ptr"], deps = [ "debug_location", @@ -3306,7 +3311,7 @@ grpc_cc_library( visibility = ["@grpc:alt_grpc_base_legacy"], deps = [ "gpr", - "uri_parser", + "uri", "//src/core:grpc_sockaddr", "//src/core:iomgr_port", "//src/core:resolved_address", @@ -3398,12 +3403,12 @@ grpc_cc_library( ) grpc_cc_library( - name = "uri_parser", + name = "uri", srcs = [ - "//src/core:lib/uri/uri_parser.cc", + "//src/core:util/uri.cc", ], hdrs = [ - "//src/core:lib/uri/uri_parser.h", + "//src/core:util/uri.h", ], external_deps = [ "absl/log:check", @@ -3420,12 +3425,12 @@ grpc_cc_library( name = "parse_address", srcs = [ "//src/core:lib/address_utils/parse_address.cc", - "//src/core:lib/iomgr/grpc_if_nametoindex_posix.cc", - "//src/core:lib/iomgr/grpc_if_nametoindex_unsupported.cc", + "//src/core:util/grpc_if_nametoindex_posix.cc", + "//src/core:util/grpc_if_nametoindex_unsupported.cc", ], hdrs = [ "//src/core:lib/address_utils/parse_address.h", - "//src/core:lib/iomgr/grpc_if_nametoindex.h", + "//src/core:util/grpc_if_nametoindex.h", ], external_deps = [ "absl/log:check", @@ -3437,7 +3442,7 @@ grpc_cc_library( visibility = ["@grpc:alt_grpc_base_legacy"], deps = [ "gpr", - "uri_parser", + "uri", "//src/core:error", "//src/core:grpc_sockaddr", "//src/core:iomgr_port", @@ -3449,10 +3454,10 @@ grpc_cc_library( grpc_cc_library( name = "backoff", srcs = [ - "//src/core:lib/backoff/backoff.cc", + "//src/core:util/backoff.cc", ], hdrs = [ - "//src/core:lib/backoff/backoff.h", + "//src/core:util/backoff.h", ], external_deps = ["absl/random"], language = "c++", @@ -3612,7 +3617,7 @@ grpc_cc_library( "orphanable", "ref_counted_ptr", "server_address", - "uri_parser", + "uri", "//src/core:channel_args", "//src/core:grpc_service_config", "//src/core:iomgr_fwd", @@ -3770,7 +3775,7 @@ grpc_cc_library( "ref_counted_ptr", "sockaddr_utils", "stats", - "uri_parser", + "uri", "work_serializer", "//src/core:arena", "//src/core:arena_promise", @@ -3893,7 +3898,7 @@ grpc_cc_library( "parse_address", "ref_counted_ptr", "sockaddr_utils", - "uri_parser", + "uri", "//src/core:channel_args", "//src/core:closure", "//src/core:error", @@ -3952,7 +3957,7 @@ grpc_cc_library( "ref_counted_ptr", "resource_quota_api", "sockaddr_utils", - "uri_parser", + "uri", "//src/core:channel_args", "//src/core:channel_args_preconditioning", "//src/core:closure", @@ -4082,7 +4087,7 @@ grpc_cc_library( "orphanable", "promise", "ref_counted_ptr", - "uri_parser", + "uri", "//src/core:arena_promise", "//src/core:closure", "//src/core:error", @@ -4390,17 +4395,18 @@ grpc_cc_library( grpc_cc_library( name = "xds_client", srcs = [ + "//src/core:xds/xds_client/lrs_client.cc", "//src/core:xds/xds_client/xds_api.cc", "//src/core:xds/xds_client/xds_bootstrap.cc", "//src/core:xds/xds_client/xds_client.cc", - "//src/core:xds/xds_client/xds_client_stats.cc", ], hdrs = [ + "//src/core:xds/xds_client/lrs_client.h", "//src/core:xds/xds_client/xds_api.h", "//src/core:xds/xds_client/xds_bootstrap.h", "//src/core:xds/xds_client/xds_channel_args.h", "//src/core:xds/xds_client/xds_client.h", - "//src/core:xds/xds_client/xds_client_stats.h", + "//src/core:xds/xds_client/xds_locality.h", "//src/core:xds/xds_client/xds_metrics.h", "//src/core:xds/xds_client/xds_resource_type.h", "//src/core:xds/xds_client/xds_resource_type_impl.h", @@ -4451,7 +4457,7 @@ grpc_cc_library( "protobuf_struct_upb", "protobuf_timestamp_upb", "ref_counted_ptr", - "uri_parser", + "uri", "work_serializer", "//src/core:default_event_engine", "//src/core:dual_ref_counted", @@ -4459,6 +4465,7 @@ grpc_cc_library( "//src/core:json", "//src/core:per_cpu", "//src/core:ref_counted", + "//src/core:ref_counted_string", "//src/core:time", "//src/core:upb_utils", "//src/core:useful", @@ -4512,7 +4519,7 @@ grpc_cc_library( "grpc_resolver", "orphanable", "ref_counted_ptr", - "uri_parser", + "uri", "work_serializer", "//src/core:channel_args", "//src/core:notification", diff --git a/BoringSSL-Package.swift b/BoringSSL-Package.swift index 1300fb1aec7d9..f2e70808d8e07 100644 --- a/BoringSSL-Package.swift +++ b/BoringSSL-Package.swift @@ -142,6 +142,8 @@ let package = Package( "src/crypto/kyber/kyber.c", "src/crypto/lhash/lhash.c", "src/crypto/mem.c", + "src/crypto/mldsa/mldsa.c", + "src/crypto/mlkem/mlkem.cc", "src/crypto/obj/obj.c", "src/crypto/obj/obj_xref.c", "src/crypto/pem/pem_all.c", @@ -162,12 +164,14 @@ let package = Package( "src/crypto/poly1305/poly1305_vec.c", "src/crypto/pool/pool.c", "src/crypto/rand_extra/deterministic.c", + "src/crypto/rand_extra/fork_detect.c", "src/crypto/rand_extra/forkunsafe.c", "src/crypto/rand_extra/getentropy.c", "src/crypto/rand_extra/ios.c", "src/crypto/rand_extra/passive.c", "src/crypto/rand_extra/rand_extra.c", "src/crypto/rand_extra/trusty.c", + "src/crypto/rand_extra/urandom.c", "src/crypto/rand_extra/windows.c", "src/crypto/rc4/rc4.c", "src/crypto/refcount.c", diff --git a/CMakeLists.txt b/CMakeLists.txt index 02c649d3cdf53..7c9a55494877c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,11 +25,11 @@ cmake_minimum_required(VERSION 3.13) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.67.0-dev") -set(gRPC_CORE_VERSION "43.0.0") -set(gRPC_CORE_SOVERSION "43") -set(gRPC_CPP_VERSION "1.67.0-dev") -set(gRPC_CPP_SOVERSION "1.67") +set(PACKAGE_VERSION "1.68.0-dev") +set(gRPC_CORE_VERSION "44.0.0") +set(gRPC_CORE_SOVERSION "44") +set(gRPC_CPP_VERSION "1.68.0-dev") +set(gRPC_CPP_SOVERSION "1.68") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") @@ -1128,6 +1128,7 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx glob_test) add_dependencies(buildtests_cxx goaway_server_test) add_dependencies(buildtests_cxx google_c2p_resolver_test) + add_dependencies(buildtests_cxx gpr_time_test) add_dependencies(buildtests_cxx graceful_server_shutdown_test) add_dependencies(buildtests_cxx graceful_shutdown_test) add_dependencies(buildtests_cxx grpc_alts_credentials_options_test) @@ -1329,6 +1330,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx remove_stream_from_stalled_lists_test) endif() + add_dependencies(buildtests_cxx request_buffer_test) add_dependencies(buildtests_cxx request_with_flags_test) add_dependencies(buildtests_cxx request_with_payload_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) @@ -1483,7 +1485,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_heap_test) add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_list_test) add_dependencies(buildtests_cxx test_core_event_engine_slice_buffer_test) - add_dependencies(buildtests_cxx test_core_gprpp_time_test) add_dependencies(buildtests_cxx test_core_iomgr_timer_heap_test) add_dependencies(buildtests_cxx test_core_security_credentials_test) add_dependencies(buildtests_cxx test_core_security_ssl_credentials_test) @@ -1536,7 +1537,7 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx unique_ptr_with_bitset_test) add_dependencies(buildtests_cxx unique_type_name_test) add_dependencies(buildtests_cxx unknown_frame_bad_client_test) - add_dependencies(buildtests_cxx uri_parser_test) + add_dependencies(buildtests_cxx uri_test) add_dependencies(buildtests_cxx useful_test) add_dependencies(buildtests_cxx uuid_v4_test) add_dependencies(buildtests_cxx validation_errors_test) @@ -1592,7 +1593,7 @@ if(gRPC_BUILD_TESTS) 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) + if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx xds_fault_injection_end2end_test) endif() if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) @@ -1692,41 +1693,41 @@ add_library(gpr src/core/lib/config/config_vars_non_generated.cc src/core/lib/config/load_config.cc src/core/lib/event_engine/thread_local.cc - src/core/lib/gprpp/crash.cc - src/core/lib/gprpp/examine_stack.cc - src/core/lib/gprpp/fork.cc - src/core/lib/gprpp/host_port.cc - src/core/lib/gprpp/linux/env.cc - src/core/lib/gprpp/mpscq.cc - src/core/lib/gprpp/posix/env.cc - src/core/lib/gprpp/posix/stat.cc - src/core/lib/gprpp/posix/thd.cc - src/core/lib/gprpp/strerror.cc - src/core/lib/gprpp/tchar.cc - src/core/lib/gprpp/time_util.cc - src/core/lib/gprpp/windows/env.cc - src/core/lib/gprpp/windows/stat.cc - src/core/lib/gprpp/windows/thd.cc src/core/util/alloc.cc src/core/util/atm.cc + src/core/util/crash.cc + src/core/util/examine_stack.cc + src/core/util/fork.cc + src/core/util/gpr_time.cc + src/core/util/host_port.cc src/core/util/iphone/cpu.cc src/core/util/linux/cpu.cc + src/core/util/linux/env.cc src/core/util/log.cc + src/core/util/mpscq.cc src/core/util/msys/tmpfile.cc src/core/util/posix/cpu.cc + src/core/util/posix/env.cc + src/core/util/posix/stat.cc src/core/util/posix/string.cc src/core/util/posix/sync.cc + src/core/util/posix/thd.cc src/core/util/posix/time.cc src/core/util/posix/tmpfile.cc + src/core/util/strerror.cc src/core/util/string.cc src/core/util/sync.cc src/core/util/sync_abseil.cc - src/core/util/time.cc + src/core/util/tchar.cc src/core/util/time_precise.cc + src/core/util/time_util.cc src/core/util/windows/cpu.cc + src/core/util/windows/env.cc + src/core/util/windows/stat.cc src/core/util/windows/string.cc src/core/util/windows/string_util.cc src/core/util/windows/sync.cc + src/core/util/windows/thd.cc src/core/util/windows/time.cc src/core/util/windows/tmpfile.cc ) @@ -2256,8 +2257,6 @@ add_library(grpc src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc src/core/lib/address_utils/parse_address.cc src/core/lib/address_utils/sockaddr_utils.cc - src/core/lib/backoff/backoff.cc - src/core/lib/backoff/random_early_detection.cc src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args_preconditioning.cc src/core/lib/channel/channel_stack.cc @@ -2270,7 +2269,6 @@ add_library(grpc src/core/lib/compression/compression_internal.cc src/core/lib/compression/message_compress.cc src/core/lib/config/core_configuration.cc - src/core/lib/debug/event_log.cc src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc src/core/lib/event_engine/ares_resolver.cc @@ -2321,19 +2319,6 @@ add_library(grpc src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/posix/directory_reader.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc - src/core/lib/gprpp/uuid_v4.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/windows/directory_reader.cc - src/core/lib/gprpp/work_serializer.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -2357,11 +2342,6 @@ add_library(grpc src/core/lib/iomgr/executor.cc src/core/lib/iomgr/fork_posix.cc src/core/lib/iomgr/fork_windows.cc - src/core/lib/iomgr/gethostname_fallback.cc - src/core/lib/iomgr/gethostname_host_name_max.cc - src/core/lib/iomgr/gethostname_sysconf.cc - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc src/core/lib/iomgr/internal_errqueue.cc src/core/lib/iomgr/iocp_windows.cc src/core/lib/iomgr/iomgr.cc @@ -2410,7 +2390,6 @@ add_library(grpc src/core/lib/iomgr/wakeup_fd_nospecial.cc src/core/lib/iomgr/wakeup_fd_pipe.cc src/core/lib/iomgr/wakeup_fd_posix.cc - src/core/lib/matchers/matchers.cc src/core/lib/promise/activity.cc src/core/lib/promise/party.cc src/core/lib/promise/sleep.cc @@ -2530,7 +2509,6 @@ add_library(grpc src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc - src/core/lib/uri/uri_parser.cc src/core/load_balancing/address_filtering.cc src/core/load_balancing/backend_metric_parser.cc src/core/load_balancing/child_policy_handler.cc @@ -2623,7 +2601,16 @@ add_library(grpc src/core/tsi/ssl_transport_security_utils.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/backoff.cc + src/core/util/dump_args.cc + src/core/util/event_log.cc src/core/util/gcp_metadata_query.cc + src/core/util/gethostname_fallback.cc + src/core/util/gethostname_host_name_max.cc + src/core/util/gethostname_sysconf.cc + src/core/util/glob.cc + src/core/util/grpc_if_nametoindex_posix.cc + src/core/util/grpc_if_nametoindex_unsupported.cc src/core/util/http_client/format_request.cc src/core/util/http_client/httpcli.cc src/core/util/http_client/httpcli_security_connector.cc @@ -2633,6 +2620,20 @@ add_library(grpc src/core/util/json/json_util.cc src/core/util/json/json_writer.cc src/core/util/latent_see.cc + src/core/util/load_file.cc + src/core/util/matchers.cc + src/core/util/per_cpu.cc + src/core/util/posix/directory_reader.cc + src/core/util/random_early_detection.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc + src/core/util/uri.cc + src/core/util/uuid_v4.cc + src/core/util/validation_errors.cc + src/core/util/windows/directory_reader.cc + src/core/util/work_serializer.cc src/core/xds/grpc/certificate_provider_store.cc src/core/xds/grpc/file_watcher_certificate_provider_factory.cc src/core/xds/grpc/xds_audit_logger_registry.cc @@ -2662,10 +2663,10 @@ add_library(grpc src/core/xds/grpc/xds_routing.cc src/core/xds/grpc/xds_server_grpc.cc src/core/xds/grpc/xds_transport_grpc.cc + src/core/xds/xds_client/lrs_client.cc src/core/xds/xds_client/xds_api.cc src/core/xds/xds_client/xds_bootstrap.cc src/core/xds/xds_client/xds_client.cc - src/core/xds/xds_client/xds_client_stats.cc ) target_compile_features(grpc PUBLIC cxx_std_14) @@ -3062,8 +3063,6 @@ add_library(grpc_unsecure src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc src/core/lib/address_utils/parse_address.cc src/core/lib/address_utils/sockaddr_utils.cc - src/core/lib/backoff/backoff.cc - src/core/lib/backoff/random_early_detection.cc src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args_preconditioning.cc src/core/lib/channel/channel_stack.cc @@ -3076,7 +3075,6 @@ add_library(grpc_unsecure src/core/lib/compression/compression_internal.cc src/core/lib/compression/message_compress.cc src/core/lib/config/core_configuration.cc - src/core/lib/debug/event_log.cc src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc src/core/lib/event_engine/ares_resolver.cc @@ -3127,17 +3125,6 @@ add_library(grpc_unsecure src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc - src/core/lib/gprpp/uuid_v4.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -3161,11 +3148,6 @@ add_library(grpc_unsecure src/core/lib/iomgr/executor.cc src/core/lib/iomgr/fork_posix.cc src/core/lib/iomgr/fork_windows.cc - src/core/lib/iomgr/gethostname_fallback.cc - src/core/lib/iomgr/gethostname_host_name_max.cc - src/core/lib/iomgr/gethostname_sysconf.cc - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc src/core/lib/iomgr/internal_errqueue.cc src/core/lib/iomgr/iocp_windows.cc src/core/lib/iomgr/iomgr.cc @@ -3297,7 +3279,6 @@ add_library(grpc_unsecure src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc - src/core/lib/uri/uri_parser.cc src/core/load_balancing/address_filtering.cc src/core/load_balancing/backend_metric_parser.cc src/core/load_balancing/child_policy_handler.cc @@ -3353,6 +3334,15 @@ add_library(grpc_unsecure src/core/tsi/local_transport_security.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/backoff.cc + src/core/util/dump_args.cc + src/core/util/event_log.cc + src/core/util/gethostname_fallback.cc + src/core/util/gethostname_host_name_max.cc + src/core/util/gethostname_sysconf.cc + src/core/util/glob.cc + src/core/util/grpc_if_nametoindex_posix.cc + src/core/util/grpc_if_nametoindex_unsupported.cc src/core/util/http_client/format_request.cc src/core/util/http_client/httpcli.cc src/core/util/http_client/parser.cc @@ -3360,6 +3350,17 @@ add_library(grpc_unsecure src/core/util/json/json_reader.cc src/core/util/json/json_writer.cc src/core/util/latent_see.cc + src/core/util/load_file.cc + src/core/util/per_cpu.cc + src/core/util/random_early_detection.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc + src/core/util/uri.cc + src/core/util/uuid_v4.cc + src/core/util/validation_errors.cc + src/core/util/work_serializer.cc ${gRPC_ADDITIONAL_DLL_SRC} ) @@ -5283,7 +5284,6 @@ add_library(grpc_authorization_provider src/core/handshaker/security/security_handshaker.cc src/core/lib/address_utils/parse_address.cc src/core/lib/address_utils/sockaddr_utils.cc - src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args_preconditioning.cc src/core/lib/channel/channel_stack.cc @@ -5296,7 +5296,6 @@ add_library(grpc_authorization_provider src/core/lib/compression/compression_internal.cc src/core/lib/compression/message_compress.cc src/core/lib/config/core_configuration.cc - src/core/lib/debug/event_log.cc src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc src/core/lib/event_engine/ares_resolver.cc @@ -5347,16 +5346,6 @@ add_library(grpc_authorization_provider src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -5380,11 +5369,6 @@ add_library(grpc_authorization_provider src/core/lib/iomgr/executor.cc src/core/lib/iomgr/fork_posix.cc src/core/lib/iomgr/fork_windows.cc - src/core/lib/iomgr/gethostname_fallback.cc - src/core/lib/iomgr/gethostname_host_name_max.cc - src/core/lib/iomgr/gethostname_sysconf.cc - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc src/core/lib/iomgr/internal_errqueue.cc src/core/lib/iomgr/iocp_windows.cc src/core/lib/iomgr/iomgr.cc @@ -5433,7 +5417,6 @@ add_library(grpc_authorization_provider src/core/lib/iomgr/wakeup_fd_nospecial.cc src/core/lib/iomgr/wakeup_fd_pipe.cc src/core/lib/iomgr/wakeup_fd_posix.cc - src/core/lib/matchers/matchers.cc src/core/lib/promise/activity.cc src/core/lib/promise/party.cc src/core/lib/resource_quota/api.cc @@ -5514,7 +5497,6 @@ add_library(grpc_authorization_provider src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc - src/core/lib/uri/uri_parser.cc src/core/load_balancing/lb_policy.cc src/core/load_balancing/lb_policy_registry.cc src/core/resolver/endpoint_addresses.cc @@ -5529,9 +5511,28 @@ add_library(grpc_authorization_provider src/core/tsi/alts/handshaker/transport_security_common_api.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc + src/core/util/backoff.cc + src/core/util/dump_args.cc + src/core/util/event_log.cc + src/core/util/gethostname_fallback.cc + src/core/util/gethostname_host_name_max.cc + src/core/util/gethostname_sysconf.cc + src/core/util/glob.cc + src/core/util/grpc_if_nametoindex_posix.cc + src/core/util/grpc_if_nametoindex_unsupported.cc src/core/util/json/json_reader.cc src/core/util/json/json_writer.cc src/core/util/latent_see.cc + src/core/util/load_file.cc + src/core/util/matchers.cc + src/core/util/per_cpu.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc + src/core/util/uri.cc + src/core/util/validation_errors.cc + src/core/util/work_serializer.cc ) target_compile_features(grpc_authorization_provider PUBLIC cxx_std_14) @@ -6090,11 +6091,11 @@ if(gRPC_BUILD_TESTS) add_executable(activity_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/activity_test.cc ) if(WIN32 AND MSVC) @@ -6368,7 +6369,7 @@ if(gRPC_BUILD_TESTS) add_executable(all_ok_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/all_ok_test.cc ) if(WIN32 AND MSVC) @@ -7423,7 +7424,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(avl_test - test/core/avl/avl_test.cc + test/core/util/avl_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -7576,7 +7577,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(backoff_test - test/core/backoff/backoff_test.cc + test/core/util/backoff_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -8371,7 +8372,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(bitset_test - test/core/gprpp/bitset_test.cc + test/core/util/bitset_test.cc ) target_compile_features(bitset_test PUBLIC cxx_std_14) target_include_directories(bitset_test @@ -8657,12 +8658,6 @@ add_executable(call_filters_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -8691,7 +8686,13 @@ add_executable(call_filters_test src/core/lib/transport/parsed_metadata.cc src/core/lib/transport/status_conversion.cc src/core/lib/transport/timeout_encoding.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/transport/call_filters_test.cc ) if(WIN32 AND MSVC) @@ -8904,12 +8905,12 @@ if(gRPC_BUILD_TESTS) add_executable(call_state_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc src/core/lib/transport/call_state.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/transport/call_state_test.cc ) if(WIN32 AND MSVC) @@ -9011,7 +9012,6 @@ add_executable(call_utils_test src/core/handshaker/proxy_mapper_registry.cc src/core/lib/address_utils/parse_address.cc src/core/lib/address_utils/sockaddr_utils.cc - src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc src/core/lib/channel/channel_args_preconditioning.cc src/core/lib/channel/channel_stack.cc @@ -9024,7 +9024,6 @@ add_executable(call_utils_test src/core/lib/compression/compression_internal.cc src/core/lib/compression/message_compress.cc src/core/lib/config/core_configuration.cc - src/core/lib/debug/event_log.cc src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc src/core/lib/event_engine/ares_resolver.cc @@ -9075,16 +9074,6 @@ add_executable(call_utils_test src/core/lib/event_engine/work_queue/basic_work_queue.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/load_file.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc - src/core/lib/gprpp/validation_errors.cc - src/core/lib/gprpp/work_serializer.cc src/core/lib/iomgr/buffer_list.cc src/core/lib/iomgr/call_combiner.cc src/core/lib/iomgr/cfstream_handle.cc @@ -9108,11 +9097,6 @@ add_executable(call_utils_test src/core/lib/iomgr/executor.cc src/core/lib/iomgr/fork_posix.cc src/core/lib/iomgr/fork_windows.cc - src/core/lib/iomgr/gethostname_fallback.cc - src/core/lib/iomgr/gethostname_host_name_max.cc - src/core/lib/iomgr/gethostname_sysconf.cc - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc src/core/lib/iomgr/internal_errqueue.cc src/core/lib/iomgr/iocp_windows.cc src/core/lib/iomgr/iomgr.cc @@ -9218,7 +9202,6 @@ add_executable(call_utils_test src/core/lib/transport/timeout_encoding.cc src/core/lib/transport/transport.cc src/core/lib/transport/transport_op_string.cc - src/core/lib/uri/uri_parser.cc src/core/load_balancing/lb_policy.cc src/core/load_balancing/lb_policy_registry.cc src/core/resolver/endpoint_addresses.cc @@ -9231,8 +9214,26 @@ add_executable(call_utils_test src/core/telemetry/stats.cc src/core/telemetry/stats_data.cc src/core/tsi/alts/handshaker/transport_security_common_api.cc + src/core/util/backoff.cc + src/core/util/dump_args.cc + src/core/util/event_log.cc + src/core/util/gethostname_fallback.cc + src/core/util/gethostname_host_name_max.cc + src/core/util/gethostname_sysconf.cc + src/core/util/glob.cc + src/core/util/grpc_if_nametoindex_posix.cc + src/core/util/grpc_if_nametoindex_unsupported.cc src/core/util/json/json_writer.cc src/core/util/latent_see.cc + src/core/util/load_file.cc + src/core/util/per_cpu.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc + src/core/util/uri.cc + src/core/util/validation_errors.cc + src/core/util/work_serializer.cc test/core/call/call_utils_test.cc ) if(WIN32 AND MSVC) @@ -9658,11 +9659,6 @@ add_executable(cancel_callback_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -9679,7 +9675,12 @@ add_executable(cancel_callback_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/promise/cancel_callback_test.cc ) if(WIN32 AND MSVC) @@ -10758,11 +10759,6 @@ add_executable(chunked_vector_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -10779,8 +10775,13 @@ add_executable(chunked_vector_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc - test/core/gprpp/chunked_vector_test.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc + test/core/util/chunked_vector_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -12381,7 +12382,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(cpp_impl_of_test - test/core/gprpp/cpp_impl_of_test.cc + test/core/util/cpp_impl_of_test.cc ) target_compile_features(cpp_impl_of_test PUBLIC cxx_std_14) target_include_directories(cpp_impl_of_test @@ -12768,7 +12769,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(directory_reader_test - test/core/gprpp/directory_reader_test.cc + test/core/util/directory_reader_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -12957,7 +12958,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(down_cast_test - test/core/gprpp/down_cast_test.cc + test/core/util/down_cast_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -12999,7 +13000,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(dual_ref_counted_test - test/core/gprpp/dual_ref_counted_test.cc + test/core/util/dual_ref_counted_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -13086,8 +13087,8 @@ endif() if(gRPC_BUILD_TESTS) add_executable(dump_args_test - src/core/lib/gprpp/dump_args.cc - test/core/gprpp/dump_args_test.cc + src/core/util/dump_args.cc + test/core/util/dump_args_test.cc ) target_compile_features(dump_args_test PUBLIC cxx_std_14) target_include_directories(dump_args_test @@ -13513,9 +13514,9 @@ if(gRPC_BUILD_TESTS) add_executable(endpoint_config_test src/core/lib/channel/channel_args.cc src/core/lib/event_engine/channel_args_endpoint_config.cc - src/core/lib/gprpp/ref_counted_string.cc - src/core/lib/gprpp/time.cc src/core/lib/surface/channel_stack_type.cc + src/core/util/ref_counted_string.cc + src/core/util/time.cc test/core/event_engine/endpoint_config_test.cc ) if(WIN32 AND MSVC) @@ -13953,7 +13954,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(examine_stack_test - test/core/gprpp/examine_stack_test.cc + test/core/util/examine_stack_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -14061,11 +14062,6 @@ add_executable(exec_ctx_wakeup_scheduler_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -14076,7 +14072,12 @@ add_executable(exec_ctx_wakeup_scheduler_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/promise/exec_ctx_wakeup_scheduler_test.cc ) if(WIN32 AND MSVC) @@ -14855,11 +14856,6 @@ add_executable(flow_control_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -14877,7 +14873,12 @@ add_executable(flow_control_test src/core/lib/slice/slice_buffer.cc src/core/lib/slice/slice_string_helpers.cc src/core/lib/transport/bdp_estimator.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/transport/chttp2/flow_control_test.cc ) if(WIN32 AND MSVC) @@ -14934,11 +14935,6 @@ add_executable(for_each_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -14955,7 +14951,12 @@ add_executable(for_each_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/promise/for_each_test.cc ) if(WIN32 AND MSVC) @@ -15006,7 +15007,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(fork_test - test/core/gprpp/fork_test.cc + test/core/util/fork_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -15052,7 +15053,7 @@ add_executable(forkable_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc src/core/lib/event_engine/forkable.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/event_engine/forkable_test.cc ) if(WIN32 AND MSVC) @@ -15197,10 +15198,10 @@ add_executable(frame_test src/core/ext/transport/chttp2/transport/frame.cc src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/glob.cc test/core/transport/chttp2/frame_test.cc ) if(WIN32 AND MSVC) @@ -15461,7 +15462,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(glob_test - test/core/gprpp/glob_test.cc + test/core/util/glob_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -15586,6 +15587,48 @@ target_link_libraries(google_c2p_resolver_test ) +endif() +if(gRPC_BUILD_TESTS) + +add_executable(gpr_time_test + test/core/util/gpr_time_test.cc +) +if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(gpr_time_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() +endif() +target_compile_features(gpr_time_test PUBLIC cxx_std_14) +target_include_directories(gpr_time_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(gpr_time_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + grpc_test_util +) + + endif() if(gRPC_BUILD_TESTS) @@ -17462,7 +17505,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(host_port_test - test/core/gprpp/host_port_test.cc + test/core/util/host_port_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -18109,7 +18152,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(if_list_test - test/core/gprpp/if_list_test.cc + test/core/util/if_list_test.cc ) target_compile_features(if_list_test PUBLIC cxx_std_14) target_include_directories(if_list_test @@ -18423,11 +18466,11 @@ if(gRPC_BUILD_TESTS) add_executable(inter_activity_pipe_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/inter_activity_pipe_test.cc ) if(WIN32 AND MSVC) @@ -18522,11 +18565,6 @@ add_executable(interceptor_list_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -18543,7 +18581,12 @@ add_executable(interceptor_list_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/promise/interceptor_list_test.cc ) if(WIN32 AND MSVC) @@ -18905,7 +18948,7 @@ if(gRPC_BUILD_TESTS) add_executable(join_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/join_test.cc ) if(WIN32 AND MSVC) @@ -19307,11 +19350,11 @@ if(gRPC_BUILD_TESTS) add_executable(latch_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/latch_test.cc ) if(WIN32 AND MSVC) @@ -19586,7 +19629,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(load_file_test - test/core/gprpp/load_file_test.cc + test/core/util/load_file_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -19725,7 +19768,7 @@ if(gRPC_BUILD_TESTS) add_executable(loop_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/loop_test.cc ) if(WIN32 AND MSVC) @@ -19812,11 +19855,6 @@ add_executable(map_pipe_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -19833,7 +19871,12 @@ add_executable(map_pipe_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/promise/map_pipe_test.cc ) if(WIN32 AND MSVC) @@ -19883,7 +19926,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(match_test - test/core/gprpp/match_test.cc + test/core/util/match_test.cc ) target_compile_features(match_test PUBLIC cxx_std_14) target_include_directories(match_test @@ -19915,7 +19958,6 @@ endif() if(gRPC_BUILD_TESTS) add_executable(matchers_test - test/core/matchers/matchers_test.cc test/core/test_util/cmdline.cc test/core/test_util/fuzzer_util.cc test/core/test_util/grpc_profiler.cc @@ -19925,6 +19967,7 @@ add_executable(matchers_test test/core/test_util/resolve_localhost_ip46.cc test/core/test_util/slice_splitter.cc test/core/test_util/tracer_util.cc + test/core/util/matchers_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -20749,11 +20792,11 @@ if(gRPC_BUILD_TESTS) add_executable(mpsc_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/mpsc_test.cc ) if(WIN32 AND MSVC) @@ -20801,7 +20844,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(mpscq_test - test/core/gprpp/mpscq_test.cc + test/core/util/mpscq_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -20907,7 +20950,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(no_destruct_test - test/core/gprpp/no_destruct_test.cc + test/core/util/no_destruct_test.cc ) target_compile_features(no_destruct_test PUBLIC cxx_std_14) target_include_directories(no_destruct_test @@ -21167,7 +21210,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(notification_test - test/core/gprpp/notification_test.cc + test/core/util/notification_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -21252,11 +21295,11 @@ if(gRPC_BUILD_TESTS) add_executable(observable_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/observable_test.cc ) if(WIN32 AND MSVC) @@ -21404,7 +21447,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(orphanable_test - test/core/gprpp/orphanable_test.cc + test/core/util/orphanable_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -21681,7 +21724,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(overload_test - test/core/gprpp/overload_test.cc + test/core/util/overload_test.cc ) target_compile_features(overload_test PUBLIC cxx_std_14) target_include_directories(overload_test @@ -22049,10 +22092,6 @@ add_executable(periodic_update_test src/core/lib/debug/trace_flags.cc src/core/lib/experiments/config.cc src/core/lib/experiments/experiments.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc - src/core/lib/gprpp/status_helper.cc - src/core/lib/gprpp/time.cc src/core/lib/iomgr/closure.cc src/core/lib/iomgr/combiner.cc src/core/lib/iomgr/error.cc @@ -22063,7 +22102,11 @@ add_executable(periodic_update_test src/core/lib/slice/percent_encoding.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/status_helper.cc + src/core/util/time.cc test/core/resource_quota/periodic_update_test.cc ) if(WIN32 AND MSVC) @@ -23129,11 +23172,11 @@ if(gRPC_BUILD_TESTS) add_executable(promise_mutex_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/promise_mutex_test.cc ) if(WIN32 AND MSVC) @@ -23716,8 +23759,8 @@ endif() if(gRPC_BUILD_TESTS) add_executable(random_early_detection_test - src/core/lib/backoff/random_early_detection.cc - test/core/backoff/random_early_detection_test.cc + src/core/util/random_early_detection.cc + test/core/util/random_early_detection_test.cc ) target_compile_features(random_early_detection_test PUBLIC cxx_std_14) target_include_directories(random_early_detection_test @@ -23910,7 +23953,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(ref_counted_ptr_test - test/core/gprpp/ref_counted_ptr_test.cc + test/core/util/ref_counted_ptr_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -23952,7 +23995,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(ref_counted_test - test/core/gprpp/ref_counted_test.cc + test/core/util/ref_counted_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -24100,6 +24143,106 @@ endif() endif() if(gRPC_BUILD_TESTS) +add_executable(request_buffer_test + src/core/call/request_buffer.cc + src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c + src/core/ext/upb-gen/google/rpc/status.upb_minitable.c + src/core/lib/channel/channel_args.cc + src/core/lib/compression/compression.cc + src/core/lib/compression/compression_internal.cc + src/core/lib/debug/trace.cc + src/core/lib/debug/trace_flags.cc + src/core/lib/experiments/config.cc + src/core/lib/experiments/experiments.cc + src/core/lib/iomgr/closure.cc + src/core/lib/iomgr/combiner.cc + src/core/lib/iomgr/error.cc + src/core/lib/iomgr/exec_ctx.cc + src/core/lib/iomgr/executor.cc + src/core/lib/iomgr/iomgr_internal.cc + src/core/lib/promise/activity.cc + src/core/lib/promise/party.cc + src/core/lib/resource_quota/arena.cc + src/core/lib/resource_quota/connection_quota.cc + src/core/lib/resource_quota/memory_quota.cc + src/core/lib/resource_quota/periodic_update.cc + src/core/lib/resource_quota/resource_quota.cc + src/core/lib/resource_quota/thread_quota.cc + src/core/lib/slice/percent_encoding.cc + src/core/lib/slice/slice.cc + src/core/lib/slice/slice_buffer.cc + src/core/lib/slice/slice_string_helpers.cc + src/core/lib/surface/channel_stack_type.cc + src/core/lib/transport/call_arena_allocator.cc + src/core/lib/transport/call_filters.cc + src/core/lib/transport/call_final_info.cc + src/core/lib/transport/call_spine.cc + src/core/lib/transport/call_state.cc + src/core/lib/transport/error_utils.cc + src/core/lib/transport/message.cc + src/core/lib/transport/metadata.cc + src/core/lib/transport/metadata_batch.cc + src/core/lib/transport/parsed_metadata.cc + src/core/lib/transport/status_conversion.cc + src/core/lib/transport/timeout_encoding.cc + src/core/util/dump_args.cc + src/core/util/glob.cc + src/core/util/latent_see.cc + src/core/util/per_cpu.cc + src/core/util/ref_counted_string.cc + src/core/util/status_helper.cc + src/core/util/time.cc + test/core/call/request_buffer_test.cc +) +if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(request_buffer_test + PRIVATE + "GPR_DLL_IMPORTS" + ) + endif() +endif() +target_compile_features(request_buffer_test PUBLIC cxx_std_14) +target_include_directories(request_buffer_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(request_buffer_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + upb_mini_descriptor_lib + upb_wire_lib + absl::config + absl::no_destructor + absl::flat_hash_map + absl::inlined_vector + absl::function_ref + absl::hash + absl::type_traits + absl::statusor + absl::utility + gpr +) + + +endif() +if(gRPC_BUILD_TESTS) + add_executable(request_with_flags_test src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc src/core/ext/transport/chaotic_good/client_transport.cc @@ -27264,7 +27407,7 @@ if(gRPC_BUILD_TESTS) add_executable(seq_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/seq_test.cc ) if(WIN32 AND MSVC) @@ -28809,7 +28952,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(single_set_ptr_test - test/core/gprpp/single_set_ptr_test.cc + test/core/util/single_set_ptr_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -28894,9 +29037,9 @@ if(gRPC_BUILD_TESTS) add_executable(slice_string_helpers_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/glob.cc test/core/slice/slice_string_helpers_test.cc ) if(WIN32 AND MSVC) @@ -29120,7 +29263,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(sorted_pack_test - test/core/gprpp/sorted_pack_test.cc + test/core/util/sorted_pack_test.cc ) target_compile_features(sorted_pack_test PUBLIC cxx_std_14) target_include_directories(sorted_pack_test @@ -29328,7 +29471,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(stat_test - test/core/gprpp/stat_test.cc + test/core/util/stat_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -29548,7 +29691,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(status_helper_test - test/core/gprpp/status_helper_test.cc + test/core/util/status_helper_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -30118,7 +30261,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(table_test - test/core/gprpp/table_test.cc + test/core/util/table_test.cc ) target_compile_features(table_test PUBLIC cxx_std_14) target_include_directories(table_test @@ -30515,8 +30658,8 @@ if(gRPC_BUILD_TESTS) add_executable(test_core_event_engine_posix_timer_heap_test src/core/lib/event_engine/posix_engine/timer.cc src/core/lib/event_engine/posix_engine/timer_heap.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc test/core/event_engine/posix/timer_heap_test.cc ) if(WIN32 AND MSVC) @@ -30561,8 +30704,8 @@ if(gRPC_BUILD_TESTS) add_executable(test_core_event_engine_posix_timer_list_test src/core/lib/event_engine/posix_engine/timer.cc src/core/lib/event_engine/posix_engine/timer_heap.cc - src/core/lib/gprpp/time.cc - src/core/lib/gprpp/time_averaged_stats.cc + src/core/util/time.cc + src/core/util/time_averaged_stats.cc test/core/event_engine/posix/timer_list_test.cc ) if(WIN32 AND MSVC) @@ -30611,10 +30754,10 @@ add_executable(test_core_event_engine_slice_buffer_test src/core/lib/event_engine/resolved_address.cc src/core/lib/event_engine/slice.cc src/core/lib/event_engine/slice_buffer.cc - src/core/lib/gprpp/glob.cc src/core/lib/slice/slice.cc src/core/lib/slice/slice_buffer.cc src/core/lib/slice/slice_string_helpers.cc + src/core/util/glob.cc test/core/event_engine/slice_buffer_test.cc ) if(WIN32 AND MSVC) @@ -30656,49 +30799,6 @@ target_link_libraries(test_core_event_engine_slice_buffer_test ) -endif() -if(gRPC_BUILD_TESTS) - -add_executable(test_core_gprpp_time_test - src/core/lib/gprpp/time.cc - test/core/gprpp/time_test.cc -) -if(WIN32 AND MSVC) - if(BUILD_SHARED_LIBS) - target_compile_definitions(test_core_gprpp_time_test - PRIVATE - "GPR_DLL_IMPORTS" - ) - endif() -endif() -target_compile_features(test_core_gprpp_time_test PUBLIC cxx_std_14) -target_include_directories(test_core_gprpp_time_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(test_core_gprpp_time_test - ${_gRPC_ALLTARGETS_LIBRARIES} - gtest - absl::statusor - gpr -) - - endif() if(gRPC_BUILD_TESTS) @@ -31011,6 +31111,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(test_core_util_time_test + src/core/util/time.cc test/core/util/time_test.cc ) if(WIN32 AND MSVC) @@ -31018,7 +31119,6 @@ if(WIN32 AND MSVC) target_compile_definitions(test_core_util_time_test PRIVATE "GPR_DLL_IMPORTS" - "GRPC_DLL_IMPORTS" ) endif() endif() @@ -31045,7 +31145,8 @@ target_include_directories(test_core_util_time_test target_link_libraries(test_core_util_time_test ${_gRPC_ALLTARGETS_LIBRARIES} gtest - grpc_test_util + absl::statusor + gpr ) @@ -31342,7 +31443,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(thd_test - test/core/gprpp/thd_test.cc + test/core/util/thd_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -31676,7 +31777,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(time_util_test - test/core/gprpp/time_util_test.cc + test/core/util/time_util_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -32523,7 +32624,7 @@ if(gRPC_BUILD_TESTS) add_executable(try_join_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/try_join_test.cc ) if(WIN32 AND MSVC) @@ -32613,7 +32714,7 @@ if(gRPC_BUILD_TESTS) add_executable(try_seq_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/glob.cc + src/core/util/glob.cc test/core/promise/try_seq_test.cc ) if(WIN32 AND MSVC) @@ -32692,7 +32793,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(unique_type_name_test - test/core/gprpp/unique_type_name_test.cc + test/core/util/unique_type_name_test.cc ) target_compile_features(unique_type_name_test PUBLIC cxx_std_14) target_include_directories(unique_type_name_test @@ -32771,20 +32872,20 @@ target_link_libraries(unknown_frame_bad_client_test endif() if(gRPC_BUILD_TESTS) -add_executable(uri_parser_test - test/core/uri/uri_parser_test.cc +add_executable(uri_test + test/core/util/uri_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) - target_compile_definitions(uri_parser_test + target_compile_definitions(uri_test PRIVATE "GPR_DLL_IMPORTS" "GRPC_DLL_IMPORTS" ) endif() endif() -target_compile_features(uri_parser_test PUBLIC cxx_std_14) -target_include_directories(uri_parser_test +target_compile_features(uri_test PUBLIC cxx_std_14) +target_include_directories(uri_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include @@ -32803,7 +32904,7 @@ target_include_directories(uri_parser_test ${_gRPC_PROTO_GENS_DIR} ) -target_link_libraries(uri_parser_test +target_link_libraries(uri_test ${_gRPC_ALLTARGETS_LIBRARIES} gtest grpc_test_util_unsecure @@ -32848,7 +32949,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(uuid_v4_test - test/core/gprpp/uuid_v4_test.cc + test/core/util/uuid_v4_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -32890,7 +32991,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(validation_errors_test - test/core/gprpp/validation_errors_test.cc + test/core/util/validation_errors_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -32976,11 +33077,11 @@ if(gRPC_BUILD_TESTS) add_executable(wait_for_callback_test src/core/lib/debug/trace.cc src/core/lib/debug/trace_flags.cc - src/core/lib/gprpp/dump_args.cc - src/core/lib/gprpp/glob.cc - src/core/lib/gprpp/per_cpu.cc src/core/lib/promise/activity.cc + src/core/util/dump_args.cc + src/core/util/glob.cc src/core/util/latent_see.cc + src/core/util/per_cpu.cc test/core/promise/wait_for_callback_test.cc ) if(WIN32 AND MSVC) @@ -33522,7 +33623,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_executable(work_serializer_test test/core/event_engine/event_engine_test_utils.cc - test/core/gprpp/work_serializer_test.cc + test/core/util/work_serializer_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -33692,7 +33793,7 @@ if(gRPC_BUILD_TESTS) add_executable(write_size_policy_test src/core/ext/transport/chttp2/transport/write_size_policy.cc - src/core/lib/gprpp/time.cc + src/core/util/time.cc test/core/transport/chttp2/write_size_policy_test.cc ) if(WIN32 AND MSVC) @@ -35534,7 +35635,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) endif() endif() if(gRPC_BUILD_TESTS) -if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) +if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_executable(xds_fault_injection_end2end_test ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc diff --git a/Makefile b/Makefile index 35f58665d341e..2496f2c915495 100644 --- a/Makefile +++ b/Makefile @@ -367,8 +367,8 @@ E = @echo Q = @ endif -CORE_VERSION = 43.0.0 -CPP_VERSION = 1.67.0-dev +CORE_VERSION = 44.0.0 +CPP_VERSION = 1.68.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) @@ -404,7 +404,7 @@ SHARED_EXT_CORE = dll SHARED_EXT_CPP = dll SHARED_PREFIX = -SHARED_VERSION_CORE = -43 +SHARED_VERSION_CORE = -44 SHARED_VERSION_CPP = -1 else ifeq ($(SYSTEM),Darwin) EXECUTABLE_SUFFIX = @@ -1068,8 +1068,6 @@ LIBGRPC_SRC = \ src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc \ src/core/lib/address_utils/parse_address.cc \ src/core/lib/address_utils/sockaddr_utils.cc \ - src/core/lib/backoff/backoff.cc \ - src/core/lib/backoff/random_early_detection.cc \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_args_preconditioning.cc \ src/core/lib/channel/channel_stack.cc \ @@ -1085,7 +1083,6 @@ LIBGRPC_SRC = \ src/core/lib/config/config_vars_non_generated.cc \ src/core/lib/config/core_configuration.cc \ src/core/lib/config/load_config.cc \ - src/core/lib/debug/event_log.cc \ src/core/lib/debug/trace.cc \ src/core/lib/debug/trace_flags.cc \ src/core/lib/event_engine/ares_resolver.cc \ @@ -1137,34 +1134,6 @@ LIBGRPC_SRC = \ src/core/lib/event_engine/work_queue/basic_work_queue.cc \ src/core/lib/experiments/config.cc \ src/core/lib/experiments/experiments.cc \ - src/core/lib/gprpp/crash.cc \ - src/core/lib/gprpp/dump_args.cc \ - src/core/lib/gprpp/examine_stack.cc \ - src/core/lib/gprpp/fork.cc \ - src/core/lib/gprpp/glob.cc \ - src/core/lib/gprpp/host_port.cc \ - src/core/lib/gprpp/linux/env.cc \ - src/core/lib/gprpp/load_file.cc \ - src/core/lib/gprpp/mpscq.cc \ - src/core/lib/gprpp/per_cpu.cc \ - src/core/lib/gprpp/posix/directory_reader.cc \ - src/core/lib/gprpp/posix/env.cc \ - src/core/lib/gprpp/posix/stat.cc \ - src/core/lib/gprpp/posix/thd.cc \ - src/core/lib/gprpp/ref_counted_string.cc \ - src/core/lib/gprpp/status_helper.cc \ - src/core/lib/gprpp/strerror.cc \ - src/core/lib/gprpp/tchar.cc \ - src/core/lib/gprpp/time.cc \ - src/core/lib/gprpp/time_averaged_stats.cc \ - src/core/lib/gprpp/time_util.cc \ - src/core/lib/gprpp/uuid_v4.cc \ - src/core/lib/gprpp/validation_errors.cc \ - src/core/lib/gprpp/windows/directory_reader.cc \ - src/core/lib/gprpp/windows/env.cc \ - src/core/lib/gprpp/windows/stat.cc \ - src/core/lib/gprpp/windows/thd.cc \ - src/core/lib/gprpp/work_serializer.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -1188,11 +1157,6 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/executor.cc \ src/core/lib/iomgr/fork_posix.cc \ src/core/lib/iomgr/fork_windows.cc \ - src/core/lib/iomgr/gethostname_fallback.cc \ - src/core/lib/iomgr/gethostname_host_name_max.cc \ - src/core/lib/iomgr/gethostname_sysconf.cc \ - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc \ - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc \ src/core/lib/iomgr/internal_errqueue.cc \ src/core/lib/iomgr/iocp_windows.cc \ src/core/lib/iomgr/iomgr.cc \ @@ -1241,7 +1205,6 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/wakeup_fd_nospecial.cc \ src/core/lib/iomgr/wakeup_fd_pipe.cc \ src/core/lib/iomgr/wakeup_fd_posix.cc \ - src/core/lib/matchers/matchers.cc \ src/core/lib/promise/activity.cc \ src/core/lib/promise/party.cc \ src/core/lib/promise/sleep.cc \ @@ -1361,7 +1324,6 @@ LIBGRPC_SRC = \ src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/load_balancing/address_filtering.cc \ src/core/load_balancing/backend_metric_parser.cc \ src/core/load_balancing/child_policy_handler.cc \ @@ -1456,7 +1418,21 @@ LIBGRPC_SRC = \ src/core/tsi/transport_security_grpc.cc \ src/core/util/alloc.cc \ src/core/util/atm.cc \ + src/core/util/backoff.cc \ + src/core/util/crash.cc \ + src/core/util/dump_args.cc \ + src/core/util/event_log.cc \ + src/core/util/examine_stack.cc \ + src/core/util/fork.cc \ src/core/util/gcp_metadata_query.cc \ + src/core/util/gethostname_fallback.cc \ + src/core/util/gethostname_host_name_max.cc \ + src/core/util/gethostname_sysconf.cc \ + src/core/util/glob.cc \ + src/core/util/gpr_time.cc \ + src/core/util/grpc_if_nametoindex_posix.cc \ + src/core/util/grpc_if_nametoindex_unsupported.cc \ + src/core/util/host_port.cc \ src/core/util/http_client/format_request.cc \ src/core/util/http_client/httpcli.cc \ src/core/util/http_client/httpcli_security_connector.cc \ @@ -1468,24 +1444,48 @@ LIBGRPC_SRC = \ src/core/util/json/json_writer.cc \ src/core/util/latent_see.cc \ src/core/util/linux/cpu.cc \ + src/core/util/linux/env.cc \ + src/core/util/load_file.cc \ src/core/util/log.cc \ + src/core/util/matchers.cc \ + src/core/util/mpscq.cc \ src/core/util/msys/tmpfile.cc \ + src/core/util/per_cpu.cc \ src/core/util/posix/cpu.cc \ + src/core/util/posix/directory_reader.cc \ + src/core/util/posix/env.cc \ + src/core/util/posix/stat.cc \ src/core/util/posix/string.cc \ src/core/util/posix/sync.cc \ + src/core/util/posix/thd.cc \ src/core/util/posix/time.cc \ src/core/util/posix/tmpfile.cc \ + src/core/util/random_early_detection.cc \ + src/core/util/ref_counted_string.cc \ + src/core/util/status_helper.cc \ + src/core/util/strerror.cc \ src/core/util/string.cc \ src/core/util/sync.cc \ src/core/util/sync_abseil.cc \ + src/core/util/tchar.cc \ src/core/util/time.cc \ + src/core/util/time_averaged_stats.cc \ src/core/util/time_precise.cc \ + src/core/util/time_util.cc \ + src/core/util/uri.cc \ + src/core/util/uuid_v4.cc \ + src/core/util/validation_errors.cc \ src/core/util/windows/cpu.cc \ + src/core/util/windows/directory_reader.cc \ + src/core/util/windows/env.cc \ + src/core/util/windows/stat.cc \ src/core/util/windows/string.cc \ src/core/util/windows/string_util.cc \ src/core/util/windows/sync.cc \ + src/core/util/windows/thd.cc \ src/core/util/windows/time.cc \ src/core/util/windows/tmpfile.cc \ + src/core/util/work_serializer.cc \ src/core/xds/grpc/certificate_provider_store.cc \ src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \ src/core/xds/grpc/xds_audit_logger_registry.cc \ @@ -1515,10 +1515,10 @@ LIBGRPC_SRC = \ src/core/xds/grpc/xds_routing.cc \ src/core/xds/grpc/xds_server_grpc.cc \ src/core/xds/grpc/xds_transport_grpc.cc \ + src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_client.cc \ - src/core/xds/xds_client/xds_client_stats.cc \ third_party/abseil-cpp/absl/base/internal/cycleclock.cc \ third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc \ third_party/abseil-cpp/absl/base/internal/raw_logging.cc \ @@ -1848,8 +1848,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_ ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libcares.a $(OPENSSL_MERGE_LIBS) $(ZLIB_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.43 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libcares.a $(OPENSSL_MERGE_LIBS) $(ZLIB_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.43 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.44 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libcares.a $(OPENSSL_MERGE_LIBS) $(ZLIB_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.44 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif endif @@ -1984,6 +1984,8 @@ LIBBORINGSSL_SRC = \ third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c \ third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c \ third_party/boringssl-with-bazel/src/crypto/mem.c \ + third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.c \ + third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc \ third_party/boringssl-with-bazel/src/crypto/obj/obj.c \ third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c \ third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c \ @@ -2004,12 +2006,14 @@ LIBBORINGSSL_SRC = \ third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c \ third_party/boringssl-with-bazel/src/crypto/pool/pool.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/fork_detect.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/getentropy.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/urandom.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c \ third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c \ third_party/boringssl-with-bazel/src/crypto/refcount.c \ diff --git a/Package.swift b/Package.swift index a550e5f6dac23..26ab8a93c4e53 100644 --- a/Package.swift +++ b/Package.swift @@ -1093,11 +1093,6 @@ let package = Package( "src/core/lib/address_utils/parse_address.h", "src/core/lib/address_utils/sockaddr_utils.cc", "src/core/lib/address_utils/sockaddr_utils.h", - "src/core/lib/avl/avl.h", - "src/core/lib/backoff/backoff.cc", - "src/core/lib/backoff/backoff.h", - "src/core/lib/backoff/random_early_detection.cc", - "src/core/lib/backoff/random_early_detection.h", "src/core/lib/channel/call_finalization.h", "src/core/lib/channel/channel_args.cc", "src/core/lib/channel/channel_args.h", @@ -1128,8 +1123,6 @@ let package = Package( "src/core/lib/config/core_configuration.h", "src/core/lib/config/load_config.cc", "src/core/lib/config/load_config.h", - "src/core/lib/debug/event_log.cc", - "src/core/lib/debug/event_log.h", "src/core/lib/debug/trace.cc", "src/core/lib/debug/trace.h", "src/core/lib/debug/trace_flags.cc", @@ -1250,83 +1243,6 @@ let package = Package( "src/core/lib/experiments/config.h", "src/core/lib/experiments/experiments.cc", "src/core/lib/experiments/experiments.h", - "src/core/lib/gprpp/atomic_utils.h", - "src/core/lib/gprpp/bitset.h", - "src/core/lib/gprpp/chunked_vector.h", - "src/core/lib/gprpp/construct_destruct.h", - "src/core/lib/gprpp/cpp_impl_of.h", - "src/core/lib/gprpp/crash.cc", - "src/core/lib/gprpp/crash.h", - "src/core/lib/gprpp/debug_location.h", - "src/core/lib/gprpp/directory_reader.h", - "src/core/lib/gprpp/down_cast.h", - "src/core/lib/gprpp/dual_ref_counted.h", - "src/core/lib/gprpp/dump_args.cc", - "src/core/lib/gprpp/dump_args.h", - "src/core/lib/gprpp/env.h", - "src/core/lib/gprpp/examine_stack.cc", - "src/core/lib/gprpp/examine_stack.h", - "src/core/lib/gprpp/fork.cc", - "src/core/lib/gprpp/fork.h", - "src/core/lib/gprpp/glob.cc", - "src/core/lib/gprpp/glob.h", - "src/core/lib/gprpp/host_port.cc", - "src/core/lib/gprpp/host_port.h", - "src/core/lib/gprpp/if_list.h", - "src/core/lib/gprpp/linux/env.cc", - "src/core/lib/gprpp/load_file.cc", - "src/core/lib/gprpp/load_file.h", - "src/core/lib/gprpp/manual_constructor.h", - "src/core/lib/gprpp/match.h", - "src/core/lib/gprpp/memory.h", - "src/core/lib/gprpp/mpscq.cc", - "src/core/lib/gprpp/mpscq.h", - "src/core/lib/gprpp/no_destruct.h", - "src/core/lib/gprpp/notification.h", - "src/core/lib/gprpp/orphanable.h", - "src/core/lib/gprpp/overload.h", - "src/core/lib/gprpp/packed_table.h", - "src/core/lib/gprpp/per_cpu.cc", - "src/core/lib/gprpp/per_cpu.h", - "src/core/lib/gprpp/posix/directory_reader.cc", - "src/core/lib/gprpp/posix/env.cc", - "src/core/lib/gprpp/posix/stat.cc", - "src/core/lib/gprpp/posix/thd.cc", - "src/core/lib/gprpp/ref_counted.h", - "src/core/lib/gprpp/ref_counted_ptr.h", - "src/core/lib/gprpp/ref_counted_string.cc", - "src/core/lib/gprpp/ref_counted_string.h", - "src/core/lib/gprpp/single_set_ptr.h", - "src/core/lib/gprpp/sorted_pack.h", - "src/core/lib/gprpp/stat.h", - "src/core/lib/gprpp/status_helper.cc", - "src/core/lib/gprpp/status_helper.h", - "src/core/lib/gprpp/strerror.cc", - "src/core/lib/gprpp/strerror.h", - "src/core/lib/gprpp/sync.h", - "src/core/lib/gprpp/table.h", - "src/core/lib/gprpp/tchar.cc", - "src/core/lib/gprpp/tchar.h", - "src/core/lib/gprpp/thd.h", - "src/core/lib/gprpp/time.cc", - "src/core/lib/gprpp/time.h", - "src/core/lib/gprpp/time_averaged_stats.cc", - "src/core/lib/gprpp/time_averaged_stats.h", - "src/core/lib/gprpp/time_util.cc", - "src/core/lib/gprpp/time_util.h", - "src/core/lib/gprpp/type_list.h", - "src/core/lib/gprpp/unique_type_name.h", - "src/core/lib/gprpp/uuid_v4.cc", - "src/core/lib/gprpp/uuid_v4.h", - "src/core/lib/gprpp/validation_errors.cc", - "src/core/lib/gprpp/validation_errors.h", - "src/core/lib/gprpp/windows/directory_reader.cc", - "src/core/lib/gprpp/windows/env.cc", - "src/core/lib/gprpp/windows/stat.cc", - "src/core/lib/gprpp/windows/thd.cc", - "src/core/lib/gprpp/work_serializer.cc", - "src/core/lib/gprpp/work_serializer.h", - "src/core/lib/gprpp/xxhash_inline.h", "src/core/lib/iomgr/block_annotate.h", "src/core/lib/iomgr/buffer_list.cc", "src/core/lib/iomgr/buffer_list.h", @@ -1371,13 +1287,6 @@ let package = Package( "src/core/lib/iomgr/executor.h", "src/core/lib/iomgr/fork_posix.cc", "src/core/lib/iomgr/fork_windows.cc", - "src/core/lib/iomgr/gethostname.h", - "src/core/lib/iomgr/gethostname_fallback.cc", - "src/core/lib/iomgr/gethostname_host_name_max.cc", - "src/core/lib/iomgr/gethostname_sysconf.cc", - "src/core/lib/iomgr/grpc_if_nametoindex.h", - "src/core/lib/iomgr/grpc_if_nametoindex_posix.cc", - "src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc", "src/core/lib/iomgr/internal_errqueue.cc", "src/core/lib/iomgr/internal_errqueue.h", "src/core/lib/iomgr/iocp_windows.cc", @@ -1468,8 +1377,6 @@ let package = Package( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.cc", "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/matchers/matchers.cc", - "src/core/lib/matchers/matchers.h", "src/core/lib/promise/activity.cc", "src/core/lib/promise/activity.h", "src/core/lib/promise/all_ok.h", @@ -1734,8 +1641,6 @@ let package = Package( "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_fwd.h", "src/core/lib/transport/transport_op_string.cc", - "src/core/lib/uri/uri_parser.cc", - "src/core/lib/uri/uri_parser.h", "src/core/load_balancing/address_filtering.cc", "src/core/load_balancing/address_filtering.h", "src/core/load_balancing/backend_metric_data.h", @@ -1920,8 +1825,43 @@ let package = Package( "src/core/util/alloc.cc", "src/core/util/alloc.h", "src/core/util/atm.cc", + "src/core/util/atomic_utils.h", + "src/core/util/avl.h", + "src/core/util/backoff.cc", + "src/core/util/backoff.h", + "src/core/util/bitset.h", + "src/core/util/chunked_vector.h", + "src/core/util/construct_destruct.h", + "src/core/util/cpp_impl_of.h", + "src/core/util/crash.cc", + "src/core/util/crash.h", + "src/core/util/debug_location.h", + "src/core/util/directory_reader.h", + "src/core/util/down_cast.h", + "src/core/util/dual_ref_counted.h", + "src/core/util/dump_args.cc", + "src/core/util/dump_args.h", + "src/core/util/env.h", + "src/core/util/event_log.cc", + "src/core/util/event_log.h", + "src/core/util/examine_stack.cc", + "src/core/util/examine_stack.h", + "src/core/util/fork.cc", + "src/core/util/fork.h", "src/core/util/gcp_metadata_query.cc", "src/core/util/gcp_metadata_query.h", + "src/core/util/gethostname.h", + "src/core/util/gethostname_fallback.cc", + "src/core/util/gethostname_host_name_max.cc", + "src/core/util/gethostname_sysconf.cc", + "src/core/util/glob.cc", + "src/core/util/glob.h", + "src/core/util/gpr_time.cc", + "src/core/util/grpc_if_nametoindex.h", + "src/core/util/grpc_if_nametoindex_posix.cc", + "src/core/util/grpc_if_nametoindex_unsupported.cc", + "src/core/util/host_port.cc", + "src/core/util/host_port.h", "src/core/util/http_client/format_request.cc", "src/core/util/http_client/format_request.h", "src/core/util/http_client/httpcli.cc", @@ -1930,6 +1870,7 @@ let package = Package( "src/core/util/http_client/httpcli_ssl_credentials.h", "src/core/util/http_client/parser.cc", "src/core/util/http_client/parser.h", + "src/core/util/if_list.h", "src/core/util/iphone/cpu.cc", "src/core/util/json/json.h", "src/core/util/json/json_args.h", @@ -1945,33 +1886,92 @@ let package = Package( "src/core/util/latent_see.cc", "src/core/util/latent_see.h", "src/core/util/linux/cpu.cc", + "src/core/util/linux/env.cc", + "src/core/util/load_file.cc", + "src/core/util/load_file.h", "src/core/util/log.cc", "src/core/util/lru_cache.h", + "src/core/util/manual_constructor.h", + "src/core/util/match.h", + "src/core/util/matchers.cc", + "src/core/util/matchers.h", + "src/core/util/memory.h", + "src/core/util/mpscq.cc", + "src/core/util/mpscq.h", "src/core/util/msys/tmpfile.cc", + "src/core/util/no_destruct.h", + "src/core/util/notification.h", + "src/core/util/orphanable.h", + "src/core/util/overload.h", + "src/core/util/packed_table.h", + "src/core/util/per_cpu.cc", + "src/core/util/per_cpu.h", "src/core/util/posix/cpu.cc", + "src/core/util/posix/directory_reader.cc", + "src/core/util/posix/env.cc", + "src/core/util/posix/stat.cc", "src/core/util/posix/string.cc", "src/core/util/posix/sync.cc", + "src/core/util/posix/thd.cc", "src/core/util/posix/time.cc", "src/core/util/posix/tmpfile.cc", + "src/core/util/random_early_detection.cc", + "src/core/util/random_early_detection.h", + "src/core/util/ref_counted.h", + "src/core/util/ref_counted_ptr.h", + "src/core/util/ref_counted_string.cc", + "src/core/util/ref_counted_string.h", "src/core/util/ring_buffer.h", + "src/core/util/single_set_ptr.h", + "src/core/util/sorted_pack.h", "src/core/util/spinlock.h", + "src/core/util/stat.h", + "src/core/util/status_helper.cc", + "src/core/util/status_helper.h", + "src/core/util/strerror.cc", + "src/core/util/strerror.h", "src/core/util/string.cc", "src/core/util/string.h", "src/core/util/sync.cc", + "src/core/util/sync.h", "src/core/util/sync_abseil.cc", + "src/core/util/table.h", + "src/core/util/tchar.cc", + "src/core/util/tchar.h", + "src/core/util/thd.h", "src/core/util/time.cc", + "src/core/util/time.h", + "src/core/util/time_averaged_stats.cc", + "src/core/util/time_averaged_stats.h", "src/core/util/time_precise.cc", "src/core/util/time_precise.h", + "src/core/util/time_util.cc", + "src/core/util/time_util.h", "src/core/util/tmpfile.h", + "src/core/util/type_list.h", "src/core/util/unique_ptr_with_bitset.h", + "src/core/util/unique_type_name.h", "src/core/util/upb_utils.h", + "src/core/util/uri.cc", + "src/core/util/uri.h", "src/core/util/useful.h", + "src/core/util/uuid_v4.cc", + "src/core/util/uuid_v4.h", + "src/core/util/validation_errors.cc", + "src/core/util/validation_errors.h", "src/core/util/windows/cpu.cc", + "src/core/util/windows/directory_reader.cc", + "src/core/util/windows/env.cc", + "src/core/util/windows/stat.cc", "src/core/util/windows/string.cc", "src/core/util/windows/string_util.cc", "src/core/util/windows/sync.cc", + "src/core/util/windows/thd.cc", "src/core/util/windows/time.cc", "src/core/util/windows/tmpfile.cc", + "src/core/util/work_serializer.cc", + "src/core/util/work_serializer.h", + "src/core/util/xxhash_inline.h", "src/core/xds/grpc/certificate_provider_store.cc", "src/core/xds/grpc/certificate_provider_store.h", "src/core/xds/grpc/file_watcher_certificate_provider_factory.cc", @@ -2031,6 +2031,8 @@ let package = Package( "src/core/xds/grpc/xds_server_grpc.h", "src/core/xds/grpc/xds_transport_grpc.cc", "src/core/xds/grpc/xds_transport_grpc.h", + "src/core/xds/xds_client/lrs_client.cc", + "src/core/xds/xds_client/lrs_client.h", "src/core/xds/xds_client/xds_api.cc", "src/core/xds/xds_client/xds_api.h", "src/core/xds/xds_client/xds_bootstrap.cc", @@ -2038,8 +2040,7 @@ let package = Package( "src/core/xds/xds_client/xds_channel_args.h", "src/core/xds/xds_client/xds_client.cc", "src/core/xds/xds_client/xds_client.h", - "src/core/xds/xds_client/xds_client_stats.cc", - "src/core/xds/xds_client/xds_client_stats.h", + "src/core/xds/xds_client/xds_locality.h", "src/core/xds/xds_client/xds_metrics.h", "src/core/xds/xds_client/xds_resource_type.h", "src/core/xds/xds_client/xds_resource_type_impl.h", diff --git a/_metadata.py b/_metadata.py index 4e8ea32870817..26d84a74ff49d 100644 --- a/_metadata.py +++ b/_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!! -__version__ = """1.67.0.dev0""" +__version__ = """1.68.0.dev0""" diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 108ef7a696eb2..0709155657e66 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -35,6 +35,7 @@ EXPERIMENT_ENABLES = { "server_privacy": "server_privacy", "tcp_frame_size_tuning": "tcp_frame_size_tuning", "tcp_rcv_lowat": "tcp_rcv_lowat", + "time_caching_in_party": "time_caching_in_party", "trace_record_callops": "trace_record_callops", "unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size", "work_serializer_clears_time_cache": "work_serializer_clears_time_cache", diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f757bea94b087..e6fbf6304d8cb 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -35,11 +35,11 @@ def grpc_deps(): name = "boringssl", # Use github mirror instead of https://boringssl.googlesource.com/boringssl # to obtain a boringssl archive with consistent sha256 - sha256 = "7a35bebd0e1eecbc5bf5bbf5eec03e86686c356802b5540872119bd26f84ecc7", - strip_prefix = "boringssl-16c8d3db1af20fcc04b5190b25242aadcb1fbb30", + sha256 = "c70d519e4ee709b7a74410a5e3a937428b8198d793a3d771be3dd2086ae167c8", + strip_prefix = "boringssl-b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/16c8d3db1af20fcc04b5190b25242aadcb1fbb30.tar.gz", - "https://github.com/google/boringssl/archive/16c8d3db1af20fcc04b5190b25242aadcb1fbb30.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6.tar.gz", + "https://github.com/google/boringssl/archive/b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6.tar.gz", ], ) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 08c3edb035b61..eb15389df8824 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -55,25 +55,25 @@ libs: - src/core/lib/config/config_vars.h - src/core/lib/config/load_config.h - src/core/lib/event_engine/thread_local.h - - src/core/lib/gprpp/construct_destruct.h - - src/core/lib/gprpp/crash.h - - src/core/lib/gprpp/debug_location.h - - src/core/lib/gprpp/env.h - - src/core/lib/gprpp/examine_stack.h - - src/core/lib/gprpp/fork.h - - src/core/lib/gprpp/host_port.h - - src/core/lib/gprpp/memory.h - - src/core/lib/gprpp/mpscq.h - - src/core/lib/gprpp/no_destruct.h - - src/core/lib/gprpp/stat.h - - src/core/lib/gprpp/strerror.h - - src/core/lib/gprpp/sync.h - - src/core/lib/gprpp/tchar.h - - src/core/lib/gprpp/thd.h - - src/core/lib/gprpp/time_util.h - src/core/util/alloc.h + - src/core/util/construct_destruct.h + - src/core/util/crash.h + - src/core/util/debug_location.h + - src/core/util/env.h + - src/core/util/examine_stack.h + - src/core/util/fork.h + - src/core/util/host_port.h + - src/core/util/memory.h + - src/core/util/mpscq.h + - src/core/util/no_destruct.h + - src/core/util/stat.h + - src/core/util/strerror.h - src/core/util/string.h + - src/core/util/sync.h + - src/core/util/tchar.h + - src/core/util/thd.h - src/core/util/time_precise.h + - src/core/util/time_util.h - src/core/util/tmpfile.h - src/core/util/useful.h src: @@ -81,41 +81,41 @@ libs: - src/core/lib/config/config_vars_non_generated.cc - src/core/lib/config/load_config.cc - src/core/lib/event_engine/thread_local.cc - - src/core/lib/gprpp/crash.cc - - src/core/lib/gprpp/examine_stack.cc - - src/core/lib/gprpp/fork.cc - - src/core/lib/gprpp/host_port.cc - - src/core/lib/gprpp/linux/env.cc - - src/core/lib/gprpp/mpscq.cc - - src/core/lib/gprpp/posix/env.cc - - src/core/lib/gprpp/posix/stat.cc - - src/core/lib/gprpp/posix/thd.cc - - src/core/lib/gprpp/strerror.cc - - src/core/lib/gprpp/tchar.cc - - src/core/lib/gprpp/time_util.cc - - src/core/lib/gprpp/windows/env.cc - - src/core/lib/gprpp/windows/stat.cc - - src/core/lib/gprpp/windows/thd.cc - src/core/util/alloc.cc - src/core/util/atm.cc + - src/core/util/crash.cc + - src/core/util/examine_stack.cc + - src/core/util/fork.cc + - src/core/util/gpr_time.cc + - src/core/util/host_port.cc - src/core/util/iphone/cpu.cc - src/core/util/linux/cpu.cc + - src/core/util/linux/env.cc - src/core/util/log.cc + - src/core/util/mpscq.cc - src/core/util/msys/tmpfile.cc - src/core/util/posix/cpu.cc + - src/core/util/posix/env.cc + - src/core/util/posix/stat.cc - src/core/util/posix/string.cc - src/core/util/posix/sync.cc + - src/core/util/posix/thd.cc - src/core/util/posix/time.cc - src/core/util/posix/tmpfile.cc + - src/core/util/strerror.cc - src/core/util/string.cc - src/core/util/sync.cc - src/core/util/sync_abseil.cc - - src/core/util/time.cc + - src/core/util/tchar.cc - src/core/util/time_precise.cc + - src/core/util/time_util.cc - src/core/util/windows/cpu.cc + - src/core/util/windows/env.cc + - src/core/util/windows/stat.cc - src/core/util/windows/string.cc - src/core/util/windows/string_util.cc - src/core/util/windows/sync.cc + - src/core/util/windows/thd.cc - src/core/util/windows/time.cc - src/core/util/windows/tmpfile.cc deps: @@ -793,9 +793,6 @@ libs: - src/core/handshaker/tcp_connect/tcp_connect_handshaker.h - src/core/lib/address_utils/parse_address.h - src/core/lib/address_utils/sockaddr_utils.h - - src/core/lib/avl/avl.h - - src/core/lib/backoff/backoff.h - - src/core/lib/backoff/random_early_detection.h - src/core/lib/channel/call_finalization.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_args_preconditioning.h @@ -809,7 +806,6 @@ libs: - src/core/lib/compression/compression_internal.h - src/core/lib/compression/message_compress.h - src/core/lib/config/core_configuration.h - - src/core/lib/debug/event_log.h - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h @@ -878,39 +874,6 @@ libs: - src/core/lib/event_engine/work_queue/work_queue.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/directory_reader.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/if_list.h - - src/core/lib/gprpp/load_file.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/match.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/overload.h - - src/core/lib/gprpp/packed_table.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/single_set_ptr.h - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/table.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h - - src/core/lib/gprpp/type_list.h - - src/core/lib/gprpp/unique_type_name.h - - src/core/lib/gprpp/uuid_v4.h - - src/core/lib/gprpp/validation_errors.h - - src/core/lib/gprpp/work_serializer.h - - src/core/lib/gprpp/xxhash_inline.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -932,8 +895,6 @@ libs: - src/core/lib/iomgr/event_engine_shims/tcp_client.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h - - src/core/lib/iomgr/gethostname.h - - src/core/lib/iomgr/grpc_if_nametoindex.h - src/core/lib/iomgr/internal_errqueue.h - src/core/lib/iomgr/iocp_windows.h - src/core/lib/iomgr/iomgr.h @@ -976,7 +937,6 @@ libs: - src/core/lib/iomgr/vsock.h - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - - src/core/lib/matchers/matchers.h - src/core/lib/promise/activity.h - src/core/lib/promise/all_ok.h - src/core/lib/promise/arena_promise.h @@ -1118,7 +1078,6 @@ libs: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_fwd.h - - src/core/lib/uri/uri_parser.h - src/core/load_balancing/address_filtering.h - src/core/load_balancing/backend_metric_data.h - src/core/load_balancing/backend_metric_parser.h @@ -1208,11 +1167,26 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/backoff.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/directory_reader.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/event_log.h - src/core/util/gcp_metadata_query.h + - src/core/util/gethostname.h + - src/core/util/glob.h + - src/core/util/grpc_if_nametoindex.h - src/core/util/http_client/format_request.h - src/core/util/http_client/httpcli.h - src/core/util/http_client/httpcli_ssl_credentials.h - src/core/util/http_client/parser.h + - src/core/util/if_list.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -1221,11 +1195,37 @@ libs: - src/core/util/json/json_util.h - src/core/util/json/json_writer.h - src/core/util/latent_see.h + - src/core/util/load_file.h - src/core/util/lru_cache.h + - src/core/util/manual_constructor.h + - src/core/util/match.h + - src/core/util/matchers.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/overload.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/random_early_detection.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h - src/core/util/ring_buffer.h + - src/core/util/single_set_ptr.h + - src/core/util/sorted_pack.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h + - src/core/util/type_list.h - src/core/util/unique_ptr_with_bitset.h + - src/core/util/unique_type_name.h - src/core/util/upb_utils.h + - src/core/util/uri.h + - src/core/util/uuid_v4.h + - src/core/util/validation_errors.h + - src/core/util/work_serializer.h + - src/core/util/xxhash_inline.h - src/core/xds/grpc/certificate_provider_store.h - src/core/xds/grpc/file_watcher_certificate_provider_factory.h - src/core/xds/grpc/xds_audit_logger_registry.h @@ -1256,11 +1256,12 @@ libs: - src/core/xds/grpc/xds_routing.h - src/core/xds/grpc/xds_server_grpc.h - src/core/xds/grpc/xds_transport_grpc.h + - src/core/xds/xds_client/lrs_client.h - src/core/xds/xds_client/xds_api.h - src/core/xds/xds_client/xds_bootstrap.h - src/core/xds/xds_client/xds_channel_args.h - src/core/xds/xds_client/xds_client.h - - src/core/xds/xds_client/xds_client_stats.h + - src/core/xds/xds_client/xds_locality.h - src/core/xds/xds_client/xds_metrics.h - src/core/xds/xds_client/xds_resource_type.h - src/core/xds/xds_client/xds_resource_type_impl.h @@ -1670,8 +1671,6 @@ libs: - src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc - - src/core/lib/backoff/backoff.cc - - src/core/lib/backoff/random_early_detection.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc @@ -1684,7 +1683,6 @@ libs: - src/core/lib/compression/compression_internal.cc - src/core/lib/compression/message_compress.cc - src/core/lib/config/core_configuration.cc - - src/core/lib/debug/event_log.cc - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - src/core/lib/event_engine/ares_resolver.cc @@ -1735,19 +1733,6 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/load_file.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/posix/directory_reader.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc - - src/core/lib/gprpp/uuid_v4.cc - - src/core/lib/gprpp/validation_errors.cc - - src/core/lib/gprpp/windows/directory_reader.cc - - src/core/lib/gprpp/work_serializer.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -1771,11 +1756,6 @@ libs: - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc - src/core/lib/iomgr/fork_windows.cc - - src/core/lib/iomgr/gethostname_fallback.cc - - src/core/lib/iomgr/gethostname_host_name_max.cc - - src/core/lib/iomgr/gethostname_sysconf.cc - - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc - src/core/lib/iomgr/internal_errqueue.cc - src/core/lib/iomgr/iocp_windows.cc - src/core/lib/iomgr/iomgr.cc @@ -1824,7 +1804,6 @@ libs: - src/core/lib/iomgr/wakeup_fd_nospecial.cc - src/core/lib/iomgr/wakeup_fd_pipe.cc - src/core/lib/iomgr/wakeup_fd_posix.cc - - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc - src/core/lib/promise/party.cc - src/core/lib/promise/sleep.cc @@ -1944,7 +1923,6 @@ libs: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc - - src/core/lib/uri/uri_parser.cc - src/core/load_balancing/address_filtering.cc - src/core/load_balancing/backend_metric_parser.cc - src/core/load_balancing/child_policy_handler.cc @@ -2037,7 +2015,16 @@ libs: - src/core/tsi/ssl_transport_security_utils.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/backoff.cc + - src/core/util/dump_args.cc + - src/core/util/event_log.cc - src/core/util/gcp_metadata_query.cc + - src/core/util/gethostname_fallback.cc + - src/core/util/gethostname_host_name_max.cc + - src/core/util/gethostname_sysconf.cc + - src/core/util/glob.cc + - src/core/util/grpc_if_nametoindex_posix.cc + - src/core/util/grpc_if_nametoindex_unsupported.cc - src/core/util/http_client/format_request.cc - src/core/util/http_client/httpcli.cc - src/core/util/http_client/httpcli_security_connector.cc @@ -2047,6 +2034,20 @@ libs: - src/core/util/json/json_util.cc - src/core/util/json/json_writer.cc - src/core/util/latent_see.cc + - src/core/util/load_file.cc + - src/core/util/matchers.cc + - src/core/util/per_cpu.cc + - src/core/util/posix/directory_reader.cc + - src/core/util/random_early_detection.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc + - src/core/util/uri.cc + - src/core/util/uuid_v4.cc + - src/core/util/validation_errors.cc + - src/core/util/windows/directory_reader.cc + - src/core/util/work_serializer.cc - src/core/xds/grpc/certificate_provider_store.cc - src/core/xds/grpc/file_watcher_certificate_provider_factory.cc - src/core/xds/grpc/xds_audit_logger_registry.cc @@ -2076,10 +2077,10 @@ libs: - src/core/xds/grpc/xds_routing.cc - src/core/xds/grpc/xds_server_grpc.cc - src/core/xds/grpc/xds_transport_grpc.cc + - src/core/xds/xds_client/lrs_client.cc - src/core/xds/xds_client/xds_api.cc - src/core/xds/xds_client/xds_bootstrap.cc - src/core/xds/xds_client/xds_client.cc - - src/core/xds/xds_client/xds_client_stats.cc deps: - upb_json_lib - upb_textformat_lib @@ -2367,9 +2368,6 @@ libs: - src/core/handshaker/tcp_connect/tcp_connect_handshaker.h - src/core/lib/address_utils/parse_address.h - src/core/lib/address_utils/sockaddr_utils.h - - src/core/lib/avl/avl.h - - src/core/lib/backoff/backoff.h - - src/core/lib/backoff/random_early_detection.h - src/core/lib/channel/call_finalization.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_args_preconditioning.h @@ -2383,7 +2381,6 @@ libs: - src/core/lib/compression/compression_internal.h - src/core/lib/compression/message_compress.h - src/core/lib/config/core_configuration.h - - src/core/lib/debug/event_log.h - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h @@ -2452,37 +2449,6 @@ libs: - src/core/lib/event_engine/work_queue/work_queue.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/if_list.h - - src/core/lib/gprpp/load_file.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/match.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/overload.h - - src/core/lib/gprpp/packed_table.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/single_set_ptr.h - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/table.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h - - src/core/lib/gprpp/type_list.h - - src/core/lib/gprpp/unique_type_name.h - - src/core/lib/gprpp/uuid_v4.h - - src/core/lib/gprpp/validation_errors.h - - src/core/lib/gprpp/work_serializer.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -2504,8 +2470,6 @@ libs: - src/core/lib/iomgr/event_engine_shims/tcp_client.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h - - src/core/lib/iomgr/gethostname.h - - src/core/lib/iomgr/grpc_if_nametoindex.h - src/core/lib/iomgr/internal_errqueue.h - src/core/lib/iomgr/iocp_windows.h - src/core/lib/iomgr/iomgr.h @@ -2656,7 +2620,6 @@ libs: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_fwd.h - - src/core/lib/uri/uri_parser.h - src/core/load_balancing/address_filtering.h - src/core/load_balancing/backend_metric_data.h - src/core/load_balancing/backend_metric_parser.h @@ -2714,9 +2677,23 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/backoff.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/event_log.h + - src/core/util/gethostname.h + - src/core/util/glob.h + - src/core/util/grpc_if_nametoindex.h - src/core/util/http_client/format_request.h - src/core/util/http_client/httpcli.h - src/core/util/http_client/parser.h + - src/core/util/if_list.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_channel_args.h @@ -2724,10 +2701,34 @@ libs: - src/core/util/json/json_reader.h - src/core/util/json/json_writer.h - src/core/util/latent_see.h + - src/core/util/load_file.h + - src/core/util/manual_constructor.h + - src/core/util/match.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/overload.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/random_early_detection.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h - src/core/util/ring_buffer.h + - src/core/util/single_set_ptr.h + - src/core/util/sorted_pack.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h + - src/core/util/type_list.h - src/core/util/unique_ptr_with_bitset.h + - src/core/util/unique_type_name.h - src/core/util/upb_utils.h + - src/core/util/uri.h + - src/core/util/uuid_v4.h + - src/core/util/validation_errors.h + - src/core/util/work_serializer.h - third_party/upb/upb/generated_code_support.h src: - src/core/channelz/channel_trace.cc @@ -2825,8 +2826,6 @@ libs: - src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc - - src/core/lib/backoff/backoff.cc - - src/core/lib/backoff/random_early_detection.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc @@ -2839,7 +2838,6 @@ libs: - src/core/lib/compression/compression_internal.cc - src/core/lib/compression/message_compress.cc - src/core/lib/config/core_configuration.cc - - src/core/lib/debug/event_log.cc - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - src/core/lib/event_engine/ares_resolver.cc @@ -2890,17 +2888,6 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/load_file.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc - - src/core/lib/gprpp/uuid_v4.cc - - src/core/lib/gprpp/validation_errors.cc - - src/core/lib/gprpp/work_serializer.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -2924,11 +2911,6 @@ libs: - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc - src/core/lib/iomgr/fork_windows.cc - - src/core/lib/iomgr/gethostname_fallback.cc - - src/core/lib/iomgr/gethostname_host_name_max.cc - - src/core/lib/iomgr/gethostname_sysconf.cc - - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc - src/core/lib/iomgr/internal_errqueue.cc - src/core/lib/iomgr/iocp_windows.cc - src/core/lib/iomgr/iomgr.cc @@ -3060,7 +3042,6 @@ libs: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc - - src/core/lib/uri/uri_parser.cc - src/core/load_balancing/address_filtering.cc - src/core/load_balancing/backend_metric_parser.cc - src/core/load_balancing/child_policy_handler.cc @@ -3116,6 +3097,15 @@ libs: - src/core/tsi/local_transport_security.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/backoff.cc + - src/core/util/dump_args.cc + - src/core/util/event_log.cc + - src/core/util/gethostname_fallback.cc + - src/core/util/gethostname_host_name_max.cc + - src/core/util/gethostname_sysconf.cc + - src/core/util/glob.cc + - src/core/util/grpc_if_nametoindex_posix.cc + - src/core/util/grpc_if_nametoindex_unsupported.cc - src/core/util/http_client/format_request.cc - src/core/util/http_client/httpcli.cc - src/core/util/http_client/parser.cc @@ -3123,6 +3113,17 @@ libs: - src/core/util/json/json_reader.cc - src/core/util/json/json_writer.cc - src/core/util/latent_see.cc + - src/core/util/load_file.cc + - src/core/util/per_cpu.cc + - src/core/util/random_early_detection.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc + - src/core/util/uri.cc + - src/core/util/uuid_v4.cc + - src/core/util/validation_errors.cc + - src/core/util/work_serializer.cc deps: - upb_mini_descriptor_lib - upb_wire_lib @@ -4465,8 +4466,6 @@ libs: - src/core/handshaker/security/security_handshaker.h - src/core/lib/address_utils/parse_address.h - src/core/lib/address_utils/sockaddr_utils.h - - src/core/lib/avl/avl.h - - src/core/lib/backoff/backoff.h - src/core/lib/channel/call_finalization.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_args_preconditioning.h @@ -4480,7 +4479,6 @@ libs: - src/core/lib/compression/compression_internal.h - src/core/lib/compression/message_compress.h - src/core/lib/config/core_configuration.h - - src/core/lib/debug/event_log.h - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h @@ -4549,36 +4547,6 @@ libs: - src/core/lib/event_engine/work_queue/work_queue.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/if_list.h - - src/core/lib/gprpp/load_file.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/match.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/overload.h - - src/core/lib/gprpp/packed_table.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/single_set_ptr.h - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/table.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h - - src/core/lib/gprpp/type_list.h - - src/core/lib/gprpp/unique_type_name.h - - src/core/lib/gprpp/validation_errors.h - - src/core/lib/gprpp/work_serializer.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -4600,8 +4568,6 @@ libs: - src/core/lib/iomgr/event_engine_shims/tcp_client.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h - - src/core/lib/iomgr/gethostname.h - - src/core/lib/iomgr/grpc_if_nametoindex.h - src/core/lib/iomgr/internal_errqueue.h - src/core/lib/iomgr/iocp_windows.h - src/core/lib/iomgr/iomgr.h @@ -4644,7 +4610,6 @@ libs: - src/core/lib/iomgr/vsock.h - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - - src/core/lib/matchers/matchers.h - src/core/lib/promise/activity.h - src/core/lib/promise/all_ok.h - src/core/lib/promise/arena_promise.h @@ -4749,7 +4714,6 @@ libs: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_fwd.h - - src/core/lib/uri/uri_parser.h - src/core/load_balancing/backend_metric_data.h - src/core/load_balancing/lb_policy.h - src/core/load_balancing/lb_policy_factory.h @@ -4774,13 +4738,50 @@ libs: - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h - src/core/tsi/transport_security_interface.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/backoff.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/event_log.h + - src/core/util/gethostname.h + - src/core/util/glob.h + - src/core/util/grpc_if_nametoindex.h + - src/core/util/if_list.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_reader.h - src/core/util/json/json_writer.h - src/core/util/latent_see.h + - src/core/util/load_file.h + - src/core/util/manual_constructor.h + - src/core/util/match.h + - src/core/util/matchers.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/overload.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h - src/core/util/ring_buffer.h + - src/core/util/single_set_ptr.h + - src/core/util/sorted_pack.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h + - src/core/util/type_list.h + - src/core/util/unique_type_name.h + - src/core/util/uri.h + - src/core/util/validation_errors.h + - src/core/util/work_serializer.h - third_party/upb/upb/generated_code_support.h src: - src/core/channelz/channel_trace.cc @@ -4799,7 +4800,6 @@ libs: - src/core/handshaker/security/security_handshaker.cc - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc - - src/core/lib/backoff/backoff.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc @@ -4812,7 +4812,6 @@ libs: - src/core/lib/compression/compression_internal.cc - src/core/lib/compression/message_compress.cc - src/core/lib/config/core_configuration.cc - - src/core/lib/debug/event_log.cc - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - src/core/lib/event_engine/ares_resolver.cc @@ -4863,16 +4862,6 @@ libs: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/load_file.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc - - src/core/lib/gprpp/validation_errors.cc - - src/core/lib/gprpp/work_serializer.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -4896,11 +4885,6 @@ libs: - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc - src/core/lib/iomgr/fork_windows.cc - - src/core/lib/iomgr/gethostname_fallback.cc - - src/core/lib/iomgr/gethostname_host_name_max.cc - - src/core/lib/iomgr/gethostname_sysconf.cc - - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc - src/core/lib/iomgr/internal_errqueue.cc - src/core/lib/iomgr/iocp_windows.cc - src/core/lib/iomgr/iomgr.cc @@ -4949,7 +4933,6 @@ libs: - src/core/lib/iomgr/wakeup_fd_nospecial.cc - src/core/lib/iomgr/wakeup_fd_pipe.cc - src/core/lib/iomgr/wakeup_fd_posix.cc - - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc - src/core/lib/promise/party.cc - src/core/lib/resource_quota/api.cc @@ -5030,7 +5013,6 @@ libs: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc - - src/core/lib/uri/uri_parser.cc - src/core/load_balancing/lb_policy.cc - src/core/load_balancing/lb_policy_registry.cc - src/core/resolver/endpoint_addresses.cc @@ -5045,9 +5027,28 @@ libs: - src/core/tsi/alts/handshaker/transport_security_common_api.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc + - src/core/util/backoff.cc + - src/core/util/dump_args.cc + - src/core/util/event_log.cc + - src/core/util/gethostname_fallback.cc + - src/core/util/gethostname_host_name_max.cc + - src/core/util/gethostname_sysconf.cc + - src/core/util/glob.cc + - src/core/util/grpc_if_nametoindex_posix.cc + - src/core/util/grpc_if_nametoindex_unsupported.cc - src/core/util/json/json_reader.cc - src/core/util/json/json_writer.cc - src/core/util/latent_see.cc + - src/core/util/load_file.cc + - src/core/util/matchers.cc + - src/core/util/per_cpu.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc + - src/core/util/uri.cc + - src/core/util/validation_errors.cc + - src/core/util/work_serializer.cc deps: - upb_mini_descriptor_lib - upb_wire_lib @@ -5230,15 +5231,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/basic_seq.h @@ -5253,17 +5245,26 @@ targets: - src/core/lib/promise/promise.h - src/core/lib/promise/seq.h - src/core/lib/promise/wait_set.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/test_wakeup_schedulers.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/activity_test.cc deps: - gtest @@ -5395,8 +5396,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/all_ok.h - src/core/lib/promise/detail/join_state.h - src/core/lib/promise/detail/promise_like.h @@ -5404,10 +5403,12 @@ targets: - src/core/lib/promise/map.h - src/core/lib/promise/poll.h - src/core/lib/promise/status_flag.h + - src/core/util/bitset.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/all_ok_test.cc deps: - gtest @@ -5750,13 +5751,13 @@ targets: build: test language: c++ headers: - - src/core/lib/avl/avl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/down_cast.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h src: - - test/core/avl/avl_test.cc + - test/core/util/avl_test.cc deps: - gtest - absl/base:config @@ -5816,7 +5817,7 @@ targets: language: c++ headers: [] src: - - test/core/backoff/backoff_test.cc + - test/core/util/backoff_test.cc deps: - gtest - grpc_test_util @@ -6257,10 +6258,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/bitset.h + - src/core/util/bitset.h - src/core/util/useful.h src: - - test/core/gprpp/bitset_test.cc + - test/core/util/bitset_test.cc deps: - gtest - absl/log:check @@ -6405,7 +6406,6 @@ targets: - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.h - src/core/ext/upb-gen/google/rpc/status.upb.h - src/core/ext/upb-gen/google/rpc/status.upb_minitable.h - - src/core/lib/avl/avl.h - src/core/lib/channel/channel_args.h - src/core/lib/compression/compression_internal.h - src/core/lib/debug/trace.h @@ -6413,27 +6413,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/if_list.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/packed_table.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/table.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/type_list.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -6485,9 +6464,31 @@ targets: - src/core/lib/transport/simple_slice_based_metadata.h - src/core/lib/transport/status_conversion.h - src/core/lib/transport/timeout_encoding.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/glob.h + - src/core/util/if_list.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h - src/core/util/ring_buffer.h + - src/core/util/sorted_pack.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/type_list.h - test/core/promise/poll_matcher.h - third_party/upb/upb/generated_code_support.h src: @@ -6500,12 +6501,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -6534,7 +6529,13 @@ targets: - src/core/lib/transport/parsed_metadata.cc - src/core/lib/transport/status_conversion.cc - src/core/lib/transport/timeout_encoding.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/transport/call_filters_test.cc deps: - gtest @@ -6657,14 +6658,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/promise_factory.h @@ -6673,18 +6666,26 @@ targets: - src/core/lib/promise/poll.h - src/core/lib/promise/status_flag.h - src/core/lib/transport/call_state.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/poll_matcher.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc - src/core/lib/transport/call_state.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/transport/call_state_test.cc deps: - gtest @@ -6732,8 +6733,6 @@ targets: - src/core/handshaker/proxy_mapper_registry.h - src/core/lib/address_utils/parse_address.h - src/core/lib/address_utils/sockaddr_utils.h - - src/core/lib/avl/avl.h - - src/core/lib/backoff/backoff.h - src/core/lib/channel/call_finalization.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_args_preconditioning.h @@ -6747,7 +6746,6 @@ targets: - src/core/lib/compression/compression_internal.h - src/core/lib/compression/message_compress.h - src/core/lib/config/core_configuration.h - - src/core/lib/debug/event_log.h - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h @@ -6816,36 +6814,6 @@ targets: - src/core/lib/event_engine/work_queue/work_queue.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/if_list.h - - src/core/lib/gprpp/load_file.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/match.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/overload.h - - src/core/lib/gprpp/packed_table.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/single_set_ptr.h - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/table.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h - - src/core/lib/gprpp/type_list.h - - src/core/lib/gprpp/unique_type_name.h - - src/core/lib/gprpp/validation_errors.h - - src/core/lib/gprpp/work_serializer.h - src/core/lib/iomgr/block_annotate.h - src/core/lib/iomgr/buffer_list.h - src/core/lib/iomgr/call_combiner.h @@ -6867,8 +6835,6 @@ targets: - src/core/lib/iomgr/event_engine_shims/tcp_client.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h - - src/core/lib/iomgr/gethostname.h - - src/core/lib/iomgr/grpc_if_nametoindex.h - src/core/lib/iomgr/internal_errqueue.h - src/core/lib/iomgr/iocp_windows.h - src/core/lib/iomgr/iomgr.h @@ -6993,7 +6959,6 @@ targets: - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h - src/core/lib/transport/transport_fwd.h - - src/core/lib/uri/uri_parser.h - src/core/load_balancing/backend_metric_data.h - src/core/load_balancing/lb_policy.h - src/core/load_balancing/lb_policy_factory.h @@ -7015,12 +6980,48 @@ targets: - src/core/telemetry/stats_data.h - src/core/telemetry/tcp_tracer.h - src/core/tsi/alts/handshaker/transport_security_common_api.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/backoff.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/event_log.h + - src/core/util/gethostname.h + - src/core/util/glob.h + - src/core/util/grpc_if_nametoindex.h + - src/core/util/if_list.h - src/core/util/json/json.h - src/core/util/json/json_args.h - src/core/util/json/json_writer.h - src/core/util/latent_see.h + - src/core/util/load_file.h + - src/core/util/manual_constructor.h + - src/core/util/match.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/overload.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h - src/core/util/ring_buffer.h + - src/core/util/single_set_ptr.h + - src/core/util/sorted_pack.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h + - src/core/util/type_list.h + - src/core/util/unique_type_name.h + - src/core/util/uri.h + - src/core/util/validation_errors.h + - src/core/util/work_serializer.h - third_party/upb/upb/generated_code_support.h src: - src/core/channelz/channel_trace.cc @@ -7035,7 +7036,6 @@ targets: - src/core/handshaker/proxy_mapper_registry.cc - src/core/lib/address_utils/parse_address.cc - src/core/lib/address_utils/sockaddr_utils.cc - - src/core/lib/backoff/backoff.cc - src/core/lib/channel/channel_args.cc - src/core/lib/channel/channel_args_preconditioning.cc - src/core/lib/channel/channel_stack.cc @@ -7048,7 +7048,6 @@ targets: - src/core/lib/compression/compression_internal.cc - src/core/lib/compression/message_compress.cc - src/core/lib/config/core_configuration.cc - - src/core/lib/debug/event_log.cc - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - src/core/lib/event_engine/ares_resolver.cc @@ -7099,16 +7098,6 @@ targets: - src/core/lib/event_engine/work_queue/basic_work_queue.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/load_file.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc - - src/core/lib/gprpp/validation_errors.cc - - src/core/lib/gprpp/work_serializer.cc - src/core/lib/iomgr/buffer_list.cc - src/core/lib/iomgr/call_combiner.cc - src/core/lib/iomgr/cfstream_handle.cc @@ -7132,11 +7121,6 @@ targets: - src/core/lib/iomgr/executor.cc - src/core/lib/iomgr/fork_posix.cc - src/core/lib/iomgr/fork_windows.cc - - src/core/lib/iomgr/gethostname_fallback.cc - - src/core/lib/iomgr/gethostname_host_name_max.cc - - src/core/lib/iomgr/gethostname_sysconf.cc - - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc - - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc - src/core/lib/iomgr/internal_errqueue.cc - src/core/lib/iomgr/iocp_windows.cc - src/core/lib/iomgr/iomgr.cc @@ -7242,7 +7226,6 @@ targets: - src/core/lib/transport/timeout_encoding.cc - src/core/lib/transport/transport.cc - src/core/lib/transport/transport_op_string.cc - - src/core/lib/uri/uri_parser.cc - src/core/load_balancing/lb_policy.cc - src/core/load_balancing/lb_policy_registry.cc - src/core/resolver/endpoint_addresses.cc @@ -7255,8 +7238,26 @@ targets: - src/core/telemetry/stats.cc - src/core/telemetry/stats_data.cc - src/core/tsi/alts/handshaker/transport_security_common_api.cc + - src/core/util/backoff.cc + - src/core/util/dump_args.cc + - src/core/util/event_log.cc + - src/core/util/gethostname_fallback.cc + - src/core/util/gethostname_host_name_max.cc + - src/core/util/gethostname_sysconf.cc + - src/core/util/glob.cc + - src/core/util/grpc_if_nametoindex_posix.cc + - src/core/util/grpc_if_nametoindex_unsupported.cc - src/core/util/json/json_writer.cc - src/core/util/latent_see.cc + - src/core/util/load_file.cc + - src/core/util/per_cpu.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc + - src/core/util/uri.cc + - src/core/util/validation_errors.cc + - src/core/util/work_serializer.cc - test/core/call/call_utils_test.cc deps: - gtest @@ -7628,19 +7629,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -7672,9 +7660,22 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - third_party/upb/upb/generated_code_support.h src: - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c @@ -7683,11 +7684,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -7704,7 +7700,12 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/promise/cancel_callback_test.cc deps: - gtest @@ -8424,20 +8425,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/chunked_vector.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -8468,9 +8455,23 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - third_party/upb/upb/generated_code_support.h src: - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c @@ -8479,11 +8480,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -8500,8 +8496,13 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc - - test/core/gprpp/chunked_vector_test.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - test/core/util/chunked_vector_test.cc deps: - gtest - upb_mini_descriptor_lib @@ -8905,7 +8906,7 @@ targets: language: c++ headers: - src/core/lib/event_engine/common_closures.h - - src/core/lib/gprpp/notification.h + - src/core/util/notification.h src: - test/core/event_engine/common_closures_test.cc deps: @@ -9170,8 +9171,8 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/down_cast.h - src/core/lib/promise/context.h + - src/core/util/down_cast.h src: - test/core/promise/context_test.cc deps: @@ -9196,9 +9197,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/cpp_impl_of.h + - src/core/util/cpp_impl_of.h src: - - test/core/gprpp/cpp_impl_of_test.cc + - test/core/util/cpp_impl_of_test.cc deps: - gtest uses_polling: false @@ -9351,7 +9352,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/directory_reader_test.cc + - test/core/util/directory_reader_test.cc deps: - gtest - grpc_test_util @@ -9445,9 +9446,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/down_cast.h + - src/core/util/down_cast.h src: - - test/core/gprpp/down_cast_test.cc + - test/core/util/down_cast_test.cc deps: - gtest - absl/base:config @@ -9459,7 +9460,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/dual_ref_counted_test.cc + - test/core/util/dual_ref_counted_test.cc deps: - gtest - grpc_test_util @@ -9484,10 +9485,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/dump_args.h + - src/core/util/dump_args.h src: - - src/core/lib/gprpp/dump_args.cc - - test/core/gprpp/dump_args_test.cc + - src/core/util/dump_args.cc + - test/core/util/dump_args_test.cc deps: - gtest - absl/functional:any_invocable @@ -9744,24 +9745,24 @@ targets: build: test language: c++ headers: - - src/core/lib/avl/avl.h - src/core/lib/channel/channel_args.h - src/core/lib/event_engine/channel_args_endpoint_config.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dual_ref_counted.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/ref_counted_string.h - - src/core/lib/gprpp/time.h - src/core/lib/surface/channel_stack_type.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/orphanable.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h + - src/core/util/time.h src: - src/core/lib/channel/channel_args.cc - src/core/lib/event_engine/channel_args_endpoint_config.cc - - src/core/lib/gprpp/ref_counted_string.cc - - src/core/lib/gprpp/time.cc - src/core/lib/surface/channel_stack_type.cc + - src/core/util/ref_counted_string.cc + - src/core/util/time.cc - test/core/event_engine/endpoint_config_test.cc deps: - gtest @@ -9951,7 +9952,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/examine_stack_test.cc + - test/core/util/examine_stack_test.cc deps: - gtest - grpc_test_util @@ -9988,18 +9989,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -10018,9 +10007,21 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - third_party/upb/upb/generated_code_support.h src: - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c @@ -10029,11 +10030,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -10044,7 +10040,12 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/promise/exec_ctx_wakeup_scheduler_test.cc deps: - gtest @@ -10525,19 +10526,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -10570,9 +10558,22 @@ targets: - src/core/lib/slice/slice_string_helpers.h - src/core/lib/transport/bdp_estimator.h - src/core/lib/transport/http2_errors.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - third_party/upb/upb/generated_code_support.h src: - src/core/ext/transport/chttp2/transport/flow_control.cc @@ -10584,11 +10585,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -10606,7 +10602,12 @@ targets: - src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_string_helpers.cc - src/core/lib/transport/bdp_estimator.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/transport/chttp2/flow_control_test.cc deps: - gtest @@ -10635,19 +10636,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -10687,9 +10675,22 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - test/core/promise/test_wakeup_schedulers.h - third_party/upb/upb/generated_code_support.h src: @@ -10699,11 +10700,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -10720,7 +10716,12 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/promise/for_each_test.cc deps: - gtest @@ -10740,7 +10741,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/fork_test.cc + - test/core/util/fork_test.cc deps: - gtest - grpc_test_util @@ -10758,12 +10759,12 @@ targets: - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - src/core/lib/event_engine/forkable.h - - src/core/lib/gprpp/glob.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - src/core/lib/event_engine/forkable.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/event_engine/forkable_test.cc deps: - gtest @@ -10825,21 +10826,21 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/glob.h - src/core/lib/slice/slice.h - src/core/lib/slice/slice_buffer.h - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h - src/core/lib/transport/http2_errors.h + - src/core/util/glob.h src: - src/core/ext/transport/chttp2/transport/frame.cc - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/glob.cc - test/core/transport/chttp2/frame_test.cc deps: - gtest @@ -10929,7 +10930,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/glob_test.cc + - test/core/util/glob_test.cc deps: - gtest - grpc_test_util @@ -10958,6 +10959,17 @@ targets: deps: - gtest - grpc++_test_util +- name: gpr_time_test + gtest: true + build: test + language: c++ + headers: [] + src: + - test/core/util/gpr_time_test.cc + deps: + - gtest + - grpc_test_util + uses_polling: false - name: graceful_server_shutdown_test gtest: true build: test @@ -11814,7 +11826,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/host_port_test.cc + - test/core/util/host_port_test.cc deps: - gtest - grpc_test_util @@ -12143,9 +12155,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/if_list.h + - src/core/util/if_list.h src: - - test/core/gprpp/if_list_test.cc + - test/core/util/if_list_test.cc deps: - gtest uses_polling: false @@ -12271,14 +12283,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/basic_seq.h @@ -12289,17 +12293,25 @@ targets: - src/core/lib/promise/inter_activity_pipe.h - src/core/lib/promise/poll.h - src/core/lib/promise/seq.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/test_wakeup_schedulers.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/inter_activity_pipe_test.cc deps: - gtest @@ -12336,19 +12348,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -12380,9 +12379,22 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - test/core/promise/test_context.h - third_party/upb/upb/generated_code_support.h src: @@ -12392,11 +12404,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -12413,7 +12420,12 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/promise/interceptor_list_test.cc deps: - gtest @@ -12581,18 +12593,18 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/detail/join_state.h - src/core/lib/promise/detail/promise_like.h - src/core/lib/promise/join.h - src/core/lib/promise/map.h - src/core/lib/promise/poll.h + - src/core/util/bitset.h + - src/core/util/glob.h - test/core/promise/poll_matcher.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/join_test.cc deps: - gtest @@ -12831,15 +12843,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/basic_seq.h @@ -12853,17 +12856,26 @@ targets: - src/core/lib/promise/map.h - src/core/lib/promise/poll.h - src/core/lib/promise/seq.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/test_wakeup_schedulers.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/latch_test.cc deps: - gtest @@ -12954,7 +12966,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/load_file_test.cc + - test/core/util/load_file_test.cc deps: - gtest - grpc_test_util @@ -13011,7 +13023,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/detail/basic_seq.h - src/core/lib/promise/detail/promise_factory.h - src/core/lib/promise/detail/promise_like.h @@ -13019,10 +13030,11 @@ targets: - src/core/lib/promise/loop.h - src/core/lib/promise/poll.h - src/core/lib/promise/seq.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/loop_test.cc deps: - gtest @@ -13060,19 +13072,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/cpp_impl_of.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -13112,9 +13111,22 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - test/core/promise/test_wakeup_schedulers.h - third_party/upb/upb/generated_code_support.h src: @@ -13124,11 +13136,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -13145,7 +13152,12 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/promise/map_pipe_test.cc deps: - gtest @@ -13164,10 +13176,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/match.h - - src/core/lib/gprpp/overload.h + - src/core/util/match.h + - src/core/util/overload.h src: - - test/core/gprpp/match_test.cc + - test/core/util/match_test.cc deps: - gtest uses_polling: false @@ -13187,7 +13199,6 @@ targets: - test/core/test_util/slice_splitter.h - test/core/test_util/tracer_util.h src: - - test/core/matchers/matchers_test.cc - test/core/test_util/cmdline.cc - test/core/test_util/fuzzer_util.cc - test/core/test_util/grpc_profiler.cc @@ -13197,6 +13208,7 @@ targets: - test/core/test_util/resolve_localhost_ip46.cc - test/core/test_util/slice_splitter.cc - test/core/test_util/tracer_util.cc + - test/core/util/matchers_test.cc deps: - gtest - grpc_test_util @@ -13638,14 +13650,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/promise_factory.h @@ -13655,17 +13659,25 @@ targets: - src/core/lib/promise/poll.h - src/core/lib/promise/promise.h - src/core/lib/promise/wait_set.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/poll_matcher.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/mpsc_test.cc deps: - gtest @@ -13682,7 +13694,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/mpscq_test.cc + - test/core/util/mpscq_test.cc deps: - gtest - grpc_test_util @@ -13760,10 +13772,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/construct_destruct.h - - src/core/lib/gprpp/no_destruct.h + - src/core/util/construct_destruct.h + - src/core/util/no_destruct.h src: - - test/core/gprpp/no_destruct_test.cc + - test/core/util/no_destruct_test.cc deps: - gtest uses_polling: false @@ -13926,9 +13938,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/notification.h + - src/core/util/notification.h src: - - test/core/gprpp/notification_test.cc + - test/core/util/notification_test.cc deps: - gtest - gpr @@ -13951,15 +13963,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/promise_factory.h @@ -13969,17 +13972,26 @@ targets: - src/core/lib/promise/map.h - src/core/lib/promise/observable.h - src/core/lib/promise/poll.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/poll_matcher.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/observable_test.cc deps: - gtest @@ -14033,7 +14045,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/orphanable_test.cc + - test/core/util/orphanable_test.cc deps: - gtest - grpc_test_util @@ -14127,9 +14139,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/overload.h + - src/core/util/overload.h src: - - test/core/gprpp/overload_test.cc + - test/core/util/overload_test.cc deps: - gtest uses_polling: false @@ -14306,12 +14318,6 @@ targets: - src/core/lib/debug/trace_impl.h - src/core/lib/experiments/config.h - src/core/lib/experiments/experiments.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/manual_constructor.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/status_helper.h - - src/core/lib/gprpp/time.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/error.h @@ -14324,9 +14330,15 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/bitset.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/per_cpu.h - src/core/util/ring_buffer.h - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/time.h - third_party/upb/upb/generated_code_support.h src: - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c @@ -14335,10 +14347,6 @@ targets: - src/core/lib/debug/trace_flags.cc - src/core/lib/experiments/config.cc - src/core/lib/experiments/experiments.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - - src/core/lib/gprpp/status_helper.cc - - src/core/lib/gprpp/time.cc - src/core/lib/iomgr/closure.cc - src/core/lib/iomgr/combiner.cc - src/core/lib/iomgr/error.cc @@ -14349,7 +14357,11 @@ targets: - src/core/lib/slice/percent_encoding.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc - test/core/resource_quota/periodic_update_test.cc deps: - gtest @@ -14867,15 +14879,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/basic_seq.h @@ -14890,17 +14893,26 @@ targets: - src/core/lib/promise/promise.h - src/core/lib/promise/promise_mutex.h - src/core/lib/promise/seq.h + - src/core/util/atomic_utils.h + - src/core/util/bitset.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/test_wakeup_schedulers.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/promise_mutex_test.cc deps: - gtest @@ -15149,10 +15161,10 @@ targets: build: test language: c++ headers: - - src/core/lib/backoff/random_early_detection.h + - src/core/util/random_early_detection.h src: - - src/core/lib/backoff/random_early_detection.cc - - test/core/backoff/random_early_detection_test.cc + - src/core/util/random_early_detection.cc + - test/core/util/random_early_detection_test.cc deps: - gtest - absl/random:bit_gen_ref @@ -15223,7 +15235,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/ref_counted_ptr_test.cc + - test/core/util/ref_counted_ptr_test.cc deps: - gtest - grpc_test_util @@ -15233,7 +15245,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/ref_counted_test.cc + - test/core/util/ref_counted_test.cc deps: - gtest - grpc_test_util @@ -15315,6 +15327,174 @@ targets: - linux - posix - mac +- name: request_buffer_test + gtest: true + build: test + language: c++ + headers: + - src/core/call/request_buffer.h + - src/core/ext/upb-gen/google/protobuf/any.upb.h + - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.h + - src/core/ext/upb-gen/google/rpc/status.upb.h + - src/core/ext/upb-gen/google/rpc/status.upb_minitable.h + - src/core/lib/channel/channel_args.h + - src/core/lib/compression/compression_internal.h + - src/core/lib/debug/trace.h + - src/core/lib/debug/trace_flags.h + - src/core/lib/debug/trace_impl.h + - src/core/lib/event_engine/event_engine_context.h + - src/core/lib/experiments/config.h + - src/core/lib/experiments/experiments.h + - src/core/lib/iomgr/closure.h + - src/core/lib/iomgr/combiner.h + - src/core/lib/iomgr/error.h + - src/core/lib/iomgr/exec_ctx.h + - src/core/lib/iomgr/executor.h + - src/core/lib/iomgr/iomgr_internal.h + - src/core/lib/promise/activity.h + - src/core/lib/promise/context.h + - src/core/lib/promise/detail/basic_seq.h + - src/core/lib/promise/detail/promise_factory.h + - src/core/lib/promise/detail/promise_like.h + - 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/for_each.h + - src/core/lib/promise/if.h + - src/core/lib/promise/interceptor_list.h + - src/core/lib/promise/latch.h + - src/core/lib/promise/loop.h + - src/core/lib/promise/map.h + - src/core/lib/promise/party.h + - src/core/lib/promise/pipe.h + - src/core/lib/promise/poll.h + - src/core/lib/promise/prioritized_race.h + - src/core/lib/promise/promise.h + - src/core/lib/promise/race.h + - src/core/lib/promise/seq.h + - src/core/lib/promise/status_flag.h + - src/core/lib/promise/try_seq.h + - src/core/lib/promise/wait_set.h + - src/core/lib/resource_quota/arena.h + - src/core/lib/resource_quota/connection_quota.h + - src/core/lib/resource_quota/memory_quota.h + - src/core/lib/resource_quota/periodic_update.h + - src/core/lib/resource_quota/resource_quota.h + - src/core/lib/resource_quota/thread_quota.h + - src/core/lib/slice/percent_encoding.h + - src/core/lib/slice/slice.h + - src/core/lib/slice/slice_buffer.h + - src/core/lib/slice/slice_internal.h + - src/core/lib/slice/slice_refcount.h + - src/core/lib/slice/slice_string_helpers.h + - src/core/lib/surface/channel_stack_type.h + - src/core/lib/transport/call_arena_allocator.h + - src/core/lib/transport/call_filters.h + - src/core/lib/transport/call_final_info.h + - src/core/lib/transport/call_spine.h + - src/core/lib/transport/call_state.h + - src/core/lib/transport/custom_metadata.h + - src/core/lib/transport/error_utils.h + - src/core/lib/transport/http2_errors.h + - src/core/lib/transport/message.h + - src/core/lib/transport/metadata.h + - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/metadata_compression_traits.h + - src/core/lib/transport/parsed_metadata.h + - src/core/lib/transport/simple_slice_based_metadata.h + - src/core/lib/transport/status_conversion.h + - src/core/lib/transport/timeout_encoding.h + - src/core/util/atomic_utils.h + - src/core/util/avl.h + - src/core/util/bitset.h + - src/core/util/chunked_vector.h + - src/core/util/cpp_impl_of.h + - src/core/util/down_cast.h + - src/core/util/dual_ref_counted.h + - src/core/util/dump_args.h + - src/core/util/glob.h + - src/core/util/if_list.h + - src/core/util/latent_see.h + - src/core/util/manual_constructor.h + - src/core/util/orphanable.h + - src/core/util/packed_table.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h + - src/core/util/ref_counted_string.h + - src/core/util/ring_buffer.h + - src/core/util/sorted_pack.h + - src/core/util/spinlock.h + - src/core/util/status_helper.h + - src/core/util/table.h + - src/core/util/time.h + - src/core/util/type_list.h + - test/core/promise/poll_matcher.h + - third_party/upb/upb/generated_code_support.h + src: + - src/core/call/request_buffer.cc + - src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c + - src/core/ext/upb-gen/google/rpc/status.upb_minitable.c + - src/core/lib/channel/channel_args.cc + - src/core/lib/compression/compression.cc + - src/core/lib/compression/compression_internal.cc + - src/core/lib/debug/trace.cc + - src/core/lib/debug/trace_flags.cc + - src/core/lib/experiments/config.cc + - src/core/lib/experiments/experiments.cc + - src/core/lib/iomgr/closure.cc + - src/core/lib/iomgr/combiner.cc + - src/core/lib/iomgr/error.cc + - src/core/lib/iomgr/exec_ctx.cc + - src/core/lib/iomgr/executor.cc + - src/core/lib/iomgr/iomgr_internal.cc + - src/core/lib/promise/activity.cc + - src/core/lib/promise/party.cc + - src/core/lib/resource_quota/arena.cc + - src/core/lib/resource_quota/connection_quota.cc + - src/core/lib/resource_quota/memory_quota.cc + - src/core/lib/resource_quota/periodic_update.cc + - src/core/lib/resource_quota/resource_quota.cc + - src/core/lib/resource_quota/thread_quota.cc + - src/core/lib/slice/percent_encoding.cc + - src/core/lib/slice/slice.cc + - src/core/lib/slice/slice_buffer.cc + - src/core/lib/slice/slice_string_helpers.cc + - src/core/lib/surface/channel_stack_type.cc + - src/core/lib/transport/call_arena_allocator.cc + - src/core/lib/transport/call_filters.cc + - src/core/lib/transport/call_final_info.cc + - src/core/lib/transport/call_spine.cc + - src/core/lib/transport/call_state.cc + - src/core/lib/transport/error_utils.cc + - src/core/lib/transport/message.cc + - src/core/lib/transport/metadata.cc + - src/core/lib/transport/metadata_batch.cc + - src/core/lib/transport/parsed_metadata.cc + - src/core/lib/transport/status_conversion.cc + - src/core/lib/transport/timeout_encoding.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc + - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc + - src/core/util/ref_counted_string.cc + - src/core/util/status_helper.cc + - src/core/util/time.cc + - test/core/call/request_buffer_test.cc + deps: + - gtest + - upb_mini_descriptor_lib + - upb_wire_lib + - absl/base:config + - absl/base:no_destructor + - absl/container:flat_hash_map + - absl/container:inlined_vector + - absl/functional:function_ref + - absl/hash:hash + - absl/meta:type_traits + - absl/status:statusor + - absl/utility:utility + - gpr - name: request_with_flags_test gtest: true build: test @@ -18040,17 +18220,17 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/detail/basic_seq.h - src/core/lib/promise/detail/promise_factory.h - src/core/lib/promise/detail/promise_like.h - src/core/lib/promise/detail/seq_state.h - src/core/lib/promise/poll.h - src/core/lib/promise/seq.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/seq_test.cc deps: - gtest @@ -18881,9 +19061,9 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/single_set_ptr.h + - src/core/util/single_set_ptr.h src: - - test/core/gprpp/single_set_ptr_test.cc + - test/core/util/single_set_ptr_test.cc deps: - gtest - gpr @@ -18909,17 +19089,17 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/glob.h - src/core/lib/slice/slice.h - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/glob.cc - test/core/slice/slice_string_helpers_test.cc deps: - gtest @@ -18996,10 +19176,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/sorted_pack.h - - src/core/lib/gprpp/type_list.h + - src/core/util/sorted_pack.h + - src/core/util/type_list.h src: - - test/core/gprpp/sorted_pack_test.cc + - test/core/util/sorted_pack_test.cc deps: - gtest uses_polling: false @@ -19067,7 +19247,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/stat_test.cc + - test/core/util/stat_test.cc deps: - gtest - grpc_test_util @@ -19147,7 +19327,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/status_helper_test.cc + - test/core/util/status_helper_test.cc deps: - gtest - grpc_test_util @@ -19384,11 +19564,11 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/table.h + - src/core/util/bitset.h + - src/core/util/table.h - src/core/util/useful.h src: - - test/core/gprpp/table_test.cc + - test/core/util/table_test.cc deps: - gtest - absl/log:check @@ -19609,14 +19789,14 @@ targets: headers: - src/core/lib/event_engine/posix_engine/timer.h - src/core/lib/event_engine/posix_engine/timer_heap.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h + - src/core/util/bitset.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h src: - src/core/lib/event_engine/posix_engine/timer.cc - src/core/lib/event_engine/posix_engine/timer_heap.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc - test/core/event_engine/posix/timer_heap_test.cc deps: - gtest @@ -19630,13 +19810,13 @@ targets: headers: - src/core/lib/event_engine/posix_engine/timer.h - src/core/lib/event_engine/posix_engine/timer_heap.h - - src/core/lib/gprpp/time.h - - src/core/lib/gprpp/time_averaged_stats.h + - src/core/util/time.h + - src/core/util/time_averaged_stats.h src: - src/core/lib/event_engine/posix_engine/timer.cc - src/core/lib/event_engine/posix_engine/timer_heap.cc - - src/core/lib/gprpp/time.cc - - src/core/lib/gprpp/time_averaged_stats.cc + - src/core/util/time.cc + - src/core/util/time_averaged_stats.cc - test/core/event_engine/posix/timer_list_test.cc deps: - gtest @@ -19654,7 +19834,6 @@ targets: - src/core/lib/event_engine/extensions/can_track_errors.h - src/core/lib/event_engine/handle_containers.h - src/core/lib/event_engine/resolved_address_internal.h - - src/core/lib/gprpp/glob.h - src/core/lib/iomgr/port.h - src/core/lib/iomgr/resolved_address.h - src/core/lib/slice/slice.h @@ -19662,6 +19841,7 @@ targets: - src/core/lib/slice/slice_internal.h - src/core/lib/slice/slice_refcount.h - src/core/lib/slice/slice_string_helpers.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc @@ -19669,10 +19849,10 @@ targets: - src/core/lib/event_engine/resolved_address.cc - src/core/lib/event_engine/slice.cc - src/core/lib/event_engine/slice_buffer.cc - - src/core/lib/gprpp/glob.cc - src/core/lib/slice/slice.cc - src/core/lib/slice/slice_buffer.cc - src/core/lib/slice/slice_string_helpers.cc + - src/core/util/glob.cc - test/core/event_engine/slice_buffer_test.cc deps: - gtest @@ -19681,20 +19861,6 @@ targets: - absl/status:statusor - absl/utility:utility - gpr -- name: test_core_gprpp_time_test - gtest: true - build: test - language: c++ - headers: - - src/core/lib/gprpp/time.h - src: - - src/core/lib/gprpp/time.cc - - test/core/gprpp/time_test.cc - deps: - - gtest - - absl/status:statusor - - gpr - uses_polling: false - name: test_core_iomgr_timer_heap_test gtest: true build: test @@ -19863,12 +20029,15 @@ targets: gtest: true build: test language: c++ - headers: [] + headers: + - src/core/util/time.h src: + - src/core/util/time.cc - test/core/util/time_test.cc deps: - gtest - - grpc_test_util + - absl/status:statusor + - gpr uses_polling: false - name: test_cpp_client_credentials_test gtest: true @@ -19977,7 +20146,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/thd_test.cc + - test/core/util/thd_test.cc deps: - gtest - grpc_test_util @@ -20009,11 +20178,11 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/resource_quota/thread_quota.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h src: - src/core/lib/resource_quota/thread_quota.cc - test/core/resource_quota/thread_quota_test.cc @@ -20090,7 +20259,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/time_util_test.cc + - test/core/util/time_util_test.cc deps: - gtest - grpc_test_util @@ -20526,8 +20695,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/bitset.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/detail/join_state.h - src/core/lib/promise/detail/promise_like.h - src/core/lib/promise/detail/status.h @@ -20535,10 +20702,12 @@ targets: - src/core/lib/promise/poll.h - src/core/lib/promise/status_flag.h - src/core/lib/promise/try_join.h + - src/core/util/bitset.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/try_join_test.cc deps: - gtest @@ -20567,7 +20736,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/glob.h - src/core/lib/promise/detail/basic_seq.h - src/core/lib/promise/detail/promise_factory.h - src/core/lib/promise/detail/promise_like.h @@ -20576,10 +20744,11 @@ targets: - src/core/lib/promise/poll.h - src/core/lib/promise/status_flag.h - src/core/lib/promise/try_seq.h + - src/core/util/glob.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/glob.cc + - src/core/util/glob.cc - test/core/promise/try_seq_test.cc deps: - gtest @@ -20606,10 +20775,10 @@ targets: build: test language: c++ headers: - - src/core/lib/gprpp/unique_type_name.h + - src/core/util/unique_type_name.h - src/core/util/useful.h src: - - test/core/gprpp/unique_type_name_test.cc + - test/core/util/unique_type_name_test.cc deps: - gtest - absl/container:flat_hash_map @@ -20631,13 +20800,13 @@ targets: deps: - gtest - grpc_test_util -- name: uri_parser_test +- name: uri_test gtest: true build: test language: c++ headers: [] src: - - test/core/uri/uri_parser_test.cc + - test/core/util/uri_test.cc deps: - gtest - grpc_test_util_unsecure @@ -20660,7 +20829,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/uuid_v4_test.cc + - test/core/util/uuid_v4_test.cc deps: - gtest - grpc_test_util @@ -20671,7 +20840,7 @@ targets: language: c++ headers: [] src: - - test/core/gprpp/validation_errors_test.cc + - test/core/util/validation_errors_test.cc deps: - gtest - grpc_test_util @@ -20694,15 +20863,6 @@ targets: - src/core/lib/debug/trace.h - src/core/lib/debug/trace_flags.h - src/core/lib/debug/trace_impl.h - - src/core/lib/gprpp/atomic_utils.h - - src/core/lib/gprpp/down_cast.h - - src/core/lib/gprpp/dump_args.h - - src/core/lib/gprpp/glob.h - - src/core/lib/gprpp/notification.h - - src/core/lib/gprpp/orphanable.h - - src/core/lib/gprpp/per_cpu.h - - src/core/lib/gprpp/ref_counted.h - - src/core/lib/gprpp/ref_counted_ptr.h - src/core/lib/promise/activity.h - src/core/lib/promise/context.h - src/core/lib/promise/detail/promise_factory.h @@ -20711,17 +20871,26 @@ targets: - src/core/lib/promise/map.h - src/core/lib/promise/poll.h - src/core/lib/promise/wait_for_callback.h + - src/core/util/atomic_utils.h + - src/core/util/down_cast.h + - src/core/util/dump_args.h + - src/core/util/glob.h - src/core/util/latent_see.h + - src/core/util/notification.h + - src/core/util/orphanable.h + - src/core/util/per_cpu.h + - src/core/util/ref_counted.h + - src/core/util/ref_counted_ptr.h - src/core/util/ring_buffer.h - test/core/promise/test_wakeup_schedulers.h src: - src/core/lib/debug/trace.cc - src/core/lib/debug/trace_flags.cc - - src/core/lib/gprpp/dump_args.cc - - src/core/lib/gprpp/glob.cc - - src/core/lib/gprpp/per_cpu.cc - src/core/lib/promise/activity.cc + - src/core/util/dump_args.cc + - src/core/util/glob.cc - src/core/util/latent_see.cc + - src/core/util/per_cpu.cc - test/core/promise/wait_for_callback_test.cc deps: - gtest @@ -21060,7 +21229,7 @@ targets: - test/core/event_engine/event_engine_test_utils.h src: - test/core/event_engine/event_engine_test_utils.cc - - test/core/gprpp/work_serializer_test.cc + - test/core/util/work_serializer_test.cc deps: - gtest - grpc_test_util @@ -21202,10 +21371,10 @@ targets: language: c++ headers: - src/core/ext/transport/chttp2/transport/write_size_policy.h - - src/core/lib/gprpp/time.h + - src/core/util/time.h src: - src/core/ext/transport/chttp2/transport/write_size_policy.cc - - src/core/lib/gprpp/time.cc + - src/core/util/time.cc - test/core/transport/chttp2/write_size_policy_test.cc deps: - gtest @@ -21900,7 +22069,6 @@ targets: platforms: - linux - posix - - mac - name: xds_gcp_authn_end2end_test gtest: true build: test diff --git a/build_config.rb b/build_config.rb index 2524b03b7659f..dec15b3d5ca6d 100644 --- a/build_config.rb +++ b/build_config.rb @@ -13,5 +13,5 @@ # limitations under the License. module GrpcBuildConfig - CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-43.dll' + CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-44.dll' end diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 67062727e9409..c7d5040889ff5 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -12,11 +12,11 @@ settings: '#08': Use "-preN" suffixes to identify pre-release versions '#09': Per-language overrides are possible with (eg) ruby_version tag here '#10': See the expand_version.py for all the quirks here - core_version: 43.0.0 + core_version: 44.0.0 csharp_major_version: 2 - g_stands_for: gesundheit + g_stands_for: groovy protobuf_version: 3.27.2 - version: 1.67.0-dev + version: 1.68.0-dev configs: asan: CC: clang diff --git a/config.m4 b/config.m4 index 903e5727bbbc1..dd953b0801b77 100644 --- a/config.m4 +++ b/config.m4 @@ -443,8 +443,6 @@ if test "$PHP_GRPC" != "no"; then src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc \ src/core/lib/address_utils/parse_address.cc \ src/core/lib/address_utils/sockaddr_utils.cc \ - src/core/lib/backoff/backoff.cc \ - src/core/lib/backoff/random_early_detection.cc \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_args_preconditioning.cc \ src/core/lib/channel/channel_stack.cc \ @@ -460,7 +458,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/config/config_vars_non_generated.cc \ src/core/lib/config/core_configuration.cc \ src/core/lib/config/load_config.cc \ - src/core/lib/debug/event_log.cc \ src/core/lib/debug/trace.cc \ src/core/lib/debug/trace_flags.cc \ src/core/lib/event_engine/ares_resolver.cc \ @@ -512,34 +509,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/event_engine/work_queue/basic_work_queue.cc \ src/core/lib/experiments/config.cc \ src/core/lib/experiments/experiments.cc \ - src/core/lib/gprpp/crash.cc \ - src/core/lib/gprpp/dump_args.cc \ - src/core/lib/gprpp/examine_stack.cc \ - src/core/lib/gprpp/fork.cc \ - src/core/lib/gprpp/glob.cc \ - src/core/lib/gprpp/host_port.cc \ - src/core/lib/gprpp/linux/env.cc \ - src/core/lib/gprpp/load_file.cc \ - src/core/lib/gprpp/mpscq.cc \ - src/core/lib/gprpp/per_cpu.cc \ - src/core/lib/gprpp/posix/directory_reader.cc \ - src/core/lib/gprpp/posix/env.cc \ - src/core/lib/gprpp/posix/stat.cc \ - src/core/lib/gprpp/posix/thd.cc \ - src/core/lib/gprpp/ref_counted_string.cc \ - src/core/lib/gprpp/status_helper.cc \ - src/core/lib/gprpp/strerror.cc \ - src/core/lib/gprpp/tchar.cc \ - src/core/lib/gprpp/time.cc \ - src/core/lib/gprpp/time_averaged_stats.cc \ - src/core/lib/gprpp/time_util.cc \ - src/core/lib/gprpp/uuid_v4.cc \ - src/core/lib/gprpp/validation_errors.cc \ - src/core/lib/gprpp/windows/directory_reader.cc \ - src/core/lib/gprpp/windows/env.cc \ - src/core/lib/gprpp/windows/stat.cc \ - src/core/lib/gprpp/windows/thd.cc \ - src/core/lib/gprpp/work_serializer.cc \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/call_combiner.cc \ src/core/lib/iomgr/cfstream_handle.cc \ @@ -563,11 +532,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/executor.cc \ src/core/lib/iomgr/fork_posix.cc \ src/core/lib/iomgr/fork_windows.cc \ - src/core/lib/iomgr/gethostname_fallback.cc \ - src/core/lib/iomgr/gethostname_host_name_max.cc \ - src/core/lib/iomgr/gethostname_sysconf.cc \ - src/core/lib/iomgr/grpc_if_nametoindex_posix.cc \ - src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc \ src/core/lib/iomgr/internal_errqueue.cc \ src/core/lib/iomgr/iocp_windows.cc \ src/core/lib/iomgr/iomgr.cc \ @@ -616,7 +580,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/wakeup_fd_nospecial.cc \ src/core/lib/iomgr/wakeup_fd_pipe.cc \ src/core/lib/iomgr/wakeup_fd_posix.cc \ - src/core/lib/matchers/matchers.cc \ src/core/lib/promise/activity.cc \ src/core/lib/promise/party.cc \ src/core/lib/promise/sleep.cc \ @@ -736,7 +699,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/timeout_encoding.cc \ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport_op_string.cc \ - src/core/lib/uri/uri_parser.cc \ src/core/load_balancing/address_filtering.cc \ src/core/load_balancing/backend_metric_parser.cc \ src/core/load_balancing/child_policy_handler.cc \ @@ -831,7 +793,21 @@ if test "$PHP_GRPC" != "no"; then src/core/tsi/transport_security_grpc.cc \ src/core/util/alloc.cc \ src/core/util/atm.cc \ + src/core/util/backoff.cc \ + src/core/util/crash.cc \ + src/core/util/dump_args.cc \ + src/core/util/event_log.cc \ + src/core/util/examine_stack.cc \ + src/core/util/fork.cc \ src/core/util/gcp_metadata_query.cc \ + src/core/util/gethostname_fallback.cc \ + src/core/util/gethostname_host_name_max.cc \ + src/core/util/gethostname_sysconf.cc \ + src/core/util/glob.cc \ + src/core/util/gpr_time.cc \ + src/core/util/grpc_if_nametoindex_posix.cc \ + src/core/util/grpc_if_nametoindex_unsupported.cc \ + src/core/util/host_port.cc \ src/core/util/http_client/format_request.cc \ src/core/util/http_client/httpcli.cc \ src/core/util/http_client/httpcli_security_connector.cc \ @@ -843,24 +819,48 @@ if test "$PHP_GRPC" != "no"; then src/core/util/json/json_writer.cc \ src/core/util/latent_see.cc \ src/core/util/linux/cpu.cc \ + src/core/util/linux/env.cc \ + src/core/util/load_file.cc \ src/core/util/log.cc \ + src/core/util/matchers.cc \ + src/core/util/mpscq.cc \ src/core/util/msys/tmpfile.cc \ + src/core/util/per_cpu.cc \ src/core/util/posix/cpu.cc \ + src/core/util/posix/directory_reader.cc \ + src/core/util/posix/env.cc \ + src/core/util/posix/stat.cc \ src/core/util/posix/string.cc \ src/core/util/posix/sync.cc \ + src/core/util/posix/thd.cc \ src/core/util/posix/time.cc \ src/core/util/posix/tmpfile.cc \ + src/core/util/random_early_detection.cc \ + src/core/util/ref_counted_string.cc \ + src/core/util/status_helper.cc \ + src/core/util/strerror.cc \ src/core/util/string.cc \ src/core/util/sync.cc \ src/core/util/sync_abseil.cc \ + src/core/util/tchar.cc \ src/core/util/time.cc \ + src/core/util/time_averaged_stats.cc \ src/core/util/time_precise.cc \ + src/core/util/time_util.cc \ + src/core/util/uri.cc \ + src/core/util/uuid_v4.cc \ + src/core/util/validation_errors.cc \ src/core/util/windows/cpu.cc \ + src/core/util/windows/directory_reader.cc \ + src/core/util/windows/env.cc \ + src/core/util/windows/stat.cc \ src/core/util/windows/string.cc \ src/core/util/windows/string_util.cc \ src/core/util/windows/sync.cc \ + src/core/util/windows/thd.cc \ src/core/util/windows/time.cc \ src/core/util/windows/tmpfile.cc \ + src/core/util/work_serializer.cc \ src/core/xds/grpc/certificate_provider_store.cc \ src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \ src/core/xds/grpc/xds_audit_logger_registry.cc \ @@ -890,10 +890,10 @@ if test "$PHP_GRPC" != "no"; then src/core/xds/grpc/xds_routing.cc \ src/core/xds/grpc/xds_server_grpc.cc \ src/core/xds/grpc/xds_transport_grpc.cc \ + src/core/xds/xds_client/lrs_client.cc \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_bootstrap.cc \ src/core/xds/xds_client/xds_client.cc \ - src/core/xds/xds_client/xds_client_stats.cc \ src/php/ext/grpc/byte_buffer.c \ src/php/ext/grpc/call.c \ src/php/ext/grpc/call_credentials.c \ @@ -1160,6 +1160,8 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c \ third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c \ third_party/boringssl-with-bazel/src/crypto/mem.c \ + third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.c \ + third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc \ third_party/boringssl-with-bazel/src/crypto/obj/obj.c \ third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c \ third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c \ @@ -1180,12 +1182,14 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c \ third_party/boringssl-with-bazel/src/crypto/pool/pool.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/fork_detect.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/getentropy.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/urandom.c \ third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c \ third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c \ third_party/boringssl-with-bazel/src/crypto/refcount.c \ @@ -1396,7 +1400,7 @@ if test "$PHP_GRPC" != "no"; then -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 \ -DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 \ -DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \ - -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.67.0dev\""') + -DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.68.0dev\""') PHP_ADD_BUILD_DIR($ext_builddir/src/core/channelz) PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_channel) @@ -1527,7 +1531,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/security) PHP_ADD_BUILD_DIR($ext_builddir/src/core/handshaker/tcp_connect) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/address_utils) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/config) @@ -1540,13 +1543,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/event_engine/windows) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/event_engine/work_queue) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/experiments) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/linux) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/posix) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/gprpp/windows) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr/event_engine_shims) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/matchers) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/promise) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/resource_quota) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/authorization) @@ -1581,7 +1579,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/slice) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/uri) PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing) PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/grpclb) PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/outlier_detection) @@ -1681,6 +1678,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/keccak) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/kyber) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/lhash) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/mldsa) + PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/mlkem) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/obj) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/pem) PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl-with-bazel/src/crypto/pkcs7) diff --git a/config.w32 b/config.w32 index 0734ce7cfaf6f..5a8a5d1dd3dd8 100644 --- a/config.w32 +++ b/config.w32 @@ -408,8 +408,6 @@ if (PHP_GRPC != "no") { "src\\core\\handshaker\\tcp_connect\\tcp_connect_handshaker.cc " + "src\\core\\lib\\address_utils\\parse_address.cc " + "src\\core\\lib\\address_utils\\sockaddr_utils.cc " + - "src\\core\\lib\\backoff\\backoff.cc " + - "src\\core\\lib\\backoff\\random_early_detection.cc " + "src\\core\\lib\\channel\\channel_args.cc " + "src\\core\\lib\\channel\\channel_args_preconditioning.cc " + "src\\core\\lib\\channel\\channel_stack.cc " + @@ -425,7 +423,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\config\\config_vars_non_generated.cc " + "src\\core\\lib\\config\\core_configuration.cc " + "src\\core\\lib\\config\\load_config.cc " + - "src\\core\\lib\\debug\\event_log.cc " + "src\\core\\lib\\debug\\trace.cc " + "src\\core\\lib\\debug\\trace_flags.cc " + "src\\core\\lib\\event_engine\\ares_resolver.cc " + @@ -477,34 +474,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\event_engine\\work_queue\\basic_work_queue.cc " + "src\\core\\lib\\experiments\\config.cc " + "src\\core\\lib\\experiments\\experiments.cc " + - "src\\core\\lib\\gprpp\\crash.cc " + - "src\\core\\lib\\gprpp\\dump_args.cc " + - "src\\core\\lib\\gprpp\\examine_stack.cc " + - "src\\core\\lib\\gprpp\\fork.cc " + - "src\\core\\lib\\gprpp\\glob.cc " + - "src\\core\\lib\\gprpp\\host_port.cc " + - "src\\core\\lib\\gprpp\\linux\\env.cc " + - "src\\core\\lib\\gprpp\\load_file.cc " + - "src\\core\\lib\\gprpp\\mpscq.cc " + - "src\\core\\lib\\gprpp\\per_cpu.cc " + - "src\\core\\lib\\gprpp\\posix\\directory_reader.cc " + - "src\\core\\lib\\gprpp\\posix\\env.cc " + - "src\\core\\lib\\gprpp\\posix\\stat.cc " + - "src\\core\\lib\\gprpp\\posix\\thd.cc " + - "src\\core\\lib\\gprpp\\ref_counted_string.cc " + - "src\\core\\lib\\gprpp\\status_helper.cc " + - "src\\core\\lib\\gprpp\\strerror.cc " + - "src\\core\\lib\\gprpp\\tchar.cc " + - "src\\core\\lib\\gprpp\\time.cc " + - "src\\core\\lib\\gprpp\\time_averaged_stats.cc " + - "src\\core\\lib\\gprpp\\time_util.cc " + - "src\\core\\lib\\gprpp\\uuid_v4.cc " + - "src\\core\\lib\\gprpp\\validation_errors.cc " + - "src\\core\\lib\\gprpp\\windows\\directory_reader.cc " + - "src\\core\\lib\\gprpp\\windows\\env.cc " + - "src\\core\\lib\\gprpp\\windows\\stat.cc " + - "src\\core\\lib\\gprpp\\windows\\thd.cc " + - "src\\core\\lib\\gprpp\\work_serializer.cc " + "src\\core\\lib\\iomgr\\buffer_list.cc " + "src\\core\\lib\\iomgr\\call_combiner.cc " + "src\\core\\lib\\iomgr\\cfstream_handle.cc " + @@ -528,11 +497,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\iomgr\\executor.cc " + "src\\core\\lib\\iomgr\\fork_posix.cc " + "src\\core\\lib\\iomgr\\fork_windows.cc " + - "src\\core\\lib\\iomgr\\gethostname_fallback.cc " + - "src\\core\\lib\\iomgr\\gethostname_host_name_max.cc " + - "src\\core\\lib\\iomgr\\gethostname_sysconf.cc " + - "src\\core\\lib\\iomgr\\grpc_if_nametoindex_posix.cc " + - "src\\core\\lib\\iomgr\\grpc_if_nametoindex_unsupported.cc " + "src\\core\\lib\\iomgr\\internal_errqueue.cc " + "src\\core\\lib\\iomgr\\iocp_windows.cc " + "src\\core\\lib\\iomgr\\iomgr.cc " + @@ -581,7 +545,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\iomgr\\wakeup_fd_nospecial.cc " + "src\\core\\lib\\iomgr\\wakeup_fd_pipe.cc " + "src\\core\\lib\\iomgr\\wakeup_fd_posix.cc " + - "src\\core\\lib\\matchers\\matchers.cc " + "src\\core\\lib\\promise\\activity.cc " + "src\\core\\lib\\promise\\party.cc " + "src\\core\\lib\\promise\\sleep.cc " + @@ -701,7 +664,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\transport\\timeout_encoding.cc " + "src\\core\\lib\\transport\\transport.cc " + "src\\core\\lib\\transport\\transport_op_string.cc " + - "src\\core\\lib\\uri\\uri_parser.cc " + "src\\core\\load_balancing\\address_filtering.cc " + "src\\core\\load_balancing\\backend_metric_parser.cc " + "src\\core\\load_balancing\\child_policy_handler.cc " + @@ -796,7 +758,21 @@ if (PHP_GRPC != "no") { "src\\core\\tsi\\transport_security_grpc.cc " + "src\\core\\util\\alloc.cc " + "src\\core\\util\\atm.cc " + + "src\\core\\util\\backoff.cc " + + "src\\core\\util\\crash.cc " + + "src\\core\\util\\dump_args.cc " + + "src\\core\\util\\event_log.cc " + + "src\\core\\util\\examine_stack.cc " + + "src\\core\\util\\fork.cc " + "src\\core\\util\\gcp_metadata_query.cc " + + "src\\core\\util\\gethostname_fallback.cc " + + "src\\core\\util\\gethostname_host_name_max.cc " + + "src\\core\\util\\gethostname_sysconf.cc " + + "src\\core\\util\\glob.cc " + + "src\\core\\util\\gpr_time.cc " + + "src\\core\\util\\grpc_if_nametoindex_posix.cc " + + "src\\core\\util\\grpc_if_nametoindex_unsupported.cc " + + "src\\core\\util\\host_port.cc " + "src\\core\\util\\http_client\\format_request.cc " + "src\\core\\util\\http_client\\httpcli.cc " + "src\\core\\util\\http_client\\httpcli_security_connector.cc " + @@ -808,24 +784,48 @@ if (PHP_GRPC != "no") { "src\\core\\util\\json\\json_writer.cc " + "src\\core\\util\\latent_see.cc " + "src\\core\\util\\linux\\cpu.cc " + + "src\\core\\util\\linux\\env.cc " + + "src\\core\\util\\load_file.cc " + "src\\core\\util\\log.cc " + + "src\\core\\util\\matchers.cc " + + "src\\core\\util\\mpscq.cc " + "src\\core\\util\\msys\\tmpfile.cc " + + "src\\core\\util\\per_cpu.cc " + "src\\core\\util\\posix\\cpu.cc " + + "src\\core\\util\\posix\\directory_reader.cc " + + "src\\core\\util\\posix\\env.cc " + + "src\\core\\util\\posix\\stat.cc " + "src\\core\\util\\posix\\string.cc " + "src\\core\\util\\posix\\sync.cc " + + "src\\core\\util\\posix\\thd.cc " + "src\\core\\util\\posix\\time.cc " + "src\\core\\util\\posix\\tmpfile.cc " + + "src\\core\\util\\random_early_detection.cc " + + "src\\core\\util\\ref_counted_string.cc " + + "src\\core\\util\\status_helper.cc " + + "src\\core\\util\\strerror.cc " + "src\\core\\util\\string.cc " + "src\\core\\util\\sync.cc " + "src\\core\\util\\sync_abseil.cc " + + "src\\core\\util\\tchar.cc " + "src\\core\\util\\time.cc " + + "src\\core\\util\\time_averaged_stats.cc " + "src\\core\\util\\time_precise.cc " + + "src\\core\\util\\time_util.cc " + + "src\\core\\util\\uri.cc " + + "src\\core\\util\\uuid_v4.cc " + + "src\\core\\util\\validation_errors.cc " + "src\\core\\util\\windows\\cpu.cc " + + "src\\core\\util\\windows\\directory_reader.cc " + + "src\\core\\util\\windows\\env.cc " + + "src\\core\\util\\windows\\stat.cc " + "src\\core\\util\\windows\\string.cc " + "src\\core\\util\\windows\\string_util.cc " + "src\\core\\util\\windows\\sync.cc " + + "src\\core\\util\\windows\\thd.cc " + "src\\core\\util\\windows\\time.cc " + "src\\core\\util\\windows\\tmpfile.cc " + + "src\\core\\util\\work_serializer.cc " + "src\\core\\xds\\grpc\\certificate_provider_store.cc " + "src\\core\\xds\\grpc\\file_watcher_certificate_provider_factory.cc " + "src\\core\\xds\\grpc\\xds_audit_logger_registry.cc " + @@ -855,10 +855,10 @@ if (PHP_GRPC != "no") { "src\\core\\xds\\grpc\\xds_routing.cc " + "src\\core\\xds\\grpc\\xds_server_grpc.cc " + "src\\core\\xds\\grpc\\xds_transport_grpc.cc " + + "src\\core\\xds\\xds_client\\lrs_client.cc " + "src\\core\\xds\\xds_client\\xds_api.cc " + "src\\core\\xds\\xds_client\\xds_bootstrap.cc " + "src\\core\\xds\\xds_client\\xds_client.cc " + - "src\\core\\xds\\xds_client\\xds_client_stats.cc " + "src\\php\\ext\\grpc\\byte_buffer.c " + "src\\php\\ext\\grpc\\call.c " + "src\\php\\ext\\grpc\\call_credentials.c " + @@ -1125,6 +1125,8 @@ if (PHP_GRPC != "no") { "third_party\\boringssl-with-bazel\\src\\crypto\\kyber\\kyber.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\lhash\\lhash.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\mem.c " + + "third_party\\boringssl-with-bazel\\src\\crypto\\mldsa\\mldsa.c " + + "third_party\\boringssl-with-bazel\\src\\crypto\\mlkem\\mlkem.cc " + "third_party\\boringssl-with-bazel\\src\\crypto\\obj\\obj.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\obj\\obj_xref.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\pem\\pem_all.c " + @@ -1145,12 +1147,14 @@ if (PHP_GRPC != "no") { "third_party\\boringssl-with-bazel\\src\\crypto\\poly1305\\poly1305_vec.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\pool\\pool.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\deterministic.c " + + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\fork_detect.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\forkunsafe.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\getentropy.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\ios.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\passive.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\rand_extra.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\trusty.c " + + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\urandom.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rand_extra\\windows.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\rc4\\rc4.c " + "third_party\\boringssl-with-bazel\\src\\crypto\\refcount.c " + @@ -1666,7 +1670,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\handshaker\\tcp_connect"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\address_utils"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\backoff"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\channel"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\compression"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\config"); @@ -1679,13 +1682,8 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\event_engine\\windows"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\event_engine\\work_queue"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\experiments"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\linux"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\posix"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\gprpp\\windows"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr\\event_engine_shims"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\matchers"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\promise"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\resource_quota"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security"); @@ -1721,7 +1719,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\uri"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\grpclb"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\outlier_detection"); @@ -1836,6 +1833,8 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\keccak"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\kyber"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\lhash"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\mldsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\mlkem"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\obj"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\pem"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl-with-bazel\\src\\crypto\\pkcs7"); diff --git a/doc/g_stands_for.md b/doc/g_stands_for.md index b11b6438d9b67..54fafcb5a525b 100644 --- a/doc/g_stands_for.md +++ b/doc/g_stands_for.md @@ -66,4 +66,5 @@ - 1.64 'g' stands for ['grateful'](https://github.com/grpc/grpc/tree/v1.64.x) - 1.65 'g' stands for ['gnarly'](https://github.com/grpc/grpc/tree/v1.65.x) - 1.66 'g' stands for ['gladiator'](https://github.com/grpc/grpc/tree/v1.66.x) -- 1.67 'g' stands for ['gesundheit'](https://github.com/grpc/grpc/tree/master) +- 1.67 'g' stands for ['gesundheit'](https://github.com/grpc/grpc/tree/v1.67.x) +- 1.68 'g' stands for ['groovy'](https://github.com/grpc/grpc/tree/master) diff --git a/doc/grpc_xds_features.md b/doc/grpc_xds_features.md index 3d673302e9b49..927f606bdf624 100644 --- a/doc/grpc_xds_features.md +++ b/doc/grpc_xds_features.md @@ -81,3 +81,5 @@ LRS Custom Metrics Support | [A64](https://github.com/grpc/proposal/blob/master/ mTLS Credentials in xDS Bootstrap File | [A65](https://github.com/grpc/proposal/blob/master/A65-xds-mtls-creds-in-bootstrap.md) | v1.65.0 | | v1.61.0 | | Stateful Session Affinity | [A55](https://github.com/grpc/proposal/blob/master/A55-xds-stateful-session-affinity.md), [A60](https://github.com/grpc/proposal/blob/master/A60-xds-stateful-session-affinity-weighted-clusters.md), [A75](https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md) | v1.61.0 | | | | xDS Locality label for OpenTelemetry metrics | [A78](https://github.com/grpc/proposal/blob/master/A78-grpc-metrics-wrr-pf-xds.md) | v1.63.0 (C++) | v1.64.0 | | | +xDS Fallback | [A71](https://github.com/grpc/proposal/blob/master/A71-xds-fallback.md) | v1.67.0 | | | | +Dualstack Backend Support | [A61](https://github.com/grpc/proposal/blob/master/A61-IPv4-IPv6-dualstack-backends.md) | v1.66.1 | | | | diff --git a/examples/cpp/csm/csm_greeter_server.cc b/examples/cpp/csm/csm_greeter_server.cc index 910e3f65749fc..7f66a5cc9a988 100644 --- a/examples/cpp/csm/csm_greeter_server.cc +++ b/examples/cpp/csm/csm_greeter_server.cc @@ -35,7 +35,7 @@ #include #include -#include "src/core/lib/iomgr/gethostname.h" +#include "src/core/util/gethostname.h" #ifdef BAZEL_BUILD #include "examples/protos/helloworld.grpc.pb.h" diff --git a/examples/cpp/flow_control/BUILD b/examples/cpp/flow_control/BUILD index 9cd66865c3c1d..981b753083812 100644 --- a/examples/cpp/flow_control/BUILD +++ b/examples/cpp/flow_control/BUILD @@ -14,6 +14,33 @@ licenses(["notice"]) +cc_binary( + name = "client_flow_control_client", + srcs = ["client_flow_control_client.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", + ], +) + +cc_binary( + name = "client_flow_control_server", + srcs = ["client_flow_control_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", + ], +) + cc_binary( name = "server_flow_control_client", srcs = ["server_flow_control_client.cc"], diff --git a/examples/cpp/flow_control/CMakeLists.txt b/examples/cpp/flow_control/CMakeLists.txt index c546af0a27446..0d6d435317708 100644 --- a/examples/cpp/flow_control/CMakeLists.txt +++ b/examples/cpp/flow_control/CMakeLists.txt @@ -59,6 +59,7 @@ target_link_libraries(hw_grpc_proto # Targets greeter_[async_](client|server) foreach(_target + client_flow_control_client client_flow_control_server server_flow_control_client server_flow_control_server) add_executable(${_target} "${_target}.cc") target_link_libraries(${_target} diff --git a/examples/cpp/flow_control/client_flow_control_client.cc b/examples/cpp/flow_control/client_flow_control_client.cc new file mode 100644 index 0000000000000..933489d7d0481 --- /dev/null +++ b/examples/cpp/flow_control/client_flow_control_client.cc @@ -0,0 +1,126 @@ +/* + * + * 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 +#include +#include + +#ifdef BAZEL_BUILD +#include "examples/protos/helloworld.grpc.pb.h" +#else +#include "helloworld.grpc.pb.h" +#endif + +ABSL_FLAG(std::string, target, "localhost:50051", "Server address"); + +using grpc::CallbackServerContext; +using grpc::Channel; +using grpc::ClientContext; +using grpc::Server; +using grpc::ServerBuilder; +using grpc::ServerUnaryReactor; +using grpc::Status; +using helloworld::Greeter; +using helloworld::HelloReply; +using helloworld::HelloRequest; + +namespace { + +// Sends requests as quickly as possible and times how long it takes to perform +// the write operation. +class GreeterClientReactor final + : public grpc::ClientBidiReactor { + public: + explicit GreeterClientReactor(int reqs, size_t req_size) : reqs_(reqs) { + req_.set_name(std::string(req_size, '*')); + } + + void Start() { + absl::MutexLock lock(&mu_); + StartCall(); + Write(); + } + + ~GreeterClientReactor() override { + absl::MutexLock lock(&mu_); + mu_.Await(absl::Condition(+[](bool* done) { return *done; }, &done_)); + } + + void OnWriteDone(bool ok) override { + absl::MutexLock lock(&mu_); + std::cout << "Writing took " << absl::Now() - *time_ << std::endl; + time_ = absl::nullopt; + if (ok) { + Write(); + } + } + + void OnDone(const grpc::Status& status) override { + if (status.ok()) { + std::cout << "Done\n"; + } else { + std::cout << "Done with error: [" << status.error_code() << "] " + << status.error_message() << "\n"; + } + absl::MutexLock lock(&mu_); + done_ = true; + } + + private: + void Write() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_) { + if (reqs_ == 0) { + StartWritesDone(); + return; + } + --reqs_; + StartWrite(&req_); + time_ = absl::Now(); + } + + absl::Mutex mu_; + bool done_ ABSL_GUARDED_BY(&mu_) = false; + HelloRequest req_; + size_t reqs_; + absl::optional time_ ABSL_GUARDED_BY(mu_); +}; + +} // namespace + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + grpc::ChannelArguments channel_arguments; + auto channel = grpc::CreateCustomChannel(absl::GetFlag(FLAGS_target), + grpc::InsecureChannelCredentials(), + channel_arguments); + auto stub = Greeter::NewStub(channel); + // Send 10 requests with 3Mb payload. This will eventually fill the buffer + // and make + GreeterClientReactor reactor(10, 3 * 1024 * 1024); + grpc::ClientContext context; + stub->async()->SayHelloBidiStream(&context, &reactor); + reactor.Start(); + return 0; +} diff --git a/examples/cpp/flow_control/client_flow_control_server.cc b/examples/cpp/flow_control/client_flow_control_server.cc new file mode 100644 index 0000000000000..31de9275d7c0f --- /dev/null +++ b/examples/cpp/flow_control/client_flow_control_server.cc @@ -0,0 +1,111 @@ +/* + * + * Copyright 2021 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 "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"); +ABSL_FLAG(size_t, quota, 20, "Resource quota, in megabytes"); + +namespace { + +// +// Server reactor that is slow to read incoming messages, causing the buffers +// to fill. +// +class SlowReadingBidiReactor final + : public grpc::ServerBidiReactor { + public: + SlowReadingBidiReactor() { StartRead(&req_); } + + void OnReadDone(bool ok) override { + std::cout << "Recieved request with " << req_.name().length() + << " bytes name\n"; + if (!ok) { + Finish(grpc::Status::OK); + return; + } + sleep(1); + StartRead(&req_); + } + + void OnDone() override { + std::cout << "Done\n"; + delete this; + } + + private: + absl::Mutex mu_; + helloworld::HelloRequest req_; +}; + +// Logic and data behind the server's behavior. +class GreeterServiceImpl final : public helloworld::Greeter::CallbackService { + grpc::ServerBidiReactor* + SayHelloBidiStream(grpc::CallbackServerContext* /* context */) override { + return new SlowReadingBidiReactor(); + } +}; + +} // namespace + +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(); + grpc::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); + grpc::ResourceQuota quota; + quota.Resize(absl::GetFlag(FLAGS_quota) * 1024 * 1024); + // Finally assemble the server. + auto server = builder.BuildAndStart(); + 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; +} diff --git a/fuzztest/core/transport/chttp2/hpack_encoder_timeout_test.cc b/fuzztest/core/transport/chttp2/hpack_encoder_timeout_test.cc index 6ab0dfadb104a..dab3d8f84314c 100644 --- a/fuzztest/core/transport/chttp2/hpack_encoder_timeout_test.cc +++ b/fuzztest/core/transport/chttp2/hpack_encoder_timeout_test.cc @@ -27,7 +27,7 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 388db1822d3db..902195c9fd8c0 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-C++' # TODO (mxyan): use version that match gRPC version when pod is stabilized - version = '1.67.0-dev' + version = '1.68.0-dev' s.version = version s.summary = 'gRPC C++ library' s.homepage = 'https://grpc.io' @@ -882,9 +882,6 @@ Pod::Spec.new do |s| 'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h', 'src/core/lib/address_utils/parse_address.h', 'src/core/lib/address_utils/sockaddr_utils.h', - 'src/core/lib/avl/avl.h', - 'src/core/lib/backoff/backoff.h', - 'src/core/lib/backoff/random_early_detection.h', 'src/core/lib/channel/call_finalization.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_args_preconditioning.h', @@ -900,7 +897,6 @@ Pod::Spec.new do |s| 'src/core/lib/config/config_vars.h', 'src/core/lib/config/core_configuration.h', 'src/core/lib/config/load_config.h', - 'src/core/lib/debug/event_log.h', 'src/core/lib/debug/trace.h', 'src/core/lib/debug/trace_flags.h', 'src/core/lib/debug/trace_impl.h', @@ -970,55 +966,6 @@ Pod::Spec.new do |s| 'src/core/lib/event_engine/work_queue/work_queue.h', 'src/core/lib/experiments/config.h', 'src/core/lib/experiments/experiments.h', - 'src/core/lib/gprpp/atomic_utils.h', - 'src/core/lib/gprpp/bitset.h', - 'src/core/lib/gprpp/chunked_vector.h', - 'src/core/lib/gprpp/construct_destruct.h', - 'src/core/lib/gprpp/cpp_impl_of.h', - 'src/core/lib/gprpp/crash.h', - 'src/core/lib/gprpp/debug_location.h', - 'src/core/lib/gprpp/directory_reader.h', - 'src/core/lib/gprpp/down_cast.h', - 'src/core/lib/gprpp/dual_ref_counted.h', - 'src/core/lib/gprpp/dump_args.h', - 'src/core/lib/gprpp/env.h', - 'src/core/lib/gprpp/examine_stack.h', - 'src/core/lib/gprpp/fork.h', - 'src/core/lib/gprpp/glob.h', - 'src/core/lib/gprpp/host_port.h', - 'src/core/lib/gprpp/if_list.h', - 'src/core/lib/gprpp/load_file.h', - 'src/core/lib/gprpp/manual_constructor.h', - 'src/core/lib/gprpp/match.h', - 'src/core/lib/gprpp/memory.h', - 'src/core/lib/gprpp/mpscq.h', - 'src/core/lib/gprpp/no_destruct.h', - 'src/core/lib/gprpp/notification.h', - 'src/core/lib/gprpp/orphanable.h', - 'src/core/lib/gprpp/overload.h', - 'src/core/lib/gprpp/packed_table.h', - 'src/core/lib/gprpp/per_cpu.h', - 'src/core/lib/gprpp/ref_counted.h', - 'src/core/lib/gprpp/ref_counted_ptr.h', - 'src/core/lib/gprpp/ref_counted_string.h', - 'src/core/lib/gprpp/single_set_ptr.h', - 'src/core/lib/gprpp/sorted_pack.h', - 'src/core/lib/gprpp/stat.h', - 'src/core/lib/gprpp/status_helper.h', - 'src/core/lib/gprpp/strerror.h', - 'src/core/lib/gprpp/sync.h', - 'src/core/lib/gprpp/table.h', - 'src/core/lib/gprpp/tchar.h', - 'src/core/lib/gprpp/thd.h', - 'src/core/lib/gprpp/time.h', - 'src/core/lib/gprpp/time_averaged_stats.h', - 'src/core/lib/gprpp/time_util.h', - 'src/core/lib/gprpp/type_list.h', - 'src/core/lib/gprpp/unique_type_name.h', - 'src/core/lib/gprpp/uuid_v4.h', - 'src/core/lib/gprpp/validation_errors.h', - 'src/core/lib/gprpp/work_serializer.h', - 'src/core/lib/gprpp/xxhash_inline.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -1040,8 +987,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/event_engine_shims/tcp_client.h', 'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/executor.h', - 'src/core/lib/iomgr/gethostname.h', - 'src/core/lib/iomgr/grpc_if_nametoindex.h', 'src/core/lib/iomgr/internal_errqueue.h', 'src/core/lib/iomgr/iocp_windows.h', 'src/core/lib/iomgr/iomgr.h', @@ -1084,7 +1029,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/vsock.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', 'src/core/lib/promise/arena_promise.h', @@ -1226,7 +1170,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_fwd.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/load_balancing/address_filtering.h', 'src/core/load_balancing/backend_metric_data.h', 'src/core/load_balancing/backend_metric_parser.h', @@ -1317,11 +1260,33 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/atomic_utils.h', + 'src/core/util/avl.h', + 'src/core/util/backoff.h', + 'src/core/util/bitset.h', + 'src/core/util/chunked_vector.h', + 'src/core/util/construct_destruct.h', + 'src/core/util/cpp_impl_of.h', + 'src/core/util/crash.h', + 'src/core/util/debug_location.h', + 'src/core/util/directory_reader.h', + 'src/core/util/down_cast.h', + 'src/core/util/dual_ref_counted.h', + 'src/core/util/dump_args.h', + 'src/core/util/env.h', + 'src/core/util/event_log.h', + 'src/core/util/examine_stack.h', + 'src/core/util/fork.h', 'src/core/util/gcp_metadata_query.h', + 'src/core/util/gethostname.h', + 'src/core/util/glob.h', + 'src/core/util/grpc_if_nametoindex.h', + 'src/core/util/host_port.h', 'src/core/util/http_client/format_request.h', 'src/core/util/http_client/httpcli.h', 'src/core/util/http_client/httpcli_ssl_credentials.h', 'src/core/util/http_client/parser.h', + 'src/core/util/if_list.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -1330,15 +1295,50 @@ Pod::Spec.new do |s| 'src/core/util/json/json_util.h', 'src/core/util/json/json_writer.h', 'src/core/util/latent_see.h', + 'src/core/util/load_file.h', 'src/core/util/lru_cache.h', + 'src/core/util/manual_constructor.h', + 'src/core/util/match.h', + 'src/core/util/matchers.h', + 'src/core/util/memory.h', + 'src/core/util/mpscq.h', + 'src/core/util/no_destruct.h', + 'src/core/util/notification.h', + 'src/core/util/orphanable.h', + 'src/core/util/overload.h', + 'src/core/util/packed_table.h', + 'src/core/util/per_cpu.h', + 'src/core/util/random_early_detection.h', + 'src/core/util/ref_counted.h', + 'src/core/util/ref_counted_ptr.h', + 'src/core/util/ref_counted_string.h', 'src/core/util/ring_buffer.h', + 'src/core/util/single_set_ptr.h', + 'src/core/util/sorted_pack.h', 'src/core/util/spinlock.h', + 'src/core/util/stat.h', + 'src/core/util/status_helper.h', + 'src/core/util/strerror.h', 'src/core/util/string.h', + 'src/core/util/sync.h', + 'src/core/util/table.h', + 'src/core/util/tchar.h', + 'src/core/util/thd.h', + 'src/core/util/time.h', + 'src/core/util/time_averaged_stats.h', 'src/core/util/time_precise.h', + 'src/core/util/time_util.h', 'src/core/util/tmpfile.h', + 'src/core/util/type_list.h', 'src/core/util/unique_ptr_with_bitset.h', + 'src/core/util/unique_type_name.h', 'src/core/util/upb_utils.h', + 'src/core/util/uri.h', 'src/core/util/useful.h', + 'src/core/util/uuid_v4.h', + 'src/core/util/validation_errors.h', + 'src/core/util/work_serializer.h', + 'src/core/util/xxhash_inline.h', 'src/core/xds/grpc/certificate_provider_store.h', 'src/core/xds/grpc/file_watcher_certificate_provider_factory.h', 'src/core/xds/grpc/xds_audit_logger_registry.h', @@ -1370,11 +1370,12 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_routing.h', 'src/core/xds/grpc/xds_server_grpc.h', 'src/core/xds/grpc/xds_transport_grpc.h', + 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', - 'src/core/xds/xds_client/xds_client_stats.h', + 'src/core/xds/xds_client/xds_locality.h', 'src/core/xds/xds_client/xds_metrics.h', 'src/core/xds/xds_client/xds_resource_type.h', 'src/core/xds/xds_client/xds_resource_type_impl.h', @@ -2179,9 +2180,6 @@ Pod::Spec.new do |s| 'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h', 'src/core/lib/address_utils/parse_address.h', 'src/core/lib/address_utils/sockaddr_utils.h', - 'src/core/lib/avl/avl.h', - 'src/core/lib/backoff/backoff.h', - 'src/core/lib/backoff/random_early_detection.h', 'src/core/lib/channel/call_finalization.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_args_preconditioning.h', @@ -2197,7 +2195,6 @@ Pod::Spec.new do |s| 'src/core/lib/config/config_vars.h', 'src/core/lib/config/core_configuration.h', 'src/core/lib/config/load_config.h', - 'src/core/lib/debug/event_log.h', 'src/core/lib/debug/trace.h', 'src/core/lib/debug/trace_flags.h', 'src/core/lib/debug/trace_impl.h', @@ -2267,55 +2264,6 @@ Pod::Spec.new do |s| 'src/core/lib/event_engine/work_queue/work_queue.h', 'src/core/lib/experiments/config.h', 'src/core/lib/experiments/experiments.h', - 'src/core/lib/gprpp/atomic_utils.h', - 'src/core/lib/gprpp/bitset.h', - 'src/core/lib/gprpp/chunked_vector.h', - 'src/core/lib/gprpp/construct_destruct.h', - 'src/core/lib/gprpp/cpp_impl_of.h', - 'src/core/lib/gprpp/crash.h', - 'src/core/lib/gprpp/debug_location.h', - 'src/core/lib/gprpp/directory_reader.h', - 'src/core/lib/gprpp/down_cast.h', - 'src/core/lib/gprpp/dual_ref_counted.h', - 'src/core/lib/gprpp/dump_args.h', - 'src/core/lib/gprpp/env.h', - 'src/core/lib/gprpp/examine_stack.h', - 'src/core/lib/gprpp/fork.h', - 'src/core/lib/gprpp/glob.h', - 'src/core/lib/gprpp/host_port.h', - 'src/core/lib/gprpp/if_list.h', - 'src/core/lib/gprpp/load_file.h', - 'src/core/lib/gprpp/manual_constructor.h', - 'src/core/lib/gprpp/match.h', - 'src/core/lib/gprpp/memory.h', - 'src/core/lib/gprpp/mpscq.h', - 'src/core/lib/gprpp/no_destruct.h', - 'src/core/lib/gprpp/notification.h', - 'src/core/lib/gprpp/orphanable.h', - 'src/core/lib/gprpp/overload.h', - 'src/core/lib/gprpp/packed_table.h', - 'src/core/lib/gprpp/per_cpu.h', - 'src/core/lib/gprpp/ref_counted.h', - 'src/core/lib/gprpp/ref_counted_ptr.h', - 'src/core/lib/gprpp/ref_counted_string.h', - 'src/core/lib/gprpp/single_set_ptr.h', - 'src/core/lib/gprpp/sorted_pack.h', - 'src/core/lib/gprpp/stat.h', - 'src/core/lib/gprpp/status_helper.h', - 'src/core/lib/gprpp/strerror.h', - 'src/core/lib/gprpp/sync.h', - 'src/core/lib/gprpp/table.h', - 'src/core/lib/gprpp/tchar.h', - 'src/core/lib/gprpp/thd.h', - 'src/core/lib/gprpp/time.h', - 'src/core/lib/gprpp/time_averaged_stats.h', - 'src/core/lib/gprpp/time_util.h', - 'src/core/lib/gprpp/type_list.h', - 'src/core/lib/gprpp/unique_type_name.h', - 'src/core/lib/gprpp/uuid_v4.h', - 'src/core/lib/gprpp/validation_errors.h', - 'src/core/lib/gprpp/work_serializer.h', - 'src/core/lib/gprpp/xxhash_inline.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -2337,8 +2285,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/event_engine_shims/tcp_client.h', 'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/executor.h', - 'src/core/lib/iomgr/gethostname.h', - 'src/core/lib/iomgr/grpc_if_nametoindex.h', 'src/core/lib/iomgr/internal_errqueue.h', 'src/core/lib/iomgr/iocp_windows.h', 'src/core/lib/iomgr/iomgr.h', @@ -2381,7 +2327,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/vsock.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', 'src/core/lib/promise/arena_promise.h', @@ -2523,7 +2468,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_fwd.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/load_balancing/address_filtering.h', 'src/core/load_balancing/backend_metric_data.h', 'src/core/load_balancing/backend_metric_parser.h', @@ -2614,11 +2558,33 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/atomic_utils.h', + 'src/core/util/avl.h', + 'src/core/util/backoff.h', + 'src/core/util/bitset.h', + 'src/core/util/chunked_vector.h', + 'src/core/util/construct_destruct.h', + 'src/core/util/cpp_impl_of.h', + 'src/core/util/crash.h', + 'src/core/util/debug_location.h', + 'src/core/util/directory_reader.h', + 'src/core/util/down_cast.h', + 'src/core/util/dual_ref_counted.h', + 'src/core/util/dump_args.h', + 'src/core/util/env.h', + 'src/core/util/event_log.h', + 'src/core/util/examine_stack.h', + 'src/core/util/fork.h', 'src/core/util/gcp_metadata_query.h', + 'src/core/util/gethostname.h', + 'src/core/util/glob.h', + 'src/core/util/grpc_if_nametoindex.h', + 'src/core/util/host_port.h', 'src/core/util/http_client/format_request.h', 'src/core/util/http_client/httpcli.h', 'src/core/util/http_client/httpcli_ssl_credentials.h', 'src/core/util/http_client/parser.h', + 'src/core/util/if_list.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -2627,15 +2593,50 @@ Pod::Spec.new do |s| 'src/core/util/json/json_util.h', 'src/core/util/json/json_writer.h', 'src/core/util/latent_see.h', + 'src/core/util/load_file.h', 'src/core/util/lru_cache.h', + 'src/core/util/manual_constructor.h', + 'src/core/util/match.h', + 'src/core/util/matchers.h', + 'src/core/util/memory.h', + 'src/core/util/mpscq.h', + 'src/core/util/no_destruct.h', + 'src/core/util/notification.h', + 'src/core/util/orphanable.h', + 'src/core/util/overload.h', + 'src/core/util/packed_table.h', + 'src/core/util/per_cpu.h', + 'src/core/util/random_early_detection.h', + 'src/core/util/ref_counted.h', + 'src/core/util/ref_counted_ptr.h', + 'src/core/util/ref_counted_string.h', 'src/core/util/ring_buffer.h', + 'src/core/util/single_set_ptr.h', + 'src/core/util/sorted_pack.h', 'src/core/util/spinlock.h', + 'src/core/util/stat.h', + 'src/core/util/status_helper.h', + 'src/core/util/strerror.h', 'src/core/util/string.h', + 'src/core/util/sync.h', + 'src/core/util/table.h', + 'src/core/util/tchar.h', + 'src/core/util/thd.h', + 'src/core/util/time.h', + 'src/core/util/time_averaged_stats.h', 'src/core/util/time_precise.h', + 'src/core/util/time_util.h', 'src/core/util/tmpfile.h', + 'src/core/util/type_list.h', 'src/core/util/unique_ptr_with_bitset.h', + 'src/core/util/unique_type_name.h', 'src/core/util/upb_utils.h', + 'src/core/util/uri.h', 'src/core/util/useful.h', + 'src/core/util/uuid_v4.h', + 'src/core/util/validation_errors.h', + 'src/core/util/work_serializer.h', + 'src/core/util/xxhash_inline.h', 'src/core/xds/grpc/certificate_provider_store.h', 'src/core/xds/grpc/file_watcher_certificate_provider_factory.h', 'src/core/xds/grpc/xds_audit_logger_registry.h', @@ -2667,11 +2668,12 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_routing.h', 'src/core/xds/grpc/xds_server_grpc.h', 'src/core/xds/grpc/xds_transport_grpc.h', + 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', - 'src/core/xds/xds_client/xds_client_stats.h', + 'src/core/xds/xds_client/xds_locality.h', 'src/core/xds/xds_client/xds_metrics.h', 'src/core/xds/xds_client/xds_resource_type.h', 'src/core/xds/xds_client/xds_resource_type_impl.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 3427505b1c389..5ef2d92c5c1d9 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-Core' - version = '1.67.0-dev' + version = '1.68.0-dev' s.version = version s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'https://grpc.io' @@ -199,7 +199,7 @@ Pod::Spec.new do |s| ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Privacy", version - ss.dependency 'BoringSSL-GRPC', '0.0.36' + ss.dependency 'BoringSSL-GRPC', '0.0.37' ss.dependency 'abseil/algorithm/container', abseil_version ss.dependency 'abseil/base/base', abseil_version ss.dependency 'abseil/base/config', abseil_version @@ -1213,11 +1213,6 @@ Pod::Spec.new do |s| 'src/core/lib/address_utils/parse_address.h', 'src/core/lib/address_utils/sockaddr_utils.cc', 'src/core/lib/address_utils/sockaddr_utils.h', - 'src/core/lib/avl/avl.h', - 'src/core/lib/backoff/backoff.cc', - 'src/core/lib/backoff/backoff.h', - 'src/core/lib/backoff/random_early_detection.cc', - 'src/core/lib/backoff/random_early_detection.h', 'src/core/lib/channel/call_finalization.h', 'src/core/lib/channel/channel_args.cc', 'src/core/lib/channel/channel_args.h', @@ -1248,8 +1243,6 @@ Pod::Spec.new do |s| 'src/core/lib/config/core_configuration.h', 'src/core/lib/config/load_config.cc', 'src/core/lib/config/load_config.h', - 'src/core/lib/debug/event_log.cc', - 'src/core/lib/debug/event_log.h', 'src/core/lib/debug/trace.cc', 'src/core/lib/debug/trace.h', 'src/core/lib/debug/trace_flags.cc', @@ -1370,83 +1363,6 @@ Pod::Spec.new do |s| 'src/core/lib/experiments/config.h', 'src/core/lib/experiments/experiments.cc', 'src/core/lib/experiments/experiments.h', - 'src/core/lib/gprpp/atomic_utils.h', - 'src/core/lib/gprpp/bitset.h', - 'src/core/lib/gprpp/chunked_vector.h', - 'src/core/lib/gprpp/construct_destruct.h', - 'src/core/lib/gprpp/cpp_impl_of.h', - 'src/core/lib/gprpp/crash.cc', - 'src/core/lib/gprpp/crash.h', - 'src/core/lib/gprpp/debug_location.h', - 'src/core/lib/gprpp/directory_reader.h', - 'src/core/lib/gprpp/down_cast.h', - 'src/core/lib/gprpp/dual_ref_counted.h', - 'src/core/lib/gprpp/dump_args.cc', - 'src/core/lib/gprpp/dump_args.h', - 'src/core/lib/gprpp/env.h', - 'src/core/lib/gprpp/examine_stack.cc', - 'src/core/lib/gprpp/examine_stack.h', - 'src/core/lib/gprpp/fork.cc', - 'src/core/lib/gprpp/fork.h', - 'src/core/lib/gprpp/glob.cc', - 'src/core/lib/gprpp/glob.h', - 'src/core/lib/gprpp/host_port.cc', - 'src/core/lib/gprpp/host_port.h', - 'src/core/lib/gprpp/if_list.h', - 'src/core/lib/gprpp/linux/env.cc', - 'src/core/lib/gprpp/load_file.cc', - 'src/core/lib/gprpp/load_file.h', - 'src/core/lib/gprpp/manual_constructor.h', - 'src/core/lib/gprpp/match.h', - 'src/core/lib/gprpp/memory.h', - 'src/core/lib/gprpp/mpscq.cc', - 'src/core/lib/gprpp/mpscq.h', - 'src/core/lib/gprpp/no_destruct.h', - 'src/core/lib/gprpp/notification.h', - 'src/core/lib/gprpp/orphanable.h', - 'src/core/lib/gprpp/overload.h', - 'src/core/lib/gprpp/packed_table.h', - 'src/core/lib/gprpp/per_cpu.cc', - 'src/core/lib/gprpp/per_cpu.h', - 'src/core/lib/gprpp/posix/directory_reader.cc', - 'src/core/lib/gprpp/posix/env.cc', - 'src/core/lib/gprpp/posix/stat.cc', - 'src/core/lib/gprpp/posix/thd.cc', - 'src/core/lib/gprpp/ref_counted.h', - 'src/core/lib/gprpp/ref_counted_ptr.h', - 'src/core/lib/gprpp/ref_counted_string.cc', - 'src/core/lib/gprpp/ref_counted_string.h', - 'src/core/lib/gprpp/single_set_ptr.h', - 'src/core/lib/gprpp/sorted_pack.h', - 'src/core/lib/gprpp/stat.h', - 'src/core/lib/gprpp/status_helper.cc', - 'src/core/lib/gprpp/status_helper.h', - 'src/core/lib/gprpp/strerror.cc', - 'src/core/lib/gprpp/strerror.h', - 'src/core/lib/gprpp/sync.h', - 'src/core/lib/gprpp/table.h', - 'src/core/lib/gprpp/tchar.cc', - 'src/core/lib/gprpp/tchar.h', - 'src/core/lib/gprpp/thd.h', - 'src/core/lib/gprpp/time.cc', - 'src/core/lib/gprpp/time.h', - 'src/core/lib/gprpp/time_averaged_stats.cc', - 'src/core/lib/gprpp/time_averaged_stats.h', - 'src/core/lib/gprpp/time_util.cc', - 'src/core/lib/gprpp/time_util.h', - 'src/core/lib/gprpp/type_list.h', - 'src/core/lib/gprpp/unique_type_name.h', - 'src/core/lib/gprpp/uuid_v4.cc', - 'src/core/lib/gprpp/uuid_v4.h', - 'src/core/lib/gprpp/validation_errors.cc', - 'src/core/lib/gprpp/validation_errors.h', - 'src/core/lib/gprpp/windows/directory_reader.cc', - 'src/core/lib/gprpp/windows/env.cc', - 'src/core/lib/gprpp/windows/stat.cc', - 'src/core/lib/gprpp/windows/thd.cc', - 'src/core/lib/gprpp/work_serializer.cc', - 'src/core/lib/gprpp/work_serializer.h', - 'src/core/lib/gprpp/xxhash_inline.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/buffer_list.h', @@ -1491,13 +1407,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/executor.h', 'src/core/lib/iomgr/fork_posix.cc', 'src/core/lib/iomgr/fork_windows.cc', - 'src/core/lib/iomgr/gethostname.h', - 'src/core/lib/iomgr/gethostname_fallback.cc', - 'src/core/lib/iomgr/gethostname_host_name_max.cc', - 'src/core/lib/iomgr/gethostname_sysconf.cc', - 'src/core/lib/iomgr/grpc_if_nametoindex.h', - 'src/core/lib/iomgr/grpc_if_nametoindex_posix.cc', - 'src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc', 'src/core/lib/iomgr/internal_errqueue.cc', 'src/core/lib/iomgr/internal_errqueue.h', 'src/core/lib/iomgr/iocp_windows.cc', @@ -1588,8 +1497,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.cc', 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/matchers/matchers.cc', - 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', @@ -1850,8 +1757,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_fwd.h', 'src/core/lib/transport/transport_op_string.cc', - 'src/core/lib/uri/uri_parser.cc', - 'src/core/lib/uri/uri_parser.h', 'src/core/load_balancing/address_filtering.cc', 'src/core/load_balancing/address_filtering.h', 'src/core/load_balancing/backend_metric_data.h', @@ -2036,8 +1941,43 @@ Pod::Spec.new do |s| 'src/core/util/alloc.cc', 'src/core/util/alloc.h', 'src/core/util/atm.cc', + 'src/core/util/atomic_utils.h', + 'src/core/util/avl.h', + 'src/core/util/backoff.cc', + 'src/core/util/backoff.h', + 'src/core/util/bitset.h', + 'src/core/util/chunked_vector.h', + 'src/core/util/construct_destruct.h', + 'src/core/util/cpp_impl_of.h', + 'src/core/util/crash.cc', + 'src/core/util/crash.h', + 'src/core/util/debug_location.h', + 'src/core/util/directory_reader.h', + 'src/core/util/down_cast.h', + 'src/core/util/dual_ref_counted.h', + 'src/core/util/dump_args.cc', + 'src/core/util/dump_args.h', + 'src/core/util/env.h', + 'src/core/util/event_log.cc', + 'src/core/util/event_log.h', + 'src/core/util/examine_stack.cc', + 'src/core/util/examine_stack.h', + 'src/core/util/fork.cc', + 'src/core/util/fork.h', 'src/core/util/gcp_metadata_query.cc', 'src/core/util/gcp_metadata_query.h', + 'src/core/util/gethostname.h', + 'src/core/util/gethostname_fallback.cc', + 'src/core/util/gethostname_host_name_max.cc', + 'src/core/util/gethostname_sysconf.cc', + 'src/core/util/glob.cc', + 'src/core/util/glob.h', + 'src/core/util/gpr_time.cc', + 'src/core/util/grpc_if_nametoindex.h', + 'src/core/util/grpc_if_nametoindex_posix.cc', + 'src/core/util/grpc_if_nametoindex_unsupported.cc', + 'src/core/util/host_port.cc', + 'src/core/util/host_port.h', 'src/core/util/http_client/format_request.cc', 'src/core/util/http_client/format_request.h', 'src/core/util/http_client/httpcli.cc', @@ -2046,6 +1986,7 @@ Pod::Spec.new do |s| 'src/core/util/http_client/httpcli_ssl_credentials.h', 'src/core/util/http_client/parser.cc', 'src/core/util/http_client/parser.h', + 'src/core/util/if_list.h', 'src/core/util/iphone/cpu.cc', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', @@ -2061,33 +2002,92 @@ Pod::Spec.new do |s| 'src/core/util/latent_see.cc', 'src/core/util/latent_see.h', 'src/core/util/linux/cpu.cc', + 'src/core/util/linux/env.cc', + 'src/core/util/load_file.cc', + 'src/core/util/load_file.h', 'src/core/util/log.cc', 'src/core/util/lru_cache.h', + 'src/core/util/manual_constructor.h', + 'src/core/util/match.h', + 'src/core/util/matchers.cc', + 'src/core/util/matchers.h', + 'src/core/util/memory.h', + 'src/core/util/mpscq.cc', + 'src/core/util/mpscq.h', 'src/core/util/msys/tmpfile.cc', + 'src/core/util/no_destruct.h', + 'src/core/util/notification.h', + 'src/core/util/orphanable.h', + 'src/core/util/overload.h', + 'src/core/util/packed_table.h', + 'src/core/util/per_cpu.cc', + 'src/core/util/per_cpu.h', 'src/core/util/posix/cpu.cc', + 'src/core/util/posix/directory_reader.cc', + 'src/core/util/posix/env.cc', + 'src/core/util/posix/stat.cc', 'src/core/util/posix/string.cc', 'src/core/util/posix/sync.cc', + 'src/core/util/posix/thd.cc', 'src/core/util/posix/time.cc', 'src/core/util/posix/tmpfile.cc', + 'src/core/util/random_early_detection.cc', + 'src/core/util/random_early_detection.h', + 'src/core/util/ref_counted.h', + 'src/core/util/ref_counted_ptr.h', + 'src/core/util/ref_counted_string.cc', + 'src/core/util/ref_counted_string.h', 'src/core/util/ring_buffer.h', + 'src/core/util/single_set_ptr.h', + 'src/core/util/sorted_pack.h', 'src/core/util/spinlock.h', + 'src/core/util/stat.h', + 'src/core/util/status_helper.cc', + 'src/core/util/status_helper.h', + 'src/core/util/strerror.cc', + 'src/core/util/strerror.h', 'src/core/util/string.cc', 'src/core/util/string.h', 'src/core/util/sync.cc', + 'src/core/util/sync.h', 'src/core/util/sync_abseil.cc', + 'src/core/util/table.h', + 'src/core/util/tchar.cc', + 'src/core/util/tchar.h', + 'src/core/util/thd.h', 'src/core/util/time.cc', + 'src/core/util/time.h', + 'src/core/util/time_averaged_stats.cc', + 'src/core/util/time_averaged_stats.h', 'src/core/util/time_precise.cc', 'src/core/util/time_precise.h', + 'src/core/util/time_util.cc', + 'src/core/util/time_util.h', 'src/core/util/tmpfile.h', + 'src/core/util/type_list.h', 'src/core/util/unique_ptr_with_bitset.h', + 'src/core/util/unique_type_name.h', 'src/core/util/upb_utils.h', + 'src/core/util/uri.cc', + 'src/core/util/uri.h', 'src/core/util/useful.h', + 'src/core/util/uuid_v4.cc', + 'src/core/util/uuid_v4.h', + 'src/core/util/validation_errors.cc', + 'src/core/util/validation_errors.h', 'src/core/util/windows/cpu.cc', + 'src/core/util/windows/directory_reader.cc', + 'src/core/util/windows/env.cc', + 'src/core/util/windows/stat.cc', 'src/core/util/windows/string.cc', 'src/core/util/windows/string_util.cc', 'src/core/util/windows/sync.cc', + 'src/core/util/windows/thd.cc', 'src/core/util/windows/time.cc', 'src/core/util/windows/tmpfile.cc', + 'src/core/util/work_serializer.cc', + 'src/core/util/work_serializer.h', + 'src/core/util/xxhash_inline.h', 'src/core/xds/grpc/certificate_provider_store.cc', 'src/core/xds/grpc/certificate_provider_store.h', 'src/core/xds/grpc/file_watcher_certificate_provider_factory.cc', @@ -2147,6 +2147,8 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_server_grpc.h', 'src/core/xds/grpc/xds_transport_grpc.cc', 'src/core/xds/grpc/xds_transport_grpc.h', + 'src/core/xds/xds_client/lrs_client.cc', + 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.cc', 'src/core/xds/xds_client/xds_api.h', 'src/core/xds/xds_client/xds_bootstrap.cc', @@ -2154,8 +2156,7 @@ Pod::Spec.new do |s| 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.cc', 'src/core/xds/xds_client/xds_client.h', - 'src/core/xds/xds_client/xds_client_stats.cc', - 'src/core/xds/xds_client/xds_client_stats.h', + 'src/core/xds/xds_client/xds_locality.h', 'src/core/xds/xds_client/xds_metrics.h', 'src/core/xds/xds_client/xds_resource_type.h', 'src/core/xds/xds_client/xds_resource_type_impl.h', @@ -2963,9 +2964,6 @@ Pod::Spec.new do |s| 'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h', 'src/core/lib/address_utils/parse_address.h', 'src/core/lib/address_utils/sockaddr_utils.h', - 'src/core/lib/avl/avl.h', - 'src/core/lib/backoff/backoff.h', - 'src/core/lib/backoff/random_early_detection.h', 'src/core/lib/channel/call_finalization.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_args_preconditioning.h', @@ -2981,7 +2979,6 @@ Pod::Spec.new do |s| 'src/core/lib/config/config_vars.h', 'src/core/lib/config/core_configuration.h', 'src/core/lib/config/load_config.h', - 'src/core/lib/debug/event_log.h', 'src/core/lib/debug/trace.h', 'src/core/lib/debug/trace_flags.h', 'src/core/lib/debug/trace_impl.h', @@ -3051,55 +3048,6 @@ Pod::Spec.new do |s| 'src/core/lib/event_engine/work_queue/work_queue.h', 'src/core/lib/experiments/config.h', 'src/core/lib/experiments/experiments.h', - 'src/core/lib/gprpp/atomic_utils.h', - 'src/core/lib/gprpp/bitset.h', - 'src/core/lib/gprpp/chunked_vector.h', - 'src/core/lib/gprpp/construct_destruct.h', - 'src/core/lib/gprpp/cpp_impl_of.h', - 'src/core/lib/gprpp/crash.h', - 'src/core/lib/gprpp/debug_location.h', - 'src/core/lib/gprpp/directory_reader.h', - 'src/core/lib/gprpp/down_cast.h', - 'src/core/lib/gprpp/dual_ref_counted.h', - 'src/core/lib/gprpp/dump_args.h', - 'src/core/lib/gprpp/env.h', - 'src/core/lib/gprpp/examine_stack.h', - 'src/core/lib/gprpp/fork.h', - 'src/core/lib/gprpp/glob.h', - 'src/core/lib/gprpp/host_port.h', - 'src/core/lib/gprpp/if_list.h', - 'src/core/lib/gprpp/load_file.h', - 'src/core/lib/gprpp/manual_constructor.h', - 'src/core/lib/gprpp/match.h', - 'src/core/lib/gprpp/memory.h', - 'src/core/lib/gprpp/mpscq.h', - 'src/core/lib/gprpp/no_destruct.h', - 'src/core/lib/gprpp/notification.h', - 'src/core/lib/gprpp/orphanable.h', - 'src/core/lib/gprpp/overload.h', - 'src/core/lib/gprpp/packed_table.h', - 'src/core/lib/gprpp/per_cpu.h', - 'src/core/lib/gprpp/ref_counted.h', - 'src/core/lib/gprpp/ref_counted_ptr.h', - 'src/core/lib/gprpp/ref_counted_string.h', - 'src/core/lib/gprpp/single_set_ptr.h', - 'src/core/lib/gprpp/sorted_pack.h', - 'src/core/lib/gprpp/stat.h', - 'src/core/lib/gprpp/status_helper.h', - 'src/core/lib/gprpp/strerror.h', - 'src/core/lib/gprpp/sync.h', - 'src/core/lib/gprpp/table.h', - 'src/core/lib/gprpp/tchar.h', - 'src/core/lib/gprpp/thd.h', - 'src/core/lib/gprpp/time.h', - 'src/core/lib/gprpp/time_averaged_stats.h', - 'src/core/lib/gprpp/time_util.h', - 'src/core/lib/gprpp/type_list.h', - 'src/core/lib/gprpp/unique_type_name.h', - 'src/core/lib/gprpp/uuid_v4.h', - 'src/core/lib/gprpp/validation_errors.h', - 'src/core/lib/gprpp/work_serializer.h', - 'src/core/lib/gprpp/xxhash_inline.h', 'src/core/lib/iomgr/block_annotate.h', 'src/core/lib/iomgr/buffer_list.h', 'src/core/lib/iomgr/call_combiner.h', @@ -3121,8 +3069,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/event_engine_shims/tcp_client.h', 'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/executor.h', - 'src/core/lib/iomgr/gethostname.h', - 'src/core/lib/iomgr/grpc_if_nametoindex.h', 'src/core/lib/iomgr/internal_errqueue.h', 'src/core/lib/iomgr/iocp_windows.h', 'src/core/lib/iomgr/iomgr.h', @@ -3165,7 +3111,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/vsock.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', 'src/core/lib/promise/arena_promise.h', @@ -3307,7 +3252,6 @@ Pod::Spec.new do |s| 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_fwd.h', - 'src/core/lib/uri/uri_parser.h', 'src/core/load_balancing/address_filtering.h', 'src/core/load_balancing/backend_metric_data.h', 'src/core/load_balancing/backend_metric_parser.h', @@ -3398,11 +3342,33 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'src/core/util/alloc.h', + 'src/core/util/atomic_utils.h', + 'src/core/util/avl.h', + 'src/core/util/backoff.h', + 'src/core/util/bitset.h', + 'src/core/util/chunked_vector.h', + 'src/core/util/construct_destruct.h', + 'src/core/util/cpp_impl_of.h', + 'src/core/util/crash.h', + 'src/core/util/debug_location.h', + 'src/core/util/directory_reader.h', + 'src/core/util/down_cast.h', + 'src/core/util/dual_ref_counted.h', + 'src/core/util/dump_args.h', + 'src/core/util/env.h', + 'src/core/util/event_log.h', + 'src/core/util/examine_stack.h', + 'src/core/util/fork.h', 'src/core/util/gcp_metadata_query.h', + 'src/core/util/gethostname.h', + 'src/core/util/glob.h', + 'src/core/util/grpc_if_nametoindex.h', + 'src/core/util/host_port.h', 'src/core/util/http_client/format_request.h', 'src/core/util/http_client/httpcli.h', 'src/core/util/http_client/httpcli_ssl_credentials.h', 'src/core/util/http_client/parser.h', + 'src/core/util/if_list.h', 'src/core/util/json/json.h', 'src/core/util/json/json_args.h', 'src/core/util/json/json_channel_args.h', @@ -3411,15 +3377,50 @@ Pod::Spec.new do |s| 'src/core/util/json/json_util.h', 'src/core/util/json/json_writer.h', 'src/core/util/latent_see.h', + 'src/core/util/load_file.h', 'src/core/util/lru_cache.h', + 'src/core/util/manual_constructor.h', + 'src/core/util/match.h', + 'src/core/util/matchers.h', + 'src/core/util/memory.h', + 'src/core/util/mpscq.h', + 'src/core/util/no_destruct.h', + 'src/core/util/notification.h', + 'src/core/util/orphanable.h', + 'src/core/util/overload.h', + 'src/core/util/packed_table.h', + 'src/core/util/per_cpu.h', + 'src/core/util/random_early_detection.h', + 'src/core/util/ref_counted.h', + 'src/core/util/ref_counted_ptr.h', + 'src/core/util/ref_counted_string.h', 'src/core/util/ring_buffer.h', + 'src/core/util/single_set_ptr.h', + 'src/core/util/sorted_pack.h', 'src/core/util/spinlock.h', + 'src/core/util/stat.h', + 'src/core/util/status_helper.h', + 'src/core/util/strerror.h', 'src/core/util/string.h', + 'src/core/util/sync.h', + 'src/core/util/table.h', + 'src/core/util/tchar.h', + 'src/core/util/thd.h', + 'src/core/util/time.h', + 'src/core/util/time_averaged_stats.h', 'src/core/util/time_precise.h', + 'src/core/util/time_util.h', 'src/core/util/tmpfile.h', + 'src/core/util/type_list.h', 'src/core/util/unique_ptr_with_bitset.h', + 'src/core/util/unique_type_name.h', 'src/core/util/upb_utils.h', + 'src/core/util/uri.h', 'src/core/util/useful.h', + 'src/core/util/uuid_v4.h', + 'src/core/util/validation_errors.h', + 'src/core/util/work_serializer.h', + 'src/core/util/xxhash_inline.h', 'src/core/xds/grpc/certificate_provider_store.h', 'src/core/xds/grpc/file_watcher_certificate_provider_factory.h', 'src/core/xds/grpc/xds_audit_logger_registry.h', @@ -3450,11 +3451,12 @@ Pod::Spec.new do |s| 'src/core/xds/grpc/xds_routing.h', 'src/core/xds/grpc/xds_server_grpc.h', 'src/core/xds/grpc/xds_transport_grpc.h', + 'src/core/xds/xds_client/lrs_client.h', 'src/core/xds/xds_client/xds_api.h', 'src/core/xds/xds_client/xds_bootstrap.h', 'src/core/xds/xds_client/xds_channel_args.h', 'src/core/xds/xds_client/xds_client.h', - 'src/core/xds/xds_client/xds_client_stats.h', + 'src/core/xds/xds_client/xds_locality.h', 'src/core/xds/xds_client/xds_metrics.h', 'src/core/xds/xds_client/xds_resource_type.h', 'src/core/xds/xds_client/xds_resource_type_impl.h', diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index a53a69dfaee4b..0e3597a65a380 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-ProtoRPC' - version = '1.67.0-dev' + version = '1.68.0-dev' s.version = version s.summary = 'RPC library for Protocol Buffers, based on gRPC' s.homepage = 'https://grpc.io' diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec index 59c41799e9504..0df0aae51524b 100644 --- a/gRPC-RxLibrary.podspec +++ b/gRPC-RxLibrary.podspec @@ -21,7 +21,7 @@ Pod::Spec.new do |s| s.name = 'gRPC-RxLibrary' - version = '1.67.0-dev' + version = '1.68.0-dev' s.version = version s.summary = 'Reactive Extensions library for iOS/OSX.' s.homepage = 'https://grpc.io' diff --git a/gRPC.podspec b/gRPC.podspec index a5e82d19c36a8..839b72b339d96 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '1.67.0-dev' + version = '1.68.0-dev' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'https://grpc.io' diff --git a/grpc.gemspec b/grpc.gemspec index b56dffe06e601..ca3b9344c171a 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1099,11 +1099,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/address_utils/parse_address.h ) s.files += %w( src/core/lib/address_utils/sockaddr_utils.cc ) s.files += %w( src/core/lib/address_utils/sockaddr_utils.h ) - s.files += %w( src/core/lib/avl/avl.h ) - s.files += %w( src/core/lib/backoff/backoff.cc ) - s.files += %w( src/core/lib/backoff/backoff.h ) - s.files += %w( src/core/lib/backoff/random_early_detection.cc ) - s.files += %w( src/core/lib/backoff/random_early_detection.h ) s.files += %w( src/core/lib/channel/call_finalization.h ) s.files += %w( src/core/lib/channel/channel_args.cc ) s.files += %w( src/core/lib/channel/channel_args.h ) @@ -1134,8 +1129,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/config/core_configuration.h ) s.files += %w( src/core/lib/config/load_config.cc ) s.files += %w( src/core/lib/config/load_config.h ) - s.files += %w( src/core/lib/debug/event_log.cc ) - s.files += %w( src/core/lib/debug/event_log.h ) s.files += %w( src/core/lib/debug/trace.cc ) s.files += %w( src/core/lib/debug/trace.h ) s.files += %w( src/core/lib/debug/trace_flags.cc ) @@ -1256,83 +1249,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/experiments/config.h ) s.files += %w( src/core/lib/experiments/experiments.cc ) s.files += %w( src/core/lib/experiments/experiments.h ) - s.files += %w( src/core/lib/gprpp/atomic_utils.h ) - s.files += %w( src/core/lib/gprpp/bitset.h ) - s.files += %w( src/core/lib/gprpp/chunked_vector.h ) - s.files += %w( src/core/lib/gprpp/construct_destruct.h ) - s.files += %w( src/core/lib/gprpp/cpp_impl_of.h ) - s.files += %w( src/core/lib/gprpp/crash.cc ) - s.files += %w( src/core/lib/gprpp/crash.h ) - s.files += %w( src/core/lib/gprpp/debug_location.h ) - s.files += %w( src/core/lib/gprpp/directory_reader.h ) - s.files += %w( src/core/lib/gprpp/down_cast.h ) - s.files += %w( src/core/lib/gprpp/dual_ref_counted.h ) - s.files += %w( src/core/lib/gprpp/dump_args.cc ) - s.files += %w( src/core/lib/gprpp/dump_args.h ) - s.files += %w( src/core/lib/gprpp/env.h ) - s.files += %w( src/core/lib/gprpp/examine_stack.cc ) - s.files += %w( src/core/lib/gprpp/examine_stack.h ) - s.files += %w( src/core/lib/gprpp/fork.cc ) - s.files += %w( src/core/lib/gprpp/fork.h ) - s.files += %w( src/core/lib/gprpp/glob.cc ) - s.files += %w( src/core/lib/gprpp/glob.h ) - s.files += %w( src/core/lib/gprpp/host_port.cc ) - s.files += %w( src/core/lib/gprpp/host_port.h ) - s.files += %w( src/core/lib/gprpp/if_list.h ) - s.files += %w( src/core/lib/gprpp/linux/env.cc ) - s.files += %w( src/core/lib/gprpp/load_file.cc ) - s.files += %w( src/core/lib/gprpp/load_file.h ) - s.files += %w( src/core/lib/gprpp/manual_constructor.h ) - s.files += %w( src/core/lib/gprpp/match.h ) - s.files += %w( src/core/lib/gprpp/memory.h ) - s.files += %w( src/core/lib/gprpp/mpscq.cc ) - s.files += %w( src/core/lib/gprpp/mpscq.h ) - s.files += %w( src/core/lib/gprpp/no_destruct.h ) - s.files += %w( src/core/lib/gprpp/notification.h ) - s.files += %w( src/core/lib/gprpp/orphanable.h ) - s.files += %w( src/core/lib/gprpp/overload.h ) - s.files += %w( src/core/lib/gprpp/packed_table.h ) - s.files += %w( src/core/lib/gprpp/per_cpu.cc ) - s.files += %w( src/core/lib/gprpp/per_cpu.h ) - s.files += %w( src/core/lib/gprpp/posix/directory_reader.cc ) - s.files += %w( src/core/lib/gprpp/posix/env.cc ) - s.files += %w( src/core/lib/gprpp/posix/stat.cc ) - s.files += %w( src/core/lib/gprpp/posix/thd.cc ) - s.files += %w( src/core/lib/gprpp/ref_counted.h ) - s.files += %w( src/core/lib/gprpp/ref_counted_ptr.h ) - s.files += %w( src/core/lib/gprpp/ref_counted_string.cc ) - s.files += %w( src/core/lib/gprpp/ref_counted_string.h ) - s.files += %w( src/core/lib/gprpp/single_set_ptr.h ) - s.files += %w( src/core/lib/gprpp/sorted_pack.h ) - s.files += %w( src/core/lib/gprpp/stat.h ) - s.files += %w( src/core/lib/gprpp/status_helper.cc ) - s.files += %w( src/core/lib/gprpp/status_helper.h ) - s.files += %w( src/core/lib/gprpp/strerror.cc ) - s.files += %w( src/core/lib/gprpp/strerror.h ) - s.files += %w( src/core/lib/gprpp/sync.h ) - s.files += %w( src/core/lib/gprpp/table.h ) - s.files += %w( src/core/lib/gprpp/tchar.cc ) - s.files += %w( src/core/lib/gprpp/tchar.h ) - s.files += %w( src/core/lib/gprpp/thd.h ) - s.files += %w( src/core/lib/gprpp/time.cc ) - s.files += %w( src/core/lib/gprpp/time.h ) - s.files += %w( src/core/lib/gprpp/time_averaged_stats.cc ) - s.files += %w( src/core/lib/gprpp/time_averaged_stats.h ) - s.files += %w( src/core/lib/gprpp/time_util.cc ) - s.files += %w( src/core/lib/gprpp/time_util.h ) - s.files += %w( src/core/lib/gprpp/type_list.h ) - s.files += %w( src/core/lib/gprpp/unique_type_name.h ) - s.files += %w( src/core/lib/gprpp/uuid_v4.cc ) - s.files += %w( src/core/lib/gprpp/uuid_v4.h ) - s.files += %w( src/core/lib/gprpp/validation_errors.cc ) - s.files += %w( src/core/lib/gprpp/validation_errors.h ) - s.files += %w( src/core/lib/gprpp/windows/directory_reader.cc ) - s.files += %w( src/core/lib/gprpp/windows/env.cc ) - s.files += %w( src/core/lib/gprpp/windows/stat.cc ) - s.files += %w( src/core/lib/gprpp/windows/thd.cc ) - s.files += %w( src/core/lib/gprpp/work_serializer.cc ) - s.files += %w( src/core/lib/gprpp/work_serializer.h ) - s.files += %w( src/core/lib/gprpp/xxhash_inline.h ) s.files += %w( src/core/lib/iomgr/block_annotate.h ) s.files += %w( src/core/lib/iomgr/buffer_list.cc ) s.files += %w( src/core/lib/iomgr/buffer_list.h ) @@ -1377,13 +1293,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/executor.h ) s.files += %w( src/core/lib/iomgr/fork_posix.cc ) s.files += %w( src/core/lib/iomgr/fork_windows.cc ) - s.files += %w( src/core/lib/iomgr/gethostname.h ) - s.files += %w( src/core/lib/iomgr/gethostname_fallback.cc ) - s.files += %w( src/core/lib/iomgr/gethostname_host_name_max.cc ) - s.files += %w( src/core/lib/iomgr/gethostname_sysconf.cc ) - s.files += %w( src/core/lib/iomgr/grpc_if_nametoindex.h ) - s.files += %w( src/core/lib/iomgr/grpc_if_nametoindex_posix.cc ) - s.files += %w( src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc ) s.files += %w( src/core/lib/iomgr/internal_errqueue.cc ) s.files += %w( src/core/lib/iomgr/internal_errqueue.h ) s.files += %w( src/core/lib/iomgr/iocp_windows.cc ) @@ -1474,8 +1383,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.cc ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) - s.files += %w( src/core/lib/matchers/matchers.cc ) - s.files += %w( src/core/lib/matchers/matchers.h ) s.files += %w( src/core/lib/promise/activity.cc ) s.files += %w( src/core/lib/promise/activity.h ) s.files += %w( src/core/lib/promise/all_ok.h ) @@ -1736,8 +1643,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/transport.h ) s.files += %w( src/core/lib/transport/transport_fwd.h ) s.files += %w( src/core/lib/transport/transport_op_string.cc ) - s.files += %w( src/core/lib/uri/uri_parser.cc ) - s.files += %w( src/core/lib/uri/uri_parser.h ) s.files += %w( src/core/load_balancing/address_filtering.cc ) s.files += %w( src/core/load_balancing/address_filtering.h ) s.files += %w( src/core/load_balancing/backend_metric_data.h ) @@ -1922,8 +1827,43 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/alloc.cc ) s.files += %w( src/core/util/alloc.h ) s.files += %w( src/core/util/atm.cc ) + s.files += %w( src/core/util/atomic_utils.h ) + s.files += %w( src/core/util/avl.h ) + s.files += %w( src/core/util/backoff.cc ) + s.files += %w( src/core/util/backoff.h ) + s.files += %w( src/core/util/bitset.h ) + s.files += %w( src/core/util/chunked_vector.h ) + s.files += %w( src/core/util/construct_destruct.h ) + s.files += %w( src/core/util/cpp_impl_of.h ) + s.files += %w( src/core/util/crash.cc ) + s.files += %w( src/core/util/crash.h ) + s.files += %w( src/core/util/debug_location.h ) + s.files += %w( src/core/util/directory_reader.h ) + s.files += %w( src/core/util/down_cast.h ) + s.files += %w( src/core/util/dual_ref_counted.h ) + s.files += %w( src/core/util/dump_args.cc ) + s.files += %w( src/core/util/dump_args.h ) + s.files += %w( src/core/util/env.h ) + s.files += %w( src/core/util/event_log.cc ) + s.files += %w( src/core/util/event_log.h ) + s.files += %w( src/core/util/examine_stack.cc ) + s.files += %w( src/core/util/examine_stack.h ) + s.files += %w( src/core/util/fork.cc ) + s.files += %w( src/core/util/fork.h ) s.files += %w( src/core/util/gcp_metadata_query.cc ) s.files += %w( src/core/util/gcp_metadata_query.h ) + s.files += %w( src/core/util/gethostname.h ) + s.files += %w( src/core/util/gethostname_fallback.cc ) + s.files += %w( src/core/util/gethostname_host_name_max.cc ) + s.files += %w( src/core/util/gethostname_sysconf.cc ) + s.files += %w( src/core/util/glob.cc ) + s.files += %w( src/core/util/glob.h ) + s.files += %w( src/core/util/gpr_time.cc ) + s.files += %w( src/core/util/grpc_if_nametoindex.h ) + s.files += %w( src/core/util/grpc_if_nametoindex_posix.cc ) + s.files += %w( src/core/util/grpc_if_nametoindex_unsupported.cc ) + s.files += %w( src/core/util/host_port.cc ) + s.files += %w( src/core/util/host_port.h ) s.files += %w( src/core/util/http_client/format_request.cc ) s.files += %w( src/core/util/http_client/format_request.h ) s.files += %w( src/core/util/http_client/httpcli.cc ) @@ -1932,6 +1872,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/http_client/httpcli_ssl_credentials.h ) s.files += %w( src/core/util/http_client/parser.cc ) s.files += %w( src/core/util/http_client/parser.h ) + s.files += %w( src/core/util/if_list.h ) s.files += %w( src/core/util/iphone/cpu.cc ) s.files += %w( src/core/util/json/json.h ) s.files += %w( src/core/util/json/json_args.h ) @@ -1947,33 +1888,92 @@ Gem::Specification.new do |s| s.files += %w( src/core/util/latent_see.cc ) s.files += %w( src/core/util/latent_see.h ) s.files += %w( src/core/util/linux/cpu.cc ) + s.files += %w( src/core/util/linux/env.cc ) + s.files += %w( src/core/util/load_file.cc ) + s.files += %w( src/core/util/load_file.h ) s.files += %w( src/core/util/log.cc ) s.files += %w( src/core/util/lru_cache.h ) + s.files += %w( src/core/util/manual_constructor.h ) + s.files += %w( src/core/util/match.h ) + s.files += %w( src/core/util/matchers.cc ) + s.files += %w( src/core/util/matchers.h ) + s.files += %w( src/core/util/memory.h ) + s.files += %w( src/core/util/mpscq.cc ) + s.files += %w( src/core/util/mpscq.h ) s.files += %w( src/core/util/msys/tmpfile.cc ) + s.files += %w( src/core/util/no_destruct.h ) + s.files += %w( src/core/util/notification.h ) + s.files += %w( src/core/util/orphanable.h ) + s.files += %w( src/core/util/overload.h ) + s.files += %w( src/core/util/packed_table.h ) + s.files += %w( src/core/util/per_cpu.cc ) + s.files += %w( src/core/util/per_cpu.h ) s.files += %w( src/core/util/posix/cpu.cc ) + s.files += %w( src/core/util/posix/directory_reader.cc ) + s.files += %w( src/core/util/posix/env.cc ) + s.files += %w( src/core/util/posix/stat.cc ) s.files += %w( src/core/util/posix/string.cc ) s.files += %w( src/core/util/posix/sync.cc ) + s.files += %w( src/core/util/posix/thd.cc ) s.files += %w( src/core/util/posix/time.cc ) s.files += %w( src/core/util/posix/tmpfile.cc ) + s.files += %w( src/core/util/random_early_detection.cc ) + s.files += %w( src/core/util/random_early_detection.h ) + s.files += %w( src/core/util/ref_counted.h ) + s.files += %w( src/core/util/ref_counted_ptr.h ) + s.files += %w( src/core/util/ref_counted_string.cc ) + s.files += %w( src/core/util/ref_counted_string.h ) s.files += %w( src/core/util/ring_buffer.h ) + s.files += %w( src/core/util/single_set_ptr.h ) + s.files += %w( src/core/util/sorted_pack.h ) s.files += %w( src/core/util/spinlock.h ) + s.files += %w( src/core/util/stat.h ) + s.files += %w( src/core/util/status_helper.cc ) + s.files += %w( src/core/util/status_helper.h ) + s.files += %w( src/core/util/strerror.cc ) + s.files += %w( src/core/util/strerror.h ) s.files += %w( src/core/util/string.cc ) s.files += %w( src/core/util/string.h ) s.files += %w( src/core/util/sync.cc ) + s.files += %w( src/core/util/sync.h ) s.files += %w( src/core/util/sync_abseil.cc ) + s.files += %w( src/core/util/table.h ) + s.files += %w( src/core/util/tchar.cc ) + s.files += %w( src/core/util/tchar.h ) + s.files += %w( src/core/util/thd.h ) s.files += %w( src/core/util/time.cc ) + s.files += %w( src/core/util/time.h ) + s.files += %w( src/core/util/time_averaged_stats.cc ) + s.files += %w( src/core/util/time_averaged_stats.h ) s.files += %w( src/core/util/time_precise.cc ) s.files += %w( src/core/util/time_precise.h ) + s.files += %w( src/core/util/time_util.cc ) + s.files += %w( src/core/util/time_util.h ) s.files += %w( src/core/util/tmpfile.h ) + s.files += %w( src/core/util/type_list.h ) s.files += %w( src/core/util/unique_ptr_with_bitset.h ) + s.files += %w( src/core/util/unique_type_name.h ) s.files += %w( src/core/util/upb_utils.h ) + s.files += %w( src/core/util/uri.cc ) + s.files += %w( src/core/util/uri.h ) s.files += %w( src/core/util/useful.h ) + s.files += %w( src/core/util/uuid_v4.cc ) + s.files += %w( src/core/util/uuid_v4.h ) + s.files += %w( src/core/util/validation_errors.cc ) + s.files += %w( src/core/util/validation_errors.h ) s.files += %w( src/core/util/windows/cpu.cc ) + s.files += %w( src/core/util/windows/directory_reader.cc ) + s.files += %w( src/core/util/windows/env.cc ) + s.files += %w( src/core/util/windows/stat.cc ) s.files += %w( src/core/util/windows/string.cc ) s.files += %w( src/core/util/windows/string_util.cc ) s.files += %w( src/core/util/windows/sync.cc ) + s.files += %w( src/core/util/windows/thd.cc ) s.files += %w( src/core/util/windows/time.cc ) s.files += %w( src/core/util/windows/tmpfile.cc ) + s.files += %w( src/core/util/work_serializer.cc ) + s.files += %w( src/core/util/work_serializer.h ) + s.files += %w( src/core/util/xxhash_inline.h ) s.files += %w( src/core/xds/grpc/certificate_provider_store.cc ) s.files += %w( src/core/xds/grpc/certificate_provider_store.h ) s.files += %w( src/core/xds/grpc/file_watcher_certificate_provider_factory.cc ) @@ -2033,6 +2033,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/xds/grpc/xds_server_grpc.h ) s.files += %w( src/core/xds/grpc/xds_transport_grpc.cc ) s.files += %w( src/core/xds/grpc/xds_transport_grpc.h ) + s.files += %w( src/core/xds/xds_client/lrs_client.cc ) + s.files += %w( src/core/xds/xds_client/lrs_client.h ) s.files += %w( src/core/xds/xds_client/xds_api.cc ) s.files += %w( src/core/xds/xds_client/xds_api.h ) s.files += %w( src/core/xds/xds_client/xds_bootstrap.cc ) @@ -2040,8 +2042,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/xds/xds_client/xds_channel_args.h ) s.files += %w( src/core/xds/xds_client/xds_client.cc ) s.files += %w( src/core/xds/xds_client/xds_client.h ) - s.files += %w( src/core/xds/xds_client/xds_client_stats.cc ) - s.files += %w( src/core/xds/xds_client/xds_client_stats.h ) + s.files += %w( src/core/xds/xds_client/xds_locality.h ) s.files += %w( src/core/xds/xds_client/xds_metrics.h ) s.files += %w( src/core/xds/xds_client/xds_resource_type.h ) s.files += %w( src/core/xds/xds_client/xds_resource_type_impl.h ) @@ -2514,6 +2515,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/base64/base64.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/bcm_support.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/bio/bio.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/bio/connect.c ) @@ -2608,107 +2610,104 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/evp/sign.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/ex_data.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/key_wrap.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm_interface.h ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/add.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/x86_64-gcc.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bytes.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/cmp.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/ctx.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div_extra.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/exponentiation.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/gcd_extra.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/generic.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/jacobi.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/montgomery_inv.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/mul.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/random.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/rsaz_exp.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aesccm.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/shift.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/sqrt.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/aead.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aesccm.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cmac/cmac.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/cmac/cmac.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/check.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/dh.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digestsign/digestsign.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/digestsign/digestsign.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/builtin_curves.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_montgomery.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/felem.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/oct.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz-table.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/scalar.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/wnaf.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/ecdh.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/hkdf/hkdf.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/hkdf/hkdf.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/hmac.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/getrandom_fillin.h ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/polyval.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/blinding.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/padding.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/service_indicator.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/service_indicator.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c.inc ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h ) - s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/kdf.c.inc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/hrss/internal.h ) @@ -2720,6 +2719,10 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/lhash/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/mem.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/mldsa/internal.h ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/mlkem/internal.h ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/obj/obj.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/obj/obj_dat.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c ) @@ -2745,12 +2748,16 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/crypto/pool/internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/pool/pool.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/fork_detect.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/getentropy.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/getrandom_fillin.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/sysrand_internal.h ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c ) + s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/urandom.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c ) s.files += %w( third_party/boringssl-with-bazel/src/crypto/refcount.c ) @@ -2908,6 +2915,8 @@ Gem::Specification.new do |s| s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/md4.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/md5.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/mem.h ) + s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/mldsa.h ) + s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/mlkem.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/nid.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/obj.h ) s.files += %w( third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h ) diff --git a/include/grpcpp/impl/sync.h b/include/grpcpp/impl/sync.h index a7ec965a009c2..c4aa00bc07dbe 100644 --- a/include/grpcpp/impl/sync.h +++ b/include/grpcpp/impl/sync.h @@ -36,9 +36,9 @@ // The core library is not accessible in C++ codegen headers, and vice versa. // Thus, we need to have duplicate headers with similar functionality. // Make sure any change to this file is also reflected in -// src/core/lib/gprpp/sync.h too. +// src/core/util/sync.h too. // -// Whenever possible, prefer "src/core/lib/gprpp/sync.h" over this file, +// Whenever possible, prefer "src/core/util/sync.h" over this file, // since in core we do not rely on g_core_codegen_interface and hence do not // pay the costs of virtual function calls. diff --git a/include/grpcpp/security/tls_certificate_provider.h b/include/grpcpp/security/tls_certificate_provider.h index 6b918fec0a1a9..fc34d67a6d5ca 100644 --- a/include/grpcpp/security/tls_certificate_provider.h +++ b/include/grpcpp/security/tls_certificate_provider.h @@ -18,12 +18,16 @@ #define GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H #include +#include #include +#include "absl/status/statusor.h" + #include #include #include #include +#include #include namespace grpc { @@ -67,6 +71,12 @@ class GRPCXX_DLL StaticDataCertificateProvider grpc_tls_certificate_provider* c_provider() override { return c_provider_; } + // Returns an OK status if the following conditions hold: + // - the root certificates consist of one or more valid PEM blocks, and + // - every identity key-cert pair has a certificate chain that consists of + // valid PEM blocks and has a private key is a valid PEM block. + absl::Status ValidateCredentials() const; + private: grpc_tls_certificate_provider* c_provider_ = nullptr; }; @@ -117,6 +127,14 @@ class GRPCXX_DLL FileWatcherCertificateProvider final grpc_tls_certificate_provider* c_provider() override { return c_provider_; } + // Returns an OK status if the following conditions hold: + // - the currently-loaded root certificates, if any, consist of one or more + // valid PEM blocks, and + // - every currently-loaded identity key-cert pair, if any, has a certificate + // chain that consists of valid PEM blocks and has a private key is a valid + // PEM block. + absl::Status ValidateCredentials() const; + private: grpc_tls_certificate_provider* c_provider_ = nullptr; }; diff --git a/include/grpcpp/version_info.h b/include/grpcpp/version_info.h index f3785e640cbd7..e9de5915e6149 100644 --- a/include/grpcpp/version_info.h +++ b/include/grpcpp/version_info.h @@ -19,9 +19,9 @@ #define GRPCPP_VERSION_INFO_H #define GRPC_CPP_VERSION_MAJOR 1 -#define GRPC_CPP_VERSION_MINOR 67 +#define GRPC_CPP_VERSION_MINOR 68 #define GRPC_CPP_VERSION_PATCH 0 #define GRPC_CPP_VERSION_TAG "dev" -#define GRPC_CPP_VERSION_STRING "1.67.0-dev" +#define GRPC_CPP_VERSION_STRING "1.68.0-dev" #endif // GRPCPP_VERSION_INFO_H diff --git a/package.xml b/package.xml index 6a05e868d2682..7982ab5359669 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2019-09-24 - 1.67.0dev - 1.67.0dev + 1.68.0dev + 1.68.0dev beta @@ -22,7 +22,7 @@ Apache 2.0 -- gRPC Core 1.67.0 update +- gRPC Core 1.68.0 update @@ -1081,11 +1081,6 @@ - - - - - @@ -1116,8 +1111,6 @@ - - @@ -1238,83 +1231,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1359,13 +1275,6 @@ - - - - - - - @@ -1456,8 +1365,6 @@ - - @@ -1718,8 +1625,6 @@ - - @@ -1904,8 +1809,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1914,6 +1854,7 @@ + @@ -1929,33 +1870,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2015,6 +2015,8 @@ + + @@ -2022,8 +2024,7 @@ - - + @@ -2518,6 +2519,7 @@ + @@ -2612,107 +2614,104 @@ - - + + - - + + - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - + + + + + + - + - - + + - - + + - + - - - - + + + + - - + + - + - + - - - - - - - + + + + + + + - - - + + + - - - - - - + + + + + + - - - - - - + + + - - - + + - - - - - + + + + + - + - - - + + + - + @@ -2724,6 +2723,10 @@ + + + + @@ -2749,12 +2752,16 @@ + + + + @@ -2912,6 +2919,8 @@ + + diff --git a/src/boringssl/boringssl_prefix_symbols.h b/src/boringssl/boringssl_prefix_symbols.h index 3d9b880017f43..47e53df886ff0 100644 --- a/src/boringssl/boringssl_prefix_symbols.h +++ b/src/boringssl/boringssl_prefix_symbols.h @@ -1,4 +1,4 @@ -// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: 16c8d3db1af20fcc04b5190b25242aadcb1fbb30 +// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6 // Copyright (c) 2018, Google Inc. // @@ -829,6 +829,9 @@ #define BASIC_CONSTRAINTS_free BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BASIC_CONSTRAINTS_free) #define BASIC_CONSTRAINTS_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BASIC_CONSTRAINTS_it) #define BASIC_CONSTRAINTS_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BASIC_CONSTRAINTS_new) +#define BCM_rand_bytes BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BCM_rand_bytes) +#define BCM_rand_bytes_hwrng BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BCM_rand_bytes_hwrng) +#define BCM_rand_bytes_with_additional_data BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BCM_rand_bytes_with_additional_data) #define BIO_append_filename BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BIO_append_filename) #define BIO_callback_ctrl BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BIO_callback_ctrl) #define BIO_clear_flags BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, BIO_clear_flags) @@ -1139,6 +1142,7 @@ #define CBS_asn1_oid_to_text BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_asn1_oid_to_text) #define CBS_contains_zero_byte BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_contains_zero_byte) #define CBS_copy_bytes BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_copy_bytes) +#define CBS_data BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_data) #define CBS_get_any_asn1 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_get_any_asn1) #define CBS_get_any_asn1_element BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_get_any_asn1_element) #define CBS_get_any_ber_asn1_element BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_get_any_ber_asn1_element) @@ -1175,6 +1179,7 @@ #define CBS_is_valid_asn1_bitstring BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_is_valid_asn1_bitstring) #define CBS_is_valid_asn1_integer BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_is_valid_asn1_integer) #define CBS_is_valid_asn1_oid BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_is_valid_asn1_oid) +#define CBS_len BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_len) #define CBS_mem_equal BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_mem_equal) #define CBS_parse_generalized_time BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_parse_generalized_time) #define CBS_parse_utc_time BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, CBS_parse_utc_time) @@ -1879,6 +1884,7 @@ #define EVP_hpke_aes_256_gcm BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_hpke_aes_256_gcm) #define EVP_hpke_chacha20_poly1305 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_hpke_chacha20_poly1305) #define EVP_hpke_hkdf_sha256 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_hpke_hkdf_sha256) +#define EVP_hpke_p256_hkdf_sha256 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_hpke_p256_hkdf_sha256) #define EVP_hpke_x25519_hkdf_sha256 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_hpke_x25519_hkdf_sha256) #define EVP_marshal_digest_algorithm BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_marshal_digest_algorithm) #define EVP_marshal_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, EVP_marshal_private_key) @@ -1981,6 +1987,40 @@ #define MD5_Update BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MD5_Update) #define METHOD_ref BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, METHOD_ref) #define METHOD_unref BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, METHOD_unref) +#define MLDSA65_generate_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_generate_key) +#define MLDSA65_generate_key_external_entropy BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_generate_key_external_entropy) +#define MLDSA65_marshal_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_marshal_private_key) +#define MLDSA65_marshal_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_marshal_public_key) +#define MLDSA65_parse_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_parse_private_key) +#define MLDSA65_parse_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_parse_public_key) +#define MLDSA65_private_key_from_seed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_private_key_from_seed) +#define MLDSA65_public_from_private BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_public_from_private) +#define MLDSA65_sign BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_sign) +#define MLDSA65_sign_internal BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_sign_internal) +#define MLDSA65_verify BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_verify) +#define MLDSA65_verify_internal BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLDSA65_verify_internal) +#define MLKEM1024_decap BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_decap) +#define MLKEM1024_encap BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_encap) +#define MLKEM1024_encap_external_entropy BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_encap_external_entropy) +#define MLKEM1024_generate_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_generate_key) +#define MLKEM1024_generate_key_external_seed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_generate_key_external_seed) +#define MLKEM1024_marshal_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_marshal_private_key) +#define MLKEM1024_marshal_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_marshal_public_key) +#define MLKEM1024_parse_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_parse_private_key) +#define MLKEM1024_parse_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_parse_public_key) +#define MLKEM1024_private_key_from_seed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_private_key_from_seed) +#define MLKEM1024_public_from_private BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM1024_public_from_private) +#define MLKEM768_decap BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_decap) +#define MLKEM768_encap BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_encap) +#define MLKEM768_encap_external_entropy BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_encap_external_entropy) +#define MLKEM768_generate_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_generate_key) +#define MLKEM768_generate_key_external_seed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_generate_key_external_seed) +#define MLKEM768_marshal_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_marshal_private_key) +#define MLKEM768_marshal_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_marshal_public_key) +#define MLKEM768_parse_private_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_parse_private_key) +#define MLKEM768_parse_public_key BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_parse_public_key) +#define MLKEM768_private_key_from_seed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_private_key_from_seed) +#define MLKEM768_public_from_private BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, MLKEM768_public_from_private) #define NAME_CONSTRAINTS_check BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, NAME_CONSTRAINTS_check) #define NAME_CONSTRAINTS_free BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, NAME_CONSTRAINTS_free) #define NAME_CONSTRAINTS_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, NAME_CONSTRAINTS_it) @@ -2252,7 +2292,6 @@ #define RAND_SSLeay BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_SSLeay) #define RAND_add BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_add) #define RAND_bytes BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_bytes) -#define RAND_bytes_with_additional_data BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_bytes_with_additional_data) #define RAND_cleanup BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_cleanup) #define RAND_disable_fork_unsafe_buffering BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_disable_fork_unsafe_buffering) #define RAND_egd BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, RAND_egd) @@ -3018,8 +3057,10 @@ #define c2i_ASN1_BIT_STRING BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, c2i_ASN1_BIT_STRING) #define c2i_ASN1_INTEGER BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, c2i_ASN1_INTEGER) #define c2i_ASN1_OBJECT BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, c2i_ASN1_OBJECT) -#define chacha20_poly1305_open BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_open) -#define chacha20_poly1305_seal BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_seal) +#define chacha20_poly1305_open_avx2 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_open_avx2) +#define chacha20_poly1305_open_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_open_nohw) +#define chacha20_poly1305_seal_avx2 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_seal_avx2) +#define chacha20_poly1305_seal_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, chacha20_poly1305_seal_nohw) #define crypto_gcm_clmul_enabled BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, crypto_gcm_clmul_enabled) #define d2i_ASN1_BIT_STRING BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, d2i_ASN1_BIT_STRING) #define d2i_ASN1_BMPSTRING BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, d2i_ASN1_BMPSTRING) @@ -3221,19 +3262,29 @@ #define ec_set_to_safe_point BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ec_set_to_safe_point) #define ec_simple_scalar_inv0_montgomery BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ec_simple_scalar_inv0_montgomery) #define ec_simple_scalar_to_montgomery_inv_vartime BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ec_simple_scalar_to_montgomery_inv_vartime) -#define ecdsa_do_verify_no_self_test BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_do_verify_no_self_test) -#define ecdsa_sign_with_nonce_for_known_answer_test BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_sign_with_nonce_for_known_answer_test) -#define ecp_nistz256_avx2_select_w7 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_avx2_select_w7) -#define ecp_nistz256_mul_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_mul_mont) +#define ecdsa_sign_fixed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_sign_fixed) +#define ecdsa_sign_fixed_with_nonce_for_known_answer_test BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_sign_fixed_with_nonce_for_known_answer_test) +#define ecdsa_verify_fixed BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_verify_fixed) +#define ecdsa_verify_fixed_no_self_test BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecdsa_verify_fixed_no_self_test) +#define ecp_nistz256_mul_mont_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_mul_mont_adx) +#define ecp_nistz256_mul_mont_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_mul_mont_nohw) #define ecp_nistz256_neg BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_neg) -#define ecp_nistz256_ord_mul_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_mul_mont) -#define ecp_nistz256_ord_sqr_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_sqr_mont) -#define ecp_nistz256_point_add BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add) -#define ecp_nistz256_point_add_affine BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add_affine) -#define ecp_nistz256_point_double BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_double) -#define ecp_nistz256_select_w5 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w5) -#define ecp_nistz256_select_w7 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w7) -#define ecp_nistz256_sqr_mont BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_sqr_mont) +#define ecp_nistz256_ord_mul_mont_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_mul_mont_adx) +#define ecp_nistz256_ord_mul_mont_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_mul_mont_nohw) +#define ecp_nistz256_ord_sqr_mont_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_sqr_mont_adx) +#define ecp_nistz256_ord_sqr_mont_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_ord_sqr_mont_nohw) +#define ecp_nistz256_point_add_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add_adx) +#define ecp_nistz256_point_add_affine_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add_affine_adx) +#define ecp_nistz256_point_add_affine_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add_affine_nohw) +#define ecp_nistz256_point_add_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_add_nohw) +#define ecp_nistz256_point_double_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_double_adx) +#define ecp_nistz256_point_double_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_point_double_nohw) +#define ecp_nistz256_select_w5_avx2 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w5_avx2) +#define ecp_nistz256_select_w5_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w5_nohw) +#define ecp_nistz256_select_w7_avx2 BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w7_avx2) +#define ecp_nistz256_select_w7_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_select_w7_nohw) +#define ecp_nistz256_sqr_mont_adx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_sqr_mont_adx) +#define ecp_nistz256_sqr_mont_nohw BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ecp_nistz256_sqr_mont_nohw) #define ed25519_asn1_meth BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ed25519_asn1_meth) #define ed25519_pkey_meth BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, ed25519_pkey_meth) #define evp_pkey_set_method BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, evp_pkey_set_method) diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc index 7d42dc8f1af75..7ef2891c4888c 100644 --- a/src/compiler/php_generator.cc +++ b/src/compiler/php_generator.cc @@ -176,7 +176,7 @@ void PrintServerMethod(const MethodDescriptor* method, Printer* out) { "of \\$input_type_id$\n" " * @param \\Grpc\\ServerContext $$context server request context\n" " * @return \\$output_type_id$ for response data, null if if error " - "occured\n" + "occurred\n" " * initial metadata (if any) and status (if not ok) should be set " "to $$context\n" " */\n" @@ -208,7 +208,7 @@ void PrintServerMethod(const MethodDescriptor* method, Printer* out) { " * @param \\$input_type_id$ $$request client request\n" " * @param \\Grpc\\ServerContext $$context server request context\n" " * @return \\$output_type_id$ for response data, null if if error " - "occured\n" + "occurred\n" " * initial metadata (if any) and status (if not ok) should be set " "to $$context\n" " */\n" diff --git a/src/core/BUILD b/src/core/BUILD index 5e5c2ccf6e7b9..16857fe6e5f0c 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -51,10 +51,10 @@ grpc_cc_library( grpc_cc_library( name = "dump_args", srcs = [ - "lib/gprpp/dump_args.cc", + "util/dump_args.cc", ], hdrs = [ - "lib/gprpp/dump_args.h", + "util/dump_args.h", ], external_deps = [ "absl/functional:any_invocable", @@ -211,7 +211,7 @@ grpc_cc_library( grpc_cc_library( name = "atomic_utils", language = "c++", - public_hdrs = ["lib/gprpp/atomic_utils.h"], + public_hdrs = ["util/atomic_utils.h"], deps = ["//:gpr"], ) @@ -305,10 +305,10 @@ grpc_cc_library( grpc_cc_library( name = "examine_stack", srcs = [ - "lib/gprpp/examine_stack.cc", + "util/examine_stack.cc", ], hdrs = [ - "lib/gprpp/examine_stack.h", + "util/examine_stack.h", ], external_deps = ["absl/types:optional"], deps = ["//:gpr_platform"], @@ -340,7 +340,7 @@ grpc_cc_library( name = "gpr_manual_constructor", srcs = [], hdrs = [ - "lib/gprpp/manual_constructor.h", + "util/manual_constructor.h", ], language = "c++", deps = [ @@ -365,12 +365,12 @@ grpc_cc_library( grpc_cc_library( name = "env", srcs = [ - "lib/gprpp/linux/env.cc", - "lib/gprpp/posix/env.cc", - "lib/gprpp/windows/env.cc", + "util/linux/env.cc", + "util/posix/env.cc", + "util/windows/env.cc", ], hdrs = [ - "lib/gprpp/env.h", + "util/env.h", ], external_deps = ["absl/types:optional"], deps = [ @@ -382,11 +382,11 @@ grpc_cc_library( grpc_cc_library( name = "directory_reader", srcs = [ - "lib/gprpp/posix/directory_reader.cc", - "lib/gprpp/windows/directory_reader.cc", + "util/posix/directory_reader.cc", + "util/windows/directory_reader.cc", ], hdrs = [ - "lib/gprpp/directory_reader.h", + "util/directory_reader.h", ], external_deps = [ "absl/functional:function_ref", @@ -402,7 +402,7 @@ grpc_cc_library( grpc_cc_library( name = "chunked_vector", - hdrs = ["lib/gprpp/chunked_vector.h"], + hdrs = ["util/chunked_vector.h"], external_deps = [ "absl/log:check", ], @@ -416,17 +416,17 @@ grpc_cc_library( grpc_cc_library( name = "construct_destruct", language = "c++", - public_hdrs = ["lib/gprpp/construct_destruct.h"], + public_hdrs = ["util/construct_destruct.h"], deps = ["//:gpr_platform"], ) grpc_cc_library( name = "status_helper", srcs = [ - "lib/gprpp/status_helper.cc", + "util/status_helper.cc", ], hdrs = [ - "lib/gprpp/status_helper.h", + "util/status_helper.h", ], external_deps = [ "absl/log:check", @@ -451,7 +451,7 @@ grpc_cc_library( grpc_cc_library( name = "unique_type_name", - hdrs = ["lib/gprpp/unique_type_name.h"], + hdrs = ["util/unique_type_name.h"], external_deps = ["absl/strings"], language = "c++", deps = [ @@ -463,10 +463,10 @@ grpc_cc_library( grpc_cc_library( name = "validation_errors", srcs = [ - "lib/gprpp/validation_errors.cc", + "util/validation_errors.cc", ], hdrs = [ - "lib/gprpp/validation_errors.h", + "util/validation_errors.h", ], external_deps = [ "absl/log:log", @@ -480,7 +480,7 @@ grpc_cc_library( grpc_cc_library( name = "overload", language = "c++", - public_hdrs = ["lib/gprpp/overload.h"], + public_hdrs = ["util/overload.h"], deps = ["//:gpr_platform"], ) @@ -488,7 +488,7 @@ grpc_cc_library( name = "match", external_deps = ["absl/types:variant"], language = "c++", - public_hdrs = ["lib/gprpp/match.h"], + public_hdrs = ["util/match.h"], deps = [ "overload", "//:gpr_platform", @@ -502,7 +502,7 @@ grpc_cc_library( "absl/utility", ], language = "c++", - public_hdrs = ["lib/gprpp/table.h"], + public_hdrs = ["util/table.h"], deps = [ "bitset", "//:gpr_platform", @@ -511,7 +511,7 @@ grpc_cc_library( grpc_cc_library( name = "packed_table", - hdrs = ["lib/gprpp/packed_table.h"], + hdrs = ["util/packed_table.h"], language = "c++", deps = [ "sorted_pack", @@ -523,7 +523,7 @@ grpc_cc_library( grpc_cc_library( name = "bitset", language = "c++", - public_hdrs = ["lib/gprpp/bitset.h"], + public_hdrs = ["util/bitset.h"], deps = [ "useful", "//:gpr_platform", @@ -533,7 +533,7 @@ grpc_cc_library( grpc_cc_library( name = "no_destruct", language = "c++", - public_hdrs = ["lib/gprpp/no_destruct.h"], + public_hdrs = ["util/no_destruct.h"], deps = [ "construct_destruct", "//:gpr_platform", @@ -543,10 +543,10 @@ grpc_cc_library( grpc_cc_library( name = "tchar", srcs = [ - "lib/gprpp/tchar.cc", + "util/tchar.cc", ], hdrs = [ - "lib/gprpp/tchar.h", + "util/tchar.h", ], deps = ["//:gpr_platform"], ) @@ -1264,7 +1264,7 @@ grpc_cc_library( "absl/log:log", ], language = "c++", - public_hdrs = ["lib/gprpp/ref_counted.h"], + public_hdrs = ["util/ref_counted.h"], deps = [ "atomic_utils", "down_cast", @@ -1281,7 +1281,7 @@ grpc_cc_library( "absl/log:log", ], language = "c++", - public_hdrs = ["lib/gprpp/dual_ref_counted.h"], + public_hdrs = ["util/dual_ref_counted.h"], deps = [ "down_cast", "ref_counted", @@ -1295,10 +1295,10 @@ grpc_cc_library( grpc_cc_library( name = "ref_counted_string", srcs = [ - "lib/gprpp/ref_counted_string.cc", + "util/ref_counted_string.cc", ], hdrs = [ - "lib/gprpp/ref_counted_string.h", + "util/ref_counted_string.h", ], external_deps = ["absl/strings"], language = "c++", @@ -1311,10 +1311,10 @@ grpc_cc_library( grpc_cc_library( name = "uuid_v4", - srcs = ["lib/gprpp/uuid_v4.cc"], + srcs = ["util/uuid_v4.cc"], external_deps = ["absl/strings:str_format"], language = "c++", - public_hdrs = ["lib/gprpp/uuid_v4.h"], + public_hdrs = ["util/uuid_v4.h"], deps = ["//:gpr"], ) @@ -1387,7 +1387,7 @@ grpc_cc_library( "//:iomgr", "//:parse_address", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -1608,6 +1608,23 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "request_buffer", + srcs = [ + "call/request_buffer.cc", + ], + hdrs = [ + "call/request_buffer.h", + ], + external_deps = ["absl/types:optional"], + deps = [ + "call_spine", + "message", + "metadata", + "wait_set", + ], +) + grpc_cc_library( name = "slice_refcount", hdrs = [ @@ -1727,10 +1744,10 @@ grpc_cc_library( grpc_cc_library( name = "time", srcs = [ - "lib/gprpp/time.cc", + "util/time.cc", ], hdrs = [ - "lib/gprpp/time.h", + "util/time.h", ], external_deps = [ "absl/log:check", @@ -1787,7 +1804,7 @@ grpc_cc_library( grpc_cc_library( name = "avl", hdrs = [ - "lib/avl/avl.h", + "util/avl.h", ], deps = [ "ref_counted", @@ -1799,9 +1816,9 @@ grpc_cc_library( grpc_cc_library( name = "time_averaged_stats", - srcs = ["lib/gprpp/time_averaged_stats.cc"], + srcs = ["util/time_averaged_stats.cc"], hdrs = [ - "lib/gprpp/time_averaged_stats.h", + "util/time_averaged_stats.h", ], deps = ["//:gpr"], ) @@ -2707,7 +2724,7 @@ grpc_cc_library( "//:gpr", "//:gpr_platform", "//:parse_address", - "//:uri_parser", + "//:uri", ], ) @@ -3041,10 +3058,10 @@ grpc_cc_library( grpc_cc_library( name = "per_cpu", srcs = [ - "lib/gprpp/per_cpu.cc", + "util/per_cpu.cc", ], hdrs = [ - "lib/gprpp/per_cpu.h", + "util/per_cpu.h", ], deps = [ "useful", @@ -3055,10 +3072,10 @@ grpc_cc_library( grpc_cc_library( name = "event_log", srcs = [ - "lib/debug/event_log.cc", + "util/event_log.cc", ], hdrs = [ - "lib/debug/event_log.h", + "util/event_log.h", ], external_deps = [ "absl/base:core_headers", @@ -3075,10 +3092,10 @@ grpc_cc_library( grpc_cc_library( name = "load_file", srcs = [ - "lib/gprpp/load_file.cc", + "util/load_file.cc", ], hdrs = [ - "lib/gprpp/load_file.h", + "util/load_file.h", ], external_deps = [ "absl/cleanup", @@ -3160,7 +3177,7 @@ grpc_cc_library( grpc_cc_library( name = "single_set_ptr", hdrs = [ - "lib/gprpp/single_set_ptr.h", + "util/single_set_ptr.h", ], external_deps = [ "absl/log:check", @@ -3218,7 +3235,7 @@ grpc_cc_library( grpc_cc_library( name = "notification", hdrs = [ - "lib/gprpp/notification.h", + "util/notification.h", ], external_deps = ["absl/time"], deps = ["//:gpr"], @@ -3606,7 +3623,10 @@ grpc_cc_library( grpc_cc_library( name = "subchannel_interface", hdrs = ["load_balancing/subchannel_interface.h"], - external_deps = ["absl/status"], + external_deps = [ + "absl/status", + "absl/strings", + ], deps = [ "dual_ref_counted", "iomgr_fwd", @@ -3719,7 +3739,7 @@ grpc_cc_library( "//:iomgr", "//:parse_address", "//:sockaddr_utils", - "//:uri_parser", + "//:uri", ], ) @@ -3783,7 +3803,7 @@ grpc_cc_library( grpc_cc_library( name = "sorted_pack", hdrs = [ - "lib/gprpp/sorted_pack.h", + "util/sorted_pack.h", ], language = "c++", deps = [ @@ -3795,7 +3815,7 @@ grpc_cc_library( grpc_cc_library( name = "type_list", hdrs = [ - "lib/gprpp/type_list.h", + "util/type_list.h", ], language = "c++", ) @@ -3803,7 +3823,7 @@ grpc_cc_library( grpc_cc_library( name = "if_list", hdrs = [ - "lib/gprpp/if_list.h", + "util/if_list.h", ], language = "c++", deps = ["//:gpr_platform"], @@ -3913,7 +3933,7 @@ grpc_cc_library( "//:parse_address", "//:promise", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -4099,6 +4119,7 @@ grpc_cc_library( "//:ref_counted_ptr", "//:sockaddr_utils", "//:tsi_base", + "//:uri", "//:uri_parser", "//src/core:experiments", ], @@ -4203,17 +4224,17 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) grpc_cc_library( name = "strerror", srcs = [ - "lib/gprpp/strerror.cc", + "util/strerror.cc", ], hdrs = [ - "lib/gprpp/strerror.h", + "util/strerror.h", ], external_deps = ["absl/strings:str_format"], deps = ["//:gpr_platform"], @@ -4397,7 +4418,7 @@ grpc_cc_library( "//:orphanable", "//:promise", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -4452,7 +4473,7 @@ grpc_cc_library( "//:orphanable", "//:promise", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -4509,7 +4530,7 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -4565,10 +4586,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_matchers", srcs = [ - "lib/matchers/matchers.cc", + "util/matchers.cc", ], hdrs = [ - "lib/matchers/matchers.h", + "util/matchers.h", ], external_deps = [ "absl/status", @@ -5132,10 +5153,10 @@ grpc_cc_library( grpc_cc_library( name = "random_early_detection", srcs = [ - "lib/backoff/random_early_detection.cc", + "util/random_early_detection.cc", ], hdrs = [ - "lib/backoff/random_early_detection.h", + "util/random_early_detection.h", ], external_deps = [ "absl/random:bit_gen_ref", @@ -5677,6 +5698,7 @@ grpc_cc_library( external_deps = [ "absl/base:core_headers", "absl/cleanup", + "absl/container:flat_hash_map", "absl/functional:bind_front", "absl/log:check", "absl/log:log", @@ -5843,7 +5865,7 @@ grpc_cc_library( "//:ref_counted_ptr", "//:sockaddr_utils", "//:tsi_ssl_credentials", - "//:uri_parser", + "//:uri", "//:work_serializer", "//:xds_client", ], @@ -5929,7 +5951,7 @@ grpc_cc_library( "//:ref_counted_ptr", "//:server", "//:sockaddr_utils", - "//:uri_parser", + "//:uri", "//:xds_client", ], ) @@ -6327,7 +6349,7 @@ grpc_cc_library( grpc_cc_library( name = "down_cast", - hdrs = ["lib/gprpp/down_cast.h"], + hdrs = ["util/down_cast.h"], external_deps = [ "absl/base:config", "absl/log:check", @@ -6337,8 +6359,8 @@ grpc_cc_library( grpc_cc_library( name = "glob", - srcs = ["lib/gprpp/glob.cc"], - hdrs = ["lib/gprpp/glob.h"], + srcs = ["util/glob.cc"], + hdrs = ["util/glob.h"], external_deps = ["absl/strings"], ) @@ -6400,7 +6422,7 @@ grpc_cc_library( grpc_cc_library( name = "xxhash_inline", - hdrs = ["lib/gprpp/xxhash_inline.h"], + hdrs = ["util/xxhash_inline.h"], external_deps = ["xxhash"], language = "c++", deps = ["//:gpr_platform"], @@ -6837,7 +6859,7 @@ grpc_cc_library( "//:grpc_security_base", "//:parse_address", "//:promise", - "//:uri_parser", + "//:uri", ], alwayslink = 1, ) @@ -6913,7 +6935,7 @@ grpc_cc_library( "//:grpc_trace", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", "//:work_serializer", ], ) @@ -6986,7 +7008,7 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -7049,7 +7071,7 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -7074,7 +7096,7 @@ grpc_cc_library( "//:grpc_resolver", "//:orphanable", "//:parse_address", - "//:uri_parser", + "//:uri", ], ) @@ -7101,7 +7123,7 @@ grpc_cc_library( "//:gpr", "//:grpc_resolver", "//:orphanable", - "//:uri_parser", + "//:uri", ], ) @@ -7236,7 +7258,7 @@ grpc_cc_library( "//:grpc_trace", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", "//:work_serializer", "//:xds_client", ], @@ -7273,7 +7295,7 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", "//:work_serializer", "//:xds_client", ], @@ -7596,7 +7618,7 @@ grpc_cc_library( "//:ref_counted_ptr", "//:server", "//:sockaddr_utils", - "//:uri_parser", + "//:uri", ], ) @@ -7761,7 +7783,7 @@ grpc_cc_library( "//:iomgr", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", ], ) @@ -7827,7 +7849,7 @@ grpc_cc_library( "//:grpc_client_channel", "//:grpc_public_hdrs", "//:grpc_resolver", - "//:uri_parser", + "//:uri", ], ) diff --git a/src/core/call/request_buffer.cc b/src/core/call/request_buffer.cc new file mode 100644 index 0000000000000..257743cbb9018 --- /dev/null +++ b/src/core/call/request_buffer.cc @@ -0,0 +1,168 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "src/core/call/request_buffer.h" + +#include + +#include "absl/types/optional.h" + +namespace grpc_core { + +ValueOrFailure RequestBuffer::PushClientInitialMetadata( + ClientMetadataHandle md) { + MutexLock lock(&mu_); + if (absl::get_if(&state_)) return Failure{}; + auto& buffering = absl::get(state_); + CHECK_EQ(buffering.initial_metadata.get(), nullptr); + buffering.initial_metadata = std::move(md); + buffering.buffered += buffering.initial_metadata->TransportSize(); + WakeupAsyncAllPullers(); + return buffering.buffered; +} + +Poll> RequestBuffer::PollPushMessage( + MessageHandle& message) { + MutexLock lock(&mu_); + if (absl::get_if(&state_)) return Failure{}; + size_t buffered = 0; + if (auto* buffering = absl::get_if(&state_)) { + if (winner_ != nullptr) return PendingPush(); + buffering->buffered += message->payload()->Length(); + buffered = buffering->buffered; + buffering->messages.push_back(std::move(message)); + } else { + auto& streaming = absl::get(state_); + CHECK_EQ(streaming.end_of_stream, false); + if (streaming.message != nullptr) { + return PendingPush(); + } + streaming.message = std::move(message); + } + WakeupAsyncAllPullers(); + return buffered; +} + +StatusFlag RequestBuffer::FinishSends() { + MutexLock lock(&mu_); + if (absl::get_if(&state_)) return Failure{}; + if (auto* buffering = absl::get_if(&state_)) { + Buffered buffered(std::move(buffering->initial_metadata), + std::move(buffering->messages)); + state_.emplace(std::move(buffered)); + } else { + auto& streaming = absl::get(state_); + CHECK_EQ(streaming.end_of_stream, false); + streaming.end_of_stream = true; + } + WakeupAsyncAllPullers(); + return Success{}; +} + +void RequestBuffer::Cancel(absl::Status error) { + MutexLock lock(&mu_); + if (absl::holds_alternative(state_)) return; + state_.emplace(std::move(error)); + WakeupAsyncAllPullers(); +} + +void RequestBuffer::Commit(Reader* winner) { + MutexLock lock(&mu_); + CHECK_EQ(winner_, nullptr); + winner_ = winner; + if (auto* buffering = absl::get_if(&state_)) { + if (buffering->initial_metadata != nullptr && + winner->message_index_ == buffering->messages.size() && + winner->pulled_client_initial_metadata_) { + state_.emplace(); + } + } else if (auto* buffered = absl::get_if(&state_)) { + CHECK_NE(buffered->initial_metadata.get(), nullptr); + if (winner->message_index_ == buffered->messages.size()) { + state_.emplace().end_of_stream = true; + } + } + WakeupAsyncAllPullersExcept(winner); +} + +void RequestBuffer::WakeupAsyncAllPullersExcept(Reader* except_reader) { + for (auto wakeup_reader : readers_) { + if (wakeup_reader == except_reader) continue; + wakeup_reader->pull_waker_.WakeupAsync(); + } +} + +Poll> +RequestBuffer::Reader::PollPullClientInitialMetadata() { + MutexLock lock(&buffer_->mu_); + if (buffer_->winner_ != nullptr && buffer_->winner_ != this) { + error_ = absl::CancelledError("Another call was chosen"); + return Failure{}; + } + if (auto* buffering = absl::get_if(&buffer_->state_)) { + if (buffering->initial_metadata.get() == nullptr) { + return buffer_->PendingPull(this); + } + pulled_client_initial_metadata_ = true; + auto result = ClaimObject(buffering->initial_metadata); + buffer_->MaybeSwitchToStreaming(); + return result; + } + if (auto* buffered = absl::get_if(&buffer_->state_)) { + pulled_client_initial_metadata_ = true; + return ClaimObject(buffered->initial_metadata); + } + error_ = absl::get(buffer_->state_).error; + return Failure{}; +} + +Poll>> +RequestBuffer::Reader::PollPullMessage() { + ReleasableMutexLock lock(&buffer_->mu_); + if (buffer_->winner_ != nullptr && buffer_->winner_ != this) { + error_ = absl::CancelledError("Another call was chosen"); + return Failure{}; + } + if (auto* buffering = absl::get_if(&buffer_->state_)) { + if (message_index_ == buffering->messages.size()) { + return buffer_->PendingPull(this); + } + const auto idx = message_index_; + auto result = ClaimObject(buffering->messages[idx]); + ++message_index_; + buffer_->MaybeSwitchToStreaming(); + return result; + } + if (auto* buffered = absl::get_if(&buffer_->state_)) { + if (message_index_ == buffered->messages.size()) return absl::nullopt; + const auto idx = message_index_; + ++message_index_; + return ClaimObject(buffered->messages[idx]); + } + if (auto* streaming = absl::get_if(&buffer_->state_)) { + if (streaming->message == nullptr) { + if (streaming->end_of_stream) return absl::nullopt; + return buffer_->PendingPull(this); + } + auto msg = std::move(streaming->message); + auto waker = std::move(buffer_->push_waker_); + lock.Release(); + waker.Wakeup(); + return msg; + } + error_ = absl::get(buffer_->state_).error; + return Failure{}; +} + +} // namespace grpc_core diff --git a/src/core/call/request_buffer.h b/src/core/call/request_buffer.h new file mode 100644 index 0000000000000..719a562bdba80 --- /dev/null +++ b/src/core/call/request_buffer.h @@ -0,0 +1,182 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef GRPC_SRC_CORE_CALL_REQUEST_BUFFER_H +#define GRPC_SRC_CORE_CALL_REQUEST_BUFFER_H + +#include + +#include "src/core/lib/transport/call_spine.h" +#include "src/core/lib/transport/message.h" +#include "src/core/lib/transport/metadata.h" + +namespace grpc_core { + +// Outbound request buffer. +// Collects client->server metadata and messages whilst in its initial buffering +// mode. In buffering mode it can have zero or more Reader objects attached to +// it. +// The buffer can later be switched to committed mode, at which point it +// will have exactly one Reader object attached to it. +// Callers can choose to switch to committed mode based upon policy of their +// choice. +class RequestBuffer { + public: + // One reader of the request buffer. + class Reader { + public: + explicit Reader(RequestBuffer* buffer) ABSL_LOCKS_EXCLUDED(buffer->mu_) + : buffer_(buffer) { + buffer->AddReader(this); + } + ~Reader() ABSL_LOCKS_EXCLUDED(buffer_->mu_) { buffer_->RemoveReader(this); } + + Reader(const Reader&) = delete; + Reader& operator=(const Reader&) = delete; + + // Pull client initial metadata. Returns a promise that resolves to + // ValueOrFailure. + GRPC_MUST_USE_RESULT auto PullClientInitialMetadata() { + return [this]() { return PollPullClientInitialMetadata(); }; + } + // Pull a message. Returns a promise that resolves to a + // ValueOrFailure>. + GRPC_MUST_USE_RESULT auto PullMessage() { + return [this]() { return PollPullMessage(); }; + } + + absl::Status TakeError() { return std::move(error_); } + + private: + friend class RequestBuffer; + + Poll> PollPullClientInitialMetadata(); + Poll>> PollPullMessage(); + + template + T ClaimObject(T& object) ABSL_EXCLUSIVE_LOCKS_REQUIRED(buffer_->mu_) { + if (buffer_->winner_ == this) return std::move(object); + return CopyObject(object); + } + + ClientMetadataHandle CopyObject(const ClientMetadataHandle& md) { + return Arena::MakePooled(md->Copy()); + } + + MessageHandle CopyObject(const MessageHandle& msg) { + return Arena::MakePooled(msg->payload()->Copy(), msg->flags()); + } + + RequestBuffer* const buffer_; + bool pulled_client_initial_metadata_ = false; + size_t message_index_ = 0; + absl::Status error_; + Waker pull_waker_; + }; + + // Push ClientInitialMetadata into the buffer. + // This is instantaneous, and returns success with the amount of data + // buffered, or failure. + ValueOrFailure PushClientInitialMetadata(ClientMetadataHandle md); + // Resolves to a ValueOrFailure where the size_t is the amount of data + // buffered (or 0 if we're in committed mode). + GRPC_MUST_USE_RESULT auto PushMessage(MessageHandle message) { + return [this, message = std::move(message)]() mutable { + return PollPushMessage(message); + }; + } + // Push end of stream (client half-closure). + StatusFlag FinishSends(); + // Cancel the request, propagate failure to all readers. + void Cancel(absl::Status error = absl::CancelledError()); + + // Switch to committed mode - needs to be called exactly once with the winning + // reader. All other readers will see failure. + void Commit(Reader* winner); + + private: + // Buffering state: we're collecting metadata and messages. + struct Buffering { + // Initial metadata, or nullptr if not yet received. + ClientMetadataHandle initial_metadata; + // Buffered messages. + absl::InlinedVector messages; + // Amount of data buffered. + size_t buffered = 0; + }; + // Buffered state: all messages have been collected (the client has finished + // sending). + struct Buffered { + Buffered(ClientMetadataHandle md, + absl::InlinedVector msgs) + : initial_metadata(std::move(md)), messages(std::move(msgs)) {} + ClientMetadataHandle initial_metadata; + absl::InlinedVector messages; + }; + // Streaming state: we're streaming messages to the server. + // This implies winner_ is set. + struct Streaming { + MessageHandle message; + bool end_of_stream = false; + }; + // Cancelled state: the request has been cancelled. + struct Cancelled { + explicit Cancelled(absl::Status error) : error(std::move(error)) {} + absl::Status error; + }; + using State = absl::variant; + + Poll> PollPushMessage(MessageHandle& message); + Pending PendingPull(Reader* reader) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + reader->pull_waker_ = Activity::current()->MakeOwningWaker(); + return Pending{}; + } + Pending PendingPush() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + push_waker_ = Activity::current()->MakeOwningWaker(); + return Pending{}; + } + void MaybeSwitchToStreaming() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + auto& buffering = absl::get(state_); + if (winner_ == nullptr) return; + if (winner_->message_index_ < buffering.messages.size()) return; + state_.emplace(); + push_waker_.Wakeup(); + } + + void WakeupAsyncAllPullers() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + WakeupAsyncAllPullersExcept(nullptr); + } + void WakeupAsyncAllPullersExcept(Reader* except_reader) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + void AddReader(Reader* reader) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + readers_.insert(reader); + } + + void RemoveReader(Reader* reader) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { + readers_.erase(reader); + } + + Mutex mu_; + Reader* winner_ ABSL_GUARDED_BY(mu_){nullptr}; + State state_ ABSL_GUARDED_BY(mu_){Buffering{}}; + // TODO(ctiller): change this to an intrusively linked list to avoid + // allocations. + absl::flat_hash_set readers_ ABSL_GUARDED_BY(mu_); + Waker push_waker_ ABSL_GUARDED_BY(mu_); +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_CALL_REQUEST_BUFFER_H diff --git a/src/core/channelz/channel_trace.cc b/src/core/channelz/channel_trace.cc index 6e6884cd70319..ee1de5e87c5f0 100644 --- a/src/core/channelz/channel_trace.cc +++ b/src/core/channelz/channel_trace.cc @@ -28,10 +28,10 @@ #include #include "src/core/channelz/channelz.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" namespace grpc_core { namespace channelz { diff --git a/src/core/channelz/channel_trace.h b/src/core/channelz/channel_trace.h index c6c245c5cf571..82ac733e4c768 100644 --- a/src/core/channelz/channel_trace.h +++ b/src/core/channelz/channel_trace.h @@ -28,9 +28,9 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/util/json/json.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace channelz { diff --git a/src/core/channelz/channelz.cc b/src/core/channelz/channelz.cc index 9487b9161ef67..ef27e51ffbfe4 100644 --- a/src/core/channelz/channelz.cc +++ b/src/core/channelz/channelz.cc @@ -38,9 +38,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/transport/connectivity_state.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/json/json_writer.h" #include "src/core/util/string.h" +#include "src/core/util/uri.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/channelz/channelz.h b/src/core/channelz/channelz.h index e441edc81a62a..6938ec99437ba 100644 --- a/src/core/channelz/channelz.h +++ b/src/core/channelz/channelz.h @@ -38,11 +38,11 @@ #include #include "src/core/channelz/channel_trace.h" -#include "src/core/lib/gprpp/per_cpu.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/util/json/json.h" +#include "src/core/util/per_cpu.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/util/time_precise.h" #include "src/core/util/useful.h" diff --git a/src/core/channelz/channelz_registry.cc b/src/core/channelz/channelz_registry.cc index 63f6e557c7ff7..4393675c83142 100644 --- a/src/core/channelz/channelz_registry.cc +++ b/src/core/channelz/channelz_registry.cc @@ -33,10 +33,10 @@ #include #include "src/core/channelz/channelz.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace channelz { diff --git a/src/core/channelz/channelz_registry.h b/src/core/channelz/channelz_registry.h index 39525597b4f1c..f849ac1ac8483 100644 --- a/src/core/channelz/channelz_registry.h +++ b/src/core/channelz/channelz_registry.h @@ -28,8 +28,8 @@ #include #include "src/core/channelz/channelz.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace channelz { diff --git a/src/core/client_channel/backup_poller.cc b/src/core/client_channel/backup_poller.cc index 61056c47675c9..37914688a7ef5 100644 --- a/src/core/client_channel/backup_poller.cc +++ b/src/core/client_channel/backup_poller.cc @@ -29,14 +29,14 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/memory.h" +#include "src/core/util/time.h" #define DEFAULT_POLL_INTERVAL_MS 5000 diff --git a/src/core/client_channel/client_channel.cc b/src/core/client_channel/client_channel.cc index f700b39463e55..bf87078b4741e 100644 --- a/src/core/client_channel/client_channel.cc +++ b/src/core/client_channel/client_channel.cc @@ -57,15 +57,12 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h" +#include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" @@ -93,8 +90,12 @@ #include "src/core/resolver/resolver_registry.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -167,6 +168,7 @@ class ClientChannel::SubchannelWrapper void CancelDataWatcher(DataWatcherInterface* watcher) override ABSL_EXCLUSIVE_LOCKS_REQUIRED(*client_channel_->work_serializer_); void ThrottleKeepaliveTime(int new_keepalive_time); + std::string address() const override { return subchannel_->address(); } private: class WatcherWrapper; diff --git a/src/core/client_channel/client_channel.h b/src/core/client_channel/client_channel.h index 7a73a2259d0aa..f268f6bfcb7a8 100644 --- a/src/core/client_channel/client_channel.h +++ b/src/core/client_channel/client_channel.h @@ -27,13 +27,13 @@ #include "src/core/client_channel/config_selector.h" #include "src/core/client_channel/subchannel.h" #include "src/core/ext/filters/channel_idle/idle_filter_state.h" -#include "src/core/lib/gprpp/single_set_ptr.h" #include "src/core/lib/promise/observable.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/metadata.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/resolver.h" #include "src/core/service_config/service_config.h" +#include "src/core/util/single_set_ptr.h" namespace grpc_core { diff --git a/src/core/client_channel/client_channel_factory.h b/src/core/client_channel/client_channel_factory.h index e72f9923dd18e..fee6cd9f628c3 100644 --- a/src/core/client_channel/client_channel_factory.h +++ b/src/core/client_channel/client_channel_factory.h @@ -23,8 +23,8 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/client_channel/client_channel_filter.cc b/src/core/client_channel/client_channel_filter.cc index f80f20cc88d8b..8bedc58891444 100644 --- a/src/core/client_channel/client_channel_filter.cc +++ b/src/core/client_channel/client_channel_filter.cc @@ -63,19 +63,13 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/handshaker/proxy_mapper_registry.h" +#include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -103,8 +97,15 @@ #include "src/core/resolver/resolver_registry.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" +#include "src/core/util/work_serializer.h" // // Client channel filter @@ -616,6 +617,8 @@ class ClientChannelFilter::SubchannelWrapper final subchannel_->ThrottleKeepaliveTime(new_keepalive_time); } + std::string address() const override { return subchannel_->address(); } + private: // This wrapper provides a bridge between the internal Subchannel API // and the SubchannelInterface API that we expose to LB policies. @@ -1618,7 +1621,7 @@ void ClientChannelFilter::UpdateStateAndPickerLocked( namespace { -// TODO(roth): Remove this in favor of the gprpp Match() function once +// TODO(roth): Remove this in favor of src/core/util/match.h once // we can do that without breaking lock annotations. template T HandlePickResult( @@ -2518,16 +2521,17 @@ ClientChannelFilter::LoadBalancedCall::PickSubchannel(bool was_queued) { // updated before we queue it. // We need to unref pickers in the WorkSerializer. std::vector> pickers; - auto cleanup = absl::MakeCleanup([&]() { - if (IsWorkSerializerDispatchEnabled()) return; - chand_->work_serializer_->Run( - [pickers = std::move(pickers)]() mutable { - for (auto& picker : pickers) { - picker.reset(DEBUG_LOCATION, "PickSubchannel"); - } - }, - DEBUG_LOCATION); - }); + auto cleanup = absl::MakeCleanup( + [work_serializer = chand_->work_serializer_, &pickers]() { + if (IsWorkSerializerDispatchEnabled()) return; + work_serializer->Run( + [pickers = std::move(pickers)]() mutable { + for (auto& picker : pickers) { + picker.reset(DEBUG_LOCATION, "PickSubchannel"); + } + }, + DEBUG_LOCATION); + }); absl::AnyInvocable)> set_picker; if (!IsWorkSerializerDispatchEnabled()) { diff --git a/src/core/client_channel/client_channel_filter.h b/src/core/client_channel/client_channel_filter.h index 7ecf787ca74cc..2741006a38a93 100644 --- a/src/core/client_channel/client_channel_filter.h +++ b/src/core/client_channel/client_channel_filter.h @@ -46,12 +46,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -67,7 +61,13 @@ #include "src/core/resolver/resolver.h" #include "src/core/service_config/service_config.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" +#include "src/core/util/work_serializer.h" // // Client channel filter diff --git a/src/core/client_channel/client_channel_internal.h b/src/core/client_channel/client_channel_internal.h index b9acdd883ec86..1806bf057c9f8 100644 --- a/src/core/client_channel/client_channel_internal.h +++ b/src/core/client_channel/client_channel_internal.h @@ -24,13 +24,13 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/call_destination.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/down_cast.h" +#include "src/core/util/unique_type_name.h" // // This file contains internal interfaces used to allow various plugins diff --git a/src/core/client_channel/client_channel_service_config.h b/src/core/client_channel/client_channel_service_config.h index 60340e2685fd2..e985b8e92e09e 100644 --- a/src/core/client_channel/client_channel_service_config.h +++ b/src/core/client_channel/client_channel_service_config.h @@ -29,14 +29,14 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { namespace internal { diff --git a/src/core/client_channel/config_selector.h b/src/core/client_channel/config_selector.h index 1fb1ddab78ac5..76572369fe4d1 100644 --- a/src/core/client_channel/config_selector.h +++ b/src/core/client_channel/config_selector.h @@ -32,14 +32,14 @@ #include "src/core/client_channel/client_channel_internal.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/interception_chain.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/service_config/service_config.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // Channel arg key for ConfigSelector. diff --git a/src/core/client_channel/connector.h b/src/core/client_channel/connector.h index 5c218dd7d41fd..927b102431875 100644 --- a/src/core/client_channel/connector.h +++ b/src/core/client_channel/connector.h @@ -21,14 +21,14 @@ #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/client_channel/direct_channel.cc b/src/core/client_channel/direct_channel.cc index 7a87774dc2067..6ccde807dccdb 100644 --- a/src/core/client_channel/direct_channel.cc +++ b/src/core/client_channel/direct_channel.cc @@ -16,10 +16,10 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/surface/client_call.h" #include "src/core/lib/transport/interception_chain.h" +#include "src/core/util/orphanable.h" namespace grpc_core { diff --git a/src/core/client_channel/dynamic_filters.cc b/src/core/client_channel/dynamic_filters.cc index f6658343e0a42..45e7d4ffcbca9 100644 --- a/src/core/client_channel/dynamic_filters.cc +++ b/src/core/client_channel/dynamic_filters.cc @@ -31,10 +31,10 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/surface/lame_client.h" #include "src/core/util/alloc.h" +#include "src/core/util/status_helper.h" // Conversion between call and call stack. #define CALL_TO_CALL_STACK(call) \ diff --git a/src/core/client_channel/dynamic_filters.h b/src/core/client_channel/dynamic_filters.h index bbde6e6c80674..142217d72d387 100644 --- a/src/core/client_channel/dynamic_filters.h +++ b/src/core/client_channel/dynamic_filters.h @@ -27,16 +27,16 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" namespace grpc_core { diff --git a/src/core/client_channel/global_subchannel_pool.h b/src/core/client_channel/global_subchannel_pool.h index bad648a595d54..76ef31af3853c 100644 --- a/src/core/client_channel/global_subchannel_pool.h +++ b/src/core/client_channel/global_subchannel_pool.h @@ -26,8 +26,8 @@ #include "absl/base/thread_annotations.h" #include "src/core/client_channel/subchannel_pool_interface.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/client_channel/load_balanced_call_destination.cc b/src/core/client_channel/load_balanced_call_destination.cc index a54a249616ac6..5d7c0b3c66c02 100644 --- a/src/core/client_channel/load_balanced_call_destination.cc +++ b/src/core/client_channel/load_balanced_call_destination.cc @@ -53,7 +53,7 @@ class LbCallState : public ClientChannelLbCallState { } }; -// TODO(roth): Remove this in favor of the gprpp Match() function once +// TODO(roth): Remove this in favor of src/core/util/match.h function once // we can do that without breaking lock annotations. template T HandlePickResult( diff --git a/src/core/client_channel/local_subchannel_pool.h b/src/core/client_channel/local_subchannel_pool.h index 5e4cce51b280d..a6e1933bbe033 100644 --- a/src/core/client_channel/local_subchannel_pool.h +++ b/src/core/client_channel/local_subchannel_pool.h @@ -24,7 +24,7 @@ #include #include "src/core/client_channel/subchannel_pool_interface.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/client_channel/retry_filter.cc b/src/core/client_channel/retry_filter.cc index 754a543d7eb49..73de1a4ebe1bd 100644 --- a/src/core/client_channel/retry_filter.cc +++ b/src/core/client_channel/retry_filter.cc @@ -33,11 +33,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" // // Retry filter diff --git a/src/core/client_channel/retry_filter.h b/src/core/client_channel/retry_filter.h index 8e30d1e7b6692..402fa04769130 100644 --- a/src/core/client_channel/retry_filter.h +++ b/src/core/client_channel/retry_filter.h @@ -37,9 +37,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/client_channel/retry_filter_legacy_call_data.cc b/src/core/client_channel/retry_filter_legacy_call_data.cc index 4bb4bf3f9a3c6..dda37fd4c6234 100644 --- a/src/core/client_channel/retry_filter_legacy_call_data.cc +++ b/src/core/client_channel/retry_filter_legacy_call_data.cc @@ -29,17 +29,9 @@ #include "src/core/client_channel/client_channel_internal.h" #include "src/core/client_channel/retry_service_config.h" #include "src/core/client_channel/retry_throttle.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -51,6 +43,14 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/backoff.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/client_channel/retry_filter_legacy_call_data.h b/src/core/client_channel/retry_filter_legacy_call_data.h index dd308b7236653..a4336072f1ba1 100644 --- a/src/core/client_channel/retry_filter_legacy_call_data.h +++ b/src/core/client_channel/retry_filter_legacy_call_data.h @@ -34,14 +34,8 @@ #include "src/core/client_channel/retry_filter.h" #include "src/core/client_channel/retry_service_config.h" #include "src/core/client_channel/retry_throttle.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -50,6 +44,12 @@ #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/client_channel/retry_service_config.h b/src/core/client_channel/retry_service_config.h index 6e4bbc2975337..237e3b93bcc4e 100644 --- a/src/core/client_channel/retry_service_config.h +++ b/src/core/client_channel/retry_service_config.h @@ -30,12 +30,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { namespace internal { diff --git a/src/core/client_channel/retry_throttle.h b/src/core/client_channel/retry_throttle.h index ec1899b096797..3cb3260427771 100644 --- a/src/core/client_channel/retry_throttle.h +++ b/src/core/client_channel/retry_throttle.h @@ -30,9 +30,9 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace internal { diff --git a/src/core/client_channel/subchannel.cc b/src/core/client_channel/subchannel.cc index 298c7d785165a..26f76b77709d0 100644 --- a/src/core/client_channel/subchannel.cc +++ b/src/core/client_channel/subchannel.cc @@ -44,19 +44,12 @@ #include "src/core/client_channel/subchannel_pool_interface.h" #include "src/core/handshaker/proxy_mapper_registry.h" #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/cancel_callback.h" @@ -72,6 +65,13 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/alloc.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" // Backoff parameters. diff --git a/src/core/client_channel/subchannel.h b/src/core/client_channel/subchannel.h index 6ae44a5675e47..06a414363b1b9 100644 --- a/src/core/client_channel/subchannel.h +++ b/src/core/client_channel/subchannel.h @@ -33,18 +33,9 @@ #include "src/core/client_channel/connector.h" #include "src/core/client_channel/subchannel_pool_interface.h" -#include "src/core/lib/backoff/backoff.h" +#include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -57,7 +48,17 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -215,7 +216,10 @@ class Subchannel final : public DualRefCounted { channelz::SubchannelNode* channelz_node(); - const grpc_resolved_address& address() const { return key_.address(); } + std::string address() const { + return grpc_sockaddr_to_uri(&key_.address()) + .value_or(""); + } // Starts watching the subchannel's connectivity state. // The first callback to the watcher will be delivered ~immediately. diff --git a/src/core/client_channel/subchannel_interface_internal.h b/src/core/client_channel/subchannel_interface_internal.h index fc5b9faaed5ce..9d93984b598c8 100644 --- a/src/core/client_channel/subchannel_interface_internal.h +++ b/src/core/client_channel/subchannel_interface_internal.h @@ -20,8 +20,8 @@ #include #include "src/core/client_channel/subchannel.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/client_channel/subchannel_pool_interface.h b/src/core/client_channel/subchannel_pool_interface.h index 6a073ed9cb577..d7cab8f1e9979 100644 --- a/src/core/client_channel/subchannel_pool_interface.h +++ b/src/core/client_channel/subchannel_pool_interface.h @@ -27,9 +27,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/client_channel/subchannel_stream_client.cc b/src/core/client_channel/subchannel_stream_client.cc index afdafe398e9d3..a01165e3d1185 100644 --- a/src/core/client_channel/subchannel_stream_client.cc +++ b/src/core/client_channel/subchannel_stream_client.cc @@ -29,13 +29,13 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" #define SUBCHANNEL_STREAM_INITIAL_CONNECT_BACKOFF_SECONDS 1 diff --git a/src/core/client_channel/subchannel_stream_client.h b/src/core/client_channel/subchannel_stream_client.h index 3945c1c9eba39..f50314e0acef4 100644 --- a/src/core/client_channel/subchannel_stream_client.h +++ b/src/core/client_channel/subchannel_stream_client.h @@ -33,10 +33,6 @@ #include #include "src/core/client_channel/subchannel.h" -#include "src/core/lib/backoff/backoff.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -48,6 +44,10 @@ #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/backoff.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc index b560b92f59c22..bc4e834a10d08 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc @@ -35,12 +35,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/per_cpu.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -54,6 +48,12 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/http2_errors.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/per_cpu.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" namespace grpc_core { @@ -207,7 +207,7 @@ void LegacyMaxAgeFilter::PostInit() { // OnDone -- close the connection if the promise completed // successfully. // (if it did not, it was cancelled) - if (status.ok()) CloseChannel(); + if (status.ok()) CloseChannel("max connection age"); }, std::move(arena))); } @@ -273,16 +273,16 @@ void LegacyChannelIdleFilter::StartIdleTimer() { activity_.Set(MakeActivity( std::move(promise), ExecCtxWakeupScheduler{}, [channel_stack, this](absl::Status status) { - if (status.ok()) CloseChannel(); + if (status.ok()) CloseChannel("connection idle"); }, std::move(arena))); } -void LegacyChannelIdleFilter::CloseChannel() { +void LegacyChannelIdleFilter::CloseChannel(absl::string_view reason) { auto* op = grpc_make_transport_op(nullptr); op->disconnect_with_error = grpc_error_set_int( - GRPC_ERROR_CREATE("enter idle"), - StatusIntProperty::ChannelConnectivityState, GRPC_CHANNEL_IDLE); + GRPC_ERROR_CREATE(reason), StatusIntProperty::ChannelConnectivityState, + GRPC_CHANNEL_IDLE); // Pass the transport op down to the channel stack. auto* elem = grpc_channel_stack_element(channel_stack_, 0); elem->filter->start_transport_op(elem, op); diff --git a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h index 9ee7981b2f59e..b4b61f10bb3a8 100644 --- a/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h +++ b/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h @@ -29,14 +29,14 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/single_set_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/single_set_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { @@ -69,7 +69,7 @@ class LegacyChannelIdleFilter : public ChannelFilter { grpc_channel_stack* channel_stack() { return channel_stack_; }; virtual void Shutdown(); - void CloseChannel(); + void CloseChannel(absl::string_view reason); void IncreaseCallCount(); void DecreaseCallCount(); diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.cc b/src/core/ext/filters/fault_injection/fault_injection_filter.cc index 6576c6df96dc6..e0e4d3e031b67 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_filter.cc +++ b/src/core/ext/filters/fault_injection/fault_injection_filter.cc @@ -43,13 +43,13 @@ #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/sleep.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/time.h" namespace grpc_core { @@ -174,6 +174,12 @@ FaultInjectionFilter::MakeInjectionDecision( fi_policy = method_params->fault_injection_policy(index_); } + // Shouldn't ever be null, but just in case, return a no-op decision. + if (fi_policy == nullptr) { + return InjectionDecision(/*max_faults=*/0, /*delay_time=*/Duration::Zero(), + /*abort_request=*/absl::nullopt); + } + grpc_status_code abort_code = fi_policy->abort_code; uint32_t abort_percentage_numerator = fi_policy->abort_percentage_numerator; uint32_t delay_percentage_numerator = fi_policy->delay_percentage_numerator; diff --git a/src/core/ext/filters/fault_injection/fault_injection_filter.h b/src/core/ext/filters/fault_injection/fault_injection_filter.h index 7bcd22270602e..40b839c1033d9 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_filter.h +++ b/src/core/ext/filters/fault_injection/fault_injection_filter.h @@ -30,9 +30,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h index bef8185fe2729..0016c552c8e46 100644 --- a/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h +++ b/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h @@ -33,12 +33,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" // Channel arg key for enabling parsing fault injection via method config. #define GRPC_ARG_PARSE_FAULT_INJECTION_METHOD_CONFIG \ diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h index 927e2de05effa..18109c70c1b0f 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h @@ -28,12 +28,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/transport.h" #include "src/core/resolver/xds/xds_config.h" #include "src/core/util/lru_cache.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h index 97df008e968d5..2c64a69448586 100644 --- a/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h +++ b/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h @@ -28,11 +28,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/validation_errors.h" // Channel arg key for enabling parsing fault injection via method config. #define GRPC_ARG_PARSE_GCP_AUTHENTICATION_METHOD_CONFIG \ diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 2023fb436d6fb..928a50867e395 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -61,7 +61,7 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" #include "src/cpp/server/load_reporter/constants.h" // IWYU pragma: no_include "opencensus/stats/recording.h" diff --git a/src/core/ext/filters/logging/logging_filter.cc b/src/core/ext/filters/logging/logging_filter.cc index 67d1b274691af..1963f8236652e 100644 --- a/src/core/ext/filters/logging/logging_filter.cc +++ b/src/core/ext/filters/logging/logging_filter.cc @@ -53,8 +53,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/context.h" @@ -66,9 +64,11 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver_registry.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/host_port.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/ext/filters/logging/logging_sink.h b/src/core/ext/filters/logging/logging_sink.h index b013cd9072eda..71720799e4d71 100644 --- a/src/core/ext/filters/logging/logging_sink.h +++ b/src/core/ext/filters/logging/logging_sink.h @@ -30,7 +30,7 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index 3ed3b2b735b73..2bc36cfde3139 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -32,13 +32,13 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/transport/transport.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.cc b/src/core/ext/filters/rbac/rbac_service_config_parser.cc index 000440f527403..56195fe46257a 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.cc +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.cc @@ -31,10 +31,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/matchers.h" namespace grpc_core { diff --git a/src/core/ext/filters/rbac/rbac_service_config_parser.h b/src/core/ext/filters/rbac/rbac_service_config_parser.h index 728a92e1bf08a..f9a4c29c34ed9 100644 --- a/src/core/ext/filters/rbac/rbac_service_config_parser.h +++ b/src/core/ext/filters/rbac/rbac_service_config_parser.h @@ -30,11 +30,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" #include "src/core/lib/security/authorization/rbac_policy.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.cc b/src/core/ext/filters/stateful_session/stateful_session_filter.cc index cf83e5db1ff03..953a32a511b94 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_filter.cc +++ b/src/core/ext/filters/stateful_session/stateful_session_filter.cc @@ -41,8 +41,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/pipe.h" @@ -52,6 +50,8 @@ #include "src/core/lib/transport/transport.h" #include "src/core/resolver/xds/xds_resolver_attributes.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/filters/stateful_session/stateful_session_filter.h b/src/core/ext/filters/stateful_session/stateful_session_filter.h index 3bffbaa854753..b7bde679c1763 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_filter.h +++ b/src/core/ext/filters/stateful_session/stateful_session_filter.h @@ -30,11 +30,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/transport/transport.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h index ccb6245b28fda..edf6f55a79d18 100644 --- a/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +++ b/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h @@ -30,12 +30,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" // Channel arg key for enabling parsing fault injection via method config. #define GRPC_ARG_PARSE_STATEFUL_SESSION_METHOD_CONFIG \ diff --git a/src/core/ext/transport/binder/client/channel_create.cc b/src/core/ext/transport/binder/client/channel_create.cc index f5dd12c9991ac..6ccf25f5b9bcc 100644 --- a/src/core/ext/transport/binder/client/channel_create.cc +++ b/src/core/ext/transport/binder/client/channel_create.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #ifdef GPR_SUPPORT_BINDER_TRANSPORT diff --git a/src/core/ext/transport/binder/client/connection_id_generator.h b/src/core/ext/transport/binder/client/connection_id_generator.h index d756ec1ced34a..fbe945cfb748c 100644 --- a/src/core/ext/transport/binder/client/connection_id_generator.h +++ b/src/core/ext/transport/binder/client/connection_id_generator.h @@ -21,7 +21,7 @@ #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/client/endpoint_binder_pool.h b/src/core/ext/transport/binder/client/endpoint_binder_pool.h index f3452009b675c..4f9ac233219d8 100644 --- a/src/core/ext/transport/binder/client/endpoint_binder_pool.h +++ b/src/core/ext/transport/binder/client/endpoint_binder_pool.h @@ -23,7 +23,7 @@ #include #include "src/core/ext/transport/binder/wire_format/binder.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/client/jni_utils.cc b/src/core/ext/transport/binder/client/jni_utils.cc index 04190d01a3c32..8fc4f629c3c73 100644 --- a/src/core/ext/transport/binder/client/jni_utils.cc +++ b/src/core/ext/transport/binder/client/jni_utils.cc @@ -21,7 +21,7 @@ #ifndef GRPC_NO_BINDER -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #if defined(ANDROID) || defined(__ANDROID__) diff --git a/src/core/ext/transport/binder/client/security_policy_setting.h b/src/core/ext/transport/binder/client/security_policy_setting.h index 212603744b9ee..46fb000246af9 100644 --- a/src/core/ext/transport/binder/client/security_policy_setting.h +++ b/src/core/ext/transport/binder/client/security_policy_setting.h @@ -21,7 +21,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/security_policy/binder_security_policy.cc b/src/core/ext/transport/binder/security_policy/binder_security_policy.cc index 07304767336f6..4fe4ee4d1591d 100644 --- a/src/core/ext/transport/binder/security_policy/binder_security_policy.cc +++ b/src/core/ext/transport/binder/security_policy/binder_security_policy.cc @@ -27,7 +27,7 @@ #include "absl/log/log.h" #include "src/core/ext/transport/binder/client/jni_utils.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #endif diff --git a/src/core/ext/transport/binder/transport/binder_transport.cc b/src/core/ext/transport/binder/transport/binder_transport.cc index 5014ff85cccea..06ed2da8798ee 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.cc +++ b/src/core/ext/transport/binder/transport/binder_transport.cc @@ -36,12 +36,12 @@ #include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/crash.h" #ifndef NDEBUG static void grpc_binder_stream_ref(grpc_binder_stream* s, const char* reason) { diff --git a/src/core/ext/transport/binder/transport/binder_transport.h b/src/core/ext/transport/binder/transport/binder_transport.h index 1d7b43a7d11db..108926f25dfa9 100644 --- a/src/core/ext/transport/binder/transport/binder_transport.h +++ b/src/core/ext/transport/binder/transport/binder_transport.h @@ -32,9 +32,9 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/crash.h" struct grpc_binder_stream; diff --git a/src/core/ext/transport/binder/utils/ndk_binder.cc b/src/core/ext/transport/binder/utils/ndk_binder.cc index 79227a44c67af..95b5278980395 100644 --- a/src/core/ext/transport/binder/utils/ndk_binder.cc +++ b/src/core/ext/transport/binder/utils/ndk_binder.cc @@ -25,8 +25,8 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" namespace { void* GetNdkBinderHandle() { diff --git a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc index 9546109aa61b3..5a3cc10cb27c7 100644 --- a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc +++ b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc @@ -25,7 +25,7 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h index 6fe22df4692ac..a671a5e8233c6 100644 --- a/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h +++ b/src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h @@ -25,7 +25,7 @@ #include #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/binder.h b/src/core/ext/transport/binder/wire_format/binder.h index ce79c1332e859..7936fbb65ceac 100644 --- a/src/core/ext/transport/binder/wire_format/binder.h +++ b/src/core/ext/transport/binder/wire_format/binder.h @@ -26,7 +26,7 @@ #include #include "src/core/ext/transport/binder/wire_format/binder_constants.h" -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/orphanable.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/binder_android.cc b/src/core/ext/transport/binder/wire_format/binder_android.cc index 5e33262cd6685..e2a55df6b01e9 100644 --- a/src/core/ext/transport/binder/wire_format/binder_android.cc +++ b/src/core/ext/transport/binder/wire_format/binder_android.cc @@ -26,8 +26,8 @@ #include "absl/strings/str_cat.h" #include "src/core/ext/transport/binder/wire_format/binder_android.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" namespace grpc_binder { namespace { diff --git a/src/core/ext/transport/binder/wire_format/transaction.h b/src/core/ext/transport/binder/wire_format/transaction.h index 971b3bdb9ac4e..eda30d093a532 100644 --- a/src/core/ext/transport/binder/wire_format/transaction.h +++ b/src/core/ext/transport/binder/wire_format/transaction.h @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/wire_reader.h b/src/core/ext/transport/binder/wire_format/wire_reader.h index 2a4092d29d9b4..570f99ac68373 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader.h +++ b/src/core/ext/transport/binder/wire_format/wire_reader.h @@ -22,7 +22,7 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/orphanable.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc b/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc index bb01c89231963..d877b9cd9c176 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc +++ b/src/core/ext/transport/binder/wire_format/wire_reader_impl.cc @@ -33,8 +33,8 @@ #include "src/core/ext/transport/binder/utils/transport_stream_receiver.h" #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/status_helper.h" +#include "src/core/util/crash.h" +#include "src/core/util/status_helper.h" namespace grpc_binder { namespace { diff --git a/src/core/ext/transport/binder/wire_format/wire_reader_impl.h b/src/core/ext/transport/binder/wire_format/wire_reader_impl.h index 48e80f718f6ba..a08cb6f4985c3 100644 --- a/src/core/ext/transport/binder/wire_format/wire_reader_impl.h +++ b/src/core/ext/transport/binder/wire_format/wire_reader_impl.h @@ -29,7 +29,7 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" #include "src/core/ext/transport/binder/wire_format/wire_writer.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" namespace grpc_binder { diff --git a/src/core/ext/transport/binder/wire_format/wire_writer.cc b/src/core/ext/transport/binder/wire_format/wire_writer.cc index 1b954e1d26a9f..1cefd1bd5f215 100644 --- a/src/core/ext/transport/binder/wire_format/wire_writer.cc +++ b/src/core/ext/transport/binder/wire_format/wire_writer.cc @@ -26,7 +26,7 @@ #include "absl/types/variant.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #define RETURN_IF_ERROR(expr) \ do { \ diff --git a/src/core/ext/transport/binder/wire_format/wire_writer.h b/src/core/ext/transport/binder/wire_format/wire_writer.h index bb52c7385cc10..81041c68c0237 100644 --- a/src/core/ext/transport/binder/wire_format/wire_writer.h +++ b/src/core/ext/transport/binder/wire_format/wire_writer.h @@ -25,8 +25,8 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/transaction.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/combiner.h" +#include "src/core/util/sync.h" namespace grpc_binder { diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc index d5723e82d4a10..d8743703a04f0 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc @@ -41,10 +41,6 @@ #include "src/core/lib/event_engine/extensions/chaotic_good_extension.h" #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" @@ -65,6 +61,10 @@ #include "src/core/lib/surface/channel_create.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/promise_endpoint.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { namespace chaotic_good { @@ -134,9 +134,12 @@ auto ChaoticGoodConnector::WaitForDataEndpointSetup( endpoint) mutable { ExecCtx exec_ctx; if (!endpoint.ok() || self->handshake_mgr_ == nullptr) { - ExecCtx::Run(DEBUG_LOCATION, - std::exchange(self->notify_, nullptr), - GRPC_ERROR_CREATE("connect endpoint failed")); + MutexLock lock(&self->mu_); + if (self->notify_ != nullptr) { + ExecCtx::Run(DEBUG_LOCATION, + std::exchange(self->notify_, nullptr), + GRPC_ERROR_CREATE("connect endpoint failed")); + } return; } auto* chaotic_good_ext = @@ -240,9 +243,9 @@ void ChaoticGoodConnector::Connect(const Args& args, Result* result, GRPC_ERROR_CREATE("connector shutdown")); return; } + notify_ = notify; } args_ = args; - notify_ = notify; resolved_addr_ = EventEngine::ResolvedAddress( reinterpret_cast(args_.address->addr), args_.address->len); @@ -253,11 +256,14 @@ void ChaoticGoodConnector::Connect(const Args& args, Result* result, endpoint) mutable { ExecCtx exec_ctx; if (!endpoint.ok() || self->handshake_mgr_ == nullptr) { - auto endpoint_status = endpoint.status(); - auto error = GRPC_ERROR_CREATE_REFERENCING("connect endpoint failed", - &endpoint_status, 1); - ExecCtx::Run(DEBUG_LOCATION, std::exchange(self->notify_, nullptr), - error); + MutexLock lock(&self->mu_); + if (self->notify_ != nullptr) { + auto endpoint_status = endpoint.status(); + auto error = GRPC_ERROR_CREATE_REFERENCING( + "connect endpoint failed", &endpoint_status, 1); + ExecCtx::Run(DEBUG_LOCATION, std::exchange(self->notify_, nullptr), + error); + } return; } auto* chaotic_good_ext = @@ -320,8 +326,8 @@ void ChaoticGoodConnector::OnHandshakeDone( [self = RefAsSubclass()](absl::Status status) { GRPC_TRACE_LOG(chaotic_good, INFO) << "ChaoticGoodConnector::OnHandshakeDone: " << status; + MutexLock lock(&self->mu_); if (status.ok()) { - MutexLock lock(&self->mu_); self->result_->transport = new ChaoticGoodClientTransport( std::move(self->control_endpoint_), std::move(self->data_endpoint_), self->args_.channel_args, diff --git a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h index d981689f72b9c..59ef8fd43763f 100644 --- a/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h +++ b/src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h @@ -31,9 +31,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -45,6 +42,9 @@ #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/transport/promise_endpoint.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace chaotic_good { @@ -83,7 +83,7 @@ class ChaoticGoodConnector : public SubchannelConnector { Mutex mu_; Args args_; Result* result_ ABSL_GUARDED_BY(mu_); - grpc_closure* notify_ = nullptr; + grpc_closure* notify_ ABSL_GUARDED_BY(mu_) = nullptr; bool is_shutdown_ ABSL_GUARDED_BY(mu_) = false; absl::StatusOr resolved_addr_; diff --git a/src/core/ext/transport/chaotic_good/client_transport.cc b/src/core/ext/transport/chaotic_good/client_transport.cc index f4d6a3ab6c2bb..17aff601d45a6 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.cc +++ b/src/core/ext/transport/chaotic_good/client_transport.cc @@ -36,8 +36,6 @@ #include "src/core/ext/transport/chaotic_good/frame.h" #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/all_ok.h" @@ -53,6 +51,8 @@ #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/promise_endpoint.h" +#include "src/core/util/match.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { namespace chaotic_good { @@ -250,18 +250,20 @@ void ChaoticGoodClientTransport::AbortWithError() { } uint32_t ChaoticGoodClientTransport::MakeStream(CallHandler call_handler) { - ReleasableMutexLock lock(&mu_); + MutexLock lock(&mu_); const uint32_t stream_id = next_stream_id_++; + const bool on_done_added = + call_handler.OnDone([self = RefAsSubclass(), + stream_id](bool cancelled) { + if (cancelled) { + self->outgoing_frames_.MakeSender().UnbufferedImmediateSend( + CancelFrame{stream_id}); + } + MutexLock lock(&self->mu_); + self->stream_map_.erase(stream_id); + }); + if (!on_done_added) return 0; stream_map_.emplace(stream_id, call_handler); - lock.Release(); - call_handler.OnDone([this, stream_id](bool cancelled) { - if (cancelled) { - outgoing_frames_.MakeSender().UnbufferedImmediateSend( - CancelFrame{stream_id}); - } - MutexLock lock(&mu_); - stream_map_.erase(stream_id); - }); return stream_id; } @@ -321,23 +323,30 @@ void ChaoticGoodClientTransport::StartCall(CallHandler call_handler) { "outbound_loop", [self = RefAsSubclass(), call_handler]() mutable { const uint32_t stream_id = self->MakeStream(call_handler); - return Map( - self->CallOutboundLoop(stream_id, call_handler), - [stream_id, sender = self->outgoing_frames_.MakeSender()]( - absl::Status result) mutable { - GRPC_TRACE_LOG(chaotic_good, INFO) - << "CHAOTIC_GOOD: Call " << stream_id << " finished with " - << result.ToString(); - if (!result.ok()) { - GRPC_TRACE_LOG(chaotic_good, INFO) - << "CHAOTIC_GOOD: Send cancel"; - if (!sender.UnbufferedImmediateSend(CancelFrame{stream_id})) { - GRPC_TRACE_LOG(chaotic_good, INFO) - << "CHAOTIC_GOOD: Send cancel failed"; - } - } - return result; - }); + return If( + stream_id != 0, + [stream_id, call_handler = std::move(call_handler), + self = std::move(self)]() { + return Map( + self->CallOutboundLoop(stream_id, call_handler), + [stream_id, sender = self->outgoing_frames_.MakeSender()]( + absl::Status result) mutable { + GRPC_TRACE_LOG(chaotic_good, INFO) + << "CHAOTIC_GOOD: Call " << stream_id + << " finished with " << result.ToString(); + if (!result.ok()) { + GRPC_TRACE_LOG(chaotic_good, INFO) + << "CHAOTIC_GOOD: Send cancel"; + if (!sender.UnbufferedImmediateSend( + CancelFrame{stream_id})) { + GRPC_TRACE_LOG(chaotic_good, INFO) + << "CHAOTIC_GOOD: Send cancel failed"; + } + } + return result; + }); + }, + []() { return absl::OkStatus(); }); }); } diff --git a/src/core/ext/transport/chaotic_good/client_transport.h b/src/core/ext/transport/chaotic_good/client_transport.h index 47dacc23bc7c9..8f2941947d367 100644 --- a/src/core/ext/transport/chaotic_good/client_transport.h +++ b/src/core/ext/transport/chaotic_good/client_transport.h @@ -43,7 +43,6 @@ #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/for_each.h" @@ -61,6 +60,7 @@ #include "src/core/lib/transport/metadata_batch.h" // IWYU pragma: keep #include "src/core/lib/transport/promise_endpoint.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chaotic_good/frame.cc b/src/core/ext/transport/chaotic_good/frame.cc index 243d8ef4ca28d..dccdf7f0dc566 100644 --- a/src/core/ext/transport/chaotic_good/frame.cc +++ b/src/core/ext/transport/chaotic_good/frame.cc @@ -28,13 +28,13 @@ #include #include "src/core/ext/transport/chaotic_good/frame_header.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" +#include "src/core/util/bitset.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/status_helper.h" namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chaotic_good/frame.h b/src/core/ext/transport/chaotic_good/frame.h index 548280858bfdf..a328c3c80ce80 100644 --- a/src/core/ext/transport/chaotic_good/frame.h +++ b/src/core/ext/transport/chaotic_good/frame.h @@ -28,11 +28,11 @@ #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/match.h" namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chaotic_good/frame_header.h b/src/core/ext/transport/chaotic_good/frame_header.h index 760c9c0d07d1c..91a83eed4a883 100644 --- a/src/core/ext/transport/chaotic_good/frame_header.h +++ b/src/core/ext/transport/chaotic_good/frame_header.h @@ -23,7 +23,7 @@ #include -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" namespace grpc_core { namespace chaotic_good { 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 2a7076029201b..f5c8dc2d68520 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 @@ -44,11 +44,6 @@ #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/event_engine/resolved_address_internal.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/promise/activity.h" @@ -68,6 +63,11 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/promise_endpoint.h" #include "src/core/server/server.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { namespace chaotic_good { @@ -187,11 +187,7 @@ void ChaoticGoodServerListener::ActiveConnection::NewConnectionID() { connection_id_, std::make_shared>()); } -void ChaoticGoodServerListener::ActiveConnection::Done( - absl::optional error) { - if (error.has_value()) { - LOG(ERROR) << "ActiveConnection::Done:" << this << " " << *error; - } +void ChaoticGoodServerListener::ActiveConnection::Done() { // Can easily be holding various locks here: bounce through EE to ensure no // deadlocks. listener_->event_engine_->Run([self = Ref()]() { @@ -387,13 +383,15 @@ auto ChaoticGoodServerListener::ActiveConnection::HandshakingState:: void ChaoticGoodServerListener::ActiveConnection::HandshakingState:: OnHandshakeDone(absl::StatusOr result) { if (!result.ok()) { - connection_->Done( - absl::StrCat("Handshake failed: ", result.status().ToString())); + LOG_EVERY_N_SEC(ERROR, 5) << "Handshake failed: ", result.status(); + connection_->Done(); return; } CHECK_NE(*result, nullptr); if ((*result)->endpoint == nullptr) { - connection_->Done("Server handshake done but has empty endpoint."); + LOG_EVERY_N_SEC(ERROR, 5) + << "Server handshake done but has empty endpoint."; + connection_->Done(); return; } CHECK(grpc_event_engine::experimental::grpc_is_event_engine_endpoint( @@ -429,12 +427,10 @@ void ChaoticGoodServerListener::ActiveConnection::HandshakingState:: EventEngineWakeupScheduler(connection_->listener_->event_engine_), [self = Ref()](absl::Status status) { if (!status.ok()) { - self->connection_->Done( - absl::StrCat("Server setting frame handling failed: ", - StatusToString(status))); - } else { - self->connection_->Done(); + GRPC_TRACE_LOG(chaotic_good, ERROR) + << "Server setting frame handling failed: " << status; } + self->connection_->Done(); }, connection_->arena_.get()); MutexLock lock(&connection_->mu_); 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 0b20dcbb36396..167da14458d3e 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 @@ -34,8 +34,6 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" @@ -46,6 +44,8 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/promise_endpoint.h" #include "src/core/server/server.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { namespace chaotic_good { @@ -111,7 +111,7 @@ class ChaoticGoodServerListener final : public Server::ListenerInterface { }; private: - void Done(absl::optional error = absl::nullopt); + void Done(); void NewConnectionID(); RefCountedPtr arena_ = SimpleArenaAllocator()->MakeArena(); const RefCountedPtr listener_; diff --git a/src/core/ext/transport/chaotic_good/server_transport.cc b/src/core/ext/transport/chaotic_good/server_transport.cc index 6ffb6b7f0670d..4110af2fbcc00 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.cc +++ b/src/core/ext/transport/chaotic_good/server_transport.cc @@ -35,7 +35,6 @@ #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/event_engine_wakeup_scheduler.h" @@ -48,6 +47,7 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/promise_endpoint.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { namespace chaotic_good { @@ -237,10 +237,11 @@ auto ChaoticGoodServerTransport::DeserializeAndPushFragmentToNewCall( call_initiator.emplace(std::move(call.initiator)); auto add_result = NewStream(frame_header.stream_id, *call_initiator); if (add_result.ok()) { - call_destination_->StartCall(std::move(call.handler)); call_initiator->SpawnGuarded( "server-write", [this, stream_id = frame_header.stream_id, - call_initiator = *call_initiator]() { + call_initiator = *call_initiator, + call_handler = std::move(call.handler)]() mutable { + call_destination_->StartCall(std::move(call_handler)); return CallOutboundLoop(stream_id, call_initiator); }); } else { @@ -438,8 +439,7 @@ absl::Status ChaoticGoodServerTransport::NewStream( if (stream_id <= last_seen_new_stream_id_) { return absl::InternalError("Stream id is not increasing"); } - stream_map_.emplace(stream_id, call_initiator); - call_initiator.OnDone( + const bool on_done_added = call_initiator.OnDone( [self = RefAsSubclass(), stream_id](bool) { GRPC_TRACE_LOG(chaotic_good, INFO) << "CHAOTIC_GOOD " << self.get() << " OnDone " << stream_id; @@ -453,6 +453,10 @@ absl::Status ChaoticGoodServerTransport::NewStream( }); } }); + if (!on_done_added) { + return absl::CancelledError(); + } + stream_map_.emplace(stream_id, call_initiator); return absl::OkStatus(); } diff --git a/src/core/ext/transport/chaotic_good/server_transport.h b/src/core/ext/transport/chaotic_good/server_transport.h index 246b25f731389..23909768b68ff 100644 --- a/src/core/ext/transport/chaotic_good/server_transport.h +++ b/src/core/ext/transport/chaotic_good/server_transport.h @@ -50,8 +50,6 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/event_engine/default_event_engine.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/if.h" @@ -73,6 +71,8 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/promise_endpoint.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chaotic_good/settings_metadata.cc b/src/core/ext/transport/chaotic_good/settings_metadata.cc index a6e5cc02993cb..3d952be719a6c 100644 --- a/src/core/ext/transport/chaotic_good/settings_metadata.cc +++ b/src/core/ext/transport/chaotic_good/settings_metadata.cc @@ -18,7 +18,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_core { namespace chaotic_good { diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/src/core/ext/transport/chttp2/client/chttp2_connector.cc index 48204fd2c6ccc..2f6e070ae6aa9 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.cc +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.cc @@ -54,11 +54,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/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" @@ -71,6 +66,11 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/transport.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" #ifdef GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/client/chttp2_connector.h b/src/core/ext/transport/chttp2/client/chttp2_connector.h index 0cb08474ca62f..4c7eaa614da7b 100644 --- a/src/core/ext/transport/chttp2/client/chttp2_connector.h +++ b/src/core/ext/transport/chttp2/client/chttp2_connector.h @@ -27,11 +27,11 @@ #include "src/core/client_channel/connector.h" #include "src/core/handshaker/handshaker.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 50f165cd32541..212493f95f7a2 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -61,13 +61,6 @@ #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" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/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" @@ -86,8 +79,15 @@ #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/transport.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/server/server.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/uri.h" #ifdef GPR_SUPPORT_CHANNELS_FROM_FD #include "src/core/lib/iomgr/ev_posix.h" @@ -183,24 +183,27 @@ class Chttp2ServerListener : public Server::ListenerInterface { void Start(OrphanablePtr endpoint, const ChannelArgs& args); + void ShutdownLocked(absl::Status status) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ActiveConnection::mu_); + // Needed to be able to grab an external ref in // ActiveConnection::Start() using InternallyRefCounted::Ref; private: - void OnTimeout() ABSL_LOCKS_EXCLUDED(&connection_->mu_); + void OnTimeout() ABSL_LOCKS_EXCLUDED(&ActiveConnection::mu_); static void OnReceiveSettings(void* arg, grpc_error_handle /* error */); void OnHandshakeDone(absl::StatusOr result); RefCountedPtr const connection_; grpc_pollset* const accepting_pollset_; AcceptorPtr acceptor_; RefCountedPtr handshake_mgr_ - ABSL_GUARDED_BY(&connection_->mu_); + ABSL_GUARDED_BY(&ActiveConnection::mu_); // State for enforcing handshake timeout on receiving HTTP/2 settings. Timestamp const deadline_; absl::optional timer_handle_ - ABSL_GUARDED_BY(&connection_->mu_); - grpc_closure on_receive_settings_ ABSL_GUARDED_BY(&connection_->mu_); + ABSL_GUARDED_BY(&ActiveConnection::mu_); + grpc_closure on_receive_settings_ ABSL_GUARDED_BY(&ActiveConnection::mu_); grpc_pollset_set* const interested_parties_; }; @@ -400,9 +403,7 @@ Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() { void Chttp2ServerListener::ActiveConnection::HandshakingState::Orphan() { { MutexLock lock(&connection_->mu_); - if (handshake_mgr_ != nullptr) { - handshake_mgr_->Shutdown(GRPC_ERROR_CREATE("Listener stopped serving.")); - } + ShutdownLocked(absl::UnavailableError("Listener stopped serving.")); } Unref(); } @@ -422,6 +423,13 @@ void Chttp2ServerListener::ActiveConnection::HandshakingState::Start( }); } +void Chttp2ServerListener::ActiveConnection::HandshakingState::ShutdownLocked( + absl::Status status) { + if (handshake_mgr_ != nullptr) { + handshake_mgr_->Shutdown(std::move(status)); + } +} + void Chttp2ServerListener::ActiveConnection::HandshakingState::OnTimeout() { grpc_chttp2_transport* transport = nullptr; { @@ -584,20 +592,28 @@ void Chttp2ServerListener::ActiveConnection::SendGoAway() { grpc_chttp2_transport* transport = nullptr; { MutexLock lock(&mu_); - if (transport_ != nullptr && !shutdown_) { - transport = transport_.get(); - drain_grace_timer_handle_ = event_engine_->RunAfter( - std::max(Duration::Zero(), - listener_->args_ - .GetDurationFromIntMillis( - GRPC_ARG_SERVER_CONFIG_CHANGE_DRAIN_GRACE_TIME_MS) - .value_or(Duration::Minutes(10))), - [self = Ref(DEBUG_LOCATION, "drain_grace_timer")]() mutable { - ApplicationCallbackExecCtx callback_exec_ctx; - ExecCtx exec_ctx; - self->OnDrainGraceTimeExpiry(); - self.reset(DEBUG_LOCATION, "drain_grace_timer"); - }); + if (!shutdown_) { + // Send a GOAWAY if the transport exists + if (transport_ != nullptr) { + transport = transport_.get(); + drain_grace_timer_handle_ = event_engine_->RunAfter( + std::max(Duration::Zero(), + listener_->args_ + .GetDurationFromIntMillis( + GRPC_ARG_SERVER_CONFIG_CHANGE_DRAIN_GRACE_TIME_MS) + .value_or(Duration::Minutes(10))), + [self = Ref(DEBUG_LOCATION, "drain_grace_timer")]() mutable { + ApplicationCallbackExecCtx callback_exec_ctx; + ExecCtx exec_ctx; + self->OnDrainGraceTimeExpiry(); + self.reset(DEBUG_LOCATION, "drain_grace_timer"); + }); + } + // Shutdown the handshaker if it's still in progress. + if (handshaking_state_ != nullptr) { + handshaking_state_->ShutdownLocked( + absl::UnavailableError("Connection going away")); + } shutdown_ = true; } } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index d3c5d994c1d53..02fffbf41ca61 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -75,12 +75,6 @@ #include "src/core/lib/event_engine/extensions/tcp_trace.h" #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -108,8 +102,14 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/bitset.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/status_helper.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) @@ -1361,10 +1361,7 @@ static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id, }); } -static void send_initial_metadata_locked( - grpc_transport_stream_op_batch* op, grpc_chttp2_stream* s, - grpc_transport_stream_op_batch_payload* op_payload, - grpc_chttp2_transport* t, grpc_closure* on_complete) { +static void trace_annotations(grpc_chttp2_stream* s) { if (!grpc_core::IsCallTracerInTransportEnabled()) { if (s->call_tracer != nullptr) { s->call_tracer->RecordAnnotation( @@ -1383,6 +1380,13 @@ static void send_initial_metadata_locked( .Add(s->flow_control.stats())); } } +} + +static void send_initial_metadata_locked( + grpc_transport_stream_op_batch* op, grpc_chttp2_stream* s, + grpc_transport_stream_op_batch_payload* op_payload, + grpc_chttp2_transport* t, grpc_closure* on_complete) { + trace_annotations(s); if (t->is_client && t->channelz_socket != nullptr) { t->channelz_socket->RecordStreamStartedFromLocal(); } @@ -2915,48 +2919,48 @@ static void next_bdp_ping_timer_expired_locked( } void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args, - bool is_client) { + const bool is_client) { grpc_chttp2_config_default_keepalive_args(grpc_core::ChannelArgs::FromC(args), is_client); } -void grpc_chttp2_config_default_keepalive_args( - const grpc_core::ChannelArgs& channel_args, bool is_client) { - const auto keepalive_time = +static void grpc_chttp2_config_default_keepalive_args_client( + const grpc_core::ChannelArgs& channel_args) { + g_default_client_keepalive_time = std::max(grpc_core::Duration::Milliseconds(1), channel_args.GetDurationFromIntMillis(GRPC_ARG_KEEPALIVE_TIME_MS) - .value_or(is_client ? g_default_client_keepalive_time - : g_default_server_keepalive_time)); - if (is_client) { - g_default_client_keepalive_time = keepalive_time; - } else { - g_default_server_keepalive_time = keepalive_time; - } - - const auto keepalive_timeout = std::max( + .value_or(g_default_client_keepalive_time)); + g_default_client_keepalive_timeout = std::max( grpc_core::Duration::Zero(), channel_args.GetDurationFromIntMillis(GRPC_ARG_KEEPALIVE_TIMEOUT_MS) - .value_or(is_client ? g_default_client_keepalive_timeout - : g_default_server_keepalive_timeout)); - if (is_client) { - g_default_client_keepalive_timeout = keepalive_timeout; - } else { - g_default_server_keepalive_timeout = keepalive_timeout; - } + .value_or(g_default_client_keepalive_timeout)); + g_default_client_keepalive_permit_without_calls = + channel_args.GetBool(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS) + .value_or(g_default_client_keepalive_permit_without_calls); +} - const bool keepalive_permit_without_calls = +static void grpc_chttp2_config_default_keepalive_args_server( + const grpc_core::ChannelArgs& channel_args) { + g_default_server_keepalive_time = + std::max(grpc_core::Duration::Milliseconds(1), + channel_args.GetDurationFromIntMillis(GRPC_ARG_KEEPALIVE_TIME_MS) + .value_or(g_default_server_keepalive_time)); + g_default_server_keepalive_timeout = std::max( + grpc_core::Duration::Zero(), + channel_args.GetDurationFromIntMillis(GRPC_ARG_KEEPALIVE_TIMEOUT_MS) + .value_or(g_default_server_keepalive_timeout)); + g_default_server_keepalive_permit_without_calls = channel_args.GetBool(GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS) - .value_or(is_client - ? g_default_client_keepalive_permit_without_calls - : g_default_server_keepalive_permit_without_calls); + .value_or(g_default_server_keepalive_permit_without_calls); +} + +void grpc_chttp2_config_default_keepalive_args( + const grpc_core::ChannelArgs& channel_args, const bool is_client) { if (is_client) { - g_default_client_keepalive_permit_without_calls = - keepalive_permit_without_calls; + grpc_chttp2_config_default_keepalive_args_client(channel_args); } else { - g_default_server_keepalive_permit_without_calls = - keepalive_permit_without_calls; + grpc_chttp2_config_default_keepalive_args_server(channel_args); } - grpc_core::Chttp2PingAbusePolicy::SetDefaults(channel_args); grpc_core::Chttp2PingRatePolicy::SetDefaults(channel_args); } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index d2b9329803813..c832da4ed9e29 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -31,14 +31,14 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/buffer_list.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" /// Creates a CHTTP2 Transport. This takes ownership of a \a resource_user ref /// from the caller; if the caller still needs the resource_user after creating diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index b15e8603c2218..d3f1202a21760 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -36,9 +36,9 @@ #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/transport/bdp_estimator.h" +#include "src/core/util/time.h" namespace grpc { namespace testing { diff --git a/src/core/ext/transport/chttp2/transport/frame.cc b/src/core/ext/transport/chttp2/transport/frame.cc index 92788903f15e9..65bb166024888 100644 --- a/src/core/ext/transport/chttp2/transport/frame.cc +++ b/src/core/ext/transport/chttp2/transport/frame.cc @@ -25,7 +25,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc index 77739c30883d9..b20f1630adde7 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.cc +++ b/src/core/ext/transport/chttp2/transport/frame_data.cc @@ -29,10 +29,10 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" absl::Status grpc_chttp2_data_parser_begin_frame(uint8_t flags, uint32_t stream_id, diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc index 93e33a14a0f7f..14d91329eaef9 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc @@ -35,9 +35,9 @@ #include "src/core/ext/transport/chttp2/transport/ping_callbacks.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/transport/http2_errors.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/status_helper.h" grpc_slice grpc_chttp2_rst_stream_create( uint32_t id, uint32_t code, grpc_core::CallTracerInterface* call_tracer) { diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.cc b/src/core/ext/transport/chttp2/transport/frame_settings.cc index e0a12218cab67..817097a57b233 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.cc +++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc @@ -36,9 +36,9 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/debug_location.h" #include "src/core/util/useful.h" static uint8_t* fill_header(uint8_t* out, uint32_t length, uint8_t flags) { diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index ba653c6a11c02..011862f5888e2 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -27,8 +27,8 @@ #include "src/core/ext/transport/chttp2/transport/http2_settings.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" -#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/manual_constructor.h" typedef enum { GRPC_CHTTP2_SPS_ID0, diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc index 9fa6aa79645d0..5c573a0beb6a5 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.cc @@ -34,9 +34,9 @@ #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/ext/transport/chttp2/transport/varint.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index cfbf2426ec987..1dab0871ff2ce 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -35,7 +35,6 @@ #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder_table.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" @@ -43,6 +42,7 @@ #include "src/core/lib/transport/timeout_encoding.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc b/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc index c8a93a6a0eeb1..aa4b69623adc0 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc @@ -22,9 +22,9 @@ #include #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parse_result.h b/src/core/ext/transport/chttp2/transport/hpack_parse_result.h index b810264a36721..628b3327f5b28 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parse_result.h @@ -29,11 +29,11 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index 04c64dd5df9d1..fb2e9b301a9b4 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -45,7 +45,6 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_refcount.h" #include "src/core/lib/surface/validate_metadata.h" @@ -54,6 +53,7 @@ #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/match.h" // IWYU pragma: no_include diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index 9df4487f31a9d..af2c1a9c7f0cc 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -39,12 +39,12 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" -#include "src/core/lib/backoff/random_early_detection.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_refcount.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/random_early_detection.h" // IWYU pragma: no_include diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser_table.h b/src/core/ext/transport/chttp2/transport/hpack_parser_table.h index 06e0aeb7f4255..2d790bb2e217b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser_table.h @@ -33,9 +33,9 @@ #include "src/core/ext/transport/chttp2/transport/hpack_constants.h" #include "src/core/ext/transport/chttp2/transport/hpack_parse_result.h" -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/parsed_metadata.h" +#include "src/core/util/no_destruct.h" #include "src/core/util/unique_ptr_with_bitset.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 64f398807ba4a..80e214ca1f2b3 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -58,11 +58,6 @@ #include "src/core/ext/transport/chttp2/transport/write_size_policy.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -78,6 +73,11 @@ #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/bitset.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" // Flag that this closure barrier may be covering a write in a pollset, and so // we should not complete this closure until we can prove that the write got diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index d8c1680c3b21c..cd102ff85df2c 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -56,11 +56,8 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/ext/transport/chttp2/transport/ping_rate_policy.h" -#include "src/core/lib/backoff/random_early_detection.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -72,6 +69,9 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/random_early_detection.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" using grpc_core::HPackParser; diff --git a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h index 3d834a8665ea6..bff0408982236 100644 --- a/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h +++ b/src/core/ext/transport/chttp2/transport/ping_abuse_policy.h @@ -20,7 +20,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/ping_callbacks.h b/src/core/ext/transport/chttp2/transport/ping_callbacks.h index 6bbe07e0c8fc5..1e558eda83694 100644 --- a/src/core/ext/transport/chttp2/transport/ping_callbacks.h +++ b/src/core/ext/transport/chttp2/transport/ping_callbacks.h @@ -31,7 +31,7 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc index 143b08a67c76f..6f32973530601 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/match.h" // How many pings do we allow to be inflight at any given time? // In older versions of gRPC this was implicitly 1. diff --git a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h index 6dab7a361bce6..df16b3813bc15 100644 --- a/src/core/ext/transport/chttp2/transport/ping_rate_policy.h +++ b/src/core/ext/transport/chttp2/transport/ping_rate_policy.h @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.cc b/src/core/ext/transport/chttp2/transport/stream_lists.cc index f2ac00e957a72..f4ee3e58eb8e9 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.cc +++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc @@ -24,7 +24,7 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" static const char* stream_list_id_string(grpc_chttp2_stream_list_id id) { switch (id) { diff --git a/src/core/ext/transport/chttp2/transport/write_size_policy.h b/src/core/ext/transport/chttp2/transport/write_size_policy.h index a1eae8fec9ec6..fdeeda0763a18 100644 --- a/src/core/ext/transport/chttp2/transport/write_size_policy.h +++ b/src/core/ext/transport/chttp2/transport/write_size_policy.h @@ -20,7 +20,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 29c3b67e82a90..13797c1f1b506 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -54,10 +54,6 @@ #include "src/core/ext/transport/chttp2/transport/write_size_policy.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -70,9 +66,13 @@ #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/match.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" -// IWYU pragma: no_include "src/core/lib/gprpp/orphanable.h" +// IWYU pragma: no_include "src/core/util/orphanable.h" static void add_to_write_list(grpc_chttp2_write_cb** list, grpc_chttp2_write_cb* cb) { diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc index d78069c312c3a..a7c59b26d944a 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc @@ -28,12 +28,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" GRPCAPI grpc_channel* grpc_cronet_secure_channel_create( void* engine, const char* target, const grpc_channel_args* args, diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index 26b0938228578..4d47895f9bbb3 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -47,9 +47,6 @@ #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/cronet/transport/cronet_status.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -61,6 +58,9 @@ #include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" // IWYU pragma: no_include diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index a967b4c0d9bbb..a656d8b7fde28 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -28,8 +28,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/resource_quota/resource_quota.h" @@ -37,6 +35,8 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/transport.h" #include "src/core/server/server.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/ext/transport/inproc/legacy_inproc_transport.cc b/src/core/ext/transport/inproc/legacy_inproc_transport.cc index ae2441db5d4b5..b93fc97a16040 100644 --- a/src/core/ext/transport/inproc/legacy_inproc_transport.cc +++ b/src/core/ext/transport/inproc/legacy_inproc_transport.cc @@ -47,10 +47,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -66,6 +62,10 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/server/server.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" namespace { struct inproc_stream; diff --git a/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc b/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc index 153eddbeeccb1..151f4e8c9d449 100644 --- a/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc +++ b/src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc @@ -28,11 +28,11 @@ #include "src/core/handshaker/handshaker_factory.h" #include "src/core/handshaker/handshaker_registry.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/handshaker/handshaker.cc b/src/core/handshaker/handshaker.cc index 3949dccbe591d..b476e550f75d6 100644 --- a/src/core/handshaker/handshaker.cc +++ b/src/core/handshaker/handshaker.cc @@ -38,13 +38,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" using ::grpc_event_engine::experimental::EventEngine; diff --git a/src/core/handshaker/handshaker.h b/src/core/handshaker/handshaker.h index 04beed4a96612..12ea2b4b8bff6 100644 --- a/src/core/handshaker/handshaker.h +++ b/src/core/handshaker/handshaker.h @@ -31,16 +31,16 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/slice/slice_buffer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/handshaker/http_connect/http_connect_handshaker.cc b/src/core/handshaker/http_connect/http_connect_handshaker.cc index 2260224d10dd1..3ec778ed4b11f 100644 --- a/src/core/handshaker/http_connect/http_connect_handshaker.cc +++ b/src/core/handshaker/http_connect/http_connect_handshaker.cc @@ -42,9 +42,6 @@ #include "src/core/handshaker/handshaker_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -55,7 +52,9 @@ #include "src/core/lib/slice/slice_buffer.h" #include "src/core/util/http_client/format_request.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" namespace grpc_core { @@ -279,7 +278,7 @@ void HttpConnectHandshaker::DoHandshake( for (size_t i = 0; i < num_header_strings; ++i) { char* sep = strchr(header_strings[i], ':'); if (sep == nullptr) { - LOG(ERROR) << "skipping unparseable HTTP CONNECT header: " + LOG(ERROR) << "skipping unparsable HTTP CONNECT header: " << header_strings[i]; continue; } diff --git a/src/core/handshaker/http_connect/http_proxy_mapper.cc b/src/core/handshaker/http_connect/http_proxy_mapper.cc index 93c8e2fe8ebfd..f22e6d67423f6 100644 --- a/src/core/handshaker/http_connect/http_proxy_mapper.cc +++ b/src/core/handshaker/http_connect/http_proxy_mapper.cc @@ -47,12 +47,12 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/resolve_address.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" +#include "src/core/util/memory.h" #include "src/core/util/string.h" +#include "src/core/util/uri.h" namespace grpc_core { namespace { diff --git a/src/core/handshaker/security/secure_endpoint.cc b/src/core/handshaker/security/secure_endpoint.cc index cf720f19d2190..c57b56b4d2610 100644 --- a/src/core/handshaker/security/secure_endpoint.cc +++ b/src/core/handshaker/security/secure_endpoint.cc @@ -42,10 +42,6 @@ #include #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -58,7 +54,11 @@ #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/tsi/transport_security_grpc.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" #define STAGING_BUFFER_SIZE 8192 diff --git a/src/core/handshaker/security/secure_endpoint.h b/src/core/handshaker/security/secure_endpoint.h index 43add1a816b7a..0d81fec090bae 100644 --- a/src/core/handshaker/security/secure_endpoint.h +++ b/src/core/handshaker/security/secure_endpoint.h @@ -26,8 +26,8 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/util/orphanable.h" // Takes ownership of protector, zero_copy_protector, and to_wrap, and refs // leftover_slices. If zero_copy_protector is not NULL, protector will never be diff --git a/src/core/handshaker/security/security_handshaker.cc b/src/core/handshaker/security/security_handshaker.cc index e54735e53a6c1..82756fc872361 100644 --- a/src/core/handshaker/security/security_handshaker.cc +++ b/src/core/handshaker/security/security_handshaker.cc @@ -50,10 +50,6 @@ #include "src/core/handshaker/security/secure_endpoint.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -66,6 +62,10 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/tsi/transport_security_grpc.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" #define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 @@ -358,16 +358,12 @@ grpc_error_handle SecurityHandshaker::OnHandshakeNextDoneLocked( return error; } if (result != TSI_OK) { - auto* security_connector = args_->args.GetObject(); - absl::string_view connector_type = ""; - if (security_connector != nullptr) { - connector_type = security_connector->type().name(); - } // TODO(roth): Get a better signal from the TSI layer as to what // status code we should use here. return GRPC_ERROR_CREATE(absl::StrCat( - connector_type, " handshake failed (", tsi_result_to_string(result), - ")", (tsi_handshake_error_.empty() ? "" : ": "), tsi_handshake_error_)); + connector_->type().name(), " handshake failed (", + tsi_result_to_string(result), ")", + (tsi_handshake_error_.empty() ? "" : ": "), tsi_handshake_error_)); } // Update handshaker result. if (handshaker_result != nullptr) { diff --git a/src/core/handshaker/security/security_handshaker.h b/src/core/handshaker/security/security_handshaker.h index 9aa3bcfabc0a5..3e6096d6c47cd 100644 --- a/src/core/handshaker/security/security_handshaker.h +++ b/src/core/handshaker/security/security_handshaker.h @@ -27,9 +27,9 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc b/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc index 77ae19ef7dbdb..a02ccfa8cc358 100644 --- a/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +++ b/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc @@ -40,9 +40,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -53,7 +50,10 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/address_utils/parse_address.cc b/src/core/lib/address_utils/parse_address.cc index ee94d002d5fcd..ce75321ce31c2 100644 --- a/src/core/lib/address_utils/parse_address.cc +++ b/src/core/lib/address_utils/parse_address.cc @@ -47,11 +47,11 @@ #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/iomgr/grpc_if_nametoindex.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" +#include "src/core/util/grpc_if_nametoindex.h" +#include "src/core/util/host_port.h" +#include "src/core/util/status_helper.h" #include "src/core/util/string.h" // IWYU pragma: no_include diff --git a/src/core/lib/address_utils/parse_address.h b/src/core/lib/address_utils/parse_address.h index b3093f1fd88e7..c11789885abec 100644 --- a/src/core/lib/address_utils/parse_address.h +++ b/src/core/lib/address_utils/parse_address.h @@ -28,7 +28,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" /// Populate \a resolved_addr from \a uri, whose path is expected to contain a /// unix socket path. Returns true upon success. diff --git a/src/core/lib/address_utils/sockaddr_utils.cc b/src/core/lib/address_utils/sockaddr_utils.cc index a12eb90789903..41564ba524210 100644 --- a/src/core/lib/address_utils/sockaddr_utils.cc +++ b/src/core/lib/address_utils/sockaddr_utils.cc @@ -37,12 +37,12 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" +#include "src/core/util/uri.h" #ifdef GRPC_HAVE_UNIX_SOCKET #ifdef GPR_WINDOWS diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 301c0c287c59d..9274c45398862 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -37,14 +37,14 @@ #include #include -#include "src/core/lib/avl/avl.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/util/avl.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" // TODO(hork): When we're ready to allow setting via a channel arg from the diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 451cba6be9036..8ed7b4eafe143 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -59,10 +59,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -72,7 +68,11 @@ #include "src/core/lib/transport/call_final_info.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" +#include "src/core/util/unique_type_name.h" struct grpc_channel_element_args { grpc_channel_stack* channel_stack; diff --git a/src/core/lib/channel/channel_stack_builder.h b/src/core/lib/channel/channel_stack_builder.h index 82a0592bc4f45..6b3155fcbdb81 100644 --- a/src/core/lib/channel/channel_stack_builder.h +++ b/src/core/lib/channel/channel_stack_builder.h @@ -25,8 +25,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_stack_builder_impl.cc b/src/core/lib/channel/channel_stack_builder_impl.cc index a5d93d81edcc6..953a60a9232a3 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.cc +++ b/src/core/lib/channel/channel_stack_builder_impl.cc @@ -38,8 +38,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/activity.h" @@ -49,6 +47,8 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/channel/channel_stack_builder_impl.h b/src/core/lib/channel/channel_stack_builder_impl.h index a76e322b71b62..3bce0f5db3fe7 100644 --- a/src/core/lib/channel/channel_stack_builder_impl.h +++ b/src/core/lib/channel/channel_stack_builder_impl.h @@ -21,7 +21,7 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/channel/connected_channel.cc b/src/core/lib/channel/connected_channel.cc index 9977ecdabfeac..f65f5f74f29cd 100644 --- a/src/core/lib/channel/connected_channel.cc +++ b/src/core/lib/channel/connected_channel.cc @@ -43,10 +43,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -76,6 +72,10 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/util/alloc.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" typedef struct connected_channel_channel_data { grpc_core::Transport* transport; diff --git a/src/core/lib/channel/promise_based_filter.cc b/src/core/lib/channel/promise_based_filter.cc index 5f0879dda27cf..bf5dadfc804f0 100644 --- a/src/core/lib/channel/promise_based_filter.cc +++ b/src/core/lib/channel/promise_based_filter.cc @@ -34,12 +34,12 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/crash.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/status_helper.h" namespace grpc_core { namespace promise_filter_detail { diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index 3c9c64dbaa8e4..0ac59932e0f87 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -48,9 +48,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" @@ -72,6 +69,9 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/match.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/compression/compression_internal.cc b/src/core/lib/compression/compression_internal.cc index c643b1cd81774..3bb8a7f288203 100644 --- a/src/core/lib/compression/compression_internal.cc +++ b/src/core/lib/compression/compression_internal.cc @@ -33,9 +33,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/ref_counted_string.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" namespace grpc_core { diff --git a/src/core/lib/compression/compression_internal.h b/src/core/lib/compression/compression_internal.h index 80434e6f59b96..45a24faa998a6 100644 --- a/src/core/lib/compression/compression_internal.h +++ b/src/core/lib/compression/compression_internal.h @@ -30,8 +30,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/bitset.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/lib/config/load_config.cc b/src/core/lib/config/load_config.cc index 1e9c3170a74bb..3d52fc4db031c 100644 --- a/src/core/lib/config/load_config.cc +++ b/src/core/lib/config/load_config.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" namespace grpc_core { diff --git a/src/core/lib/debug/trace.cc b/src/core/lib/debug/trace.cc index 642976a0e6b16..920c5d491c9bd 100644 --- a/src/core/lib/debug/trace.cc +++ b/src/core/lib/debug/trace.cc @@ -33,7 +33,7 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/glob.h" +#include "src/core/util/glob.h" int grpc_tracer_set_enabled(const char* name, int enabled); diff --git a/src/core/lib/debug/trace_flags.cc b/src/core/lib/debug/trace_flags.cc index 85b5f6f9ee216..03bfe06312cf9 100644 --- a/src/core/lib/debug/trace_flags.cc +++ b/src/core/lib/debug/trace_flags.cc @@ -19,7 +19,7 @@ #include "absl/container/flat_hash_map.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" namespace grpc_core { diff --git a/src/core/lib/event_engine/ares_resolver.cc b/src/core/lib/event_engine/ares_resolver.cc index 1cd7c73f54ec4..f1faf40924100 100644 --- a/src/core/lib/event_engine/ares_resolver.cc +++ b/src/core/lib/event_engine/ares_resolver.cc @@ -68,12 +68,12 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/time_util.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #ifdef GRPC_POSIX_SOCKET_ARES_EV_DRIVER #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #endif @@ -272,7 +272,7 @@ void AresResolver::LookupHostname( event_engine_->Run( [callback = std::move(callback), status = absl::InvalidArgumentError(absl::StrCat( - "Unparseable name: ", name))]() mutable { callback(status); }); + "Unparsable name: ", name))]() mutable { callback(status); }); return; } if (host.empty()) { @@ -351,7 +351,7 @@ void AresResolver::LookupSRV( event_engine_->Run( [callback = std::move(callback), status = absl::InvalidArgumentError(absl::StrCat( - "Unparseable name: ", name))]() mutable { callback(status); }); + "Unparsable name: ", name))]() mutable { callback(status); }); return; } if (host.empty()) { @@ -386,7 +386,7 @@ void AresResolver::LookupTXT( event_engine_->Run( [callback = std::move(callback), status = absl::InvalidArgumentError(absl::StrCat( - "Unparseable name: ", name))]() mutable { callback(status); }); + "Unparsable name: ", name))]() mutable { callback(status); }); return; } if (host.empty()) { diff --git a/src/core/lib/event_engine/ares_resolver.h b/src/core/lib/event_engine/ares_resolver.h index c36cf49f7677b..331e533b35f99 100644 --- a/src/core/lib/event_engine/ares_resolver.h +++ b/src/core/lib/event_engine/ares_resolver.h @@ -40,8 +40,8 @@ #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/ref_counted_dns_resolver_interface.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/cf_engine/cf_engine.cc b/src/core/lib/event_engine/cf_engine/cf_engine.cc index ffd936cd5102d..cc80e9977b6ac 100644 --- a/src/core/lib/event_engine/cf_engine/cf_engine.cc +++ b/src/core/lib/event_engine/cf_engine/cf_engine.cc @@ -32,7 +32,7 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/utils.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/cf_engine/cf_engine.h b/src/core/lib/event_engine/cf_engine/cf_engine.h index adba2e84e6228..6529e649117b4 100644 --- a/src/core/lib/event_engine/cf_engine/cf_engine.h +++ b/src/core/lib/event_engine/cf_engine/cf_engine.h @@ -26,8 +26,8 @@ #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" #include "src/core/lib/event_engine/posix_engine/timer_manager.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/surface/init_internally.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc index 4721437860b91..7a5f15b4208c4 100644 --- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc @@ -23,7 +23,7 @@ #include "absl/strings/str_format.h" #include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h index a8bb3dae27373..8623dc888f0ee 100644 --- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h +++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.h @@ -30,9 +30,9 @@ #include "src/core/lib/event_engine/cf_engine/cftype_unique_ref.h" #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/host_port.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc b/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc index 8c0cd0b694a90..a4fd9758ae589 100644 --- a/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +++ b/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc @@ -26,7 +26,7 @@ #include "src/core/lib/event_engine/cf_engine/dns_service_resolver.h" #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" namespace grpc_event_engine { namespace experimental { @@ -43,7 +43,7 @@ void DNSServiceResolverImpl::LookupHostname( if (!grpc_core::SplitHostPort(name, &host, &port_string)) { engine_->Run([on_resolve = std::move(on_resolve), status = absl::InvalidArgumentError( - absl::StrCat("Unparseable name: ", name))]() mutable { + absl::StrCat("Unparsable name: ", name))]() mutable { on_resolve(status); }); return; diff --git a/src/core/lib/event_engine/cf_engine/dns_service_resolver.h b/src/core/lib/event_engine/cf_engine/dns_service_resolver.h index cff4f9cc266ab..e9c464029b3e7 100644 --- a/src/core/lib/event_engine/cf_engine/dns_service_resolver.h +++ b/src/core/lib/event_engine/cf_engine/dns_service_resolver.h @@ -28,8 +28,8 @@ #include #include "src/core/lib/event_engine/cf_engine/cf_engine.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/default_event_engine.cc b/src/core/lib/event_engine/default_event_engine.cc index 45520f581eddf..24282e7921b65 100644 --- a/src/core/lib/event_engine/default_event_engine.cc +++ b/src/core/lib/event_engine/default_event_engine.cc @@ -26,9 +26,9 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/default_event_engine_factory.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" #ifdef GRPC_MAXIMIZE_THREADYNESS #include "src/core/lib/event_engine/thready_event_engine/thready_event_engine.h" // IWYU pragma: keep diff --git a/src/core/lib/event_engine/default_event_engine.h b/src/core/lib/event_engine/default_event_engine.h index d1944fa56f0b4..2f7c982ab4c8d 100644 --- a/src/core/lib/event_engine/default_event_engine.h +++ b/src/core/lib/event_engine/default_event_engine.h @@ -21,7 +21,7 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" +#include "src/core/util/debug_location.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/grpc_polled_fd.h b/src/core/lib/event_engine/grpc_polled_fd.h index ea9c6eda13894..d1e6dc3b20c84 100644 --- a/src/core/lib/event_engine/grpc_polled_fd.h +++ b/src/core/lib/event_engine/grpc_polled_fd.h @@ -27,7 +27,7 @@ #include "absl/functional/any_invocable.h" #include "absl/status/status.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc index 402822e27edd1..f59c6616bd913 100644 --- a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +++ b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc @@ -31,8 +31,8 @@ #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/time_util.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" // This polling engine is only relevant on linux kernels supporting epoll // epoll_create() or epoll_create1() @@ -48,10 +48,10 @@ #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/fork.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/strerror.h" +#include "src/core/util/sync.h" #define MAX_EPOLL_EVENTS_HANDLED_PER_ITERATION 1 diff --git a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h index ed6b480bdeb55..42c614466599d 100644 --- a/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h +++ b/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h @@ -30,8 +30,8 @@ #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" #ifdef GRPC_LINUX_EPOLL #include diff --git a/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc b/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc index e573be3064224..c62c9e1a8e2c6 100644 --- a/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +++ b/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc @@ -37,8 +37,8 @@ #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" #ifdef GRPC_POSIX_SOCKET_EV_POLL @@ -54,11 +54,11 @@ #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix_default.h" #include "src/core/lib/event_engine/time_util.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/fork.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/strerror.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" static const intptr_t kClosureNotReady = 0; static const intptr_t kClosureReady = 1; @@ -852,7 +852,7 @@ std::shared_ptr MakePollPoller(Scheduler* scheduler, #else // GRPC_POSIX_SOCKET_EV_POLL -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/ev_poll_posix.h b/src/core/lib/event_engine/posix_engine/ev_poll_posix.h index d10044e8e4221..d3e139eb0c883 100644 --- a/src/core/lib/event_engine/posix_engine/ev_poll_posix.h +++ b/src/core/lib/event_engine/posix_engine/ev_poll_posix.h @@ -28,7 +28,7 @@ #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc index 7cad58fe92e9e..7f11bbb05a0c9 100644 --- a/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc +++ b/src/core/lib/event_engine/posix_engine/event_poller_posix_default.cc @@ -25,8 +25,8 @@ #include "src/core/lib/event_engine/posix_engine/ev_epoll1_linux.h" #include "src/core/lib/event_engine/posix_engine/ev_poll_posix.h" #include "src/core/lib/event_engine/posix_engine/event_poller.h" -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/no_destruct.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h b/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h index d1d17f8c8097d..7c9f8a5f74255 100644 --- a/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +++ b/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h @@ -20,8 +20,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" #if GRPC_ARES == 1 && defined(GRPC_POSIX_SOCKET_ARES_EV_DRIVER) diff --git a/src/core/lib/event_engine/posix_engine/internal_errqueue.cc b/src/core/lib/event_engine/posix_engine/internal_errqueue.cc index 2c1cc84e7787d..dd4d3711f9dcb 100644 --- a/src/core/lib/event_engine/posix_engine/internal_errqueue.cc +++ b/src/core/lib/event_engine/posix_engine/internal_errqueue.cc @@ -30,7 +30,7 @@ #include -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/lockfree_event.cc b/src/core/lib/event_engine/posix_engine/lockfree_event.cc index dc7900646a0df..e0cb157b922f3 100644 --- a/src/core/lib/event_engine/posix_engine/lockfree_event.cc +++ b/src/core/lib/event_engine/posix_engine/lockfree_event.cc @@ -24,8 +24,8 @@ #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/status_helper.h" +#include "src/core/util/crash.h" +#include "src/core/util/status_helper.h" // 'state' holds the to call when the fd is readable or writable respectively. // It can contain one of the following values: diff --git a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc index 4e0f66fc1f780..7d4c7a0ac7b57 100644 --- a/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc +++ b/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc @@ -34,7 +34,7 @@ #include "absl/strings/str_format.h" #include "src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "src/core/util/useful.h" namespace grpc_event_engine { @@ -50,7 +50,7 @@ LookupHostnameBlocking(absl::string_view name, absl::string_view default_port) { // parse name, splitting it into host and port parts grpc_core::SplitHostPort(name, &host, &port); if (host.empty()) { - return absl::InvalidArgumentError(absl::StrCat("Unparseable name: ", name)); + return absl::InvalidArgumentError(absl::StrCat("Unparsable name: ", name)); } if (port.empty()) { if (default_port.empty()) { diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc index 7634bb1334b81..c603f94035904 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.cc @@ -45,16 +45,16 @@ #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/load_file.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/strerror.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #ifdef GRPC_POSIX_SOCKET_TCP #ifdef GRPC_LINUX_ERRQUEUE @@ -236,7 +236,7 @@ msg_iovlen_type TcpZerocopySendRecord::PopulateIovs(size_t* unwind_slice_idx, iov_size++) { MutableSlice& slice = internal::SliceCast( buf_.MutableSliceAt(out_offset_.slice_idx)); - iov[iov_size].iov_base = slice.begin(); + iov[iov_size].iov_base = slice.begin() + out_offset_.byte_idx; iov[iov_size].iov_len = slice.length() - out_offset_.byte_idx; *sending_length += iov[iov_size].iov_len; ++(out_offset_.slice_idx); diff --git a/src/core/lib/event_engine/posix_engine/posix_endpoint.h b/src/core/lib/event_engine/posix_engine/posix_endpoint.h index 80964556b0c64..81ec03c7f0ffb 100644 --- a/src/core/lib/event_engine/posix_engine/posix_endpoint.h +++ b/src/core/lib/event_engine/posix_engine/posix_endpoint.h @@ -45,11 +45,11 @@ #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/posix_engine/traced_buffer_list.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" #ifdef GRPC_POSIX_SOCKET_TCP 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 7dfc25356235a..d068367779572 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine.cc @@ -49,9 +49,9 @@ #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" #ifdef GRPC_POSIX_SOCKET_TCP 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 ea426c379c9f8..f2483d11653cc 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine.h @@ -39,10 +39,10 @@ #include "src/core/lib/event_engine/posix_engine/timer_manager.h" #include "src/core/lib/event_engine/ref_counted_dns_resolver_interface.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/init_internally.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/sync.h" #ifdef GRPC_POSIX_SOCKET_TCP #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc b/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc index fcc98fe4c8f7e..d8b40ab2f7148 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc @@ -46,10 +46,10 @@ #include "src/core/lib/event_engine/posix_engine/posix_engine_listener.h" #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/socket_mutator.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/strerror.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener.h b/src/core/lib/event_engine/posix_engine/posix_engine_listener.h index 73a921a35e4e8..40c43de8c12bd 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener.h +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener.h @@ -34,8 +34,8 @@ #include #include "src/core/lib/event_engine/posix.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" #ifdef GRPC_POSIX_SOCKET_TCP #include "src/core/lib/event_engine/posix_engine/event_poller.h" @@ -239,7 +239,7 @@ class PosixEngineListener : public PosixListenerWithFdSupport { #else // GRPC_POSIX_SOCKET_TCP -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" class PosixEngineListener : public PosixListenerWithFdSupport { public: diff --git a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc index 7aa624fc3cb93..b3532e2d8606c 100644 --- a/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +++ b/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc @@ -33,10 +33,10 @@ #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/socket_mutator.h" +#include "src/core/util/crash.h" // IWYU pragma: keep +#include "src/core/util/status_helper.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 diff --git a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc index ae193ff2beba0..fad1a7f67306d 100644 --- a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +++ b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc @@ -27,9 +27,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" // IWYU pragma: keep +#include "src/core/util/time.h" #include "src/core/util/useful.h" #ifdef GRPC_POSIX_SOCKET_UTILS_COMMON @@ -53,8 +53,8 @@ #include "absl/status/status.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/strerror.h" #ifdef GRPC_HAVE_UNIX_SOCKET #ifdef GPR_WINDOWS diff --git a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h index 412fafcad3257..07bd3308d1d1b 100644 --- a/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +++ b/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h @@ -29,10 +29,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #ifdef GRPC_POSIX_SOCKET_UTILS_COMMON #include diff --git a/src/core/lib/event_engine/posix_engine/timer.cc b/src/core/lib/event_engine/posix_engine/timer.cc index 6f152ce494a37..8e77e251bcc91 100644 --- a/src/core/lib/event_engine/posix_engine/timer.cc +++ b/src/core/lib/event_engine/posix_engine/timer.cc @@ -27,7 +27,7 @@ #include #include "src/core/lib/event_engine/posix_engine/timer_heap.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/posix_engine/timer.h b/src/core/lib/event_engine/posix_engine/timer.h index 30e4bb2eb6c0f..54f753b91cf78 100644 --- a/src/core/lib/event_engine/posix_engine/timer.h +++ b/src/core/lib/event_engine/posix_engine/timer.h @@ -33,9 +33,9 @@ #include #include "src/core/lib/event_engine/posix_engine/timer_heap.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/time_averaged_stats.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/time_averaged_stats.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/timer_manager.h b/src/core/lib/event_engine/posix_engine/timer_manager.h index 6b034358ef771..3650a06dfcec2 100644 --- a/src/core/lib/event_engine/posix_engine/timer_manager.h +++ b/src/core/lib/event_engine/posix_engine/timer_manager.h @@ -33,9 +33,9 @@ #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/posix_engine/timer.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc b/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc index d4cdfac8b7ff0..d908ca769439b 100644 --- a/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +++ b/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc @@ -27,8 +27,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" #ifdef GRPC_LINUX_ERRQUEUE #include // IWYU pragma: keep @@ -317,7 +317,7 @@ void TcpSetWriteTimestampsCallback( #else // GRPC_LINUX_ERRQUEUE -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/traced_buffer_list.h b/src/core/lib/event_engine/posix_engine/traced_buffer_list.h index f65dba6b0092a..1df29a14243f1 100644 --- a/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +++ b/src/core/lib/event_engine/posix_engine/traced_buffer_list.h @@ -25,8 +25,8 @@ #include #include "src/core/lib/event_engine/posix_engine/internal_errqueue.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc index c05fd8d4d5028..d6efbd26671e8 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" // IWYU pragma: keep #ifdef GRPC_LINUX_EVENTFD @@ -31,7 +31,7 @@ #endif #include "src/core/lib/event_engine/posix_engine/wakeup_fd_eventfd.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" namespace grpc_event_engine { namespace experimental { @@ -103,7 +103,7 @@ EventFdWakeupFd::CreateEventFdWakeupFd() { #else // GRPC_LINUX_EVENTFD -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" absl::Status EventFdWakeupFd::Init() { grpc_core::Crash("unimplemented"); } diff --git a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc index 75c887b075427..9f2a0959df3c7 100644 --- a/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc +++ b/src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.cc @@ -19,8 +19,8 @@ #include -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" // IWYU pragma: keep #ifdef GRPC_POSIX_WAKEUP_FD #include @@ -31,7 +31,7 @@ #endif #include "src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h b/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h index 52d4168f06def..107ba10f75bc3 100644 --- a/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h +++ b/src/core/lib/event_engine/ref_counted_dns_resolver_interface.h @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/orphanable.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/tcp_socket_utils.cc b/src/core/lib/event_engine/tcp_socket_utils.cc index 2037eff91ead5..1353249817d38 100644 --- a/src/core/lib/event_engine/tcp_socket_utils.cc +++ b/src/core/lib/event_engine/tcp_socket_utils.cc @@ -59,10 +59,10 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/host_port.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/uri.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/thread_pool/thread_count.cc b/src/core/lib/event_engine/thread_pool/thread_count.cc index 6fc6a43c213dc..faeffe1f89681 100644 --- a/src/core/lib/event_engine/thread_pool/thread_count.cc +++ b/src/core/lib/event_engine/thread_pool/thread_count.cc @@ -25,7 +25,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/thread_pool/thread_count.h b/src/core/lib/event_engine/thread_pool/thread_count.h index a3842275e7e49..7bca370e9e10a 100644 --- a/src/core/lib/event_engine/thread_pool/thread_count.h +++ b/src/core/lib/event_engine/thread_pool/thread_count.h @@ -26,8 +26,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_event_engine { diff --git a/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc b/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc index cab291bc1b4ff..bea6d8d526ccd 100644 --- a/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc +++ b/src/core/lib/event_engine/thread_pool/thread_pool_factory.cc @@ -20,7 +20,7 @@ #include "src/core/lib/event_engine/forkable.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc index dcb0aabaf7e15..852cf0f3915fd 100644 --- a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +++ b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc @@ -35,17 +35,17 @@ #include #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_local.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" #include "src/core/lib/event_engine/work_queue/work_queue.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/examine_stack.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/examine_stack.h" +#include "src/core/util/thd.h" +#include "src/core/util/time.h" #ifdef GPR_POSIX_SYNC #include diff --git a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h index 7543db92900c5..69beaa7cddda7 100644 --- a/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h +++ b/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h @@ -32,14 +32,14 @@ #include #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/event_engine/thread_pool/thread_count.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" #include "src/core/lib/event_engine/work_queue/work_queue.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/backoff.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc index 3be7a0e0b32bb..5475f2e45a079 100644 --- a/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +++ b/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc @@ -21,9 +21,9 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/utils.cc b/src/core/lib/event_engine/utils.cc index 5fe19aa3698ba..d0d1b436c5d02 100644 --- a/src/core/lib/event_engine/utils.cc +++ b/src/core/lib/event_engine/utils.cc @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/utils.h b/src/core/lib/event_engine/utils.h index ab6d4fa1c965e..5edfcd890f080 100644 --- a/src/core/lib/event_engine/utils.h +++ b/src/core/lib/event_engine/utils.h @@ -21,7 +21,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc index b9542b0bb6baf..3723b3463ed1d 100644 --- a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +++ b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc @@ -34,10 +34,10 @@ #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/windows/grpc_polled_fd_windows.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/sync.h" // TODO(apolcyn): remove this hack after fixing upstream. // Our grpc/c-ares code on Windows uses the ares_set_socket_functions API, diff --git a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h index eda3330cb917a..e16c8e80e9ef4 100644 --- a/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h +++ b/src/core/lib/event_engine/windows/grpc_polled_fd_windows.h @@ -34,7 +34,7 @@ #include "src/core/lib/event_engine/grpc_polled_fd.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" struct iovec; diff --git a/src/core/lib/event_engine/windows/iocp.cc b/src/core/lib/event_engine/windows/iocp.cc index b81ec3dc5006a..74d875ba2ab01 100644 --- a/src/core/lib/event_engine/windows/iocp.cc +++ b/src/core/lib/event_engine/windows/iocp.cc @@ -27,8 +27,8 @@ #include "src/core/lib/event_engine/time_util.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc b/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc index ab318238c02fc..d8114497b1116 100644 --- a/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +++ b/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc @@ -26,9 +26,9 @@ #include #include "src/core/lib/event_engine/windows/native_windows_dns_resolver.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/host_port.h" +#include "src/core/util/status_helper.h" namespace grpc_event_engine { namespace experimental { @@ -42,7 +42,7 @@ LookupHostnameBlocking(absl::string_view name, absl::string_view default_port) { std::string port; grpc_core::SplitHostPort(name, &host, &port); if (host.empty()) { - return absl::InvalidArgumentError(absl::StrCat("Unparseable name: ", name)); + return absl::InvalidArgumentError(absl::StrCat("Unparsable name: ", name)); } if (port.empty()) { if (default_port.empty()) { diff --git a/src/core/lib/event_engine/windows/win_socket.cc b/src/core/lib/event_engine/windows/win_socket.cc index 8c18b09ae42b0..79fc2bec4fe4c 100644 --- a/src/core/lib/event_engine/windows/win_socket.cc +++ b/src/core/lib/event_engine/windows/win_socket.cc @@ -23,9 +23,9 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/sync.h" #if defined(__MSYS__) && defined(GPR_ARCH_64) // Nasty workaround for nasty bug when using the 64 bits msys compiler diff --git a/src/core/lib/event_engine/windows/win_socket.h b/src/core/lib/event_engine/windows/win_socket.h index be453d26e6d21..4256179c0705f 100644 --- a/src/core/lib/event_engine/windows/win_socket.h +++ b/src/core/lib/event_engine/windows/win_socket.h @@ -24,8 +24,8 @@ #include #include "src/core/lib/event_engine/thread_pool/thread_pool.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/windows_endpoint.cc b/src/core/lib/event_engine/windows/windows_endpoint.cc index d3bda779dd33e..ec4118c7fd27d 100644 --- a/src/core/lib/event_engine/windows/windows_endpoint.cc +++ b/src/core/lib/event_engine/windows/windows_endpoint.cc @@ -28,9 +28,9 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/windows_endpoint.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/windows_engine.cc b/src/core/lib/event_engine/windows/windows_engine.cc index c691859bdfb38..31e2eb03569cd 100644 --- a/src/core/lib/event_engine/windows/windows_engine.cc +++ b/src/core/lib/event_engine/windows/windows_engine.cc @@ -43,11 +43,11 @@ #include "src/core/lib/event_engine/windows/windows_endpoint.h" #include "src/core/lib/event_engine/windows/windows_engine.h" #include "src/core/lib/event_engine/windows/windows_listener.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" +#include "src/core/util/dump_args.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/windows_engine.h b/src/core/lib/event_engine/windows/windows_engine.h index 2047ab6cd84a8..98ca81e1a520f 100644 --- a/src/core/lib/event_engine/windows/windows_engine.h +++ b/src/core/lib/event_engine/windows/windows_engine.h @@ -37,9 +37,9 @@ #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/windows_endpoint.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/surface/init_internally.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/windows_listener.cc b/src/core/lib/event_engine/windows/windows_listener.cc index c04346fb9bed4..2bba1a6e818b1 100644 --- a/src/core/lib/event_engine/windows/windows_listener.cc +++ b/src/core/lib/event_engine/windows/windows_listener.cc @@ -25,10 +25,10 @@ #include "src/core/lib/event_engine/windows/win_socket.h" #include "src/core/lib/event_engine/windows/windows_endpoint.h" #include "src/core/lib/event_engine/windows/windows_listener.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/windows/windows_listener.h b/src/core/lib/event_engine/windows/windows_listener.h index 2773f3afbf343..8e0a5bd0f95ab 100644 --- a/src/core/lib/event_engine/windows/windows_listener.h +++ b/src/core/lib/event_engine/windows/windows_listener.h @@ -29,8 +29,8 @@ #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" #ifdef GRPC_HAVE_UNIX_SOCKET // clang-format off diff --git a/src/core/lib/event_engine/work_queue/basic_work_queue.cc b/src/core/lib/event_engine/work_queue/basic_work_queue.cc index a9170e69bd3b4..40bfcf7cd5d2f 100644 --- a/src/core/lib/event_engine/work_queue/basic_work_queue.cc +++ b/src/core/lib/event_engine/work_queue/basic_work_queue.cc @@ -18,7 +18,7 @@ #include #include "src/core/lib/event_engine/common_closures.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/event_engine/work_queue/basic_work_queue.h b/src/core/lib/event_engine/work_queue/basic_work_queue.h index 2aa843c638a61..93ac366831e95 100644 --- a/src/core/lib/event_engine/work_queue/basic_work_queue.h +++ b/src/core/lib/event_engine/work_queue/basic_work_queue.h @@ -24,7 +24,7 @@ #include #include "src/core/lib/event_engine/work_queue/work_queue.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/experiments/config.cc b/src/core/lib/experiments/config.cc index 52483218793ac..cab35e0f04a19 100644 --- a/src/core/lib/experiments/config.cc +++ b/src/core/lib/experiments/config.cc @@ -21,6 +21,7 @@ #include #include #include +#include #include "absl/functional/any_invocable.h" #include "absl/log/check.h" @@ -34,8 +35,8 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/crash.h" // IWYU pragma: keep +#include "src/core/util/no_destruct.h" #ifndef GRPC_EXPERIMENTS_ARE_FINAL namespace grpc_core { @@ -66,8 +67,8 @@ absl::AnyInvocable* g_check_constraints_cb = class TestExperiments { public: TestExperiments(const ExperimentMetadata* experiment_metadata, - size_t num_experiments) { - enabled_ = new bool[num_experiments]; + size_t num_experiments) + : enabled_(num_experiments) { for (size_t i = 0; i < num_experiments; i++) { if (g_check_constraints_cb != nullptr) { enabled_[i] = (*g_check_constraints_cb)(experiment_metadata[i]); @@ -91,12 +92,10 @@ class TestExperiments { } // Overloading [] operator to access elements in array style - bool operator[](int index) { return enabled_[index]; } - - ~TestExperiments() { delete enabled_; } + bool operator[](int index) const { return enabled_[index]; } private: - bool* enabled_; + std::vector enabled_; }; TestExperiments* g_test_experiments = nullptr; diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index fcedf4590e9de..7a6522410d7d2 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -83,6 +83,10 @@ const char* const additional_constraints_tcp_frame_size_tuning = "{}"; const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; +const char* const description_time_caching_in_party = + "Disable time caching in exec_ctx, and enable it only in a single party " + "execution."; +const char* const additional_constraints_time_caching_in_party = "{}"; const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; @@ -147,6 +151,8 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"time_caching_in_party", description_time_caching_in_party, + additional_constraints_time_caching_in_party, nullptr, 0, true, true}, {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, true, true}, {"unconstrained_max_quota_buffer_size", @@ -226,6 +232,10 @@ const char* const additional_constraints_tcp_frame_size_tuning = "{}"; const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; +const char* const description_time_caching_in_party = + "Disable time caching in exec_ctx, and enable it only in a single party " + "execution."; +const char* const additional_constraints_time_caching_in_party = "{}"; const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; @@ -290,6 +300,8 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"time_caching_in_party", description_time_caching_in_party, + additional_constraints_time_caching_in_party, nullptr, 0, true, true}, {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, true, true}, {"unconstrained_max_quota_buffer_size", @@ -369,6 +381,10 @@ const char* const additional_constraints_tcp_frame_size_tuning = "{}"; const char* const description_tcp_rcv_lowat = "Use SO_RCVLOWAT to avoid wakeups on the read path."; const char* const additional_constraints_tcp_rcv_lowat = "{}"; +const char* const description_time_caching_in_party = + "Disable time caching in exec_ctx, and enable it only in a single party " + "execution."; +const char* const additional_constraints_time_caching_in_party = "{}"; const char* const description_trace_record_callops = "Enables tracing of call batch initiation and completion."; const char* const additional_constraints_trace_record_callops = "{}"; @@ -433,6 +449,8 @@ const ExperimentMetadata g_experiment_metadata[] = { additional_constraints_tcp_frame_size_tuning, nullptr, 0, false, true}, {"tcp_rcv_lowat", description_tcp_rcv_lowat, additional_constraints_tcp_rcv_lowat, nullptr, 0, false, true}, + {"time_caching_in_party", description_time_caching_in_party, + additional_constraints_time_caching_in_party, nullptr, 0, true, true}, {"trace_record_callops", description_trace_record_callops, additional_constraints_trace_record_callops, nullptr, 0, true, true}, {"unconstrained_max_quota_buffer_size", diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index e982f58919c98..ca6c0734a81f0 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -79,6 +79,8 @@ inline bool IsScheduleCancellationOverWriteEnabled() { return false; } inline bool IsServerPrivacyEnabled() { return false; } inline bool IsTcpFrameSizeTuningEnabled() { return false; } inline bool IsTcpRcvLowatEnabled() { return false; } +#define GRPC_EXPERIMENT_IS_INCLUDED_TIME_CACHING_IN_PARTY +inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } @@ -112,6 +114,8 @@ inline bool IsScheduleCancellationOverWriteEnabled() { return false; } inline bool IsServerPrivacyEnabled() { return false; } inline bool IsTcpFrameSizeTuningEnabled() { return false; } inline bool IsTcpRcvLowatEnabled() { return false; } +#define GRPC_EXPERIMENT_IS_INCLUDED_TIME_CACHING_IN_PARTY +inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } @@ -144,6 +148,8 @@ inline bool IsScheduleCancellationOverWriteEnabled() { return false; } inline bool IsServerPrivacyEnabled() { return false; } inline bool IsTcpFrameSizeTuningEnabled() { return false; } inline bool IsTcpRcvLowatEnabled() { return false; } +#define GRPC_EXPERIMENT_IS_INCLUDED_TIME_CACHING_IN_PARTY +inline bool IsTimeCachingInPartyEnabled() { return true; } #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return true; } inline bool IsUnconstrainedMaxQuotaBufferSizeEnabled() { return false; } @@ -172,6 +178,7 @@ enum ExperimentIds { kExperimentIdServerPrivacy, kExperimentIdTcpFrameSizeTuning, kExperimentIdTcpRcvLowat, + kExperimentIdTimeCachingInParty, kExperimentIdTraceRecordCallops, kExperimentIdUnconstrainedMaxQuotaBufferSize, kExperimentIdWorkSerializerClearsTimeCache, @@ -250,6 +257,10 @@ inline bool IsTcpFrameSizeTuningEnabled() { inline bool IsTcpRcvLowatEnabled() { return IsExperimentEnabled(); } +#define GRPC_EXPERIMENT_IS_INCLUDED_TIME_CACHING_IN_PARTY +inline bool IsTimeCachingInPartyEnabled() { + return IsExperimentEnabled(); +} #define GRPC_EXPERIMENT_IS_INCLUDED_TRACE_RECORD_CALLOPS inline bool IsTraceRecordCallopsEnabled() { return IsExperimentEnabled(); diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index 4a1adc6501d94..ff4bf3869d438 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -42,7 +42,7 @@ # state of each experiment. - name: call_tracer_in_transport description: Transport directly passes byte counts to CallTracer. - expiry: 2024/09/30 + expiry: 2025/02/01 owner: roth@google.com test_tags: [] - name: canary_client_privacy @@ -61,25 +61,25 @@ allow_in_fuzzing_config: false - name: event_engine_application_callbacks description: Run application callbacks in EventEngine threads, instead of on the thread-local ApplicationCallbackExecCtx - expiry: 2024/10/31 + expiry: 2025/03/01 owner: hork@google.com - name: event_engine_client description: Use EventEngine clients instead of iomgr's grpc_tcp_client - expiry: 2024/10/01 + expiry: 2025/03/01 owner: hork@google.com test_tags: ["core_end2end_test", "event_engine_client_test"] uses_polling: true - name: event_engine_dns description: If set, use EventEngine DNSResolver for client channel resolution - expiry: 2024/10/01 + expiry: 2025/03/01 owner: yijiem@google.com test_tags: ["cancel_ares_query_test", "resolver_component_tests_runner_invoker"] allow_in_fuzzing_config: false uses_polling: true - name: event_engine_listener description: Use EventEngine listeners instead of iomgr's grpc_tcp_server - expiry: 2024/12/01 + expiry: 2025/03/01 owner: vigneshbabu@google.com test_tags: ["core_end2end_test", "event_engine_listener_test"] uses_polling: true @@ -150,6 +150,11 @@ expiry: 2024/12/01 owner: vigneshbabu@google.com test_tags: ["endpoint_test", "flow_control_test"] +- name: time_caching_in_party + description: Disable time caching in exec_ctx, and enable it only in a single party execution. + owner: ctiller@google.com + expiry: 2024/12/12 + test_tags: [] - name: trace_record_callops description: Enables tracing of call batch initiation and completion. expiry: 2024/12/01 diff --git a/src/core/lib/experiments/rollouts.yaml b/src/core/lib/experiments/rollouts.yaml index a19a98b45caa6..36ef43d8b4038 100644 --- a/src/core/lib/experiments/rollouts.yaml +++ b/src/core/lib/experiments/rollouts.yaml @@ -100,6 +100,8 @@ default: false - name: tcp_rcv_lowat default: false +- name: time_caching_in_party + default: true - name: trace_record_callops default: true - name: unconstrained_max_quota_buffer_size diff --git a/src/core/lib/gprpp/.clang-format b/src/core/lib/gprpp/.clang-format deleted file mode 100644 index 5f150ef6edb48..0000000000000 --- a/src/core/lib/gprpp/.clang-format +++ /dev/null @@ -1,50 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: Google -DerivePointerAlignment: false -PointerAlignment: Left -IncludeBlocks: Regroup -IncludeCategories: - # ruby.h is even more first if it's included - - Regex: '^' - Priority: -200 - # Some platforms (namely msys) need wchar to be included BEFORE - # anything else, especially strsafe.h. - - Regex: '^' - Priority: 5 - # use priority 100+ for grpc headers so they sort last - # 'system' headers - include things that have " in the names to make them - # stand out and get fixed - - Regex: '^(<|")grpc' - Priority: 100 - # similary using include/ to get system headers should stand out and get - # fixed - - Regex: '^"include/' - Priority: 100 - # source headers go last - - Regex: '^"(src|test)/' - Priority: 101 - # not-grpc headers follow - # first, non system headers that are included like <> - these are all - # local carveouts, and get sorted below c++ but before non grpc "" files - - Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' - Priority: 30 - # first C system headers - they have a . in the filename - - Regex: '^<.*\.' - Priority: 10 - # then C++ system headers - no ., the only thing that will match now - - Regex: '^<' - Priority: 20 - # finally other "" includes go between system headers and our headers - - Regex: '^"' - Priority: 40 ---- -Language: ObjC -BasedOnStyle: Google -ColumnLimit: 100 -ObjCBlockIndentWidth: 2 ---- -Language: Proto -BasedOnStyle: Google -ColumnLimit: 100 -... diff --git a/src/core/lib/gprpp/README.md b/src/core/lib/gprpp/README.md deleted file mode 100644 index f5b87481c0bc1..0000000000000 --- a/src/core/lib/gprpp/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# GPR++ - Google Portable Runtime for C++ - -The files in this directory contain various utility code for C++ code. -None of this code is gRPC-specific; anything here may also be useful -for other open source projects written in C++. - -Note that this is one of the few places in src/core where we allow -the use of portability macros. diff --git a/src/core/lib/gprpp/time.cc b/src/core/lib/gprpp/time.cc deleted file mode 100644 index db657a0880bac..0000000000000 --- a/src/core/lib/gprpp/time.cc +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2021 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "src/core/lib/gprpp/time.h" - -#include -#include -#include -#include -#include - -#include "absl/log/check.h" -#include "absl/log/log.h" -#include "absl/strings/str_format.h" - -#include -#include - -#include "src/core/lib/gprpp/no_destruct.h" - -// IWYU pragma: no_include - -namespace grpc_core { - -namespace { - -std::atomic g_process_epoch_seconds; -std::atomic g_process_epoch_cycles; - -class GprNowTimeSource final : public Timestamp::Source { - public: - Timestamp Now() override { - return Timestamp::FromTimespecRoundDown(gpr_now(GPR_CLOCK_MONOTONIC)); - } -}; - -GPR_ATTRIBUTE_NOINLINE std::pair InitTime() { - gpr_cycle_counter cycles_start = 0; - gpr_cycle_counter cycles_end = 0; - int64_t process_epoch_seconds = 0; - - // Check the current time... if we end up with zero, try again after 100ms. - // If it doesn't advance after sleeping for 2100ms, crash the process. - for (int i = 0; i < 21; i++) { - cycles_start = gpr_get_cycle_counter(); - gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); - cycles_end = gpr_get_cycle_counter(); - process_epoch_seconds = now.tv_sec; - if (process_epoch_seconds > 1) { - break; - } - LOG(INFO) << "gpr_now(GPR_CLOCK_MONOTONIC) returns a very small number: " - "sleeping for 100ms"; - gpr_sleep_until(gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN))); - } - - // Check time has increased past 1 second. - CHECK_GT(process_epoch_seconds, 1); - // Fake the epoch to always return >=1 second from our monotonic clock (to - // avoid bugs elsewhere) - process_epoch_seconds -= 1; - int64_t expected = 0; - gpr_cycle_counter process_epoch_cycles = (cycles_start + cycles_end) / 2; - CHECK_NE(process_epoch_cycles, 0); - if (!g_process_epoch_seconds.compare_exchange_strong( - expected, process_epoch_seconds, std::memory_order_relaxed, - std::memory_order_relaxed)) { - process_epoch_seconds = expected; - do { - process_epoch_cycles = - g_process_epoch_cycles.load(std::memory_order_relaxed); - } while (process_epoch_cycles == 0); - } else { - g_process_epoch_cycles.store(process_epoch_cycles, - std::memory_order_relaxed); - } - return std::make_pair(process_epoch_seconds, process_epoch_cycles); -} - -gpr_timespec StartTime() { - int64_t sec = g_process_epoch_seconds.load(std::memory_order_relaxed); - if (GPR_UNLIKELY(sec == 0)) sec = InitTime().first; - return {sec, 0, GPR_CLOCK_MONOTONIC}; -} - -gpr_cycle_counter StartCycleCounter() { - gpr_cycle_counter cycles = - g_process_epoch_cycles.load(std::memory_order_relaxed); - if (GPR_UNLIKELY(cycles == 0)) cycles = InitTime().second; - return cycles; -} - -gpr_timespec MillisecondsAsTimespec(int64_t millis, gpr_clock_type clock_type) { - // special-case infinities as Timestamp can be 32bit on some - // platforms while gpr_time_from_millis always takes an int64_t. - if (millis == std::numeric_limits::max()) { - return gpr_inf_future(clock_type); - } - if (millis == std::numeric_limits::min()) { - return gpr_inf_past(clock_type); - } - - if (clock_type == GPR_TIMESPAN) { - return gpr_time_from_millis(millis, GPR_TIMESPAN); - } - return gpr_time_add(gpr_convert_clock_type(StartTime(), clock_type), - gpr_time_from_millis(millis, GPR_TIMESPAN)); -} - -int64_t TimespanToMillisRoundUp(gpr_timespec ts) { - CHECK(ts.clock_type == GPR_TIMESPAN); - double x = GPR_MS_PER_SEC * static_cast(ts.tv_sec) + - static_cast(ts.tv_nsec) / GPR_NS_PER_MS + - static_cast(GPR_NS_PER_SEC - 1) / - static_cast(GPR_NS_PER_SEC); - if (x <= static_cast(std::numeric_limits::min())) { - return std::numeric_limits::min(); - } - if (x >= static_cast(std::numeric_limits::max())) { - return std::numeric_limits::max(); - } - return static_cast(x); -} - -int64_t TimespanToMillisRoundDown(gpr_timespec ts) { - CHECK(ts.clock_type == GPR_TIMESPAN); - double x = GPR_MS_PER_SEC * static_cast(ts.tv_sec) + - static_cast(ts.tv_nsec) / GPR_NS_PER_MS; - if (x <= static_cast(std::numeric_limits::min())) { - return std::numeric_limits::min(); - } - if (x >= static_cast(std::numeric_limits::max())) { - return std::numeric_limits::max(); - } - return static_cast(x); -} - -} // namespace - -thread_local Timestamp::Source* Timestamp::thread_local_time_source_{ - NoDestructSingleton::Get()}; - -Timestamp ScopedTimeCache::Now() { - if (!cached_time_.has_value()) { - previous()->InvalidateCache(); - cached_time_ = previous()->Now(); - } - return cached_time_.value(); -} - -Timestamp Timestamp::FromTimespecRoundUp(gpr_timespec ts) { - return FromMillisecondsAfterProcessEpoch(TimespanToMillisRoundUp(gpr_time_sub( - gpr_convert_clock_type(ts, GPR_CLOCK_MONOTONIC), StartTime()))); -} - -Timestamp Timestamp::FromTimespecRoundDown(gpr_timespec ts) { - return FromMillisecondsAfterProcessEpoch( - TimespanToMillisRoundDown(gpr_time_sub( - gpr_convert_clock_type(ts, GPR_CLOCK_MONOTONIC), StartTime()))); -} - -Timestamp Timestamp::FromCycleCounterRoundUp(gpr_cycle_counter c) { - return Timestamp::FromMillisecondsAfterProcessEpoch( - TimespanToMillisRoundUp(gpr_cycle_counter_sub(c, StartCycleCounter()))); -} - -Timestamp Timestamp::FromCycleCounterRoundDown(gpr_cycle_counter c) { - return Timestamp::FromMillisecondsAfterProcessEpoch( - TimespanToMillisRoundDown(gpr_cycle_counter_sub(c, StartCycleCounter()))); -} - -gpr_timespec Timestamp::as_timespec(gpr_clock_type clock_type) const { - return MillisecondsAsTimespec(millis_, clock_type); -} - -std::string Timestamp::ToString() const { - if (millis_ == std::numeric_limits::max()) { - return "@∞"; - } - if (millis_ == std::numeric_limits::min()) { - return "@-∞"; - } - return "@" + std::to_string(millis_) + "ms"; -} - -gpr_timespec Duration::as_timespec() const { - return MillisecondsAsTimespec(millis_, GPR_TIMESPAN); -} - -Duration Duration::FromTimespec(gpr_timespec t) { - return Duration::Milliseconds(TimespanToMillisRoundUp(t)); -} - -std::string Duration::ToString() const { - if (millis_ == std::numeric_limits::max()) { - return "∞"; - } - if (millis_ == std::numeric_limits::min()) { - return "-∞"; - } - return std::to_string(millis_) + "ms"; -} - -std::string Duration::ToJsonString() const { - gpr_timespec ts = as_timespec(); - return absl::StrFormat("%d.%09ds", ts.tv_sec, ts.tv_nsec); -} - -Duration::operator grpc_event_engine::experimental::EventEngine::Duration() - const { - return std::chrono::milliseconds( - Clamp(millis_, std::numeric_limits::min() / GPR_NS_PER_MS, - std::numeric_limits::max() / GPR_NS_PER_MS)); -} - -void TestOnlySetProcessEpoch(gpr_timespec epoch) { - g_process_epoch_seconds.store( - gpr_convert_clock_type(epoch, GPR_CLOCK_MONOTONIC).tv_sec); - g_process_epoch_cycles.store(gpr_get_cycle_counter()); -} - -std::ostream& operator<<(std::ostream& out, Timestamp timestamp) { - return out << timestamp.ToString(); -} - -std::ostream& operator<<(std::ostream& out, Duration duration) { - return out << duration.ToString(); -} - -} // namespace grpc_core diff --git a/src/core/lib/iomgr/buffer_list.cc b/src/core/lib/iomgr/buffer_list.cc index dd59b4e7d49d4..91bfc45a0210d 100644 --- a/src/core/lib/iomgr/buffer_list.cc +++ b/src/core/lib/iomgr/buffer_list.cc @@ -23,9 +23,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" #ifdef GRPC_LINUX_ERRQUEUE #include diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h index 9e57c818e1768..6805c53c08d8f 100644 --- a/src/core/lib/iomgr/buffer_list.h +++ b/src/core/lib/iomgr/buffer_list.h @@ -24,10 +24,10 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/internal_errqueue.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/iomgr/call_combiner.cc b/src/core/lib/iomgr/call_combiner.cc index 26bb7b881db9d..e20cc0a0986f5 100644 --- a/src/core/lib/iomgr/call_combiner.cc +++ b/src/core/lib/iomgr/call_combiner.cc @@ -25,9 +25,9 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/lib/iomgr/call_combiner.h b/src/core/lib/iomgr/call_combiner.h index 87ad024880f2f..23488f51cfc53 100644 --- a/src/core/lib/iomgr/call_combiner.h +++ b/src/core/lib/iomgr/call_combiner.h @@ -27,12 +27,12 @@ #include #include -#include "src/core/lib/gprpp/mpscq.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/dynamic_annotations.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/mpscq.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" // A simple, lock-free mechanism for serializing activity related to a // single call. This is similar to a combiner but is more lightweight. diff --git a/src/core/lib/iomgr/cfstream_handle.cc b/src/core/lib/iomgr/cfstream_handle.cc index 55604791a7bd0..e70393f6abdcc 100644 --- a/src/core/lib/iomgr/cfstream_handle.cc +++ b/src/core/lib/iomgr/cfstream_handle.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/memory.h" #ifdef GRPC_CFSTREAM #import diff --git a/src/core/lib/iomgr/cfstream_handle.h b/src/core/lib/iomgr/cfstream_handle.h index 7dd156de2e0a0..d373eadfd370f 100644 --- a/src/core/lib/iomgr/cfstream_handle.h +++ b/src/core/lib/iomgr/cfstream_handle.h @@ -29,9 +29,9 @@ #ifdef GRPC_CFSTREAM #import -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/lockfree_event.h" +#include "src/core/util/memory.h" class GrpcLibraryInitHolder { public: diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index 9f8a22493d317..cb08c23e7c792 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/mpscq.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/mpscq.h" struct grpc_closure; typedef struct grpc_closure grpc_closure; diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc index 56db07f562758..31f7b204af948 100644 --- a/src/core/lib/iomgr/combiner.cc +++ b/src/core/lib/iomgr/combiner.cc @@ -29,10 +29,10 @@ #include #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/mpscq.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/util/crash.h" +#include "src/core/util/mpscq.h" #define STATE_UNORPHANED 1 #define STATE_ELEM_COUNT_LOW_BIT 2 diff --git a/src/core/lib/iomgr/endpoint_pair_posix.cc b/src/core/lib/iomgr/endpoint_pair_posix.cc index 4043f9a812015..85fb3849f2954 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.cc +++ b/src/core/lib/iomgr/endpoint_pair_posix.cc @@ -36,12 +36,12 @@ #include #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/resource_quota/api.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" static void create_sockets(int sv[2]) { diff --git a/src/core/lib/iomgr/endpoint_pair_windows.cc b/src/core/lib/iomgr/endpoint_pair_windows.cc index 2fd37b4127ef4..f8a746624e67c 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.cc +++ b/src/core/lib/iomgr/endpoint_pair_windows.cc @@ -29,11 +29,11 @@ #include "absl/log/log.h" #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_windows.h" #include "src/core/lib/iomgr/tcp_windows.h" +#include "src/core/util/crash.h" static void create_sockets(SOCKET sv[2]) { SOCKET svr_sock = INVALID_SOCKET; diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc index d130383455910..d637ab6d20ccc 100644 --- a/src/core/lib/iomgr/error.cc +++ b/src/core/lib/iomgr/error.cc @@ -30,15 +30,15 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #ifdef GPR_WINDOWS #include #endif #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/strerror.h" #include "src/core/util/useful.h" absl::Status grpc_status_create(absl::StatusCode code, absl::string_view msg, diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index b31173121f2c6..e1fb98107c11d 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -31,10 +31,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/spinlock.h" +#include "src/core/util/status_helper.h" /// Opaque representation of an error. diff --git a/src/core/lib/iomgr/ev_apple.cc b/src/core/lib/iomgr/ev_apple.cc index 88f07921f3aaa..73ded9294d720 100644 --- a/src/core/lib/iomgr/ev_apple.cc +++ b/src/core/lib/iomgr/ev_apple.cc @@ -35,9 +35,9 @@ #include "absl/time/time.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time_util.h" #include "src/core/lib/iomgr/ev_apple.h" +#include "src/core/util/thd.h" +#include "src/core/util/time_util.h" #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker*)1) diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index c2c60e9663a4b..ff347ac69d627 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" // This polling engine is only relevant on linux kernels supporting epoll // epoll_create() or epoll_create1() @@ -47,8 +47,6 @@ #include #include -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/ev_epoll1_linux.h" #include "src/core/lib/iomgr/ev_posix.h" @@ -57,6 +55,8 @@ #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/strerror.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index a95adea7c856c..9e955d8c094ad 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -40,14 +40,14 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker*)1) diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc index 70ee372c4fdda..e195c940d87b3 100644 --- a/src/core/lib/iomgr/ev_posix.cc +++ b/src/core/lib/iomgr/ev_posix.cc @@ -34,11 +34,11 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/ev_epoll1_linux.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/internal_errqueue.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" /// Default poll() function - a pointer so that it can be overridden by some diff --git a/src/core/lib/iomgr/event_engine_shims/endpoint.cc b/src/core/lib/iomgr/event_engine_shims/endpoint.cc index 08fcbc6199761..28b1ef42bf1b1 100644 --- a/src/core/lib/iomgr/event_engine_shims/endpoint.cc +++ b/src/core/lib/iomgr/event_engine_shims/endpoint.cc @@ -36,9 +36,6 @@ #include "src/core/lib/event_engine/extensions/supports_fd.h" #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -47,7 +44,10 @@ #include "src/core/lib/iomgr/port.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/debug_location.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" namespace grpc_event_engine { namespace experimental { diff --git a/src/core/lib/iomgr/exec_ctx.cc b/src/core/lib/iomgr/exec_ctx.cc index 804ae6f64948d..6bb16390008a8 100644 --- a/src/core/lib/iomgr/exec_ctx.cc +++ b/src/core/lib/iomgr/exec_ctx.cc @@ -25,9 +25,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" static void exec_ctx_run(grpc_closure* closure) { #ifndef NDEBUG diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index ce41e5b92b338..0bda1d9af88d9 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -35,12 +35,12 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/experiments/experiments.h" #include "src/core/lib/iomgr/closure.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/fork.h" #include "src/core/util/latent_see.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" #if !defined(_WIN32) || !defined(_DLL) @@ -116,6 +116,11 @@ class GRPC_DLL ExecCtx : public latent_see::ParentScope { ExecCtx() : latent_see::ParentScope(GRPC_LATENT_SEE_METADATA("ExecCtx")), flags_(GRPC_EXEC_CTX_FLAG_IS_FINISHED) { +#if !TARGET_OS_IPHONE + if (!IsTimeCachingInPartyEnabled()) { + time_cache_.emplace(); + } +#endif Fork::IncExecCtxCount(); Set(this); } @@ -126,6 +131,11 @@ class GRPC_DLL ExecCtx : public latent_see::ParentScope { explicit ExecCtx(uintptr_t fl, latent_see::Metadata* latent_see_metadata) : latent_see::ParentScope(latent_see_metadata), flags_(fl) { +#if !TARGET_OS_IPHONE + if (!IsTimeCachingInPartyEnabled()) { + time_cache_.emplace(); + } +#endif if (!(GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD & flags_)) { Fork::IncExecCtxCount(); } @@ -195,23 +205,18 @@ class GRPC_DLL ExecCtx : public latent_see::ParentScope { Timestamp Now() { return Timestamp::Now(); } void InvalidateNow() { -#if !TARGET_OS_IPHONE - time_cache_.InvalidateCache(); -#endif + if (time_cache_.has_value()) time_cache_->InvalidateCache(); } void SetNowIomgrShutdown() { -#if !TARGET_OS_IPHONE // We get to do a test only set now on this path just because iomgr // is getting removed and no point adding more interfaces for it. - time_cache_.TestOnlySetNow(Timestamp::InfFuture()); -#endif + TestOnlySetNow(Timestamp::InfFuture()); } void TestOnlySetNow(Timestamp now) { -#if !TARGET_OS_IPHONE - time_cache_.TestOnlySetNow(now); -#endif + if (!time_cache_.has_value()) time_cache_.emplace(); + time_cache_->TestOnlySetNow(now); } /// Gets pointer to current exec_ctx. @@ -237,9 +242,7 @@ class GRPC_DLL ExecCtx : public latent_see::ParentScope { CombinerData combiner_data_ = {nullptr, nullptr}; uintptr_t flags_; -#if !TARGET_OS_IPHONE - ScopedTimeCache time_cache_; -#endif + absl::optional time_cache_; #if !defined(_WIN32) || !defined(_DLL) static thread_local ExecCtx* exec_ctx_; diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc index 02f21cf796b22..9c427b6fd126b 100644 --- a/src/core/lib/iomgr/executor.cc +++ b/src/core/lib/iomgr/executor.cc @@ -30,10 +30,10 @@ #include #include "src/core/lib/debug/trace_impl.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" #include "src/core/util/useful.h" #define MAX_DEPTH 2 diff --git a/src/core/lib/iomgr/executor.h b/src/core/lib/iomgr/executor.h index e20f2f0242e18..b029fd503d33b 100644 --- a/src/core/lib/iomgr/executor.h +++ b/src/core/lib/iomgr/executor.h @@ -21,9 +21,9 @@ #include -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/util/spinlock.h" +#include "src/core/util/thd.h" namespace grpc_core { diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc index 91f94755fb727..37059aaa815cd 100644 --- a/src/core/lib/iomgr/fork_posix.cc +++ b/src/core/lib/iomgr/fork_posix.cc @@ -33,14 +33,14 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/lib/surface/init_internally.h" +#include "src/core/util/crash.h" +#include "src/core/util/fork.h" +#include "src/core/util/thd.h" // // NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK diff --git a/src/core/lib/iomgr/internal_errqueue.cc b/src/core/lib/iomgr/internal_errqueue.cc index dbf001b4cc6d7..65199cd8e352f 100644 --- a/src/core/lib/iomgr/internal_errqueue.cc +++ b/src/core/lib/iomgr/internal_errqueue.cc @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" namespace grpc_core { diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc index bc931a4f44b37..51eae975fbc91 100644 --- a/src/core/lib/iomgr/iocp_windows.cc +++ b/src/core/lib/iomgr/iocp_windows.cc @@ -32,14 +32,14 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/socket_windows.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" static ULONG g_iocp_kick_token; static OVERLAPPED g_iocp_custom_overlap; diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index 1687880a0f7bb..a4fce10be3416 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -30,8 +30,6 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/buffer_list.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" @@ -39,7 +37,9 @@ #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" static gpr_mu g_mu; diff --git a/src/core/lib/iomgr/iomgr_windows.cc b/src/core/lib/iomgr/iomgr_windows.cc index ae35534186ffe..fe1d24a349279 100644 --- a/src/core/lib/iomgr/iomgr_windows.cc +++ b/src/core/lib/iomgr/iomgr_windows.cc @@ -25,7 +25,6 @@ #include "absl/log/check.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset_windows.h" @@ -36,6 +35,7 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/crash.h" extern grpc_tcp_server_vtable grpc_windows_tcp_server_vtable; extern grpc_tcp_server_vtable grpc_windows_event_engine_tcp_server_vtable; diff --git a/src/core/lib/iomgr/lockfree_event.cc b/src/core/lib/iomgr/lockfree_event.cc index 51e46ab9764d2..53700d13749d6 100644 --- a/src/core/lib/iomgr/lockfree_event.cc +++ b/src/core/lib/iomgr/lockfree_event.cc @@ -24,8 +24,8 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/crash.h" // 'state' holds the to call when the fd is readable or writable respectively. // It can contain one of the following values: diff --git a/src/core/lib/iomgr/polling_entity.cc b/src/core/lib/iomgr/polling_entity.cc index 2a3e9c7706092..918af4a7f6504 100644 --- a/src/core/lib/iomgr/polling_entity.cc +++ b/src/core/lib/iomgr/polling_entity.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set* pollset_set) { diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc index 32925c61a9336..28931294f3c4f 100644 --- a/src/core/lib/iomgr/pollset_windows.cc +++ b/src/core/lib/iomgr/pollset_windows.cc @@ -22,12 +22,12 @@ #ifdef GRPC_WINSOCK_SOCKET -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_windows.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker*)1) diff --git a/src/core/lib/iomgr/resolve_address.cc b/src/core/lib/iomgr/resolve_address.cc index db7b891bcc799..a6130701fec8c 100644 --- a/src/core/lib/iomgr/resolve_address.cc +++ b/src/core/lib/iomgr/resolve_address.cc @@ -23,8 +23,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/crash.h" +#include "src/core/util/no_destruct.h" namespace grpc_core { const char* kDefaultSecurePort = "https"; diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index c63118c053fb9..c8c94b00c0b67 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -28,11 +28,11 @@ #include #include "src/core/lib/event_engine/handle_containers.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/time.h" #define GRPC_MAX_SOCKADDR_SIZE 128 diff --git a/src/core/lib/iomgr/resolve_address_posix.cc b/src/core/lib/iomgr/resolve_address_posix.cc index f890a349b9749..0dd2e44957517 100644 --- a/src/core/lib/iomgr/resolve_address_posix.cc +++ b/src/core/lib/iomgr/resolve_address_posix.cc @@ -29,9 +29,6 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" @@ -41,7 +38,10 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" namespace grpc_core { @@ -106,7 +106,7 @@ NativeDNSResolver::LookupHostnameBlocking(absl::string_view name, SplitHostPort(name, &host, &port); if (host.empty()) { err = - GRPC_ERROR_CREATE(absl::StrCat("unparseable host:port \"", name, "\"")); + GRPC_ERROR_CREATE(absl::StrCat("unparsable host:port \"", name, "\"")); goto done; } if (port.empty()) { diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc index 105dcc8574455..9db5b6899544b 100644 --- a/src/core/lib/iomgr/resolve_address_windows.cc +++ b/src/core/lib/iomgr/resolve_address_windows.cc @@ -34,9 +34,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/block_annotate.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" @@ -45,7 +42,10 @@ #include "src/core/lib/iomgr/resolve_address_windows.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" namespace grpc_core { namespace { @@ -110,7 +110,7 @@ NativeDNSResolver::LookupHostnameBlocking(absl::string_view name, SplitHostPort(name, &host, &port); if (host.empty()) { error = - GRPC_ERROR_CREATE(absl::StrFormat("unparseable host:port: '%s'", name)); + GRPC_ERROR_CREATE(absl::StrFormat("unparsable host:port: '%s'", name)); goto done; } if (port.empty()) { diff --git a/src/core/lib/iomgr/sockaddr_utils_posix.cc b/src/core/lib/iomgr/sockaddr_utils_posix.cc index 62d5bcac84dcc..8fc4d5a186e9d 100644 --- a/src/core/lib/iomgr/sockaddr_utils_posix.cc +++ b/src/core/lib/iomgr/sockaddr_utils_posix.cc @@ -42,8 +42,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/util/crash.h" uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); } diff --git a/src/core/lib/iomgr/socket_mutator.cc b/src/core/lib/iomgr/socket_mutator.cc index f77661969cef6..d2afe272f1206 100644 --- a/src/core/lib/iomgr/socket_mutator.cc +++ b/src/core/lib/iomgr/socket_mutator.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" void grpc_socket_mutator_init(grpc_socket_mutator* mutator, diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index 19c6ccab152df..49b1c34979569 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -52,9 +52,9 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" #include "src/core/util/string.h" // set a socket to use zerocopy diff --git a/src/core/lib/iomgr/socket_utils_linux.cc b/src/core/lib/iomgr/socket_utils_linux.cc index d699a1d5fe5cc..27e0b53fb86c3 100644 --- a/src/core/lib/iomgr/socket_utils_linux.cc +++ b/src/core/lib/iomgr/socket_utils_linux.cc @@ -25,9 +25,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/crash.h" int grpc_accept4(int sockfd, grpc_resolved_address* resolved_addr, int nonblock, int cloexec) { diff --git a/src/core/lib/iomgr/socket_utils_posix.cc b/src/core/lib/iomgr/socket_utils_posix.cc index 88b5d9a6bcfa8..ebd2d5860695b 100644 --- a/src/core/lib/iomgr/socket_utils_posix.cc +++ b/src/core/lib/iomgr/socket_utils_posix.cc @@ -29,16 +29,16 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/crash.h" #endif #ifdef GRPC_POSIX_SOCKET_TCP #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/strerror.h" using ::grpc_event_engine::experimental::EndpointConfig; diff --git a/src/core/lib/iomgr/socket_utils_windows.cc b/src/core/lib/iomgr/socket_utils_windows.cc index 195a838598b1f..eb7e91f76a7c4 100644 --- a/src/core/lib/iomgr/socket_utils_windows.cc +++ b/src/core/lib/iomgr/socket_utils_windows.cc @@ -22,9 +22,9 @@ #ifdef GRPC_WINDOWS_SOCKETUTILS -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" +#include "src/core/util/crash.h" uint16_t grpc_htons(uint16_t hostshort) { return htons(hostshort); } diff --git a/src/core/lib/iomgr/socket_windows.cc b/src/core/lib/iomgr/socket_windows.cc index e7a8b1e5fdd24..6ace1af6bc405 100644 --- a/src/core/lib/iomgr/socket_windows.cc +++ b/src/core/lib/iomgr/socket_windows.cc @@ -34,13 +34,13 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_windows.h" #include "src/core/lib/iomgr/sockaddr_windows.h" #include "src/core/lib/iomgr/socket_windows.h" +#include "src/core/util/crash.h" static DWORD s_wsa_socket_flags; diff --git a/src/core/lib/iomgr/tcp_client_cfstream.cc b/src/core/lib/iomgr/tcp_client_cfstream.cc index f3228ad20ca38..c091737b96c66 100644 --- a/src/core/lib/iomgr/tcp_client_cfstream.cc +++ b/src/core/lib/iomgr/tcp_client_cfstream.cc @@ -35,8 +35,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/cfstream_handle.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint_cfstream.h" @@ -45,6 +43,8 @@ #include "src/core/lib/iomgr/event_engine_shims/tcp_client.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" struct CFStreamConnect { gpr_mu mu; diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc index b0d983df9b64b..a66807cf11145 100644 --- a/src/core/lib/iomgr/tcp_client_posix.cc +++ b/src/core/lib/iomgr/tcp_client_posix.cc @@ -39,7 +39,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/resolved_address_internal.h" #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/event_engine_shims/tcp_client.h" #include "src/core/lib/iomgr/executor.h" @@ -53,6 +52,7 @@ #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/iomgr/vsock.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" using ::grpc_event_engine::experimental::EndpointConfig; diff --git a/src/core/lib/iomgr/tcp_client_windows.cc b/src/core/lib/iomgr/tcp_client_windows.cc index 4086d45a5771c..c19e81d8131b8 100644 --- a/src/core/lib/iomgr/tcp_client_windows.cc +++ b/src/core/lib/iomgr/tcp_client_windows.cc @@ -33,7 +33,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/event_engine_shims/tcp_client.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr.h" @@ -44,6 +43,7 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" using ::grpc_event_engine::experimental::EndpointConfig; diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 37e409d123572..a53d983db33fe 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -55,13 +55,8 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/debug/event_log.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/buffer_list.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" @@ -74,7 +69,12 @@ #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/event_log.h" +#include "src/core/util/strerror.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #ifndef SOL_TCP diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc index a45a0c8e32f7e..fdd3d96c63e18 100644 --- a/src/core/lib/iomgr/tcp_server_posix.cc +++ b/src/core/lib/iomgr/tcp_server_posix.cc @@ -62,7 +62,6 @@ #include "src/core/lib/event_engine/query_extensions.h" #include "src/core/lib/event_engine/resolved_address_internal.h" #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/event_engine_shims/closure.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -76,6 +75,7 @@ #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/iomgr/vsock.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/strerror.h" static std::atomic num_dropped_connections{0}; static constexpr grpc_core::Duration kRetryAcceptWaitTime{ diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index ab2e73fb999fa..7ec1452500242 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -39,12 +39,12 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_server_utils_posix.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/iomgr/vsock.h" +#include "src/core/util/crash.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc index ff80141ef8de6..89c69d8beb263 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc @@ -37,10 +37,10 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_server_utils_posix.h" +#include "src/core/util/crash.h" // Return the listener in s with address addr or NULL. static grpc_tcp_listener* find_listener_with_addr(grpc_tcp_server* s, diff --git a/src/core/lib/iomgr/tcp_server_windows.cc b/src/core/lib/iomgr/tcp_server_windows.cc index 1e0bb260c46a3..ed32fcb25b0bb 100644 --- a/src/core/lib/iomgr/tcp_server_windows.cc +++ b/src/core/lib/iomgr/tcp_server_windows.cc @@ -46,7 +46,6 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/windows/windows_engine.h" #include "src/core/lib/event_engine/windows/windows_listener.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/event_engine_shims/closure.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" @@ -60,6 +59,7 @@ #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 diff --git a/src/core/lib/iomgr/tcp_windows.cc b/src/core/lib/iomgr/tcp_windows.cc index b94ffcfe91275..9574531c57df3 100644 --- a/src/core/lib/iomgr/tcp_windows.cc +++ b/src/core/lib/iomgr/tcp_windows.cc @@ -32,7 +32,6 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_windows.h" @@ -42,6 +41,7 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc index 7b1c9d205c266..4d940942c473e 100644 --- a/src/core/lib/iomgr/timer_generic.cc +++ b/src/core/lib/iomgr/timer_generic.cc @@ -31,15 +31,15 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/time_averaged_stats.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_heap.h" +#include "src/core/util/crash.h" +#include "src/core/util/manual_constructor.h" #include "src/core/util/spinlock.h" +#include "src/core/util/time.h" +#include "src/core/util/time_averaged_stats.h" #include "src/core/util/useful.h" #define INVALID_HEAP_INDEX 0xffffffffu diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 312ed68a025b3..5d2015ef50c44 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -27,9 +27,9 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" struct completed_thread { grpc_core::Thread thd; diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index 904cb10faa2e8..01a18602ff618 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -39,10 +39,10 @@ #include #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" void grpc_create_socketpair_if_unix(int sv[2]) { diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.cc b/src/core/lib/iomgr/unix_sockets_posix_noop.cc index 1f9038e953773..ca5086d9f70d6 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.cc +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.cc @@ -26,8 +26,6 @@ #include "absl/log/check.h" -#include "src/core/lib/gprpp/crash.h" - void grpc_create_socketpair_if_unix(int /* sv */[2]) { // TODO: Either implement this for the non-Unix socket case or make // sure that it is never called in any such case. Until then, leave an diff --git a/src/core/lib/iomgr/vsock.cc b/src/core/lib/iomgr/vsock.cc index c6dc71a84308f..45a769998bfce 100644 --- a/src/core/lib/iomgr/vsock.cc +++ b/src/core/lib/iomgr/vsock.cc @@ -30,9 +30,9 @@ #include #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" absl::StatusOr> grpc_resolve_vsock_address( diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.cc b/src/core/lib/iomgr/wakeup_fd_eventfd.cc index fcdb63b2e5bc5..cf2ee410c0203 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.cc +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.cc @@ -26,9 +26,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" static grpc_error_handle eventfd_create(grpc_wakeup_fd* fd_info) { fd_info->read_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.cc b/src/core/lib/iomgr/wakeup_fd_pipe.cc index 65bcc8589f70a..e2640d263c9d4 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.cc +++ b/src/core/lib/iomgr/wakeup_fd_pipe.cc @@ -28,11 +28,11 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/wakeup_fd_pipe.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" static grpc_error_handle pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; diff --git a/src/core/lib/promise/activity.cc b/src/core/lib/promise/activity.cc index 614e343bc8f94..7f495ddb1b30d 100644 --- a/src/core/lib/promise/activity.cc +++ b/src/core/lib/promise/activity.cc @@ -25,7 +25,7 @@ #include -#include "src/core/lib/gprpp/atomic_utils.h" +#include "src/core/util/atomic_utils.h" namespace grpc_core { diff --git a/src/core/lib/promise/activity.h b/src/core/lib/promise/activity.h index 55738c0899564..b84fc473b6249 100644 --- a/src/core/lib/promise/activity.h +++ b/src/core/lib/promise/activity.h @@ -32,16 +32,16 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/status.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/dump_args.h" #include "src/core/util/latent_see.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/sync.h" namespace grpc_core { @@ -368,8 +368,8 @@ class FreestandingActivity : public Activity, private Wakeable { // If more than one action is received during a run, we use max() to resolve // which one to report (so Cancel overrides Wakeup). enum class ActionDuringRun : uint8_t { - kNone, // No action occured during run. - kWakeup, // A wakeup occured during run. + kNone, // No action occurred during run. + kWakeup, // A wakeup occurred during run. kCancel, // Cancel was called during run. }; @@ -389,7 +389,7 @@ class FreestandingActivity : public Activity, private Wakeable { // completed. void WakeupComplete() { Unref(); } - // Set the action that occured during this run. + // Set the action that occurred during this run. // We use max to combine actions so that cancellation overrides wakeups. void SetActionDuringRun(ActionDuringRun action) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { diff --git a/src/core/lib/promise/arena_promise.h b/src/core/lib/promise/arena_promise.h index 287d1c650f34b..7f4bb0de56325 100644 --- a/src/core/lib/promise/arena_promise.h +++ b/src/core/lib/promise/arena_promise.h @@ -26,10 +26,10 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/context.h b/src/core/lib/promise/context.h index 61520707d297f..c720dfe35b150 100644 --- a/src/core/lib/promise/context.h +++ b/src/core/lib/promise/context.h @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/down_cast.h" +#include "src/core/util/down_cast.h" namespace grpc_core { diff --git a/src/core/lib/promise/detail/basic_seq.h b/src/core/lib/promise/detail/basic_seq.h index 5f4199e5df385..d48dcd61505c8 100644 --- a/src/core/lib/promise/detail/basic_seq.h +++ b/src/core/lib/promise/detail/basic_seq.h @@ -17,8 +17,8 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { namespace promise_detail { diff --git a/src/core/lib/promise/detail/join_state.h b/src/core/lib/promise/detail/join_state.h index 403ec38b067b8..032f6b304f0a3 100644 --- a/src/core/lib/promise/detail/join_state.h +++ b/src/core/lib/promise/detail/join_state.h @@ -27,10 +27,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/bitset.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { namespace promise_detail { diff --git a/src/core/lib/promise/detail/seq_state.h b/src/core/lib/promise/detail/seq_state.h index 245b8ac26f6e3..47810f19141ea 100644 --- a/src/core/lib/promise/detail/seq_state.h +++ b/src/core/lib/promise/detail/seq_state.h @@ -29,11 +29,11 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/debug_location.h" // A sequence under some traits for some set of callables P, Fs. // P should be a promise-like object that yields a value. diff --git a/src/core/lib/promise/exec_ctx_wakeup_scheduler.h b/src/core/lib/promise/exec_ctx_wakeup_scheduler.h index 865381f76b0d2..cc36e1ff74734 100644 --- a/src/core/lib/promise/exec_ctx_wakeup_scheduler.h +++ b/src/core/lib/promise/exec_ctx_wakeup_scheduler.h @@ -19,10 +19,10 @@ #include -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/lib/promise/for_each.h b/src/core/lib/promise/for_each.h index 60eb19b713ada..5fcaf0094a03f 100644 --- a/src/core/lib/promise/for_each.h +++ b/src/core/lib/promise/for_each.h @@ -28,12 +28,12 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/status.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/status_flag.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/if.h b/src/core/lib/promise/if.h index ed50744b40fc4..d75aec9a5ffc8 100644 --- a/src/core/lib/promise/if.h +++ b/src/core/lib/promise/if.h @@ -23,10 +23,10 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/inter_activity_latch.h b/src/core/lib/promise/inter_activity_latch.h index 38ef2a0aa4e81..c5e8962650597 100644 --- a/src/core/lib/promise/inter_activity_latch.h +++ b/src/core/lib/promise/inter_activity_latch.h @@ -26,10 +26,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/wait_set.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/promise/inter_activity_pipe.h b/src/core/lib/promise/inter_activity_pipe.h index e03901b76ce83..f6a2144dadb08 100644 --- a/src/core/lib/promise/inter_activity_pipe.h +++ b/src/core/lib/promise/inter_activity_pipe.h @@ -25,11 +25,11 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/promise/interceptor_list.h b/src/core/lib/promise/interceptor_list.h index dc9b63d3f8cca..d75e64528921c 100644 --- a/src/core/lib/promise/interceptor_list.h +++ b/src/core/lib/promise/interceptor_list.h @@ -30,12 +30,12 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/lib/promise/loop.h b/src/core/lib/promise/loop.h index acfabce2e7f6f..a7e4195cdeaeb 100644 --- a/src/core/lib/promise/loop.h +++ b/src/core/lib/promise/loop.h @@ -23,9 +23,9 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/mpsc.h b/src/core/lib/promise/mpsc.h index 4df3e61a512a9..02c8d2f97a458 100644 --- a/src/core/lib/promise/mpsc.h +++ b/src/core/lib/promise/mpsc.h @@ -28,12 +28,12 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/wait_set.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" // Multi producer single consumer inter-activity comms. diff --git a/src/core/lib/promise/observable.h b/src/core/lib/promise/observable.h index 9337feace3f40..0f500d66317fa 100644 --- a/src/core/lib/promise/observable.h +++ b/src/core/lib/promise/observable.h @@ -21,9 +21,9 @@ #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/promise/party.cc b/src/core/lib/promise/party.cc index c8bde2d198f79..cfc34ebedeeda 100644 --- a/src/core/lib/promise/party.cc +++ b/src/core/lib/promise/party.cc @@ -25,14 +25,14 @@ #include #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/util/latent_see.h" +#include "src/core/util/sync.h" #ifdef GRPC_MAXIMIZE_THREADYNESS -#include "src/core/lib/gprpp/thd.h" // IWYU pragma: keep #include "src/core/lib/iomgr/exec_ctx.h" // IWYU pragma: keep +#include "src/core/util/thd.h" // IWYU pragma: keep #endif namespace grpc_core { @@ -41,18 +41,18 @@ namespace grpc_core { // PartySyncUsingAtomics GRPC_MUST_USE_RESULT bool Party::RefIfNonZero() { - auto count = state_.load(std::memory_order_relaxed); + auto state = state_.load(std::memory_order_relaxed); do { // If zero, we are done (without an increment). If not, we must do a CAS // to maintain the contract: do not increment the counter if it is already // zero - if (count == 0) { + if ((state & kRefMask) == 0) { return false; } - } while (!state_.compare_exchange_weak(count, count + kOneRef, + } while (!state_.compare_exchange_weak(state, state + kOneRef, std::memory_order_acq_rel, std::memory_order_relaxed)); - LogStateChange("RefIfNonZero", count, count + kOneRef); + LogStateChange("RefIfNonZero", state, state + kOneRef); return true; } @@ -269,6 +269,12 @@ void Party::RunPartyAndUnref(uint64_t prev_state) { DCHECK_EQ(prev_state & ~(kRefMask | kAllocatedMask), 0u) << "Party should have contained no wakeups on lock"; prev_state |= kLocked; + absl::optional time_cache; +#if !TARGET_OS_IPHONE + if (IsTimeCachingInPartyEnabled()) { + time_cache.emplace(); + } +#endif for (;;) { uint64_t keep_allocated_mask = kAllocatedMask; // For each wakeup bit... @@ -316,7 +322,7 @@ void Party::RunPartyAndUnref(uint64_t prev_state) { (prev_state & (kRefMask | keep_allocated_mask)) - kOneRef, std::memory_order_acq_rel, std::memory_order_acquire)) { LogStateChange("Run:End", prev_state, - prev_state & (kRefMask | kAllocatedMask) - kOneRef); + (prev_state & (kRefMask | keep_allocated_mask)) - kOneRef); if ((prev_state & kRefMask) == kOneRef) { // We're done with the party. PartyIsOver(); diff --git a/src/core/lib/promise/party.h b/src/core/lib/promise/party.h index b42c392d51f12..a38467a924beb 100644 --- a/src/core/lib/promise/party.h +++ b/src/core/lib/promise/party.h @@ -32,16 +32,16 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" namespace grpc_core { @@ -394,7 +394,7 @@ class Party : public Activity, private Wakeable { const char* op, uint64_t prev_state, uint64_t new_state, DebugLocation loc = {}) { GRPC_TRACE_LOG(party_state, INFO).AtLocation(loc.file(), loc.line()) - << DebugTag() << " " << op << " " + << this << " " << op << " " << absl::StrFormat("%016" PRIx64 " -> %016" PRIx64, prev_state, new_state); } diff --git a/src/core/lib/promise/pipe.h b/src/core/lib/promise/pipe.h index 59ec003f47de8..f3dac4532afa5 100644 --- a/src/core/lib/promise/pipe.h +++ b/src/core/lib/promise/pipe.h @@ -30,8 +30,6 @@ #include -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/if.h" @@ -40,6 +38,8 @@ #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/promise/poll.h b/src/core/lib/promise/poll.h index 36570a56fbc85..9b895cea032de 100644 --- a/src/core/lib/promise/poll.h +++ b/src/core/lib/promise/poll.h @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/construct_destruct.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/promise/seq.h b/src/core/lib/promise/seq.h index d25a8caefbc6b..40051ae493960 100644 --- a/src/core/lib/promise/seq.h +++ b/src/core/lib/promise/seq.h @@ -21,11 +21,11 @@ #include -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/promise/detail/basic_seq.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/detail/seq_state.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/lib/promise/sleep.cc b/src/core/lib/promise/sleep.cc index 1b793367149b4..d31e2a8259569 100644 --- a/src/core/lib/promise/sleep.cc +++ b/src/core/lib/promise/sleep.cc @@ -20,11 +20,11 @@ #include #include "src/core/lib/event_engine/event_engine_context.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/promise/sleep.h b/src/core/lib/promise/sleep.h index b595b7100e33e..0ae4232d7b741 100644 --- a/src/core/lib/promise/sleep.h +++ b/src/core/lib/promise/sleep.h @@ -23,9 +23,9 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/promise/wait_for_callback.h b/src/core/lib/promise/wait_for_callback.h index 519253bbb24b7..6aabfe57970bf 100644 --- a/src/core/lib/promise/wait_for_callback.h +++ b/src/core/lib/promise/wait_for_callback.h @@ -22,9 +22,9 @@ #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/api.cc b/src/core/lib/resource_quota/api.cc index 7e2f9594e65d2..113685e08f49d 100644 --- a/src/core/lib/resource_quota/api.cc +++ b/src/core/lib/resource_quota/api.cc @@ -28,11 +28,11 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/resource_quota/thread_quota.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/arena.h b/src/core/lib/resource_quota/arena.h index c80528fa39f3c..fd962df93a859 100644 --- a/src/core/lib/resource_quota/arena.h +++ b/src/core/lib/resource_quota/arena.h @@ -35,10 +35,10 @@ #include #include -#include "src/core/lib/gprpp/construct_destruct.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/util/alloc.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/connection_quota.h b/src/core/lib/resource_quota/connection_quota.h index fcaddc1b58a72..ac0aa6cdb292d 100644 --- a/src/core/lib/resource_quota/connection_quota.h +++ b/src/core/lib/resource_quota/connection_quota.h @@ -22,10 +22,10 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/memory_quota.cc b/src/core/lib/resource_quota/memory_quota.cc index 29b3a581a92b8..ee785e62adfd9 100644 --- a/src/core/lib/resource_quota/memory_quota.cc +++ b/src/core/lib/resource_quota/memory_quota.cc @@ -35,13 +35,13 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/mpscq.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/loop.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/race.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/slice/slice_refcount.h" +#include "src/core/util/mpscq.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/memory_quota.h b/src/core/lib/resource_quota/memory_quota.h index f1281cc5bac68..39c7d83a48afd 100644 --- a/src/core/lib/resource_quota/memory_quota.h +++ b/src/core/lib/resource_quota/memory_quota.h @@ -39,13 +39,13 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/periodic_update.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/periodic_update.cc b/src/core/lib/resource_quota/periodic_update.cc index b4874fea1da32..b7f9e9b9c0357 100644 --- a/src/core/lib/resource_quota/periodic_update.cc +++ b/src/core/lib/resource_quota/periodic_update.cc @@ -68,8 +68,8 @@ bool PeriodicUpdate::MaybeEndPeriod(absl::FunctionRef f) { expected_updates_per_period_ = period_.seconds() * expected_updates_per_period_ / time_so_far.seconds(); if (expected_updates_per_period_ < 1) expected_updates_per_period_ = 1; - period_start_ = now; f(time_so_far); + period_start_ = Timestamp::Now(); updates_remaining_.store(expected_updates_per_period_, std::memory_order_release); return true; diff --git a/src/core/lib/resource_quota/periodic_update.h b/src/core/lib/resource_quota/periodic_update.h index 4104c94a78b40..7a91510ef7790 100644 --- a/src/core/lib/resource_quota/periodic_update.h +++ b/src/core/lib/resource_quota/periodic_update.h @@ -23,7 +23,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/resource_quota.h b/src/core/lib/resource_quota/resource_quota.h index e17448f14eba5..0704a162eef74 100644 --- a/src/core/lib/resource_quota/resource_quota.h +++ b/src/core/lib/resource_quota/resource_quota.h @@ -24,11 +24,11 @@ #include #include -#include "src/core/lib/gprpp/cpp_impl_of.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/thread_quota.h" +#include "src/core/util/cpp_impl_of.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/resource_quota/thread_quota.h b/src/core/lib/resource_quota/thread_quota.h index d66ee574c0267..965436f20dff8 100644 --- a/src/core/lib/resource_quota/thread_quota.h +++ b/src/core/lib/resource_quota/thread_quota.h @@ -22,9 +22,9 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/audit_logging.cc b/src/core/lib/security/authorization/audit_logging.cc index d5c8f95705e7b..2f8ac055c1c67 100644 --- a/src/core/lib/security/authorization/audit_logging.cc +++ b/src/core/lib/security/authorization/audit_logging.cc @@ -32,8 +32,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/security/authorization/stdout_logger.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/authorization/audit_logging.h b/src/core/lib/security/authorization/audit_logging.h index 694810599cf8e..1f97120cd6044 100644 --- a/src/core/lib/security/authorization/audit_logging.h +++ b/src/core/lib/security/authorization/audit_logging.h @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/authorization/authorization_engine.h b/src/core/lib/security/authorization/authorization_engine.h index 37486cef42077..4dca42bea857b 100644 --- a/src/core/lib/security/authorization/authorization_engine.h +++ b/src/core/lib/security/authorization/authorization_engine.h @@ -19,8 +19,8 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/security/authorization/evaluate_args.h" +#include "src/core/util/ref_counted.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/authorization_policy_provider.h b/src/core/lib/security/authorization/authorization_policy_provider.h index a4dbc5e8a0882..6dfdc8fb875ac 100644 --- a/src/core/lib/security/authorization/authorization_policy_provider.h +++ b/src/core/lib/security/authorization/authorization_policy_provider.h @@ -21,9 +21,9 @@ #include #include -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/authorization/authorization_engine.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" struct grpc_authorization_policy_provider diff --git a/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc b/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc index 8c8236e236799..315c655b0bcad 100644 --- a/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +++ b/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc @@ -16,8 +16,8 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace { diff --git a/src/core/lib/security/authorization/evaluate_args.cc b/src/core/lib/security/authorization/evaluate_args.cc index 9a420347c092b..0a4e23d192386 100644 --- a/src/core/lib/security/authorization/evaluate_args.cc +++ b/src/core/lib/security/authorization/evaluate_args.cc @@ -27,10 +27,10 @@ #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/security/credentials/tls/tls_utils.h" #include "src/core/lib/slice/slice.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/host_port.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc b/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc index 4380e09086a3d..171fd61b3f14a 100644 --- a/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc +++ b/src/core/lib/security/authorization/grpc_authorization_policy_provider.cc @@ -30,14 +30,14 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/authorization/grpc_authorization_engine.h" #include "src/core/lib/security/authorization/rbac_policy.h" #include "src/core/lib/security/authorization/rbac_translator.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/load_file.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/grpc_authorization_policy_provider.h b/src/core/lib/security/authorization/grpc_authorization_policy_provider.h index b61db3131b146..f7e6aff40d78a 100644 --- a/src/core/lib/security/authorization/grpc_authorization_policy_provider.h +++ b/src/core/lib/security/authorization/grpc_authorization_policy_provider.h @@ -28,12 +28,12 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/security/authorization/authorization_engine.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" #include "src/core/lib/security/authorization/rbac_translator.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/grpc_server_authz_filter.h b/src/core/lib/security/authorization/grpc_server_authz_filter.h index cfd9c3bbd26cc..733142cfca355 100644 --- a/src/core/lib/security/authorization/grpc_server_authz_filter.h +++ b/src/core/lib/security/authorization/grpc_server_authz_filter.h @@ -23,12 +23,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/matchers.h b/src/core/lib/security/authorization/matchers.h index 354d7c0cb3e09..eaadd07b4e7a0 100644 --- a/src/core/lib/security/authorization/matchers.h +++ b/src/core/lib/security/authorization/matchers.h @@ -26,9 +26,9 @@ #include #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/lib/security/authorization/evaluate_args.h" #include "src/core/lib/security/authorization/rbac_policy.h" +#include "src/core/util/matchers.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/rbac_policy.h b/src/core/lib/security/authorization/rbac_policy.h index b3a2c6db6aa7f..03b4e283cde51 100644 --- a/src/core/lib/security/authorization/rbac_policy.h +++ b/src/core/lib/security/authorization/rbac_policy.h @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/matchers.h" namespace grpc_core { diff --git a/src/core/lib/security/authorization/rbac_translator.cc b/src/core/lib/security/authorization/rbac_translator.cc index d427ce8ea07c5..342f9248371b0 100644 --- a/src/core/lib/security/authorization/rbac_translator.cc +++ b/src/core/lib/security/authorization/rbac_translator.cc @@ -36,10 +36,10 @@ #include #include -#include "src/core/lib/matchers/matchers.h" #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/matchers.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/security/certificate_provider/certificate_provider_factory.h b/src/core/lib/security/certificate_provider/certificate_provider_factory.h index 719561a1eecdf..9da32e9233f4c 100644 --- a/src/core/lib/security/certificate_provider/certificate_provider_factory.h +++ b/src/core/lib/security/certificate_provider/certificate_provider_factory.h @@ -27,11 +27,11 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc index feade8cd9ddc1..67a219d9038d2 100644 --- a/src/core/lib/security/context/security_context.cc +++ b/src/core/lib/security/context/security_context.cc @@ -33,11 +33,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/surface/call.h" +#include "src/core/util/ref_counted_ptr.h" // --- grpc_call --- diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index 7240ba955bdaf..cc3b21620a5c2 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -33,11 +33,11 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" // --- grpc_auth_context --- diff --git a/src/core/lib/security/credentials/alts/alts_credentials.h b/src/core/lib/security/credentials/alts/alts_credentials.h index e49ef34be4e4e..3aa072789ff01 100644 --- a/src/core/lib/security/credentials/alts/alts_credentials.h +++ b/src/core/lib/security/credentials/alts/alts_credentials.h @@ -25,10 +25,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // Main struct for grpc ALTS channel credential. diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc index d9078a4c81a43..4de3a24eae6f9 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_no_op.cc @@ -22,8 +22,8 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" +#include "src/core/util/crash.h" bool grpc_alts_is_running_on_gcp() { VLOG(2) << "ALTS: Platforms other than Linux and Windows are not supported"; diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc index 85639e51840d4..df6a624097468 100644 --- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc @@ -28,8 +28,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" +#include "src/core/util/crash.h" namespace grpc_core { namespace internal { diff --git a/src/core/lib/security/credentials/call_creds_util.cc b/src/core/lib/security/credentials/call_creds_util.cc index 037d60196c9ba..71c3da6dfa3b2 100644 --- a/src/core/lib/security/credentials/call_creds_util.cc +++ b/src/core/lib/security/credentials/call_creds_util.cc @@ -25,10 +25,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/channel_creds_registry.h b/src/core/lib/security/credentials/channel_creds_registry.h index 8fa2462f2bad9..17771ff8d9e1f 100644 --- a/src/core/lib/security/credentials/channel_creds_registry.h +++ b/src/core/lib/security/credentials/channel_creds_registry.h @@ -26,11 +26,11 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" struct grpc_channel_credentials; diff --git a/src/core/lib/security/credentials/channel_creds_registry_init.cc b/src/core/lib/security/credentials/channel_creds_registry_init.cc index 832daba128467..de2f7d143b980 100644 --- a/src/core/lib/security/credentials/channel_creds_registry_init.cc +++ b/src/core/lib/security/credentials/channel_creds_registry_init.cc @@ -31,9 +31,6 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" @@ -44,6 +41,9 @@ #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/composite/composite_credentials.cc b/src/core/lib/security/credentials/composite/composite_credentials.cc index db5d3079cbc79..d5d8c76baf4af 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.cc +++ b/src/core/lib/security/credentials/composite/composite_credentials.cc @@ -29,9 +29,9 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" // // grpc_composite_channel_credentials diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index 6bd13f0dea872..64b05de2cf149 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -33,12 +33,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // -- Composite channel credentials. -- diff --git a/src/core/lib/security/credentials/credentials.cc b/src/core/lib/security/credentials/credentials.cc index 6cdb1399ce55a..6f43677d8f0ab 100644 --- a/src/core/lib/security/credentials/credentials.cc +++ b/src/core/lib/security/credentials/credentials.cc @@ -28,7 +28,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 3066cbfeb33b6..57f0eaaa62b89 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -35,14 +35,14 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" // --- Constants. --- diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc index c2e0686101971..23061f1679ae2 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.cc @@ -37,14 +37,14 @@ #include #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/env.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/src/core/lib/security/credentials/external/aws_external_account_credentials.h index 588001e480b72..466094cbe23e5 100644 --- a/src/core/lib/security/credentials/external/aws_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/aws_external_account_credentials.h @@ -26,13 +26,13 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/aws_request_signer.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/aws_request_signer.h b/src/core/lib/security/credentials/external/aws_request_signer.h index 239abe090e657..59a5390f795ea 100644 --- a/src/core/lib/security/credentials/external/aws_request_signer.h +++ b/src/core/lib/security/credentials/external/aws_request_signer.h @@ -23,7 +23,7 @@ #include #include "src/core/lib/iomgr/error.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/external_account_credentials.cc b/src/core/lib/security/credentials/external/external_account_credentials.cc index c83351e67e296..7c4955bc09dda 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/external_account_credentials.cc @@ -45,17 +45,17 @@ #include #include -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/external/aws_external_account_credentials.h" #include "src/core/lib/security/credentials/external/file_external_account_credentials.h" #include "src/core/lib/security/credentials/external/url_external_account_credentials.h" #include "src/core/lib/security/util/json_util.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/uri.h" #define EXTERNAL_ACCOUNT_CREDENTIALS_GRANT_TYPE \ "urn:ietf:params:oauth:grant-type:token-exchange" diff --git a/src/core/lib/security/credentials/external/external_account_credentials.h b/src/core/lib/security/credentials/external/external_account_credentials.h index 5dfbb24a36ede..3323d21bbf091 100644 --- a/src/core/lib/security/credentials/external/external_account_credentials.h +++ b/src/core/lib/security/credentials/external/external_account_credentials.h @@ -29,9 +29,6 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -40,6 +37,9 @@ #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.cc b/src/core/lib/security/credentials/external/file_external_account_credentials.cc index 086af8c79c7be..c38adc83dc613 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.cc +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.cc @@ -26,11 +26,11 @@ #include #include -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/file_external_account_credentials.h b/src/core/lib/security/credentials/external/file_external_account_credentials.h index 8ed7b14653713..7d4721a0bf4eb 100644 --- a/src/core/lib/security/credentials/external/file_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/file_external_account_credentials.h @@ -25,9 +25,9 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/external/url_external_account_credentials.h b/src/core/lib/security/credentials/external/url_external_account_credentials.h index 65dcae9176e11..bf44736edf669 100644 --- a/src/core/lib/security/credentials/external/url_external_account_credentials.h +++ b/src/core/lib/security/credentials/external/url_external_account_credentials.h @@ -26,12 +26,12 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/external/external_account_credentials.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/fake/fake_credentials.cc b/src/core/lib/security/credentials/fake/fake_credentials.cc index 2eb12fa10398f..1e0f6f33eb488 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.cc +++ b/src/core/lib/security/credentials/fake/fake_credentials.cc @@ -28,11 +28,11 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/security_connector/fake/fake_security_connector.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" // -- Fake transport security credentials. -- diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index d4b00d6eb403a..fe4fb414593bb 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -30,13 +30,13 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" #define GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS \ diff --git a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc index 11aa4e158d73d..8b3c8c8701de1 100644 --- a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +++ b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.cc @@ -26,16 +26,16 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/status_conversion.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h index 231e9bbccc62c..2e75547c40216 100644 --- a/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h +++ b/src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h @@ -23,10 +23,6 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/credentials.h" @@ -35,6 +31,10 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.cc b/src/core/lib/security/credentials/google_default/credentials_generic.cc index cf748049b981f..f09e5681c88e1 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.cc +++ b/src/core/lib/security/credentials/google_default/credentials_generic.cc @@ -24,9 +24,9 @@ #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" +#include "src/core/util/env.h" std::string grpc_get_well_known_google_credentials_file_path_impl(void) { auto base = grpc_core::GetEnv(GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR); diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index d649eb5512b5c..ba9aeca29423b 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -42,13 +42,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -64,13 +57,20 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/error_utils.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/load_balancing/xds/xds_channel_args.h" +#include "src/core/util/env.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" using grpc_core::Json; diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 8611cbdc2540c..58f9ae40cdcd4 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -26,10 +26,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" #define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud" diff --git a/src/core/lib/security/credentials/iam/iam_credentials.cc b/src/core/lib/security/credentials/iam/iam_credentials.cc index 876851555dade..8d85597867699 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.cc +++ b/src/core/lib/security/credentials/iam/iam_credentials.cc @@ -30,10 +30,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" grpc_core::ArenaPromise> grpc_google_iam_credentials::GetRequestMetadata( diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 8fa67a9048d67..aa8426048f186 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" class grpc_google_iam_credentials : public grpc_call_credentials { diff --git a/src/core/lib/security/credentials/insecure/insecure_credentials.h b/src/core/lib/security/credentials/insecure/insecure_credentials.h index e9bf9327e7249..9e89970f21900 100644 --- a/src/core/lib/security/credentials/insecure/insecure_credentials.h +++ b/src/core/lib/security/credentials/insecure/insecure_credentials.h @@ -25,10 +25,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index 33636819c4f35..ab3cb4af773f5 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -37,15 +37,15 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/credentials/call_creds_util.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" using grpc_core::Json; diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 751ff187fc6f0..26dfa169ad499 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -35,13 +35,13 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/jwt/json_token.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" class grpc_service_account_jwt_access_credentials diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/src/core/lib/security/credentials/jwt/jwt_verifier.cc index 14da68850974e..5f45ece8056a6 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.cc +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.cc @@ -54,9 +54,6 @@ #include #include -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -65,13 +62,16 @@ #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/tsi/ssl_types.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/http_client/parser.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/memory.h" +#include "src/core/util/orphanable.h" #include "src/core/util/string.h" +#include "src/core/util/uri.h" using grpc_core::Json; diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index 922da79d4c99c..9ff8ca5383124 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -24,9 +24,9 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/util/json/json.h" +#include "src/core/util/time.h" // --- Constants. --- diff --git a/src/core/lib/security/credentials/local/local_credentials.h b/src/core/lib/security/credentials/local/local_credentials.h index 9665db5d08296..e0a5d37f8c938 100644 --- a/src/core/lib/security/credentials/local/local_credentials.h +++ b/src/core/lib/security/credentials/local/local_credentials.h @@ -26,10 +26,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // Main class for grpc local channel credential. diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 4e366d0bb69ea..216c038cbf2a0 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -46,10 +46,6 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/context.h" @@ -58,10 +54,14 @@ #include "src/core/lib/security/util/json_util.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" +#include "src/core/util/memory.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/uri.h" using grpc_core::Json; diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index ea9315ba0121d..bb91c8a524fae 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -33,11 +33,6 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -47,10 +42,15 @@ #include "src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/uri.h" #include "src/core/util/useful.h" // Constants. diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index 9cffc05b3dc0d..113955240c173 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -36,9 +36,6 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/poll.h" @@ -46,6 +43,9 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // This type is forward declared as a C struct and we cannot define it as a diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index 32c450de90f88..ab4c9a1276788 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -29,12 +29,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/security/security_connector/ssl/ssl_security_connector.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" class grpc_ssl_credentials : public grpc_channel_credentials { diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h index 5a0de70f09332..f34e664d581ca 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h @@ -30,10 +30,10 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/ssl_utils.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" struct grpc_tls_identity_pairs { grpc_core::PemKeyCertPairList pem_key_cert_pairs; diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc index 82a56f43ebc0f..0bcabaa6505e0 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc @@ -26,6 +26,7 @@ #include "absl/log/check.h" #include "absl/log/log.h" #include "absl/status/status.h" +#include "absl/strings/string_view.h" #include #include @@ -33,15 +34,55 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/stat.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/tsi/ssl_transport_security_utils.h" +#include "src/core/util/load_file.h" +#include "src/core/util/stat.h" +#include "src/core/util/status_helper.h" namespace grpc_core { +namespace { + +absl::Status ValidateRootCertificates(absl::string_view root_certificates) { + if (root_certificates.empty()) return absl::OkStatus(); + absl::StatusOr> parsed_roots = + ParsePemCertificateChain(root_certificates); + if (!parsed_roots.ok()) { + return parsed_roots.status(); + } + for (X509* x509 : *parsed_roots) { + X509_free(x509); + } + return absl::OkStatus(); +} + +absl::Status ValidatePemKeyCertPair(absl::string_view cert_chain, + absl::string_view private_key) { + if (cert_chain.empty() && private_key.empty()) return absl::OkStatus(); + // Check that the cert chain consists of valid PEM blocks. + absl::StatusOr> parsed_certs = + ParsePemCertificateChain(cert_chain); + if (!parsed_certs.ok()) { + return parsed_certs.status(); + } + for (X509* x509 : *parsed_certs) { + X509_free(x509); + } + // Check that the private key consists of valid PEM blocks. + absl::StatusOr parsed_private_key = + ParsePemPrivateKey(private_key); + if (!parsed_private_key.ok()) { + return parsed_private_key.status(); + } + EVP_PKEY_free(*parsed_private_key); + return absl::OkStatus(); +} + +} // namespace StaticDataCertificateProvider::StaticDataCertificateProvider( std::string root_certificate, PemKeyCertPairList pem_key_cert_pairs) @@ -102,6 +143,21 @@ UniqueTypeName StaticDataCertificateProvider::type() const { return kFactory.Create(); } +absl::Status StaticDataCertificateProvider::ValidateCredentials() const { + absl::Status status = ValidateRootCertificates(root_certificate_); + if (!status.ok()) { + return status; + } + for (const PemKeyCertPair& pair : pem_key_cert_pairs_) { + absl::Status status = + ValidatePemKeyCertPair(pair.cert_chain(), pair.private_key()); + if (!status.ok()) { + return status; + } + } + return absl::OkStatus(); +} + namespace { gpr_timespec TimeoutSecondsToDeadline(int64_t seconds) { @@ -206,6 +262,22 @@ UniqueTypeName FileWatcherCertificateProvider::type() const { return kFactory.Create(); } +absl::Status FileWatcherCertificateProvider::ValidateCredentials() const { + MutexLock lock(&mu_); + absl::Status status = ValidateRootCertificates(root_certificate_); + if (!status.ok()) { + return status; + } + for (const PemKeyCertPair& pair : pem_key_cert_pairs_) { + absl::Status status = + ValidatePemKeyCertPair(pair.cert_chain(), pair.private_key()); + if (!status.ok()) { + return status; + } + } + return absl::OkStatus(); +} + void FileWatcherCertificateProvider::ForceUpdate() { absl::optional root_certificate; absl::optional pem_key_cert_pairs; diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h index c3703cd56f9e3..cca18a1baebfd 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h @@ -32,13 +32,13 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/security_connector/ssl_utils.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // Interface for a grpc_tls_certificate_provider that handles the process to @@ -108,6 +108,8 @@ class StaticDataCertificateProvider final UniqueTypeName type() const override; + absl::Status ValidateCredentials() const; + private: struct WatcherInfo { bool root_being_watched = false; @@ -147,6 +149,8 @@ class FileWatcherCertificateProvider final UniqueTypeName type() const override; + absl::Status ValidateCredentials() const; + int64_t TestOnlyGetRefreshIntervalSecond() const; private: @@ -183,7 +187,7 @@ class FileWatcherCertificateProvider final gpr_event shutdown_event_; // Guards members below. - Mutex mu_; + mutable Mutex mu_; // The most-recent credential data. It will be empty if the most recent read // attempt failed. std::string root_certificate_ ABSL_GUARDED_BY(mu_); diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc index f4c2c75bb4412..1be015dcba7af 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc @@ -29,9 +29,9 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/security/credentials/tls/tls_utils.h" +#include "src/core/util/host_port.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h index 0c5c2e7f5ae1d..5e021948d2f41 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h @@ -29,9 +29,9 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" // An abstraction of the verifier that all verifier subclasses should extend. diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc index 82a6dd55620e8..3176dc10caac9 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc @@ -27,9 +27,9 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/debug_location.h" /// -- Wrapper APIs declared in grpc_security.h -- * diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h index b29468239a13f..f40773739a18f 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" diff --git a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc index 4db21c2885ce4..ce1fc4dd1d0af 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc +++ b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc @@ -43,10 +43,10 @@ #include "absl/types/span.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/directory_reader.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/directory_reader.h" +#include "src/core/util/load_file.h" namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h index 77ffc43938495..b9188740c5e22 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h @@ -39,9 +39,9 @@ #include #include -#include "src/core/lib/gprpp/directory_reader.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/directory_reader.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { namespace experimental { diff --git a/src/core/lib/security/credentials/tls/tls_credentials.h b/src/core/lib/security/credentials/tls/tls_credentials.h index c72dcd61da8d1..fd78967d8f5b2 100644 --- a/src/core/lib/security/credentials/tls/tls_credentials.h +++ b/src/core/lib/security/credentials/tls/tls_credentials.h @@ -25,10 +25,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" class TlsCredentials final : public grpc_channel_credentials { public: diff --git a/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h b/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h index c73d469234b06..6283c044be866 100644 --- a/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h +++ b/src/core/lib/security/credentials/token_fetcher/token_fetcher_credentials.h @@ -28,17 +28,17 @@ #include -#include "src/core/lib/backoff/backoff.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/backoff.h" #include "src/core/util/http_client/httpcli.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/security/credentials/xds/xds_credentials.h b/src/core/lib/security/credentials/xds/xds_credentials.h index dc363ac52b224..554d7a57f2624 100644 --- a/src/core/lib/security/credentials/xds/xds_credentials.h +++ b/src/core/lib/security/credentials/xds/xds_credentials.h @@ -34,12 +34,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/matchers.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/xds/grpc/xds_certificate_provider.h" namespace grpc_core { diff --git a/src/core/lib/security/security_connector/alts/alts_security_connector.cc b/src/core/lib/security/security_connector/alts/alts_security_connector.cc index 370f21555d0d6..f30cecdd01a04 100644 --- a/src/core/lib/security/security_connector/alts/alts_security_connector.cc +++ b/src/core/lib/security/security_connector/alts/alts_security_connector.cc @@ -40,8 +40,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -56,6 +54,8 @@ #include "src/core/lib/transport/transport.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" void grpc_alts_set_rpc_protocol_versions( grpc_gcp_rpc_protocol_versions* rpc_versions) { diff --git a/src/core/lib/security/security_connector/alts/alts_security_connector.h b/src/core/lib/security/security_connector/alts/alts_security_connector.h index 1f0c13a3618f8..5fe144a5e7db3 100644 --- a/src/core/lib/security/security_connector/alts/alts_security_connector.h +++ b/src/core/lib/security/security_connector/alts/alts_security_connector.h @@ -23,10 +23,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/alts/handshaker/transport_security_common_api.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted_ptr.h" #define GRPC_ALTS_TRANSPORT_SECURITY_TYPE "alts" diff --git a/src/core/lib/security/security_connector/fake/fake_security_connector.cc b/src/core/lib/security/security_connector/fake/fake_security_connector.cc index b83eda46ee170..20425dc2c915f 100644 --- a/src/core/lib/security/security_connector/fake/fake_security_connector.cc +++ b/src/core/lib/security/security_connector/fake/fake_security_connector.cc @@ -41,10 +41,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -58,6 +54,10 @@ #include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/security/security_connector/fake/fake_security_connector.h b/src/core/lib/security/security_connector/fake/fake_security_connector.h index 1edc40c0b954e..3801af09fbc53 100644 --- a/src/core/lib/security/security_connector/fake/fake_security_connector.h +++ b/src/core/lib/security/security_connector/fake/fake_security_connector.h @@ -24,8 +24,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" // Creates a fake connector that emulates real channel security. grpc_core::RefCountedPtr diff --git a/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc b/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc index 08e897bebc39c..79ea0cd337cae 100644 --- a/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +++ b/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc @@ -27,12 +27,12 @@ #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/tsi/local_transport_security.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/security_connector/insecure/insecure_security_connector.h b/src/core/lib/security/security_connector/insecure/insecure_security_connector.h index 151264f35aecc..9fc962b92ca81 100644 --- a/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +++ b/src/core/lib/security/security_connector/insecure/insecure_security_connector.h @@ -31,7 +31,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -40,6 +39,7 @@ #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/security_connector/load_system_roots_supported.cc b/src/core/lib/security/security_connector/load_system_roots_supported.cc index 26d49e67cad84..52b657185a6a4 100644 --- a/src/core/lib/security/security_connector/load_system_roots_supported.cc +++ b/src/core/lib/security/security_connector/load_system_roots_supported.cc @@ -37,10 +37,10 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/load_system_roots.h" #include "src/core/lib/security/security_connector/load_system_roots_supported.h" +#include "src/core/util/load_file.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/lib/security/security_connector/local/local_security_connector.cc b/src/core/lib/security/security_connector/local/local_security_connector.cc index 10200c9720abc..30a0302169526 100644 --- a/src/core/lib/security/security_connector/local/local_security_connector.cc +++ b/src/core/lib/security/security_connector/local/local_security_connector.cc @@ -60,10 +60,12 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/local/local_credentials.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/tsi/local_transport_security.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" #define GRPC_UDS_URI_PATTERN "unix:" #define GRPC_ABSTRACT_UDS_URI_PATTERN "unix-abstract:" diff --git a/src/core/lib/security/security_connector/local/local_security_connector.h b/src/core/lib/security/security_connector/local/local_security_connector.h index 09020552f1ce7..3475d8f033a0e 100644 --- a/src/core/lib/security/security_connector/local/local_security_connector.h +++ b/src/core/lib/security/security_connector/local/local_security_connector.h @@ -24,8 +24,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/ref_counted_ptr.h" /// /// This method creates a local channel security connector. diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index d40b90cc3bf2b..d3c9906f8b67f 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -28,8 +28,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/util/debug_location.h" #include "src/core/util/useful.h" grpc_channel_security_connector::grpc_channel_security_connector( diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h index 1a8e7a67b76cd..2e44b14fe002d 100644 --- a/src/core/lib/security/security_connector/security_connector.h +++ b/src/core/lib/security/security_connector/security_connector.h @@ -32,15 +32,15 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#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/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" // --- URL schemes. --- diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index b8fd066dab4ed..0ec65282f0cf3 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -37,10 +37,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -55,6 +51,10 @@ #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" namespace { grpc_error_handle ssl_check_peer( diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h index 3ce665d587e24..5362e7503bcb4 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h @@ -26,9 +26,9 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/ref_counted_ptr.h" struct grpc_ssl_config { tsi_ssl_pem_key_cert_pair* pem_key_cert_pair; diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index a251ccdf86cb7..e3078062a89ea 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -43,13 +43,13 @@ #include "src/core/ext/transport/chttp2/alpn/alpn.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/load_system_roots.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/host_port.h" +#include "src/core/util/load_file.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" // -- Constants. -- diff --git a/src/core/lib/security/security_connector/ssl_utils.h b/src/core/lib/security/security_connector/ssl_utils.h index dd37f0e9b9826..f60b679c763d6 100644 --- a/src/core/lib/security/security_connector/ssl_utils.h +++ b/src/core/lib/security/security_connector/ssl_utils.h @@ -35,12 +35,12 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted_ptr.h" // --- Util --- diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.cc b/src/core/lib/security/security_connector/tls/tls_security_connector.cc index 3707955d4bf59..b6c492fe458cc 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.cc +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.cc @@ -38,9 +38,6 @@ #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/context/security_context.h" @@ -49,6 +46,9 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.h b/src/core/lib/security/security_connector/tls/tls_security_connector.h index 0053a9d46d329..3c4e90436dc31 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.h +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.h @@ -34,8 +34,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -47,6 +45,8 @@ #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" using TlsSessionKeyLogger = tsi::TlsSessionKeyLoggerCache::TlsSessionKeyLogger; diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h index c3421f988761b..71834db440376 100644 --- a/src/core/lib/security/transport/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -30,11 +30,11 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index dcbeeccf14928..a5740afcfa202 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -38,8 +38,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/promise.h" @@ -52,6 +50,8 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" #define MAX_CREDENTIALS_METADATA_COUNT 4 diff --git a/src/core/lib/security/transport/server_auth_filter.cc b/src/core/lib/security/transport/server_auth_filter.cc index 5b332aa98753d..45e47aaa214a4 100644 --- a/src/core/lib/security/transport/server_auth_filter.cc +++ b/src/core/lib/security/transport/server_auth_filter.cc @@ -40,9 +40,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" @@ -58,6 +55,9 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/lib/slice/percent_encoding.cc b/src/core/lib/slice/percent_encoding.cc index 0d73ea3c06a9d..8b51c4d905990 100644 --- a/src/core/lib/slice/percent_encoding.cc +++ b/src/core/lib/slice/percent_encoding.cc @@ -27,7 +27,7 @@ #include -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index c0143684dfbcf..a7ff2198d038e 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -28,9 +28,9 @@ #include #include -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" +#include "src/core/util/memory.h" char* grpc_slice_to_c_string(grpc_slice slice) { char* out = static_cast(gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1)); diff --git a/src/core/lib/slice/slice.h b/src/core/lib/slice/slice.h index 88f9d76bcbc0c..5b70fa4ee5200 100644 --- a/src/core/lib/slice/slice.h +++ b/src/core/lib/slice/slice.h @@ -29,9 +29,9 @@ #include #include -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" +#include "src/core/util/debug_location.h" #include "src/core/util/string.h" // Herein lies grpc_core::Slice and its team of thin wrappers around grpc_slice. diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index e0fe8bd7e993f..093a77ecfb030 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -31,7 +31,7 @@ #include #include -#include "src/core/lib/gprpp/memory.h" +#include "src/core/util/memory.h" // Returns a pointer to the first slice in the slice buffer without giving // ownership to or a reference count on that slice. diff --git a/src/core/lib/slice/slice_refcount.h b/src/core/lib/slice/slice_refcount.h index 71a6e85abe52a..c27bb07a8e71a 100644 --- a/src/core/lib/slice/slice_refcount.h +++ b/src/core/lib/slice/slice_refcount.h @@ -23,7 +23,7 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" +#include "src/core/util/debug_location.h" // grpc_slice_refcount : A reference count for grpc_slice. struct grpc_slice_refcount { diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index f8ee18a9f0c77..29c4277d28406 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -64,15 +64,6 @@ #include "src/core/lib/compression/compression_internal.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/cpp_impl_of.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -105,6 +96,15 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/alloc.h" +#include "src/core/util/bitset.h" +#include "src/core/util/cpp_impl_of.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/match.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" #include "src/core/util/time_precise.h" #include "src/core/util/useful.h" diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index 99ab4af5c2383..8c225b7379df2 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -36,8 +36,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" @@ -48,6 +46,8 @@ #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/transport.h" #include "src/core/server/server_interface.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" typedef void (*grpc_ioreq_completion_func)(grpc_call* call, int success, diff --git a/src/core/lib/surface/call_utils.cc b/src/core/lib/surface/call_utils.cc index f5c5f32b84e02..18a78fb284eff 100644 --- a/src/core/lib/surface/call_utils.cc +++ b/src/core/lib/surface/call_utils.cc @@ -49,9 +49,6 @@ #include #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/context.h" @@ -63,6 +60,9 @@ #include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/lib/surface/call_utils.h b/src/core/lib/surface/call_utils.h index 3d5039ab4cf3b..de9c928fa74a4 100644 --- a/src/core/lib/surface/call_utils.h +++ b/src/core/lib/surface/call_utils.h @@ -46,7 +46,6 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/map.h" @@ -57,6 +56,7 @@ #include "src/core/lib/transport/message.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 7976fd0085873..fa8ac5468c851 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -33,11 +33,6 @@ #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/cpp_impl_of.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/resource_quota.h" @@ -46,6 +41,11 @@ #include "src/core/lib/transport/call_arena_allocator.h" #include "src/core/lib/transport/call_destination.h" #include "src/core/lib/transport/connectivity_state.h" +#include "src/core/util/cpp_impl_of.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" // Forward declaration to avoid dependency loop. struct grpc_channel_stack; diff --git a/src/core/lib/surface/channel_init.cc b/src/core/lib/surface/channel_init.cc index eb0744f760edd..cebe053e34db8 100644 --- a/src/core/lib/surface/channel_init.cc +++ b/src/core/lib/surface/channel_init.cc @@ -37,10 +37,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/surface/channel_stack_type.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/lib/surface/channel_init.h b/src/core/lib/surface/channel_init.h index 435d3cff305a5..628620228c586 100644 --- a/src/core/lib/surface/channel_init.h +++ b/src/core/lib/surface/channel_init.h @@ -35,11 +35,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/interception_chain.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/unique_type_name.h" /// This module provides a way for plugins (and the grpc core library itself) /// to register mutators for channel stacks. diff --git a/src/core/lib/surface/client_call.cc b/src/core/lib/surface/client_call.cc index db329e66ffabc..05670b2e1bced 100644 --- a/src/core/lib/surface/client_call.cc +++ b/src/core/lib/surface/client_call.cc @@ -45,10 +45,6 @@ #include #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/all_ok.h" #include "src/core/lib/promise/status_flag.h" #include "src/core/lib/promise/try_seq.h" @@ -58,7 +54,11 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/bitset.h" +#include "src/core/util/crash.h" #include "src/core/util/latent_see.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/surface/client_call.h b/src/core/lib/surface/client_call.h index 484be4d13d126..014eafed11d4a 100644 --- a/src/core/lib/surface/client_call.h +++ b/src/core/lib/surface/client_call.h @@ -42,15 +42,15 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/single_set_ptr.h" #include "src/core/lib/promise/status_flag.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/call_utils.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/single_set_ptr.h" namespace grpc_core { diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index 35e2f295990ad..9d958defc9853 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -41,11 +41,6 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/atomic_utils.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/executor.h" @@ -54,7 +49,12 @@ #include "src/core/lib/surface/event_string.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/atomic_utils.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" #include "src/core/util/spinlock.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #ifdef GPR_WINDOWS #include "src/core/lib/experiments/experiments.h" diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 0abf4dc6c47da..33dcb5ed5c17d 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -26,10 +26,10 @@ #include #include -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/mpscq.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/mpscq.h" typedef struct grpc_cq_completion { grpc_core::ManualConstructor< diff --git a/src/core/lib/surface/filter_stack_call.cc b/src/core/lib/surface/filter_stack_call.cc index a3a6e3d7b6014..707d99a59faea 100644 --- a/src/core/lib/surface/filter_stack_call.cc +++ b/src/core/lib/surface/filter_stack_call.cc @@ -48,11 +48,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/event_engine/event_engine_context.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/polling_entity.h" @@ -71,6 +66,11 @@ #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" #include "src/core/util/alloc.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" #include "src/core/util/time_precise.h" namespace grpc_core { diff --git a/src/core/lib/surface/filter_stack_call.h b/src/core/lib/surface/filter_stack_call.h index aa5d739d7adb4..b4c304773c90b 100644 --- a/src/core/lib/surface/filter_stack_call.h +++ b/src/core/lib/surface/filter_stack_call.h @@ -45,8 +45,6 @@ #include #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/promise/context.h" @@ -60,6 +58,8 @@ #include "src/core/server/server_interface.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/util/alloc.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index 0adcbb399954a..233f6f97d1677 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -20,6 +20,8 @@ #include "absl/base/thread_annotations.h" #include "absl/log/log.h" +#include "absl/time/clock.h" +#include "absl/time/time.h" #include #include @@ -35,9 +37,6 @@ #include "src/core/lib/event_engine/posix_engine/timer_manager.h" #include "src/core/lib/experiments/config.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/timer_manager.h" @@ -47,6 +46,9 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/surface/init_internally.h" +#include "src/core/util/fork.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" // Remnants of the old plugin system void grpc_resolver_dns_ares_init(void); @@ -216,3 +218,20 @@ void grpc_maybe_wait_for_async_shutdown(void) { g_shutting_down_cv->Wait(g_init_mu); } } + +bool grpc_wait_for_shutdown_with_timeout(absl::Duration timeout) { + GRPC_TRACE_LOG(api, INFO) << "grpc_wait_for_shutdown_with_timeout()"; + const auto started = absl::Now(); + const auto deadline = started + timeout; + gpr_once_init(&g_basic_init, do_basic_init); + grpc_core::MutexLock lock(g_init_mu); + while (g_initializations != 0) { + if (g_shutting_down_cv->WaitWithDeadline(g_init_mu, deadline)) { + LOG(ERROR) << "grpc_wait_for_shutdown_with_timeout() timed out."; + return false; + } + } + GRPC_TRACE_LOG(api, INFO) + << "grpc_wait_for_shutdown_with_timeout() took " << absl::Now() - started; + return true; +} diff --git a/src/core/lib/surface/init.h b/src/core/lib/surface/init.h index 0d0035ae30474..804b79c5d5b31 100644 --- a/src/core/lib/surface/init.h +++ b/src/core/lib/surface/init.h @@ -18,8 +18,13 @@ #ifndef GRPC_SRC_CORE_LIB_SURFACE_INIT_H #define GRPC_SRC_CORE_LIB_SURFACE_INIT_H +#include "absl/time/time.h" + #include void grpc_maybe_wait_for_async_shutdown(void); +// Returns false if the timeout expired before fully shut down. +bool grpc_wait_for_shutdown_with_timeout(absl::Duration timeout); + #endif // GRPC_SRC_CORE_LIB_SURFACE_INIT_H diff --git a/src/core/lib/surface/lame_client.cc b/src/core/lib/surface/lame_client.cc index 3ac1321b6c7b5..8acfd80986d4e 100644 --- a/src/core/lib/surface/lame_client.cc +++ b/src/core/lib/surface/lame_client.cc @@ -35,9 +35,6 @@ #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/pipe.h" #include "src/core/lib/promise/promise.h" @@ -46,10 +43,13 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" // Avoid some IWYU confusion: -// IWYU pragma: no_include "src/core/lib/gprpp/orphanable.h" +// IWYU pragma: no_include "src/core/util/orphanable.h" namespace grpc_core { diff --git a/src/core/lib/surface/lame_client.h b/src/core/lib/surface/lame_client.h index c5ff64d2a4da0..970c7630c48d6 100644 --- a/src/core/lib/surface/lame_client.h +++ b/src/core/lib/surface/lame_client.h @@ -31,11 +31,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/sync.h" #define GRPC_ARG_LAME_FILTER_ERROR "grpc.lame_filter_error" diff --git a/src/core/lib/surface/legacy_channel.cc b/src/core/lib/surface/legacy_channel.cc index f68a653d843e7..ba306525f2c6a 100644 --- a/src/core/lib/surface/legacy_channel.cc +++ b/src/core/lib/surface/legacy_channel.cc @@ -38,11 +38,6 @@ #include "src/core/lib/channel/channel_stack_builder_impl.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -58,6 +53,11 @@ #include "src/core/telemetry/metrics.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/surface/legacy_channel.h b/src/core/lib/surface/legacy_channel.h index ed5938437a5b6..7ca47a6bb225e 100644 --- a/src/core/lib/surface/legacy_channel.h +++ b/src/core/lib/surface/legacy_channel.h @@ -32,8 +32,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/surface/channel.h" @@ -41,6 +39,8 @@ #include "src/core/lib/transport/call_arena_allocator.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/stats.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/surface/server_call.cc b/src/core/lib/surface/server_call.cc index 0ac9064bedbed..32aadc25da9f5 100644 --- a/src/core/lib/surface/server_call.cc +++ b/src/core/lib/surface/server_call.cc @@ -40,7 +40,6 @@ #include #include -#include "src/core/lib/gprpp/bitset.h" #include "src/core/lib/promise/all_ok.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/poll.h" @@ -52,6 +51,7 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/server/server_interface.h" +#include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/lib/surface/server_call.h b/src/core/lib/surface/server_call.h index 351ef21a35b09..b8e4299731b7e 100644 --- a/src/core/lib/surface/server_call.h +++ b/src/core/lib/surface/server_call.h @@ -45,9 +45,6 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" @@ -57,6 +54,9 @@ #include "src/core/server/server_interface.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/surface/validate_metadata.cc b/src/core/lib/surface/validate_metadata.cc index e3d4f5f9b0405..3a68a673c0484 100644 --- a/src/core/lib/surface/validate_metadata.cc +++ b/src/core/lib/surface/validate_metadata.cc @@ -24,9 +24,9 @@ #include #include -#include "src/core/lib/gprpp/bitset.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/bitset.h" namespace grpc_core { diff --git a/src/core/lib/surface/version.cc b/src/core/lib/surface/version.cc index a347400b9815a..daa6bacde9634 100644 --- a/src/core/lib/surface/version.cc +++ b/src/core/lib/surface/version.cc @@ -22,6 +22,6 @@ #include #include -const char* grpc_version_string(void) { return "43.0.0"; } +const char* grpc_version_string(void) { return "44.0.0"; } -const char* grpc_g_stands_for(void) { return "gesundheit"; } +const char* grpc_g_stands_for(void) { return "groovy"; } diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h index e9fb28cceef71..487b04eb35d25 100644 --- a/src/core/lib/transport/bdp_estimator.h +++ b/src/core/lib/transport/bdp_estimator.h @@ -31,7 +31,7 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/transport/call_arena_allocator.h b/src/core/lib/transport/call_arena_allocator.h index 4f63e0ae3ea3b..d52bdf4ecf719 100644 --- a/src/core/lib/transport/call_arena_allocator.h +++ b/src/core/lib/transport/call_arena_allocator.h @@ -22,9 +22,9 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/ref_counted.h" namespace grpc_core { diff --git a/src/core/lib/transport/call_destination.h b/src/core/lib/transport/call_destination.h index 04d402569c9e1..5caf299d3872b 100644 --- a/src/core/lib/transport/call_destination.h +++ b/src/core/lib/transport/call_destination.h @@ -17,8 +17,8 @@ #include -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/transport/call_spine.h" +#include "src/core/util/orphanable.h" namespace grpc_core { diff --git a/src/core/lib/transport/call_filters.cc b/src/core/lib/transport/call_filters.cc index 0e378a86d0457..f15579db6032d 100644 --- a/src/core/lib/transport/call_filters.cc +++ b/src/core/lib/transport/call_filters.cc @@ -19,8 +19,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/lib/transport/call_filters.h b/src/core/lib/transport/call_filters.h index 1cbe428de5f18..fb64eb95eca95 100644 --- a/src/core/lib/transport/call_filters.h +++ b/src/core/lib/transport/call_filters.h @@ -25,9 +25,6 @@ #include -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/latch.h" #include "src/core/lib/promise/map.h" @@ -39,6 +36,9 @@ #include "src/core/lib/transport/call_state.h" #include "src/core/lib/transport/message.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/dump_args.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" // CallFilters tracks a list of filters that are attached to a call. // At a high level, a filter (for the purposes of this module) is a class @@ -1485,7 +1485,6 @@ class CallFilters { std::move(value)); } } - call_state_.FinishPullServerTrailingMetadata(); return value; }); } @@ -1497,6 +1496,10 @@ class CallFilters { GRPC_MUST_USE_RESULT auto WasCancelled() { return [this]() { return call_state_.PollWasCancelled(); }; } + // Returns true if server trailing metadata has been pulled + bool WasServerTrailingMetadataPulled() const { + return call_state_.WasServerTrailingMetadataPulled(); + } // Client & server: fill in final_info with the final status of the call. void Finalize(const grpc_call_final_info* final_info); diff --git a/src/core/lib/transport/call_spine.h b/src/core/lib/transport/call_spine.h index 99944b301fc37..6e8e20146be88 100644 --- a/src/core/lib/transport/call_spine.h +++ b/src/core/lib/transport/call_spine.h @@ -19,7 +19,6 @@ #include -#include "src/core/lib/gprpp/dual_ref_counted.h" #include "src/core/lib/promise/detail/status.h" #include "src/core/lib/promise/if.h" #include "src/core/lib/promise/latch.h" @@ -33,6 +32,7 @@ #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/message.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/dual_ref_counted.h" namespace grpc_core { @@ -54,17 +54,23 @@ class CallSpine final : public Party { CallFilters& call_filters() { return call_filters_; } - // Add a callback to be called when server trailing metadata is received. - void OnDone(absl::AnyInvocable fn) { + // Add a callback to be called when server trailing metadata is received and + // return true. + // If CallOnDone has already been invoked, does nothing and returns false. + GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable fn) { + if (call_filters().WasServerTrailingMetadataPulled()) { + return false; + } if (on_done_ == nullptr) { on_done_ = std::move(fn); - return; + return true; } on_done_ = [first = std::move(fn), next = std::move(on_done_)](bool cancelled) mutable { first(cancelled); next(cancelled); }; + return true; } void CallOnDone(bool cancelled) { if (on_done_ != nullptr) std::exchange(on_done_, nullptr)(cancelled); @@ -232,8 +238,8 @@ class CallInitiator { spine_->PushServerTrailingMetadata(std::move(status)); } - void OnDone(absl::AnyInvocable fn) { - spine_->OnDone(std::move(fn)); + GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable fn) { + return spine_->OnDone(std::move(fn)); } template @@ -281,8 +287,8 @@ class CallHandler { spine_->PushServerTrailingMetadata(std::move(status)); } - void OnDone(absl::AnyInvocable fn) { - spine_->OnDone(std::move(fn)); + GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable fn) { + return spine_->OnDone(std::move(fn)); } template @@ -336,8 +342,8 @@ class UnstartedCallHandler { spine_->PushServerTrailingMetadata(std::move(status)); } - void OnDone(absl::AnyInvocable fn) { - spine_->OnDone(std::move(fn)); + GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable fn) { + return spine_->OnDone(std::move(fn)); } template diff --git a/src/core/lib/transport/call_state.h b/src/core/lib/transport/call_state.h index 3e9acd99c169e..d741c541f2fd4 100644 --- a/src/core/lib/transport/call_state.h +++ b/src/core/lib/transport/call_state.h @@ -20,10 +20,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/status_flag.h" +#include "src/core/util/crash.h" namespace grpc_core { @@ -52,7 +52,7 @@ class CallState { Poll> PollPullServerToClientMessageAvailable(); void FinishPullServerToClientMessage(); Poll PollServerTrailingMetadataAvailable(); - void FinishPullServerTrailingMetadata(); + bool WasServerTrailingMetadataPulled() const; Poll PollWasCancelled(); // Debug std::string DebugString() const; @@ -147,8 +147,6 @@ class CallState { kReading, // Main call loop: processing one message kProcessingServerToClientMessage, - // Processing server trailing metadata - kProcessingServerTrailingMetadata, kTerminated, }; static const char* ServerToClientPullStateString( @@ -172,8 +170,6 @@ class CallState { return "Reading"; case ServerToClientPullState::kProcessingServerToClientMessage: return "ProcessingServerToClientMessage"; - case ServerToClientPullState::kProcessingServerTrailingMetadata: - return "ProcessingServerTrailingMetadata"; case ServerToClientPullState::kTerminated: return "Terminated"; } @@ -294,7 +290,6 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void CallState::Start() { case ServerToClientPullState::kReading: case ServerToClientPullState::kProcessingServerToClientMessage: LOG(FATAL) << "Start called twice"; - case ServerToClientPullState::kProcessingServerTrailingMetadata: case ServerToClientPullState::kTerminated: break; } @@ -644,7 +639,6 @@ CallState::PollPullServerInitialMetadataAvailable() { case ServerToClientPullState::kIdle: case ServerToClientPullState::kReading: case ServerToClientPullState::kProcessingServerToClientMessage: - case ServerToClientPullState::kProcessingServerTrailingMetadata: LOG(FATAL) << "PollPullServerInitialMetadataAvailable called twice"; case ServerToClientPullState::kTerminated: return false; @@ -703,7 +697,6 @@ CallState::FinishPullServerInitialMetadata() { case ServerToClientPullState::kIdle: case ServerToClientPullState::kReading: case ServerToClientPullState::kProcessingServerToClientMessage: - case ServerToClientPullState::kProcessingServerTrailingMetadata: LOG(FATAL) << "Out of order FinishPullServerInitialMetadata"; case ServerToClientPullState::kTerminated: return; @@ -766,9 +759,6 @@ CallState::PollPullServerToClientMessageAvailable() { case ServerToClientPullState::kProcessingServerToClientMessage: LOG(FATAL) << "PollPullServerToClientMessageAvailable called while " "processing a message"; - case ServerToClientPullState::kProcessingServerTrailingMetadata: - LOG(FATAL) << "PollPullServerToClientMessageAvailable called while " - "processing trailing metadata"; case ServerToClientPullState::kTerminated: return Failure{}; } @@ -826,9 +816,6 @@ CallState::FinishPullServerToClientMessage() { server_to_client_pull_state_ = ServerToClientPullState::kIdle; server_to_client_pull_waiter_.Wake(); break; - case ServerToClientPullState::kProcessingServerTrailingMetadata: - LOG(FATAL) << "FinishPullServerToClientMessage called while processing " - "trailing metadata"; case ServerToClientPullState::kTerminated: break; } @@ -875,10 +862,7 @@ CallState::PollServerTrailingMetadataAvailable() { case ServerToClientPushState::kFinished: if (server_trailing_metadata_state_ != ServerTrailingMetadataState::kNotPushed) { - server_to_client_pull_state_ = - ServerToClientPullState::kProcessingServerTrailingMetadata; - server_to_client_pull_waiter_.Wake(); - return Empty{}; + break; // Ready for processing } ABSL_FALLTHROUGH_INTENDED; case ServerToClientPushState::kPushedServerInitialMetadata: @@ -894,26 +878,14 @@ CallState::PollServerTrailingMetadataAvailable() { case ServerToClientPullState::kIdle: if (server_trailing_metadata_state_ != ServerTrailingMetadataState::kNotPushed) { - server_to_client_pull_state_ = - ServerToClientPullState::kProcessingServerTrailingMetadata; - server_to_client_pull_waiter_.Wake(); - return Empty{}; + break; // Ready for processing } return server_trailing_metadata_waiter_.pending(); - case ServerToClientPullState::kProcessingServerTrailingMetadata: - LOG(FATAL) << "PollServerTrailingMetadataAvailable called twice"; case ServerToClientPullState::kTerminated: - return Empty{}; + break; } - Crash("Unreachable"); -} - -GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline void -CallState::FinishPullServerTrailingMetadata() { - GRPC_TRACE_LOG(call_state, INFO) - << "[call_state] FinishPullServerTrailingMetadata: " - << GRPC_DUMP_ARGS(this, server_trailing_metadata_state_, - server_trailing_metadata_waiter_.DebugString()); + server_to_client_pull_state_ = ServerToClientPullState::kTerminated; + server_to_client_pull_waiter_.Wake(); switch (server_trailing_metadata_state_) { case ServerTrailingMetadataState::kNotPushed: LOG(FATAL) << "FinishPullServerTrailingMetadata called before " @@ -931,6 +903,21 @@ CallState::FinishPullServerTrailingMetadata() { case ServerTrailingMetadataState::kPulledCancel: LOG(FATAL) << "FinishPullServerTrailingMetadata called twice"; } + return Empty{}; +} + +GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline bool +CallState::WasServerTrailingMetadataPulled() const { + switch (server_trailing_metadata_state_) { + case ServerTrailingMetadataState::kNotPushed: + case ServerTrailingMetadataState::kPushed: + case ServerTrailingMetadataState::kPushedCancel: + return false; + case ServerTrailingMetadataState::kPulled: + case ServerTrailingMetadataState::kPulledCancel: + return true; + } + GPR_UNREACHABLE_CODE(Crash("unreachable")); } GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline Poll diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc index 503ff1f7ea1de..9239f34f2be80 100644 --- a/src/core/lib/transport/connectivity_state.cc +++ b/src/core/lib/transport/connectivity_state.cc @@ -22,11 +22,11 @@ #include -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h index b72933ba86839..a986c66e9f558 100644 --- a/src/core/lib/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -30,8 +30,8 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index 2b3b776a27a0b..4a59efe3deb79 100644 --- a/src/core/lib/transport/error_utils.cc +++ b/src/core/lib/transport/error_utils.cc @@ -25,8 +25,8 @@ #include #include -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/transport/status_conversion.h" +#include "src/core/util/status_helper.h" static grpc_error_handle recursively_find_error_with_field( grpc_error_handle error, grpc_core::StatusIntProperty which) { diff --git a/src/core/lib/transport/error_utils.h b/src/core/lib/transport/error_utils.h index f10bfad63b6eb..9510081d00445 100644 --- a/src/core/lib/transport/error_utils.h +++ b/src/core/lib/transport/error_utils.h @@ -26,9 +26,9 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/http2_errors.h" +#include "src/core/util/time.h" /// A utility function to get the status code and message to be returned /// to the application. If not set in the top-level message, looks diff --git a/src/core/lib/transport/interception_chain.cc b/src/core/lib/transport/interception_chain.cc index d042f5d1f6c43..317c6cfa93a1b 100644 --- a/src/core/lib/transport/interception_chain.cc +++ b/src/core/lib/transport/interception_chain.cc @@ -18,11 +18,11 @@ #include -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/transport/call_destination.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/call_spine.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/lib/transport/interception_chain.h b/src/core/lib/transport/interception_chain.h index d3942c6fcfc91..82608e3a005b7 100644 --- a/src/core/lib/transport/interception_chain.h +++ b/src/core/lib/transport/interception_chain.h @@ -20,11 +20,11 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/transport/call_destination.h" #include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/call_spine.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/ref_counted.h" namespace grpc_core { diff --git a/src/core/lib/transport/message.h b/src/core/lib/transport/message.h index 6390e9886bed9..f7375d060a98d 100644 --- a/src/core/lib/transport/message.h +++ b/src/core/lib/transport/message.h @@ -49,6 +49,11 @@ class Message { std::string DebugString() const; + template + friend void AbslStringify(Sink& sink, const Message& message) { + sink.Append(message.DebugString()); + } + private: SliceBuffer payload_; uint32_t flags_ = 0; diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 6ede60d480c0e..4a2ca21bd2719 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -40,17 +40,17 @@ #include "src/core/lib/compression/compression_internal.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/chunked_vector.h" -#include "src/core/lib/gprpp/if_list.h" -#include "src/core/lib/gprpp/packed_table.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/type_list.h" #include "src/core/lib/promise/poll.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/custom_metadata.h" #include "src/core/lib/transport/metadata_compression_traits.h" #include "src/core/lib/transport/parsed_metadata.h" #include "src/core/lib/transport/simple_slice_based_metadata.h" +#include "src/core/util/chunked_vector.h" +#include "src/core/util/if_list.h" +#include "src/core/util/packed_table.h" +#include "src/core/util/time.h" +#include "src/core/util/type_list.h" namespace grpc_core { diff --git a/src/core/lib/transport/parsed_metadata.h b/src/core/lib/transport/parsed_metadata.h index 26e3264bb4c2f..1ea9c9a2e4ac4 100644 --- a/src/core/lib/transport/parsed_metadata.h +++ b/src/core/lib/transport/parsed_metadata.h @@ -32,8 +32,8 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/transport/promise_endpoint.cc b/src/core/lib/transport/promise_endpoint.cc index 355cf44333fb2..90b2e0ce5b813 100644 --- a/src/core/lib/transport/promise_endpoint.cc +++ b/src/core/lib/transport/promise_endpoint.cc @@ -28,8 +28,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/slice/slice_buffer.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/transport/promise_endpoint.h b/src/core/lib/transport/promise_endpoint.h index 4d810fbc75f00..077a1a01f70b2 100644 --- a/src/core/lib/transport/promise_endpoint.h +++ b/src/core/lib/transport/promise_endpoint.h @@ -38,7 +38,6 @@ #include "src/core/lib/event_engine/extensions/chaotic_good_extension.h" #include "src/core/lib/event_engine/query_extensions.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/cancel_callback.h" @@ -47,6 +46,7 @@ #include "src/core/lib/promise/poll.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/transport/status_conversion.h b/src/core/lib/transport/status_conversion.h index 6691a84d7298e..713321d4ea427 100644 --- a/src/core/lib/transport/status_conversion.h +++ b/src/core/lib/transport/status_conversion.h @@ -22,8 +22,8 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/transport/http2_errors.h" +#include "src/core/util/time.h" // Conversion of grpc status codes to http2 error codes (for RST_STREAM) grpc_http2_error_code grpc_status_to_http2_error(grpc_status_code status); diff --git a/src/core/lib/transport/timeout_encoding.h b/src/core/lib/transport/timeout_encoding.h index 58346c98c6de1..9957640a95bff 100644 --- a/src/core/lib/transport/timeout_encoding.h +++ b/src/core/lib/transport/timeout_encoding.h @@ -25,8 +25,8 @@ #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc index d5c285aadd72e..58d0869cf7e22 100644 --- a/src/core/lib/transport/transport.cc +++ b/src/core/lib/transport/transport.cc @@ -32,13 +32,13 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/for_each.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/promise/try_seq.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/time.h" void grpc_stream_destroy(grpc_stream_refcount* refcount) { if ((grpc_core::ExecCtx::Get()->flags() & diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 4c16314558cf9..9c34fb1efce7a 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -40,8 +40,6 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" @@ -62,6 +60,8 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport_fwd.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" // Minimum and maximum protocol accepted versions. #define GRPC_PROTOCOL_VERSION_MAX_MAJOR 2 diff --git a/src/core/lib/transport/transport_op_string.cc b/src/core/lib/transport/transport_op_string.cc index 40ea5bc2d8ac8..7141161ed0825 100644 --- a/src/core/lib/transport/transport_op_string.cc +++ b/src/core/lib/transport/transport_op_string.cc @@ -25,12 +25,12 @@ #include #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/status_helper.h" // These routines are here to facilitate debugging - they produce string // representations of various transport data structures diff --git a/src/core/load_balancing/address_filtering.cc b/src/core/load_balancing/address_filtering.cc index 4077eda12ab55..fe9834b170d65 100644 --- a/src/core/load_balancing/address_filtering.cc +++ b/src/core/load_balancing/address_filtering.cc @@ -25,8 +25,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/address_filtering.h b/src/core/load_balancing/address_filtering.h index 0c03092694e0d..7b7fda9ac74b0 100644 --- a/src/core/load_balancing/address_filtering.h +++ b/src/core/load_balancing/address_filtering.h @@ -27,9 +27,9 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_string.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_string.h" // The resolver returns a flat list of addresses. When a hierarchy of // LB policies is in use, each leaf of the hierarchy will need a diff --git a/src/core/load_balancing/child_policy_handler.cc b/src/core/load_balancing/child_policy_handler.cc index 869fb281a39e8..4ec9127b555f2 100644 --- a/src/core/load_balancing/child_policy_handler.cc +++ b/src/core/load_balancing/child_policy_handler.cc @@ -30,13 +30,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/debug_location.h" namespace grpc_core { diff --git a/src/core/load_balancing/child_policy_handler.h b/src/core/load_balancing/child_policy_handler.h index 9a964f020cda0..79b056a4070cc 100644 --- a/src/core/load_balancing/child_policy_handler.h +++ b/src/core/load_balancing/child_policy_handler.h @@ -25,9 +25,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/load_balancing/lb_policy.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/delegating_helper.h b/src/core/load_balancing/delegating_helper.h index fea9d48e0d7b1..0852319d8a937 100644 --- a/src/core/load_balancing/delegating_helper.h +++ b/src/core/load_balancing/delegating_helper.h @@ -28,12 +28,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/endpoint_list.cc b/src/core/load_balancing/endpoint_list.cc index 87ef758ab070e..7507aadc5b576 100644 --- a/src/core/load_balancing/endpoint_list.cc +++ b/src/core/load_balancing/endpoint_list.cc @@ -34,16 +34,16 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.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" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/pick_first/pick_first.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/endpoint_list.h b/src/core/load_balancing/endpoint_list.h index f6d1851624e27..eff8663d7e886 100644 --- a/src/core/load_balancing/endpoint_list.h +++ b/src/core/load_balancing/endpoint_list.h @@ -31,14 +31,14 @@ #include #include "src/core/lib/channel/channel_args.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" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc index bb86bdc1048c8..40de9f0c2bca2 100644 --- a/src/core/load_balancing/grpclb/client_load_reporting_filter.cc +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc @@ -28,7 +28,6 @@ #include #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/pipe.h" @@ -36,6 +35,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/load_balancing/grpclb/grpclb_client_stats.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/grpclb.cc b/src/core/load_balancing/grpclb/grpclb.cc index e71ba9913a0d3..d6e82fbb134f5 100644 --- a/src/core/load_balancing/grpclb/grpclb.cc +++ b/src/core/load_balancing/grpclb/grpclb.cc @@ -97,20 +97,10 @@ #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -139,11 +129,21 @@ #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/resolver/resolver.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" #define GRPC_GRPCLB_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_GRPCLB_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/load_balancing/grpclb/grpclb_client_stats.cc b/src/core/load_balancing/grpclb/grpclb_client_stats.cc index b21e56c908cbe..6ed75719e9c19 100644 --- a/src/core/load_balancing/grpclb/grpclb_client_stats.cc +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/grpclb_client_stats.h b/src/core/load_balancing/grpclb/grpclb_client_stats.h index 557d00429a912..d03462038f685 100644 --- a/src/core/load_balancing/grpclb/grpclb_client_stats.h +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.h @@ -30,9 +30,9 @@ #include #include -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/memory.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/load_balancer_api.cc b/src/core/load_balancing/grpclb/load_balancer_api.cc index cdfa14c88ca90..8cda3230ed5b7 100644 --- a/src/core/load_balancing/grpclb/load_balancer_api.cc +++ b/src/core/load_balancing/grpclb/load_balancer_api.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/memory.h" +#include "src/core/util/memory.h" #include "src/proto/grpc/lb/v1/load_balancer.upb.h" namespace grpc_core { diff --git a/src/core/load_balancing/grpclb/load_balancer_api.h b/src/core/load_balancing/grpclb/load_balancer_api.h index e948810e492e4..ebfdd0c84d6f1 100644 --- a/src/core/load_balancing/grpclb/load_balancer_api.h +++ b/src/core/load_balancing/grpclb/load_balancer_api.h @@ -28,8 +28,8 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/load_balancing/grpclb/grpclb_client_stats.h" +#include "src/core/util/time.h" #define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128 #define GRPC_GRPCLB_SERVER_IP_ADDRESS_MAX_SIZE 16 diff --git a/src/core/load_balancing/health_check_client.cc b/src/core/load_balancing/health_check_client.cc index 430c59f28f5ad..b2d3f1ac3a90d 100644 --- a/src/core/load_balancing/health_check_client.cc +++ b/src/core/load_balancing/health_check_client.cc @@ -47,11 +47,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -61,6 +56,11 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/load_balancing/health_check_client_internal.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/work_serializer.h" #include "src/proto/grpc/health/v1/health.upb.h" namespace grpc_core { @@ -166,11 +166,9 @@ void HealthProducer::HealthChecker::OnHealthWatchStatusChange( // Prepend the subchannel's address to the status if needed. absl::Status use_status; if (!status.ok()) { - std::string address_str = - grpc_sockaddr_to_uri(&producer_->subchannel_->address()) - .value_or(""); use_status = absl::Status( - status.code(), absl::StrCat(address_str, ": ", status.message())); + status.code(), absl::StrCat(producer_->subchannel_->address(), ": ", + status.message())); } work_serializer_->Schedule( [self = Ref(), state, status = std::move(use_status)]() mutable { @@ -405,13 +403,17 @@ void HealthProducer::OnConnectivityStateChange(grpc_connectivity_state state, << ": subchannel state update: state=" << ConnectivityStateName(state) << " status=" << status; MutexLock lock(&mu_); - state_ = state; - status_ = status; if (state == GRPC_CHANNEL_READY) { connected_subchannel_ = subchannel_->connected_subchannel(); + // If the subchannel became disconnected again before we got this + // notification, then just ignore the READY notification. We should + // get another notification shortly indicating a different state. + if (connected_subchannel_ == nullptr) return; } else { connected_subchannel_.reset(); } + state_ = state; + status_ = status; for (const auto& p : health_checkers_) { p.second->OnConnectivityStateChangeLocked(state, status); } diff --git a/src/core/load_balancing/health_check_client.h b/src/core/load_balancing/health_check_client.h index 03f42cd1e91cb..9fe4c1cdf171c 100644 --- a/src/core/load_balancing/health_check_client.h +++ b/src/core/load_balancing/health_check_client.h @@ -22,8 +22,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/health_check_client_internal.h b/src/core/load_balancing/health_check_client_internal.h index 0fc86ac285838..cded2e1df8cb2 100644 --- a/src/core/load_balancing/health_check_client_internal.h +++ b/src/core/load_balancing/health_check_client_internal.h @@ -34,14 +34,14 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/client_channel/subchannel_stream_client.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/lb_policy.h b/src/core/load_balancing/lb_policy.h index 37027c54bdfc7..bbfd775b02894 100644 --- a/src/core/load_balancing/lb_policy.h +++ b/src/core/load_balancing/lb_policy.h @@ -40,19 +40,19 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/lb_policy_factory.h b/src/core/load_balancing/lb_policy_factory.h index 697a53216672a..d05d356b71dfd 100644 --- a/src/core/load_balancing/lb_policy_factory.h +++ b/src/core/load_balancing/lb_policy_factory.h @@ -22,10 +22,10 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/lb_policy_registry.h b/src/core/load_balancing/lb_policy_registry.h index 44d1e487522c8..e0587f4856aca 100644 --- a/src/core/load_balancing/lb_policy_registry.h +++ b/src/core/load_balancing/lb_policy_registry.h @@ -25,11 +25,11 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/load_balancing/oob_backend_metric.cc b/src/core/load_balancing/oob_backend_metric.cc index 1073e74340078..87e9528379e87 100644 --- a/src/core/load_balancing/oob_backend_metric.cc +++ b/src/core/load_balancing/oob_backend_metric.cc @@ -42,12 +42,6 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_stream_client.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -56,6 +50,12 @@ #include "src/core/lib/slice/slice.h" #include "src/core/load_balancing/backend_metric_parser.h" #include "src/core/load_balancing/oob_backend_metric_internal.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/memory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/load_balancing/oob_backend_metric.h b/src/core/load_balancing/oob_backend_metric.h index 26ac8b1b12d7a..1c594d8e93c28 100644 --- a/src/core/load_balancing/oob_backend_metric.h +++ b/src/core/load_balancing/oob_backend_metric.h @@ -21,9 +21,9 @@ #include -#include "src/core/lib/gprpp/time.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/load_balancing/oob_backend_metric_internal.h b/src/core/load_balancing/oob_backend_metric_internal.h index 30f9ac158daa1..f39e852b01f83 100644 --- a/src/core/load_balancing/oob_backend_metric_internal.h +++ b/src/core/load_balancing/oob_backend_metric_internal.h @@ -30,13 +30,13 @@ #include "src/core/client_channel/subchannel.h" #include "src/core/client_channel/subchannel_interface_internal.h" #include "src/core/client_channel/subchannel_stream_client.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/oob_backend_metric.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.cc b/src/core/load_balancing/outlier_detection/outlier_detection.cc index 87cffdefe8178..aef81b7363ddc 100644 --- a/src/core/load_balancing/outlier_detection/outlier_detection.cc +++ b/src/core/load_balancing/outlier_detection/outlier_detection.cc @@ -50,14 +50,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -71,7 +63,15 @@ #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -159,11 +159,14 @@ class OutlierDetectionLb final : public LoadBalancingPolicy { class WatcherWrapper final : public SubchannelInterface::ConnectivityStateWatcherInterface { public: - WatcherWrapper(std::shared_ptr< + WatcherWrapper(WeakRefCountedPtr subchannel_wrapper, + std::shared_ptr< SubchannelInterface::ConnectivityStateWatcherInterface> health_watcher, bool ejected) - : watcher_(std::move(health_watcher)), ejected_(ejected) {} + : subchannel_wrapper_(std::move(subchannel_wrapper)), + watcher_(std::move(health_watcher)), + ejected_(ejected) {} void Eject() { ejected_ = true; @@ -171,7 +174,8 @@ class OutlierDetectionLb final : public LoadBalancingPolicy { watcher_->OnConnectivityStateChange( GRPC_CHANNEL_TRANSIENT_FAILURE, absl::UnavailableError( - "subchannel ejected by outlier detection")); + absl::StrCat(subchannel_wrapper_->address(), + ": subchannel ejected by outlier detection"))); } } @@ -192,7 +196,8 @@ class OutlierDetectionLb final : public LoadBalancingPolicy { if (ejected_) { new_state = GRPC_CHANNEL_TRANSIENT_FAILURE; status = absl::UnavailableError( - "subchannel ejected by outlier detection"); + absl::StrCat(subchannel_wrapper_->address(), + ": subchannel ejected by outlier detection")); } watcher_->OnConnectivityStateChange(new_state, status); } @@ -203,6 +208,7 @@ class OutlierDetectionLb final : public LoadBalancingPolicy { } private: + WeakRefCountedPtr subchannel_wrapper_; std::shared_ptr watcher_; absl::optional last_seen_state_; @@ -463,7 +469,8 @@ void OutlierDetectionLb::SubchannelWrapper::AddDataWatcher( if (w->type() == HealthProducer::Type()) { auto* health_watcher = static_cast(watcher.get()); auto watcher_wrapper = std::make_shared( - health_watcher->TakeWatcher(), ejected_); + WeakRefAsSubclass(), health_watcher->TakeWatcher(), + ejected_); watcher_wrapper_ = watcher_wrapper.get(); health_watcher->SetWatcher(std::move(watcher_wrapper)); } @@ -534,8 +541,8 @@ OutlierDetectionLb::Picker::Picker(OutlierDetectionLb* outlier_detection_lb, : picker_(std::move(picker)), counting_enabled_(counting_enabled) { GRPC_TRACE_LOG(outlier_detection_lb, INFO) << "[outlier_detection_lb " << outlier_detection_lb - << "] constructed new picker " << this << " and counting " - << "is " << (counting_enabled ? "enabled" : "disabled"); + << "] constructed new picker " << this << " and counting " << "is " + << (counting_enabled ? "enabled" : "disabled"); } LoadBalancingPolicy::PickResult OutlierDetectionLb::Picker::Pick( @@ -904,8 +911,8 @@ void OutlierDetectionLb::EjectionTimer::OnTimerLocked() { config.success_rate_ejection->minimum_hosts) { GRPC_TRACE_LOG(outlier_detection_lb, INFO) << "[outlier_detection_lb " << parent_.get() - << "] running success rate algorithm: " - << "stdev_factor=" << config.success_rate_ejection->stdev_factor + << "] running success rate algorithm: " << "stdev_factor=" + << config.success_rate_ejection->stdev_factor << ", enforcement_percentage=" << config.success_rate_ejection->enforcement_percentage; // calculate ejection threshold: (mean - stdev * @@ -957,8 +964,8 @@ void OutlierDetectionLb::EjectionTimer::OnTimerLocked() { config.failure_percentage_ejection->minimum_hosts) { GRPC_TRACE_LOG(outlier_detection_lb, INFO) << "[outlier_detection_lb " << parent_.get() - << "] running failure percentage algorithm: " - << "threshold=" << config.failure_percentage_ejection->threshold + << "] running failure percentage algorithm: " << "threshold=" + << config.failure_percentage_ejection->threshold << ", enforcement_percentage=" << config.failure_percentage_ejection->enforcement_percentage; for (auto& candidate : failure_percentage_ejection_candidates) { diff --git a/src/core/load_balancing/outlier_detection/outlier_detection.h b/src/core/load_balancing/outlier_detection/outlier_detection.h index ba5767914ec47..d862941e1fa45 100644 --- a/src/core/load_balancing/outlier_detection/outlier_detection.h +++ b/src/core/load_balancing/outlier_detection/outlier_detection.h @@ -23,11 +23,11 @@ #include -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/load_balancing/pick_first/pick_first.cc b/src/core/load_balancing/pick_first/pick_first.cc index c63424cada4bc..c977a032c5d37 100644 --- a/src/core/load_balancing/pick_first/pick_first.cc +++ b/src/core/load_balancing/pick_first/pick_first.cc @@ -46,12 +46,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/resolved_address.h" @@ -62,10 +56,16 @@ #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -648,7 +648,8 @@ void PickFirst::HealthWatcher::OnConnectivityStateChange( case GRPC_CHANNEL_TRANSIENT_FAILURE: policy_->channel_control_helper()->UpdateState( GRPC_CHANNEL_TRANSIENT_FAILURE, status, - MakeRefCounted(status)); + MakeRefCounted(absl::UnavailableError( + absl::StrCat("health watch: ", status.message())))); break; case GRPC_CHANNEL_SHUTDOWN: Crash("health watcher reported state SHUTDOWN"); @@ -1552,7 +1553,8 @@ void OldPickFirst::HealthWatcher::OnConnectivityStateChange( case GRPC_CHANNEL_TRANSIENT_FAILURE: policy_->channel_control_helper()->UpdateState( GRPC_CHANNEL_TRANSIENT_FAILURE, status, - MakeRefCounted(status)); + MakeRefCounted(absl::UnavailableError( + absl::StrCat("health watch: ", status.message())))); break; case GRPC_CHANNEL_SHUTDOWN: Crash("health watcher reported state SHUTDOWN"); @@ -1644,9 +1646,9 @@ void OldPickFirst::SubchannelList::SubchannelData::OnConnectivityStateChange( // If there is a pending update, switch to the pending update. if (p->latest_pending_subchannel_list_ != nullptr) { GRPC_TRACE_LOG(pick_first, INFO) - << "Pick First " << p << " promoting pending subchannel " - << "list " << p->latest_pending_subchannel_list_.get() - << " to replace " << p->subchannel_list_.get(); + << "Pick First " << p << " promoting pending subchannel list " + << p->latest_pending_subchannel_list_.get() << " to replace " + << p->subchannel_list_.get(); p->UnsetSelectedSubchannel(); p->subchannel_list_ = std::move(p->latest_pending_subchannel_list_); // Set our state to that of the pending subchannel list. diff --git a/src/core/load_balancing/priority/priority.cc b/src/core/load_balancing/priority/priority.cc index 07f9a529ddbc6..a747c2ce17f6e 100644 --- a/src/core/load_balancing/priority/priority.cc +++ b/src/core/load_balancing/priority/priority.cc @@ -42,13 +42,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/transport/connectivity_state.h" @@ -59,9 +52,16 @@ #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/ring_hash/ring_hash.cc b/src/core/load_balancing/ring_hash/ring_hash.cc index da108603a040f..5ca33543983d1 100644 --- a/src/core/load_balancing/ring_hash/ring_hash.cc +++ b/src/core/load_balancing/ring_hash/ring_hash.cc @@ -47,14 +47,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/gprpp/xxhash_inline.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -67,7 +59,15 @@ #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/pick_first/pick_first.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/work_serializer.h" +#include "src/core/util/xxhash_inline.h" namespace grpc_core { diff --git a/src/core/load_balancing/ring_hash/ring_hash.h b/src/core/load_balancing/ring_hash/ring_hash.h index c5f6205e1709e..da7e83b215a7a 100644 --- a/src/core/load_balancing/ring_hash/ring_hash.h +++ b/src/core/load_balancing/ring_hash/ring_hash.h @@ -21,12 +21,12 @@ #include -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/load_balancing/rls/rls.cc b/src/core/load_balancing/rls/rls.cc index 0318bd6740fc6..a02da17484ce9 100644 --- a/src/core/load_balancing/rls/rls.cc +++ b/src/core/load_balancing/rls/rls.cc @@ -68,21 +68,9 @@ #include "src/core/channelz/channelz.h" #include "src/core/client_channel/client_channel_filter.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/uuid_v4.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -103,11 +91,23 @@ #include "src/core/resolver/resolver_registry.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/dual_ref_counted.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/uuid_v4.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" #include "src/proto/grpc/lookup/v1/rls.upb.h" using ::grpc_event_engine::experimental::EventEngine; @@ -2590,7 +2590,7 @@ class RlsLbFactory final : public LoadBalancingPolicyFactory { absl::StatusOr> ParseLoadBalancingConfig(const Json& json) const override { return LoadFromJson>( - json, JsonArgs(), "errors validing RLS LB policy config"); + json, JsonArgs(), "errors validating RLS LB policy config"); } }; diff --git a/src/core/load_balancing/round_robin/round_robin.cc b/src/core/load_balancing/round_robin/round_robin.cc index 193c5a5582195..5c4c23370edb2 100644 --- a/src/core/load_balancing/round_robin/round_robin.cc +++ b/src/core/load_balancing/round_robin/round_robin.cc @@ -40,16 +40,16 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/load_balancing/endpoint_list.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -361,14 +361,10 @@ void RoundRobin::RoundRobinEndpointList:: (num_ready_ > 0 && AllEndpointsSeenInitialState()) || num_transient_failure_ == size())) { if (GRPC_TRACE_FLAG_ENABLED(round_robin)) { - const std::string old_counters_string = - round_robin->endpoint_list_ != nullptr - ? round_robin->endpoint_list_->CountersString() - : ""; LOG(INFO) << "[RR " << round_robin << "] swapping out child list " << round_robin->endpoint_list_.get() << " (" - << old_counters_string << ") in favor of " << this << " (" - << CountersString() << ")"; + << round_robin->endpoint_list_->CountersString() + << ") in favor of " << this << " (" << CountersString() << ")"; } round_robin->endpoint_list_ = std::move(round_robin->latest_pending_endpoint_list_); diff --git a/src/core/load_balancing/subchannel_interface.h b/src/core/load_balancing/subchannel_interface.h index 3610da9a07e08..b2d78fad05f87 100644 --- a/src/core/load_balancing/subchannel_interface.h +++ b/src/core/load_balancing/subchannel_interface.h @@ -21,13 +21,14 @@ #include #include "absl/status/status.h" +#include "absl/strings/string_view.h" #include #include -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/iomgr_fwd.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -102,6 +103,9 @@ class SubchannelInterface : public DualRefCounted { // make this API public. virtual void CancelDataWatcher(DataWatcherInterface* watcher) = 0; + // Return the address in URI format. + virtual std::string address() const = 0; + protected: void Orphaned() override {} }; @@ -136,6 +140,10 @@ class DelegatingSubchannel : public SubchannelInterface { wrapped_subchannel_->CancelDataWatcher(watcher); } + std::string address() const override { + return wrapped_subchannel_->address(); + } + private: RefCountedPtr wrapped_subchannel_; }; diff --git a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc index 144f1b00888ca..c0403f84bd18c 100644 --- a/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +++ b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc @@ -48,14 +48,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/transport/connectivity_state.h" @@ -71,9 +63,17 @@ #include "src/core/telemetry/metrics.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { @@ -947,12 +947,10 @@ void WeightedRoundRobin::WrrEndpointList:: (num_ready_ > 0 && AllEndpointsSeenInitialState()) || num_transient_failure_ == size())) { if (GRPC_TRACE_FLAG_ENABLED(weighted_round_robin_lb)) { - const std::string old_counters_string = - wrr->endpoint_list_ != nullptr ? wrr->endpoint_list_->CountersString() - : ""; LOG(INFO) << "[WRR " << wrr << "] swapping out endpoint list " - << wrr->endpoint_list_.get() << " (" << old_counters_string - << ") in favor of " << this << " (" << CountersString() << ")"; + << wrr->endpoint_list_.get() << " (" + << wrr->endpoint_list_->CountersString() << ") in favor of " + << this << " (" << CountersString() << ")"; } wrr->endpoint_list_ = std::move(wrr->latest_pending_endpoint_list_); } diff --git a/src/core/load_balancing/weighted_target/weighted_target.cc b/src/core/load_balancing/weighted_target/weighted_target.cc index 9724720fc65ea..8f5075a34098b 100644 --- a/src/core/load_balancing/weighted_target/weighted_target.cc +++ b/src/core/load_balancing/weighted_target/weighted_target.cc @@ -45,13 +45,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/transport/connectivity_state.h" @@ -62,9 +55,16 @@ #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" // IWYU pragma: no_include diff --git a/src/core/load_balancing/xds/cds.cc b/src/core/load_balancing/xds/cds.cc index 03ee2a00a1830..98072442af587 100644 --- a/src/core/load_balancing/xds/cds.cc +++ b/src/core/load_balancing/xds/cds.cc @@ -40,14 +40,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/address_filtering.h" #include "src/core/load_balancing/delegating_helper.h" @@ -57,10 +49,18 @@ #include "src/core/load_balancing/outlier_detection/outlier_detection.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/xds/xds_dependency_manager.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/work_serializer.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_health_status.h" diff --git a/src/core/load_balancing/xds/xds_cluster_impl.cc b/src/core/load_balancing/xds/xds_cluster_impl.cc index e66330a21dac6..eb1a4b3259a53 100644 --- a/src/core/load_balancing/xds/xds_cluster_impl.cc +++ b/src/core/load_balancing/xds/xds_cluster_impl.cc @@ -41,14 +41,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/credentials/xds/xds_credentials.h" @@ -65,15 +57,23 @@ #include "src/core/resolver/xds/xds_config.h" #include "src/core/resolver/xds/xds_resolver_attributes.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/sync.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/grpc/xds_endpoint.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_client.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/xds/xds_client/xds_locality.h" namespace grpc_core { @@ -189,13 +189,13 @@ class XdsClusterImplLb final : public LoadBalancingPolicy { private: class StatsSubchannelWrapper final : public DelegatingSubchannel { public: - // If load reporting is enabled and we have an XdsClusterLocalityStats + // If load reporting is enabled and we have a ClusterLocalityStats // object, that object already contains the locality label. We // need to store the locality label directly only in the case where // load reporting is disabled. using LocalityData = absl::variant< RefCountedStringValue /*locality*/, - RefCountedPtr /*locality_stats*/>; + RefCountedPtr /*locality_stats*/>; StatsSubchannelWrapper( RefCountedPtr wrapped_subchannel, @@ -209,20 +209,20 @@ class XdsClusterImplLb final : public LoadBalancingPolicy { return Match( locality_data_, [](RefCountedStringValue locality) { return locality; }, - [](const RefCountedPtr& locality_stats) { + [](const RefCountedPtr& + locality_stats) { return locality_stats->locality_name()->human_readable_string(); }); } - XdsClusterLocalityStats* locality_stats() const { + LrsClient::ClusterLocalityStats* locality_stats() const { return Match( locality_data_, [](const RefCountedStringValue&) { - return static_cast(nullptr); + return static_cast(nullptr); }, - [](const RefCountedPtr& locality_stats) { - return locality_stats.get(); - }); + [](const RefCountedPtr& + locality_stats) { return locality_stats.get(); }); } const grpc_event_engine::experimental::Slice& hostname() const { @@ -250,7 +250,7 @@ class XdsClusterImplLb final : public LoadBalancingPolicy { RefCountedStringValue service_telemetry_label_; RefCountedStringValue namespace_telemetry_label_; RefCountedPtr drop_config_; - RefCountedPtr drop_stats_; + RefCountedPtr drop_stats_; RefCountedPtr picker_; }; @@ -304,7 +304,7 @@ class XdsClusterImplLb final : public LoadBalancingPolicy { RefCountedPtr xds_client_; // The stats for client-side load reporting. - RefCountedPtr drop_stats_; + RefCountedPtr drop_stats_; OrphanablePtr child_policy_; @@ -324,7 +324,7 @@ class XdsClusterImplLb::Picker::SubchannelCallTracker final SubchannelCallTracker( std::unique_ptr original_subchannel_call_tracker, - RefCountedPtr locality_stats, + RefCountedPtr locality_stats, RefCountedPtr call_counter) : original_subchannel_call_tracker_( std::move(original_subchannel_call_tracker)), @@ -380,7 +380,7 @@ class XdsClusterImplLb::Picker::SubchannelCallTracker final private: std::unique_ptr original_subchannel_call_tracker_; - RefCountedPtr locality_stats_; + RefCountedPtr locality_stats_; RefCountedPtr call_counter_; #ifndef NDEBUG bool started_ = false; @@ -454,7 +454,7 @@ LoadBalancingPolicy::PickResult XdsClusterImplLb::Picker::Pick( subchannel_wrapper->locality()); } // Handle load reporting. - RefCountedPtr locality_stats; + RefCountedPtr locality_stats; if (subchannel_wrapper->locality_stats() != nullptr) { locality_stats = subchannel_wrapper->locality_stats()->Ref( DEBUG_LOCATION, "SubchannelCallTracker"); @@ -618,14 +618,15 @@ absl::Status XdsClusterImplLb::UpdateLocked(UpdateArgs args) { // Note: We need a drop stats object whenever load reporting is enabled, // even if we have no EDS drop config, because we also use it when // reporting circuit breaker drops. - if (!new_cluster_config.cluster->lrs_load_reporting_server.has_value()) { + if (new_cluster_config.cluster->lrs_load_reporting_server == nullptr) { drop_stats_.reset(); } else if (cluster_resource_ == nullptr || old_eds_service_name != new_eds_service_name || - cluster_resource_->lrs_load_reporting_server != - new_cluster_config.cluster->lrs_load_reporting_server) { - drop_stats_ = xds_client_->AddClusterDropStats( - *new_cluster_config.cluster->lrs_load_reporting_server, + !LrsServersEqual( + cluster_resource_->lrs_load_reporting_server, + new_cluster_config.cluster->lrs_load_reporting_server)) { + drop_stats_ = xds_client_->lrs_client().AddClusterDropStats( + new_cluster_config.cluster->lrs_load_reporting_server, new_config->cluster_name(), new_eds_service_name); if (drop_stats_ == nullptr) { LOG(ERROR) @@ -819,12 +820,13 @@ RefCountedPtr XdsClusterImplLb::Helper::CreateSubchannel( // (if load reporting is enabled) the locality stats object, which // will be used by the picker. auto locality_name = per_address_args.GetObjectRef(); - RefCountedPtr locality_stats; - if (parent()->cluster_resource_->lrs_load_reporting_server.has_value()) { - locality_stats = parent()->xds_client_->AddClusterLocalityStats( - parent()->cluster_resource_->lrs_load_reporting_server.value(), - parent()->config_->cluster_name(), - GetEdsResourceName(*parent()->cluster_resource_), locality_name); + RefCountedPtr locality_stats; + if (parent()->cluster_resource_->lrs_load_reporting_server != nullptr) { + locality_stats = + parent()->xds_client_->lrs_client().AddClusterLocalityStats( + parent()->cluster_resource_->lrs_load_reporting_server, + parent()->config_->cluster_name(), + GetEdsResourceName(*parent()->cluster_resource_), locality_name); if (locality_stats == nullptr) { LOG(ERROR) << "[xds_cluster_impl_lb " << parent() diff --git a/src/core/load_balancing/xds/xds_cluster_manager.cc b/src/core/load_balancing/xds/xds_cluster_manager.cc index 5d3dfd9e8bc4f..4e72ca1170cc5 100644 --- a/src/core/load_balancing/xds/xds_cluster_manager.cc +++ b/src/core/load_balancing/xds/xds_cluster_manager.cc @@ -41,12 +41,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/transport/connectivity_state.h" @@ -57,9 +51,15 @@ #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/xds/xds_resolver_attributes.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/load_balancing/xds/xds_override_host.cc b/src/core/load_balancing/xds/xds_override_host.cc index 62a1632f2ca8e..1c64eeb0a134d 100644 --- a/src/core/load_balancing/xds/xds_override_host.cc +++ b/src/core/load_balancing/xds/xds_override_host.cc @@ -55,14 +55,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -78,9 +70,17 @@ #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/xds/xds_config.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/sync.h" +#include "src/core/util/validation_errors.h" +#include "src/core/util/work_serializer.h" #include "src/core/xds/grpc/xds_health_status.h" namespace grpc_core { diff --git a/src/core/load_balancing/xds/xds_override_host.h b/src/core/load_balancing/xds/xds_override_host.h index 226b55dee01d9..387a5036491c6 100644 --- a/src/core/load_balancing/xds/xds_override_host.h +++ b/src/core/load_balancing/xds/xds_override_host.h @@ -21,12 +21,12 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/load_balancing/xds/xds_wrr_locality.cc b/src/core/load_balancing/xds/xds_wrr_locality.cc index 7435032ceeb0f..efdb91844d6ae 100644 --- a/src/core/load_balancing/xds/xds_wrr_locality.cc +++ b/src/core/load_balancing/xds/xds_wrr_locality.cc @@ -34,11 +34,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/ref_counted_string.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/lb_policy.h" @@ -46,11 +41,16 @@ #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_writer.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/validation_errors.h" +#include "src/core/xds/xds_client/xds_locality.h" namespace grpc_core { diff --git a/src/core/resolver/binder/binder_resolver.cc b/src/core/resolver/binder/binder_resolver.cc index f8da4cfd5ed1d..30f7e46cc19b1 100644 --- a/src/core/resolver/binder/binder_resolver.cc +++ b/src/core/resolver/binder/binder_resolver.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/port.h" // IWYU pragma: keep +#include "src/core/util/status_helper.h" #ifdef GRPC_HAVE_UNIX_SOCKET @@ -45,13 +45,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" namespace grpc_core { namespace { diff --git a/src/core/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/resolver/dns/c_ares/dns_resolver_ares.cc index dbd8fc34a3e92..564fa165d8d91 100644 --- a/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/resolver/dns/c_ares/dns_resolver_ares.cc @@ -38,22 +38,22 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/dns/event_engine/service_config_helper.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/service_config/service_config.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" #if GRPC_ARES == 1 @@ -61,7 +61,6 @@ #include "absl/strings/str_cat.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -71,6 +70,7 @@ #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/polling_resolver.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/backoff.h" #define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h index 652921cb66869..5a75c6c743139 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -27,11 +27,11 @@ #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc index ce54f647f1596..634ab525e84ff 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc @@ -39,7 +39,6 @@ #include "absl/log/check.h" #include "absl/strings/str_cat.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/ev_posix.h" @@ -47,6 +46,7 @@ #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc index 9b9a79b320620..d7757fb9fc488 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc @@ -38,8 +38,6 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr_windows.h" #include "src/core/lib/iomgr/socket_windows.h" @@ -48,6 +46,8 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" #include "src/core/util/string.h" // TODO(apolcyn): remove this hack after fixing upstream. diff --git a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc index 50161653ea4c6..e0efc6075b6bc 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +++ b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/util/status_helper.h" // IWYU pragma: no_include // IWYU pragma: no_include @@ -60,9 +60,6 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/nameser.h" // IWYU pragma: keep @@ -70,7 +67,10 @@ #include "src/core/lib/iomgr/timer.h" #include "src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" using grpc_core::EndpointAddresses; using grpc_core::EndpointAddressesList; @@ -388,7 +388,7 @@ static void on_readable(void* arg, grpc_error_handle error) { // this ev_driver will be cancelled by the following ares_cancel() and the // on_done callbacks will be invoked with a status of ARES_ECANCELLED. The // remaining file descriptors in this ev_driver will be cleaned up in the - // follwing grpc_ares_notify_on_event_locked(). + // following grpc_ares_notify_on_event_locked(). ares_cancel(ev_driver->channel); } grpc_ares_notify_on_event_locked(ev_driver); @@ -413,7 +413,7 @@ static void on_writable(void* arg, grpc_error_handle error) { // this ev_driver will be cancelled by the following ares_cancel() and the // on_done callbacks will be invoked with a status of ARES_ECANCELLED. The // remaining file descriptors in this ev_driver will be cleaned up in the - // follwing grpc_ares_notify_on_event_locked(). + // following grpc_ares_notify_on_event_locked(). ares_cancel(ev_driver->channel); } grpc_ares_notify_on_event_locked(ev_driver); @@ -910,7 +910,7 @@ grpc_error_handle grpc_dns_lookup_ares_continued( grpc_core::SplitHostPort(name, host, port); if (host->empty()) { error = - GRPC_ERROR_CREATE(absl::StrCat("unparseable host:port \"", name, "\"")); + GRPC_ERROR_CREATE(absl::StrCat("unparsable host:port \"", name, "\"")); return error; } else if (check_port && port->empty()) { if (default_port == nullptr || strlen(default_port) == 0) { diff --git a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h index bd4fbe2720f33..5ed2f9cc51e1f 100644 --- a/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -31,11 +31,11 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/sync.h" #define GRPC_DNS_ARES_DEFAULT_QUERY_TIMEOUT_MS 120000 diff --git a/src/core/resolver/dns/dns_resolver_plugin.cc b/src/core/resolver/dns/dns_resolver_plugin.cc index 0a3c78488edf7..7e9870543b267 100644 --- a/src/core/resolver/dns/dns_resolver_plugin.cc +++ b/src/core/resolver/dns/dns_resolver_plugin.cc @@ -22,11 +22,11 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/resolver/dns/c_ares/dns_resolver_ares.h" #include "src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h" #include "src/core/resolver/dns/native/dns_resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc index 3efb937523dbe..c65b1d506fb54 100644 --- a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +++ b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.cc @@ -38,15 +38,9 @@ #include #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/resolved_address_internal.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" @@ -57,6 +51,12 @@ #include "src/core/resolver/resolver_factory.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" // IWYU pragma: no_include diff --git a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h index 65a21e4a02f4c..555e91fedefcb 100644 --- a/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h +++ b/src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h @@ -17,10 +17,10 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/resolver/dns/event_engine/service_config_helper.cc b/src/core/resolver/dns/event_engine/service_config_helper.cc index 92cea5ec517e4..ba0b910e327bd 100644 --- a/src/core/resolver/dns/event_engine/service_config_helper.cc +++ b/src/core/resolver/dns/event_engine/service_config_helper.cc @@ -23,13 +23,13 @@ #include -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/iomgr/gethostname.h" +#include "src/core/util/gethostname.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/resolver/dns/native/dns_resolver.cc b/src/core/resolver/dns/native/dns_resolver.cc index 1a3ca55f9b054..8ee4b549f65b5 100644 --- a/src/core/resolver/dns/native/dns_resolver.cc +++ b/src/core/resolver/dns/native/dns_resolver.cc @@ -31,21 +31,21 @@ #include #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.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" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/polling_resolver.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" #define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/resolver/fake/fake_resolver.cc b/src/core/resolver/fake/fake_resolver.cc index b1659f84bf46b..b2bbaf26193f2 100644 --- a/src/core/resolver/fake/fake_resolver.cc +++ b/src/core/resolver/fake/fake_resolver.cc @@ -30,12 +30,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" #include "src/core/util/useful.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/resolver/fake/fake_resolver.h b/src/core/resolver/fake/fake_resolver.h index 75dc3ab0ca428..5126c74157722 100644 --- a/src/core/resolver/fake/fake_resolver.h +++ b/src/core/resolver/fake/fake_resolver.h @@ -27,11 +27,11 @@ #include #include -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/resolver/resolver.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" #define GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR \ diff --git a/src/core/resolver/google_c2p/google_c2p_resolver.cc b/src/core/resolver/google_c2p/google_c2p_resolver.cc index 7925273841707..42e309f900c98 100644 --- a/src/core/resolver/google_c2p/google_c2p_resolver.cc +++ b/src/core/resolver/google_c2p/google_c2p_resolver.cc @@ -34,22 +34,22 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" #include "src/core/util/gcp_metadata_query.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/xds_client/xds_bootstrap.h" diff --git a/src/core/resolver/polling_resolver.cc b/src/core/resolver/polling_resolver.cc index ec1af27059930..27806f1e5a9d9 100644 --- a/src/core/resolver/polling_resolver.cc +++ b/src/core/resolver/polling_resolver.cc @@ -32,15 +32,15 @@ #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/service_config/service_config.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/resolver/polling_resolver.h b/src/core/resolver/polling_resolver.h index 53b0270ec07a8..fe405c3f1d4af 100644 --- a/src/core/resolver/polling_resolver.h +++ b/src/core/resolver/polling_resolver.h @@ -26,15 +26,15 @@ #include #include -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/backoff.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/time.h" +#include "src/core/util/work_serializer.h" namespace grpc_core { diff --git a/src/core/resolver/resolver.h b/src/core/resolver/resolver.h index 6b6e92c6660aa..389096c3d8fa8 100644 --- a/src/core/resolver/resolver.h +++ b/src/core/resolver/resolver.h @@ -27,11 +27,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/server_address.h" // IWYU pragma: keep #include "src/core/service_config/service_config.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/resolver/resolver_factory.h b/src/core/resolver/resolver_factory.h index e4cc534738687..831b67c5cfcfd 100644 --- a/src/core/resolver/resolver_factory.h +++ b/src/core/resolver/resolver_factory.h @@ -26,10 +26,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/iomgr_fwd.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/resolver/resolver_registry.h b/src/core/resolver/resolver_registry.h index cb8512d7e53e5..5e1d87fbf6bf1 100644 --- a/src/core/resolver/resolver_registry.h +++ b/src/core/resolver/resolver_registry.h @@ -27,11 +27,11 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/iomgr_fwd.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/resolver/sockaddr/sockaddr_resolver.cc b/src/core/resolver/sockaddr/sockaddr_resolver.cc index 26e3fa2eed4a3..1cd1ac310cf03 100644 --- a/src/core/resolver/sockaddr/sockaddr_resolver.cc +++ b/src/core/resolver/sockaddr/sockaddr_resolver.cc @@ -29,13 +29,13 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/resolver/xds/xds_config.cc b/src/core/resolver/xds/xds_config.cc index 1fcb2aa81c7a1..70158b1c36536 100644 --- a/src/core/resolver/xds/xds_config.cc +++ b/src/core/resolver/xds/xds_config.cc @@ -24,7 +24,7 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/resolver/xds/xds_config.h b/src/core/resolver/xds/xds_config.h index 9c328a205783d..784db2fc48733 100644 --- a/src/core/resolver/xds/xds_config.h +++ b/src/core/resolver/xds/xds_config.h @@ -27,7 +27,7 @@ #include "absl/strings/string_view.h" #include "absl/types/variant.h" -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_endpoint.h" #include "src/core/xds/grpc/xds_listener.h" diff --git a/src/core/resolver/xds/xds_dependency_manager.cc b/src/core/resolver/xds/xds_dependency_manager.cc index 293586f40f5bf..3ed9fa1da92ff 100644 --- a/src/core/resolver/xds/xds_dependency_manager.cc +++ b/src/core/resolver/xds/xds_dependency_manager.cc @@ -22,12 +22,10 @@ #include "absl/log/log.h" #include "absl/strings/str_join.h" -#include - #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/fake/fake_resolver.h" +#include "src/core/util/match.h" #include "src/core/xds/grpc/xds_cluster_parser.h" #include "src/core/xds/grpc/xds_endpoint_parser.h" #include "src/core/xds/grpc/xds_listener_parser.h" diff --git a/src/core/resolver/xds/xds_dependency_manager.h b/src/core/resolver/xds/xds_dependency_manager.h index b2b62ddf2224b..dcb1738b4f150 100644 --- a/src/core/resolver/xds/xds_dependency_manager.h +++ b/src/core/resolver/xds/xds_dependency_manager.h @@ -21,9 +21,9 @@ #include "absl/container/flat_hash_set.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/xds/xds_config.h" +#include "src/core/util/ref_counted.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_endpoint.h" diff --git a/src/core/resolver/xds/xds_resolver.cc b/src/core/resolver/xds/xds_resolver.cc index 9013474cca710..833468a7b29b0 100644 --- a/src/core/resolver/xds/xds_resolver.cc +++ b/src/core/resolver/xds/xds_resolver.cc @@ -58,15 +58,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/gprpp/xxhash_inline.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/arena_promise.h" @@ -75,7 +66,6 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/ring_hash/ring_hash.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" @@ -84,6 +74,16 @@ #include "src/core/resolver/xds/xds_resolver_attributes.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" +#include "src/core/util/xxhash_inline.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/resolver/xds/xds_resolver_attributes.h b/src/core/resolver/xds/xds_resolver_attributes.h index 385505a732d56..63f2684f2a1ed 100644 --- a/src/core/resolver/xds/xds_resolver_attributes.h +++ b/src/core/resolver/xds/xds_resolver_attributes.h @@ -21,8 +21,8 @@ #include -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/unique_type_name.h" #include "src/core/xds/grpc/xds_route_config.h" namespace grpc_core { diff --git a/src/core/server/server.cc b/src/core/server/server.cc index c957fac6ae23f..573cd66b22409 100644 --- a/src/core/server/server.cc +++ b/src/core/server/server.cc @@ -52,11 +52,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/mpscq.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/promise/activity.h" @@ -82,6 +77,11 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/interception_chain.h" #include "src/core/telemetry/stats.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/mpscq.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/status_helper.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/server/server.h b/src/core/server/server.h index 974fbea581413..4bd2273eac318 100644 --- a/src/core/server/server.h +++ b/src/core/server/server.h @@ -46,17 +46,10 @@ #include #include "src/core/channelz/channelz.h" -#include "src/core/lib/backoff/random_early_detection.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/cpp_impl_of.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" @@ -70,6 +63,13 @@ #include "src/core/lib/transport/transport.h" #include "src/core/server/server_interface.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/cpp_impl_of.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/random_early_detection.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS "grpc.server.max_pending_requests" #define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS_HARD_LIMIT \ diff --git a/src/core/server/server_config_selector.h b/src/core/server/server_config_selector.h index c6274f49f35a5..4d76641980937 100644 --- a/src/core/server/server_config_selector.h +++ b/src/core/server/server_config_selector.h @@ -24,12 +24,12 @@ #include -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/server/server_config_selector_filter.cc b/src/core/server/server_config_selector_filter.cc index 3773eeb3b78f6..b17ea44930a4c 100644 --- a/src/core/server/server_config_selector_filter.cc +++ b/src/core/server/server_config_selector_filter.cc @@ -29,9 +29,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/promise.h" @@ -41,6 +38,9 @@ #include "src/core/server/server_config_selector.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/server/xds_channel_stack_modifier.h b/src/core/server/xds_channel_stack_modifier.h index 4cea9e165e717..78810478d9913 100644 --- a/src/core/server/xds_channel_stack_modifier.h +++ b/src/core/server/xds_channel_stack_modifier.h @@ -29,8 +29,8 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/server/xds_server_config_fetcher.cc b/src/core/server/xds_server_config_fetcher.cc index 1bd258bd3d3a6..f8b523a293e78 100644 --- a/src/core/server/xds_server_config_fetcher.cc +++ b/src/core/server/xds_server_config_fetcher.cc @@ -54,12 +54,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" @@ -71,13 +65,19 @@ #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/credentials/xds/xds_credentials.h" #include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/server/server.h" #include "src/core/server/server_config_selector.h" #include "src/core/server/server_config_selector_filter.h" #include "src/core/server/xds_channel_stack_modifier.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/match.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/uri.h" #include "src/core/xds/grpc/certificate_provider_store.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_certificate_provider.h" @@ -677,8 +677,16 @@ void XdsServerConfigFetcher::ListenerWatcher:: // It should get cleaned up eventually. Ignore this update. return; } + bool first_good_update = filter_chain_match_manager_ == nullptr; + // Promote the pending FilterChainMatchManager + filter_chain_match_manager_ = std::move(pending_filter_chain_match_manager_); + // TODO(yashykt): Right now, the server_config_watcher_ does not invoke + // XdsServerConfigFetcher while holding a lock, but that might change in the + // future in which case we would want to execute this update outside the + // critical region through a WorkSerializer similar to XdsClient. + server_config_watcher_->UpdateConnectionManager(filter_chain_match_manager_); // Let the logger know about the update if there was no previous good update. - if (filter_chain_match_manager_ == nullptr) { + if (first_good_update) { if (serving_status_notifier_.on_serving_status_update != nullptr) { serving_status_notifier_.on_serving_status_update( serving_status_notifier_.user_data, listening_address_.c_str(), @@ -688,13 +696,6 @@ void XdsServerConfigFetcher::ListenerWatcher:: << listening_address_; } } - // Promote the pending FilterChainMatchManager - filter_chain_match_manager_ = std::move(pending_filter_chain_match_manager_); - // TODO(yashykt): Right now, the server_config_watcher_ does not invoke - // XdsServerConfigFetcher while holding a lock, but that might change in the - // future in which case we would want to execute this update outside the - // critical region through a WorkSerializer similar to XdsClient. - server_config_watcher_->UpdateConnectionManager(filter_chain_match_manager_); } // diff --git a/src/core/service_config/service_config.h b/src/core/service_config/service_config.h index ba5fa8262ae82..f9c43c3501189 100644 --- a/src/core/service_config/service_config.h +++ b/src/core/service_config/service_config.h @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/ref_counted.h" #include "src/core/util/useful.h" // The main purpose of the code here is to parse the service config in diff --git a/src/core/service_config/service_config_call_data.h b/src/core/service_config/service_config_call_data.h index 6d11caedab0b7..7c6bbcd2e398b 100644 --- a/src/core/service_config/service_config_call_data.h +++ b/src/core/service_config/service_config_call_data.h @@ -24,13 +24,13 @@ #include -#include "src/core/lib/gprpp/chunked_vector.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/chunked_vector.h" +#include "src/core/util/down_cast.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/service_config/service_config_channel_arg_filter.cc b/src/core/service_config/service_config_channel_arg_filter.cc index 063ecbd987a22..54b1ae0d4117b 100644 --- a/src/core/service_config/service_config_channel_arg_filter.cc +++ b/src/core/service_config/service_config_channel_arg_filter.cc @@ -36,7 +36,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" @@ -47,6 +46,7 @@ #include "src/core/service_config/service_config_call_data.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/service_config/service_config_impl.cc b/src/core/service_config/service_config_impl.cc index 034e635690b04..a52442e09ec99 100644 --- a/src/core/service_config/service_config_impl.cc +++ b/src/core/service_config/service_config_impl.cc @@ -29,8 +29,6 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/service_config/service_config_parser.h" @@ -39,6 +37,8 @@ #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/memory.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/service_config/service_config_impl.h b/src/core/service_config/service_config_impl.h index a36a803abf31e..ca1d3d17dfbc5 100644 --- a/src/core/service_config/service_config_impl.h +++ b/src/core/service_config/service_config_impl.h @@ -32,12 +32,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" // The main purpose of the code here is to parse the service config in // JSON form, which will look like this: diff --git a/src/core/service_config/service_config_parser.h b/src/core/service_config/service_config_parser.h index 9b7983a768010..caac10a4bc8c1 100644 --- a/src/core/service_config/service_config_parser.h +++ b/src/core/service_config/service_config_parser.h @@ -29,8 +29,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/telemetry/call_tracer.h b/src/core/telemetry/call_tracer.h index d822768d7e626..ab9185e237320 100644 --- a/src/core/telemetry/call_tracer.h +++ b/src/core/telemetry/call_tracer.h @@ -30,7 +30,6 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_string.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" @@ -38,6 +37,7 @@ #include "src/core/lib/transport/call_final_info.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/ref_counted_string.h" namespace grpc_core { diff --git a/src/core/telemetry/metrics.cc b/src/core/telemetry/metrics.cc index adf5393942f6c..45e2ab64bfc38 100644 --- a/src/core/telemetry/metrics.cc +++ b/src/core/telemetry/metrics.cc @@ -21,7 +21,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_core { diff --git a/src/core/telemetry/metrics.h b/src/core/telemetry/metrics.h index 2f60ff541dc2d..b61e30d1fef9d 100644 --- a/src/core/telemetry/metrics.h +++ b/src/core/telemetry/metrics.h @@ -29,11 +29,11 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/telemetry/stats.h b/src/core/telemetry/stats.h index b1026abbb28d7..8d783dea5d75e 100644 --- a/src/core/telemetry/stats.h +++ b/src/core/telemetry/stats.h @@ -29,9 +29,9 @@ #include -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/telemetry/histogram_view.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/no_destruct.h" namespace grpc_core { diff --git a/src/core/telemetry/stats_data.h b/src/core/telemetry/stats_data.h index 89f360e2686c7..d0e7e5fd2679b 100644 --- a/src/core/telemetry/stats_data.h +++ b/src/core/telemetry/stats_data.h @@ -26,8 +26,8 @@ #include -#include "src/core/lib/gprpp/per_cpu.h" #include "src/core/telemetry/histogram_view.h" +#include "src/core/util/per_cpu.h" namespace grpc_core { class HistogramCollector_100000_20; diff --git a/src/core/tsi/alts/frame_protector/alts_frame_protector.cc b/src/core/tsi/alts/frame_protector/alts_frame_protector.cc index 09415c413d6d0..b8593f225e2e2 100644 --- a/src/core/tsi/alts/frame_protector/alts_frame_protector.cc +++ b/src/core/tsi/alts/frame_protector/alts_frame_protector.cc @@ -30,11 +30,11 @@ #include #include -#include "src/core/lib/gprpp/memory.h" #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/alts/frame_protector/alts_crypter.h" #include "src/core/tsi/alts/frame_protector/frame_handler.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/memory.h" constexpr size_t kMinFrameLength = 1024; constexpr size_t kDefaultFrameLength = 16 * 1024; @@ -380,6 +380,7 @@ tsi_result alts_create_frame_protector(const uint8_t* key, size_t key_size, if (status != GRPC_STATUS_OK) { LOG(ERROR) << "Failed to create ALTS crypters, " << error_details; gpr_free(error_details); + gpr_free(impl); return TSI_INTERNAL_ERROR; } /// diff --git a/src/core/tsi/alts/frame_protector/frame_handler.cc b/src/core/tsi/alts/frame_protector/frame_handler.cc index be0d227759bc1..a4e86f9799829 100644 --- a/src/core/tsi/alts/frame_protector/frame_handler.cc +++ b/src/core/tsi/alts/frame_protector/frame_handler.cc @@ -29,8 +29,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" // Use little endian to interpret a string of bytes as uint32_t. static uint32_t load_32_le(const unsigned char* buffer) { diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index 5f402f8c8eb3d..f5513e574d45a 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -29,15 +29,15 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h" #include "src/core/tsi/alts/handshaker/alts_tsi_utils.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/sync.h" #define TSI_ALTS_INITIAL_BUFFER_SIZE 256 diff --git a/src/core/tsi/alts/handshaker/alts_shared_resource.cc b/src/core/tsi/alts/handshaker/alts_shared_resource.cc index 8407ee7cac3df..06d4e5e1936cb 100644 --- a/src/core/tsi/alts/handshaker/alts_shared_resource.cc +++ b/src/core/tsi/alts/handshaker/alts_shared_resource.cc @@ -23,8 +23,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" +#include "src/core/util/crash.h" static alts_shared_resource_dedicated g_alts_resource_dedicated; diff --git a/src/core/tsi/alts/handshaker/alts_shared_resource.h b/src/core/tsi/alts/handshaker/alts_shared_resource.h index 43265edfbfd09..11d6b60657856 100644 --- a/src/core/tsi/alts/handshaker/alts_shared_resource.h +++ b/src/core/tsi/alts/handshaker/alts_shared_resource.h @@ -23,9 +23,9 @@ #include #include -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/thd.h" /// /// Main struct containing ALTS shared resources used when diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc index 16d86e278567b..79b497bda7e5a 100644 --- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc @@ -34,8 +34,6 @@ #include #include -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" @@ -43,6 +41,8 @@ #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h" +#include "src/core/util/memory.h" +#include "src/core/util/sync.h" // Main struct for ALTS TSI handshaker. struct alts_tsi_handshaker { diff --git a/src/core/tsi/alts/handshaker/transport_security_common_api.h b/src/core/tsi/alts/handshaker/transport_security_common_api.h index 81819c09e766e..b59142aa68a04 100644 --- a/src/core/tsi/alts/handshaker/transport_security_common_api.h +++ b/src/core/tsi/alts/handshaker/transport_security_common_api.h @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/gcp/transport_security_common.upb.h" // C struct coresponding to protobuf message RpcProtocolVersions.Version diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc index c520f942683b4..89c5dcfaa6f4d 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_integrity_only_record_protocol.cc @@ -26,11 +26,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" +#include "src/core/util/crash.h" // Main struct for alts_grpc_integrity_only_record_protocol. typedef struct alts_grpc_integrity_only_record_protocol { diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc index c919522e4a1ea..2a568cd446e8c 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_privacy_integrity_record_protocol.cc @@ -23,11 +23,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.h" #include "src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.h" +#include "src/core/util/crash.h" // Privacy-integrity alts_grpc_record_protocol object uses the same struct // defined in alts_grpc_record_protocol_common.h. diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc index d8d7106bb716c..d4e77898e3514 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_grpc_record_protocol_common.cc @@ -26,9 +26,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" const size_t kInitialIovecBufferSize = 8; diff --git a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc index 2ae8bb534da65..908ed2934fd6d 100644 --- a/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +++ b/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/tsi/alts/frame_protector/alts_counter.h" +#include "src/core/util/crash.h" struct alts_iovec_record_protocol { alts_counter* ctr; diff --git a/src/core/tsi/fake_transport_security.cc b/src/core/tsi/fake_transport_security.cc index 83af8b25c69ce..e01dce2c687f6 100644 --- a/src/core/tsi/fake_transport_security.cc +++ b/src/core/tsi/fake_transport_security.cc @@ -27,12 +27,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/transport_security_grpc.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" // --- Constants. --- #define TSI_FAKE_FRAME_HEADER_SIZE 4 diff --git a/src/core/tsi/local_transport_security.cc b/src/core/tsi/local_transport_security.cc index 30a2ef7f670c5..bb25a25db4167 100644 --- a/src/core/tsi/local_transport_security.cc +++ b/src/core/tsi/local_transport_security.cc @@ -28,9 +28,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/transport_security_grpc.h" +#include "src/core/util/crash.h" namespace { diff --git a/src/core/tsi/ssl/key_logging/ssl_key_logging.cc b/src/core/tsi/ssl/key_logging/ssl_key_logging.cc index 4782dafb443f1..510a55bfc27c9 100644 --- a/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +++ b/src/core/tsi/ssl/key_logging/ssl_key_logging.cc @@ -21,10 +21,10 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" using TlsSessionKeyLogger = tsi::TlsSessionKeyLoggerCache::TlsSessionKeyLogger; diff --git a/src/core/tsi/ssl/key_logging/ssl_key_logging.h b/src/core/tsi/ssl/key_logging/ssl_key_logging.h index ec420acc228b2..c3752c1e7b0d9 100644 --- a/src/core/tsi/ssl/key_logging/ssl_key_logging.h +++ b/src/core/tsi/ssl/key_logging/ssl_key_logging.h @@ -27,9 +27,9 @@ #include #include -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/memory.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" namespace tsi { diff --git a/src/core/tsi/ssl/session_cache/ssl_session.h b/src/core/tsi/ssl/session_cache/ssl_session.h index d56451ec7fb2c..f990f3dfd5212 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session.h +++ b/src/core/tsi/ssl/session_cache/ssl_session.h @@ -26,7 +26,7 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" // The main purpose of code here is to provide means to cache SSL sessions // in a way that they can be shared between connections. diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc index d6c5d556b9c39..7c27f36e2abd0 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc @@ -24,10 +24,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/ssl/session_cache/ssl_session.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" namespace tsi { diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.h b/src/core/tsi/ssl/session_cache/ssl_session_cache.h index 881a69cf006e7..024262c9c9092 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_cache.h +++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.h @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/cpp_impl_of.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/tsi/ssl/session_cache/ssl_session.h" +#include "src/core/util/cpp_impl_of.h" +#include "src/core/util/memory.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" /// Cache for SSL sessions for sessions resumption. /// diff --git a/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc index ad427950e1d9b..ad78488415b02 100644 --- a/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +++ b/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc @@ -19,8 +19,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/tsi/ssl/session_cache/ssl_session.h" +#include "src/core/util/crash.h" #ifndef OPENSSL_IS_BORINGSSL diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 3149eb283fedb..4718417435154 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -21,8 +21,11 @@ #include #include +#include + #include +#include "src/core/lib/surface/init.h" #include "src/core/tsi/transport_security_interface.h" // TODO(jboeuf): refactor inet_ntop into a portability header. @@ -60,13 +63,13 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/tls/grpc_tls_crl_provider.h" #include "src/core/tsi/ssl/key_logging/ssl_key_logging.h" #include "src/core/tsi/ssl/session_cache/ssl_session_cache.h" #include "src/core/tsi/ssl_transport_security_utils.h" #include "src/core/tsi/ssl_types.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" // --- Constants. --- @@ -189,6 +192,11 @@ static void verified_root_cert_free(void* /*parent*/, void* ptr, static void init_openssl(void) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 OPENSSL_init_ssl(0, nullptr); + // Ensure OPENSSL global clean up happens after gRPC shutdown completes. + // OPENSSL registers an exit handler to clean up global objects, which + // otherwise may happen before gRPC removes all references to OPENSSL. Below + // exit handler is guaranteed to run after OPENSSL's. + std::atexit([]() { grpc_wait_for_shutdown_with_timeout(absl::Seconds(2)); }); #else SSL_library_init(); SSL_load_error_strings(); diff --git a/src/core/tsi/test_creds/BUILD b/src/core/tsi/test_creds/BUILD index f6072bc552bde..eeac5e35d7ba8 100644 --- a/src/core/tsi/test_creds/BUILD +++ b/src/core/tsi/test_creds/BUILD @@ -32,4 +32,6 @@ exports_files([ "multi-domain.pem", "leaf_signed_by_intermediate.key", "leaf_and_intermediate_chain.pem", + "malformed-cert.pem", + "malformed-key.pem", ]) diff --git a/src/core/tsi/test_creds/README b/src/core/tsi/test_creds/README index f3a6679e39ce4..d092361183bfc 100644 --- a/src/core/tsi/test_creds/README +++ b/src/core/tsi/test_creds/README @@ -13,6 +13,13 @@ When prompted for certificate information, everything is default except the common name which is set to badserver.test.google.com. +Malformed credentials (malformed.*): +===================================== + +These are invalid PEM blocks. They can be built by generating a valid +PEM-encoded certificate or private key and deleting a random character in the +body of the PEM-encoding. + Valid test credentials: ======================= diff --git a/src/core/tsi/test_creds/malformed-cert.pem b/src/core/tsi/test_creds/malformed-cert.pem new file mode 100644 index 0000000000000..59326fceebf59 --- /dev/null +++ b/src/core/tsi/test_creds/malformed-cert.pem @@ -0,0 +1,22 @@ +-----BEGIN CERTIFICATE----- +MIIDszCCApugAwIBAgIUONWbkUn1obHCw9L7lMNEE5REvb8wDQYJKoZIhvcNAQEL +BQAwaTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM +GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEiMCAGA1UEAwwZYmFkY2xpZW50LnRl +c3QuZ29vZ2xlLmNvbTAeFw0yMDAzMTcxNzQzMjNaFw0zMDAzMTUxNzQzMjNaMGkx +CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl +cm5ldCBXaWRnaXRzIFB0eSBMdGQxIjAgBgNVBAMMGWJhZGNsaWVudC50ZXN0Lmdv +b2dsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvdzKDTYvR +gjBOUOrzDwkAZGwNFHHlMYyMGI5tItj3tCzXkbpM0uz3ZjHVahu+eYc+KvYApM64 +F2dBb16hs713FCk8mihYABjnSndrQsl/U2v8YFT7DipfLReqqaOGu2o9HdvWfiUl +aiC/UGGfR+YblpK7CG+7/hvTXtUsMw+OppoeH9z87rhOJMxtiC7XwU5rhEmab/1f +1XM/nLoZrfDAcTbDywoeu826SJ3mifajq7oK3LDdNLjWZwfEsCO1qp2C4gLvBlOO +KsWOLNby6ByxCOPlCTa0UCaVuoNclYol71jyi17KW+Nk0nNe9yaVcyr6H0z3bImf +JhbSu4rzI93nAgMBAAGjUzBRB0GA1UdDgQWBBTKJskEYd2ndrwihPTg2PzYF/kP +gzAfBgNVHSMEGDAWgBTKJskEYd2ndrwihPTg2PzYF/kPgzAPBgNVHRMBAf8EBTAD +AQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBoGwWR0pLM1icX4bIJ6yduFU/A4jSiqET6 +gvJhwgErilqTKfH6Y89rqtzW8k4UurAOCsE4FA6wbkHWwrUMnClY4lkHJh+MuNaJ +nCGrK8wRKGb/mqW9d5pP72Et1Q6OW6DAKqGfjDWh2MzSPHBxcCLeyigO1wqd4W1T +nvvql6l4L+B5IT/c+/EHO3PwbI9v6MGTtLjsZgkRKItaPh+YeJdmBYhRD1BvWb6s +VwEb7aQ1oSF+esUvMmjGVuHXuQvWJahnjYdYT2DikyqR+AwaKzre4GJMHsX3/Cf8 +qdxyI+B1jUwNr7sLA2EYDjnUR0jEHcrOBSpIQyRMGWduj0P16yb9 +-----END CERTIFICATE----- diff --git a/src/core/tsi/test_creds/malformed-key.pem b/src/core/tsi/test_creds/malformed-key.pem new file mode 100644 index 0000000000000..238055d7c9d25 --- /dev/null +++ b/src/core/tsi/test_creds/malformed-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDvdzKDTYvRgjBO +UOrzDwkAZGwNFHHlMYyMGI5tItj3tCzXkbpM0uz3ZjHVahu+eYc+KvYApM64F2dB +b16hs713FCk8mihYABjnSndrQsl/U2v8YFT7DipfLReqqaOGu2o9HdvWfiUlaiC/ +UGGfR+YblpK7CG+7/hvTXtUsMw+OppoeH9z87rhOJMxtiC7XwU5rhEmab/1f1XM/ +nLoZrfDAcTbDywoeu826SJ3mifajq7oK3LDdNLjWZwfEsCO1qp2C4gLvBlOOKsWO +LNby6ByxCOPlCTa0UCaVuoNclYol71jyi17KW+Nk0nNe9yaVcyr6H0z3bImfJhbS +u4rzI93nAgMBAAECggEBAOIPOJRTpGaH7GpCYUpLK0g/hPFkF5EyEWg/1lSYzRIp ++RsX6zOS+zkiNHEv1jkeKNo7XDiHXM7U6RkQtdkZAQdk9PjM3sEUdm4CEnIjfmzA +p/R8TD0kxkNLIkhuFH2gd05y3ZHDS/XiFkAE9eOT0FrC7om6ESD7ZfFIWR18pncW +ZGq7tFAZZRmpkum2D+MJy1gWxIXBxt5madTEpRxQd56toEnfx372F0y4zkcX3pnE +4H6FaJUBjdvKl2QzF5c0jBqgxMRvWP5YfNu8+dmaQORPkpzSptOPmZM9VKV+tJVS +1xnOI6DtrnNZRojegR/E6KhNyiPTYy97UgYzdKS+SSECgYEA+wgSIqrfkeqqotJx +cGxF4x9v/ldKr5hlhJNoKXLkepkcrvhhxfHKgjWz1nZY/+Rpg42GFMvxWRrGTMIJ +ddiOr24p0HCkusWRMKQL7XxvuHDq0ro8SGqXzqWGuH31R+YNP8dy2pqd3OlwzTgg +8v0wwzx8AuyP5Ys4M20Ewv7Xuy0CgYEA9DSGMU8jmjxJ/uPDCXWOEAqtE78wTtIw +uMBv+ge0inc37xf+fN6D/ziTrJvgw/XyT15pmQdOlXx3Sg1h9XBZeIlaeCdFWrFB +oYrVsiuoXRswfkFwA0yOkCsHyGiI4TE0W1rGbqP158IjwXPczBswWI7i/D6LpINL +BD7YYpfHmeMCgYB08AiKr7Cf54H/gSqo5TcVGzLvdzhqXgKEZKp0DHpUhfivpTLe +o8jjKSMSN2U0JvHj/0xDdGO4YMYhJcll3C4VggSejaybpA46WJJCdt9PtSUv36P +eWAoOkFstfhJuufXGxDstnPtUa1jW881gi5x9D4MmqhZlKXkhtdeApr6LQKBgQDd +ItsJt9JTjpirGfC5lhwI5sIICa9jEO9RveEoluWkJYUfG6k1xgHdkYwYWCdXDFZa +DPKuwnEk6MrU4f181joO7sJf35/sGmuGL0SHzQTvGvn0uqkGM8M9RdoMXqzkzzvM +Jg1ej1bUgXcDbTnaEhzbdLiTFsg5NzMtKwOjdDIpZQKBgEIHeJIqiGjYgf7mUlX2 +vNWgFNlzApkFSCQ8TkzkDOjtCdSHfdRDJ6+q8cS2TSQ7QPoAlI1woS0G48TNbVSo +wD0jNVRTdpA6R5FPsg09ohB/caSn0zlGVha2GS08ceYrn7nn4PSZ/UIYTm3pjUlV +H5tvHv0gG2C5vy3tIYQtSQCk +-----END PRIVATE KEY---- diff --git a/src/core/util/README.md b/src/core/util/README.md index 21fb0c796db48..b07a40223f75d 100644 --- a/src/core/util/README.md +++ b/src/core/util/README.md @@ -1,8 +1,11 @@ -# GPR - Google Portable Runtime for C +# Utility Code -The files in this directory contain basic utility code and platform -abstractions for C code. None of this code is gRPC-specific; anything -here may also be useful for other open source projects written in C. +The files in this directory contain various utility libraries and platform +abstractions for C++ code. None of this code is gRPC-specific; anything +here may also be useful for other open source projects written in C++. +In principle, any library here could be replaced with an external +dependency that provides the same functionality if such an external +library should become available. Note that this is one of the few places in src/core where we allow the use of portability macros. diff --git a/src/core/util/alloc.cc b/src/core/util/alloc.cc index 6afba483d4c66..b89d49ff102ba 100644 --- a/src/core/util/alloc.cc +++ b/src/core/util/alloc.cc @@ -25,7 +25,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" void* gpr_malloc(size_t size) { void* p; diff --git a/src/core/lib/gprpp/atomic_utils.h b/src/core/util/atomic_utils.h similarity index 90% rename from src/core/lib/gprpp/atomic_utils.h rename to src/core/util/atomic_utils.h index 3ecc18305b6d9..bdf647159aa5c 100644 --- a/src/core/lib/gprpp/atomic_utils.h +++ b/src/core/util/atomic_utils.h @@ -16,13 +16,13 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_ATOMIC_UTILS_H -#define GRPC_SRC_CORE_LIB_GPRPP_ATOMIC_UTILS_H - -#include +#ifndef GRPC_SRC_CORE_UTIL_ATOMIC_UTILS_H +#define GRPC_SRC_CORE_UTIL_ATOMIC_UTILS_H #include +#include + namespace grpc_core { // Atomically increment a counter only if the counter value is not zero. @@ -44,4 +44,4 @@ inline bool IncrementIfNonzero(std::atomic* p) { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_ATOMIC_UTILS_H +#endif // GRPC_SRC_CORE_UTIL_ATOMIC_UTILS_H diff --git a/src/core/lib/avl/avl.h b/src/core/util/avl.h similarity index 97% rename from src/core/lib/avl/avl.h rename to src/core/util/avl.h index 928db42ac9377..23a510e949f41 100644 --- a/src/core/lib/avl/avl.h +++ b/src/core/util/avl.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_AVL_AVL_H -#define GRPC_SRC_CORE_LIB_AVL_AVL_H +#ifndef GRPC_SRC_CORE_UTIL_AVL_H +#define GRPC_SRC_CORE_UTIL_AVL_H + +#include #include @@ -21,10 +23,8 @@ #include #include -#include - -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" namespace grpc_core { @@ -322,4 +322,4 @@ class AVL { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_AVL_AVL_H +#endif // GRPC_SRC_CORE_UTIL_AVL_H diff --git a/src/core/lib/backoff/backoff.cc b/src/core/util/backoff.cc similarity index 94% rename from src/core/lib/backoff/backoff.cc rename to src/core/util/backoff.cc index b4a520d13d1cc..edae00cf3c880 100644 --- a/src/core/lib/backoff/backoff.cc +++ b/src/core/util/backoff.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/backoff/backoff.h" +#include + +#include "src/core/util/backoff.h" #include diff --git a/src/core/lib/backoff/backoff.h b/src/core/util/backoff.h similarity index 93% rename from src/core/lib/backoff/backoff.h rename to src/core/util/backoff.h index 75e87d3d44597..34860793647c7 100644 --- a/src/core/lib/backoff/backoff.h +++ b/src/core/util/backoff.h @@ -16,12 +16,12 @@ // // -#ifndef GRPC_SRC_CORE_LIB_BACKOFF_BACKOFF_H -#define GRPC_SRC_CORE_LIB_BACKOFF_BACKOFF_H +#ifndef GRPC_SRC_CORE_UTIL_BACKOFF_H +#define GRPC_SRC_CORE_UTIL_BACKOFF_H #include "absl/random/random.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" namespace grpc_core { @@ -84,4 +84,4 @@ class BackOff { }; } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_BACKOFF_BACKOFF_H +#endif // GRPC_SRC_CORE_UTIL_BACKOFF_H diff --git a/src/core/lib/gprpp/bitset.h b/src/core/util/bitset.h similarity index 98% rename from src/core/lib/gprpp/bitset.h rename to src/core/util/bitset.h index c224bd257d541..eec06814586b7 100644 --- a/src/core/lib/gprpp/bitset.h +++ b/src/core/util/bitset.h @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_BITSET_H -#define GRPC_SRC_CORE_LIB_GPRPP_BITSET_H +#ifndef GRPC_SRC_CORE_UTIL_BITSET_H +#define GRPC_SRC_CORE_UTIL_BITSET_H + +#include #include #include #include -#include - #include "src/core/util/useful.h" namespace grpc_core { @@ -222,4 +222,4 @@ class BitSet<0> { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_BITSET_H +#endif // GRPC_SRC_CORE_UTIL_BITSET_H diff --git a/src/core/lib/gprpp/chunked_vector.h b/src/core/util/chunked_vector.h similarity index 97% rename from src/core/lib/gprpp/chunked_vector.h rename to src/core/util/chunked_vector.h index a90f455d46cf1..b85c7e2e7ae7b 100644 --- a/src/core/lib/gprpp/chunked_vector.h +++ b/src/core/util/chunked_vector.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_CHUNKED_VECTOR_H -#define GRPC_SRC_CORE_LIB_GPRPP_CHUNKED_VECTOR_H +#ifndef GRPC_SRC_CORE_UTIL_CHUNKED_VECTOR_H +#define GRPC_SRC_CORE_UTIL_CHUNKED_VECTOR_H + +#include #include #include @@ -21,10 +23,8 @@ #include "absl/log/check.h" -#include - -#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/manual_constructor.h" namespace grpc_core { @@ -254,4 +254,4 @@ class ChunkedVector { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_CHUNKED_VECTOR_H +#endif // GRPC_SRC_CORE_UTIL_CHUNKED_VECTOR_H diff --git a/src/core/lib/gprpp/construct_destruct.h b/src/core/util/construct_destruct.h similarity index 87% rename from src/core/lib/gprpp/construct_destruct.h rename to src/core/util/construct_destruct.h index 62e4df4bc5937..fba1284a886b6 100644 --- a/src/core/lib/gprpp/construct_destruct.h +++ b/src/core/util/construct_destruct.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_CONSTRUCT_DESTRUCT_H -#define GRPC_SRC_CORE_LIB_GPRPP_CONSTRUCT_DESTRUCT_H +#ifndef GRPC_SRC_CORE_UTIL_CONSTRUCT_DESTRUCT_H +#define GRPC_SRC_CORE_UTIL_CONSTRUCT_DESTRUCT_H + +#include #include #include -#include - namespace grpc_core { // Call the destructor of p without having to name the type of p. @@ -37,4 +37,4 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION void Construct(T* p, Args&&... args) { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_CONSTRUCT_DESTRUCT_H +#endif // GRPC_SRC_CORE_UTIL_CONSTRUCT_DESTRUCT_H diff --git a/src/core/lib/gprpp/cpp_impl_of.h b/src/core/util/cpp_impl_of.h similarity index 90% rename from src/core/lib/gprpp/cpp_impl_of.h rename to src/core/util/cpp_impl_of.h index 292da05ee7acb..d4936ceafe016 100644 --- a/src/core/lib/gprpp/cpp_impl_of.h +++ b/src/core/util/cpp_impl_of.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_CPP_IMPL_OF_H -#define GRPC_SRC_CORE_LIB_GPRPP_CPP_IMPL_OF_H +#ifndef GRPC_SRC_CORE_UTIL_CPP_IMPL_OF_H +#define GRPC_SRC_CORE_UTIL_CPP_IMPL_OF_H namespace grpc_core { @@ -46,4 +46,4 @@ class CppImplOf { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_CPP_IMPL_OF_H +#endif // GRPC_SRC_CORE_UTIL_CPP_IMPL_OF_H diff --git a/src/core/lib/gprpp/crash.cc b/src/core/util/crash.cc similarity index 96% rename from src/core/lib/gprpp/crash.cc rename to src/core/util/crash.cc index 35128d73a114c..9ab5a9852ba0d 100644 --- a/src/core/lib/gprpp/crash.cc +++ b/src/core/util/crash.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/crash.h" +#include + +#include "src/core/util/crash.h" #include #include @@ -22,8 +24,6 @@ #include "absl/log/log.h" #include "absl/strings/str_cat.h" -#include - namespace grpc_core { void Crash(absl::string_view message, SourceLocation location) { diff --git a/src/core/lib/gprpp/crash.h b/src/core/util/crash.h similarity index 86% rename from src/core/lib/gprpp/crash.h rename to src/core/util/crash.h index 274f1296ca968..9d0b19a5d0a1a 100644 --- a/src/core/lib/gprpp/crash.h +++ b/src/core/util/crash.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_CRASH_H -#define GRPC_SRC_CORE_LIB_GPRPP_CRASH_H - -#include "absl/strings/string_view.h" +#ifndef GRPC_SRC_CORE_UTIL_CRASH_H +#define GRPC_SRC_CORE_UTIL_CRASH_H #include -#include "src/core/lib/gprpp/debug_location.h" +#include "absl/strings/string_view.h" + +#include "src/core/util/debug_location.h" namespace grpc_core { @@ -34,4 +34,4 @@ namespace grpc_core { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_CRASH_H +#endif // GRPC_SRC_CORE_UTIL_CRASH_H diff --git a/src/core/lib/gprpp/debug_location.h b/src/core/util/debug_location.h similarity index 94% rename from src/core/lib/gprpp/debug_location.h rename to src/core/util/debug_location.h index 89a948da7f6ab..ff52fb49a0c13 100644 --- a/src/core/lib/gprpp/debug_location.h +++ b/src/core/util/debug_location.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_DEBUG_LOCATION_H -#define GRPC_SRC_CORE_LIB_GPRPP_DEBUG_LOCATION_H +#ifndef GRPC_SRC_CORE_UTIL_DEBUG_LOCATION_H +#define GRPC_SRC_CORE_UTIL_DEBUG_LOCATION_H + +#include #include #include "absl/strings/str_cat.h" -#include - #if defined(__has_builtin) #if __has_builtin(__builtin_FILE) #define GRPC_DEFAULT_FILE __builtin_FILE() @@ -103,4 +103,4 @@ struct ValueWithDebugLocation { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_DEBUG_LOCATION_H +#endif // GRPC_SRC_CORE_UTIL_DEBUG_LOCATION_H diff --git a/src/core/lib/gprpp/directory_reader.h b/src/core/util/directory_reader.h similarity index 89% rename from src/core/lib/gprpp/directory_reader.h rename to src/core/util/directory_reader.h index 73dac02d41ce1..9b3be1a883859 100644 --- a/src/core/lib/gprpp/directory_reader.h +++ b/src/core/util/directory_reader.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_DIRECTORY_READER_H -#define GRPC_SRC_CORE_LIB_GPRPP_DIRECTORY_READER_H +#ifndef GRPC_SRC_CORE_UTIL_DIRECTORY_READER_H +#define GRPC_SRC_CORE_UTIL_DIRECTORY_READER_H + +#include #include @@ -25,8 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { class DirectoryReader { @@ -45,4 +45,4 @@ std::unique_ptr MakeDirectoryReader( } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_DIRECTORY_READER_H \ No newline at end of file +#endif // GRPC_SRC_CORE_UTIL_DIRECTORY_READER_H \ No newline at end of file diff --git a/src/core/lib/gprpp/down_cast.h b/src/core/util/down_cast.h similarity index 91% rename from src/core/lib/gprpp/down_cast.h rename to src/core/util/down_cast.h index e7c05bf4b7822..3a7bc3a14fc35 100644 --- a/src/core/lib/gprpp/down_cast.h +++ b/src/core/util/down_cast.h @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_DOWN_CAST_H -#define GRPC_SRC_CORE_LIB_GPRPP_DOWN_CAST_H +#ifndef GRPC_SRC_CORE_UTIL_DOWN_CAST_H +#define GRPC_SRC_CORE_UTIL_DOWN_CAST_H + +#include #include #include "absl/base/config.h" #include "absl/log/check.h" -#include - namespace grpc_core { template @@ -45,4 +45,4 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION To DownCast(From& f) { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_DOWN_CAST_H +#endif // GRPC_SRC_CORE_UTIL_DOWN_CAST_H diff --git a/src/core/lib/gprpp/dual_ref_counted.h b/src/core/util/dual_ref_counted.h similarity index 97% rename from src/core/lib/gprpp/dual_ref_counted.h rename to src/core/util/dual_ref_counted.h index 2d5ed351889ba..6f3e3c43af634 100644 --- a/src/core/lib/gprpp/dual_ref_counted.h +++ b/src/core/util/dual_ref_counted.h @@ -14,8 +14,10 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_DUAL_REF_COUNTED_H -#define GRPC_SRC_CORE_LIB_GPRPP_DUAL_REF_COUNTED_H +#ifndef GRPC_SRC_CORE_UTIL_DUAL_REF_COUNTED_H +#define GRPC_SRC_CORE_UTIL_DUAL_REF_COUNTED_H + +#include #include #include @@ -23,13 +25,11 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include - -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/down_cast.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -374,4 +374,4 @@ class DualRefCounted : public Impl { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_DUAL_REF_COUNTED_H +#endif // GRPC_SRC_CORE_UTIL_DUAL_REF_COUNTED_H diff --git a/src/core/lib/gprpp/dump_args.cc b/src/core/util/dump_args.cc similarity index 97% rename from src/core/lib/gprpp/dump_args.cc rename to src/core/util/dump_args.cc index 1e2972f6dd709..bd82483bfcd95 100644 --- a/src/core/lib/gprpp/dump_args.cc +++ b/src/core/util/dump_args.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/dump_args.h" +#include "src/core/util/dump_args.h" #include "absl/log/check.h" #include "absl/strings/ascii.h" diff --git a/src/core/lib/gprpp/dump_args.h b/src/core/util/dump_args.h similarity index 95% rename from src/core/lib/gprpp/dump_args.h rename to src/core/util/dump_args.h index 1e89fa48c65d5..02519075c36d3 100644 --- a/src/core/lib/gprpp/dump_args.h +++ b/src/core/util/dump_args.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_DUMP_ARGS_H -#define GRPC_SRC_CORE_LIB_GPRPP_DUMP_ARGS_H +#ifndef GRPC_SRC_CORE_UTIL_DUMP_ARGS_H +#define GRPC_SRC_CORE_UTIL_DUMP_ARGS_H #include #include @@ -114,4 +114,4 @@ class DumpArgs { #define GRPC_DUMP_ARGS(...) \ grpc_core::dump_args_detail::DumpArgs(#__VA_ARGS__, __VA_ARGS__) -#endif // GRPC_SRC_CORE_LIB_GPRPP_DUMP_ARGS_H \ No newline at end of file +#endif // GRPC_SRC_CORE_UTIL_DUMP_ARGS_H diff --git a/src/core/lib/gprpp/env.h b/src/core/util/env.h similarity index 92% rename from src/core/lib/gprpp/env.h rename to src/core/util/env.h index 381cb4612758d..558941deb09f6 100644 --- a/src/core/lib/gprpp/env.h +++ b/src/core/util/env.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_ENV_H -#define GRPC_SRC_CORE_LIB_GPRPP_ENV_H +#ifndef GRPC_SRC_CORE_UTIL_ENV_H +#define GRPC_SRC_CORE_UTIL_ENV_H + +#include #include #include "absl/types/optional.h" -#include - namespace grpc_core { // Gets the environment variable value with the specified name. */ @@ -50,4 +50,4 @@ void SetOrUnsetEnv(const char* name, const absl::optional& value) { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_ENV_H +#endif // GRPC_SRC_CORE_UTIL_ENV_H diff --git a/src/core/lib/debug/event_log.cc b/src/core/util/event_log.cc similarity index 98% rename from src/core/lib/debug/event_log.cc rename to src/core/util/event_log.cc index 48dbb5809a885..6bb1427f89e4a 100644 --- a/src/core/lib/debug/event_log.cc +++ b/src/core/util/event_log.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/debug/event_log.h" +#include + +#include "src/core/util/event_log.h" #include #include @@ -21,8 +23,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" -#include - namespace grpc_core { std::atomic EventLog::g_instance_{nullptr}; diff --git a/src/core/lib/debug/event_log.h b/src/core/util/event_log.h similarity index 91% rename from src/core/lib/debug/event_log.h rename to src/core/util/event_log.h index dd8aa07aa3dda..f77967d57f2a5 100644 --- a/src/core/lib/debug/event_log.h +++ b/src/core/util/event_log.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_DEBUG_EVENT_LOG_H -#define GRPC_SRC_CORE_LIB_DEBUG_EVENT_LOG_H +#ifndef GRPC_SRC_CORE_UTIL_EVENT_LOG_H +#define GRPC_SRC_CORE_UTIL_EVENT_LOG_H + +#include #include @@ -25,10 +27,8 @@ #include "absl/strings/string_view.h" #include "absl/types/span.h" -#include - -#include "src/core/lib/gprpp/per_cpu.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/per_cpu.h" +#include "src/core/util/sync.h" #include "src/core/util/time_precise.h" namespace grpc_core { @@ -78,4 +78,4 @@ class EventLog { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_DEBUG_EVENT_LOG_H +#endif // GRPC_SRC_CORE_UTIL_EVENT_LOG_H diff --git a/src/core/lib/gprpp/examine_stack.cc b/src/core/util/examine_stack.cc similarity index 96% rename from src/core/lib/gprpp/examine_stack.cc rename to src/core/util/examine_stack.cc index a6bc54231928e..96799b2a30c8d 100644 --- a/src/core/lib/gprpp/examine_stack.cc +++ b/src/core/util/examine_stack.cc @@ -16,10 +16,10 @@ // // -#include "src/core/lib/gprpp/examine_stack.h" - #include +#include "src/core/util/examine_stack.h" + namespace grpc_core { gpr_current_stack_trace_func g_current_stack_trace_provider = nullptr; diff --git a/src/core/lib/gprpp/examine_stack.h b/src/core/util/examine_stack.h similarity index 89% rename from src/core/lib/gprpp/examine_stack.h rename to src/core/util/examine_stack.h index c844924f4568e..b5abb9f15efe6 100644 --- a/src/core/lib/gprpp/examine_stack.h +++ b/src/core/util/examine_stack.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_EXAMINE_STACK_H -#define GRPC_SRC_CORE_LIB_GPRPP_EXAMINE_STACK_H +#ifndef GRPC_SRC_CORE_UTIL_EXAMINE_STACK_H +#define GRPC_SRC_CORE_UTIL_EXAMINE_STACK_H + +#include #include #include "absl/types/optional.h" -#include - namespace grpc_core { typedef std::string (*gpr_current_stack_trace_func)(); @@ -42,4 +42,4 @@ absl::optional GetCurrentStackTrace(); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_EXAMINE_STACK_H +#endif // GRPC_SRC_CORE_UTIL_EXAMINE_STACK_H diff --git a/src/core/lib/gprpp/fork.cc b/src/core/util/fork.cc similarity index 98% rename from src/core/lib/gprpp/fork.cc rename to src/core/util/fork.cc index 909b828f173ad..35b211b42ffaa 100644 --- a/src/core/lib/gprpp/fork.cc +++ b/src/core/util/fork.cc @@ -16,18 +16,19 @@ // // -#include "src/core/lib/gprpp/fork.h" +#include + +#include "src/core/util/fork.h" #include #include -#include #include #include #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/thread_local.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" // // NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK diff --git a/src/core/lib/gprpp/fork.h b/src/core/util/fork.h similarity index 95% rename from src/core/lib/gprpp/fork.h rename to src/core/util/fork.h index 376f625e1e77c..047d35a4b0c15 100644 --- a/src/core/lib/gprpp/fork.h +++ b/src/core/util/fork.h @@ -16,14 +16,14 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_FORK_H -#define GRPC_SRC_CORE_LIB_GPRPP_FORK_H +#ifndef GRPC_SRC_CORE_UTIL_FORK_H +#define GRPC_SRC_CORE_UTIL_FORK_H + +#include #include #include -#include - // // NOTE: FORKING IS NOT GENERALLY SUPPORTED, THIS IS ONLY INTENDED TO WORK // AROUND VERY SPECIFIC USE CASES. @@ -95,4 +95,4 @@ class GPR_DLL Fork { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_FORK_H +#endif // GRPC_SRC_CORE_UTIL_FORK_H diff --git a/src/core/util/gcp_metadata_query.cc b/src/core/util/gcp_metadata_query.cc index 351f6e7a578e2..3543e46fa0e45 100644 --- a/src/core/util/gcp_metadata_query.cc +++ b/src/core/util/gcp_metadata_query.cc @@ -37,11 +37,11 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/src/core/util/gcp_metadata_query.h b/src/core/util/gcp_metadata_query.h index fda085d1f9c87..b2abde5cd4a04 100644 --- a/src/core/util/gcp_metadata_query.h +++ b/src/core/util/gcp_metadata_query.h @@ -24,13 +24,13 @@ #include "absl/functional/any_invocable.h" #include "absl/status/statusor.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/lib/iomgr/gethostname.h b/src/core/util/gethostname.h similarity index 83% rename from src/core/lib/iomgr/gethostname.h rename to src/core/util/gethostname.h index 5ab2bd63009f1..ea3fa36fa433d 100644 --- a/src/core/lib/iomgr/gethostname.h +++ b/src/core/util/gethostname.h @@ -16,11 +16,11 @@ // // -#ifndef GRPC_SRC_CORE_LIB_IOMGR_GETHOSTNAME_H -#define GRPC_SRC_CORE_LIB_IOMGR_GETHOSTNAME_H +#ifndef GRPC_SRC_CORE_UTIL_GETHOSTNAME_H +#define GRPC_SRC_CORE_UTIL_GETHOSTNAME_H // Returns the hostname of the local machine. // Caller takes ownership of result. char* grpc_gethostname(); -#endif // GRPC_SRC_CORE_LIB_IOMGR_GETHOSTNAME_H +#endif // GRPC_SRC_CORE_UTIL_GETHOSTNAME_H diff --git a/src/core/lib/iomgr/gethostname_fallback.cc b/src/core/util/gethostname_fallback.cc similarity index 94% rename from src/core/lib/iomgr/gethostname_fallback.cc rename to src/core/util/gethostname_fallback.cc index 3c3282ab9f8e7..6a5ec05d7778a 100644 --- a/src/core/lib/iomgr/gethostname_fallback.cc +++ b/src/core/util/gethostname_fallback.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/gethostname.h" #ifdef GRPC_GETHOSTNAME_FALLBACK diff --git a/src/core/lib/iomgr/gethostname_host_name_max.cc b/src/core/util/gethostname_host_name_max.cc similarity index 95% rename from src/core/lib/iomgr/gethostname_host_name_max.cc rename to src/core/util/gethostname_host_name_max.cc index 98e933018f946..def6984395d24 100644 --- a/src/core/lib/iomgr/gethostname_host_name_max.cc +++ b/src/core/util/gethostname_host_name_max.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/gethostname.h" #ifdef GRPC_POSIX_HOST_NAME_MAX diff --git a/src/core/lib/iomgr/gethostname_sysconf.cc b/src/core/util/gethostname_sysconf.cc similarity index 95% rename from src/core/lib/iomgr/gethostname_sysconf.cc rename to src/core/util/gethostname_sysconf.cc index 24769a51f9247..414a02118a058 100644 --- a/src/core/lib/iomgr/gethostname_sysconf.cc +++ b/src/core/util/gethostname_sysconf.cc @@ -18,8 +18,8 @@ #include -#include "src/core/lib/iomgr/gethostname.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/gethostname.h" #ifdef GRPC_POSIX_SYSCONF diff --git a/src/core/lib/gprpp/glob.cc b/src/core/util/glob.cc similarity index 100% rename from src/core/lib/gprpp/glob.cc rename to src/core/util/glob.cc diff --git a/src/core/lib/gprpp/glob.h b/src/core/util/glob.h similarity index 88% rename from src/core/lib/gprpp/glob.h rename to src/core/util/glob.h index dafcb9bf729be..6c522450b6503 100644 --- a/src/core/lib/gprpp/glob.h +++ b/src/core/util/glob.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_GLOB_H -#define GRPC_SRC_CORE_LIB_GPRPP_GLOB_H +#ifndef GRPC_SRC_CORE_UTIL_GLOB_H +#define GRPC_SRC_CORE_UTIL_GLOB_H #include "absl/strings/string_view.h" @@ -26,4 +26,4 @@ bool GlobMatch(absl::string_view name, absl::string_view pattern); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_GLOB_H +#endif // GRPC_SRC_CORE_UTIL_GLOB_H diff --git a/src/core/util/gpr_time.cc b/src/core/util/gpr_time.cc new file mode 100644 index 0000000000000..ae2bd82f5bc5a --- /dev/null +++ b/src/core/util/gpr_time.cc @@ -0,0 +1,271 @@ +// +// +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +// Generic implementation of time calls. + +#include + +#include +#include +#include + +#include "absl/log/check.h" + +#include +#include + +#include "src/core/util/crash.h" + +int gpr_time_cmp(gpr_timespec a, gpr_timespec b) { + int cmp = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec); + CHECK(a.clock_type == b.clock_type); + if (cmp == 0 && a.tv_sec != INT64_MAX && a.tv_sec != INT64_MIN) { + cmp = (a.tv_nsec > b.tv_nsec) - (a.tv_nsec < b.tv_nsec); + } + return cmp; +} + +gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b) { + return gpr_time_cmp(a, b) < 0 ? a : b; +} + +gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b) { + return gpr_time_cmp(a, b) > 0 ? a : b; +} + +gpr_timespec gpr_time_0(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = 0; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +gpr_timespec gpr_inf_future(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MAX; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +gpr_timespec gpr_inf_past(gpr_clock_type type) { + gpr_timespec out; + out.tv_sec = INT64_MIN; + out.tv_nsec = 0; + out.clock_type = type; + return out; +} + +static gpr_timespec to_seconds_from_sub_second_time(int64_t time_in_units, + int64_t units_per_sec, + gpr_clock_type type) { + gpr_timespec out; + if (time_in_units == INT64_MAX) { + out = gpr_inf_future(type); + } else if (time_in_units == INT64_MIN) { + out = gpr_inf_past(type); + } else { + DCHECK_EQ(GPR_NS_PER_SEC % units_per_sec, 0); + + out.tv_sec = time_in_units / units_per_sec; + out.tv_nsec = + static_cast((time_in_units - (out.tv_sec * units_per_sec)) * + (GPR_NS_PER_SEC / units_per_sec)); + /// `out.tv_nsec` should always be positive. + if (out.tv_nsec < 0) { + out.tv_nsec += GPR_NS_PER_SEC; + out.tv_sec--; + } + + out.clock_type = type; + } + return out; +} + +static gpr_timespec to_seconds_from_above_second_time(int64_t time_in_units, + int64_t secs_per_unit, + gpr_clock_type type) { + gpr_timespec out; + if (time_in_units >= INT64_MAX / secs_per_unit) { + out = gpr_inf_future(type); + } else if (time_in_units <= INT64_MIN / secs_per_unit) { + out = gpr_inf_past(type); + } else { + out.tv_sec = time_in_units * secs_per_unit; + out.tv_nsec = 0; + out.clock_type = type; + } + return out; +} + +gpr_timespec gpr_time_from_nanos(int64_t ns, gpr_clock_type clock_type) { + return to_seconds_from_sub_second_time(ns, GPR_NS_PER_SEC, clock_type); +} + +gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type) { + return to_seconds_from_sub_second_time(us, GPR_US_PER_SEC, clock_type); +} + +gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type clock_type) { + return to_seconds_from_sub_second_time(ms, GPR_MS_PER_SEC, clock_type); +} + +gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type) { + return to_seconds_from_sub_second_time(s, 1, clock_type); +} + +gpr_timespec gpr_time_from_minutes(int64_t m, gpr_clock_type clock_type) { + return to_seconds_from_above_second_time(m, 60, clock_type); +} + +gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type clock_type) { + return to_seconds_from_above_second_time(h, 3600, clock_type); +} + +gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b) { + gpr_timespec sum; + int64_t inc = 0; + CHECK(b.clock_type == GPR_TIMESPAN); + // tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve + // tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented + // as {-3, 5e8, GPR_TIMESPAN} + CHECK_GE(b.tv_nsec, 0); + sum.clock_type = a.clock_type; + sum.tv_nsec = a.tv_nsec + b.tv_nsec; + if (sum.tv_nsec >= GPR_NS_PER_SEC) { + sum.tv_nsec -= GPR_NS_PER_SEC; + inc++; + } + if (a.tv_sec == INT64_MAX || a.tv_sec == INT64_MIN) { + sum = a; + } else if (b.tv_sec == INT64_MAX || + (b.tv_sec >= 0 && a.tv_sec >= INT64_MAX - b.tv_sec)) { + sum = gpr_inf_future(sum.clock_type); + } else if (b.tv_sec == INT64_MIN || + (b.tv_sec <= 0 && a.tv_sec <= INT64_MIN - b.tv_sec)) { + sum = gpr_inf_past(sum.clock_type); + } else { + sum.tv_sec = a.tv_sec + b.tv_sec; + if (inc != 0 && sum.tv_sec == INT64_MAX - 1) { + sum = gpr_inf_future(sum.clock_type); + } else { + sum.tv_sec += inc; + } + } + return sum; +} + +gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b) { + gpr_timespec diff; + int64_t dec = 0; + if (b.clock_type == GPR_TIMESPAN) { + diff.clock_type = a.clock_type; + // tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve + // tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented + // as {-3, 5e8, GPR_TIMESPAN} + CHECK_GE(b.tv_nsec, 0); + } else { + CHECK(a.clock_type == b.clock_type); + diff.clock_type = GPR_TIMESPAN; + } + diff.tv_nsec = a.tv_nsec - b.tv_nsec; + if (diff.tv_nsec < 0) { + diff.tv_nsec += GPR_NS_PER_SEC; + dec++; + } + if (a.tv_sec == INT64_MAX || a.tv_sec == INT64_MIN) { + diff.tv_sec = a.tv_sec; + diff.tv_nsec = a.tv_nsec; + } else if (b.tv_sec == INT64_MIN || + (b.tv_sec <= 0 && a.tv_sec >= INT64_MAX + b.tv_sec)) { + diff = gpr_inf_future(GPR_CLOCK_REALTIME); + } else if (b.tv_sec == INT64_MAX || + (b.tv_sec >= 0 && a.tv_sec <= INT64_MIN + b.tv_sec)) { + diff = gpr_inf_past(GPR_CLOCK_REALTIME); + } else { + diff.tv_sec = a.tv_sec - b.tv_sec; + if (dec != 0 && diff.tv_sec == INT64_MIN + 1) { + diff = gpr_inf_past(GPR_CLOCK_REALTIME); + } else { + diff.tv_sec -= dec; + } + } + return diff; +} + +int gpr_time_similar(gpr_timespec a, gpr_timespec b, gpr_timespec threshold) { + int cmp_ab; + + CHECK(a.clock_type == b.clock_type); + CHECK(threshold.clock_type == GPR_TIMESPAN); + + cmp_ab = gpr_time_cmp(a, b); + if (cmp_ab == 0) return 1; + if (cmp_ab < 0) { + return gpr_time_cmp(gpr_time_sub(b, a), threshold) <= 0; + } else { + return gpr_time_cmp(gpr_time_sub(a, b), threshold) <= 0; + } +} + +int32_t gpr_time_to_millis(gpr_timespec t) { + if (t.tv_sec >= 2147483) { + if (t.tv_sec == 2147483 && t.tv_nsec < 648 * GPR_NS_PER_MS) { + return 2147483 * GPR_MS_PER_SEC + t.tv_nsec / GPR_NS_PER_MS; + } + return 2147483647; + } else if (t.tv_sec <= -2147483) { + // TODO(ctiller): correct handling here (it's so far in the past do we + // care?) + return -2147483647; + } else { + return static_cast(t.tv_sec * GPR_MS_PER_SEC + + t.tv_nsec / GPR_NS_PER_MS); + } +} + +double gpr_timespec_to_micros(gpr_timespec t) { + return static_cast(t.tv_sec) * GPR_US_PER_SEC + t.tv_nsec * 1e-3; +} + +gpr_timespec gpr_convert_clock_type(gpr_timespec t, gpr_clock_type clock_type) { + if (t.clock_type == clock_type) { + return t; + } + + if (t.tv_sec == INT64_MAX || t.tv_sec == INT64_MIN) { + t.clock_type = clock_type; + return t; + } + + if (clock_type == GPR_TIMESPAN) { + return gpr_time_sub(t, gpr_now(t.clock_type)); + } + + if (t.clock_type == GPR_TIMESPAN) { + return gpr_time_add(gpr_now(clock_type), t); + } + + // If the given input hits this code, the same result is not guaranteed for + // the same input because it relies on `gpr_now` to calculate the difference + // between two different clocks. Please be careful when you want to use this + // function in unit tests. (e.g. https://github.com/grpc/grpc/pull/22655) + return gpr_time_add(gpr_now(clock_type), + gpr_time_sub(t, gpr_now(t.clock_type))); +} diff --git a/src/core/lib/iomgr/grpc_if_nametoindex.h b/src/core/util/grpc_if_nametoindex.h similarity index 83% rename from src/core/lib/iomgr/grpc_if_nametoindex.h rename to src/core/util/grpc_if_nametoindex.h index 9fa91a2b22f70..ad1f3fcc2249d 100644 --- a/src/core/lib/iomgr/grpc_if_nametoindex.h +++ b/src/core/util/grpc_if_nametoindex.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_IOMGR_GRPC_IF_NAMETOINDEX_H -#define GRPC_SRC_CORE_LIB_IOMGR_GRPC_IF_NAMETOINDEX_H - -#include +#ifndef GRPC_SRC_CORE_UTIL_GRPC_IF_NAMETOINDEX_H +#define GRPC_SRC_CORE_UTIL_GRPC_IF_NAMETOINDEX_H #include +#include + // Returns the interface index corresponding to the interface "name" provided. // Returns non-zero upon success, and zero upon failure. uint32_t grpc_if_nametoindex(char* name); -#endif // GRPC_SRC_CORE_LIB_IOMGR_GRPC_IF_NAMETOINDEX_H +#endif // GRPC_SRC_CORE_UTIL_GRPC_IF_NAMETOINDEX_H diff --git a/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc b/src/core/util/grpc_if_nametoindex_posix.cc similarity index 92% rename from src/core/lib/iomgr/grpc_if_nametoindex_posix.cc rename to src/core/util/grpc_if_nametoindex_posix.cc index 52b57d43f81e0..1ec5f15cc99fd 100644 --- a/src/core/lib/iomgr/grpc_if_nametoindex_posix.cc +++ b/src/core/util/grpc_if_nametoindex_posix.cc @@ -27,8 +27,8 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/iomgr/grpc_if_nametoindex.h" +#include "src/core/util/crash.h" +#include "src/core/util/grpc_if_nametoindex.h" uint32_t grpc_if_nametoindex(char* name) { uint32_t out = if_nametoindex(name); diff --git a/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc b/src/core/util/grpc_if_nametoindex_unsupported.cc similarity index 92% rename from src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc rename to src/core/util/grpc_if_nametoindex_unsupported.cc index 9d2092ae13835..767f41b67f676 100644 --- a/src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc +++ b/src/core/util/grpc_if_nametoindex_unsupported.cc @@ -24,8 +24,8 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/iomgr/grpc_if_nametoindex.h" +#include "src/core/util/crash.h" +#include "src/core/util/grpc_if_nametoindex.h" uint32_t grpc_if_nametoindex(char* name) { VLOG(2) << "Not attempting to convert interface name " << name diff --git a/src/core/lib/gprpp/host_port.cc b/src/core/util/host_port.cc similarity index 98% rename from src/core/lib/gprpp/host_port.cc rename to src/core/util/host_port.cc index fec431511091a..dad028d0b4a55 100644 --- a/src/core/lib/gprpp/host_port.cc +++ b/src/core/util/host_port.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/gprpp/host_port.h" +#include + +#include "src/core/util/host_port.h" #include @@ -24,8 +26,6 @@ #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { std::string JoinHostPort(absl::string_view host, int port) { diff --git a/src/core/lib/gprpp/host_port.h b/src/core/util/host_port.h similarity index 93% rename from src/core/lib/gprpp/host_port.h rename to src/core/util/host_port.h index 547129505c8d7..2d7d2c9e43acc 100644 --- a/src/core/lib/gprpp/host_port.h +++ b/src/core/util/host_port.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_HOST_PORT_H -#define GRPC_SRC_CORE_LIB_GPRPP_HOST_PORT_H +#ifndef GRPC_SRC_CORE_UTIL_HOST_PORT_H +#define GRPC_SRC_CORE_UTIL_HOST_PORT_H + +#include #include #include "absl/strings/string_view.h" -#include - namespace grpc_core { // Given a host and port, creates a newly-allocated string of the form @@ -54,4 +54,4 @@ bool SplitHostPort(absl::string_view name, std::string* host, } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_HOST_PORT_H +#endif // GRPC_SRC_CORE_UTIL_HOST_PORT_H diff --git a/src/core/util/http_client/httpcli.cc b/src/core/util/http_client/httpcli.cc index e28f9b8b758f5..c7b52e2de54d7 100644 --- a/src/core/util/http_client/httpcli.cc +++ b/src/core/util/http_client/httpcli.cc @@ -41,7 +41,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -53,6 +52,7 @@ #include "src/core/lib/transport/error_utils.h" #include "src/core/util/http_client/format_request.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/status_helper.h" namespace grpc_core { diff --git a/src/core/util/http_client/httpcli.h b/src/core/util/http_client/httpcli.h index c5939da61fa92..b041d190e0724 100644 --- a/src/core/util/http_client/httpcli.h +++ b/src/core/util/http_client/httpcli.h @@ -37,11 +37,6 @@ #include #include "src/core/handshaker/handshaker.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" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -52,8 +47,13 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/resource_quota/resource_quota.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/debug_location.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" // User agent this library reports #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" diff --git a/src/core/util/http_client/httpcli_security_connector.cc b/src/core/util/http_client/httpcli_security_connector.cc index c183f95a07ec8..45156af53d185 100644 --- a/src/core/util/http_client/httpcli_security_connector.cc +++ b/src/core/util/http_client/httpcli_security_connector.cc @@ -38,9 +38,6 @@ #include "src/core/handshaker/handshaker.h" #include "src/core/handshaker/security/security_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#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/error.h" @@ -53,6 +50,9 @@ #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" namespace grpc_core { diff --git a/src/core/util/http_client/httpcli_ssl_credentials.h b/src/core/util/http_client/httpcli_ssl_credentials.h index 45364c64a4636..e06668f65b5a9 100644 --- a/src/core/util/http_client/httpcli_ssl_credentials.h +++ b/src/core/util/http_client/httpcli_ssl_credentials.h @@ -21,7 +21,7 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/if_list.h b/src/core/util/if_list.h similarity index 99% rename from src/core/lib/gprpp/if_list.h rename to src/core/util/if_list.h index a06847423fd41..054d128507fda 100644 --- a/src/core/lib/gprpp/if_list.h +++ b/src/core/util/if_list.h @@ -16,8 +16,8 @@ // Automatically generated by tools/codegen/core/gen_if_list.py // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H -#define GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H +#ifndef GRPC_SRC_CORE_UTIL_IF_LIST_H +#define GRPC_SRC_CORE_UTIL_IF_LIST_H #include @@ -4527,4 +4527,4 @@ auto IfList( } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_IF_LIST_H +#endif // GRPC_SRC_CORE_UTIL_IF_LIST_H diff --git a/src/core/util/json/json_object_loader.h b/src/core/util/json/json_object_loader.h index 03bce3efefd14..1c1e8c565e14c 100644 --- a/src/core/util/json/json_object_loader.h +++ b/src/core/util/json/json_object_loader.h @@ -32,12 +32,12 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" // Provides a means to load JSON objects into C++ objects, with the aim of // minimizing object code size. diff --git a/src/core/util/json/json_reader.cc b/src/core/util/json/json_reader.cc index 20a1a04a75cf6..bda35becad4e9 100644 --- a/src/core/util/json/json_reader.cc +++ b/src/core/util/json/json_reader.cc @@ -37,8 +37,8 @@ #include -#include "src/core/lib/gprpp/match.h" #include "src/core/util/json/json.h" +#include "src/core/util/match.h" #define GRPC_JSON_MAX_DEPTH 255 #define GRPC_JSON_MAX_ERRORS 16 diff --git a/src/core/util/json/json_util.cc b/src/core/util/json/json_util.cc index 8faa7cd8f2579..88fdbb6755c6a 100644 --- a/src/core/util/json/json_util.cc +++ b/src/core/util/json/json_util.cc @@ -20,10 +20,10 @@ #include "src/core/util/json/json_util.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/util/json/json_util.h b/src/core/util/json/json_util.h index da45b74b3c376..a8abf9efb883d 100644 --- a/src/core/util/json/json_util.h +++ b/src/core/util/json/json_util.h @@ -32,9 +32,9 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/util/json/json.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/src/core/util/latent_see.cc b/src/core/util/latent_see.cc index 6bb250b445f76..508e853055a8b 100644 --- a/src/core/util/latent_see.cc +++ b/src/core/util/latent_see.cc @@ -25,8 +25,8 @@ #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/util/ring_buffer.h" +#include "src/core/util/sync.h" namespace grpc_core { namespace latent_see { diff --git a/src/core/util/latent_see.h b/src/core/util/latent_see.h index 4d4f1584b068c..34a247abd0aa2 100644 --- a/src/core/util/latent_see.h +++ b/src/core/util/latent_see.h @@ -35,9 +35,9 @@ #include "absl/log/log.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/per_cpu.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/per_cpu.h" #include "src/core/util/ring_buffer.h" +#include "src/core/util/sync.h" #define TAGGED_POINTER_SIZE_BITS 48 diff --git a/src/core/util/linux/cpu.cc b/src/core/util/linux/cpu.cc index aa232a6ac5dad..61f1d5d58ff39 100644 --- a/src/core/util/linux/cpu.cc +++ b/src/core/util/linux/cpu.cc @@ -34,8 +34,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" static int ncpus = 0; diff --git a/src/core/lib/gprpp/linux/env.cc b/src/core/util/linux/env.cc similarity index 97% rename from src/core/lib/gprpp/linux/env.cc rename to src/core/util/linux/env.cc index 4f4b097841b98..ff1635f7a6237 100644 --- a/src/core/lib/gprpp/linux/env.cc +++ b/src/core/util/linux/env.cc @@ -21,18 +21,18 @@ #define _GNU_SOURCE #endif +#include + #include #include "absl/types/optional.h" -#include - #ifdef GPR_LINUX_ENV #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/load_file.cc b/src/core/util/load_file.cc similarity index 98% rename from src/core/lib/gprpp/load_file.cc rename to src/core/util/load_file.cc index dd15004570aca..91ec375ba652f 100644 --- a/src/core/lib/gprpp/load_file.cc +++ b/src/core/util/load_file.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/load_file.h" +#include + +#include "src/core/util/load_file.h" #include #include @@ -24,7 +26,6 @@ #include #include -#include namespace grpc_core { diff --git a/src/core/lib/gprpp/load_file.h b/src/core/util/load_file.h similarity index 88% rename from src/core/lib/gprpp/load_file.h rename to src/core/util/load_file.h index 761d8d1fbd6e2..5d3f7aa784f78 100644 --- a/src/core/lib/gprpp/load_file.h +++ b/src/core/util/load_file.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_LOAD_FILE_H -#define GRPC_SRC_CORE_LIB_GPRPP_LOAD_FILE_H +#ifndef GRPC_SRC_CORE_UTIL_LOAD_FILE_H +#define GRPC_SRC_CORE_UTIL_LOAD_FILE_H + +#include #include #include "absl/status/statusor.h" -#include - #include "src/core/lib/slice/slice.h" namespace grpc_core { @@ -31,4 +31,4 @@ absl::StatusOr LoadFile(const std::string& filename, bool add_null_terminator); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_LOAD_FILE_H +#endif // GRPC_SRC_CORE_UTIL_LOAD_FILE_H diff --git a/src/core/util/log.cc b/src/core/util/log.cc index 0a1ef08f75c40..cc353fcbd64b4 100644 --- a/src/core/util/log.cc +++ b/src/core/util/log.cc @@ -33,7 +33,7 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" void gpr_unreachable_code(const char* reason, const char* file, int line) { @@ -104,15 +104,15 @@ void gpr_log_verbosity_init(void) { if (absl::EqualsIgnoreCase(verbosity, "INFO")) { LOG_FIRST_N(WARNING, 1) << "Log level INFO is not suitable for production. Prefer WARNING or " - "ERROR. However if you see this message in a debug environmenmt or " - "test environmenmt it is safe to ignore this message."; + "ERROR. However if you see this message in a debug environment or " + "test environment it is safe to ignore this message."; absl::SetVLogLevel("*grpc*/*", -1); absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo); } else if (absl::EqualsIgnoreCase(verbosity, "DEBUG")) { LOG_FIRST_N(WARNING, 1) << "Log level DEBUG is not suitable for production. Prefer WARNING or " - "ERROR. However if you see this message in a debug environmenmt or " - "test environmenmt it is safe to ignore this message."; + "ERROR. However if you see this message in a debug environment or " + "test environment it is safe to ignore this message."; absl::SetVLogLevel("*grpc*/*", 2); absl::SetMinLogLevel(absl::LogSeverityAtLeast::kInfo); } else if (absl::EqualsIgnoreCase(verbosity, "ERROR")) { diff --git a/src/core/lib/gprpp/manual_constructor.h b/src/core/util/manual_constructor.h similarity index 95% rename from src/core/lib/gprpp/manual_constructor.h rename to src/core/util/manual_constructor.h index 0289297029583..38d4695753fa4 100644 --- a/src/core/lib/gprpp/manual_constructor.h +++ b/src/core/util/manual_constructor.h @@ -16,18 +16,18 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_MANUAL_CONSTRUCTOR_H -#define GRPC_SRC_CORE_LIB_GPRPP_MANUAL_CONSTRUCTOR_H +#ifndef GRPC_SRC_CORE_UTIL_MANUAL_CONSTRUCTOR_H +#define GRPC_SRC_CORE_UTIL_MANUAL_CONSTRUCTOR_H // manually construct a region of memory with some type +#include + #include #include -#include - -#include "src/core/lib/gprpp/construct_destruct.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { @@ -143,4 +143,4 @@ class ManualConstructor { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_MANUAL_CONSTRUCTOR_H +#endif // GRPC_SRC_CORE_UTIL_MANUAL_CONSTRUCTOR_H diff --git a/src/core/lib/gprpp/match.h b/src/core/util/match.h similarity index 93% rename from src/core/lib/gprpp/match.h rename to src/core/util/match.h index 9fa388fd2c08e..69b91f2fc9b8b 100644 --- a/src/core/lib/gprpp/match.h +++ b/src/core/util/match.h @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_MATCH_H -#define GRPC_SRC_CORE_LIB_GPRPP_MATCH_H +#ifndef GRPC_SRC_CORE_UTIL_MATCH_H +#define GRPC_SRC_CORE_UTIL_MATCH_H + +#include #include #include "absl/types/variant.h" -#include - -#include "src/core/lib/gprpp/overload.h" +#include "src/core/util/overload.h" namespace grpc_core { @@ -72,4 +72,4 @@ auto MatchMutable(absl::variant* value, Fs... fs) } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_MATCH_H +#endif // GRPC_SRC_CORE_UTIL_MATCH_H diff --git a/src/core/lib/matchers/matchers.cc b/src/core/util/matchers.cc similarity index 99% rename from src/core/lib/matchers/matchers.cc rename to src/core/util/matchers.cc index 38bea23b2b51d..a0a8b786bec46 100644 --- a/src/core/lib/matchers/matchers.cc +++ b/src/core/util/matchers.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/matchers/matchers.h" +#include + +#include "src/core/util/matchers.h" #include @@ -23,8 +25,6 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include - namespace grpc_core { // diff --git a/src/core/lib/matchers/matchers.h b/src/core/util/matchers.h similarity index 97% rename from src/core/lib/matchers/matchers.h rename to src/core/util/matchers.h index b2055778ff70c..69992106b45e0 100644 --- a/src/core/lib/matchers/matchers.h +++ b/src/core/util/matchers.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_MATCHERS_MATCHERS_H -#define GRPC_SRC_CORE_LIB_MATCHERS_MATCHERS_H +#ifndef GRPC_SRC_CORE_UTIL_MATCHERS_H +#define GRPC_SRC_CORE_UTIL_MATCHERS_H + +#include #include @@ -25,8 +27,6 @@ #include "absl/types/optional.h" #include "re2/re2.h" -#include - namespace grpc_core { class StringMatcher { @@ -160,4 +160,4 @@ class HeaderMatcher { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_MATCHERS_MATCHERS_H +#endif // GRPC_SRC_CORE_UTIL_MATCHERS_H diff --git a/src/core/lib/gprpp/memory.h b/src/core/util/memory.h similarity index 91% rename from src/core/lib/gprpp/memory.h rename to src/core/util/memory.h index 932862d708cc2..eae0aaa4b8317 100644 --- a/src/core/lib/gprpp/memory.h +++ b/src/core/util/memory.h @@ -16,14 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_MEMORY_H -#define GRPC_SRC_CORE_LIB_GPRPP_MEMORY_H +#ifndef GRPC_SRC_CORE_UTIL_MEMORY_H +#define GRPC_SRC_CORE_UTIL_MEMORY_H + +#include #include #include #include -#include namespace grpc_core { @@ -49,4 +50,4 @@ T* Zalloc() { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_MEMORY_H +#endif // GRPC_SRC_CORE_UTIL_MEMORY_H diff --git a/src/core/lib/gprpp/mpscq.cc b/src/core/util/mpscq.cc similarity index 98% rename from src/core/lib/gprpp/mpscq.cc rename to src/core/util/mpscq.cc index d57ff40f7d819..4525834644356 100644 --- a/src/core/lib/gprpp/mpscq.cc +++ b/src/core/util/mpscq.cc @@ -16,10 +16,10 @@ // // -#include "src/core/lib/gprpp/mpscq.h" - #include +#include "src/core/util/mpscq.h" + namespace grpc_core { // diff --git a/src/core/lib/gprpp/mpscq.h b/src/core/util/mpscq.h similarity index 94% rename from src/core/lib/gprpp/mpscq.h rename to src/core/util/mpscq.h index f6306d4682262..b4d48f78c3d66 100644 --- a/src/core/lib/gprpp/mpscq.h +++ b/src/core/util/mpscq.h @@ -16,16 +16,16 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_MPSCQ_H -#define GRPC_SRC_CORE_LIB_GPRPP_MPSCQ_H +#ifndef GRPC_SRC_CORE_UTIL_MPSCQ_H +#define GRPC_SRC_CORE_UTIL_MPSCQ_H + +#include #include #include "absl/log/check.h" -#include - -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_core { @@ -96,4 +96,4 @@ class LockedMultiProducerSingleConsumerQueue { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_MPSCQ_H +#endif // GRPC_SRC_CORE_UTIL_MPSCQ_H diff --git a/src/core/util/msys/tmpfile.cc b/src/core/util/msys/tmpfile.cc index dc1cdf7bc34e7..69eb209b1496f 100644 --- a/src/core/util/msys/tmpfile.cc +++ b/src/core/util/msys/tmpfile.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/string_windows.h" #include "src/core/util/tmpfile.h" diff --git a/src/core/lib/gprpp/no_destruct.h b/src/core/util/no_destruct.h similarity index 93% rename from src/core/lib/gprpp/no_destruct.h rename to src/core/util/no_destruct.h index 1f8a82c175310..4ba0161161fe1 100644 --- a/src/core/lib/gprpp/no_destruct.h +++ b/src/core/util/no_destruct.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_NO_DESTRUCT_H -#define GRPC_SRC_CORE_LIB_GPRPP_NO_DESTRUCT_H +#ifndef GRPC_SRC_CORE_UTIL_NO_DESTRUCT_H +#define GRPC_SRC_CORE_UTIL_NO_DESTRUCT_H + +#include #include #include -#include - -#include "src/core/lib/gprpp/construct_destruct.h" +#include "src/core/util/construct_destruct.h" namespace grpc_core { @@ -92,4 +92,4 @@ NoDestruct NoDestructSingleton::value_; } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_NO_DESTRUCT_H +#endif // GRPC_SRC_CORE_UTIL_NO_DESTRUCT_H diff --git a/src/core/lib/gprpp/notification.h b/src/core/util/notification.h similarity index 89% rename from src/core/lib/gprpp/notification.h rename to src/core/util/notification.h index 4be78279023ba..45acff0fda75e 100644 --- a/src/core/lib/gprpp/notification.h +++ b/src/core/util/notification.h @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_NOTIFICATION_H -#define GRPC_SRC_CORE_LIB_GPRPP_NOTIFICATION_H +#ifndef GRPC_SRC_CORE_UTIL_NOTIFICATION_H +#define GRPC_SRC_CORE_UTIL_NOTIFICATION_H + +#include #include "absl/time/clock.h" #include "absl/time/time.h" -#include - -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc_core { @@ -64,4 +64,4 @@ class Notification { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_NOTIFICATION_H +#endif // GRPC_SRC_CORE_UTIL_NOTIFICATION_H diff --git a/src/core/lib/gprpp/orphanable.h b/src/core/util/orphanable.h similarity index 93% rename from src/core/lib/gprpp/orphanable.h rename to src/core/util/orphanable.h index 924a41fd5fe89..82ad20c52e56c 100644 --- a/src/core/lib/gprpp/orphanable.h +++ b/src/core/util/orphanable.h @@ -16,19 +16,19 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_ORPHANABLE_H -#define GRPC_SRC_CORE_LIB_GPRPP_ORPHANABLE_H +#ifndef GRPC_SRC_CORE_UTIL_ORPHANABLE_H +#define GRPC_SRC_CORE_UTIL_ORPHANABLE_H + +#include #include #include #include -#include - -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/down_cast.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -150,4 +150,4 @@ class InternallyRefCounted : public Orphanable { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_ORPHANABLE_H +#endif // GRPC_SRC_CORE_UTIL_ORPHANABLE_H diff --git a/src/core/lib/gprpp/overload.h b/src/core/util/overload.h similarity index 93% rename from src/core/lib/gprpp/overload.h rename to src/core/util/overload.h index 2a3bd546e8667..373a34c121004 100644 --- a/src/core/lib/gprpp/overload.h +++ b/src/core/util/overload.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_OVERLOAD_H -#define GRPC_SRC_CORE_LIB_GPRPP_OVERLOAD_H - -#include +#ifndef GRPC_SRC_CORE_UTIL_OVERLOAD_H +#define GRPC_SRC_CORE_UTIL_OVERLOAD_H #include +#include + namespace grpc_core { template @@ -56,4 +56,4 @@ OverloadType Overload(Cases... cases) { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_OVERLOAD_H +#endif // GRPC_SRC_CORE_UTIL_OVERLOAD_H diff --git a/src/core/lib/gprpp/packed_table.h b/src/core/util/packed_table.h similarity index 83% rename from src/core/lib/gprpp/packed_table.h rename to src/core/util/packed_table.h index a1f7b09f0cfc4..2a7946174d4b2 100644 --- a/src/core/lib/gprpp/packed_table.h +++ b/src/core/util/packed_table.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_PACKED_TABLE_H -#define GRPC_SRC_CORE_LIB_GPRPP_PACKED_TABLE_H +#ifndef GRPC_SRC_CORE_UTIL_PACKED_TABLE_H +#define GRPC_SRC_CORE_UTIL_PACKED_TABLE_H #include -#include "src/core/lib/gprpp/sorted_pack.h" -#include "src/core/lib/gprpp/table.h" +#include "src/core/util/sorted_pack.h" +#include "src/core/util/table.h" namespace grpc_core { @@ -37,4 +37,4 @@ using PackedTable = } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_PACKED_TABLE_H +#endif // GRPC_SRC_CORE_UTIL_PACKED_TABLE_H diff --git a/src/core/lib/gprpp/per_cpu.cc b/src/core/util/per_cpu.cc similarity index 96% rename from src/core/lib/gprpp/per_cpu.cc rename to src/core/util/per_cpu.cc index 4cd06fd651347..8412f399173be 100644 --- a/src/core/lib/gprpp/per_cpu.cc +++ b/src/core/util/per_cpu.cc @@ -12,10 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/per_cpu.h" +#include + +#include "src/core/util/per_cpu.h" #include -#include #include "src/core/util/useful.h" diff --git a/src/core/lib/gprpp/per_cpu.h b/src/core/util/per_cpu.h similarity index 95% rename from src/core/lib/gprpp/per_cpu.h rename to src/core/util/per_cpu.h index a4e30092df69c..492ea2832b461 100644 --- a/src/core/lib/gprpp/per_cpu.h +++ b/src/core/util/per_cpu.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_PER_CPU_H -#define GRPC_SRC_CORE_LIB_GPRPP_PER_CPU_H +#ifndef GRPC_SRC_CORE_UTIL_PER_CPU_H +#define GRPC_SRC_CORE_UTIL_PER_CPU_H + +#include #include @@ -23,7 +25,6 @@ #include #include -#include // Sharded collections of objects // This used to be per-cpu, now it's much less so - but still a way to limit @@ -100,4 +101,4 @@ class PerCpu { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_PER_CPU_H +#endif // GRPC_SRC_CORE_UTIL_PER_CPU_H diff --git a/src/core/util/posix/cpu.cc b/src/core/util/posix/cpu.cc index 3aabc9adfe50a..93e6cce061492 100644 --- a/src/core/util/posix/cpu.cc +++ b/src/core/util/posix/cpu.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" static long ncpus = 0; diff --git a/src/core/lib/gprpp/posix/directory_reader.cc b/src/core/util/posix/directory_reader.cc similarity index 97% rename from src/core/lib/gprpp/posix/directory_reader.cc rename to src/core/util/posix/directory_reader.cc index eff9823a213d1..d889c7b6c448d 100644 --- a/src/core/lib/gprpp/posix/directory_reader.cc +++ b/src/core/util/posix/directory_reader.cc @@ -16,14 +16,14 @@ // // +#include + #include #include "absl/functional/function_ref.h" #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include - #if defined(GPR_LINUX) || defined(GPR_ANDROID) || defined(GPR_FREEBSD) || \ defined(GPR_APPLE) @@ -31,7 +31,7 @@ #include -#include "src/core/lib/gprpp/directory_reader.h" +#include "src/core/util/directory_reader.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/posix/env.cc b/src/core/util/posix/env.cc similarity index 96% rename from src/core/lib/gprpp/posix/env.cc rename to src/core/util/posix/env.cc index 4121e24c07266..8ace63d0ea2c2 100644 --- a/src/core/lib/gprpp/posix/env.cc +++ b/src/core/util/posix/env.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/posix/stat.cc b/src/core/util/posix/stat.cc similarity index 94% rename from src/core/lib/gprpp/posix/stat.cc rename to src/core/util/posix/stat.cc index e0d2e6175060d..e4c870f8dbd5f 100644 --- a/src/core/lib/gprpp/posix/stat.cc +++ b/src/core/util/posix/stat.cc @@ -14,10 +14,10 @@ // limitations under the License. // -#include - #include +#include + // IWYU pragma: no_include #include "absl/status/status.h" @@ -30,8 +30,8 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include "src/core/lib/gprpp/stat.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/stat.h" +#include "src/core/util/strerror.h" namespace grpc_core { diff --git a/src/core/util/posix/sync.cc b/src/core/util/posix/sync.cc index 1ccaa2819961c..255eec517a31f 100644 --- a/src/core/util/posix/sync.cc +++ b/src/core/util/posix/sync.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" void gpr_mu_init(gpr_mu* mu) { #ifdef GRPC_ASAN_ENABLED diff --git a/src/core/lib/gprpp/posix/thd.cc b/src/core/util/posix/thd.cc similarity index 97% rename from src/core/lib/gprpp/posix/thd.cc rename to src/core/util/posix/thd.cc index b481fa7c565a7..6987e3ff2cd46 100644 --- a/src/core/lib/gprpp/posix/thd.cc +++ b/src/core/util/posix/thd.cc @@ -18,13 +18,13 @@ // Posix implementation for gpr threads. +#include + #include #include #include -#include - #ifdef GPR_POSIX_SYNC #include @@ -39,10 +39,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/fork.h" -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/fork.h" +#include "src/core/util/strerror.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/util/posix/time.cc b/src/core/util/posix/time.cc index 5fea711d59fa3..a425a4721c65a 100644 --- a/src/core/util/posix/time.cc +++ b/src/core/util/posix/time.cc @@ -33,7 +33,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" static struct timespec timespec_from_gpr(gpr_timespec gts) { struct timespec rv; @@ -77,8 +77,8 @@ static gpr_timespec now_impl(gpr_clock_type clock_type) { } else { clock_gettime(clockid_for_gpr_clock[clock_type], &now); if (clock_type == GPR_CLOCK_MONOTONIC) { - // Add 5 seconds arbitrarily: avoids weird conditions in gprpp/time.cc - // when there's a small number of seconds returned. + // Add 5 seconds arbitrarily: avoids weird conditions in + // src/core/util/time.cc when there's a small number of seconds returned. now.tv_sec += 5; } return gpr_from_timespec(now, clock_type); diff --git a/src/core/util/posix/tmpfile.cc b/src/core/util/posix/tmpfile.cc index fd1524654a573..51b900a3527b2 100644 --- a/src/core/util/posix/tmpfile.cc +++ b/src/core/util/posix/tmpfile.cc @@ -31,8 +31,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" #include "src/core/util/string.h" #include "src/core/util/tmpfile.h" diff --git a/src/core/lib/backoff/random_early_detection.cc b/src/core/util/random_early_detection.cc similarity index 94% rename from src/core/lib/backoff/random_early_detection.cc rename to src/core/util/random_early_detection.cc index c25e3792cdbe2..882a7d530e9ce 100644 --- a/src/core/lib/backoff/random_early_detection.cc +++ b/src/core/util/random_early_detection.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/backoff/random_early_detection.h" +#include -#include "absl/random/distributions.h" +#include "src/core/util/random_early_detection.h" -#include +#include "absl/random/distributions.h" namespace grpc_core { diff --git a/src/core/lib/backoff/random_early_detection.h b/src/core/util/random_early_detection.h similarity index 91% rename from src/core/lib/backoff/random_early_detection.h rename to src/core/util/random_early_detection.h index 400a0d3d57fb9..fb2ea8f51a4b4 100644 --- a/src/core/lib/backoff/random_early_detection.h +++ b/src/core/util/random_early_detection.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_BACKOFF_RANDOM_EARLY_DETECTION_H -#define GRPC_SRC_CORE_LIB_BACKOFF_RANDOM_EARLY_DETECTION_H +#ifndef GRPC_SRC_CORE_UTIL_RANDOM_EARLY_DETECTION_H +#define GRPC_SRC_CORE_UTIL_RANDOM_EARLY_DETECTION_H + +#include #include @@ -21,8 +23,6 @@ #include "absl/random/bit_gen_ref.h" -#include - namespace grpc_core { // Implements the random early detection algorithm - allows items to be rejected @@ -59,4 +59,4 @@ class RandomEarlyDetection { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_BACKOFF_RANDOM_EARLY_DETECTION_H +#endif // GRPC_SRC_CORE_UTIL_RANDOM_EARLY_DETECTION_H diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/util/ref_counted.h similarity index 97% rename from src/core/lib/gprpp/ref_counted.h rename to src/core/util/ref_counted.h index e8b6347f4b967..e32472d1c80ad 100644 --- a/src/core/lib/gprpp/ref_counted.h +++ b/src/core/util/ref_counted.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_H -#define GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_H +#ifndef GRPC_SRC_CORE_UTIL_REF_COUNTED_H +#define GRPC_SRC_CORE_UTIL_REF_COUNTED_H + +#include #include #include @@ -26,12 +28,10 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include - -#include "src/core/lib/gprpp/atomic_utils.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/atomic_utils.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/down_cast.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -400,4 +400,4 @@ class RefCounted : public Impl { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_H +#endif // GRPC_SRC_CORE_UTIL_REF_COUNTED_H diff --git a/src/core/lib/gprpp/ref_counted_ptr.h b/src/core/util/ref_counted_ptr.h similarity index 98% rename from src/core/lib/gprpp/ref_counted_ptr.h rename to src/core/util/ref_counted_ptr.h index c3506bc8697ce..28829bc0d20ef 100644 --- a/src/core/lib/gprpp/ref_counted_ptr.h +++ b/src/core/util/ref_counted_ptr.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H -#define GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H +#ifndef GRPC_SRC_CORE_UTIL_REF_COUNTED_PTR_H +#define GRPC_SRC_CORE_UTIL_REF_COUNTED_PTR_H + +#include #include @@ -27,10 +29,8 @@ #include "absl/hash/hash.h" -#include - -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/down_cast.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/down_cast.h" namespace grpc_core { @@ -442,4 +442,4 @@ struct RefCountedPtrEq { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_PTR_H +#endif // GRPC_SRC_CORE_UTIL_REF_COUNTED_PTR_H diff --git a/src/core/lib/gprpp/ref_counted_string.cc b/src/core/util/ref_counted_string.cc similarity index 96% rename from src/core/lib/gprpp/ref_counted_string.cc rename to src/core/util/ref_counted_string.cc index 1a0a9ff031851..2b3f6f66b3621 100644 --- a/src/core/lib/gprpp/ref_counted_string.cc +++ b/src/core/util/ref_counted_string.cc @@ -14,14 +14,15 @@ // limitations under the License. // -#include "src/core/lib/gprpp/ref_counted_string.h" +#include + +#include "src/core/util/ref_counted_string.h" #include #include #include -#include namespace grpc_core { diff --git a/src/core/lib/gprpp/ref_counted_string.h b/src/core/util/ref_counted_string.h similarity index 94% rename from src/core/lib/gprpp/ref_counted_string.h rename to src/core/util/ref_counted_string.h index 64f96bd963885..ed3e93089aee6 100644 --- a/src/core/lib/gprpp/ref_counted_string.h +++ b/src/core/util/ref_counted_string.h @@ -14,8 +14,10 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_STRING_H -#define GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_STRING_H +#ifndef GRPC_SRC_CORE_UTIL_REF_COUNTED_STRING_H +#define GRPC_SRC_CORE_UTIL_REF_COUNTED_STRING_H + +#include #include @@ -23,10 +25,8 @@ #include "absl/strings/string_view.h" -#include - -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { @@ -158,4 +158,4 @@ struct RefCountedStringValueLessThan { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_REF_COUNTED_STRING_H +#endif // GRPC_SRC_CORE_UTIL_REF_COUNTED_STRING_H diff --git a/src/core/lib/gprpp/single_set_ptr.h b/src/core/util/single_set_ptr.h similarity index 94% rename from src/core/lib/gprpp/single_set_ptr.h rename to src/core/util/single_set_ptr.h index 016967b5f497b..9508e53eb6db6 100644 --- a/src/core/lib/gprpp/single_set_ptr.h +++ b/src/core/util/single_set_ptr.h @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_SINGLE_SET_PTR_H -#define GRPC_SRC_CORE_LIB_GPRPP_SINGLE_SET_PTR_H +#ifndef GRPC_SRC_CORE_UTIL_SINGLE_SET_PTR_H +#define GRPC_SRC_CORE_UTIL_SINGLE_SET_PTR_H + +#include #include #include #include "absl/log/check.h" -#include - namespace grpc_core { template > @@ -86,4 +86,4 @@ class SingleSetPtr { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_SINGLE_SET_PTR_H +#endif // GRPC_SRC_CORE_UTIL_SINGLE_SET_PTR_H diff --git a/src/core/lib/gprpp/sorted_pack.h b/src/core/util/sorted_pack.h similarity index 94% rename from src/core/lib/gprpp/sorted_pack.h rename to src/core/util/sorted_pack.h index 47e3f9c525de9..bb0d2415a1551 100644 --- a/src/core/lib/gprpp/sorted_pack.h +++ b/src/core/util/sorted_pack.h @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_SORTED_PACK_H -#define GRPC_SRC_CORE_LIB_GPRPP_SORTED_PACK_H - -#include +#ifndef GRPC_SRC_CORE_UTIL_SORTED_PACK_H +#define GRPC_SRC_CORE_UTIL_SORTED_PACK_H #include -#include "src/core/lib/gprpp/type_list.h" +#include + +#include "src/core/util/type_list.h" namespace grpc_core { @@ -86,4 +86,4 @@ struct WithSortedPack { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_SORTED_PACK_H +#endif // GRPC_SRC_CORE_UTIL_SORTED_PACK_H diff --git a/src/core/lib/gprpp/stat.h b/src/core/util/stat.h similarity index 89% rename from src/core/lib/gprpp/stat.h rename to src/core/util/stat.h index 2bee50c90292b..e947c0a5de970 100644 --- a/src/core/lib/gprpp/stat.h +++ b/src/core/util/stat.h @@ -14,15 +14,15 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_STAT_H -#define GRPC_SRC_CORE_LIB_GPRPP_STAT_H +#ifndef GRPC_SRC_CORE_UTIL_STAT_H +#define GRPC_SRC_CORE_UTIL_STAT_H + +#include #include #include "absl/status/status.h" -#include - namespace grpc_core { // Gets the last-modified timestamp of a file or a directory. @@ -33,4 +33,4 @@ absl::Status GetFileModificationTime(const char* filename, time_t* timestamp); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_STAT_H +#endif // GRPC_SRC_CORE_UTIL_STAT_H diff --git a/src/core/lib/gprpp/status_helper.cc b/src/core/util/status_helper.cc similarity index 99% rename from src/core/lib/gprpp/status_helper.cc rename to src/core/util/status_helper.cc index b3563592b5544..339500e2b0cd2 100644 --- a/src/core/lib/gprpp/status_helper.cc +++ b/src/core/util/status_helper.cc @@ -16,7 +16,9 @@ // // -#include "src/core/lib/gprpp/status_helper.h" +#include + +#include "src/core/util/status_helper.h" #include @@ -35,8 +37,6 @@ #include "upb/base/string_view.h" #include "upb/mem/arena.hpp" -#include - #include "src/core/lib/slice/percent_encoding.h" #include "src/core/lib/slice/slice.h" diff --git a/src/core/lib/gprpp/status_helper.h b/src/core/util/status_helper.h similarity index 96% rename from src/core/lib/gprpp/status_helper.h rename to src/core/util/status_helper.h index 3f561d21b9baf..e2e089ce25eba 100644 --- a/src/core/lib/gprpp/status_helper.h +++ b/src/core/util/status_helper.h @@ -16,8 +16,10 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_STATUS_HELPER_H -#define GRPC_SRC_CORE_LIB_GPRPP_STATUS_HELPER_H +#ifndef GRPC_SRC_CORE_UTIL_STATUS_HELPER_H +#define GRPC_SRC_CORE_UTIL_STATUS_HELPER_H + +#include #include @@ -29,9 +31,7 @@ #include "absl/time/time.h" #include "absl/types/optional.h" -#include - -#include "src/core/lib/gprpp/debug_location.h" +#include "src/core/util/debug_location.h" extern "C" { struct google_rpc_Status; @@ -159,4 +159,4 @@ absl::Status StatusMoveFromHeapPtr(uintptr_t ptr); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_STATUS_HELPER_H +#endif // GRPC_SRC_CORE_UTIL_STATUS_HELPER_H diff --git a/src/core/lib/gprpp/strerror.cc b/src/core/util/strerror.cc similarity index 96% rename from src/core/lib/gprpp/strerror.cc rename to src/core/util/strerror.cc index 298efa1eed391..868acee2c0693 100644 --- a/src/core/lib/gprpp/strerror.cc +++ b/src/core/util/strerror.cc @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/strerror.h" +#include + +#include "src/core/util/strerror.h" #include #include "absl/strings/str_format.h" -#include - namespace grpc_core { #ifdef GPR_WINDOWS diff --git a/src/core/lib/gprpp/strerror.h b/src/core/util/strerror.h similarity index 85% rename from src/core/lib/gprpp/strerror.h rename to src/core/util/strerror.h index fce645f6c1f4b..24f285b6d7639 100644 --- a/src/core/lib/gprpp/strerror.h +++ b/src/core/util/strerror.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_STRERROR_H -#define GRPC_SRC_CORE_LIB_GPRPP_STRERROR_H - -#include +#ifndef GRPC_SRC_CORE_UTIL_STRERROR_H +#define GRPC_SRC_CORE_UTIL_STRERROR_H #include +#include + namespace grpc_core { // Returns a string describing the posix error code. @@ -26,4 +26,4 @@ std::string StrError(int err); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_STRERROR_H +#endif // GRPC_SRC_CORE_UTIL_STRERROR_H diff --git a/src/core/util/string.cc b/src/core/util/string.cc index 56cc040809d6e..3048a432a63c6 100644 --- a/src/core/util/string.cc +++ b/src/core/util/string.cc @@ -34,7 +34,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" char* gpr_strdup(const char* src) { diff --git a/src/core/util/subprocess_posix.cc b/src/core/util/subprocess_posix.cc index 961c68de8ad52..b421d50549cf7 100644 --- a/src/core/util/subprocess_posix.cc +++ b/src/core/util/subprocess_posix.cc @@ -34,8 +34,8 @@ #include -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/memory.h" +#include "src/core/util/strerror.h" #include "src/core/util/subprocess.h" struct gpr_subprocess { diff --git a/src/core/util/subprocess_windows.cc b/src/core/util/subprocess_windows.cc index 2824cb6107184..c8760ec3ee7ea 100644 --- a/src/core/util/subprocess_windows.cc +++ b/src/core/util/subprocess_windows.cc @@ -30,10 +30,10 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/tchar.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/subprocess.h" +#include "src/core/util/tchar.h" struct gpr_subprocess { PROCESS_INFORMATION pi; diff --git a/src/core/lib/gprpp/sync.h b/src/core/util/sync.h similarity index 97% rename from src/core/lib/gprpp/sync.h rename to src/core/util/sync.h index 3b80a7bc91ecc..c85d9e2ad778e 100644 --- a/src/core/lib/gprpp/sync.h +++ b/src/core/util/sync.h @@ -16,18 +16,19 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_SYNC_H -#define GRPC_SRC_CORE_LIB_GPRPP_SYNC_H +#ifndef GRPC_SRC_CORE_UTIL_SYNC_H +#define GRPC_SRC_CORE_UTIL_SYNC_H + +#include #include "absl/base/thread_annotations.h" #include "absl/log/check.h" #include "absl/synchronization/mutex.h" -#include #include #ifndef GPR_ABSEIL_SYNC -#include "src/core/lib/gprpp/time_util.h" +#include "src/core/util/time_util.h" #endif // The core library is not accessible in C++ codegen headers, and vice versa. @@ -196,4 +197,4 @@ class ABSL_SCOPED_LOCKABLE LockableAndReleasableMutexLock { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_SYNC_H +#endif // GRPC_SRC_CORE_UTIL_SYNC_H diff --git a/src/core/util/sync_abseil.cc b/src/core/util/sync_abseil.cc index 1d826f6565ca6..9e83702253202 100644 --- a/src/core/util/sync_abseil.cc +++ b/src/core/util/sync_abseil.cc @@ -32,8 +32,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time_util.h" +#include "src/core/util/crash.h" +#include "src/core/util/time_util.h" void gpr_mu_init(gpr_mu* mu) { static_assert(sizeof(gpr_mu) == sizeof(absl::Mutex), diff --git a/src/core/lib/gprpp/table.h b/src/core/util/table.h similarity index 99% rename from src/core/lib/gprpp/table.h rename to src/core/util/table.h index 7085bae0357dc..bd35c4963a86e 100644 --- a/src/core/lib/gprpp/table.h +++ b/src/core/util/table.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TABLE_H -#define GRPC_SRC_CORE_LIB_GPRPP_TABLE_H +#ifndef GRPC_SRC_CORE_UTIL_TABLE_H +#define GRPC_SRC_CORE_UTIL_TABLE_H + +#include #include @@ -25,9 +27,7 @@ #include "absl/meta/type_traits.h" #include "absl/utility/utility.h" -#include - -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" namespace grpc_core { @@ -485,4 +485,4 @@ class Table { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_TABLE_H +#endif // GRPC_SRC_CORE_UTIL_TABLE_H diff --git a/src/core/lib/gprpp/tchar.cc b/src/core/util/tchar.cc similarity index 97% rename from src/core/lib/gprpp/tchar.cc rename to src/core/util/tchar.cc index 20bd7acc233d0..f558b4cbc1d55 100644 --- a/src/core/lib/gprpp/tchar.cc +++ b/src/core/util/tchar.cc @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/tchar.h" - #include +#include "src/core/util/tchar.h" + #ifdef GPR_WINDOWS namespace grpc_core { diff --git a/src/core/lib/gprpp/tchar.h b/src/core/util/tchar.h similarity index 87% rename from src/core/lib/gprpp/tchar.h rename to src/core/util/tchar.h index d1e1acbc1bd3e..53350b0af8b60 100644 --- a/src/core/lib/gprpp/tchar.h +++ b/src/core/util/tchar.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TCHAR_H -#define GRPC_SRC_CORE_LIB_GPRPP_TCHAR_H +#ifndef GRPC_SRC_CORE_UTIL_TCHAR_H +#define GRPC_SRC_CORE_UTIL_TCHAR_H #include @@ -30,4 +30,4 @@ std::string TcharToChar(TcharString input); } // namespace grpc_core #endif -#endif // GRPC_SRC_CORE_LIB_GPRPP_TCHAR_H +#endif // GRPC_SRC_CORE_UTIL_TCHAR_H diff --git a/src/core/lib/gprpp/thd.h b/src/core/util/thd.h similarity index 98% rename from src/core/lib/gprpp/thd.h rename to src/core/util/thd.h index 6662610cd6872..ec0ae599f7f94 100644 --- a/src/core/lib/gprpp/thd.h +++ b/src/core/util/thd.h @@ -16,11 +16,13 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_THD_H -#define GRPC_SRC_CORE_LIB_GPRPP_THD_H +#ifndef GRPC_SRC_CORE_UTIL_THD_H +#define GRPC_SRC_CORE_UTIL_THD_H /// Internal thread interface. +#include + #include #include @@ -29,7 +31,6 @@ #include "absl/functional/any_invocable.h" #include "absl/log/check.h" -#include #include namespace grpc_core { @@ -191,4 +192,4 @@ class Thread { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_THD_H +#endif // GRPC_SRC_CORE_UTIL_THD_H diff --git a/src/core/util/time.cc b/src/core/util/time.cc index d71cee90ca9fa..c5f899bc473d0 100644 --- a/src/core/util/time.cc +++ b/src/core/util/time.cc @@ -1,6 +1,4 @@ -// -// -// Copyright 2015 gRPC authors. +// Copyright 2021 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,258 +11,232 @@ // 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. -// -// - -// Generic implementation of time calls. #include -#include -#include -#include +#include "src/core/util/time.h" + +#include +#include +#include +#include +#include #include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/str_format.h" #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/no_destruct.h" -int gpr_time_cmp(gpr_timespec a, gpr_timespec b) { - int cmp = (a.tv_sec > b.tv_sec) - (a.tv_sec < b.tv_sec); - CHECK(a.clock_type == b.clock_type); - if (cmp == 0 && a.tv_sec != INT64_MAX && a.tv_sec != INT64_MIN) { - cmp = (a.tv_nsec > b.tv_nsec) - (a.tv_nsec < b.tv_nsec); - } - return cmp; -} +// IWYU pragma: no_include -gpr_timespec gpr_time_min(gpr_timespec a, gpr_timespec b) { - return gpr_time_cmp(a, b) < 0 ? a : b; -} +namespace grpc_core { -gpr_timespec gpr_time_max(gpr_timespec a, gpr_timespec b) { - return gpr_time_cmp(a, b) > 0 ? a : b; -} +namespace { + +std::atomic g_process_epoch_seconds; +std::atomic g_process_epoch_cycles; -gpr_timespec gpr_time_0(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = 0; - out.tv_nsec = 0; - out.clock_type = type; - return out; +class GprNowTimeSource final : public Timestamp::Source { + public: + Timestamp Now() override { + return Timestamp::FromTimespecRoundDown(gpr_now(GPR_CLOCK_MONOTONIC)); + } +}; + +GPR_ATTRIBUTE_NOINLINE std::pair InitTime() { + gpr_cycle_counter cycles_start = 0; + gpr_cycle_counter cycles_end = 0; + int64_t process_epoch_seconds = 0; + + // Check the current time... if we end up with zero, try again after 100ms. + // If it doesn't advance after sleeping for 2100ms, crash the process. + for (int i = 0; i < 21; i++) { + cycles_start = gpr_get_cycle_counter(); + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + cycles_end = gpr_get_cycle_counter(); + process_epoch_seconds = now.tv_sec; + if (process_epoch_seconds > 1) { + break; + } + LOG(INFO) << "gpr_now(GPR_CLOCK_MONOTONIC) returns a very small number: " + "sleeping for 100ms"; + gpr_sleep_until(gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN))); + } + + // Check time has increased past 1 second. + CHECK_GT(process_epoch_seconds, 1); + // Fake the epoch to always return >=1 second from our monotonic clock (to + // avoid bugs elsewhere) + process_epoch_seconds -= 1; + int64_t expected = 0; + gpr_cycle_counter process_epoch_cycles = (cycles_start + cycles_end) / 2; + CHECK_NE(process_epoch_cycles, 0); + if (!g_process_epoch_seconds.compare_exchange_strong( + expected, process_epoch_seconds, std::memory_order_relaxed, + std::memory_order_relaxed)) { + process_epoch_seconds = expected; + do { + process_epoch_cycles = + g_process_epoch_cycles.load(std::memory_order_relaxed); + } while (process_epoch_cycles == 0); + } else { + g_process_epoch_cycles.store(process_epoch_cycles, + std::memory_order_relaxed); + } + return std::make_pair(process_epoch_seconds, process_epoch_cycles); } -gpr_timespec gpr_inf_future(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MAX; - out.tv_nsec = 0; - out.clock_type = type; - return out; +gpr_timespec StartTime() { + int64_t sec = g_process_epoch_seconds.load(std::memory_order_relaxed); + if (GPR_UNLIKELY(sec == 0)) sec = InitTime().first; + return {sec, 0, GPR_CLOCK_MONOTONIC}; } -gpr_timespec gpr_inf_past(gpr_clock_type type) { - gpr_timespec out; - out.tv_sec = INT64_MIN; - out.tv_nsec = 0; - out.clock_type = type; - return out; +gpr_cycle_counter StartCycleCounter() { + gpr_cycle_counter cycles = + g_process_epoch_cycles.load(std::memory_order_relaxed); + if (GPR_UNLIKELY(cycles == 0)) cycles = InitTime().second; + return cycles; } -static gpr_timespec to_seconds_from_sub_second_time(int64_t time_in_units, - int64_t units_per_sec, - gpr_clock_type type) { - gpr_timespec out; - if (time_in_units == INT64_MAX) { - out = gpr_inf_future(type); - } else if (time_in_units == INT64_MIN) { - out = gpr_inf_past(type); - } else { - DCHECK_EQ(GPR_NS_PER_SEC % units_per_sec, 0); - - out.tv_sec = time_in_units / units_per_sec; - out.tv_nsec = - static_cast((time_in_units - (out.tv_sec * units_per_sec)) * - (GPR_NS_PER_SEC / units_per_sec)); - /// `out.tv_nsec` should always be positive. - if (out.tv_nsec < 0) { - out.tv_nsec += GPR_NS_PER_SEC; - out.tv_sec--; - } +gpr_timespec MillisecondsAsTimespec(int64_t millis, gpr_clock_type clock_type) { + // special-case infinities as Timestamp can be 32bit on some + // platforms while gpr_time_from_millis always takes an int64_t. + if (millis == std::numeric_limits::max()) { + return gpr_inf_future(clock_type); + } + if (millis == std::numeric_limits::min()) { + return gpr_inf_past(clock_type); + } - out.clock_type = type; + if (clock_type == GPR_TIMESPAN) { + return gpr_time_from_millis(millis, GPR_TIMESPAN); + } + return gpr_time_add(gpr_convert_clock_type(StartTime(), clock_type), + gpr_time_from_millis(millis, GPR_TIMESPAN)); +} + +int64_t TimespanToMillisRoundUp(gpr_timespec ts) { + CHECK(ts.clock_type == GPR_TIMESPAN); + double x = GPR_MS_PER_SEC * static_cast(ts.tv_sec) + + static_cast(ts.tv_nsec) / GPR_NS_PER_MS + + static_cast(GPR_NS_PER_SEC - 1) / + static_cast(GPR_NS_PER_SEC); + if (x <= static_cast(std::numeric_limits::min())) { + return std::numeric_limits::min(); + } + if (x >= static_cast(std::numeric_limits::max())) { + return std::numeric_limits::max(); } - return out; + return static_cast(x); } -static gpr_timespec to_seconds_from_above_second_time(int64_t time_in_units, - int64_t secs_per_unit, - gpr_clock_type type) { - gpr_timespec out; - if (time_in_units >= INT64_MAX / secs_per_unit) { - out = gpr_inf_future(type); - } else if (time_in_units <= INT64_MIN / secs_per_unit) { - out = gpr_inf_past(type); - } else { - out.tv_sec = time_in_units * secs_per_unit; - out.tv_nsec = 0; - out.clock_type = type; +int64_t TimespanToMillisRoundDown(gpr_timespec ts) { + CHECK(ts.clock_type == GPR_TIMESPAN); + double x = GPR_MS_PER_SEC * static_cast(ts.tv_sec) + + static_cast(ts.tv_nsec) / GPR_NS_PER_MS; + if (x <= static_cast(std::numeric_limits::min())) { + return std::numeric_limits::min(); + } + if (x >= static_cast(std::numeric_limits::max())) { + return std::numeric_limits::max(); } - return out; + return static_cast(x); } -gpr_timespec gpr_time_from_nanos(int64_t ns, gpr_clock_type clock_type) { - return to_seconds_from_sub_second_time(ns, GPR_NS_PER_SEC, clock_type); -} +} // namespace -gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type) { - return to_seconds_from_sub_second_time(us, GPR_US_PER_SEC, clock_type); +thread_local Timestamp::Source* Timestamp::thread_local_time_source_{ + NoDestructSingleton::Get()}; + +Timestamp ScopedTimeCache::Now() { + if (!cached_time_.has_value()) { + previous()->InvalidateCache(); + cached_time_ = previous()->Now(); + } + return cached_time_.value(); } -gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type clock_type) { - return to_seconds_from_sub_second_time(ms, GPR_MS_PER_SEC, clock_type); +Timestamp Timestamp::FromTimespecRoundUp(gpr_timespec ts) { + return FromMillisecondsAfterProcessEpoch(TimespanToMillisRoundUp(gpr_time_sub( + gpr_convert_clock_type(ts, GPR_CLOCK_MONOTONIC), StartTime()))); } -gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type) { - return to_seconds_from_sub_second_time(s, 1, clock_type); +Timestamp Timestamp::FromTimespecRoundDown(gpr_timespec ts) { + return FromMillisecondsAfterProcessEpoch( + TimespanToMillisRoundDown(gpr_time_sub( + gpr_convert_clock_type(ts, GPR_CLOCK_MONOTONIC), StartTime()))); } -gpr_timespec gpr_time_from_minutes(int64_t m, gpr_clock_type clock_type) { - return to_seconds_from_above_second_time(m, 60, clock_type); +Timestamp Timestamp::FromCycleCounterRoundUp(gpr_cycle_counter c) { + return Timestamp::FromMillisecondsAfterProcessEpoch( + TimespanToMillisRoundUp(gpr_cycle_counter_sub(c, StartCycleCounter()))); } -gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type clock_type) { - return to_seconds_from_above_second_time(h, 3600, clock_type); +Timestamp Timestamp::FromCycleCounterRoundDown(gpr_cycle_counter c) { + return Timestamp::FromMillisecondsAfterProcessEpoch( + TimespanToMillisRoundDown(gpr_cycle_counter_sub(c, StartCycleCounter()))); } -gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b) { - gpr_timespec sum; - int64_t inc = 0; - CHECK(b.clock_type == GPR_TIMESPAN); - // tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve - // tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented - // as {-3, 5e8, GPR_TIMESPAN} - CHECK_GE(b.tv_nsec, 0); - sum.clock_type = a.clock_type; - sum.tv_nsec = a.tv_nsec + b.tv_nsec; - if (sum.tv_nsec >= GPR_NS_PER_SEC) { - sum.tv_nsec -= GPR_NS_PER_SEC; - inc++; - } - if (a.tv_sec == INT64_MAX || a.tv_sec == INT64_MIN) { - sum = a; - } else if (b.tv_sec == INT64_MAX || - (b.tv_sec >= 0 && a.tv_sec >= INT64_MAX - b.tv_sec)) { - sum = gpr_inf_future(sum.clock_type); - } else if (b.tv_sec == INT64_MIN || - (b.tv_sec <= 0 && a.tv_sec <= INT64_MIN - b.tv_sec)) { - sum = gpr_inf_past(sum.clock_type); - } else { - sum.tv_sec = a.tv_sec + b.tv_sec; - if (inc != 0 && sum.tv_sec == INT64_MAX - 1) { - sum = gpr_inf_future(sum.clock_type); - } else { - sum.tv_sec += inc; - } - } - return sum; +gpr_timespec Timestamp::as_timespec(gpr_clock_type clock_type) const { + return MillisecondsAsTimespec(millis_, clock_type); } -gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b) { - gpr_timespec diff; - int64_t dec = 0; - if (b.clock_type == GPR_TIMESPAN) { - diff.clock_type = a.clock_type; - // tv_nsec in a timespan is always +ve. -ve timespan is represented as (-ve - // tv_sec, +ve tv_nsec). For example, timespan = -2.5 seconds is represented - // as {-3, 5e8, GPR_TIMESPAN} - CHECK_GE(b.tv_nsec, 0); - } else { - CHECK(a.clock_type == b.clock_type); - diff.clock_type = GPR_TIMESPAN; +std::string Timestamp::ToString() const { + if (millis_ == std::numeric_limits::max()) { + return "@∞"; } - diff.tv_nsec = a.tv_nsec - b.tv_nsec; - if (diff.tv_nsec < 0) { - diff.tv_nsec += GPR_NS_PER_SEC; - dec++; + if (millis_ == std::numeric_limits::min()) { + return "@-∞"; } - if (a.tv_sec == INT64_MAX || a.tv_sec == INT64_MIN) { - diff.tv_sec = a.tv_sec; - diff.tv_nsec = a.tv_nsec; - } else if (b.tv_sec == INT64_MIN || - (b.tv_sec <= 0 && a.tv_sec >= INT64_MAX + b.tv_sec)) { - diff = gpr_inf_future(GPR_CLOCK_REALTIME); - } else if (b.tv_sec == INT64_MAX || - (b.tv_sec >= 0 && a.tv_sec <= INT64_MIN + b.tv_sec)) { - diff = gpr_inf_past(GPR_CLOCK_REALTIME); - } else { - diff.tv_sec = a.tv_sec - b.tv_sec; - if (dec != 0 && diff.tv_sec == INT64_MIN + 1) { - diff = gpr_inf_past(GPR_CLOCK_REALTIME); - } else { - diff.tv_sec -= dec; - } - } - return diff; + return "@" + std::to_string(millis_) + "ms"; } -int gpr_time_similar(gpr_timespec a, gpr_timespec b, gpr_timespec threshold) { - int cmp_ab; - - CHECK(a.clock_type == b.clock_type); - CHECK(threshold.clock_type == GPR_TIMESPAN); +gpr_timespec Duration::as_timespec() const { + return MillisecondsAsTimespec(millis_, GPR_TIMESPAN); +} - cmp_ab = gpr_time_cmp(a, b); - if (cmp_ab == 0) return 1; - if (cmp_ab < 0) { - return gpr_time_cmp(gpr_time_sub(b, a), threshold) <= 0; - } else { - return gpr_time_cmp(gpr_time_sub(a, b), threshold) <= 0; - } +Duration Duration::FromTimespec(gpr_timespec t) { + return Duration::Milliseconds(TimespanToMillisRoundUp(t)); } -int32_t gpr_time_to_millis(gpr_timespec t) { - if (t.tv_sec >= 2147483) { - if (t.tv_sec == 2147483 && t.tv_nsec < 648 * GPR_NS_PER_MS) { - return 2147483 * GPR_MS_PER_SEC + t.tv_nsec / GPR_NS_PER_MS; - } - return 2147483647; - } else if (t.tv_sec <= -2147483) { - // TODO(ctiller): correct handling here (it's so far in the past do we - // care?) - return -2147483647; - } else { - return static_cast(t.tv_sec * GPR_MS_PER_SEC + - t.tv_nsec / GPR_NS_PER_MS); +std::string Duration::ToString() const { + if (millis_ == std::numeric_limits::max()) { + return "∞"; } + if (millis_ == std::numeric_limits::min()) { + return "-∞"; + } + return std::to_string(millis_) + "ms"; } -double gpr_timespec_to_micros(gpr_timespec t) { - return static_cast(t.tv_sec) * GPR_US_PER_SEC + t.tv_nsec * 1e-3; +std::string Duration::ToJsonString() const { + gpr_timespec ts = as_timespec(); + return absl::StrFormat("%d.%09ds", ts.tv_sec, ts.tv_nsec); } -gpr_timespec gpr_convert_clock_type(gpr_timespec t, gpr_clock_type clock_type) { - if (t.clock_type == clock_type) { - return t; - } - - if (t.tv_sec == INT64_MAX || t.tv_sec == INT64_MIN) { - t.clock_type = clock_type; - return t; - } +Duration::operator grpc_event_engine::experimental::EventEngine::Duration() + const { + return std::chrono::milliseconds( + Clamp(millis_, std::numeric_limits::min() / GPR_NS_PER_MS, + std::numeric_limits::max() / GPR_NS_PER_MS)); +} - if (clock_type == GPR_TIMESPAN) { - return gpr_time_sub(t, gpr_now(t.clock_type)); - } +void TestOnlySetProcessEpoch(gpr_timespec epoch) { + g_process_epoch_seconds.store( + gpr_convert_clock_type(epoch, GPR_CLOCK_MONOTONIC).tv_sec); + g_process_epoch_cycles.store(gpr_get_cycle_counter()); +} - if (t.clock_type == GPR_TIMESPAN) { - return gpr_time_add(gpr_now(clock_type), t); - } +std::ostream& operator<<(std::ostream& out, Timestamp timestamp) { + return out << timestamp.ToString(); +} - // If the given input hits this code, the same result is not guaranteed for - // the same input because it relies on `gpr_now` to calculate the difference - // between two different clocks. Please be careful when you want to use this - // function in unit tests. (e.g. https://github.com/grpc/grpc/pull/22655) - return gpr_time_add(gpr_now(clock_type), - gpr_time_sub(t, gpr_now(t.clock_type))); +std::ostream& operator<<(std::ostream& out, Duration duration) { + return out << duration.ToString(); } + +} // namespace grpc_core diff --git a/src/core/lib/gprpp/time.h b/src/core/util/time.h similarity index 97% rename from src/core/lib/gprpp/time.h rename to src/core/util/time.h index 0e57349b7812c..cf242eba1cbfa 100644 --- a/src/core/lib/gprpp/time.h +++ b/src/core/util/time.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TIME_H -#define GRPC_SRC_CORE_LIB_GPRPP_TIME_H +#ifndef GRPC_SRC_CORE_UTIL_TIME_H +#define GRPC_SRC_CORE_UTIL_TIME_H + +#include #include @@ -24,7 +26,6 @@ #include "absl/types/optional.h" #include -#include #include #include "src/core/util/time_precise.h" @@ -296,6 +297,14 @@ class Duration { int64_t millis_; }; +inline std::ostream& operator<<(std::ostream& out, const Duration& d) { + return out << d.ToString(); +} + +inline std::ostream& operator<<(std::ostream& out, const Timestamp& d) { + return out << d.ToString(); +} + inline Duration operator+(Duration lhs, Duration rhs) { return Duration::Milliseconds( time_detail::MillisAdd(lhs.millis(), rhs.millis())); @@ -376,4 +385,4 @@ void TestOnlySetProcessEpoch(gpr_timespec epoch); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_TIME_H +#endif // GRPC_SRC_CORE_UTIL_TIME_H diff --git a/src/core/lib/gprpp/time_averaged_stats.cc b/src/core/util/time_averaged_stats.cc similarity index 97% rename from src/core/lib/gprpp/time_averaged_stats.cc rename to src/core/util/time_averaged_stats.cc index 55f65397b7918..dc6db49a01100 100644 --- a/src/core/lib/gprpp/time_averaged_stats.cc +++ b/src/core/util/time_averaged_stats.cc @@ -16,10 +16,10 @@ // // -#include "src/core/lib/gprpp/time_averaged_stats.h" - #include +#include "src/core/util/time_averaged_stats.h" + namespace grpc_core { TimeAveragedStats::TimeAveragedStats(double init_avg, double regress_weight, diff --git a/src/core/lib/gprpp/time_averaged_stats.h b/src/core/util/time_averaged_stats.h similarity index 95% rename from src/core/lib/gprpp/time_averaged_stats.h rename to src/core/util/time_averaged_stats.h index cdd10a24afae3..8f0c2c449896a 100644 --- a/src/core/lib/gprpp/time_averaged_stats.h +++ b/src/core/util/time_averaged_stats.h @@ -16,8 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TIME_AVERAGED_STATS_H -#define GRPC_SRC_CORE_LIB_GPRPP_TIME_AVERAGED_STATS_H +#ifndef GRPC_SRC_CORE_UTIL_TIME_AVERAGED_STATS_H +#define GRPC_SRC_CORE_UTIL_TIME_AVERAGED_STATS_H namespace grpc_core { @@ -76,4 +76,4 @@ class TimeAveragedStats { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_TIME_AVERAGED_STATS_H +#endif // GRPC_SRC_CORE_UTIL_TIME_AVERAGED_STATS_H diff --git a/src/core/util/time_precise.cc b/src/core/util/time_precise.cc index 8e5de7b5334f3..5274789c70e68 100644 --- a/src/core/util/time_precise.cc +++ b/src/core/util/time_precise.cc @@ -29,7 +29,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/time_precise.h" #ifndef GPR_CYCLE_COUNTER_CUSTOM diff --git a/src/core/lib/gprpp/time_util.cc b/src/core/util/time_util.cc similarity index 98% rename from src/core/lib/gprpp/time_util.cc rename to src/core/util/time_util.cc index 94ca4e08d8830..4730e79184a8e 100644 --- a/src/core/lib/gprpp/time_util.cc +++ b/src/core/util/time_util.cc @@ -14,14 +14,15 @@ // limitations under the License. // -#include "src/core/lib/gprpp/time_util.h" +#include + +#include "src/core/util/time_util.h" #include #include #include "absl/log/check.h" -#include #include namespace grpc_core { diff --git a/src/core/lib/gprpp/time_util.h b/src/core/util/time_util.h similarity index 89% rename from src/core/lib/gprpp/time_util.h rename to src/core/util/time_util.h index 665eeafb649a0..61ad6d11a5b37 100644 --- a/src/core/lib/gprpp/time_util.h +++ b/src/core/util/time_util.h @@ -14,12 +14,13 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TIME_UTIL_H -#define GRPC_SRC_CORE_LIB_GPRPP_TIME_UTIL_H +#ifndef GRPC_SRC_CORE_UTIL_TIME_UTIL_H +#define GRPC_SRC_CORE_UTIL_TIME_UTIL_H + +#include #include "absl/time/time.h" -#include #include namespace grpc_core { @@ -38,4 +39,4 @@ absl::Time ToAbslTime(gpr_timespec ts); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_TIME_UTIL_H +#endif // GRPC_SRC_CORE_UTIL_TIME_UTIL_H diff --git a/src/core/lib/gprpp/type_list.h b/src/core/util/type_list.h similarity index 86% rename from src/core/lib/gprpp/type_list.h rename to src/core/util/type_list.h index 958a733ba709c..c0a9161c0874b 100644 --- a/src/core/lib/gprpp/type_list.h +++ b/src/core/util/type_list.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_TYPE_LIST_H -#define GRPC_SRC_CORE_LIB_GPRPP_TYPE_LIST_H +#ifndef GRPC_SRC_CORE_UTIL_TYPE_LIST_H +#define GRPC_SRC_CORE_UTIL_TYPE_LIST_H namespace grpc_core { @@ -29,4 +29,4 @@ struct Typelist { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_TYPE_LIST_H +#endif // GRPC_SRC_CORE_UTIL_TYPE_LIST_H diff --git a/src/core/lib/gprpp/unique_type_name.h b/src/core/util/unique_type_name.h similarity index 95% rename from src/core/lib/gprpp/unique_type_name.h rename to src/core/util/unique_type_name.h index 4fc7c75ed4b0f..29e63d8404ff5 100644 --- a/src/core/lib/gprpp/unique_type_name.h +++ b/src/core/util/unique_type_name.h @@ -14,15 +14,15 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_UNIQUE_TYPE_NAME_H -#define GRPC_SRC_CORE_LIB_GPRPP_UNIQUE_TYPE_NAME_H +#ifndef GRPC_SRC_CORE_UTIL_UNIQUE_TYPE_NAME_H +#define GRPC_SRC_CORE_UTIL_UNIQUE_TYPE_NAME_H + +#include #include #include "absl/strings/string_view.h" -#include - #include "src/core/util/useful.h" // Provides a type name that is unique by instance rather than by @@ -121,4 +121,4 @@ UniqueTypeName UniqueTypeNameFor() { return factory.Create(); \ }()) -#endif // GRPC_SRC_CORE_LIB_GPRPP_UNIQUE_TYPE_NAME_H +#endif // GRPC_SRC_CORE_UTIL_UNIQUE_TYPE_NAME_H diff --git a/src/core/lib/uri/uri_parser.cc b/src/core/util/uri.cc similarity index 99% rename from src/core/lib/uri/uri_parser.cc rename to src/core/util/uri.cc index 95d92663194f2..82fb29d46e1f2 100644 --- a/src/core/lib/uri/uri_parser.cc +++ b/src/core/util/uri.cc @@ -14,7 +14,9 @@ // limitations under the License. // -#include "src/core/lib/uri/uri_parser.h" +#include + +#include "src/core/util/uri.h" #include #include @@ -36,8 +38,6 @@ #include "absl/strings/str_split.h" #include "absl/strings/strip.h" -#include - namespace grpc_core { namespace { diff --git a/src/core/lib/uri/uri_parser.h b/src/core/util/uri.h similarity index 96% rename from src/core/lib/uri/uri_parser.h rename to src/core/util/uri.h index 2768bae179f52..14e9274eaa86a 100644 --- a/src/core/lib/uri/uri_parser.h +++ b/src/core/util/uri.h @@ -14,8 +14,10 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_URI_URI_PARSER_H -#define GRPC_SRC_CORE_LIB_URI_URI_PARSER_H +#ifndef GRPC_SRC_CORE_UTIL_URI_H +#define GRPC_SRC_CORE_UTIL_URI_H + +#include #include #include @@ -24,8 +26,6 @@ #include "absl/status/statusor.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { class URI { @@ -98,4 +98,4 @@ class URI { }; } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_URI_URI_PARSER_H +#endif // GRPC_SRC_CORE_UTIL_URI_H diff --git a/src/core/lib/gprpp/uuid_v4.cc b/src/core/util/uuid_v4.cc similarity index 96% rename from src/core/lib/gprpp/uuid_v4.cc rename to src/core/util/uuid_v4.cc index 23297a34c0532..b0847a8d33e38 100644 --- a/src/core/lib/gprpp/uuid_v4.cc +++ b/src/core/util/uuid_v4.cc @@ -16,11 +16,11 @@ // // -#include "src/core/lib/gprpp/uuid_v4.h" +#include -#include "absl/strings/str_format.h" +#include "src/core/util/uuid_v4.h" -#include +#include "absl/strings/str_format.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/uuid_v4.h b/src/core/util/uuid_v4.h similarity index 87% rename from src/core/lib/gprpp/uuid_v4.h rename to src/core/util/uuid_v4.h index 32264005b7580..e7bf52c64097c 100644 --- a/src/core/lib/gprpp/uuid_v4.h +++ b/src/core/util/uuid_v4.h @@ -16,15 +16,15 @@ // // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_UUID_V4_H -#define GRPC_SRC_CORE_LIB_GPRPP_UUID_V4_H +#ifndef GRPC_SRC_CORE_UTIL_UUID_V4_H +#define GRPC_SRC_CORE_UTIL_UUID_V4_H + +#include #include #include -#include - namespace grpc_core { // Generates string in the UUIDv4 form. \a hi and \a lo are expected to be @@ -33,4 +33,4 @@ std::string GenerateUUIDv4(uint64_t hi, uint64_t lo); } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_UUID_V4_H +#endif // GRPC_SRC_CORE_UTIL_UUID_V4_H diff --git a/src/core/lib/gprpp/validation_errors.cc b/src/core/util/validation_errors.cc similarity index 97% rename from src/core/lib/gprpp/validation_errors.cc rename to src/core/util/validation_errors.cc index 84d8d75a2fb1f..047ea4201617f 100644 --- a/src/core/lib/gprpp/validation_errors.cc +++ b/src/core/util/validation_errors.cc @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/validation_errors.h" +#include + +#include "src/core/util/validation_errors.h" #include @@ -24,8 +26,6 @@ #include "absl/strings/str_join.h" #include "absl/strings/strip.h" -#include - namespace grpc_core { void ValidationErrors::PushField(absl::string_view ext) { diff --git a/src/core/lib/gprpp/validation_errors.h b/src/core/util/validation_errors.h similarity index 96% rename from src/core/lib/gprpp/validation_errors.h rename to src/core/util/validation_errors.h index 34a299b2ca856..5c075c12ccefb 100644 --- a/src/core/lib/gprpp/validation_errors.h +++ b/src/core/util/validation_errors.h @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef GRPC_SRC_CORE_LIB_GPRPP_VALIDATION_ERRORS_H -#define GRPC_SRC_CORE_LIB_GPRPP_VALIDATION_ERRORS_H +#ifndef GRPC_SRC_CORE_UTIL_VALIDATION_ERRORS_H +#define GRPC_SRC_CORE_UTIL_VALIDATION_ERRORS_H + +#include #include @@ -25,8 +27,6 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include - namespace grpc_core { // Tracks errors that occur during validation of a data structure (e.g., @@ -142,4 +142,4 @@ class ValidationErrors { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_VALIDATION_ERRORS_H +#endif // GRPC_SRC_CORE_UTIL_VALIDATION_ERRORS_H diff --git a/src/core/util/windows/cpu.cc b/src/core/util/windows/cpu.cc index a8ba5952f889f..fcc1bd260dcc4 100644 --- a/src/core/util/windows/cpu.cc +++ b/src/core/util/windows/cpu.cc @@ -21,7 +21,7 @@ #ifdef GPR_WINDOWS #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" unsigned gpr_cpu_num_cores(void) { SYSTEM_INFO si; diff --git a/src/core/lib/gprpp/windows/directory_reader.cc b/src/core/util/windows/directory_reader.cc similarity index 97% rename from src/core/lib/gprpp/windows/directory_reader.cc rename to src/core/util/windows/directory_reader.cc index 2deedb8ca5a39..02c7916798cba 100644 --- a/src/core/lib/gprpp/windows/directory_reader.cc +++ b/src/core/util/windows/directory_reader.cc @@ -30,7 +30,8 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/directory_reader.h" +#include "src/core/util/directory_reader.h" + namespace grpc_core { namespace { diff --git a/src/core/lib/gprpp/windows/env.cc b/src/core/util/windows/env.cc similarity index 95% rename from src/core/lib/gprpp/windows/env.cc rename to src/core/util/windows/env.cc index 4390d202e01e5..4bbccb2cd344d 100644 --- a/src/core/lib/gprpp/windows/env.cc +++ b/src/core/util/windows/env.cc @@ -24,8 +24,8 @@ #include -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/tchar.h" +#include "src/core/util/env.h" +#include "src/core/util/tchar.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/windows/stat.cc b/src/core/util/windows/stat.cc similarity index 92% rename from src/core/lib/gprpp/windows/stat.cc rename to src/core/util/windows/stat.cc index aa1017a1d4a3b..8a08d087a5ef7 100644 --- a/src/core/lib/gprpp/windows/stat.cc +++ b/src/core/util/windows/stat.cc @@ -25,9 +25,9 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/stat.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/crash.h" +#include "src/core/util/stat.h" +#include "src/core/util/strerror.h" namespace grpc_core { diff --git a/src/core/util/windows/string_util.cc b/src/core/util/windows/string_util.cc index c39152e603700..105ce0636c907 100644 --- a/src/core/util/windows/string_util.cc +++ b/src/core/util/windows/string_util.cc @@ -36,8 +36,8 @@ #include #include -#include "src/core/lib/gprpp/tchar.h" #include "src/core/util/string.h" +#include "src/core/util/tchar.h" char* gpr_format_message(int messageid) { LPTSTR tmessage; diff --git a/src/core/util/windows/sync.cc b/src/core/util/windows/sync.cc index 0f7fd78868daf..84c06503e2fdb 100644 --- a/src/core/util/windows/sync.cc +++ b/src/core/util/windows/sync.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" void gpr_mu_init(gpr_mu* mu) { InitializeCriticalSection(&mu->cs); diff --git a/src/core/lib/gprpp/windows/thd.cc b/src/core/util/windows/thd.cc similarity index 97% rename from src/core/lib/gprpp/windows/thd.cc rename to src/core/util/windows/thd.cc index 1e754e916b93a..0423e21baa2b7 100644 --- a/src/core/lib/gprpp/windows/thd.cc +++ b/src/core/util/windows/thd.cc @@ -31,9 +31,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" +#include "src/core/util/thd.h" namespace { class ThreadInternalsWindows; diff --git a/src/core/util/windows/time.cc b/src/core/util/windows/time.cc index 21cfed52a13f9..62151a2b6a50c 100644 --- a/src/core/util/windows/time.cc +++ b/src/core/util/windows/time.cc @@ -30,7 +30,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/time_precise.h" static LARGE_INTEGER g_start_time = []() { diff --git a/src/core/util/windows/tmpfile.cc b/src/core/util/windows/tmpfile.cc index 23d647a2b8e8a..44119406582e1 100644 --- a/src/core/util/windows/tmpfile.cc +++ b/src/core/util/windows/tmpfile.cc @@ -28,8 +28,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/tchar.h" +#include "src/core/util/crash.h" +#include "src/core/util/tchar.h" #include "src/core/util/tmpfile.h" FILE* gpr_tmpfile(const char* prefix, char** tmp_filename_out) { diff --git a/src/core/lib/gprpp/work_serializer.cc b/src/core/util/work_serializer.cc similarity index 98% rename from src/core/lib/gprpp/work_serializer.cc rename to src/core/util/work_serializer.cc index 16ed3fd6e68f1..35c509f5828f4 100644 --- a/src/core/lib/gprpp/work_serializer.cc +++ b/src/core/util/work_serializer.cc @@ -14,7 +14,9 @@ // limitations under the License. // -#include "src/core/lib/gprpp/work_serializer.h" +#include + +#include "src/core/util/work_serializer.h" #include @@ -31,18 +33,17 @@ #include "absl/log/log.h" #include -#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/mpscq.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/debug_location.h" #include "src/core/util/latent_see.h" +#include "src/core/util/mpscq.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/sync.h" namespace grpc_core { diff --git a/src/core/lib/gprpp/work_serializer.h b/src/core/util/work_serializer.h similarity index 94% rename from src/core/lib/gprpp/work_serializer.h rename to src/core/util/work_serializer.h index 677c97ad3809b..780fa4fb05ed0 100644 --- a/src/core/lib/gprpp/work_serializer.h +++ b/src/core/util/work_serializer.h @@ -14,8 +14,10 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_WORK_SERIALIZER_H -#define GRPC_SRC_CORE_LIB_GPRPP_WORK_SERIALIZER_H +#ifndef GRPC_SRC_CORE_UTIL_WORK_SERIALIZER_H +#define GRPC_SRC_CORE_UTIL_WORK_SERIALIZER_H + +#include #include #include @@ -23,10 +25,9 @@ #include "absl/base/thread_annotations.h" #include -#include -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" namespace grpc_core { @@ -103,4 +104,4 @@ class ABSL_LOCKABLE WorkSerializer { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_GPRPP_WORK_SERIALIZER_H +#endif // GRPC_SRC_CORE_UTIL_WORK_SERIALIZER_H diff --git a/src/core/lib/gprpp/xxhash_inline.h b/src/core/util/xxhash_inline.h similarity index 86% rename from src/core/lib/gprpp/xxhash_inline.h rename to src/core/util/xxhash_inline.h index 6b12c7112164a..ea5565ac3b623 100644 --- a/src/core/lib/gprpp/xxhash_inline.h +++ b/src/core/util/xxhash_inline.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_GPRPP_XXHASH_INLINE_H -#define GRPC_SRC_CORE_LIB_GPRPP_XXHASH_INLINE_H +#ifndef GRPC_SRC_CORE_UTIL_XXHASH_INLINE_H +#define GRPC_SRC_CORE_UTIL_XXHASH_INLINE_H #include @@ -26,4 +26,4 @@ #define XXH_INLINE_ALL #include "xxhash.h" -#endif // GRPC_SRC_CORE_LIB_GPRPP_XXHASH_INLINE_H +#endif // GRPC_SRC_CORE_UTIL_XXHASH_INLINE_H diff --git a/src/core/xds/grpc/certificate_provider_store.h b/src/core/xds/grpc/certificate_provider_store.h index f2a3b944c949b..239d5ca74afd7 100644 --- a/src/core/xds/grpc/certificate_provider_store.h +++ b/src/core/xds/grpc/certificate_provider_store.h @@ -29,18 +29,18 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/xds/grpc/file_watcher_certificate_provider_factory.h b/src/core/xds/grpc/file_watcher_certificate_provider_factory.h index 0306dbe4370f3..493e993648ceb 100644 --- a/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +++ b/src/core/xds/grpc/file_watcher_certificate_provider_factory.h @@ -26,13 +26,13 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_audit_logger_registry.cc b/src/core/xds/grpc/xds_audit_logger_registry.cc index 7ec3a98edf1bb..ef041a4c93307 100644 --- a/src/core/xds/grpc/xds_audit_logger_registry.cc +++ b/src/core/xds/grpc/xds_audit_logger_registry.cc @@ -28,9 +28,9 @@ #include -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/authorization/audit_logging.h" +#include "src/core/util/match.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" diff --git a/src/core/xds/grpc/xds_audit_logger_registry.h b/src/core/xds/grpc/xds_audit_logger_registry.h index 5e8ec0a2e5ef9..92f7aadd30296 100644 --- a/src/core/xds/grpc/xds_audit_logger_registry.h +++ b/src/core/xds/grpc/xds_audit_logger_registry.h @@ -25,8 +25,8 @@ #include -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/xds_client/xds_resource_type.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_bootstrap_grpc.cc b/src/core/xds/grpc/xds_bootstrap_grpc.cc index 87b3541ced61b..34fbd8f13317b 100644 --- a/src/core/xds/grpc/xds_bootstrap_grpc.cc +++ b/src/core/xds/grpc/xds_bootstrap_grpc.cc @@ -34,11 +34,12 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/string.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_bootstrap_grpc.h b/src/core/xds/grpc/xds_bootstrap_grpc.h index 24c47e2eccbea..ba13d2bddf3bc 100644 --- a/src/core/xds/grpc/xds_bootstrap_grpc.h +++ b/src/core/xds/grpc/xds_bootstrap_grpc.h @@ -28,10 +28,11 @@ #include -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/certificate_provider_store.h" #include "src/core/xds/grpc/xds_audit_logger_registry.h" #include "src/core/xds/grpc/xds_cluster_specifier_plugin.h" diff --git a/src/core/xds/grpc/xds_certificate_provider.h b/src/core/xds/grpc/xds_certificate_provider.h index 6c64de04571ac..52b535af2db86 100644 --- a/src/core/xds/grpc/xds_certificate_provider.h +++ b/src/core/xds/grpc/xds_certificate_provider.h @@ -31,12 +31,12 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" +#include "src/core/util/matchers.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_client_grpc.cc b/src/core/xds/grpc/xds_client_grpc.cc index e3092c16f421f..bc47f168b7170 100644 --- a/src/core/xds/grpc/xds_client_grpc.cc +++ b/src/core/xds/grpc/xds_client_grpc.cc @@ -43,19 +43,19 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" +#include "src/core/util/load_file.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_transport_grpc.h" @@ -242,7 +242,7 @@ absl::StatusOr> GrpcXdsClient::GetOrCreate( auto channel_args = ChannelArgs::FromC(xds_channel_args); return MakeRefCounted( key, std::move(*bootstrap), channel_args, - MakeOrphanable(channel_args)); + MakeRefCounted(channel_args)); } // Otherwise, use the global instance. MutexLock lock(g_mu); @@ -265,7 +265,7 @@ absl::StatusOr> GrpcXdsClient::GetOrCreate( auto channel_args = ChannelArgs::FromC(g_channel_args); auto xds_client = MakeRefCounted( key, std::move(*bootstrap), channel_args, - MakeOrphanable(channel_args)); + MakeRefCounted(channel_args)); g_xds_client_map->emplace(xds_client->key(), xds_client.get()); GRPC_TRACE_LOG(xds_client, INFO) << "[xds_client " << xds_client.get() << "] Created xDS client for key " << key; @@ -286,21 +286,28 @@ GlobalStatsPluginRegistry::StatsPluginGroup GetStatsPluginGroupForKey( return GlobalStatsPluginRegistry::GetStatsPluginsForChannel(scope); } +std::string UserAgentName() { + return absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING, + GRPC_XDS_USER_AGENT_NAME_SUFFIX_STRING); +} + +std::string UserAgentVersion() { + return absl::StrCat("C-core ", grpc_version_string(), + GRPC_XDS_USER_AGENT_NAME_SUFFIX_STRING, + GRPC_XDS_USER_AGENT_VERSION_SUFFIX_STRING); +} + } // namespace GrpcXdsClient::GrpcXdsClient( - absl::string_view key, std::unique_ptr bootstrap, + absl::string_view key, std::shared_ptr bootstrap, const ChannelArgs& args, - OrphanablePtr transport_factory) + RefCountedPtr transport_factory) : XdsClient( - std::move(bootstrap), std::move(transport_factory), + bootstrap, transport_factory, grpc_event_engine::experimental::GetDefaultEventEngine(), - std::make_unique(*this), - absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING, - GRPC_XDS_USER_AGENT_NAME_SUFFIX_STRING), - absl::StrCat("C-core ", grpc_version_string(), - GRPC_XDS_USER_AGENT_NAME_SUFFIX_STRING, - GRPC_XDS_USER_AGENT_VERSION_SUFFIX_STRING), + std::make_unique(*this), UserAgentName(), + UserAgentVersion(), std::max(Duration::Zero(), args.GetDurationFromIntMillis( GRPC_ARG_XDS_RESOURCE_DOES_NOT_EXIST_TIMEOUT_MS) @@ -314,11 +321,16 @@ GrpcXdsClient::GrpcXdsClient( [this](CallbackMetricReporter& reporter) { ReportCallbackMetrics(reporter); }, - Duration::Seconds(5), kMetricConnected, kMetricResources)) {} + Duration::Seconds(5), kMetricConnected, kMetricResources)), + lrs_client_(MakeRefCounted( + std::move(bootstrap), UserAgentName(), UserAgentVersion(), + std::move(transport_factory), + grpc_event_engine::experimental::GetDefaultEventEngine())) {} void GrpcXdsClient::Orphaned() { registered_metric_callback_.reset(); XdsClient::Orphaned(); + lrs_client_.reset(); MutexLock lock(g_mu); auto it = g_xds_client_map->find(key_); if (it != g_xds_client_map->end() && it->second == this) { @@ -326,6 +338,11 @@ void GrpcXdsClient::Orphaned() { } } +void GrpcXdsClient::ResetBackoff() { + XdsClient::ResetBackoff(); + lrs_client_->ResetBackoff(); +} + grpc_pollset_set* GrpcXdsClient::interested_parties() const { return reinterpret_cast(transport_factory()) ->interested_parties(); diff --git a/src/core/xds/grpc/xds_client_grpc.h b/src/core/xds/grpc/xds_client_grpc.h index babfbf4bc374a..bf6828f20f6d0 100644 --- a/src/core/xds/grpc/xds_client_grpc.h +++ b/src/core/xds/grpc/xds_client_grpc.h @@ -26,14 +26,15 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" #include "src/core/xds/grpc/certificate_provider_store.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" +#include "src/core/xds/xds_client/lrs_client.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_transport.h" @@ -61,9 +62,9 @@ class GrpcXdsClient final : public XdsClient { // that also use certificate_provider_store(), but we should consider // alternatives for that case as well. GrpcXdsClient(absl::string_view key, - std::unique_ptr bootstrap, + std::shared_ptr bootstrap, const ChannelArgs& args, - OrphanablePtr transport_factory); + RefCountedPtr transport_factory); // Helpers for encoding the XdsClient object in channel args. static absl::string_view ChannelArgName() { @@ -73,6 +74,8 @@ class GrpcXdsClient final : public XdsClient { return QsortCompare(a, b); } + void ResetBackoff() override; + grpc_pollset_set* interested_parties() const; CertificateProviderStore& certificate_provider_store() const { @@ -81,6 +84,8 @@ class GrpcXdsClient final : public XdsClient { absl::string_view key() const { return key_; } + LrsClient& lrs_client() { return *lrs_client_; } + // Builds ClientStatusResponse containing all resources from all XdsClients static grpc_slice DumpAllClientConfigs(); @@ -94,6 +99,7 @@ class GrpcXdsClient final : public XdsClient { OrphanablePtr certificate_provider_store_; GlobalStatsPluginRegistry::StatsPluginGroup stats_plugin_group_; std::unique_ptr registered_metric_callback_; + RefCountedPtr lrs_client_; }; namespace internal { diff --git a/src/core/xds/grpc/xds_cluster.cc b/src/core/xds/grpc/xds_cluster.cc index 1f0c6b05cbfa5..2d4c2834ff04b 100644 --- a/src/core/xds/grpc/xds_cluster.cc +++ b/src/core/xds/grpc/xds_cluster.cc @@ -19,9 +19,9 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/match.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_common_types.h" namespace grpc_core { @@ -49,7 +49,7 @@ std::string XdsClusterResource::ToString() const { }); contents.push_back(absl::StrCat("lb_policy_config=", JsonDump(Json::FromArray(lb_policy_config)))); - if (lrs_load_reporting_server.has_value()) { + if (lrs_load_reporting_server != nullptr) { contents.push_back(absl::StrCat("lrs_load_reporting_server_name=", lrs_load_reporting_server->server_uri())); } diff --git a/src/core/xds/grpc/xds_cluster.h b/src/core/xds/grpc/xds_cluster.h index 7021b61b30089..f733a9328f8aa 100644 --- a/src/core/xds/grpc/xds_cluster.h +++ b/src/core/xds/grpc/xds_cluster.h @@ -35,6 +35,15 @@ namespace grpc_core { +inline bool LrsServersEqual( + const std::shared_ptr& lrs_server1, + const std::shared_ptr& lrs_server2) { + if (lrs_server1 == nullptr) return lrs_server2 == nullptr; + if (lrs_server2 == nullptr) return false; + // Neither one is null, so compare them. + return *lrs_server1 == *lrs_server2; +} + struct XdsClusterResource : public XdsResourceType::ResourceData { struct Eds { // If empty, defaults to the cluster name. @@ -71,8 +80,8 @@ struct XdsClusterResource : public XdsResourceType::ResourceData { // Note: Remaining fields are not used for aggregate clusters. // The LRS server to use for load reporting. - // If not set, load reporting will be disabled. - absl::optional lrs_load_reporting_server; + // If null, load reporting will be disabled. + std::shared_ptr lrs_load_reporting_server; // Tls Context used by clients CommonTlsContext common_tls_context; @@ -92,7 +101,8 @@ struct XdsClusterResource : public XdsResourceType::ResourceData { bool operator==(const XdsClusterResource& other) const { return type == other.type && lb_policy_config == other.lb_policy_config && - lrs_load_reporting_server == other.lrs_load_reporting_server && + LrsServersEqual(lrs_load_reporting_server, + other.lrs_load_reporting_server) && common_tls_context == other.common_tls_context && connection_idle_timeout == other.connection_idle_timeout && max_concurrent_requests == other.max_concurrent_requests && diff --git a/src/core/xds/grpc/xds_cluster_parser.cc b/src/core/xds/grpc/xds_cluster_parser.cc index bcf07881f4c4e..4b0f2683f1021 100644 --- a/src/core/xds/grpc/xds_cluster_parser.cc +++ b/src/core/xds/grpc/xds_cluster_parser.cc @@ -49,11 +49,11 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/util/host_port.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" @@ -454,7 +454,7 @@ absl::StatusOr> CdsResourceParse( ValidationErrors::ScopedField field(&errors, ".lrs_server"); errors.AddError("ConfigSource is not self"); } - cds_update->lrs_load_reporting_server.emplace( + cds_update->lrs_load_reporting_server = std::make_shared( static_cast(context.server)); } // Protocol options. diff --git a/src/core/xds/grpc/xds_cluster_specifier_plugin.h b/src/core/xds/grpc/xds_cluster_specifier_plugin.h index 8aa245fa125ad..4735ab749bc3f 100644 --- a/src/core/xds/grpc/xds_cluster_specifier_plugin.h +++ b/src/core/xds/grpc/xds_cluster_specifier_plugin.h @@ -27,8 +27,8 @@ #include -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types.cc b/src/core/xds/grpc/xds_common_types.cc index bb169304c6858..f1a84590602c1 100644 --- a/src/core/xds/grpc/xds_common_types.cc +++ b/src/core/xds/grpc/xds_common_types.cc @@ -20,7 +20,7 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types.h b/src/core/xds/grpc/xds_common_types.h index 2b0c746a5d147..5bd838f1b777c 100644 --- a/src/core/xds/grpc/xds_common_types.h +++ b/src/core/xds/grpc/xds_common_types.h @@ -23,9 +23,9 @@ #include "absl/strings/string_view.h" #include "absl/types/variant.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/util/json/json.h" +#include "src/core/util/matchers.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_common_types_parser.cc b/src/core/xds/grpc/xds_common_types_parser.cc index 8b617a6143d78..8470b87d6b136 100644 --- a/src/core/xds/grpc/xds_common_types_parser.cc +++ b/src/core/xds/grpc/xds_common_types_parser.cc @@ -44,7 +44,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/upb_utils.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" diff --git a/src/core/xds/grpc/xds_common_types_parser.h b/src/core/xds/grpc/xds_common_types_parser.h index 4d145394166cb..0db17b5f8476f 100644 --- a/src/core/xds/grpc/xds_common_types_parser.h +++ b/src/core/xds/grpc/xds_common_types_parser.h @@ -24,8 +24,8 @@ #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_endpoint.h b/src/core/xds/grpc/xds_endpoint.h index e0bbc7c393434..4a07e5871c0c5 100644 --- a/src/core/xds/grpc/xds_endpoint.h +++ b/src/core/xds/grpc/xds_endpoint.h @@ -25,11 +25,11 @@ #include "absl/base/thread_annotations.h" #include "absl/random/random.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/resolver/endpoint_addresses.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/xds/xds_client/xds_locality.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" diff --git a/src/core/xds/grpc/xds_endpoint_parser.cc b/src/core/xds/grpc/xds_endpoint_parser.cc index 011a739c4a194..bc11c1651e473 100644 --- a/src/core/xds/grpc/xds_endpoint_parser.cc +++ b/src/core/xds/grpc/xds_endpoint_parser.cc @@ -47,11 +47,11 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/env.h" #include "src/core/util/string.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_health_status.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_fault_filter.cc b/src/core/xds/grpc/xds_http_fault_filter.cc index 6bc74df8203a9..bf078f9d0d026 100644 --- a/src/core/xds/grpc/xds_http_fault_filter.cc +++ b/src/core/xds/grpc/xds_http_fault_filter.cc @@ -39,11 +39,11 @@ #include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/transport/status_conversion.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/xds/grpc/xds_http_fault_filter.h b/src/core/xds/grpc/xds_http_fault_filter.h index c269ff17f054d..d36b7761e173b 100644 --- a/src/core/xds/grpc/xds_http_fault_filter.h +++ b/src/core/xds/grpc/xds_http_fault_filter.h @@ -26,7 +26,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_filter.h b/src/core/xds/grpc/xds_http_filter.h index 8a9c54c6ef83e..888b5db75b081 100644 --- a/src/core/xds/grpc/xds_http_filter.h +++ b/src/core/xds/grpc/xds_http_filter.h @@ -27,10 +27,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/transport/interception_chain.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_filter_registry.h b/src/core/xds/grpc/xds_http_filter_registry.h index 37950d01f1521..79547d35d866f 100644 --- a/src/core/xds/grpc/xds_http_filter_registry.h +++ b/src/core/xds/grpc/xds_http_filter_registry.h @@ -30,8 +30,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/transport/interception_chain.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_gcp_authn_filter.cc b/src/core/xds/grpc/xds_http_gcp_authn_filter.cc index 3378284c9c22a..72e964fe74aa7 100644 --- a/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +++ b/src/core/xds/grpc/xds_http_gcp_authn_filter.cc @@ -30,9 +30,9 @@ #include "src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h" #include "src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/xds/grpc/xds_http_gcp_authn_filter.h b/src/core/xds/grpc/xds_http_gcp_authn_filter.h index 662e2c456a7db..5a015e2ad8149 100644 --- a/src/core/xds/grpc/xds_http_gcp_authn_filter.h +++ b/src/core/xds/grpc/xds_http_gcp_authn_filter.h @@ -24,7 +24,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_rbac_filter.cc b/src/core/xds/grpc/xds_http_rbac_filter.cc index 4508ae41b9b0f..381a2c31fdb7b 100644 --- a/src/core/xds/grpc/xds_http_rbac_filter.cc +++ b/src/core/xds/grpc/xds_http_rbac_filter.cc @@ -46,7 +46,7 @@ #include "src/core/ext/filters/rbac/rbac_filter.h" #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" #include "src/core/util/string.h" diff --git a/src/core/xds/grpc/xds_http_rbac_filter.h b/src/core/xds/grpc/xds_http_rbac_filter.h index c7550575b7291..47a0f01c33c79 100644 --- a/src/core/xds/grpc/xds_http_rbac_filter.h +++ b/src/core/xds/grpc/xds_http_rbac_filter.h @@ -26,7 +26,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_http_stateful_session_filter.cc b/src/core/xds/grpc/xds_http_stateful_session_filter.cc index 8216d51ad0645..a1442a1f392b2 100644 --- a/src/core/xds/grpc/xds_http_stateful_session_filter.cc +++ b/src/core/xds/grpc/xds_http_stateful_session_filter.cc @@ -35,11 +35,11 @@ #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/xds/grpc/xds_http_stateful_session_filter.h b/src/core/xds/grpc/xds_http_stateful_session_filter.h index 28df742b6c286..8327a7759f050 100644 --- a/src/core/xds/grpc/xds_http_stateful_session_filter.h +++ b/src/core/xds/grpc/xds_http_stateful_session_filter.h @@ -26,7 +26,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_fwd.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_lb_policy_registry.cc b/src/core/xds/grpc/xds_lb_policy_registry.cc index 67b9805827220..f126855eb2be0 100644 --- a/src/core/xds/grpc/xds_lb_policy_registry.cc +++ b/src/core/xds/grpc/xds_lb_policy_registry.cc @@ -36,9 +36,9 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" diff --git a/src/core/xds/grpc/xds_lb_policy_registry.h b/src/core/xds/grpc/xds_lb_policy_registry.h index f184b20a3d9b6..2396cb8a88d52 100644 --- a/src/core/xds/grpc/xds_lb_policy_registry.h +++ b/src/core/xds/grpc/xds_lb_policy_registry.h @@ -25,8 +25,8 @@ #include -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/xds_client/xds_resource_type.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_listener.cc b/src/core/xds/grpc/xds_listener.cc index 46b971d769273..c67483c41a634 100644 --- a/src/core/xds/grpc/xds_listener.cc +++ b/src/core/xds/grpc/xds_listener.cc @@ -21,7 +21,7 @@ #include "absl/strings/str_join.h" #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/match.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_listener.h b/src/core/xds/grpc/xds_listener.h index f6d49bf3f31d1..29b5192328360 100644 --- a/src/core/xds/grpc/xds_listener.h +++ b/src/core/xds/grpc/xds_listener.h @@ -30,8 +30,8 @@ #include "absl/types/optional.h" #include "absl/types/variant.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/grpc/xds_route_config.h" diff --git a/src/core/xds/grpc/xds_listener_parser.cc b/src/core/xds/grpc/xds_listener_parser.cc index e16efa43faea6..3449b5875da54 100644 --- a/src/core/xds/grpc/xds_listener_parser.cc +++ b/src/core/xds/grpc/xds_listener_parser.cc @@ -50,12 +50,11 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/sockaddr.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/host_port.h" +#include "src/core/util/match.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/grpc/xds_route_config_parser.h" diff --git a/src/core/xds/grpc/xds_metadata.h b/src/core/xds/grpc/xds_metadata.h index 4e784d90d25b0..948577121365e 100644 --- a/src/core/xds/grpc/xds_metadata.h +++ b/src/core/xds/grpc/xds_metadata.h @@ -25,10 +25,10 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/down_cast.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/validation_errors.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_metadata_parser.cc b/src/core/xds/grpc/xds_metadata_parser.cc index 90f11a79cae0f..cb355371c47e8 100644 --- a/src/core/xds/grpc/xds_metadata_parser.cc +++ b/src/core/xds/grpc/xds_metadata_parser.cc @@ -26,10 +26,10 @@ #include "upb/base/string_view.h" #include "upb/text/encode.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/env.h" #include "src/core/util/string.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_common_types_parser.h" diff --git a/src/core/xds/grpc/xds_metadata_parser.h b/src/core/xds/grpc/xds_metadata_parser.h index f3d0a522ab169..a3cca589308f2 100644 --- a/src/core/xds/grpc/xds_metadata_parser.h +++ b/src/core/xds/grpc/xds_metadata_parser.h @@ -19,7 +19,7 @@ #include "envoy/config/core/v3/base.upb.h" -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_metadata.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/grpc/xds_route_config.cc b/src/core/xds/grpc/xds_route_config.cc index 3c6bbe7f8a50c..82d670207ee8f 100644 --- a/src/core/xds/grpc/xds_route_config.cc +++ b/src/core/xds/grpc/xds_route_config.cc @@ -27,8 +27,8 @@ #include "absl/types/variant.h" #include "re2/re2.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/match.h" +#include "src/core/util/matchers.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_route_config.h b/src/core/xds/grpc/xds_route_config.h index c0d57b7851777..b6af799af1cda 100644 --- a/src/core/xds/grpc/xds_route_config.h +++ b/src/core/xds/grpc/xds_route_config.h @@ -30,8 +30,8 @@ #include "re2/re2.h" #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/matchers.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" diff --git a/src/core/xds/grpc/xds_route_config_parser.cc b/src/core/xds/grpc/xds_route_config_parser.cc index d23f162456a6e..55ffc7ced1aea 100644 --- a/src/core/xds/grpc/xds_route_config_parser.cc +++ b/src/core/xds/grpc/xds_route_config_parser.cc @@ -61,15 +61,15 @@ #include "src/core/lib/channel/status_util.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/match.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/matchers/matchers.h" #include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/match.h" +#include "src/core/util/matchers.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" #include "src/core/xds/grpc/xds_cluster_specifier_plugin.h" #include "src/core/xds/grpc/xds_common_types.h" diff --git a/src/core/xds/grpc/xds_route_config_parser.h b/src/core/xds/grpc/xds_route_config_parser.h index 2523f8caa7a71..644c55e719859 100644 --- a/src/core/xds/grpc/xds_route_config_parser.h +++ b/src/core/xds/grpc/xds_route_config_parser.h @@ -36,9 +36,8 @@ #include #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/time.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_cluster_specifier_plugin.h" #include "src/core/xds/grpc/xds_http_filter.h" diff --git a/src/core/xds/grpc/xds_routing.cc b/src/core/xds/grpc/xds_routing.cc index 2a3a29088d85b..2d8668326be4b 100644 --- a/src/core/xds/grpc/xds_routing.cc +++ b/src/core/xds/grpc/xds_routing.cc @@ -34,7 +34,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/matchers.h" #include "src/core/xds/grpc/xds_http_filter.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_server_grpc.h b/src/core/xds/grpc/xds_server_grpc.h index 261cbbb45e7bf..9efc7fe8bd7a8 100644 --- a/src/core/xds/grpc/xds_server_grpc.h +++ b/src/core/xds/grpc/xds_server_grpc.h @@ -20,12 +20,12 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/xds_client/xds_bootstrap.h" namespace grpc_core { diff --git a/src/core/xds/grpc/xds_transport_grpc.cc b/src/core/xds/grpc/xds_transport_grpc.cc index 6af60f0516d2d..5bc7526695975 100644 --- a/src/core/xds/grpc/xds_transport_grpc.cc +++ b/src/core/xds/grpc/xds_transport_grpc.cc @@ -41,11 +41,8 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" +#include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/default_event_engine.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" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -58,6 +55,10 @@ #include "src/core/lib/surface/init_internally.h" #include "src/core/lib/surface/lame_client.h" #include "src/core/lib/transport/connectivity_state.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/xds_client/xds_bootstrap.h" @@ -68,7 +69,7 @@ namespace grpc_core { // GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall::GrpcStreamingCall( - RefCountedPtr factory, Channel* channel, + WeakRefCountedPtr factory, Channel* channel, const char* method, std::unique_ptr event_handler) : factory_(std::move(factory)), event_handler_(std::move(event_handler)) { @@ -229,25 +230,24 @@ void GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall:: class GrpcXdsTransportFactory::GrpcXdsTransport::StateWatcher final : public AsyncConnectivityStateWatcherInterface { public: - explicit StateWatcher( - std::function on_connectivity_failure) - : on_connectivity_failure_(std::move(on_connectivity_failure)) {} + explicit StateWatcher(RefCountedPtr watcher) + : watcher_(std::move(watcher)) {} private: void OnConnectivityStateChange(grpc_connectivity_state new_state, const absl::Status& status) override { if (new_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { - on_connectivity_failure_(absl::Status( + watcher_->OnConnectivityFailure(absl::Status( status.code(), absl::StrCat("channel in TRANSIENT_FAILURE: ", status.message()))); } } - std::function on_connectivity_failure_; + RefCountedPtr watcher_; }; // -// GrpcXdsClient::GrpcXdsTransport +// GrpcXdsTransportFactory::GrpcXdsTransport // namespace { @@ -264,35 +264,74 @@ RefCountedPtr CreateXdsChannel(const ChannelArgs& args, } // namespace GrpcXdsTransportFactory::GrpcXdsTransport::GrpcXdsTransport( - GrpcXdsTransportFactory* factory, const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status) - : factory_(factory) { - channel_ = CreateXdsChannel(factory->args_, + WeakRefCountedPtr factory, + const XdsBootstrap::XdsServer& server, absl::Status* status) + : XdsTransport(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) + ? "GrpcXdsTransport" + : nullptr), + factory_(std::move(factory)), + key_(server.Key()) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[GrpcXdsTransport " << this << "] created"; + channel_ = CreateXdsChannel(factory_->args_, static_cast(server)); CHECK(channel_ != nullptr); if (channel_->IsLame()) { *status = absl::UnavailableError("xds client has a lame channel"); - } else { - watcher_ = new StateWatcher(std::move(on_connectivity_failure)); - channel_->AddConnectivityWatcher( - GRPC_CHANNEL_IDLE, - OrphanablePtr(watcher_)); } } -void GrpcXdsTransportFactory::GrpcXdsTransport::Orphan() { - if (!channel_->IsLame()) { - channel_->RemoveConnectivityWatcher(watcher_); +GrpcXdsTransportFactory::GrpcXdsTransport::~GrpcXdsTransport() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[GrpcXdsTransport " << this << "] destroying"; +} + +void GrpcXdsTransportFactory::GrpcXdsTransport::Orphaned() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[GrpcXdsTransport " << this << "] orphaned"; + { + MutexLock lock(&factory_->mu_); + auto it = factory_->transports_.find(key_); + if (it != factory_->transports_.end() && it->second == this) { + factory_->transports_.erase(it); + } } // Do an async hop before unreffing. This avoids a deadlock upon // shutdown in the case where the xDS channel is itself an xDS channel // (e.g., when using one control plane to find another control plane). - grpc_event_engine::experimental::GetDefaultEventEngine()->Run([this]() { - ApplicationCallbackExecCtx application_exec_ctx; - ExecCtx exec_ctx; - Unref(); - }); + grpc_event_engine::experimental::GetDefaultEventEngine()->Run( + [self = WeakRefAsSubclass()]() mutable { + ApplicationCallbackExecCtx application_exec_ctx; + ExecCtx exec_ctx; + self.reset(); + }); +} + +void GrpcXdsTransportFactory::GrpcXdsTransport::StartConnectivityFailureWatch( + RefCountedPtr watcher) { + if (channel_->IsLame()) return; + auto* state_watcher = new StateWatcher(watcher); + { + MutexLock lock(&mu_); + watchers_.emplace(watcher, state_watcher); + } + channel_->AddConnectivityWatcher( + GRPC_CHANNEL_IDLE, + OrphanablePtr(state_watcher)); +} + +void GrpcXdsTransportFactory::GrpcXdsTransport::StopConnectivityFailureWatch( + const RefCountedPtr& watcher) { + if (channel_->IsLame()) return; + StateWatcher* state_watcher = nullptr; + { + MutexLock lock(&mu_); + auto it = watchers_.find(watcher); + if (it == watchers_.end()) return; + state_watcher = it->second; + watchers_.erase(it); + } + channel_->RemoveConnectivityWatcher(state_watcher); } OrphanablePtr @@ -300,9 +339,8 @@ GrpcXdsTransportFactory::GrpcXdsTransport::CreateStreamingCall( const char* method, std::unique_ptr event_handler) { return MakeOrphanable( - factory_->RefAsSubclass(DEBUG_LOCATION, - "StreamingCall"), - channel_.get(), method, std::move(event_handler)); + factory_.WeakRef(DEBUG_LOCATION, "StreamingCall"), channel_.get(), method, + std::move(event_handler)); } void GrpcXdsTransportFactory::GrpcXdsTransport::ResetBackoff() { @@ -336,13 +374,22 @@ GrpcXdsTransportFactory::~GrpcXdsTransportFactory() { ShutdownInternally(); } -OrphanablePtr -GrpcXdsTransportFactory::Create( - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status) { - return MakeOrphanable( - this, server, std::move(on_connectivity_failure), status); +RefCountedPtr +GrpcXdsTransportFactory::GetTransport(const XdsBootstrap::XdsServer& server, + absl::Status* status) { + std::string key = server.Key(); + RefCountedPtr transport; + MutexLock lock(&mu_); + auto it = transports_.find(key); + if (it != transports_.end()) { + transport = it->second->RefIfNonZero().TakeAsSubclass(); + } + if (transport == nullptr) { + transport = MakeRefCounted( + WeakRefAsSubclass(), server, status); + transports_.emplace(std::move(key), transport.get()); + } + return transport; } } // namespace grpc_core diff --git a/src/core/xds/grpc/xds_transport_grpc.h b/src/core/xds/grpc/xds_transport_grpc.h index fc951f07594a6..7615d19f6c8ac 100644 --- a/src/core/xds/grpc/xds_transport_grpc.h +++ b/src/core/xds/grpc/xds_transport_grpc.h @@ -21,6 +21,7 @@ #include #include +#include "absl/container/flat_hash_map.h" #include "absl/status/status.h" #include @@ -29,12 +30,13 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/surface/channel.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_transport.h" @@ -47,18 +49,20 @@ class GrpcXdsTransportFactory final : public XdsTransportFactory { explicit GrpcXdsTransportFactory(const ChannelArgs& args); ~GrpcXdsTransportFactory() override; - void Orphan() override { Unref(); } + void Orphaned() override {} - OrphanablePtr Create( - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status) override; + RefCountedPtr GetTransport( + const XdsBootstrap::XdsServer& server, absl::Status* status) override; grpc_pollset_set* interested_parties() const { return interested_parties_; } private: ChannelArgs args_; grpc_pollset_set* interested_parties_; + + Mutex mu_; + absl::flat_hash_map + transports_ ABSL_GUARDED_BY(&mu_); }; class GrpcXdsTransportFactory::GrpcXdsTransport final @@ -66,12 +70,16 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final public: class GrpcStreamingCall; - GrpcXdsTransport(GrpcXdsTransportFactory* factory, - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status); + GrpcXdsTransport(WeakRefCountedPtr factory, + const XdsBootstrap::XdsServer& server, absl::Status* status); + ~GrpcXdsTransport() override; - void Orphan() override; + void Orphaned() override; + + void StartConnectivityFailureWatch( + RefCountedPtr watcher) override; + void StopConnectivityFailureWatch( + const RefCountedPtr& watcher) override; OrphanablePtr CreateStreamingCall( const char* method, @@ -82,15 +90,19 @@ class GrpcXdsTransportFactory::GrpcXdsTransport final private: class StateWatcher; - GrpcXdsTransportFactory* factory_; // Not owned. + WeakRefCountedPtr factory_; + std::string key_; RefCountedPtr channel_; - StateWatcher* watcher_; + + Mutex mu_; + absl::flat_hash_map, StateWatcher*> + watchers_ ABSL_GUARDED_BY(&mu_); }; class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final : public XdsTransportFactory::XdsTransport::StreamingCall { public: - GrpcStreamingCall(RefCountedPtr factory, + GrpcStreamingCall(WeakRefCountedPtr factory, Channel* channel, const char* method, std::unique_ptr event_handler); ~GrpcStreamingCall() override; @@ -107,7 +119,7 @@ class GrpcXdsTransportFactory::GrpcXdsTransport::GrpcStreamingCall final static void OnResponseReceived(void* arg, grpc_error_handle /*error*/); static void OnStatusReceived(void* arg, grpc_error_handle /*error*/); - RefCountedPtr factory_; + WeakRefCountedPtr factory_; std::unique_ptr event_handler_; diff --git a/src/core/xds/xds_client/lrs_client.cc b/src/core/xds/xds_client/lrs_client.cc new file mode 100644 index 0000000000000..b1767a0e03755 --- /dev/null +++ b/src/core/xds/xds_client/lrs_client.cc @@ -0,0 +1,1206 @@ +// +// Copyright 2018 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include "src/core/xds/xds_client/lrs_client.h" + +#include +#include +#include +#include + +#include "absl/cleanup/cleanup.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/strings/string_view.h" +#include "absl/types/optional.h" +#include "envoy/config/core/v3/base.upb.h" +#include "envoy/config/endpoint/v3/load_report.upb.h" +#include "envoy/service/load_stats/v3/lrs.upb.h" +#include "envoy/service/load_stats/v3/lrs.upbdefs.h" +#include "google/protobuf/duration.upb.h" +#include "upb/base/string_view.h" +#include "upb/mem/arena.h" +#include "upb/reflection/def.h" +#include "upb/text/encode.h" + +#include + +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/upb_utils.h" +#include "src/core/util/uri.h" +#include "src/core/xds/xds_client/xds_api.h" +#include "src/core/xds/xds_client/xds_bootstrap.h" +#include "src/core/xds/xds_client/xds_locality.h" + +#define GRPC_XDS_INITIAL_CONNECT_BACKOFF_SECONDS 1 +#define GRPC_XDS_RECONNECT_BACKOFF_MULTIPLIER 1.6 +#define GRPC_XDS_RECONNECT_MAX_BACKOFF_SECONDS 120 +#define GRPC_XDS_RECONNECT_JITTER 0.2 +#define GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS 1000 + +namespace grpc_core { + +using ::grpc_event_engine::experimental::EventEngine; + +namespace { + +uint64_t GetAndResetCounter(std::atomic* from) { + return from->exchange(0, std::memory_order_relaxed); +} + +} // namespace + +// +// LrsClient::ClusterDropStats +// + +LrsClient::ClusterDropStats::ClusterDropStats( + RefCountedPtr lrs_client, absl::string_view lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name) + : RefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) + ? "ClusterDropStats" + : nullptr), + lrs_client_(std::move(lrs_client)), + lrs_server_(lrs_server), + cluster_name_(cluster_name), + eds_service_name_(eds_service_name) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client_.get() << "] created drop stats " << this + << " for {" << lrs_server_ << ", " << cluster_name_ << ", " + << eds_service_name_ << "}"; +} + +LrsClient::ClusterDropStats::~ClusterDropStats() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client_.get() << "] destroying drop stats " + << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " + << eds_service_name_ << "}"; + lrs_client_->RemoveClusterDropStats(lrs_server_, cluster_name_, + eds_service_name_, this); + lrs_client_.reset(DEBUG_LOCATION, "ClusterDropStats"); +} + +LrsClient::ClusterDropStats::Snapshot +LrsClient::ClusterDropStats::GetSnapshotAndReset() { + Snapshot snapshot; + snapshot.uncategorized_drops = GetAndResetCounter(&uncategorized_drops_); + MutexLock lock(&mu_); + snapshot.categorized_drops = std::move(categorized_drops_); + return snapshot; +} + +void LrsClient::ClusterDropStats::AddUncategorizedDrops() { + uncategorized_drops_.fetch_add(1); +} + +void LrsClient::ClusterDropStats::AddCallDropped(const std::string& category) { + MutexLock lock(&mu_); + ++categorized_drops_[category]; +} + +// +// LrsClient::ClusterLocalityStats +// + +LrsClient::ClusterLocalityStats::ClusterLocalityStats( + RefCountedPtr lrs_client, absl::string_view lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name, + RefCountedPtr name) + : RefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) + ? "ClusterLocalityStats" + : nullptr), + lrs_client_(std::move(lrs_client)), + lrs_server_(lrs_server), + cluster_name_(cluster_name), + eds_service_name_(eds_service_name), + name_(std::move(name)) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client_.get() << "] created locality stats " + << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " + << eds_service_name_ << ", " + << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) + << "}"; +} + +LrsClient::ClusterLocalityStats::~ClusterLocalityStats() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client_.get() << "] destroying locality stats " + << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " + << eds_service_name_ << ", " + << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) + << "}"; + lrs_client_->RemoveClusterLocalityStats(lrs_server_, cluster_name_, + eds_service_name_, name_, this); + lrs_client_.reset(DEBUG_LOCATION, "ClusterLocalityStats"); +} + +LrsClient::ClusterLocalityStats::Snapshot +LrsClient::ClusterLocalityStats::GetSnapshotAndReset() { + Snapshot snapshot; + for (auto& percpu_stats : stats_) { + Snapshot percpu_snapshot = { + GetAndResetCounter(&percpu_stats.total_successful_requests), + // Don't reset total_requests_in_progress because it's + // not related to a single reporting interval. + percpu_stats.total_requests_in_progress.load(std::memory_order_relaxed), + GetAndResetCounter(&percpu_stats.total_error_requests), + GetAndResetCounter(&percpu_stats.total_issued_requests), + {}}; + { + MutexLock lock(&percpu_stats.backend_metrics_mu); + percpu_snapshot.backend_metrics = std::move(percpu_stats.backend_metrics); + } + snapshot += percpu_snapshot; + } + return snapshot; +} + +void LrsClient::ClusterLocalityStats::AddCallStarted() { + Stats& stats = stats_.this_cpu(); + stats.total_issued_requests.fetch_add(1, std::memory_order_relaxed); + stats.total_requests_in_progress.fetch_add(1, std::memory_order_relaxed); +} + +void LrsClient::ClusterLocalityStats::AddCallFinished( + const std::map* named_metrics, bool fail) { + Stats& stats = stats_.this_cpu(); + std::atomic& to_increment = + fail ? stats.total_error_requests : stats.total_successful_requests; + to_increment.fetch_add(1, std::memory_order_relaxed); + stats.total_requests_in_progress.fetch_add(-1, std::memory_order_acq_rel); + if (named_metrics == nullptr) return; + MutexLock lock(&stats.backend_metrics_mu); + for (const auto& m : *named_metrics) { + stats.backend_metrics[std::string(m.first)] += BackendMetric{1, m.second}; + } +} + +// +// Internal class declarations +// + +// A call wrapper that can restart a call upon failure. +// The template parameter is the kind of wrapped call. +// TODO(roth): This is basically the same code as in XdsClient, and +// probably very similar to many other places in the codebase. +// Consider refactoring this into a common utility library somehow. +template +class LrsClient::LrsChannel::RetryableCall final + : public InternallyRefCounted> { + public: + explicit RetryableCall(WeakRefCountedPtr lrs_channel); + + // Disable thread-safety analysis because this method is called via + // OrphanablePtr<>, but there's no way to pass the lock annotation + // through there. + void Orphan() override ABSL_NO_THREAD_SAFETY_ANALYSIS; + + void OnCallFinishedLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + T* call() const { return call_.get(); } + LrsChannel* lrs_channel() const { return lrs_channel_.get(); } + + bool IsCurrentCallOnChannel() const; + + private: + void StartNewCallLocked(); + void StartRetryTimerLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + void OnRetryTimer(); + + // The wrapped xds call that talks to the xds server. It's instantiated + // every time we start a new call. It's null during call retry backoff. + OrphanablePtr call_; + // The owning xds channel. + WeakRefCountedPtr lrs_channel_; + + // Retry state. + BackOff backoff_; + absl::optional timer_handle_ + ABSL_GUARDED_BY(&LrsClient::mu_); + + bool shutting_down_ = false; +}; + +// An LRS call to the LRS server. +class LrsClient::LrsChannel::LrsCall final + : public InternallyRefCounted { + public: + // The ctor and dtor should not be used directly. + explicit LrsCall(RefCountedPtr> retryable_call); + + void Orphan() override; + + RetryableCall* retryable_call() { return retryable_call_.get(); } + LrsChannel* lrs_channel() const { return retryable_call_->lrs_channel(); } + LrsClient* lrs_client() const { return lrs_channel()->lrs_client(); } + bool seen_response() const { return seen_response_; } + + private: + class StreamEventHandler final + : public XdsTransportFactory::XdsTransport::StreamingCall::EventHandler { + public: + explicit StreamEventHandler(RefCountedPtr lrs_call) + : lrs_call_(std::move(lrs_call)) {} + + void OnRequestSent(bool /*ok*/) override { lrs_call_->OnRequestSent(); } + void OnRecvMessage(absl::string_view payload) override { + lrs_call_->OnRecvMessage(payload); + } + void OnStatusReceived(absl::Status status) override { + lrs_call_->OnStatusReceived(std::move(status)); + } + + private: + RefCountedPtr lrs_call_; + }; + + // A repeating timer for a particular duration. + class Timer final : public InternallyRefCounted { + public: + explicit Timer(RefCountedPtr lrs_call) + : lrs_call_(std::move(lrs_call)) {} + ~Timer() override { lrs_call_.reset(DEBUG_LOCATION, "LRS timer"); } + + // Disable thread-safety analysis because this method is called via + // OrphanablePtr<>, but there's no way to pass the lock annotation + // through there. + void Orphan() override ABSL_NO_THREAD_SAFETY_ANALYSIS; + + void ScheduleNextReportLocked() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + private: + bool IsCurrentTimerOnCall() const { + return this == lrs_call_->timer_.get(); + } + LrsClient* lrs_client() const { return lrs_call_->lrs_client(); } + + void OnNextReportTimer(); + + // The owning LRS call. + RefCountedPtr lrs_call_; + + absl::optional timer_handle_ + ABSL_GUARDED_BY(&LrsClient::mu_); + }; + + void MaybeScheduleNextReportLocked() + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + void SendReportLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + void SendMessageLocked(std::string payload) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + void OnRequestSent(); + void OnRecvMessage(absl::string_view payload); + void OnStatusReceived(absl::Status status); + + bool IsCurrentCallOnChannel() const; + + // The owning RetryableCall<>. + RefCountedPtr> retryable_call_; + + OrphanablePtr + streaming_call_; + + bool seen_response_ = false; + bool send_message_pending_ ABSL_GUARDED_BY(&LrsClient::mu_) = false; + + // Load reporting state. + bool send_all_clusters_ = false; + std::set cluster_names_; // Asked for by the LRS server. + Duration load_reporting_interval_; + bool last_report_counters_were_zero_ = false; + OrphanablePtr timer_; +}; + +// +// LrsClient::LrsChannel +// + +LrsClient::LrsChannel::LrsChannel( + WeakRefCountedPtr lrs_client, + std::shared_ptr server) + : DualRefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) + ? "LrsChannel" + : nullptr), + lrs_client_(std::move(lrs_client)), + server_(std::move(server)) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client_.get() << "] creating channel " << this + << " for server " << server_->server_uri(); + absl::Status status; + transport_ = lrs_client_->transport_factory_->GetTransport(*server_, &status); + CHECK(transport_ != nullptr); + if (!status.ok()) { + LOG(ERROR) << "Error creating LRS channel to " << server_->server_uri() + << ": " << status; + } +} + +LrsClient::LrsChannel::~LrsChannel() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] destroying lrs channel " << this + << " for server " << server_->server_uri(); + lrs_client_.reset(DEBUG_LOCATION, "LrsChannel"); +} + +// This method should only ever be called when holding the lock, but we can't +// use a ABSL_EXCLUSIVE_LOCKS_REQUIRED annotation, because Orphan() will be +// called from DualRefCounted::Unref(), which cannot have a lock annotation for +// a lock in this subclass. +void LrsClient::LrsChannel::Orphaned() ABSL_NO_THREAD_SAFETY_ANALYSIS { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] orphaning lrs channel " << this + << " for server " << server_->server_uri(); + transport_.reset(); + // At this time, all strong refs are removed, remove from channel map to + // prevent subsequent subscription from trying to use this LrsChannel as + // it is shutting down. + lrs_client_->lrs_channel_map_.erase(server_->Key()); + lrs_call_.reset(); +} + +void LrsClient::LrsChannel::ResetBackoff() { transport_->ResetBackoff(); } + +void LrsClient::LrsChannel::MaybeStartLrsCall() { + if (lrs_call_ != nullptr) return; + lrs_call_ = MakeOrphanable>( + WeakRef(DEBUG_LOCATION, "LrsCall")); +} + +void LrsClient::LrsChannel::StopLrsCallLocked() { + lrs_client_->load_report_map_.erase(server_->Key()); + lrs_call_.reset(); +} + +// +// LrsClient::LrsChannel::RetryableCall<> +// + +template +LrsClient::LrsChannel::RetryableCall::RetryableCall( + WeakRefCountedPtr lrs_channel) + : lrs_channel_(std::move(lrs_channel)), + backoff_(BackOff::Options() + .set_initial_backoff(Duration::Seconds( + GRPC_XDS_INITIAL_CONNECT_BACKOFF_SECONDS)) + .set_multiplier(GRPC_XDS_RECONNECT_BACKOFF_MULTIPLIER) + .set_jitter(GRPC_XDS_RECONNECT_JITTER) + .set_max_backoff(Duration::Seconds( + GRPC_XDS_RECONNECT_MAX_BACKOFF_SECONDS))) { + StartNewCallLocked(); +} + +template +void LrsClient::LrsChannel::RetryableCall::Orphan() { + shutting_down_ = true; + call_.reset(); + if (timer_handle_.has_value()) { + lrs_channel()->lrs_client()->engine()->Cancel(*timer_handle_); + timer_handle_.reset(); + } + this->Unref(DEBUG_LOCATION, "RetryableCall+orphaned"); +} + +template +void LrsClient::LrsChannel::RetryableCall::OnCallFinishedLocked() { + // If we saw a response on the current stream, reset backoff. + if (call_->seen_response()) backoff_.Reset(); + call_.reset(); + // Start retry timer. + StartRetryTimerLocked(); +} + +template +void LrsClient::LrsChannel::RetryableCall::StartNewCallLocked() { + if (shutting_down_) return; + CHECK(lrs_channel_->transport_ != nullptr); + CHECK(call_ == nullptr); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_channel()->lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": start new call from retryable call " << this; + call_ = MakeOrphanable( + this->Ref(DEBUG_LOCATION, "RetryableCall+start_new_call")); +} + +template +void LrsClient::LrsChannel::RetryableCall::StartRetryTimerLocked() { + if (shutting_down_) return; + const Duration delay = backoff_.NextAttemptDelay(); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_channel()->lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": call attempt failed; retry timer will fire in " << delay.millis() + << "ms."; + timer_handle_ = lrs_channel()->lrs_client()->engine()->RunAfter( + delay, + [self = this->Ref(DEBUG_LOCATION, "RetryableCall+retry_timer_start")]() { + ApplicationCallbackExecCtx callback_exec_ctx; + ExecCtx exec_ctx; + self->OnRetryTimer(); + }); +} + +template +void LrsClient::LrsChannel::RetryableCall::OnRetryTimer() { + MutexLock lock(&lrs_channel_->lrs_client()->mu_); + if (timer_handle_.has_value()) { + timer_handle_.reset(); + if (shutting_down_) return; + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_channel()->lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": retry timer fired (retryable call: " << this << ")"; + StartNewCallLocked(); + } +} + +// +// LrsClient::LrsChannel::LrsCall::Timer +// + +void LrsClient::LrsChannel::LrsCall::Timer::Orphan() { + if (timer_handle_.has_value()) { + lrs_client()->engine()->Cancel(*timer_handle_); + timer_handle_.reset(); + } + Unref(DEBUG_LOCATION, "Orphan"); +} + +void LrsClient::LrsChannel::LrsCall::Timer::ScheduleNextReportLocked() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_call_->lrs_channel()->server_->server_uri() + << ": scheduling next load report in " + << lrs_call_->load_reporting_interval_; + timer_handle_ = lrs_client()->engine()->RunAfter( + lrs_call_->load_reporting_interval_, + [self = Ref(DEBUG_LOCATION, "timer")]() { + ApplicationCallbackExecCtx callback_exec_ctx; + ExecCtx exec_ctx; + self->OnNextReportTimer(); + }); +} + +void LrsClient::LrsChannel::LrsCall::Timer::OnNextReportTimer() { + MutexLock lock(&lrs_client()->mu_); + timer_handle_.reset(); + if (IsCurrentTimerOnCall()) lrs_call_->SendReportLocked(); +} + +// +// LrsClient::LrsChannel::LrsCall +// + +LrsClient::LrsChannel::LrsCall::LrsCall( + RefCountedPtr> retryable_call) + : InternallyRefCounted( + GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) ? "LrsCall" : nullptr), + retryable_call_(std::move(retryable_call)) { + // Init the LRS call. Note that the call will progress every time there's + // activity in lrs_client()->interested_parties_, which is comprised of + // the polling entities from client_channel. + CHECK_NE(lrs_client(), nullptr); + const char* method = + "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats"; + streaming_call_ = lrs_channel()->transport_->CreateStreamingCall( + method, std::make_unique( + // Passing the initial ref here. This ref will go away when + // the StreamEventHandler is destroyed. + RefCountedPtr(this))); + CHECK(streaming_call_ != nullptr); + // Start the call. + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": starting LRS call (lrs_call=" << this + << ", streaming_call=" << streaming_call_.get() << ")"; + // Send the initial request. + std::string serialized_payload = lrs_client()->CreateLrsInitialRequest(); + SendMessageLocked(std::move(serialized_payload)); + // Read initial response. + streaming_call_->StartRecvMessage(); +} + +void LrsClient::LrsChannel::LrsCall::Orphan() { + timer_.reset(); + // Note that the initial ref is held by the StreamEventHandler, which + // will be destroyed when streaming_call_ is destroyed, which may not happen + // here, since there may be other refs held to streaming_call_ by internal + // callbacks. + streaming_call_.reset(); +} + +void LrsClient::LrsChannel::LrsCall::MaybeScheduleNextReportLocked() { + // If there are no more registered stats to report, cancel the call. + auto it = lrs_client()->load_report_map_.find(lrs_channel()->server_->Key()); + if (it == lrs_client()->load_report_map_.end() || + it->second.load_report_map.empty()) { + it->second.lrs_channel->StopLrsCallLocked(); + return; + } + // Don't start if the previous send_message op hasn't completed yet. + // If this happens, we'll be called again from OnRequestSent(). + if (send_message_pending_) return; + // Don't start if no LRS response has arrived. + if (!seen_response()) return; + // If there is no timer, create one. + // This happens on the initial response and whenever the interval changes. + if (timer_ == nullptr) { + timer_ = MakeOrphanable(Ref(DEBUG_LOCATION, "LRS timer")); + } + // Schedule the next load report. + timer_->ScheduleNextReportLocked(); +} + +bool LrsClient::LoadReportCountersAreZero( + const ClusterLoadReportMap& snapshot) { + for (const auto& p : snapshot) { + const ClusterLoadReport& cluster_snapshot = p.second; + if (!cluster_snapshot.dropped_requests.IsZero()) return false; + for (const auto& q : cluster_snapshot.locality_stats) { + const ClusterLocalityStats::Snapshot& locality_snapshot = q.second; + if (!locality_snapshot.IsZero()) return false; + } + } + return true; +} + +void LrsClient::LrsChannel::LrsCall::SendReportLocked() { + // Construct snapshot from all reported stats. + ClusterLoadReportMap snapshot = lrs_client()->BuildLoadReportSnapshotLocked( + *lrs_channel()->server_, send_all_clusters_, cluster_names_); + // Skip client load report if the counters were all zero in the last + // report and they are still zero in this one. + const bool old_val = last_report_counters_were_zero_; + last_report_counters_were_zero_ = LoadReportCountersAreZero(snapshot); + if (old_val && last_report_counters_were_zero_) { + MaybeScheduleNextReportLocked(); + return; + } + // Send a request that contains the snapshot. + std::string serialized_payload = + lrs_client()->CreateLrsRequest(std::move(snapshot)); + SendMessageLocked(std::move(serialized_payload)); +} + +void LrsClient::LrsChannel::LrsCall::SendMessageLocked(std::string payload) { + send_message_pending_ = true; + streaming_call_->SendMessage(std::move(payload)); +} + +void LrsClient::LrsChannel::LrsCall::OnRequestSent() { + MutexLock lock(&lrs_client()->mu_); + send_message_pending_ = false; + if (IsCurrentCallOnChannel()) MaybeScheduleNextReportLocked(); +} + +void LrsClient::LrsChannel::LrsCall::OnRecvMessage(absl::string_view payload) { + MutexLock lock(&lrs_client()->mu_); + // If we're no longer the current call, ignore the result. + if (!IsCurrentCallOnChannel()) return; + // Start recv after any code branch + auto cleanup = absl::MakeCleanup( + [call = streaming_call_.get()]() { call->StartRecvMessage(); }); + // Parse the response. + bool send_all_clusters = false; + std::set new_cluster_names; + Duration new_load_reporting_interval; + absl::Status status = lrs_client()->ParseLrsResponse( + payload, &send_all_clusters, &new_cluster_names, + &new_load_reporting_interval); + if (!status.ok()) { + LOG(ERROR) << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": LRS response parsing failed: " << status; + return; + } + seen_response_ = true; + if (GRPC_TRACE_FLAG_ENABLED(xds_client)) { + LOG(INFO) << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": LRS response received, " << new_cluster_names.size() + << " cluster names, send_all_clusters=" << send_all_clusters + << ", load_report_interval=" + << new_load_reporting_interval.millis() << "ms"; + size_t i = 0; + for (const auto& name : new_cluster_names) { + LOG(INFO) << "[lrs_client " << lrs_client() << "] cluster_name " << i++ + << ": " << name; + } + } + if (new_load_reporting_interval < + Duration::Milliseconds(GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS)) { + new_load_reporting_interval = + Duration::Milliseconds(GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": increased load_report_interval to minimum value " + << GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS << "ms"; + } + // Ignore identical update. + if (send_all_clusters == send_all_clusters_ && + cluster_names_ == new_cluster_names && + load_reporting_interval_ == new_load_reporting_interval) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": incoming LRS response identical to current, ignoring."; + return; + } + // If the interval has changed, we'll need to restart the timer below. + const bool restart_timer = + load_reporting_interval_ != new_load_reporting_interval; + // Record the new config. + send_all_clusters_ = send_all_clusters; + cluster_names_ = std::move(new_cluster_names); + load_reporting_interval_ = new_load_reporting_interval; + // Restart timer if needed. + if (restart_timer) { + timer_.reset(); + MaybeScheduleNextReportLocked(); + } +} + +void LrsClient::LrsChannel::LrsCall::OnStatusReceived(absl::Status status) { + MutexLock lock(&lrs_client()->mu_); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << lrs_client() << "] lrs server " + << lrs_channel()->server_->server_uri() + << ": LRS call status received (lrs_channel=" << lrs_channel() + << ", lrs_call=" << this << ", streaming_call=" << streaming_call_.get() + << "): " << status; + // Ignore status from a stale call. + if (IsCurrentCallOnChannel()) { + // Try to restart the call. + retryable_call_->OnCallFinishedLocked(); + } +} + +bool LrsClient::LrsChannel::LrsCall::IsCurrentCallOnChannel() const { + // If the retryable LRS call is null (which only happens when the lrs + // channel is shutting down), all the LRS calls are stale. + if (lrs_channel()->lrs_call_ == nullptr) return false; + return this == lrs_channel()->lrs_call_->call(); +} + +// +// LrsClient +// + +LrsClient::LrsClient( + std::shared_ptr bootstrap, std::string user_agent_name, + std::string user_agent_version, + RefCountedPtr transport_factory, + std::shared_ptr engine) + : DualRefCounted( + GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) ? "LrsClient" : nullptr), + bootstrap_(std::move(bootstrap)), + user_agent_name_(std::move(user_agent_name)), + user_agent_version_(std::move(user_agent_version)), + transport_factory_(std::move(transport_factory)), + engine_(std::move(engine)) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this << "] creating lrs client"; +} + +LrsClient::~LrsClient() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this << "] destroying lrs client"; +} + +void LrsClient::Orphaned() { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this << "] shutting down lrs client"; + MutexLock lock(&mu_); + // We may still be sending lingering queued load report data, so don't + // just clear the load reporting map, but we do want to clear the refs + // we're holding to the LrsChannel objects, to make sure that + // everything shuts down properly. + for (auto& p : load_report_map_) { + p.second.lrs_channel.reset(DEBUG_LOCATION, "LrsClient::Orphan()"); + } +} + +RefCountedPtr LrsClient::GetOrCreateLrsChannelLocked( + std::shared_ptr server, const char* reason) { + std::string key = server->Key(); + auto it = lrs_channel_map_.find(key); + if (it != lrs_channel_map_.end()) { + return it->second->Ref(DEBUG_LOCATION, reason); + } + // Channel not found, so create a new one. + auto lrs_channel = MakeRefCounted( + WeakRef(DEBUG_LOCATION, "LrsChannel"), std::move(server)); + lrs_channel_map_[std::move(key)] = lrs_channel.get(); + return lrs_channel; +} + +RefCountedPtr LrsClient::AddClusterDropStats( + std::shared_ptr lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name) { + auto key = + std::make_pair(std::string(cluster_name), std::string(eds_service_name)); + RefCountedPtr cluster_drop_stats; + { + MutexLock lock(&mu_); + // We jump through some hoops here to make sure that the + // absl::string_views stored in the ClusterDropStats object point + // to the strings in the load_report_map_ keys, so that + // they have the same lifetime. + auto server_it = + load_report_map_.emplace(lrs_server->Key(), LoadReportServer()).first; + if (server_it->second.lrs_channel == nullptr) { + server_it->second.lrs_channel = GetOrCreateLrsChannelLocked( + lrs_server, "load report map (drop stats)"); + } + auto load_report_it = server_it->second.load_report_map + .emplace(std::move(key), LoadReportState()) + .first; + LoadReportState& load_report_state = load_report_it->second; + if (load_report_state.drop_stats != nullptr) { + cluster_drop_stats = load_report_state.drop_stats->RefIfNonZero(); + } + if (cluster_drop_stats == nullptr) { + if (load_report_state.drop_stats != nullptr) { + load_report_state.deleted_drop_stats += + load_report_state.drop_stats->GetSnapshotAndReset(); + } + cluster_drop_stats = MakeRefCounted( + Ref(DEBUG_LOCATION, "DropStats"), server_it->first /*lrs_server*/, + load_report_it->first.first /*cluster_name*/, + load_report_it->first.second /*eds_service_name*/); + load_report_state.drop_stats = cluster_drop_stats.get(); + } + server_it->second.lrs_channel->MaybeStartLrsCall(); + } + return cluster_drop_stats; +} + +void LrsClient::RemoveClusterDropStats( + absl::string_view lrs_server_key, absl::string_view cluster_name, + absl::string_view eds_service_name, + LrsClient::ClusterDropStats* cluster_drop_stats) { + MutexLock lock(&mu_); + auto server_it = load_report_map_.find(lrs_server_key); + if (server_it == load_report_map_.end()) return; + auto load_report_it = server_it->second.load_report_map.find( + std::make_pair(std::string(cluster_name), std::string(eds_service_name))); + if (load_report_it == server_it->second.load_report_map.end()) return; + LoadReportState& load_report_state = load_report_it->second; + if (load_report_state.drop_stats == cluster_drop_stats) { + // Record final snapshot in deleted_drop_stats, which will be + // added to the next load report. + load_report_state.deleted_drop_stats += + load_report_state.drop_stats->GetSnapshotAndReset(); + load_report_state.drop_stats = nullptr; + } +} + +RefCountedPtr +LrsClient::AddClusterLocalityStats( + std::shared_ptr lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name, + RefCountedPtr locality) { + auto key = + std::make_pair(std::string(cluster_name), std::string(eds_service_name)); + RefCountedPtr cluster_locality_stats; + { + MutexLock lock(&mu_); + // We jump through some hoops here to make sure that the + // absl::string_views stored in the ClusterLocalityStats object point + // to the strings in the load_report_map_ keys, so that + // they have the same lifetime. + auto server_it = + load_report_map_.emplace(lrs_server->Key(), LoadReportServer()).first; + if (server_it->second.lrs_channel == nullptr) { + server_it->second.lrs_channel = GetOrCreateLrsChannelLocked( + std::move(lrs_server), "load report map (locality stats)"); + } + auto load_report_it = server_it->second.load_report_map + .emplace(std::move(key), LoadReportState()) + .first; + LoadReportState& load_report_state = load_report_it->second; + LoadReportState::LocalityState& locality_state = + load_report_state.locality_stats[locality]; + if (locality_state.locality_stats != nullptr) { + cluster_locality_stats = locality_state.locality_stats->RefIfNonZero(); + } + if (cluster_locality_stats == nullptr) { + if (locality_state.locality_stats != nullptr) { + locality_state.deleted_locality_stats += + locality_state.locality_stats->GetSnapshotAndReset(); + } + cluster_locality_stats = MakeRefCounted( + Ref(DEBUG_LOCATION, "LocalityStats"), server_it->first /*lrs_server*/, + load_report_it->first.first /*cluster_name*/, + load_report_it->first.second /*eds_service_name*/, + std::move(locality)); + locality_state.locality_stats = cluster_locality_stats.get(); + } + server_it->second.lrs_channel->MaybeStartLrsCall(); + } + return cluster_locality_stats; +} + +void LrsClient::RemoveClusterLocalityStats( + absl::string_view lrs_server_key, absl::string_view cluster_name, + absl::string_view eds_service_name, + const RefCountedPtr& locality, + ClusterLocalityStats* cluster_locality_stats) { + MutexLock lock(&mu_); + auto server_it = load_report_map_.find(lrs_server_key); + if (server_it == load_report_map_.end()) return; + auto load_report_it = server_it->second.load_report_map.find( + std::make_pair(std::string(cluster_name), std::string(eds_service_name))); + if (load_report_it == server_it->second.load_report_map.end()) return; + LoadReportState& load_report_state = load_report_it->second; + auto locality_it = load_report_state.locality_stats.find(locality); + if (locality_it == load_report_state.locality_stats.end()) return; + LoadReportState::LocalityState& locality_state = locality_it->second; + if (locality_state.locality_stats == cluster_locality_stats) { + // Record final snapshot in deleted_locality_stats, which will be + // added to the next load report. + locality_state.deleted_locality_stats += + locality_state.locality_stats->GetSnapshotAndReset(); + locality_state.locality_stats = nullptr; + } +} + +void LrsClient::ResetBackoff() { + MutexLock lock(&mu_); + for (auto& p : lrs_channel_map_) { + p.second->ResetBackoff(); + } +} + +LrsClient::ClusterLoadReportMap LrsClient::BuildLoadReportSnapshotLocked( + const XdsBootstrap::XdsServer& lrs_server, bool send_all_clusters, + const std::set& clusters) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this << "] start building load report"; + ClusterLoadReportMap snapshot_map; + auto server_it = load_report_map_.find(lrs_server.Key()); + if (server_it == load_report_map_.end()) return snapshot_map; + auto& load_report_map = server_it->second.load_report_map; + for (auto load_report_it = load_report_map.begin(); + load_report_it != load_report_map.end();) { + // Cluster key is cluster and EDS service name. + const auto& cluster_key = load_report_it->first; + LoadReportState& load_report = load_report_it->second; + // If the CDS response for a cluster indicates to use LRS but the + // LRS server does not say that it wants reports for this cluster, + // then we'll have stats objects here whose data we're not going to + // include in the load report. However, we still need to clear out + // the data from the stats objects, so that if the LRS server starts + // asking for the data in the future, we don't incorrectly include + // data from previous reporting intervals in that future report. + const bool record_stats = + send_all_clusters || clusters.find(cluster_key.first) != clusters.end(); + ClusterLoadReport snapshot; + // Aggregate drop stats. + snapshot.dropped_requests = std::move(load_report.deleted_drop_stats); + if (load_report.drop_stats != nullptr) { + snapshot.dropped_requests += + load_report.drop_stats->GetSnapshotAndReset(); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this << "] cluster=" << cluster_key.first + << " eds_service_name=" << cluster_key.second + << " drop_stats=" << load_report.drop_stats; + } + // Aggregate locality stats. + for (auto it = load_report.locality_stats.begin(); + it != load_report.locality_stats.end();) { + const RefCountedPtr& locality_name = it->first; + auto& locality_state = it->second; + ClusterLocalityStats::Snapshot& locality_snapshot = + snapshot.locality_stats[locality_name]; + locality_snapshot = std::move(locality_state.deleted_locality_stats); + if (locality_state.locality_stats != nullptr) { + locality_snapshot += + locality_state.locality_stats->GetSnapshotAndReset(); + GRPC_TRACE_LOG(xds_client, INFO) + << "[lrs_client " << this + << "] cluster=" << cluster_key.first.c_str() + << " eds_service_name=" << cluster_key.second.c_str() + << " locality=" << locality_name->human_readable_string().c_str() + << " locality_stats=" << locality_state.locality_stats; + } + // If the only thing left in this entry was final snapshots from + // deleted locality stats objects, remove the entry. + if (locality_state.locality_stats == nullptr) { + it = load_report.locality_stats.erase(it); + } else { + ++it; + } + } + // Compute load report interval. + const Timestamp now = Timestamp::Now(); + snapshot.load_report_interval = now - load_report.last_report_time; + load_report.last_report_time = now; + // Record snapshot. + if (record_stats) { + snapshot_map[cluster_key] = std::move(snapshot); + } + // If the only thing left in this entry was final snapshots from + // deleted stats objects, remove the entry. + if (load_report.locality_stats.empty() && + load_report.drop_stats == nullptr) { + load_report_it = load_report_map.erase(load_report_it); + } else { + ++load_report_it; + } + } + return snapshot_map; +} + +namespace { + +struct LrsApiContext { + LrsClient* client; + upb_DefPool* def_pool; + upb_Arena* arena; +}; + +void MaybeLogLrsRequest( + const LrsApiContext& context, + const envoy_service_load_stats_v3_LoadStatsRequest* request) { + if (GRPC_TRACE_FLAG_ENABLED(xds_client) && ABSL_VLOG_IS_ON(2)) { + const upb_MessageDef* msg_type = + envoy_service_load_stats_v3_LoadStatsRequest_getmsgdef( + context.def_pool); + char buf[10240]; + upb_TextEncode(reinterpret_cast(request), msg_type, + nullptr, 0, buf, sizeof(buf)); + VLOG(2) << "[lrs_client " << context.client + << "] constructed LRS request: " << buf; + } +} + +std::string SerializeLrsRequest( + const LrsApiContext& context, + const envoy_service_load_stats_v3_LoadStatsRequest* request) { + size_t output_length; + char* output = envoy_service_load_stats_v3_LoadStatsRequest_serialize( + request, context.arena, &output_length); + return std::string(output, output_length); +} + +} // namespace + +std::string LrsClient::CreateLrsInitialRequest() { + upb::Arena arena; + const LrsApiContext context = {this, def_pool_.ptr(), arena.ptr()}; + // Create a request. + envoy_service_load_stats_v3_LoadStatsRequest* request = + envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr()); + // Populate node. + envoy_config_core_v3_Node* node_msg = + envoy_service_load_stats_v3_LoadStatsRequest_mutable_node(request, + arena.ptr()); + PopulateXdsNode(bootstrap_->node(), user_agent_name_, user_agent_version_, + node_msg, arena.ptr()); + envoy_config_core_v3_Node_add_client_features( + node_msg, + upb_StringView_FromString("envoy.lrs.supports_send_all_clusters"), + arena.ptr()); + MaybeLogLrsRequest(context, request); + return SerializeLrsRequest(context, request); +} + +namespace { + +void LocalityStatsPopulate( + const LrsApiContext& context, + envoy_config_endpoint_v3_UpstreamLocalityStats* output, + const XdsLocalityName& locality_name, + const LrsClient::ClusterLocalityStats::Snapshot& snapshot) { + // Set locality. + envoy_config_core_v3_Locality* locality = + envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality( + output, context.arena); + if (!locality_name.region().empty()) { + envoy_config_core_v3_Locality_set_region( + locality, StdStringToUpbString(locality_name.region())); + } + if (!locality_name.zone().empty()) { + envoy_config_core_v3_Locality_set_zone( + locality, StdStringToUpbString(locality_name.zone())); + } + if (!locality_name.sub_zone().empty()) { + envoy_config_core_v3_Locality_set_sub_zone( + locality, StdStringToUpbString(locality_name.sub_zone())); + } + // Set total counts. + envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_successful_requests( + output, snapshot.total_successful_requests); + envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_requests_in_progress( + output, snapshot.total_requests_in_progress); + envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_error_requests( + output, snapshot.total_error_requests); + envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests( + output, snapshot.total_issued_requests); + // Add backend metrics. + for (const auto& p : snapshot.backend_metrics) { + const std::string& metric_name = p.first; + const LrsClient::ClusterLocalityStats::BackendMetric& metric_value = + p.second; + envoy_config_endpoint_v3_EndpointLoadMetricStats* load_metric = + envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats( + output, context.arena); + envoy_config_endpoint_v3_EndpointLoadMetricStats_set_metric_name( + load_metric, StdStringToUpbString(metric_name)); + envoy_config_endpoint_v3_EndpointLoadMetricStats_set_num_requests_finished_with_metric( + load_metric, metric_value.num_requests_finished_with_metric); + envoy_config_endpoint_v3_EndpointLoadMetricStats_set_total_metric_value( + load_metric, metric_value.total_metric_value); + } +} + +} // namespace + +std::string LrsClient::CreateLrsRequest( + ClusterLoadReportMap cluster_load_report_map) { + upb::Arena arena; + const LrsApiContext context = {this, def_pool_.ptr(), arena.ptr()}; + // Create a request. + envoy_service_load_stats_v3_LoadStatsRequest* request = + envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr()); + for (auto& p : cluster_load_report_map) { + const std::string& cluster_name = p.first.first; + const std::string& eds_service_name = p.first.second; + const ClusterLoadReport& load_report = p.second; + // Add cluster stats. + envoy_config_endpoint_v3_ClusterStats* cluster_stats = + envoy_service_load_stats_v3_LoadStatsRequest_add_cluster_stats( + request, arena.ptr()); + // Set the cluster name. + envoy_config_endpoint_v3_ClusterStats_set_cluster_name( + cluster_stats, StdStringToUpbString(cluster_name)); + // Set EDS service name, if non-empty. + if (!eds_service_name.empty()) { + envoy_config_endpoint_v3_ClusterStats_set_cluster_service_name( + cluster_stats, StdStringToUpbString(eds_service_name)); + } + // Add locality stats. + for (const auto& p : load_report.locality_stats) { + const XdsLocalityName& locality_name = *p.first; + const auto& snapshot = p.second; + envoy_config_endpoint_v3_UpstreamLocalityStats* locality_stats = + envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats( + cluster_stats, arena.ptr()); + LocalityStatsPopulate(context, locality_stats, locality_name, snapshot); + } + // Add dropped requests. + uint64_t total_dropped_requests = 0; + for (const auto& p : load_report.dropped_requests.categorized_drops) { + const std::string& category = p.first; + const uint64_t count = p.second; + envoy_config_endpoint_v3_ClusterStats_DroppedRequests* dropped_requests = + envoy_config_endpoint_v3_ClusterStats_add_dropped_requests( + cluster_stats, arena.ptr()); + envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_category( + dropped_requests, StdStringToUpbString(category)); + envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_dropped_count( + dropped_requests, count); + total_dropped_requests += count; + } + total_dropped_requests += load_report.dropped_requests.uncategorized_drops; + // Set total dropped requests. + envoy_config_endpoint_v3_ClusterStats_set_total_dropped_requests( + cluster_stats, total_dropped_requests); + // Set real load report interval. + gpr_timespec timespec = load_report.load_report_interval.as_timespec(); + google_protobuf_Duration* load_report_interval = + envoy_config_endpoint_v3_ClusterStats_mutable_load_report_interval( + cluster_stats, arena.ptr()); + google_protobuf_Duration_set_seconds(load_report_interval, timespec.tv_sec); + google_protobuf_Duration_set_nanos(load_report_interval, timespec.tv_nsec); + } + MaybeLogLrsRequest(context, request); + return SerializeLrsRequest(context, request); +} + +namespace { + +void MaybeLogLrsResponse( + const LrsApiContext& context, + const envoy_service_load_stats_v3_LoadStatsResponse* response) { + if (GRPC_TRACE_FLAG_ENABLED(xds_client) && ABSL_VLOG_IS_ON(2)) { + const upb_MessageDef* msg_type = + envoy_service_load_stats_v3_LoadStatsResponse_getmsgdef( + context.def_pool); + char buf[10240]; + upb_TextEncode(reinterpret_cast(response), msg_type, + nullptr, 0, buf, sizeof(buf)); + VLOG(2) << "[lrs_client " << context.client + << "] received LRS response: " << buf; + } +} + +} // namespace + +absl::Status LrsClient::ParseLrsResponse(absl::string_view encoded_response, + bool* send_all_clusters, + std::set* cluster_names, + Duration* load_reporting_interval) { + upb::Arena arena; + // Decode the response. + const envoy_service_load_stats_v3_LoadStatsResponse* decoded_response = + envoy_service_load_stats_v3_LoadStatsResponse_parse( + encoded_response.data(), encoded_response.size(), arena.ptr()); + // Parse the response. + if (decoded_response == nullptr) { + return absl::UnavailableError("Can't decode response."); + } + const LrsApiContext context = {this, def_pool_.ptr(), arena.ptr()}; + MaybeLogLrsResponse(context, decoded_response); + // Check send_all_clusters. + if (envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters( + decoded_response)) { + *send_all_clusters = true; + } else { + // Store the cluster names. + size_t size; + const upb_StringView* clusters = + envoy_service_load_stats_v3_LoadStatsResponse_clusters(decoded_response, + &size); + for (size_t i = 0; i < size; ++i) { + cluster_names->emplace(UpbStringToStdString(clusters[i])); + } + } + // Get the load report interval. + const google_protobuf_Duration* load_reporting_interval_duration = + envoy_service_load_stats_v3_LoadStatsResponse_load_reporting_interval( + decoded_response); + *load_reporting_interval = Duration::FromSecondsAndNanoseconds( + google_protobuf_Duration_seconds(load_reporting_interval_duration), + google_protobuf_Duration_nanos(load_reporting_interval_duration)); + return absl::OkStatus(); +} + +} // namespace grpc_core diff --git a/src/core/xds/xds_client/lrs_client.h b/src/core/xds/xds_client/lrs_client.h new file mode 100644 index 0000000000000..7bda6f68799ef --- /dev/null +++ b/src/core/xds/xds_client/lrs_client.h @@ -0,0 +1,358 @@ +// +// Copyright 2019 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_LRS_CLIENT_H +#define GRPC_SRC_CORE_XDS_XDS_CLIENT_LRS_CLIENT_H + +#include +#include +#include +#include +#include +#include + +#include "absl/base/thread_annotations.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" +#include "upb/reflection/def.hpp" + +#include + +#include "src/core/lib/debug/trace.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/per_cpu.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" +#include "src/core/xds/xds_client/xds_api.h" +#include "src/core/xds/xds_client/xds_bootstrap.h" +#include "src/core/xds/xds_client/xds_locality.h" +#include "src/core/xds/xds_client/xds_metrics.h" +#include "src/core/xds/xds_client/xds_resource_type.h" +#include "src/core/xds/xds_client/xds_transport.h" + +namespace grpc_core { + +class LrsClient : public DualRefCounted { + public: + // Drop stats for an xds cluster. + class ClusterDropStats final : public RefCounted { + public: + // The total number of requests dropped for any reason is the sum of + // uncategorized_drops, and dropped_requests map. + using CategorizedDropsMap = std::map; + struct Snapshot { + uint64_t uncategorized_drops = 0; + // The number of requests dropped for the specific drop categories + // outlined in the drop_overloads field in the EDS response. + CategorizedDropsMap categorized_drops; + + Snapshot& operator+=(const Snapshot& other) { + uncategorized_drops += other.uncategorized_drops; + for (const auto& p : other.categorized_drops) { + categorized_drops[p.first] += p.second; + } + return *this; + } + + bool IsZero() const { + if (uncategorized_drops != 0) return false; + for (const auto& p : categorized_drops) { + if (p.second != 0) return false; + } + return true; + } + }; + + ClusterDropStats(RefCountedPtr lrs_client, + absl::string_view lrs_server, + absl::string_view cluster_name, + absl::string_view eds_service_name); + ~ClusterDropStats() override; + + // Returns a snapshot of this instance and resets all the counters. + Snapshot GetSnapshotAndReset(); + + void AddUncategorizedDrops(); + void AddCallDropped(const std::string& category); + + private: + RefCountedPtr lrs_client_; + absl::string_view lrs_server_; + absl::string_view cluster_name_; + absl::string_view eds_service_name_; + std::atomic uncategorized_drops_{0}; + // Protects categorized_drops_. A mutex is necessary because the length of + // dropped_requests can be accessed by both the picker (from data plane + // mutex) and the load reporting thread (from the control plane combiner). + Mutex mu_; + CategorizedDropsMap categorized_drops_ ABSL_GUARDED_BY(mu_); + }; + + // Locality stats for an xds cluster. + class ClusterLocalityStats final : public RefCounted { + public: + struct BackendMetric { + uint64_t num_requests_finished_with_metric = 0; + double total_metric_value = 0; + + BackendMetric& operator+=(const BackendMetric& other) { + num_requests_finished_with_metric += + other.num_requests_finished_with_metric; + total_metric_value += other.total_metric_value; + return *this; + } + + bool IsZero() const { + return num_requests_finished_with_metric == 0 && + total_metric_value == 0; + } + }; + + struct Snapshot { + uint64_t total_successful_requests = 0; + uint64_t total_requests_in_progress = 0; + uint64_t total_error_requests = 0; + uint64_t total_issued_requests = 0; + std::map backend_metrics; + + Snapshot& operator+=(const Snapshot& other) { + total_successful_requests += other.total_successful_requests; + total_requests_in_progress += other.total_requests_in_progress; + total_error_requests += other.total_error_requests; + total_issued_requests += other.total_issued_requests; + for (const auto& p : other.backend_metrics) { + backend_metrics[p.first] += p.second; + } + return *this; + } + + bool IsZero() const { + if (total_successful_requests != 0 || total_requests_in_progress != 0 || + total_error_requests != 0 || total_issued_requests != 0) { + return false; + } + for (const auto& p : backend_metrics) { + if (!p.second.IsZero()) return false; + } + return true; + } + }; + + ClusterLocalityStats(RefCountedPtr lrs_client, + absl::string_view lrs_server, + absl::string_view cluster_name, + absl::string_view eds_service_name, + RefCountedPtr name); + ~ClusterLocalityStats() override; + + // Returns a snapshot of this instance and resets all the counters. + Snapshot GetSnapshotAndReset(); + + void AddCallStarted(); + void AddCallFinished( + const std::map* named_metrics, + bool fail = false); + + XdsLocalityName* locality_name() const { return name_.get(); } + + private: + struct Stats { + std::atomic total_successful_requests{0}; + std::atomic total_requests_in_progress{0}; + std::atomic total_error_requests{0}; + std::atomic total_issued_requests{0}; + + // Protects backend_metrics. A mutex is necessary because the length of + // backend_metrics_ can be accessed by both the callback intercepting the + // call's recv_trailing_metadata and the load reporting thread. + Mutex backend_metrics_mu; + std::map backend_metrics + ABSL_GUARDED_BY(backend_metrics_mu); + }; + + RefCountedPtr lrs_client_; + absl::string_view lrs_server_; + absl::string_view cluster_name_; + absl::string_view eds_service_name_; + RefCountedPtr name_; + PerCpu stats_{PerCpuOptions().SetMaxShards(32).SetCpusPerShard(4)}; + }; + + LrsClient( + std::shared_ptr bootstrap, std::string user_agent_name, + std::string user_agent_version, + RefCountedPtr transport_factory, + std::shared_ptr engine); + ~LrsClient() override; + + // Adds and removes drop stats for cluster_name and eds_service_name. + RefCountedPtr AddClusterDropStats( + std::shared_ptr lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name); + + // Adds and removes locality stats for cluster_name and eds_service_name + // for the specified locality. + RefCountedPtr AddClusterLocalityStats( + std::shared_ptr lrs_server, + absl::string_view cluster_name, absl::string_view eds_service_name, + RefCountedPtr locality); + + // Resets connection backoff state. + void ResetBackoff(); + + XdsTransportFactory* transport_factory() const { + return transport_factory_.get(); + } + + grpc_event_engine::experimental::EventEngine* engine() { + return engine_.get(); + } + + private: + // Contains a channel to the LRS server and all the data related to the + // channel. + class LrsChannel final : public DualRefCounted { + public: + template + class RetryableCall; + + class LrsCall; + + LrsChannel(WeakRefCountedPtr lrs_client, + std::shared_ptr server); + ~LrsChannel() override; + + LrsClient* lrs_client() const { return lrs_client_.get(); } + + void ResetBackoff(); + + void MaybeStartLrsCall(); + + absl::string_view server_uri() const { return server_->server_uri(); } + + private: + void Orphaned() override; + + void StopLrsCallLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&LrsClient::mu_); + + // The owning LrsClient. + WeakRefCountedPtr lrs_client_; + + std::shared_ptr server_; + + RefCountedPtr transport_; + + // The retryable LRS call. + OrphanablePtr> lrs_call_; + }; + + struct LoadReportState { + struct LocalityState { + ClusterLocalityStats* locality_stats = nullptr; + ClusterLocalityStats::Snapshot deleted_locality_stats; + }; + + ClusterDropStats* drop_stats = nullptr; + ClusterDropStats::Snapshot deleted_drop_stats; + std::map, LocalityState, + XdsLocalityName::Less> + locality_stats; + Timestamp last_report_time = Timestamp::Now(); + }; + + // Load report data. + using LoadReportMap = std::map< + std::pair, + LoadReportState>; + + struct LoadReportServer { + RefCountedPtr lrs_channel; + LoadReportMap load_report_map; + }; + + struct ClusterLoadReport { + ClusterDropStats::Snapshot dropped_requests; + std::map, ClusterLocalityStats::Snapshot, + XdsLocalityName::Less> + locality_stats; + Duration load_report_interval; + }; + using ClusterLoadReportMap = std::map< + std::pair, + ClusterLoadReport>; + + void Orphaned() override; + + ClusterLoadReportMap BuildLoadReportSnapshotLocked( + const XdsBootstrap::XdsServer& lrs_server, bool send_all_clusters, + const std::set& clusters) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + RefCountedPtr GetOrCreateLrsChannelLocked( + std::shared_ptr server, const char* reason) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + + static bool LoadReportCountersAreZero(const ClusterLoadReportMap& snapshot); + + void RemoveClusterDropStats(absl::string_view lrs_server, + absl::string_view cluster_name, + absl::string_view eds_service_name, + ClusterDropStats* cluster_drop_stats); + + void RemoveClusterLocalityStats( + absl::string_view lrs_server, absl::string_view cluster_name, + absl::string_view eds_service_name, + const RefCountedPtr& locality, + ClusterLocalityStats* cluster_locality_stats); + + // Creates an initial LRS request. + std::string CreateLrsInitialRequest() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); + + // Creates an LRS request sending a client-side load report. + std::string CreateLrsRequest(ClusterLoadReportMap cluster_load_report_map) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); + + // Parses the LRS response and populates send_all_clusters, + // cluster_names, and load_reporting_interval. + absl::Status ParseLrsResponse(absl::string_view encoded_response, + bool* send_all_clusters, + std::set* cluster_names, + Duration* load_reporting_interval) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); + + std::shared_ptr bootstrap_; + const std::string user_agent_name_; + const std::string user_agent_version_; + RefCountedPtr transport_factory_; + std::shared_ptr engine_; + + Mutex mu_; + upb::DefPool def_pool_ ABSL_GUARDED_BY(mu_); + // Map of existing LRS channels. + std::map lrs_channel_map_ + ABSL_GUARDED_BY(mu_); + std::map> + load_report_map_ ABSL_GUARDED_BY(mu_); +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_LRS_CLIENT_H diff --git a/src/core/xds/xds_client/xds_api.cc b/src/core/xds/xds_client/xds_api.cc index 8ae5e438abf7d..505229619205b 100644 --- a/src/core/xds/xds_client/xds_api.cc +++ b/src/core/xds/xds_client/xds_api.cc @@ -154,42 +154,50 @@ std::string SerializeDiscoveryRequest( void XdsApi::PopulateNode(envoy_config_core_v3_Node* node_msg, upb_Arena* arena) { - if (node_ != nullptr) { - if (!node_->id().empty()) { + PopulateXdsNode(node_, user_agent_name_, user_agent_version_, node_msg, + arena); +} + +void PopulateXdsNode(const XdsBootstrap::Node* node, + absl::string_view user_agent_name, + absl::string_view user_agent_version, + envoy_config_core_v3_Node* node_msg, upb_Arena* arena) { + if (node != nullptr) { + if (!node->id().empty()) { envoy_config_core_v3_Node_set_id(node_msg, - StdStringToUpbString(node_->id())); + StdStringToUpbString(node->id())); } - if (!node_->cluster().empty()) { + if (!node->cluster().empty()) { envoy_config_core_v3_Node_set_cluster( - node_msg, StdStringToUpbString(node_->cluster())); + node_msg, StdStringToUpbString(node->cluster())); } - if (!node_->metadata().empty()) { + if (!node->metadata().empty()) { google_protobuf_Struct* metadata = envoy_config_core_v3_Node_mutable_metadata(node_msg, arena); - PopulateMetadata(metadata, node_->metadata(), arena); + PopulateMetadata(metadata, node->metadata(), arena); } - if (!node_->locality_region().empty() || !node_->locality_zone().empty() || - !node_->locality_sub_zone().empty()) { + if (!node->locality_region().empty() || !node->locality_zone().empty() || + !node->locality_sub_zone().empty()) { envoy_config_core_v3_Locality* locality = envoy_config_core_v3_Node_mutable_locality(node_msg, arena); - if (!node_->locality_region().empty()) { + if (!node->locality_region().empty()) { envoy_config_core_v3_Locality_set_region( - locality, StdStringToUpbString(node_->locality_region())); + locality, StdStringToUpbString(node->locality_region())); } - if (!node_->locality_zone().empty()) { + if (!node->locality_zone().empty()) { envoy_config_core_v3_Locality_set_zone( - locality, StdStringToUpbString(node_->locality_zone())); + locality, StdStringToUpbString(node->locality_zone())); } - if (!node_->locality_sub_zone().empty()) { + if (!node->locality_sub_zone().empty()) { envoy_config_core_v3_Locality_set_sub_zone( - locality, StdStringToUpbString(node_->locality_sub_zone())); + locality, StdStringToUpbString(node->locality_sub_zone())); } } } envoy_config_core_v3_Node_set_user_agent_name( - node_msg, StdStringToUpbString(user_agent_name_)); + node_msg, StdStringToUpbString(user_agent_name)); envoy_config_core_v3_Node_set_user_agent_version( - node_msg, StdStringToUpbString(user_agent_version_)); + node_msg, StdStringToUpbString(user_agent_version)); envoy_config_core_v3_Node_add_client_features( node_msg, upb_StringView_FromString("envoy.lb.does_not_support_overprovisioning"), @@ -344,224 +352,4 @@ absl::Status XdsApi::ParseAdsResponse(absl::string_view encoded_response, return absl::OkStatus(); } -namespace { - -void MaybeLogLrsRequest( - const XdsApiContext& context, - const envoy_service_load_stats_v3_LoadStatsRequest* request) { - if (GRPC_TRACE_FLAG_ENABLED_OBJ(*context.tracer) && ABSL_VLOG_IS_ON(2)) { - const upb_MessageDef* msg_type = - envoy_service_load_stats_v3_LoadStatsRequest_getmsgdef( - context.def_pool); - char buf[10240]; - upb_TextEncode(reinterpret_cast(request), msg_type, - nullptr, 0, buf, sizeof(buf)); - VLOG(2) << "[xds_client " << context.client - << "] constructed LRS request: " << buf; - } -} - -std::string SerializeLrsRequest( - const XdsApiContext& context, - const envoy_service_load_stats_v3_LoadStatsRequest* request) { - size_t output_length; - char* output = envoy_service_load_stats_v3_LoadStatsRequest_serialize( - request, context.arena, &output_length); - return std::string(output, output_length); -} - -} // namespace - -std::string XdsApi::CreateLrsInitialRequest() { - upb::Arena arena; - const XdsApiContext context = {client_, tracer_, def_pool_->ptr(), - arena.ptr()}; - // Create a request. - envoy_service_load_stats_v3_LoadStatsRequest* request = - envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr()); - // Populate node. - envoy_config_core_v3_Node* node_msg = - envoy_service_load_stats_v3_LoadStatsRequest_mutable_node(request, - arena.ptr()); - PopulateNode(node_msg, arena.ptr()); - envoy_config_core_v3_Node_add_client_features( - node_msg, - upb_StringView_FromString("envoy.lrs.supports_send_all_clusters"), - arena.ptr()); - MaybeLogLrsRequest(context, request); - return SerializeLrsRequest(context, request); -} - -namespace { - -void LocalityStatsPopulate( - const XdsApiContext& context, - envoy_config_endpoint_v3_UpstreamLocalityStats* output, - const XdsLocalityName& locality_name, - const XdsClusterLocalityStats::Snapshot& snapshot) { - // Set locality. - envoy_config_core_v3_Locality* locality = - envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality( - output, context.arena); - if (!locality_name.region().empty()) { - envoy_config_core_v3_Locality_set_region( - locality, StdStringToUpbString(locality_name.region())); - } - if (!locality_name.zone().empty()) { - envoy_config_core_v3_Locality_set_zone( - locality, StdStringToUpbString(locality_name.zone())); - } - if (!locality_name.sub_zone().empty()) { - envoy_config_core_v3_Locality_set_sub_zone( - locality, StdStringToUpbString(locality_name.sub_zone())); - } - // Set total counts. - envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_successful_requests( - output, snapshot.total_successful_requests); - envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_requests_in_progress( - output, snapshot.total_requests_in_progress); - envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_error_requests( - output, snapshot.total_error_requests); - envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests( - output, snapshot.total_issued_requests); - // Add backend metrics. - for (const auto& p : snapshot.backend_metrics) { - const std::string& metric_name = p.first; - const XdsClusterLocalityStats::BackendMetric& metric_value = p.second; - envoy_config_endpoint_v3_EndpointLoadMetricStats* load_metric = - envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats( - output, context.arena); - envoy_config_endpoint_v3_EndpointLoadMetricStats_set_metric_name( - load_metric, StdStringToUpbString(metric_name)); - envoy_config_endpoint_v3_EndpointLoadMetricStats_set_num_requests_finished_with_metric( - load_metric, metric_value.num_requests_finished_with_metric); - envoy_config_endpoint_v3_EndpointLoadMetricStats_set_total_metric_value( - load_metric, metric_value.total_metric_value); - } -} - -} // namespace - -std::string XdsApi::CreateLrsRequest( - ClusterLoadReportMap cluster_load_report_map) { - upb::Arena arena; - const XdsApiContext context = {client_, tracer_, def_pool_->ptr(), - arena.ptr()}; - // Create a request. - envoy_service_load_stats_v3_LoadStatsRequest* request = - envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr()); - for (auto& p : cluster_load_report_map) { - const std::string& cluster_name = p.first.first; - const std::string& eds_service_name = p.first.second; - const ClusterLoadReport& load_report = p.second; - // Add cluster stats. - envoy_config_endpoint_v3_ClusterStats* cluster_stats = - envoy_service_load_stats_v3_LoadStatsRequest_add_cluster_stats( - request, arena.ptr()); - // Set the cluster name. - envoy_config_endpoint_v3_ClusterStats_set_cluster_name( - cluster_stats, StdStringToUpbString(cluster_name)); - // Set EDS service name, if non-empty. - if (!eds_service_name.empty()) { - envoy_config_endpoint_v3_ClusterStats_set_cluster_service_name( - cluster_stats, StdStringToUpbString(eds_service_name)); - } - // Add locality stats. - for (const auto& p : load_report.locality_stats) { - const XdsLocalityName& locality_name = *p.first; - const auto& snapshot = p.second; - envoy_config_endpoint_v3_UpstreamLocalityStats* locality_stats = - envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats( - cluster_stats, arena.ptr()); - LocalityStatsPopulate(context, locality_stats, locality_name, snapshot); - } - // Add dropped requests. - uint64_t total_dropped_requests = 0; - for (const auto& p : load_report.dropped_requests.categorized_drops) { - const std::string& category = p.first; - const uint64_t count = p.second; - envoy_config_endpoint_v3_ClusterStats_DroppedRequests* dropped_requests = - envoy_config_endpoint_v3_ClusterStats_add_dropped_requests( - cluster_stats, arena.ptr()); - envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_category( - dropped_requests, StdStringToUpbString(category)); - envoy_config_endpoint_v3_ClusterStats_DroppedRequests_set_dropped_count( - dropped_requests, count); - total_dropped_requests += count; - } - total_dropped_requests += load_report.dropped_requests.uncategorized_drops; - // Set total dropped requests. - envoy_config_endpoint_v3_ClusterStats_set_total_dropped_requests( - cluster_stats, total_dropped_requests); - // Set real load report interval. - gpr_timespec timespec = load_report.load_report_interval.as_timespec(); - google_protobuf_Duration* load_report_interval = - envoy_config_endpoint_v3_ClusterStats_mutable_load_report_interval( - cluster_stats, arena.ptr()); - google_protobuf_Duration_set_seconds(load_report_interval, timespec.tv_sec); - google_protobuf_Duration_set_nanos(load_report_interval, timespec.tv_nsec); - } - MaybeLogLrsRequest(context, request); - return SerializeLrsRequest(context, request); -} - -namespace { - -void MaybeLogLrsResponse( - const XdsApiContext& context, - const envoy_service_load_stats_v3_LoadStatsResponse* response) { - if (GRPC_TRACE_FLAG_ENABLED_OBJ(*context.tracer) && ABSL_VLOG_IS_ON(2)) { - const upb_MessageDef* msg_type = - envoy_service_load_stats_v3_LoadStatsResponse_getmsgdef( - context.def_pool); - char buf[10240]; - upb_TextEncode(reinterpret_cast(response), msg_type, - nullptr, 0, buf, sizeof(buf)); - VLOG(2) << "[xds_client " << context.client - << "] received LRS response: " << buf; - } -} - -} // namespace - -absl::Status XdsApi::ParseLrsResponse(absl::string_view encoded_response, - bool* send_all_clusters, - std::set* cluster_names, - Duration* load_reporting_interval) { - upb::Arena arena; - // Decode the response. - const envoy_service_load_stats_v3_LoadStatsResponse* decoded_response = - envoy_service_load_stats_v3_LoadStatsResponse_parse( - encoded_response.data(), encoded_response.size(), arena.ptr()); - // Parse the response. - if (decoded_response == nullptr) { - return absl::UnavailableError("Can't decode response."); - } - const XdsApiContext context = {client_, tracer_, def_pool_->ptr(), - arena.ptr()}; - MaybeLogLrsResponse(context, decoded_response); - // Check send_all_clusters. - if (envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters( - decoded_response)) { - *send_all_clusters = true; - } else { - // Store the cluster names. - size_t size; - const upb_StringView* clusters = - envoy_service_load_stats_v3_LoadStatsResponse_clusters(decoded_response, - &size); - for (size_t i = 0; i < size; ++i) { - cluster_names->emplace(UpbStringToStdString(clusters[i])); - } - } - // Get the load report interval. - const google_protobuf_Duration* load_reporting_interval_duration = - envoy_service_load_stats_v3_LoadStatsResponse_load_reporting_interval( - decoded_response); - *load_reporting_interval = Duration::FromSecondsAndNanoseconds( - google_protobuf_Duration_seconds(load_reporting_interval_duration), - google_protobuf_Duration_nanos(load_reporting_interval_duration)); - return absl::OkStatus(); -} - } // namespace grpc_core diff --git a/src/core/xds/xds_client/xds_api.h b/src/core/xds/xds_client/xds_api.h index 990d9ed771879..207e78a297acd 100644 --- a/src/core/xds/xds_client/xds_api.h +++ b/src/core/xds/xds_client/xds_api.h @@ -35,19 +35,17 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/xds/xds_client/xds_bootstrap.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/xds/xds_client/xds_locality.h" namespace grpc_core { class XdsClient; -// TODO(roth): When we have time, split this into multiple pieces: -// - ADS request/response handling -// - LRS request/response handling -// - CSDS response generation +// TODO(roth): When we have time, remove this class and move its +// functionality directly inside of XdsClient. class XdsApi final { public: // Interface defined by caller and passed to ParseAdsResponse(). @@ -81,17 +79,6 @@ class XdsApi final { absl::string_view message) = 0; }; - struct ClusterLoadReport { - XdsClusterDropStats::Snapshot dropped_requests; - std::map, XdsClusterLocalityStats::Snapshot, - XdsLocalityName::Less> - locality_stats; - Duration load_report_interval; - }; - using ClusterLoadReportMap = std::map< - std::pair, - ClusterLoadReport>; - // The metadata of the xDS resource; used by the xDS config dump. struct ResourceMetadata { // Resource status from the view of a xDS client, which tells the @@ -160,19 +147,6 @@ class XdsApi final { absl::Status ParseAdsResponse(absl::string_view encoded_response, AdsResponseParserInterface* parser); - // Creates an initial LRS request. - std::string CreateLrsInitialRequest(); - - // Creates an LRS request sending a client-side load report. - std::string CreateLrsRequest(ClusterLoadReportMap cluster_load_report_map); - - // Parses the LRS response and populates send_all_clusters, - // cluster_names, and load_reporting_interval. - absl::Status ParseLrsResponse(absl::string_view encoded_response, - bool* send_all_clusters, - std::set* cluster_names, - Duration* load_reporting_interval); - void PopulateNode(envoy_config_core_v3_Node* node_msg, upb_Arena* arena); private: @@ -184,6 +158,11 @@ class XdsApi final { const std::string user_agent_version_; }; +void PopulateXdsNode(const XdsBootstrap::Node* node, + absl::string_view user_agent_name, + absl::string_view user_agent_version, + envoy_config_core_v3_Node* node_msg, upb_Arena* arena); + } // namespace grpc_core #endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_API_H diff --git a/src/core/xds/xds_client/xds_bootstrap.cc b/src/core/xds/xds_client/xds_bootstrap.cc index 65b70778ef31f..b6f5edfc9e2a2 100644 --- a/src/core/xds/xds_client/xds_bootstrap.cc +++ b/src/core/xds/xds_client/xds_bootstrap.cc @@ -20,7 +20,7 @@ #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/string.h" namespace grpc_core { diff --git a/src/core/xds/xds_client/xds_client.cc b/src/core/xds/xds_client/xds_client.cc index 78ad97b3df0a5..6381f8ba38c6e 100644 --- a/src/core/xds/xds_client/xds_client.cc +++ b/src/core/xds/xds_client/xds_client.cc @@ -46,17 +46,17 @@ #include #include -#include "src/core/lib/backoff/backoff.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" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/backoff.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/uri.h" #include "src/core/xds/xds_client/xds_api.h" #include "src/core/xds/xds_client/xds_bootstrap.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/xds/xds_client/xds_locality.h" #define GRPC_XDS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_XDS_RECONNECT_BACKOFF_MULTIPLIER 1.6 @@ -74,6 +74,9 @@ using ::grpc_event_engine::experimental::EventEngine; // An xds call wrapper that can restart a call upon failure. Holds a ref to // the xds channel. The template parameter is the kind of wrapped xds call. +// TODO(roth): This is basically the same code as in LrsClient, and +// probably very similar to many other places in the codebase. +// Consider refactoring this into a common utility library somehow. template class XdsClient::XdsChannel::RetryableCall final : public InternallyRefCounted> { @@ -210,6 +213,7 @@ class XdsClient::XdsChannel::AdsCall final if (timer_handle_.has_value() && ads_call_->xds_client()->engine()->Cancel(*timer_handle_)) { timer_handle_.reset(); + ads_call_.reset(); } } @@ -250,24 +254,28 @@ class XdsClient::XdsChannel::AdsCall final } void OnTimer() { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << ads_call_->xds_client() << "] xds server " - << ads_call_->xds_channel()->server_.server_uri() - << ": timeout obtaining resource {type=" << type_->type_url() - << " name=" - << XdsClient::ConstructFullXdsResourceName( - name_.authority, type_->type_url(), name_.key) - << "} from xds server"; { MutexLock lock(&ads_call_->xds_client()->mu_); timer_handle_.reset(); - resource_seen_ = true; auto& authority_state = ads_call_->xds_client()->authority_state_map_[name_.authority]; ResourceState& state = authority_state.resource_map[type_][name_.key]; - state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST; - ads_call_->xds_client()->NotifyWatchersOnResourceDoesNotExist( - state.watchers, ReadDelayHandle::NoWait()); + // We might have received the resource after the timer fired but before + // the callback ran. + if (state.resource == nullptr) { + GRPC_TRACE_LOG(xds_client, INFO) + << "[xds_client " << ads_call_->xds_client() << "] xds server " + << ads_call_->xds_channel()->server_.server_uri() + << ": timeout obtaining resource {type=" << type_->type_url() + << " name=" + << XdsClient::ConstructFullXdsResourceName( + name_.authority, type_->type_url(), name_.key) + << "} from xds server"; + resource_seen_ = true; + state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST; + ads_call_->xds_client()->NotifyWatchersOnResourceDoesNotExist( + state.watchers, ReadDelayHandle::NoWait()); + } } ads_call_->xds_client()->work_serializer_.DrainQueue(); ads_call_.reset(); @@ -350,98 +358,22 @@ class XdsClient::XdsChannel::AdsCall final std::map state_map_; }; -// Contains an LRS call to the xds server. -class XdsClient::XdsChannel::LrsCall final - : public InternallyRefCounted { - public: - // The ctor and dtor should not be used directly. - explicit LrsCall(RefCountedPtr> retryable_call); +// +// XdsClient::XdsChannel::ConnectivityFailureWatcher +// - void Orphan() override; +class XdsClient::XdsChannel::ConnectivityFailureWatcher + : public XdsTransportFactory::XdsTransport::ConnectivityFailureWatcher { + public: + explicit ConnectivityFailureWatcher(WeakRefCountedPtr xds_channel) + : xds_channel_(std::move(xds_channel)) {} - RetryableCall* retryable_call() { return retryable_call_.get(); } - XdsChannel* xds_channel() const { return retryable_call_->xds_channel(); } - XdsClient* xds_client() const { return xds_channel()->xds_client(); } - bool seen_response() const { return seen_response_; } + void OnConnectivityFailure(absl::Status status) override { + xds_channel_->OnConnectivityFailure(std::move(status)); + } private: - class StreamEventHandler final - : public XdsTransportFactory::XdsTransport::StreamingCall::EventHandler { - public: - explicit StreamEventHandler(RefCountedPtr lrs_call) - : lrs_call_(std::move(lrs_call)) {} - - void OnRequestSent(bool /*ok*/) override { lrs_call_->OnRequestSent(); } - void OnRecvMessage(absl::string_view payload) override { - lrs_call_->OnRecvMessage(payload); - } - void OnStatusReceived(absl::Status status) override { - lrs_call_->OnStatusReceived(std::move(status)); - } - - private: - RefCountedPtr lrs_call_; - }; - - // A repeating timer for a particular duration. - class Timer final : public InternallyRefCounted { - public: - explicit Timer(RefCountedPtr lrs_call) - : lrs_call_(std::move(lrs_call)) {} - ~Timer() override { lrs_call_.reset(DEBUG_LOCATION, "LRS timer"); } - - // Disable thread-safety analysis because this method is called via - // OrphanablePtr<>, but there's no way to pass the lock annotation - // through there. - void Orphan() override ABSL_NO_THREAD_SAFETY_ANALYSIS; - - void ScheduleNextReportLocked() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); - - private: - bool IsCurrentTimerOnCall() const { - return this == lrs_call_->timer_.get(); - } - XdsClient* xds_client() const { return lrs_call_->xds_client(); } - - void OnNextReportTimer(); - - // The owning LRS call. - RefCountedPtr lrs_call_; - - absl::optional timer_handle_ - ABSL_GUARDED_BY(&XdsClient::mu_); - }; - - void MaybeScheduleNextReportLocked() - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); - - void SendReportLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); - - void SendMessageLocked(std::string payload) - ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); - - void OnRequestSent(); - void OnRecvMessage(absl::string_view payload); - void OnStatusReceived(absl::Status status); - - bool IsCurrentCallOnChannel() const; - - // The owning RetryableCall<>. - RefCountedPtr> retryable_call_; - - OrphanablePtr - streaming_call_; - - bool seen_response_ = false; - bool send_message_pending_ ABSL_GUARDED_BY(&XdsClient::mu_) = false; - - // Load reporting state. - bool send_all_clusters_ = false; - std::set cluster_names_; // Asked for by the LRS server. - Duration load_reporting_interval_; - bool last_report_counters_were_zero_ = false; - OrphanablePtr timer_; + WeakRefCountedPtr xds_channel_; }; // @@ -459,15 +391,15 @@ XdsClient::XdsChannel::XdsChannel(WeakRefCountedPtr xds_client, << "[xds_client " << xds_client_.get() << "] creating channel " << this << " for server " << server.server_uri(); absl::Status status; - transport_ = xds_client_->transport_factory_->Create( - server, - [self = WeakRef(DEBUG_LOCATION, "OnConnectivityFailure")]( - absl::Status status) { - self->OnConnectivityFailure(std::move(status)); - }, - &status); + transport_ = xds_client_->transport_factory_->GetTransport(server, &status); CHECK(transport_ != nullptr); - if (!status.ok()) SetChannelStatusLocked(std::move(status)); + if (!status.ok()) { + SetChannelStatusLocked(std::move(status)); + } else { + failure_watcher_ = MakeRefCounted( + WeakRef(DEBUG_LOCATION, "OnConnectivityFailure")); + transport_->StartConnectivityFailureWatch(failure_watcher_); + } } XdsClient::XdsChannel::~XdsChannel() { @@ -486,13 +418,16 @@ void XdsClient::XdsChannel::Orphaned() ABSL_NO_THREAD_SAFETY_ANALYSIS { << "[xds_client " << xds_client() << "] orphaning xds channel " << this << " for server " << server_.server_uri(); shutting_down_ = true; + if (failure_watcher_ != nullptr) { + transport_->StopConnectivityFailureWatch(failure_watcher_); + failure_watcher_.reset(); + } transport_.reset(); // At this time, all strong refs are removed, remove from channel map to // prevent subsequent subscription from trying to use this XdsChannel as // it is shutting down. xds_client_->xds_channel_map_.erase(server_.Key()); ads_call_.reset(); - lrs_call_.reset(); } void XdsClient::XdsChannel::ResetBackoff() { transport_->ResetBackoff(); } @@ -501,21 +436,6 @@ XdsClient::XdsChannel::AdsCall* XdsClient::XdsChannel::ads_call() const { return ads_call_->call(); } -XdsClient::XdsChannel::LrsCall* XdsClient::XdsChannel::lrs_call() const { - return lrs_call_->call(); -} - -void XdsClient::XdsChannel::MaybeStartLrsCall() { - if (lrs_call_ != nullptr) return; - lrs_call_.reset( - new RetryableCall(WeakRef(DEBUG_LOCATION, "XdsChannel+lrs"))); -} - -void XdsClient::XdsChannel::StopLrsCallLocked() { - xds_client_->xds_load_report_server_map_.erase(server_.Key()); - lrs_call_.reset(); -} - void XdsClient::XdsChannel::SubscribeLocked(const XdsResourceType* type, const XdsResourceName& name) { if (ads_call_ == nullptr) { @@ -1275,241 +1195,6 @@ XdsClient::XdsChannel::AdsCall::ResourceNamesForRequest( return resource_names; } -// -// XdsClient::XdsChannel::LrsCall::Timer -// - -void XdsClient::XdsChannel::LrsCall::Timer::Orphan() { - if (timer_handle_.has_value()) { - xds_client()->engine()->Cancel(*timer_handle_); - timer_handle_.reset(); - } - Unref(DEBUG_LOCATION, "Orphan"); -} - -void XdsClient::XdsChannel::LrsCall::Timer::ScheduleNextReportLocked() { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client() << "] xds server " - << lrs_call_->xds_channel()->server_.server_uri() - << ": scheduling next load report in " - << lrs_call_->load_reporting_interval_; - timer_handle_ = xds_client()->engine()->RunAfter( - lrs_call_->load_reporting_interval_, - [self = Ref(DEBUG_LOCATION, "timer")]() { - ApplicationCallbackExecCtx callback_exec_ctx; - ExecCtx exec_ctx; - self->OnNextReportTimer(); - }); -} - -void XdsClient::XdsChannel::LrsCall::Timer::OnNextReportTimer() { - MutexLock lock(&xds_client()->mu_); - timer_handle_.reset(); - if (IsCurrentTimerOnCall()) lrs_call_->SendReportLocked(); -} - -// -// XdsClient::XdsChannel::LrsCall -// - -XdsClient::XdsChannel::LrsCall::LrsCall( - RefCountedPtr> retryable_call) - : InternallyRefCounted( - GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) ? "LrsCall" : nullptr), - retryable_call_(std::move(retryable_call)) { - // Init the LRS call. Note that the call will progress every time there's - // activity in xds_client()->interested_parties_, which is comprised of - // the polling entities from client_channel. - CHECK_NE(xds_client(), nullptr); - const char* method = - "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats"; - streaming_call_ = xds_channel()->transport_->CreateStreamingCall( - method, std::make_unique( - // Passing the initial ref here. This ref will go away when - // the StreamEventHandler is destroyed. - RefCountedPtr(this))); - CHECK(streaming_call_ != nullptr); - // Start the call. - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": starting LRS call (lrs_call=" << this - << ", streaming_call=" << streaming_call_.get() << ")"; - // Send the initial request. - std::string serialized_payload = xds_client()->api_.CreateLrsInitialRequest(); - SendMessageLocked(std::move(serialized_payload)); - // Read initial response. - streaming_call_->StartRecvMessage(); -} - -void XdsClient::XdsChannel::LrsCall::Orphan() { - timer_.reset(); - // Note that the initial ref is held by the StreamEventHandler, which - // will be destroyed when streaming_call_ is destroyed, which may not happen - // here, since there may be other refs held to streaming_call_ by internal - // callbacks. - streaming_call_.reset(); -} - -void XdsClient::XdsChannel::LrsCall::MaybeScheduleNextReportLocked() { - // If there are no more registered stats to report, cancel the call. - auto it = xds_client()->xds_load_report_server_map_.find( - xds_channel()->server_.Key()); - if (it == xds_client()->xds_load_report_server_map_.end() || - it->second.load_report_map.empty()) { - it->second.xds_channel->StopLrsCallLocked(); - return; - } - // Don't start if the previous send_message op hasn't completed yet. - // If this happens, we'll be called again from OnRequestSent(). - if (send_message_pending_) return; - // Don't start if no LRS response has arrived. - if (!seen_response()) return; - // If there is no timer, create one. - // This happens on the initial response and whenever the interval changes. - if (timer_ == nullptr) { - timer_ = MakeOrphanable(Ref(DEBUG_LOCATION, "LRS timer")); - } - // Schedule the next load report. - timer_->ScheduleNextReportLocked(); -} - -namespace { - -bool LoadReportCountersAreZero(const XdsApi::ClusterLoadReportMap& snapshot) { - for (const auto& p : snapshot) { - const XdsApi::ClusterLoadReport& cluster_snapshot = p.second; - if (!cluster_snapshot.dropped_requests.IsZero()) return false; - for (const auto& q : cluster_snapshot.locality_stats) { - const XdsClusterLocalityStats::Snapshot& locality_snapshot = q.second; - if (!locality_snapshot.IsZero()) return false; - } - } - return true; -} - -} // namespace - -void XdsClient::XdsChannel::LrsCall::SendReportLocked() { - // Construct snapshot from all reported stats. - XdsApi::ClusterLoadReportMap snapshot = - xds_client()->BuildLoadReportSnapshotLocked( - xds_channel()->server_, send_all_clusters_, cluster_names_); - // Skip client load report if the counters were all zero in the last - // report and they are still zero in this one. - const bool old_val = last_report_counters_were_zero_; - last_report_counters_were_zero_ = LoadReportCountersAreZero(snapshot); - if (old_val && last_report_counters_were_zero_) { - MaybeScheduleNextReportLocked(); - return; - } - // Send a request that contains the snapshot. - std::string serialized_payload = - xds_client()->api_.CreateLrsRequest(std::move(snapshot)); - SendMessageLocked(std::move(serialized_payload)); -} - -void XdsClient::XdsChannel::LrsCall::SendMessageLocked(std::string payload) { - send_message_pending_ = true; - streaming_call_->SendMessage(std::move(payload)); -} - -void XdsClient::XdsChannel::LrsCall::OnRequestSent() { - MutexLock lock(&xds_client()->mu_); - send_message_pending_ = false; - if (IsCurrentCallOnChannel()) MaybeScheduleNextReportLocked(); -} - -void XdsClient::XdsChannel::LrsCall::OnRecvMessage(absl::string_view payload) { - MutexLock lock(&xds_client()->mu_); - // If we're no longer the current call, ignore the result. - if (!IsCurrentCallOnChannel()) return; - // Start recv after any code branch - auto cleanup = absl::MakeCleanup( - [call = streaming_call_.get()]() { call->StartRecvMessage(); }); - // Parse the response. - bool send_all_clusters = false; - std::set new_cluster_names; - Duration new_load_reporting_interval; - absl::Status status = xds_client()->api_.ParseLrsResponse( - payload, &send_all_clusters, &new_cluster_names, - &new_load_reporting_interval); - if (!status.ok()) { - LOG(ERROR) << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": LRS response parsing failed: " << status; - return; - } - seen_response_ = true; - if (GRPC_TRACE_FLAG_ENABLED(xds_client)) { - LOG(INFO) << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": LRS response received, " << new_cluster_names.size() - << " cluster names, send_all_clusters=" << send_all_clusters - << ", load_report_interval=" - << new_load_reporting_interval.millis() << "ms"; - size_t i = 0; - for (const auto& name : new_cluster_names) { - LOG(INFO) << "[xds_client " << xds_client() << "] cluster_name " << i++ - << ": " << name; - } - } - if (new_load_reporting_interval < - Duration::Milliseconds(GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS)) { - new_load_reporting_interval = - Duration::Milliseconds(GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS); - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": increased load_report_interval to minimum value " - << GRPC_XDS_MIN_CLIENT_LOAD_REPORTING_INTERVAL_MS << "ms"; - } - // Ignore identical update. - if (send_all_clusters == send_all_clusters_ && - cluster_names_ == new_cluster_names && - load_reporting_interval_ == new_load_reporting_interval) { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": incoming LRS response identical to current, ignoring."; - return; - } - // If the interval has changed, we'll need to restart the timer below. - const bool restart_timer = - load_reporting_interval_ != new_load_reporting_interval; - // Record the new config. - send_all_clusters_ = send_all_clusters; - cluster_names_ = std::move(new_cluster_names); - load_reporting_interval_ = new_load_reporting_interval; - // Restart timer if needed. - if (restart_timer) { - timer_.reset(); - MaybeScheduleNextReportLocked(); - } -} - -void XdsClient::XdsChannel::LrsCall::OnStatusReceived(absl::Status status) { - MutexLock lock(&xds_client()->mu_); - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client() << "] xds server " - << xds_channel()->server_.server_uri() - << ": LRS call status received (xds_channel=" << xds_channel() - << ", lrs_call=" << this << ", streaming_call=" << streaming_call_.get() - << "): " << status; - // Ignore status from a stale call. - if (IsCurrentCallOnChannel()) { - // Try to restart the call. - retryable_call_->OnCallFinishedLocked(); - } -} - -bool XdsClient::XdsChannel::LrsCall::IsCurrentCallOnChannel() const { - // If the retryable LRS call is null (which only happens when the xds - // channel is shutting down), all the LRS calls are stale. - if (xds_channel()->lrs_call_ == nullptr) return false; - return this == xds_channel()->lrs_call_->call(); -} - // // XdsClient // @@ -1517,8 +1202,8 @@ bool XdsClient::XdsChannel::LrsCall::IsCurrentCallOnChannel() const { constexpr absl::string_view XdsClient::kOldStyleAuthority; XdsClient::XdsClient( - std::unique_ptr bootstrap, - OrphanablePtr transport_factory, + std::shared_ptr bootstrap, + RefCountedPtr transport_factory, std::shared_ptr engine, std::unique_ptr metrics_reporter, std::string user_agent_name, std::string user_agent_version, @@ -1557,13 +1242,6 @@ void XdsClient::Orphaned() { // Clear cache and any remaining watchers that may not have been cancelled. authority_state_map_.clear(); invalid_watchers_.clear(); - // We may still be sending lingering queued load report data, so don't - // just clear the load reporting map, but we do want to clear the refs - // we're holding to the XdsChannel objects, to make sure that - // everything shuts down properly. - for (auto& p : xds_load_report_server_map_) { - p.second.xds_channel.reset(DEBUG_LOCATION, "XdsClient::Orphan()"); - } } RefCountedPtr XdsClient::GetOrCreateXdsChannelLocked( @@ -1837,140 +1515,6 @@ std::string XdsClient::ConstructFullXdsResourceName( return key.id; } -RefCountedPtr XdsClient::AddClusterDropStats( - const XdsBootstrap::XdsServer& xds_server, absl::string_view cluster_name, - absl::string_view eds_service_name) { - auto key = - std::make_pair(std::string(cluster_name), std::string(eds_service_name)); - RefCountedPtr cluster_drop_stats; - { - MutexLock lock(&mu_); - // We jump through some hoops here to make sure that the - // absl::string_views stored in the XdsClusterDropStats object point - // to the strings in the xds_load_report_server_map_ keys, so that - // they have the same lifetime. - auto server_it = xds_load_report_server_map_ - .emplace(xds_server.Key(), LoadReportServer()) - .first; - if (server_it->second.xds_channel == nullptr) { - server_it->second.xds_channel = GetOrCreateXdsChannelLocked( - xds_server, "load report map (drop stats)"); - } - auto load_report_it = server_it->second.load_report_map - .emplace(std::move(key), LoadReportState()) - .first; - LoadReportState& load_report_state = load_report_it->second; - if (load_report_state.drop_stats != nullptr) { - cluster_drop_stats = load_report_state.drop_stats->RefIfNonZero(); - } - if (cluster_drop_stats == nullptr) { - if (load_report_state.drop_stats != nullptr) { - load_report_state.deleted_drop_stats += - load_report_state.drop_stats->GetSnapshotAndReset(); - } - cluster_drop_stats = MakeRefCounted( - Ref(DEBUG_LOCATION, "DropStats"), server_it->first /*xds_server*/, - load_report_it->first.first /*cluster_name*/, - load_report_it->first.second /*eds_service_name*/); - load_report_state.drop_stats = cluster_drop_stats.get(); - } - server_it->second.xds_channel->MaybeStartLrsCall(); - } - work_serializer_.DrainQueue(); - return cluster_drop_stats; -} - -void XdsClient::RemoveClusterDropStats( - absl::string_view xds_server_key, absl::string_view cluster_name, - absl::string_view eds_service_name, - XdsClusterDropStats* cluster_drop_stats) { - MutexLock lock(&mu_); - auto server_it = xds_load_report_server_map_.find(xds_server_key); - if (server_it == xds_load_report_server_map_.end()) return; - auto load_report_it = server_it->second.load_report_map.find( - std::make_pair(std::string(cluster_name), std::string(eds_service_name))); - if (load_report_it == server_it->second.load_report_map.end()) return; - LoadReportState& load_report_state = load_report_it->second; - if (load_report_state.drop_stats == cluster_drop_stats) { - // Record final snapshot in deleted_drop_stats, which will be - // added to the next load report. - load_report_state.deleted_drop_stats += - load_report_state.drop_stats->GetSnapshotAndReset(); - load_report_state.drop_stats = nullptr; - } -} - -RefCountedPtr XdsClient::AddClusterLocalityStats( - const XdsBootstrap::XdsServer& xds_server, absl::string_view cluster_name, - absl::string_view eds_service_name, - RefCountedPtr locality) { - auto key = - std::make_pair(std::string(cluster_name), std::string(eds_service_name)); - RefCountedPtr cluster_locality_stats; - { - MutexLock lock(&mu_); - // We jump through some hoops here to make sure that the - // absl::string_views stored in the XdsClusterDropStats object point - // to the strings in the xds_load_report_server_map_ keys, so that - // they have the same lifetime. - auto server_it = xds_load_report_server_map_ - .emplace(xds_server.Key(), LoadReportServer()) - .first; - if (server_it->second.xds_channel == nullptr) { - server_it->second.xds_channel = GetOrCreateXdsChannelLocked( - xds_server, "load report map (locality stats)"); - } - auto load_report_it = server_it->second.load_report_map - .emplace(std::move(key), LoadReportState()) - .first; - LoadReportState& load_report_state = load_report_it->second; - LoadReportState::LocalityState& locality_state = - load_report_state.locality_stats[locality]; - if (locality_state.locality_stats != nullptr) { - cluster_locality_stats = locality_state.locality_stats->RefIfNonZero(); - } - if (cluster_locality_stats == nullptr) { - if (locality_state.locality_stats != nullptr) { - locality_state.deleted_locality_stats += - locality_state.locality_stats->GetSnapshotAndReset(); - } - cluster_locality_stats = MakeRefCounted( - Ref(DEBUG_LOCATION, "LocalityStats"), server_it->first /*xds_server*/, - load_report_it->first.first /*cluster_name*/, - load_report_it->first.second /*eds_service_name*/, - std::move(locality)); - locality_state.locality_stats = cluster_locality_stats.get(); - } - server_it->second.xds_channel->MaybeStartLrsCall(); - } - work_serializer_.DrainQueue(); - return cluster_locality_stats; -} - -void XdsClient::RemoveClusterLocalityStats( - absl::string_view xds_server_key, absl::string_view cluster_name, - absl::string_view eds_service_name, - const RefCountedPtr& locality, - XdsClusterLocalityStats* cluster_locality_stats) { - MutexLock lock(&mu_); - auto server_it = xds_load_report_server_map_.find(xds_server_key); - if (server_it == xds_load_report_server_map_.end()) return; - auto load_report_it = server_it->second.load_report_map.find( - std::make_pair(std::string(cluster_name), std::string(eds_service_name))); - if (load_report_it == server_it->second.load_report_map.end()) return; - LoadReportState& load_report_state = load_report_it->second; - auto locality_it = load_report_state.locality_stats.find(locality); - if (locality_it == load_report_state.locality_stats.end()) return; - LoadReportState::LocalityState& locality_state = locality_it->second; - if (locality_state.locality_stats == cluster_locality_stats) { - // Record final snapshot in deleted_locality_stats, which will be - // added to the next load report. - locality_state.deleted_locality_stats += - locality_state.locality_stats->GetSnapshotAndReset(); - locality_state.locality_stats = nullptr; - } -} - void XdsClient::ResetBackoff() { MutexLock lock(&mu_); for (auto& p : xds_channel_map_) { @@ -2013,86 +1557,6 @@ void XdsClient::NotifyWatchersOnResourceDoesNotExist( DEBUG_LOCATION); } -XdsApi::ClusterLoadReportMap XdsClient::BuildLoadReportSnapshotLocked( - const XdsBootstrap::XdsServer& xds_server, bool send_all_clusters, - const std::set& clusters) { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << this << "] start building load report"; - XdsApi::ClusterLoadReportMap snapshot_map; - auto server_it = xds_load_report_server_map_.find(xds_server.Key()); - if (server_it == xds_load_report_server_map_.end()) return snapshot_map; - auto& load_report_map = server_it->second.load_report_map; - for (auto load_report_it = load_report_map.begin(); - load_report_it != load_report_map.end();) { - // Cluster key is cluster and EDS service name. - const auto& cluster_key = load_report_it->first; - LoadReportState& load_report = load_report_it->second; - // If the CDS response for a cluster indicates to use LRS but the - // LRS server does not say that it wants reports for this cluster, - // then we'll have stats objects here whose data we're not going to - // include in the load report. However, we still need to clear out - // the data from the stats objects, so that if the LRS server starts - // asking for the data in the future, we don't incorrectly include - // data from previous reporting intervals in that future report. - const bool record_stats = - send_all_clusters || clusters.find(cluster_key.first) != clusters.end(); - XdsApi::ClusterLoadReport snapshot; - // Aggregate drop stats. - snapshot.dropped_requests = std::move(load_report.deleted_drop_stats); - if (load_report.drop_stats != nullptr) { - snapshot.dropped_requests += - load_report.drop_stats->GetSnapshotAndReset(); - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << this << "] cluster=" << cluster_key.first - << " eds_service_name=" << cluster_key.second - << " drop_stats=" << load_report.drop_stats; - } - // Aggregate locality stats. - for (auto it = load_report.locality_stats.begin(); - it != load_report.locality_stats.end();) { - const RefCountedPtr& locality_name = it->first; - auto& locality_state = it->second; - XdsClusterLocalityStats::Snapshot& locality_snapshot = - snapshot.locality_stats[locality_name]; - locality_snapshot = std::move(locality_state.deleted_locality_stats); - if (locality_state.locality_stats != nullptr) { - locality_snapshot += - locality_state.locality_stats->GetSnapshotAndReset(); - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << this - << "] cluster=" << cluster_key.first.c_str() - << " eds_service_name=" << cluster_key.second.c_str() - << " locality=" << locality_name->human_readable_string().c_str() - << " locality_stats=" << locality_state.locality_stats; - } - // If the only thing left in this entry was final snapshots from - // deleted locality stats objects, remove the entry. - if (locality_state.locality_stats == nullptr) { - it = load_report.locality_stats.erase(it); - } else { - ++it; - } - } - // Compute load report interval. - const Timestamp now = Timestamp::Now(); - snapshot.load_report_interval = now - load_report.last_report_time; - load_report.last_report_time = now; - // Record snapshot. - if (record_stats) { - snapshot_map[cluster_key] = std::move(snapshot); - } - // If the only thing left in this entry was final snapshots from - // deleted stats objects, remove the entry. - if (load_report.locality_stats.empty() && - load_report.drop_stats == nullptr) { - load_report_it = load_report_map.erase(load_report_it); - } else { - ++load_report_it; - } - } - return snapshot_map; -} - namespace { google_protobuf_Timestamp* EncodeTimestamp(Timestamp value, upb_Arena* arena) { diff --git a/src/core/xds/xds_client/xds_client.h b/src/core/xds/xds_client/xds_client.h index 0535984afc270..b5d4faa0b90ba 100644 --- a/src/core/xds/xds_client/xds_client.h +++ b/src/core/xds/xds_client/xds_client.h @@ -34,17 +34,17 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "src/core/xds/xds_client/xds_api.h" #include "src/core/xds/xds_client/xds_bootstrap.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/xds/xds_client/xds_locality.h" #include "src/core/xds/xds_client/xds_metrics.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/core/xds/xds_client/xds_transport.h" @@ -84,22 +84,14 @@ class XdsClient : public DualRefCounted { }; XdsClient( - std::unique_ptr bootstrap, - OrphanablePtr transport_factory, + std::shared_ptr bootstrap, + RefCountedPtr transport_factory, std::shared_ptr engine, std::unique_ptr metrics_reporter, std::string user_agent_name, std::string user_agent_version, Duration resource_request_timeout = Duration::Seconds(15)); ~XdsClient() override; - const XdsBootstrap& bootstrap() const { - return *bootstrap_; // ctor asserts that it is non-null - } - - XdsTransportFactory* transport_factory() const { - return transport_factory_.get(); - } - // Start and cancel watch for a resource. // // The XdsClient takes ownership of the watcher, but the caller may @@ -126,29 +118,16 @@ class XdsClient : public DualRefCounted { ResourceWatcherInterface* watcher, bool delay_unsubscription = false); - // Adds and removes drop stats for cluster_name and eds_service_name. - RefCountedPtr AddClusterDropStats( - const XdsBootstrap::XdsServer& xds_server, absl::string_view cluster_name, - absl::string_view eds_service_name); - void RemoveClusterDropStats(absl::string_view xds_server, - absl::string_view cluster_name, - absl::string_view eds_service_name, - XdsClusterDropStats* cluster_drop_stats); - - // Adds and removes locality stats for cluster_name and eds_service_name - // for the specified locality. - RefCountedPtr AddClusterLocalityStats( - const XdsBootstrap::XdsServer& xds_server, absl::string_view cluster_name, - absl::string_view eds_service_name, - RefCountedPtr locality); - void RemoveClusterLocalityStats( - absl::string_view xds_server, absl::string_view cluster_name, - absl::string_view eds_service_name, - const RefCountedPtr& locality, - XdsClusterLocalityStats* cluster_locality_stats); - // Resets connection backoff state. - void ResetBackoff(); + virtual void ResetBackoff(); + + const XdsBootstrap& bootstrap() const { + return *bootstrap_; // ctor asserts that it is non-null + } + + XdsTransportFactory* transport_factory() const { + return transport_factory_.get(); + } grpc_event_engine::experimental::EventEngine* engine() { return engine_.get(); @@ -212,7 +191,6 @@ class XdsClient : public DualRefCounted { class RetryableCall; class AdsCall; - class LrsCall; XdsChannel(WeakRefCountedPtr xds_client, const XdsBootstrap::XdsServer& server); @@ -220,13 +198,9 @@ class XdsClient : public DualRefCounted { XdsClient* xds_client() const { return xds_client_.get(); } AdsCall* ads_call() const; - LrsCall* lrs_call() const; void ResetBackoff(); - void MaybeStartLrsCall(); - void StopLrsCallLocked() ABSL_EXCLUSIVE_LOCKS_REQUIRED(&XdsClient::mu_); - // Returns non-OK if there has been an error since the last time the // ADS stream saw a response. const absl::Status& status() const { return status_; } @@ -242,6 +216,8 @@ class XdsClient : public DualRefCounted { absl::string_view server_uri() const { return server_.server_uri(); } private: + class ConnectivityFailureWatcher; + // 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, @@ -262,13 +238,14 @@ class XdsClient : public DualRefCounted { const XdsBootstrap::XdsServer& server_; // Owned by bootstrap. - OrphanablePtr transport_; + RefCountedPtr transport_; + RefCountedPtr + failure_watcher_; bool shutting_down_ = false; // The retryable ADS and LRS calls. OrphanablePtr> ads_call_; - OrphanablePtr> lrs_call_; // Stores the most recent accepted resource version for each resource type. std::map @@ -292,30 +269,6 @@ class XdsClient : public DualRefCounted { resource_map; }; - struct LoadReportState { - struct LocalityState { - XdsClusterLocalityStats* locality_stats = nullptr; - XdsClusterLocalityStats::Snapshot deleted_locality_stats; - }; - - XdsClusterDropStats* drop_stats = nullptr; - XdsClusterDropStats::Snapshot deleted_drop_stats; - std::map, LocalityState, - XdsLocalityName::Less> - locality_stats; - Timestamp last_report_time = Timestamp::Now(); - }; - - // Load report data. - using LoadReportMap = std::map< - std::pair, - LoadReportState>; - - struct LoadReportServer { - RefCountedPtr xds_channel; - LoadReportMap load_report_map; - }; - // Sends an error notification to a specific set of watchers. void NotifyWatchersOnErrorLocked( const std::map { const XdsResourceType* GetResourceTypeLocked(absl::string_view resource_type) ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_); + bool HasUncachedResources(const AuthorityState& authority_state); + absl::StatusOr ParseXdsResourceName( absl::string_view name, const XdsResourceType* type); static std::string ConstructFullXdsResourceName( absl::string_view authority, absl::string_view resource_type, const XdsResourceKey& key); - 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_; + std::shared_ptr bootstrap_; + RefCountedPtr transport_factory_; const Duration request_timeout_; const bool xds_federation_enabled_; XdsApi api_; @@ -371,9 +322,6 @@ class XdsClient : public DualRefCounted { std::map authority_state_map_ ABSL_GUARDED_BY(mu_); - std::map> - xds_load_report_server_map_ ABSL_GUARDED_BY(mu_); - // Stores started watchers whose resource name was not parsed successfully, // waiting to be cancelled or reset in Orphan(). std::map> diff --git a/src/core/xds/xds_client/xds_client_stats.cc b/src/core/xds/xds_client/xds_client_stats.cc deleted file mode 100644 index 3219b224a9e0d..0000000000000 --- a/src/core/xds/xds_client/xds_client_stats.cc +++ /dev/null @@ -1,164 +0,0 @@ -// -// -// Copyright 2018 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// - -#include "src/core/xds/xds_client/xds_client_stats.h" - -#include "absl/log/log.h" - -#include - -#include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/xds/xds_client/xds_client.h" - -namespace grpc_core { - -namespace { - -uint64_t GetAndResetCounter(std::atomic* from) { - return from->exchange(0, std::memory_order_relaxed); -} - -} // namespace - -// -// XdsClusterDropStats -// - -XdsClusterDropStats::XdsClusterDropStats(RefCountedPtr xds_client, - absl::string_view lrs_server, - absl::string_view cluster_name, - absl::string_view eds_service_name) - : RefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) - ? "XdsClusterDropStats" - : nullptr), - xds_client_(std::move(xds_client)), - lrs_server_(lrs_server), - cluster_name_(cluster_name), - eds_service_name_(eds_service_name) { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client_.get() << "] created drop stats " << this - << " for {" << lrs_server_ << ", " << cluster_name_ << ", " - << eds_service_name_ << "}"; -} - -XdsClusterDropStats::~XdsClusterDropStats() { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client_.get() << "] destroying drop stats " - << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " - << eds_service_name_ << "}"; - xds_client_->RemoveClusterDropStats(lrs_server_, cluster_name_, - eds_service_name_, this); - xds_client_.reset(DEBUG_LOCATION, "DropStats"); -} - -XdsClusterDropStats::Snapshot XdsClusterDropStats::GetSnapshotAndReset() { - Snapshot snapshot; - snapshot.uncategorized_drops = GetAndResetCounter(&uncategorized_drops_); - MutexLock lock(&mu_); - snapshot.categorized_drops = std::move(categorized_drops_); - return snapshot; -} - -void XdsClusterDropStats::AddUncategorizedDrops() { - uncategorized_drops_.fetch_add(1); -} - -void XdsClusterDropStats::AddCallDropped(const std::string& category) { - MutexLock lock(&mu_); - ++categorized_drops_[category]; -} - -// -// XdsClusterLocalityStats -// - -XdsClusterLocalityStats::XdsClusterLocalityStats( - RefCountedPtr xds_client, absl::string_view lrs_server, - absl::string_view cluster_name, absl::string_view eds_service_name, - RefCountedPtr name) - : RefCounted(GRPC_TRACE_FLAG_ENABLED(xds_client_refcount) - ? "XdsClusterLocalityStats" - : nullptr), - xds_client_(std::move(xds_client)), - lrs_server_(lrs_server), - cluster_name_(cluster_name), - eds_service_name_(eds_service_name), - name_(std::move(name)) { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client_.get() << "] created locality stats " - << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " - << eds_service_name_ << ", " - << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) - << "}"; -} - -XdsClusterLocalityStats::~XdsClusterLocalityStats() { - GRPC_TRACE_LOG(xds_client, INFO) - << "[xds_client " << xds_client_.get() << "] destroying locality stats " - << this << " for {" << lrs_server_ << ", " << cluster_name_ << ", " - << eds_service_name_ << ", " - << (name_ == nullptr ? "" : name_->human_readable_string().c_str()) - << "}"; - xds_client_->RemoveClusterLocalityStats(lrs_server_, cluster_name_, - eds_service_name_, name_, this); - xds_client_.reset(DEBUG_LOCATION, "LocalityStats"); -} - -XdsClusterLocalityStats::Snapshot -XdsClusterLocalityStats::GetSnapshotAndReset() { - Snapshot snapshot; - for (auto& percpu_stats : stats_) { - Snapshot percpu_snapshot = { - GetAndResetCounter(&percpu_stats.total_successful_requests), - // Don't reset total_requests_in_progress because it's - // not related to a single reporting interval. - percpu_stats.total_requests_in_progress.load(std::memory_order_relaxed), - GetAndResetCounter(&percpu_stats.total_error_requests), - GetAndResetCounter(&percpu_stats.total_issued_requests), - {}}; - { - MutexLock lock(&percpu_stats.backend_metrics_mu); - percpu_snapshot.backend_metrics = std::move(percpu_stats.backend_metrics); - } - snapshot += percpu_snapshot; - } - return snapshot; -} - -void XdsClusterLocalityStats::AddCallStarted() { - Stats& stats = stats_.this_cpu(); - stats.total_issued_requests.fetch_add(1, std::memory_order_relaxed); - stats.total_requests_in_progress.fetch_add(1, std::memory_order_relaxed); -} - -void XdsClusterLocalityStats::AddCallFinished( - const std::map* named_metrics, bool fail) { - Stats& stats = stats_.this_cpu(); - std::atomic& to_increment = - fail ? stats.total_error_requests : stats.total_successful_requests; - to_increment.fetch_add(1, std::memory_order_relaxed); - stats.total_requests_in_progress.fetch_add(-1, std::memory_order_acq_rel); - if (named_metrics == nullptr) return; - MutexLock lock(&stats.backend_metrics_mu); - for (const auto& m : *named_metrics) { - stats.backend_metrics[std::string(m.first)] += BackendMetric{1, m.second}; - } -} - -} // namespace grpc_core diff --git a/src/core/xds/xds_client/xds_client_stats.h b/src/core/xds/xds_client/xds_client_stats.h deleted file mode 100644 index 291a9e257182f..0000000000000 --- a/src/core/xds/xds_client/xds_client_stats.h +++ /dev/null @@ -1,258 +0,0 @@ -// -// -// Copyright 2018 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// - -#ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_CLIENT_STATS_H -#define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_CLIENT_STATS_H - -#include -#include -#include -#include -#include - -#include "absl/base/thread_annotations.h" -#include "absl/strings/str_format.h" -#include "absl/strings/string_view.h" - -#include - -#include "src/core/lib/gprpp/per_cpu.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/resolver/endpoint_addresses.h" -#include "src/core/telemetry/call_tracer.h" -#include "src/core/util/useful.h" -#include "src/core/xds/xds_client/xds_bootstrap.h" - -namespace grpc_core { - -// Forward declaration to avoid circular dependency. -class XdsClient; - -// Locality name. -class XdsLocalityName final : public RefCounted { - public: - struct Less { - bool operator()(const XdsLocalityName* lhs, - const XdsLocalityName* rhs) const { - if (lhs == nullptr || rhs == nullptr) return QsortCompare(lhs, rhs); - return lhs->Compare(*rhs) < 0; - } - - bool operator()(const RefCountedPtr& lhs, - const RefCountedPtr& rhs) const { - return (*this)(lhs.get(), rhs.get()); - } - }; - - XdsLocalityName(std::string region, std::string zone, std::string sub_zone) - : region_(std::move(region)), - zone_(std::move(zone)), - sub_zone_(std::move(sub_zone)), - human_readable_string_( - absl::StrFormat("{region=\"%s\", zone=\"%s\", sub_zone=\"%s\"}", - region_, zone_, sub_zone_)) {} - - bool operator==(const XdsLocalityName& other) const { - return region_ == other.region_ && zone_ == other.zone_ && - sub_zone_ == other.sub_zone_; - } - - bool operator!=(const XdsLocalityName& other) const { - return !(*this == other); - } - - int Compare(const XdsLocalityName& other) const { - int cmp_result = region_.compare(other.region_); - if (cmp_result != 0) return cmp_result; - cmp_result = zone_.compare(other.zone_); - if (cmp_result != 0) return cmp_result; - return sub_zone_.compare(other.sub_zone_); - } - - const std::string& region() const { return region_; } - const std::string& zone() const { return zone_; } - const std::string& sub_zone() const { return sub_zone_; } - - const RefCountedStringValue& human_readable_string() const { - return human_readable_string_; - } - - // Channel args traits. - static absl::string_view ChannelArgName() { - return GRPC_ARG_NO_SUBCHANNEL_PREFIX "xds_locality_name"; - } - static int ChannelArgsCompare(const XdsLocalityName* a, - const XdsLocalityName* b) { - return a->Compare(*b); - } - - private: - std::string region_; - std::string zone_; - std::string sub_zone_; - RefCountedStringValue human_readable_string_; -}; - -// Drop stats for an xds cluster. -class XdsClusterDropStats final : public RefCounted { - public: - // The total number of requests dropped for any reason is the sum of - // uncategorized_drops, and dropped_requests map. - using CategorizedDropsMap = std::map; - struct Snapshot { - uint64_t uncategorized_drops = 0; - // The number of requests dropped for the specific drop categories - // outlined in the drop_overloads field in the EDS response. - CategorizedDropsMap categorized_drops; - - Snapshot& operator+=(const Snapshot& other) { - uncategorized_drops += other.uncategorized_drops; - for (const auto& p : other.categorized_drops) { - categorized_drops[p.first] += p.second; - } - return *this; - } - - bool IsZero() const { - if (uncategorized_drops != 0) return false; - for (const auto& p : categorized_drops) { - if (p.second != 0) return false; - } - return true; - } - }; - - XdsClusterDropStats(RefCountedPtr xds_client, - absl::string_view lrs_server, - absl::string_view cluster_name, - absl::string_view eds_service_name); - ~XdsClusterDropStats() override; - - // Returns a snapshot of this instance and resets all the counters. - Snapshot GetSnapshotAndReset(); - - void AddUncategorizedDrops(); - void AddCallDropped(const std::string& category); - - private: - RefCountedPtr xds_client_; - absl::string_view lrs_server_; - absl::string_view cluster_name_; - absl::string_view eds_service_name_; - std::atomic uncategorized_drops_{0}; - // Protects categorized_drops_. A mutex is necessary because the length of - // dropped_requests can be accessed by both the picker (from data plane - // mutex) and the load reporting thread (from the control plane combiner). - Mutex mu_; - CategorizedDropsMap categorized_drops_ ABSL_GUARDED_BY(mu_); -}; - -// Locality stats for an xds cluster. -class XdsClusterLocalityStats final - : public RefCounted { - public: - struct BackendMetric { - uint64_t num_requests_finished_with_metric = 0; - double total_metric_value = 0; - - BackendMetric& operator+=(const BackendMetric& other) { - num_requests_finished_with_metric += - other.num_requests_finished_with_metric; - total_metric_value += other.total_metric_value; - return *this; - } - - bool IsZero() const { - return num_requests_finished_with_metric == 0 && total_metric_value == 0; - } - }; - - struct Snapshot { - uint64_t total_successful_requests = 0; - uint64_t total_requests_in_progress = 0; - uint64_t total_error_requests = 0; - uint64_t total_issued_requests = 0; - std::map backend_metrics; - - Snapshot& operator+=(const Snapshot& other) { - total_successful_requests += other.total_successful_requests; - total_requests_in_progress += other.total_requests_in_progress; - total_error_requests += other.total_error_requests; - total_issued_requests += other.total_issued_requests; - for (const auto& p : other.backend_metrics) { - backend_metrics[p.first] += p.second; - } - return *this; - } - - bool IsZero() const { - if (total_successful_requests != 0 || total_requests_in_progress != 0 || - total_error_requests != 0 || total_issued_requests != 0) { - return false; - } - for (const auto& p : backend_metrics) { - if (!p.second.IsZero()) return false; - } - return true; - } - }; - - XdsClusterLocalityStats(RefCountedPtr xds_client, - absl::string_view lrs_server, - absl::string_view cluster_name, - absl::string_view eds_service_name, - RefCountedPtr name); - ~XdsClusterLocalityStats() override; - - // Returns a snapshot of this instance and resets all the counters. - Snapshot GetSnapshotAndReset(); - - void AddCallStarted(); - void AddCallFinished(const std::map* named_metrics, - bool fail = false); - - XdsLocalityName* locality_name() const { return name_.get(); } - - private: - struct Stats { - std::atomic total_successful_requests{0}; - std::atomic total_requests_in_progress{0}; - std::atomic total_error_requests{0}; - std::atomic total_issued_requests{0}; - - // Protects backend_metrics. A mutex is necessary because the length of - // backend_metrics_ can be accessed by both the callback intercepting the - // call's recv_trailing_metadata and the load reporting thread. - Mutex backend_metrics_mu; - std::map backend_metrics - ABSL_GUARDED_BY(backend_metrics_mu); - }; - - RefCountedPtr xds_client_; - absl::string_view lrs_server_; - absl::string_view cluster_name_; - absl::string_view eds_service_name_; - RefCountedPtr name_; - PerCpu stats_{PerCpuOptions().SetMaxShards(32).SetCpusPerShard(4)}; -}; - -} // namespace grpc_core - -#endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_CLIENT_STATS_H diff --git a/src/core/xds/xds_client/xds_locality.h b/src/core/xds/xds_client/xds_locality.h new file mode 100644 index 0000000000000..3223ff48c3404 --- /dev/null +++ b/src/core/xds/xds_client/xds_locality.h @@ -0,0 +1,103 @@ +// +// +// Copyright 2018 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +#ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_LOCALITY_H +#define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_LOCALITY_H + +#include +#include + +#include "absl/strings/str_format.h" +#include "absl/strings/string_view.h" + +#include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/ref_counted_string.h" +#include "src/core/util/useful.h" + +namespace grpc_core { + +// An xDS locality name. +class XdsLocalityName final : public RefCounted { + public: + struct Less { + bool operator()(const XdsLocalityName* lhs, + const XdsLocalityName* rhs) const { + if (lhs == nullptr || rhs == nullptr) return QsortCompare(lhs, rhs); + return lhs->Compare(*rhs) < 0; + } + + bool operator()(const RefCountedPtr& lhs, + const RefCountedPtr& rhs) const { + return (*this)(lhs.get(), rhs.get()); + } + }; + + XdsLocalityName(std::string region, std::string zone, std::string sub_zone) + : region_(std::move(region)), + zone_(std::move(zone)), + sub_zone_(std::move(sub_zone)), + human_readable_string_( + absl::StrFormat("{region=\"%s\", zone=\"%s\", sub_zone=\"%s\"}", + region_, zone_, sub_zone_)) {} + + bool operator==(const XdsLocalityName& other) const { + return region_ == other.region_ && zone_ == other.zone_ && + sub_zone_ == other.sub_zone_; + } + + bool operator!=(const XdsLocalityName& other) const { + return !(*this == other); + } + + int Compare(const XdsLocalityName& other) const { + int cmp_result = region_.compare(other.region_); + if (cmp_result != 0) return cmp_result; + cmp_result = zone_.compare(other.zone_); + if (cmp_result != 0) return cmp_result; + return sub_zone_.compare(other.sub_zone_); + } + + const std::string& region() const { return region_; } + const std::string& zone() const { return zone_; } + const std::string& sub_zone() const { return sub_zone_; } + + const RefCountedStringValue& human_readable_string() const { + return human_readable_string_; + } + + // Channel args traits. + static absl::string_view ChannelArgName() { + return GRPC_ARG_NO_SUBCHANNEL_PREFIX "xds_locality_name"; + } + static int ChannelArgsCompare(const XdsLocalityName* a, + const XdsLocalityName* b) { + return a->Compare(*b); + } + + private: + std::string region_; + std::string zone_; + std::string sub_zone_; + RefCountedStringValue human_readable_string_; +}; + +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_LOCALITY_H diff --git a/src/core/xds/xds_client/xds_resource_type_impl.h b/src/core/xds/xds_client/xds_resource_type_impl.h index dd47ccb0b0943..a927f796b5e0f 100644 --- a/src/core/xds/xds_client/xds_resource_type_impl.h +++ b/src/core/xds/xds_client/xds_resource_type_impl.h @@ -23,7 +23,7 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/xds_client/xds_client.h" #include "src/core/xds/xds_client/xds_resource_type.h" diff --git a/src/core/xds/xds_client/xds_transport.h b/src/core/xds/xds_client/xds_transport.h index 43b19d63035e8..b471b31477c8f 100644 --- a/src/core/xds/xds_client/xds_transport.h +++ b/src/core/xds/xds_client/xds_transport.h @@ -17,25 +17,23 @@ #ifndef GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_TRANSPORT_H #define GRPC_SRC_CORE_XDS_XDS_CLIENT_XDS_TRANSPORT_H -#include #include #include #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include - -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/orphanable.h" #include "src/core/xds/xds_client/xds_bootstrap.h" namespace grpc_core { // A factory for creating new XdsTransport instances. -class XdsTransportFactory : public InternallyRefCounted { +class XdsTransportFactory : public DualRefCounted { public: // Represents a transport for xDS communication (e.g., a gRPC channel). - class XdsTransport : public InternallyRefCounted { + class XdsTransport : public DualRefCounted { public: // Represents a bidi streaming RPC call. class StreamingCall : public InternallyRefCounted { @@ -63,6 +61,25 @@ class XdsTransportFactory : public InternallyRefCounted { virtual void StartRecvMessage() = 0; }; + // A watcher for connectivity failures. + class ConnectivityFailureWatcher + : public RefCounted { + public: + // Will be invoked whenever there is a connectivity failure on the + // transport. + virtual void OnConnectivityFailure(absl::Status status) = 0; + }; + + explicit XdsTransport(const char* trace = nullptr) + : DualRefCounted(trace) {} + + // Starts a connectivity failure watcher on the transport. + virtual void StartConnectivityFailureWatch( + RefCountedPtr watcher) = 0; + // Stops a connectivity failure watcher on the transport. + virtual void StopConnectivityFailureWatch( + const RefCountedPtr& watcher) = 0; + // Create a streaming call on this transport for the specified method. // Events on the stream will be reported to event_handler. virtual OrphanablePtr CreateStreamingCall( @@ -73,15 +90,14 @@ class XdsTransportFactory : public InternallyRefCounted { virtual void ResetBackoff() = 0; }; - // Creates a new transport for the specified server. - // The on_connectivity_failure callback will be invoked whenever there is - // a connectivity failure on the transport. + // Returns a transport for the specified server. If there is already + // a transport for the server, returns a new ref to that transport; + // otherwise, creates a new transport. + // // *status will be set if there is an error creating the channel, // although the returned channel must still accept calls (which may fail). - virtual OrphanablePtr Create( - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status) = 0; + virtual RefCountedPtr GetTransport( + const XdsBootstrap::XdsServer& server, absl::Status* status) = 0; }; } // namespace grpc_core diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 78c0bd16002d2..ac480c87153c4 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -41,7 +41,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { diff --git a/src/cpp/client/client_interceptor.cc b/src/cpp/client/client_interceptor.cc index dfa30d6fe4165..9c1a3f27b7ad2 100644 --- a/src/cpp/client/client_interceptor.cc +++ b/src/cpp/client/client_interceptor.cc @@ -18,7 +18,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { diff --git a/src/cpp/client/client_stats_interceptor.cc b/src/cpp/client/client_stats_interceptor.cc index 84c017ddbcfbb..ea2828fc9db43 100644 --- a/src/cpp/client/client_stats_interceptor.cc +++ b/src/cpp/client/client_stats_interceptor.cc @@ -18,7 +18,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { namespace internal { diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index b41f307daba28..5c1804fbc66b3 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -47,11 +47,11 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/security/util/json_util.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" #include "src/cpp/common/secure_auth_context.h" #include "src/cpp/server/thread_pool_interface.h" diff --git a/src/cpp/common/alarm.cc b/src/cpp/common/alarm.cc index 041584eb489ad..770b07085e3c4 100644 --- a/src/cpp/common/alarm.cc +++ b/src/cpp/common/alarm.cc @@ -33,10 +33,10 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/time.h" namespace grpc { diff --git a/src/cpp/common/completion_queue_cc.cc b/src/cpp/common/completion_queue_cc.cc index b2c3463c05383..88396bfbbc6e7 100644 --- a/src/cpp/common/completion_queue_cc.cc +++ b/src/cpp/common/completion_queue_cc.cc @@ -29,8 +29,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" namespace grpc { diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index dabe8ed9c814e..8da3e971c220d 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -26,8 +26,8 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc { diff --git a/src/cpp/common/secure_create_auth_context.cc b/src/cpp/common/secure_create_auth_context.cc index 4658321520f3c..8492655b4aae2 100644 --- a/src/cpp/common/secure_create_auth_context.cc +++ b/src/cpp/common/secure_create_auth_context.cc @@ -21,8 +21,8 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/cpp/common/secure_auth_context.h" namespace grpc { diff --git a/src/cpp/common/tls_certificate_provider.cc b/src/cpp/common/tls_certificate_provider.cc index 7d841b38fd562..88c684b3a45e8 100644 --- a/src/cpp/common/tls_certificate_provider.cc +++ b/src/cpp/common/tls_certificate_provider.cc @@ -23,6 +23,8 @@ #include #include +#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" + namespace grpc { namespace experimental { @@ -44,6 +46,13 @@ StaticDataCertificateProvider::~StaticDataCertificateProvider() { grpc_tls_certificate_provider_release(c_provider_); }; +absl::Status StaticDataCertificateProvider::ValidateCredentials() const { + auto* provider = + grpc_core::DownCast( + c_provider_); + return provider->ValidateCredentials(); +} + FileWatcherCertificateProvider::FileWatcherCertificateProvider( const std::string& private_key_path, const std::string& identity_certificate_path, @@ -58,5 +67,12 @@ FileWatcherCertificateProvider::~FileWatcherCertificateProvider() { grpc_tls_certificate_provider_release(c_provider_); }; +absl::Status FileWatcherCertificateProvider::ValidateCredentials() const { + auto* provider = + grpc_core::DownCast( + c_provider_); + return provider->ValidateCredentials(); +} + } // namespace experimental } // namespace grpc diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc index bdd92f60e1a19..f8f662d87b315 100644 --- a/src/cpp/common/validate_service_config.cc +++ b/src/cpp/common/validate_service_config.cc @@ -25,9 +25,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc { namespace experimental { diff --git a/src/cpp/ext/csm/BUILD b/src/cpp/ext/csm/BUILD index 6ee6bef1d4a2c..cfa4dd822cb79 100644 --- a/src/cpp/ext/csm/BUILD +++ b/src/cpp/ext/csm/BUILD @@ -62,7 +62,7 @@ grpc_cc_library( "//:gpr_platform", "//:grpc_base", "//:protobuf_struct_upb", - "//:uri_parser", + "//:uri", "//src/core:channel_args", "//src/core:env", "//src/core:error", diff --git a/src/cpp/ext/csm/csm_observability.cc b/src/cpp/ext/csm/csm_observability.cc index c924db3fbdc7e..a5f61794660f9 100644 --- a/src/cpp/ext/csm/csm_observability.cc +++ b/src/cpp/ext/csm/csm_observability.cc @@ -35,7 +35,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" #include "src/core/xds/grpc/xds_enabled_server.h" #include "src/cpp/ext/csm/metadata_exchange.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/src/cpp/ext/csm/metadata_exchange.cc b/src/cpp/ext/csm/metadata_exchange.cc index 21abe5029eb5b..bd922460fb973 100644 --- a/src/cpp/ext/csm/metadata_exchange.cc +++ b/src/cpp/ext/csm/metadata_exchange.cc @@ -39,14 +39,14 @@ #include #include -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/env.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" #include "src/cpp/ext/otel/key_value_iterable.h" namespace grpc { diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc index cf0aac4c0d208..001c1fa8d1877 100644 --- a/src/cpp/ext/filters/census/client_filter.cc +++ b/src/cpp/ext/filters/census/client_filter.cc @@ -53,7 +53,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" @@ -62,6 +61,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/filters/census/context.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/cpp/ext/filters/census/measures.h" diff --git a/src/cpp/ext/filters/census/open_census_call_tracer.h b/src/cpp/ext/filters/census/open_census_call_tracer.h index 15575be5bb0d1..2b98d4cb861ec 100644 --- a/src/cpp/ext/filters/census/open_census_call_tracer.h +++ b/src/cpp/ext/filters/census/open_census_call_tracer.h @@ -38,7 +38,6 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" @@ -47,6 +46,7 @@ #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/sync.h" // TODO(yashykt): This might not be the right place for this channel arg, but we // don't have a better place for this right now. diff --git a/src/cpp/ext/gcp/environment_autodetect.cc b/src/cpp/ext/gcp/environment_autodetect.cc index 90e958c55b270..77f74608ee3a1 100644 --- a/src/cpp/ext/gcp/environment_autodetect.cc +++ b/src/cpp/ext/gcp/environment_autodetect.cc @@ -35,12 +35,6 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -48,7 +42,13 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/core/util/gcp_metadata_query.h" +#include "src/core/util/load_file.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" namespace grpc { namespace internal { diff --git a/src/cpp/ext/gcp/environment_autodetect.h b/src/cpp/ext/gcp/environment_autodetect.h index fb15ea1d06d33..b45eb9ed2c1e1 100644 --- a/src/cpp/ext/gcp/environment_autodetect.h +++ b/src/cpp/ext/gcp/environment_autodetect.h @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc { diff --git a/src/cpp/ext/gcp/observability.cc b/src/cpp/ext/gcp/observability.cc index 2c683e20cc816..ef508c89dd9cc 100644 --- a/src/cpp/ext/gcp/observability.cc +++ b/src/cpp/ext/gcp/observability.cc @@ -47,8 +47,8 @@ #include #include "src/core/ext/filters/logging/logging_filter.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" #include "src/cpp/client/client_stats_interceptor.h" #include "src/cpp/ext/filters/census/client_filter.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" diff --git a/src/cpp/ext/gcp/observability_config.cc b/src/cpp/ext/gcp/observability_config.cc index 977ced0671f1f..f6ffcf94d6a13 100644 --- a/src/cpp/ext/gcp/observability_config.cc +++ b/src/cpp/ext/gcp/observability_config.cc @@ -32,15 +32,15 @@ #include #include -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/load_file.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/validation_errors.h" namespace grpc { namespace internal { diff --git a/src/cpp/ext/gcp/observability_config.h b/src/cpp/ext/gcp/observability_config.h index 8854f860c95f2..5fb18f3fae6b9 100644 --- a/src/cpp/ext/gcp/observability_config.h +++ b/src/cpp/ext/gcp/observability_config.h @@ -29,10 +29,10 @@ #include -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/validation_errors.h" namespace grpc { namespace internal { diff --git a/src/cpp/ext/gcp/observability_logging_sink.cc b/src/cpp/ext/gcp/observability_logging_sink.cc index 27cbdb78c7d87..0a370d87606a1 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.cc +++ b/src/cpp/ext/gcp/observability_logging_sink.cc @@ -43,10 +43,10 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/uuid_v4.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" +#include "src/core/util/time.h" +#include "src/core/util/uuid_v4.h" #include "src/cpp/ext/filters/census/open_census_call_tracer.h" // IWYU pragma: no_include "google/protobuf/struct.pb.h" diff --git a/src/cpp/ext/gcp/observability_logging_sink.h b/src/cpp/ext/gcp/observability_logging_sink.h index eea8d6196a7d8..f4703721f3d4b 100644 --- a/src/cpp/ext/gcp/observability_logging_sink.h +++ b/src/cpp/ext/gcp/observability_logging_sink.h @@ -35,7 +35,7 @@ #include #include "src/core/ext/filters/logging/logging_sink.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/gcp/environment_autodetect.h" #include "src/cpp/ext/gcp/observability_config.h" diff --git a/src/cpp/ext/otel/otel_client_call_tracer.cc b/src/cpp/ext/otel/otel_client_call_tracer.cc index 8e75cb82bbaa8..88750fca3e391 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.cc +++ b/src/cpp/ext/otel/otel_client_call_tracer.cc @@ -47,13 +47,13 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/status_util.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/otel/key_value_iterable.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/src/cpp/ext/otel/otel_client_call_tracer.h b/src/cpp/ext/otel/otel_client_call_tracer.h index ed435311b209b..c94219f215220 100644 --- a/src/cpp/ext/otel/otel_client_call_tracer.h +++ b/src/cpp/ext/otel/otel_client_call_tracer.h @@ -32,7 +32,6 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" @@ -41,6 +40,7 @@ #include "src/core/lib/transport/transport.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/otel/otel_plugin.h" namespace grpc { diff --git a/src/cpp/ext/otel/otel_plugin.cc b/src/cpp/ext/otel/otel_plugin.cc index 44c653d58b808..7f71ec517f6a3 100644 --- a/src/cpp/ext/otel/otel_plugin.cc +++ b/src/cpp/ext/otel/otel_plugin.cc @@ -37,9 +37,9 @@ #include "src/core/client_channel/client_channel_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/match.h" #include "src/cpp/ext/otel/key_value_iterable.h" #include "src/cpp/ext/otel/otel_client_call_tracer.h" #include "src/cpp/ext/otel/otel_server_call_tracer.h" @@ -302,6 +302,15 @@ void OpenTelemetryPluginImpl::CallbackMetricReporter::ReportInt64( grpc_core::GlobalInstrumentsRegistry::GetInstrumentDescriptor(handle); CHECK(descriptor.label_keys.size() == label_values.size()); CHECK(descriptor.optional_label_keys.size() == optional_values.size()); + if ((*callback_gauge_state)->caches.find(key_) == + (*callback_gauge_state)->caches.end()) { + LOG(ERROR) << "This may occur when the gauge used in AddCallback is " + "different from the gauge used in Report. This indicates a " + "misuse of the API. The value " + << value << " will not be recorded for instrument " + << handle.index; + return; + } auto& cell = (*callback_gauge_state)->caches.at(key_); std::vector key; key.reserve(label_values.size() + @@ -330,6 +339,15 @@ void OpenTelemetryPluginImpl::CallbackMetricReporter::ReportDouble( grpc_core::GlobalInstrumentsRegistry::GetInstrumentDescriptor(handle); CHECK(descriptor.label_keys.size() == label_values.size()); CHECK(descriptor.optional_label_keys.size() == optional_values.size()); + if ((*callback_gauge_state)->caches.find(key_) == + (*callback_gauge_state)->caches.end()) { + LOG(ERROR) << "This may occur when the gauge used in AddCallback is " + "different from the gauge used in Report. This indicates a " + "misuse of the API. The value " + << value << " will not be recorded for instrument " + << handle.index; + return; + } auto& cell = (*callback_gauge_state)->caches.at(key_); std::vector key; key.reserve(label_values.size() + diff --git a/src/cpp/server/external_connection_acceptor_impl.h b/src/cpp/server/external_connection_acceptor_impl.h index 1d32263e60437..3e23eb8a0c097 100644 --- a/src/cpp/server/external_connection_acceptor_impl.h +++ b/src/cpp/server/external_connection_acceptor_impl.h @@ -26,8 +26,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/sync.h" namespace grpc { namespace internal { diff --git a/src/cpp/server/health/default_health_check_service.h b/src/cpp/server/health/default_health_check_service.h index dc1b18979a448..042b057b08f25 100644 --- a/src/cpp/server/health/default_health_check_service.h +++ b/src/cpp/server/health/default_health_check_service.h @@ -35,8 +35,8 @@ #include #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc { diff --git a/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc b/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc index 2744c66b25e6f..debc4a556b681 100644 --- a/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc +++ b/src/cpp/server/load_reporter/get_cpu_stats_unsupported.cc @@ -22,7 +22,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/cpp/server/load_reporter/get_cpu_stats.h" namespace grpc { diff --git a/src/cpp/server/load_reporter/load_reporter.h b/src/cpp/server/load_reporter/load_reporter.h index 7268d4e3f0d9f..4b08ca05bfcff 100644 --- a/src/cpp/server/load_reporter/load_reporter.h +++ b/src/cpp/server/load_reporter/load_reporter.h @@ -38,7 +38,7 @@ #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/cpp/server/load_reporter/load_data_store.h" #include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h index d7cbad3245528..80210b4af7dde 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h @@ -35,8 +35,8 @@ #include #include -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" #include "src/cpp/server/load_reporter/load_reporter.h" #include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" diff --git a/src/cpp/server/orca/orca_service.cc b/src/cpp/server/orca/orca_service.cc index 9cc09c9909ecb..45829844e8f26 100644 --- a/src/cpp/server/orca/orca_service.cc +++ b/src/cpp/server/orca/orca_service.cc @@ -45,12 +45,12 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/cpp/server/backend_metric_recorder.h" namespace grpc { diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index d229e279a61e6..8996e78b4d8c8 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -69,12 +69,12 @@ #include #include "src/core/ext/transport/inproc/inproc_transport.h" -#include "src/core/lib/gprpp/manual_constructor.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/server/server.h" +#include "src/core/util/manual_constructor.h" #include "src/cpp/client/create_channel_internal.h" #include "src/cpp/server/external_connection_acceptor_impl.h" #include "src/cpp/server/health/default_health_check_service.h" diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 648fee9d5dac5..ed1080aeaf63e 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -56,11 +56,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/surface/call.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/sync.h" #include "src/cpp/server/backend_metric_recorder.h" namespace grpc { diff --git a/src/cpp/server/server_credentials.cc b/src/cpp/server/server_credentials.cc index a3323b9b27302..efb432107de6f 100644 --- a/src/cpp/server/server_credentials.cc +++ b/src/cpp/server/server_credentials.cc @@ -14,7 +14,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { diff --git a/src/cpp/thread_manager/thread_manager.cc b/src/cpp/thread_manager/thread_manager.cc index 1fd3ee20bc8db..3128e1c6f41cd 100644 --- a/src/cpp/thread_manager/thread_manager.cc +++ b/src/cpp/thread_manager/thread_manager.cc @@ -24,10 +24,10 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/thd.h" namespace grpc { diff --git a/src/cpp/thread_manager/thread_manager.h b/src/cpp/thread_manager/thread_manager.h index c15eaa2be869a..2c201bc60980c 100644 --- a/src/cpp/thread_manager/thread_manager.h +++ b/src/cpp/thread_manager/thread_manager.h @@ -21,10 +21,10 @@ #include -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/resource_quota/api.h" #include "src/core/lib/resource_quota/thread_quota.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" namespace grpc { diff --git a/src/csharp/build/dependencies.props b/src/csharp/build/dependencies.props index 2a50deac3c103..29dba7a288fb5 100644 --- a/src/csharp/build/dependencies.props +++ b/src/csharp/build/dependencies.props @@ -1,7 +1,7 @@ - 2.67.0-dev + 2.68.0-dev 3.27.2 diff --git a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec index b407eccc35f3a..844e08cfcb8f4 100644 --- a/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCCppPlugin' - v = '1.67.0-dev' + v = '1.68.0-dev' s.version = v s.summary = 'The gRPC ProtoC plugin generates C++ files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 221ef815cb2b4..9198288550960 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.67.0-dev' + v = '1.68.0-dev' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index 260f6c6b908c9..91dec47c6c331 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -39,7 +39,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.36' + version = '0.0.37' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: @@ -76,7 +76,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/google/boringssl.git', - :commit => "16c8d3db1af20fcc04b5190b25242aadcb1fbb30", + :commit => "b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6", } s.ios.deployment_target = '10.0' @@ -132,7 +132,7 @@ Pod::Spec.new do |s| ss.source_files = 'src/ssl/*.{h,c,cc}', 'src/ssl/**/*.{h,c,cc}', 'src/crypto/*.{h,c,cc}', - 'src/crypto/**/*.{h,c,cc}', + 'src/crypto/**/*.{h,c,cc,inc}', # We have to include fiat because spake25519 depends on it 'src/third_party/fiat/*.{h,c,cc}', # Include the err_data.c pre-generated in boringssl's master-with-bazel branch @@ -143,11 +143,7 @@ Pod::Spec.new do |s| 'src/crypto/*.h', 'src/crypto/**/*.h', 'src/third_party/fiat/*.h' - # bcm.c includes other source files, creating duplicated symbols. Since it is not used, we - # explicitly exclude it from the pod. - # TODO (mxyan): Work with BoringSSL team to remove this hack. - ss.exclude_files = 'src/crypto/fipsmodule/bcm.c', - 'src/**/*_test.*', + ss.exclude_files = 'src/**/*_test.*', 'src/**/test_*.*', 'src/**/test/*.*' @@ -177,522 +173,529 @@ Pod::Spec.new do |s| *) opts="--ignore-garbage" ;; esac base64 --decode $opts < src/include/openssl/boringssl_prefix_symbols.h - H4sICAAAAAAC/2JvcmluZ3NzbF9wcmVmaXhfc3ltYm9scy5oALS9XXPbuJaofT+/wnXm5kzVrpnY6WRn - v3eKrXQ0cWxvSenpzA2LkiCLOxSpEJRj968/AEmJ+FgL5FrwW7VrpmPpeRYFgPgiCPzXf108ikJUaS02 - F6uX8z+SVVllxaOUeXKoxDZ7TnYi3YjqP+XuoiwuPjafLha3F+tyv8/q/+/i8v36w+btZnWZbq/ebNfr - N7+t3l3+483q6t3Vb1dpulmvLrer1ds3//Zv//VfF9fl4aXKHnf1xf9d/8fF1ZvLD3+7+L0sH3NxMSvW - /6m+or/1IKp9JmWm4tXlxVGKv6loh5e/XezLTbZV/z8tNv9VVhebTNZVtjrW4qLeZfJCltv6V1qJi636 - MC1etOtwrA6lFBe/slr9gKr5/+WxvtgKcaGQnaiE/vVVWqiE+NvFoSqfso1KknqX1ur/iIt0VT4JbVqf - r70o62wt9FW0cQ/99Z4+OhxEWl1kxUWa55rMhDz9uuXn6cXi/tPyfybz6cVscfEwv/9jdjO9ufg/k4X6 - 9/+5mNzdNF+afFt+vp9f3MwW17eT2dfFxeT29kJR88ndcjZdaNf/zJafL+bT3ydzhdwrSvl699317beb - 2d3vDTj7+nA7U1F6wcX9J+34Op1ff1Z/mXyc3c6W35vwn2bLu+li8Z/KcXF3fzH9Y3q3vFh81h7jyj5O - L25nk4+304tP6l+Tu+9at3iYXs8mt39T1z2fXi//phSn/1Jfur6/W0z/+U3p1HcubiZfJ7/rC2no0z+b - H/Z5slzcq7hz9fMW326X+md8mt9/vbi9X+grv/i2mKoYk+VE0yoN1SUv/qa4qbrAub7uifrf9XJ2f6d9 - ClChl/OJvo676e+3s9+nd9dTzd43wPJ+rr77bdExf7uYzGcLHfT+21LT99rZFOH7u7tp85029XV6qGtp - rmI6VwnxddKIP9m58Z9N+f94P1dOdfskk5ub5GE+/TT78+KQylrIi/pXeaGKXlFn20xUUhUeVfjLQqhM - qHURU4V6L/UftCir9d2qS1y5vdin66q8EM+HtGgKofpfVsuLtHo87pVPXqyEgkUTSN29//lv/75Rd3Yh - wMv5v+nfLlb/AX6UzNRPn7dfCDrML16kF//+7xeJ/j+rf+up2X2yTVQtA19D/8f2D3/rgf+wHFLUVEuH - 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 - zH4XHtP0zp7SdLlyqJBjwzwRxTLtiG1G0CP9EgjKp7/r78zkWZ/hBrM2Sb7fQL4nyff2PPpCd9UFGe6q - KfrUOpkTcHD2rE2ToQO0WcAKD3N01GYfA1nwUqeiadADtZdJpOv6E1Q9EcUaO+iTHwkjJrwo9Z09qe1y - Re3Bc21DHUG8ns07CopHoHboD19+++ve7ge16wCmtlLZPdWrPRIM3+myFNv2vMqpc6FvrHkq1o/5FzCB - X1kfzPSV7csUzaEbdNoTZEUSaJfL8lVkry8jD/j9YA51tIuJzRw/FDGbBQQedqH8aH850mkgui8luMbU - tN7jO8ydpT7XzIpndV73yOc70EXE6bur7Y7VOwh1pRHXfrbMtGzVqhqYumfkMb9rn6f5w1Mx6rSwQaiP - HPRTwQdXE9KI23Tdi8qb+qXKy1bZewDxBOHvf/s/JvhepaXSBAA= + H4sICAAAAAAC/2JvcmluZ3NzbF9wcmVmaXhfc3ltYm9scy5oALS9W3PbyJamfd+/QjFzMx2xo9uSyy7v + 746W6DLbsqQm6Zpy3yBAAhSxDQI0EpSl+vWTCYBAHtZKYK3UF7GjuyzifV4gz+f8z/+8eEyLtIrrNLnY + vPT/iDZllRWPQuTRsUp32XO0T+Mkrf5D7C/K4uJj8+tqdXuxLQ+HrP7/LjYfNm/T9+nl5eX7979f/jP+ + kG528W9vt2+2SfrPOPk9efd7/OG33ft/+7f//M+L6/L4UmWP+/ri/2z//eLqzeWHf1z8UZaPeXqxKLb/ + IR9RTz2k1SETIpN+dXlxEuk/pNvx5R8XhzLJdvL/x0Xyn2V1kWSirrLNqU4v6n0mLkS5q3/FVXqxkz/G + xYtiHU/VsRTpxa+slh9QNf+/PNUXuzS9kJJ9WqXq66u4kAHxj4tjVT5liQySeh/X8v+kF/GmfEoVadu/ + e1HW2TZVb9H6Hof3Pf90PKZxdZEVF3GeK2WWivPXrT/PL1b3n9b/d7acXyxWFw/L+z8XN/Obi/81W8l/ + /6+L2d1N89Ds2/rz/fLiZrG6vp0tvq4uZre3F1K1nN2tF/OVYv3fxfrzxXL+x2wpJfdSJXkD++769tvN + 4u6PRrj4+nC7kC4D4OL+k2J8nS+vP8u/zD4ubhfr7439p8X6br5a/YdkXNzdX8z/nN+tL1afFUd7s4/z + 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 + SWWH6qnMiloNzwDiCcK///V/4K+mmdHmBAA= EOF # PrivacyInfo.xcprivacy is not part of BoringSSL repo, inject it during pod installation @@ -706,10 +709,10 @@ Pod::Spec.new do |s| EOF # We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists - find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include ;#include ;g' + find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include ;#include ;g' END_OF_COMMAND end diff --git a/src/objective-c/GRPCClient/version.h b/src/objective-c/GRPCClient/version.h index 3817610281623..46ede4a14bf6a 100644 --- a/src/objective-c/GRPCClient/version.h +++ b/src/objective-c/GRPCClient/version.h @@ -22,4 +22,4 @@ // instead. This file can be regenerated from the template by running // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.67.0-dev" +#define GRPC_OBJC_VERSION_STRING @"1.68.0-dev" diff --git a/src/objective-c/tests/CronetTests/CronetUnitTests.mm b/src/objective-c/tests/CronetTests/CronetUnitTests.mm index ba9131605255f..91dd206ec549f 100644 --- a/src/objective-c/tests/CronetTests/CronetUnitTests.mm +++ b/src/objective-c/tests/CronetTests/CronetUnitTests.mm @@ -31,8 +31,8 @@ #import #import "src/core/lib/channel/channel_args.h" -#import "src/core/lib/gprpp/env.h" -#import "src/core/lib/gprpp/host_port.h" +#import "src/core/util/env.h" +#import "src/core/util/host_port.h" #import "src/core/util/string.h" #import "src/core/util/tmpfile.h" #import "test/core/end2end/data/ssl_test_data.h" diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 2c39d8ecbac65..84f6db830a451 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -22,7 +22,7 @@ def grpc_deps end target 'TvTests' do - platform :tvos, '10.0' + platform :tvos, '12.0' grpc_deps end diff --git a/src/objective-c/tests/version.h b/src/objective-c/tests/version.h index c277186d3d8b1..6c71e7cf04151 100644 --- a/src/objective-c/tests/version.h +++ b/src/objective-c/tests/version.h @@ -22,5 +22,5 @@ // instead. This file can be regenerated from the template by running // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.67.0-dev" -#define GRPC_C_VERSION_STRING @"43.0.0" +#define GRPC_OBJC_VERSION_STRING @"1.68.0-dev" +#define GRPC_C_VERSION_STRING @"44.0.0" diff --git a/src/php/composer.json b/src/php/composer.json index 2dcb272f3670f..e44d5e7901e2c 100644 --- a/src/php/composer.json +++ b/src/php/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc-dev", "description": "gRPC library for PHP - for Development use only", "license": "Apache-2.0", - "version": "1.67.0", + "version": "1.68.0", "require": { "php": ">=7.0.0", "google/protobuf": "^v3.3.0" diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index be2549d1a74cf..0a1dc021cd279 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -20,6 +20,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.67.0dev" +#define PHP_GRPC_VERSION "1.68.0dev" #endif /* VERSION_H */ diff --git a/src/php/tests/generated_code/Math/MathStub.php b/src/php/tests/generated_code/Math/MathStub.php index babcafe270d51..5ab377c6f6996 100644 --- a/src/php/tests/generated_code/Math/MathStub.php +++ b/src/php/tests/generated_code/Math/MathStub.php @@ -27,7 +27,7 @@ class MathStub { * and remainder. * @param \Math\DivArgs $request client request * @param \Grpc\ServerContext $context server request context - * @return \Math\DivReply for response data, null if if error occured + * @return \Math\DivReply for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Div( @@ -80,7 +80,7 @@ public function Fib( * is closed. * @param \Grpc\ServerCallReader $reader read client request data of \Math\Num * @param \Grpc\ServerContext $context server request context - * @return \Math\Num for response data, null if if error occured + * @return \Math\Num for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Sum( diff --git a/src/php/tests/generated_code/math_server.php b/src/php/tests/generated_code/math_server.php index 7301f0f12d546..18839ff94114c 100644 --- a/src/php/tests/generated_code/math_server.php +++ b/src/php/tests/generated_code/math_server.php @@ -63,7 +63,7 @@ public function Div( public function DivMany( \Grpc\ServerCallReader $reader, - \Grpc\ServerCallWriter $writter, + \Grpc\ServerCallWriter $writer, \Grpc\ServerContext $context ): void { while ($divArgs = $reader->read()) { @@ -74,7 +74,7 @@ public function DivMany( \Grpc\STATUS_INVALID_ARGUMENT, 'Cannot divide by zero' )); - $writter->finish(); + $writer->finish(); return; } $quotient = intdiv($dividend, $divisor); @@ -83,14 +83,14 @@ public function DivMany( 'quotient' => $quotient, 'remainder' => $remainder, ]); - $writter->write($reply); + $writer->write($reply); } - $writter->finish(); + $writer->finish(); } public function Fib( \Math\FibArgs $request, - \Grpc\ServerCallWriter $writter, + \Grpc\ServerCallWriter $writer, \Grpc\ServerContext $context ): void { $previous = 0; @@ -99,12 +99,12 @@ public function Fib( for ($i = 0; $i < $limit; $i++) { $num = new \Math\Num(); $num->setNum($current); - $writter->write($num); + $writer->write($num); $next = $previous + $current; $previous = $current; $current = $next; } - $writter->finish(); + $writer->finish(); } /** diff --git a/src/php/tests/interop/Grpc/Testing/HookServiceStub.php b/src/php/tests/interop/Grpc/Testing/HookServiceStub.php index b9590d34b5710..c5311b8c101ed 100644 --- a/src/php/tests/interop/Grpc/Testing/HookServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/HookServiceStub.php @@ -31,7 +31,7 @@ class HookServiceStub { * to a SetReturnStatus * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Hook( @@ -46,7 +46,7 @@ public function Hook( * Sets a return status for pending and upcoming calls to Hook * @param \Grpc\Testing\SetReturnStatusRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function SetReturnStatus( @@ -61,7 +61,7 @@ public function SetReturnStatus( * Clears the return status. Incoming calls to Hook will "hang" * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function ClearReturnStatus( diff --git a/src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceStub.php b/src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceStub.php index f99f489d4b839..90b278869cc7d 100644 --- a/src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/LoadBalancerStatsServiceStub.php @@ -30,7 +30,7 @@ class LoadBalancerStatsServiceStub { * Gets the backend distribution for RPCs sent by a test client. * @param \Grpc\Testing\LoadBalancerStatsRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\LoadBalancerStatsResponse for response data, null if if error occured + * @return \Grpc\Testing\LoadBalancerStatsResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function GetClientStats( @@ -45,7 +45,7 @@ public function GetClientStats( * Gets the accumulated stats for RPCs sent by a test client. * @param \Grpc\Testing\LoadBalancerAccumulatedStatsRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\LoadBalancerAccumulatedStatsResponse for response data, null if if error occured + * @return \Grpc\Testing\LoadBalancerAccumulatedStatsResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function GetClientAccumulatedStats( diff --git a/src/php/tests/interop/Grpc/Testing/ReconnectServiceStub.php b/src/php/tests/interop/Grpc/Testing/ReconnectServiceStub.php index 450ecc0e8a1bf..21118f9ac2e58 100644 --- a/src/php/tests/interop/Grpc/Testing/ReconnectServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/ReconnectServiceStub.php @@ -29,7 +29,7 @@ class ReconnectServiceStub { /** * @param \Grpc\Testing\ReconnectParams $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Start( @@ -43,7 +43,7 @@ public function Start( /** * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\ReconnectInfo for response data, null if if error occured + * @return \Grpc\Testing\ReconnectInfo for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Stop( diff --git a/src/php/tests/interop/Grpc/Testing/TestServiceStub.php b/src/php/tests/interop/Grpc/Testing/TestServiceStub.php index d6c3fac7afef8..722e3add6f4f0 100644 --- a/src/php/tests/interop/Grpc/Testing/TestServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/TestServiceStub.php @@ -31,7 +31,7 @@ class TestServiceStub { * One empty request followed by one empty response. * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function EmptyCall( @@ -46,7 +46,7 @@ public function EmptyCall( * One request followed by one response. * @param \Grpc\Testing\SimpleRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\SimpleResponse for response data, null if if error occured + * @return \Grpc\Testing\SimpleResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function UnaryCall( @@ -63,7 +63,7 @@ public function UnaryCall( * satisfy subsequent requests. * @param \Grpc\Testing\SimpleRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\SimpleResponse for response data, null if if error occured + * @return \Grpc\Testing\SimpleResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function CacheableUnaryCall( @@ -96,7 +96,7 @@ public function StreamingOutputCall( * The server returns the aggregated size of client payload as the result. * @param \Grpc\ServerCallReader $reader read client request data of \Grpc\Testing\StreamingInputCallRequest * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\StreamingInputCallResponse for response data, null if if error occured + * @return \Grpc\Testing\StreamingInputCallResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function StreamingInputCall( @@ -149,7 +149,7 @@ public function HalfDuplexCall( * to test the behavior when clients call unimplemented methods. * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function UnimplementedCall( diff --git a/src/php/tests/interop/Grpc/Testing/UnimplementedServiceStub.php b/src/php/tests/interop/Grpc/Testing/UnimplementedServiceStub.php index 086cca2fb02a2..f82e532ab184b 100644 --- a/src/php/tests/interop/Grpc/Testing/UnimplementedServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/UnimplementedServiceStub.php @@ -31,7 +31,7 @@ class UnimplementedServiceStub { * A call that no server should implement * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function UnimplementedCall( diff --git a/src/php/tests/interop/Grpc/Testing/XdsUpdateClientConfigureServiceStub.php b/src/php/tests/interop/Grpc/Testing/XdsUpdateClientConfigureServiceStub.php index fb3bb1ce0bf8c..8ac84a2d55dbd 100644 --- a/src/php/tests/interop/Grpc/Testing/XdsUpdateClientConfigureServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/XdsUpdateClientConfigureServiceStub.php @@ -30,7 +30,7 @@ class XdsUpdateClientConfigureServiceStub { * Update the tes client's configuration. * @param \Grpc\Testing\ClientConfigureRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\ClientConfigureResponse for response data, null if if error occured + * @return \Grpc\Testing\ClientConfigureResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function Configure( diff --git a/src/php/tests/interop/Grpc/Testing/XdsUpdateHealthServiceStub.php b/src/php/tests/interop/Grpc/Testing/XdsUpdateHealthServiceStub.php index 759308b1a0027..b44b877e94070 100644 --- a/src/php/tests/interop/Grpc/Testing/XdsUpdateHealthServiceStub.php +++ b/src/php/tests/interop/Grpc/Testing/XdsUpdateHealthServiceStub.php @@ -29,7 +29,7 @@ class XdsUpdateHealthServiceStub { /** * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function SetServing( @@ -43,7 +43,7 @@ public function SetServing( /** * @param \Grpc\Testing\EmptyMessage $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\EmptyMessage for response data, null if if error occured + * @return \Grpc\Testing\EmptyMessage for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function SetNotServing( @@ -57,7 +57,7 @@ public function SetNotServing( /** * @param \Grpc\Testing\HookRequest $request client request * @param \Grpc\ServerContext $context server request context - * @return \Grpc\Testing\HookResponse for response data, null if if error occured + * @return \Grpc\Testing\HookResponse for response data, null if if error occurred * initial metadata (if any) and status (if not ok) should be set to $context */ public function SendHookRequest( diff --git a/src/php/tests/interop/interop_server.php b/src/php/tests/interop/interop_server.php index f280fe7b48fe7..9abd2b2a86891 100644 --- a/src/php/tests/interop/interop_server.php +++ b/src/php/tests/interop/interop_server.php @@ -102,7 +102,7 @@ public function CacheableUnaryCall( public function StreamingOutputCall( \Grpc\Testing\StreamingOutputCallRequest $request, - \Grpc\ServerCallWriter $writter, + \Grpc\ServerCallWriter $writer, \Grpc\ServerContext $context ): void { $echo_status = $this->maybeEchoStatusAndMessage($request); @@ -119,10 +119,10 @@ public function StreamingOutputCall( 'payload' => $payload, ]); $options = []; - $writter->write($response, $options); + $writer->write($response, $options); } $context->setStatus($echo_status ?? \Grpc\Status::ok()); - $writter->finish(); + $writer->finish(); } public function StreamingInputCall( @@ -142,7 +142,7 @@ public function StreamingInputCall( public function FullDuplexCall( \Grpc\ServerCallReader $reader, - \Grpc\ServerCallWriter $writter, + \Grpc\ServerCallWriter $writer, \Grpc\ServerContext $context ): void { list($initial_metadata, $trailing_metadata) = @@ -155,7 +155,7 @@ public function FullDuplexCall( ); if ($echo_status) { $context->setStatus($echo_status); - $writter->finish(); + $writer->finish(); return; } @@ -171,20 +171,20 @@ public function FullDuplexCall( 'payload' => $payload, ]); $options = []; - $writter->write($response, $options); + $writer->write($response, $options); } } $context->setStatus(\Grpc\Status::ok($trailing_metadata)); - $writter->finish(); + $writer->finish(); } public function HalfDuplexCall( \Grpc\ServerCallReader $reader, - \Grpc\ServerCallWriter $writter, + \Grpc\ServerCallWriter $writer, \Grpc\ServerContext $context ): void { $context->setStatus(\Grpc\Status::unimplemented()); - $writter->finish(); + $writer->finish(); } public function UnimplementedCall( diff --git a/src/php/tests/interop/metrics_client.php b/src/php/tests/interop/metrics_client.php index d5215b826f3bb..09664a5138497 100644 --- a/src/php/tests/interop/metrics_client.php +++ b/src/php/tests/interop/metrics_client.php @@ -24,7 +24,7 @@ $socket = socket_create(AF_INET, SOCK_STREAM, 0); if (@!socket_connect($socket, $server_host, $server_port)) { - echo "Cannot connect to merics server...\n"; + echo "Cannot connect to metrics server...\n"; exit(1); } socket_write($socket, 'qps'); diff --git a/src/php/tests/unit_tests/ServerCallTest.php b/src/php/tests/unit_tests/ServerCallTest.php index 9db62ba6fde97..b0c97755b8aef 100644 --- a/src/php/tests/unit_tests/ServerCallTest.php +++ b/src/php/tests/unit_tests/ServerCallTest.php @@ -236,7 +236,7 @@ public function testFinish() $status = \Grpc\Status::status( \Grpc\STATUS_INVALID_ARGUMENT, "invalid argument", - ['trailiingMeta' => 100] + ['trailingMeta' => 100] ); $this->mockCall->expects($this->once()) @@ -259,7 +259,7 @@ public function testFinishWithMetadataAndMessage() { $metadata = ['a' => 1]; $message = $this->newStringMessage(); - $status = \Grpc\Status::ok(['trailiingMeta' => 100]); + $status = \Grpc\Status::ok(['trailingMeta' => 100]); $this->mockCall->expects($this->once()) ->method('startBatch') diff --git a/src/php/tests/unit_tests/StatusTest.php b/src/php/tests/unit_tests/StatusTest.php index ce4ee88457617..dd148cf2f90b7 100644 --- a/src/php/tests/unit_tests/StatusTest.php +++ b/src/php/tests/unit_tests/StatusTest.php @@ -70,12 +70,12 @@ public function testStatusWithMetadata() $status = [ 'code' => \Grpc\STATUS_INVALID_ARGUMENT, 'details' => 'invalid argument', - 'metadata' => ['trailiingMeta' => 100] + 'metadata' => ['trailingMeta' => 100] ]; $return = \Grpc\Status::status( \Grpc\STATUS_INVALID_ARGUMENT, "invalid argument", - ['trailiingMeta' => 100] + ['trailingMeta' => 100] ); $this->assertEquals($status, $return); } diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 181704cb85a67..2e689bcec3d2a 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import atexit def _spawn_callback_in_thread(cb_func, args): t = ForkManagedThread(target=cb_func, args=args) @@ -65,11 +66,59 @@ cdef int _get_metadata(void *state, return 0 # Asynchronous return -cdef void _destroy(void *state) except * with gil: - cpython.Py_DECREF(state) +# Protects access to GIL from _destroy() and to g_shutting_down. +# Do NOT hold this while holding GIL to prevent a deadlock. +cdef mutex g_shutdown_mu +# Number of C-core clean up calls in progress. Set to -1 when Python is shutting +# down. +cdef int g_shutting_down = 0 + +# This is called by C-core when the plugin is destroyed, which may race between +# GIL destruction during process shutdown. Since GIL destruction happens after +# Python's exit handlers, we mark that Python is shutting down from an exit +# handler and don't grab GIL in this function afterwards using a C mutex. +cdef void _destroy(void *state) nogil: + global g_shutdown_mu + global g_shutting_down + g_shutdown_mu.lock() + if g_shutting_down > -1: + g_shutting_down += 1 + g_shutdown_mu.unlock() + with gil: + cpython.Py_DECREF(state) + g_shutdown_mu.lock() + g_shutting_down -= 1 + g_shutdown_mu.unlock() grpc_shutdown() +g_shutdown_handler_registered = False + +def _maybe_register_shutdown_handler(): + global g_shutdown_handler_registered + if g_shutdown_handler_registered: + return + g_shutdown_handler_registered = True + atexit.register(_on_shutdown) + +cdef void _on_shutdown() nogil: + global g_shutdown_mu + global g_shutting_down + # Wait for up to ~2s if C-core is still cleaning up. + cdef int wait_ms = 10 + while wait_ms < 1500: + g_shutdown_mu.lock() + if g_shutting_down == 0: + g_shutting_down = -1 + g_shutdown_mu.unlock() + return + g_shutdown_mu.unlock() + with gil: + time.sleep(wait_ms / 1000) + wait_ms = wait_ms * 2 + with gil: + _LOGGER.error('Timed out waiting for C-core clean-up') + cdef class MetadataPluginCallCredentials(CallCredentials): def __cinit__(self, metadata_plugin, name): @@ -83,6 +132,7 @@ cdef class MetadataPluginCallCredentials(CallCredentials): c_metadata_plugin.state = self._metadata_plugin c_metadata_plugin.type = self._name cpython.Py_INCREF(self._metadata_plugin) + _maybe_register_shutdown_handler() fork_handlers_and_grpc_init() # TODO(yihuazhang): Expose min_security_level via the Python API so that # applications can decide what minimum security level their plugins require. diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index 829c8f8a7d414..84136764929ff 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.67.0.dev0""" +__version__ = """1.68.0.dev0""" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 08aadfbab32fd..80b7fedb8d49d 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -417,8 +417,6 @@ 'src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc', 'src/core/lib/address_utils/parse_address.cc', 'src/core/lib/address_utils/sockaddr_utils.cc', - 'src/core/lib/backoff/backoff.cc', - 'src/core/lib/backoff/random_early_detection.cc', 'src/core/lib/channel/channel_args.cc', 'src/core/lib/channel/channel_args_preconditioning.cc', 'src/core/lib/channel/channel_stack.cc', @@ -434,7 +432,6 @@ 'src/core/lib/config/config_vars_non_generated.cc', 'src/core/lib/config/core_configuration.cc', 'src/core/lib/config/load_config.cc', - 'src/core/lib/debug/event_log.cc', 'src/core/lib/debug/trace.cc', 'src/core/lib/debug/trace_flags.cc', 'src/core/lib/event_engine/ares_resolver.cc', @@ -486,34 +483,6 @@ 'src/core/lib/event_engine/work_queue/basic_work_queue.cc', 'src/core/lib/experiments/config.cc', 'src/core/lib/experiments/experiments.cc', - 'src/core/lib/gprpp/crash.cc', - 'src/core/lib/gprpp/dump_args.cc', - 'src/core/lib/gprpp/examine_stack.cc', - 'src/core/lib/gprpp/fork.cc', - 'src/core/lib/gprpp/glob.cc', - 'src/core/lib/gprpp/host_port.cc', - 'src/core/lib/gprpp/linux/env.cc', - 'src/core/lib/gprpp/load_file.cc', - 'src/core/lib/gprpp/mpscq.cc', - 'src/core/lib/gprpp/per_cpu.cc', - 'src/core/lib/gprpp/posix/directory_reader.cc', - 'src/core/lib/gprpp/posix/env.cc', - 'src/core/lib/gprpp/posix/stat.cc', - 'src/core/lib/gprpp/posix/thd.cc', - 'src/core/lib/gprpp/ref_counted_string.cc', - 'src/core/lib/gprpp/status_helper.cc', - 'src/core/lib/gprpp/strerror.cc', - 'src/core/lib/gprpp/tchar.cc', - 'src/core/lib/gprpp/time.cc', - 'src/core/lib/gprpp/time_averaged_stats.cc', - 'src/core/lib/gprpp/time_util.cc', - 'src/core/lib/gprpp/uuid_v4.cc', - 'src/core/lib/gprpp/validation_errors.cc', - 'src/core/lib/gprpp/windows/directory_reader.cc', - 'src/core/lib/gprpp/windows/env.cc', - 'src/core/lib/gprpp/windows/stat.cc', - 'src/core/lib/gprpp/windows/thd.cc', - 'src/core/lib/gprpp/work_serializer.cc', 'src/core/lib/iomgr/buffer_list.cc', 'src/core/lib/iomgr/call_combiner.cc', 'src/core/lib/iomgr/cfstream_handle.cc', @@ -537,11 +506,6 @@ 'src/core/lib/iomgr/executor.cc', 'src/core/lib/iomgr/fork_posix.cc', 'src/core/lib/iomgr/fork_windows.cc', - 'src/core/lib/iomgr/gethostname_fallback.cc', - 'src/core/lib/iomgr/gethostname_host_name_max.cc', - 'src/core/lib/iomgr/gethostname_sysconf.cc', - 'src/core/lib/iomgr/grpc_if_nametoindex_posix.cc', - 'src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc', 'src/core/lib/iomgr/internal_errqueue.cc', 'src/core/lib/iomgr/iocp_windows.cc', 'src/core/lib/iomgr/iomgr.cc', @@ -590,7 +554,6 @@ 'src/core/lib/iomgr/wakeup_fd_nospecial.cc', 'src/core/lib/iomgr/wakeup_fd_pipe.cc', 'src/core/lib/iomgr/wakeup_fd_posix.cc', - 'src/core/lib/matchers/matchers.cc', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/party.cc', 'src/core/lib/promise/sleep.cc', @@ -710,7 +673,6 @@ 'src/core/lib/transport/timeout_encoding.cc', 'src/core/lib/transport/transport.cc', 'src/core/lib/transport/transport_op_string.cc', - 'src/core/lib/uri/uri_parser.cc', 'src/core/load_balancing/address_filtering.cc', 'src/core/load_balancing/backend_metric_parser.cc', 'src/core/load_balancing/child_policy_handler.cc', @@ -805,7 +767,21 @@ 'src/core/tsi/transport_security_grpc.cc', 'src/core/util/alloc.cc', 'src/core/util/atm.cc', + 'src/core/util/backoff.cc', + 'src/core/util/crash.cc', + 'src/core/util/dump_args.cc', + 'src/core/util/event_log.cc', + 'src/core/util/examine_stack.cc', + 'src/core/util/fork.cc', 'src/core/util/gcp_metadata_query.cc', + 'src/core/util/gethostname_fallback.cc', + 'src/core/util/gethostname_host_name_max.cc', + 'src/core/util/gethostname_sysconf.cc', + 'src/core/util/glob.cc', + 'src/core/util/gpr_time.cc', + 'src/core/util/grpc_if_nametoindex_posix.cc', + 'src/core/util/grpc_if_nametoindex_unsupported.cc', + 'src/core/util/host_port.cc', 'src/core/util/http_client/format_request.cc', 'src/core/util/http_client/httpcli.cc', 'src/core/util/http_client/httpcli_security_connector.cc', @@ -817,24 +793,48 @@ 'src/core/util/json/json_writer.cc', 'src/core/util/latent_see.cc', 'src/core/util/linux/cpu.cc', + 'src/core/util/linux/env.cc', + 'src/core/util/load_file.cc', 'src/core/util/log.cc', + 'src/core/util/matchers.cc', + 'src/core/util/mpscq.cc', 'src/core/util/msys/tmpfile.cc', + 'src/core/util/per_cpu.cc', 'src/core/util/posix/cpu.cc', + 'src/core/util/posix/directory_reader.cc', + 'src/core/util/posix/env.cc', + 'src/core/util/posix/stat.cc', 'src/core/util/posix/string.cc', 'src/core/util/posix/sync.cc', + 'src/core/util/posix/thd.cc', 'src/core/util/posix/time.cc', 'src/core/util/posix/tmpfile.cc', + 'src/core/util/random_early_detection.cc', + 'src/core/util/ref_counted_string.cc', + 'src/core/util/status_helper.cc', + 'src/core/util/strerror.cc', 'src/core/util/string.cc', 'src/core/util/sync.cc', 'src/core/util/sync_abseil.cc', + 'src/core/util/tchar.cc', 'src/core/util/time.cc', + 'src/core/util/time_averaged_stats.cc', 'src/core/util/time_precise.cc', + 'src/core/util/time_util.cc', + 'src/core/util/uri.cc', + 'src/core/util/uuid_v4.cc', + 'src/core/util/validation_errors.cc', 'src/core/util/windows/cpu.cc', + 'src/core/util/windows/directory_reader.cc', + 'src/core/util/windows/env.cc', + 'src/core/util/windows/stat.cc', 'src/core/util/windows/string.cc', 'src/core/util/windows/string_util.cc', 'src/core/util/windows/sync.cc', + 'src/core/util/windows/thd.cc', 'src/core/util/windows/time.cc', 'src/core/util/windows/tmpfile.cc', + 'src/core/util/work_serializer.cc', 'src/core/xds/grpc/certificate_provider_store.cc', 'src/core/xds/grpc/file_watcher_certificate_provider_factory.cc', 'src/core/xds/grpc/xds_audit_logger_registry.cc', @@ -864,10 +864,10 @@ 'src/core/xds/grpc/xds_routing.cc', 'src/core/xds/grpc/xds_server_grpc.cc', 'src/core/xds/grpc/xds_transport_grpc.cc', + 'src/core/xds/xds_client/lrs_client.cc', 'src/core/xds/xds_client/xds_api.cc', 'src/core/xds/xds_client/xds_bootstrap.cc', 'src/core/xds/xds_client/xds_client.cc', - 'src/core/xds/xds_client/xds_client_stats.cc', 'third_party/abseil-cpp/absl/base/internal/cycleclock.cc', 'third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc', 'third_party/abseil-cpp/absl/base/internal/raw_logging.cc', @@ -1124,6 +1124,8 @@ 'third_party/boringssl-with-bazel/src/crypto/kyber/kyber.c', 'third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c', 'third_party/boringssl-with-bazel/src/crypto/mem.c', + 'third_party/boringssl-with-bazel/src/crypto/mldsa/mldsa.c', + 'third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc', 'third_party/boringssl-with-bazel/src/crypto/obj/obj.c', 'third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c', 'third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c', @@ -1144,12 +1146,14 @@ 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c', 'third_party/boringssl-with-bazel/src/crypto/pool/pool.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/fork_detect.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/getentropy.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/ios.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/trusty.c', + 'third_party/boringssl-with-bazel/src/crypto/rand_extra/urandom.c', 'third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c', 'third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c', 'third_party/boringssl-with-bazel/src/crypto/refcount.c', diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index f9644d3042066..503faf205b08e 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_admin/grpc_version.py b/src/python/grpcio_admin/grpc_version.py index c4ae9dff5fc4b..844132b9e0bbf 100644 --- a/src/python/grpcio_admin/grpc_version.py +++ b/src/python/grpcio_admin/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_channelz/grpc_version.py b/src/python/grpcio_channelz/grpc_version.py index 46b86e616bb35..de5e63dddcf2b 100644 --- a/src/python/grpcio_channelz/grpc_version.py +++ b/src/python/grpcio_channelz/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_csds/grpc_version.py b/src/python/grpcio_csds/grpc_version.py index 5003869954a8e..0e6d18a4863fc 100644 --- a/src/python/grpcio_csds/grpc_version.py +++ b/src/python/grpcio_csds/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_csm_observability/grpc_version.py b/src/python/grpcio_csm_observability/grpc_version.py index 5f4a5c4de8f58..dc5bed153e459 100644 --- a/src/python/grpcio_csm_observability/grpc_version.py +++ b/src/python/grpcio_csm_observability/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csm_observability/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index e85a13a2db13b..bf9a787d891ab 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_observability/grpc_version.py b/src/python/grpcio_observability/grpc_version.py index 94f6ed339cf43..de10177d81713 100644 --- a/src/python/grpcio_observability/grpc_version.py +++ b/src/python/grpcio_observability/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_observability/observability_lib_deps.py b/src/python/grpcio_observability/observability_lib_deps.py index 290c367b440c8..471b660380610 100644 --- a/src/python/grpcio_observability/observability_lib_deps.py +++ b/src/python/grpcio_observability/observability_lib_deps.py @@ -23,45 +23,45 @@ 'grpc_root/src/core/lib/event_engine/thread_local.cc', 'grpc_root/src/core/lib/experiments/config.cc', 'grpc_root/src/core/lib/experiments/experiments.cc', - 'grpc_root/src/core/lib/gprpp/crash.cc', - 'grpc_root/src/core/lib/gprpp/examine_stack.cc', - 'grpc_root/src/core/lib/gprpp/fork.cc', - 'grpc_root/src/core/lib/gprpp/glob.cc', - 'grpc_root/src/core/lib/gprpp/host_port.cc', - 'grpc_root/src/core/lib/gprpp/linux/env.cc', - 'grpc_root/src/core/lib/gprpp/mpscq.cc', - 'grpc_root/src/core/lib/gprpp/posix/env.cc', - 'grpc_root/src/core/lib/gprpp/posix/stat.cc', - 'grpc_root/src/core/lib/gprpp/posix/thd.cc', - 'grpc_root/src/core/lib/gprpp/ref_counted_string.cc', - 'grpc_root/src/core/lib/gprpp/strerror.cc', - 'grpc_root/src/core/lib/gprpp/tchar.cc', - 'grpc_root/src/core/lib/gprpp/time_util.cc', - 'grpc_root/src/core/lib/gprpp/windows/env.cc', - 'grpc_root/src/core/lib/gprpp/windows/stat.cc', - 'grpc_root/src/core/lib/gprpp/windows/thd.cc', 'grpc_root/src/core/lib/slice/slice.cc', 'grpc_root/src/core/lib/slice/slice_string_helpers.cc', 'grpc_root/src/core/util/alloc.cc', 'grpc_root/src/core/util/atm.cc', + 'grpc_root/src/core/util/crash.cc', + 'grpc_root/src/core/util/examine_stack.cc', + 'grpc_root/src/core/util/fork.cc', + 'grpc_root/src/core/util/glob.cc', + 'grpc_root/src/core/util/gpr_time.cc', + 'grpc_root/src/core/util/host_port.cc', 'grpc_root/src/core/util/iphone/cpu.cc', 'grpc_root/src/core/util/linux/cpu.cc', + 'grpc_root/src/core/util/linux/env.cc', 'grpc_root/src/core/util/log.cc', + 'grpc_root/src/core/util/mpscq.cc', 'grpc_root/src/core/util/msys/tmpfile.cc', 'grpc_root/src/core/util/posix/cpu.cc', + 'grpc_root/src/core/util/posix/env.cc', + 'grpc_root/src/core/util/posix/stat.cc', 'grpc_root/src/core/util/posix/string.cc', 'grpc_root/src/core/util/posix/sync.cc', + 'grpc_root/src/core/util/posix/thd.cc', 'grpc_root/src/core/util/posix/time.cc', 'grpc_root/src/core/util/posix/tmpfile.cc', + 'grpc_root/src/core/util/ref_counted_string.cc', + 'grpc_root/src/core/util/strerror.cc', 'grpc_root/src/core/util/string.cc', 'grpc_root/src/core/util/sync.cc', 'grpc_root/src/core/util/sync_abseil.cc', - 'grpc_root/src/core/util/time.cc', + 'grpc_root/src/core/util/tchar.cc', 'grpc_root/src/core/util/time_precise.cc', + 'grpc_root/src/core/util/time_util.cc', 'grpc_root/src/core/util/windows/cpu.cc', + 'grpc_root/src/core/util/windows/env.cc', + 'grpc_root/src/core/util/windows/stat.cc', 'grpc_root/src/core/util/windows/string.cc', 'grpc_root/src/core/util/windows/string_util.cc', 'grpc_root/src/core/util/windows/sync.cc', + 'grpc_root/src/core/util/windows/thd.cc', 'grpc_root/src/core/util/windows/time.cc', 'grpc_root/src/core/util/windows/tmpfile.cc', 'third_party/abseil-cpp/absl/base/internal/cycleclock.cc', diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 3188e99131d34..0993c4a263f4e 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_status/grpc_version.py b/src/python/grpcio_status/grpc_version.py index b8977a4bf0b68..90caee7f2d04f 100644 --- a/src/python/grpcio_status/grpc_version.py +++ b/src/python/grpcio_status/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_testing/grpc_version.py b/src/python/grpcio_testing/grpc_version.py index 289ca84aaa319..f3af99c647883 100644 --- a/src/python/grpcio_testing/grpc_version.py +++ b/src/python/grpcio_testing/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index a5c243e7c90f6..53013d83e2bec 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/src/python/grpcio_tests/tests/_result.py b/src/python/grpcio_tests/tests/_result.py index 6f621d7e75e25..aa710a4c0fb05 100644 --- a/src/python/grpcio_tests/tests/_result.py +++ b/src/python/grpcio_tests/tests/_result.py @@ -15,6 +15,7 @@ from __future__ import absolute_import import collections +import datetime import io import itertools import traceback @@ -290,14 +291,28 @@ def __init__(self, out, id_map): """ super(TerminalResult, self).__init__(id_map=id_map) self.out = out + self.start_time = None def startTestRun(self): """See unittest.TestResult.startTestRun.""" super(TerminalResult, self).startTestRun() self.out.write( - _Colors.HEADER + "Testing gRPC Python...\n" + _Colors.END + _Colors.HEADER + + " [{}]Testing gRPC Python...\n".format(datetime.datetime.now()) + + _Colors.END ) + def startTest(self, test): + """See unittest.TestResult.startTest.""" + super(TerminalResult, self).startTest(test) + self.start_time = datetime.datetime.now() + self.out.write( + _Colors.INFO + + " [{}]START {}\n".format(self.start_time, test.id()) + + _Colors.END + ) + self.out.flush() + def stopTestRun(self): """See unittest.TestResult.stopTestRun.""" super(TerminalResult, self).stopTestRun() @@ -307,24 +322,42 @@ def stopTestRun(self): def addError(self, test, err): """See unittest.TestResult.addError.""" super(TerminalResult, self).addError(test, err) + end_time = datetime.datetime.now() + duration = end_time - self.start_time self.out.write( - _Colors.FAIL + "ERROR {}\n".format(test.id()) + _Colors.END + _Colors.FAIL + + " [{}]ERROR {}[Duration: {}]\n".format( + datetime.datetime.now(), test.id(), duration + ) + + _Colors.END ) self.out.flush() def addFailure(self, test, err): """See unittest.TestResult.addFailure.""" super(TerminalResult, self).addFailure(test, err) + end_time = datetime.datetime.now() + duration = end_time - self.start_time self.out.write( - _Colors.FAIL + "FAILURE {}\n".format(test.id()) + _Colors.END + _Colors.FAIL + + " [{}]FAILURE {}[Duration: {}]\n".format( + datetime.datetime.now(), test.id(), duration + ) + + _Colors.END ) self.out.flush() def addSuccess(self, test): """See unittest.TestResult.addSuccess.""" super(TerminalResult, self).addSuccess(test) + end_time = datetime.datetime.now() + duration = end_time - self.start_time self.out.write( - _Colors.OK + "SUCCESS {}\n".format(test.id()) + _Colors.END + _Colors.OK + + " [{}]SUCCESS {}[Duration: {}]\n".format( + end_time, test.id(), duration + ) + + _Colors.END ) self.out.flush() diff --git a/src/python/grpcio_tests/tests_aio/unit/call_test.py b/src/python/grpcio_tests/tests_aio/unit/call_test.py index 6885f0301e85c..b6f09886544ed 100644 --- a/src/python/grpcio_tests/tests_aio/unit/call_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/call_test.py @@ -817,7 +817,6 @@ async def test_cancel_after_done_writing(self): await call.done_writing() # Cancels the RPC - self.assertFalse(call.done()) self.assertFalse(call.cancelled()) self.assertTrue(call.cancel()) self.assertTrue(call.cancelled()) diff --git a/src/python/grpcio_tests/tests_aio/unit/connectivity_test.py b/src/python/grpcio_tests/tests_aio/unit/connectivity_test.py index 9af401a377e4a..9e3ae3af7b4bd 100644 --- a/src/python/grpcio_tests/tests_aio/unit/connectivity_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/connectivity_test.py @@ -55,7 +55,7 @@ async def test_unavailable_backend(self): _common.block_until_certain_state( channel, grpc.ChannelConnectivity.TRANSIENT_FAILURE ), - test_constants.SHORT_TIMEOUT, + test_constants.SHORT_TIMEOUT * 2, ) async def test_normal_backend(self): diff --git a/src/ruby/end2end/bad_usage_fork_test.rb b/src/ruby/end2end/bad_usage_fork_test.rb index f6ba65d34c696..c796b8510a77c 100755 --- a/src/ruby/end2end/bad_usage_fork_test.rb +++ b/src/ruby/end2end/bad_usage_fork_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_test.rb b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_test.rb index eda85c6da091d..d6da32a1b8662 100755 --- a/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_test.rb +++ b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_test.rb @@ -21,6 +21,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/call_credentials_timeout_test.rb b/src/ruby/end2end/call_credentials_timeout_test.rb index 3d442d854c18a..acc817657186a 100755 --- a/src/ruby/end2end/call_credentials_timeout_test.rb +++ b/src/ruby/end2end/call_credentials_timeout_test.rb @@ -21,6 +21,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/errors_load_before_grpc_lib_test.rb b/src/ruby/end2end/errors_load_before_grpc_lib_test.rb index 56f7714fc7ccf..7c75367872050 100755 --- a/src/ruby/end2end/errors_load_before_grpc_lib_test.rb +++ b/src/ruby/end2end/errors_load_before_grpc_lib_test.rb @@ -18,6 +18,8 @@ grpc_lib_dir = File.join(File.dirname(this_dir), 'lib') $LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir) +require_relative './sanity_check_dlopen' + def check_to_status(error) my_status = error.to_status fail('GRPC BadStatus#to_status not expected to return nil') if my_status.nil? diff --git a/src/ruby/end2end/fork_test.rb b/src/ruby/end2end/fork_test.rb index 6c92c0893c6b4..38a8843c98549 100755 --- a/src/ruby/end2end/fork_test.rb +++ b/src/ruby/end2end/fork_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/load_grpc_with_gc_stress_test.rb b/src/ruby/end2end/load_grpc_with_gc_stress_test.rb index 9b0ca765f86bf..4ed3e1af3f658 100755 --- a/src/ruby/end2end/load_grpc_with_gc_stress_test.rb +++ b/src/ruby/end2end/load_grpc_with_gc_stress_test.rb @@ -21,6 +21,8 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' + GC.stress = 0x04 require 'grpc' diff --git a/src/ruby/end2end/logger_load_before_grpc_lib_test.rb b/src/ruby/end2end/logger_load_before_grpc_lib_test.rb index 76c3787504020..8e58667bff3eb 100755 --- a/src/ruby/end2end/logger_load_before_grpc_lib_test.rb +++ b/src/ruby/end2end/logger_load_before_grpc_lib_test.rb @@ -18,6 +18,8 @@ grpc_lib_dir = File.join(File.dirname(this_dir), 'lib') $LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir) +require_relative './sanity_check_dlopen' + def main fail('GRPC constant loaded before expected') if Object.const_defined?(:GRPC) require 'grpc/logconfig' diff --git a/src/ruby/end2end/prefork_postfork_loop_test.rb b/src/ruby/end2end/prefork_postfork_loop_test.rb index a09f85bcc775a..0613b374b0681 100755 --- a/src/ruby/end2end/prefork_postfork_loop_test.rb +++ b/src/ruby/end2end/prefork_postfork_loop_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/prefork_without_using_grpc_test.rb b/src/ruby/end2end/prefork_without_using_grpc_test.rb index f6791b27ad6fb..ec6736a90316a 100755 --- a/src/ruby/end2end/prefork_without_using_grpc_test.rb +++ b/src/ruby/end2end/prefork_without_using_grpc_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/sanity_check_dlopen.rb b/src/ruby/end2end/sanity_check_dlopen.rb new file mode 100755 index 0000000000000..e536100bad942 --- /dev/null +++ b/src/ruby/end2end/sanity_check_dlopen.rb @@ -0,0 +1,74 @@ +#!/usr/bin/env ruby +# +# Copyright 2016 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. + +# Some tests are flaking by failing to dlopen grpc. Perform some sanity checks. +this_dir = File.expand_path(File.dirname(__FILE__)) +grpc_bin_dir = File.join(File.join(File.dirname(this_dir), 'lib'), 'grpc') +grpc_c_sha256_path = File.join(grpc_bin_dir, 'grpc_c_sha256') +grpc_c_so_path = if RUBY_PLATFORM =~ /darwin/ + File.join(grpc_bin_dir, 'grpc_c.bundle') + else + File.join(grpc_bin_dir, 'grpc_c.so') + end + +require 'digest' + +# first try to detect corruption b/t the build and now +actual_sha256 = Digest::SHA256.file(grpc_c_so_path).hexdigest +expected_sha256 = File.read(grpc_c_sha256_path).chomp +raise "detected corruption in #{grpc_c_so_path}: sha256: |#{actual_sha256}| != expected sha256: |#{expected_sha256}|" if actual_sha256 != expected_sha256 +STDERR.puts "verified sha256 of #{grpc_c_so_path}" + +def try_command(command) + STDERR.puts "==== run |#{command}| BEGIN ====" + output = `#{command} || true` + STDERR.puts output + STDERR.puts "==== run |#{command}| DONE ====" +end + +try_command('vm_stat') +try_command('free') +try_command('ulimit -v') + +# sanity check that we can load grpc in a child process, log things like available +# memory on the off chance we might be low. +pid = fork do + STDERR.puts "==== sanity check child process BEGIN ====" + def dump(file_path) + STDERR.puts "==== dump file: #{file_path} BEGIN ====" + if File.exist?(file_path) + File.open(file_path, 'r') do |file| + file.each_line do |line| + puts line + end + end + else + STDERR.puts "file: #{file_path} does not exist" + end + STDERR.puts "==== dump file: #{file_path} DONE ====" + end + dump("/proc/#{Process.pid}/limits") + dump("/proc/#{Process.pid}/status") + STDERR.puts "==== sanity check require grpc in child process BEGIN =====" + require 'grpc' + STDERR.puts "==== sanity check require grpc in child process DONE =====" + dump("/proc/#{Process.pid}/limits") + dump("/proc/#{Process.pid}/status") + STDERR.puts "==== sanity check child process DONE ====" +end +_, status = Process.wait2(pid) +fail "sanity check require grpc in child process FAILED exit code #{status.exitstatus}" unless status.success? +STDERR.puts "==== sanity check require grpc in child process SUCCESS =====" diff --git a/src/ruby/end2end/secure_fork_test.rb b/src/ruby/end2end/secure_fork_test.rb index d6af2fb202478..a37087913de9f 100755 --- a/src/ruby/end2end/secure_fork_test.rb +++ b/src/ruby/end2end/secure_fork_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/simple_fork_test.rb b/src/ruby/end2end/simple_fork_test.rb index ca5e867457ce5..999dd37856780 100755 --- a/src/ruby/end2end/simple_fork_test.rb +++ b/src/ruby/end2end/simple_fork_test.rb @@ -24,6 +24,7 @@ $LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) $LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) +require 'sanity_check_dlopen' require 'grpc' require 'end2end_common' diff --git a/src/ruby/end2end/status_codes_load_before_grpc_lib_test.rb b/src/ruby/end2end/status_codes_load_before_grpc_lib_test.rb index 010c94cb91b87..4eca92073d696 100755 --- a/src/ruby/end2end/status_codes_load_before_grpc_lib_test.rb +++ b/src/ruby/end2end/status_codes_load_before_grpc_lib_test.rb @@ -18,6 +18,8 @@ grpc_lib_dir = File.join(File.dirname(this_dir), 'lib') $LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir) +require_relative './sanity_check_dlopen' + def main fail('GRPC constant loaded before expected') if Object.const_defined?(:GRPC) require 'grpc/core/status_codes' diff --git a/src/ruby/ext/grpc/rb_compression_options.c b/src/ruby/ext/grpc/rb_compression_options.c index 7bdc33004e850..a38790faf7999 100644 --- a/src/ruby/ext/grpc/rb_compression_options.c +++ b/src/ruby/ext/grpc/rb_compression_options.c @@ -296,7 +296,7 @@ VALUE grpc_rb_compression_options_level_value_to_name_internal( * Fails if the enum value is invalid. */ VALUE grpc_rb_compression_options_algorithm_value_to_name_internal( grpc_compression_algorithm internal_value) { - char* algorithm_name = NULL; + const char* algorithm_name = NULL; if (!grpc_compression_algorithm_name(internal_value, &algorithm_name)) { rb_raise(rb_eArgError, "Failed to convert algorithm value to name"); diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index a36b7ff6d2345..e74d4085150bc 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -14,5 +14,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.67.0.dev' + VERSION = '1.68.0.dev' end diff --git a/src/ruby/nativedebug/version.rb b/src/ruby/nativedebug/version.rb index bfd6738d99816..8724369157820 100644 --- a/src/ruby/nativedebug/version.rb +++ b/src/ruby/nativedebug/version.rb @@ -14,6 +14,6 @@ module GRPC module NativeDebug - VERSION = '1.67.0.dev' + VERSION = '1.68.0.dev' end end diff --git a/src/ruby/spec/generic/client_stub_spec.rb b/src/ruby/spec/generic/client_stub_spec.rb index 5cc0679b3c6d4..62788f7529114 100644 --- a/src/ruby/spec/generic/client_stub_spec.rb +++ b/src/ruby/spec/generic/client_stub_spec.rb @@ -453,23 +453,23 @@ def run_op_view_metadata_test(run_start_call_first) describe '#server_streamer', server_streamer: true do before(:each) do @sent_msg = 'a_msg' - @replys = Array.new(3) { |i| 'reply_' + (i + 1).to_s } + @replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s } end shared_examples 'server streaming' do it 'should send a request to/receive replies from a server' do server_port = create_test_server host = "localhost:#{server_port}" - th = run_server_streamer(@sent_msg, @replys, @pass) + th = run_server_streamer(@sent_msg, @replies, @pass) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) - expect(get_responses(stub).collect { |r| r }).to eq(@replys) + expect(get_responses(stub).collect { |r| r }).to eq(@replies) th.join end it 'should raise an error if the status is not ok' do server_port = create_test_server host = "localhost:#{server_port}" - th = run_server_streamer(@sent_msg, @replys, @fail) + th = run_server_streamer(@sent_msg, @replies, @fail) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) e = get_responses(stub) expect { e.collect { |r| r } }.to raise_error(GRPC::BadStatus) @@ -479,7 +479,7 @@ def run_op_view_metadata_test(run_start_call_first) it 'should send metadata to the server ok' do server_port = create_test_server host = "localhost:#{server_port}" - th = run_server_streamer(@sent_msg, @replys, @fail, + th = run_server_streamer(@sent_msg, @replies, @fail, expected_metadata: { k1: 'v1', k2: 'v2' }) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) e = get_responses(stub) @@ -502,7 +502,7 @@ def run_op_view_metadata_test(run_start_call_first) server_port = create_test_server host = "localhost:#{server_port}" th = run_server_streamer_handle_client_cancellation( - @sent_msg, @replys) + @sent_msg, @replies) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) unmarshal = proc { fail(ArgumentError, 'test unmarshalling error') } @@ -547,13 +547,13 @@ def run_op_view_metadata_test(run_start_call_first) @server_initial_md = { 'sk1' => 'sv1', 'sk2' => 'sv2' } @server_trailing_md = { 'tk1' => 'tv1', 'tk2' => 'tv2' } th = run_server_streamer( - @sent_msg, @replys, @pass, + @sent_msg, @replies, @pass, expected_metadata: @metadata, server_initial_md: @server_initial_md, server_trailing_md: @server_trailing_md) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) e = get_responses(stub, run_start_call_first: run_start_call_first) - expect(e.collect { |r| r }).to eq(@replys) + expect(e.collect { |r| r }).to eq(@replies) th.join end @@ -577,7 +577,7 @@ def run_op_view_metadata_test(run_start_call_first) server_port = create_test_server host = "localhost:#{server_port}" th = run_server_streamer_handle_client_cancellation( - @sent_msg, @replys) + @sent_msg, @replies) stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) resp = get_responses(stub, run_start_call_first: false) expect(resp.next).to eq('reply_1') @@ -591,18 +591,18 @@ def run_op_view_metadata_test(run_start_call_first) describe '#bidi_streamer', bidi: true do before(:each) do @sent_msgs = Array.new(3) { |i| 'msg_' + (i + 1).to_s } - @replys = Array.new(3) { |i| 'reply_' + (i + 1).to_s } + @replies = Array.new(3) { |i| 'reply_' + (i + 1).to_s } server_port = create_test_server @host = "localhost:#{server_port}" end shared_examples 'bidi streaming' do it 'supports sending all the requests first' do - th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replys, + th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replies, @pass) stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) e = get_responses(stub) - expect(e.collect { |r| r }).to eq(@replys) + expect(e.collect { |r| r }).to eq(@replies) th.join end @@ -724,7 +724,7 @@ def run_error_in_client_request_stream_test(requests_to_push, requests_to_push, request_queue, expected_error_message) - # the write loop errror should cancel the call and end the + # the write loop error should cancel the call and end the # server's request stream th.join end @@ -777,7 +777,7 @@ def run_server_bidi_shutdown_after_one_read it 'receives a grpc status code when writes to a bidi stream fail' do # This test tries to trigger the case when a 'SEND_MESSAGE' op - # and subseqeunt 'SEND_CLOSE_FROM_CLIENT' op of a bidi stream fails. + # and subsequent 'SEND_CLOSE_FROM_CLIENT' op of a bidi stream fails. # In this case, iteration through the response stream should result # in a grpc status code, and the writer thread should not raise an # exception. @@ -942,7 +942,7 @@ def run_server_bidi_expect_client_to_cancel(wait_for_shutdown_ok_callback) end end - def run_server_streamer(expected_input, replys, status, + def run_server_streamer(expected_input, replies, status, expected_metadata: {}, server_initial_md: {}, server_trailing_md: {}) @@ -954,19 +954,19 @@ def run_server_streamer(expected_input, replys, status, expect(c.metadata[k.to_s]).to eq(v) end expect(c.remote_read).to eq(expected_input) - replys.each { |r| c.remote_send(r) } + replies.each { |r| c.remote_send(r) } c.send_status(status, status == @pass ? 'OK' : 'NOK', true, metadata: server_trailing_md) close_active_server_call(c) end end - def run_bidi_streamer_handle_inputs_first(expected_inputs, replys, + def run_bidi_streamer_handle_inputs_first(expected_inputs, replies, status) wakey_thread do |notifier| c = expect_server_to_be_invoked(notifier) expected_inputs.each { |i| expect(c.remote_read).to eq(i) } - replys.each { |r| c.remote_send(r) } + replies.each { |r| c.remote_send(r) } c.send_status(status, status == @pass ? 'OK' : 'NOK', true) close_active_server_call(c) end @@ -1018,12 +1018,12 @@ def run_client_streamer(expected_inputs, resp, status, end def run_server_streamer_handle_client_cancellation( - expected_input, replys) + expected_input, replies) wakey_thread do |notifier| c = expect_server_to_be_invoked(notifier) expect(c.remote_read).to eq(expected_input) begin - replys.each { |r| c.remote_send(r) } + replies.each { |r| c.remote_send(r) } rescue GRPC::Core::CallError # An attempt to write to the client might fail. This is ok # because the client call is expected to cancel the call, diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index abfb5c3783ee8..3681d9147d248 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -14,6 +14,6 @@ module GRPC module Tools - VERSION = '1.67.0.dev' + VERSION = '1.68.0.dev' end end diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 18595b90ce6cc..b6ffab39cdf9c 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -199,7 +199,7 @@ ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version ss.dependency "#{s.name}/Privacy", version - ss.dependency 'BoringSSL-GRPC', '0.0.36' + ss.dependency 'BoringSSL-GRPC', '0.0.37' % for abseil_spec in grpc_abseil_specs: ss.dependency '${abseil_spec}', abseil_version % endfor diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template index 0551011773299..274cd3c5f14b2 100644 --- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template +++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template @@ -70,7 +70,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.36' + version = '0.0.37' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: @@ -163,7 +163,7 @@ ss.source_files = 'src/ssl/*.{h,c,cc}', 'src/ssl/**/*.{h,c,cc}', 'src/crypto/*.{h,c,cc}', - 'src/crypto/**/*.{h,c,cc}', + 'src/crypto/**/*.{h,c,cc,inc}', # We have to include fiat because spake25519 depends on it 'src/third_party/fiat/*.{h,c,cc}', # Include the err_data.c pre-generated in boringssl's master-with-bazel branch @@ -174,11 +174,7 @@ 'src/crypto/*.h', 'src/crypto/**/*.h', 'src/third_party/fiat/*.h' - # bcm.c includes other source files, creating duplicated symbols. Since it is not used, we - # explicitly exclude it from the pod. - # TODO (mxyan): Work with BoringSSL team to remove this hack. - ss.exclude_files = 'src/crypto/fipsmodule/bcm.c', - 'src/**/*_test.*', + ss.exclude_files = 'src/**/*_test.*', 'src/**/test_*.*', 'src/**/test/*.*' @@ -221,10 +217,10 @@ EOF # We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists - find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include ;#include ;g' + find . -type f \\( -path '*.h' -or -path '*.cc' -or -path '*.c' -or -path '*.inc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include ;#include ;g' END_OF_COMMAND end diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template index c661cd4d199ee..bf6d317fe7ca5 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template @@ -14,6 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. + # Since the image names depend on the digest of the Dockerfile, updating the + # the following comment is a simple way to re-build the image with a new Go + # version. + # latest points to 1.23.1 at the time of building. FROM golang:latest <%include file="../../go_path.include"/> diff --git a/test/core/address_utils/parse_address_with_named_scope_id_test.cc b/test/core/address_utils/parse_address_with_named_scope_id_test.cc index 19b21f35027bd..c8e85ad1e2632 100644 --- a/test/core/address_utils/parse_address_with_named_scope_id_test.cc +++ b/test/core/address_utils/parse_address_with_named_scope_id_test.cc @@ -37,12 +37,12 @@ #include #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/sockaddr.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" +#include "src/core/util/uri.h" #include "test/core/test_util/test_config.h" static void test_grpc_parse_ipv6_parity_with_getaddrinfo( diff --git a/test/core/address_utils/sockaddr_utils_fuzzer_test.cc b/test/core/address_utils/sockaddr_utils_fuzzer_test.cc index 593d99dd0e3ee..8c63854a203e5 100644 --- a/test/core/address_utils/sockaddr_utils_fuzzer_test.cc +++ b/test/core/address_utils/sockaddr_utils_fuzzer_test.cc @@ -25,7 +25,7 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" bool squelch = true; diff --git a/test/core/avl/BUILD b/test/core/avl/BUILD deleted file mode 100644 index 6ccf0c29b6532..0000000000000 --- a/test/core/avl/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2018 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. - -load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") -load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_proto_fuzzer") - -licenses(["notice"]) - -grpc_package(name = "test/core/avl") - -grpc_cc_test( - name = "avl_test", - srcs = ["avl_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:avl", - ], -) - -grpc_proto_fuzzer( - name = "avl_fuzzer", - srcs = ["avl_fuzzer.cc"], - corpus = "avl_fuzzer_corpus", - language = "C++", - proto = "avl_fuzzer.proto", - tags = ["no_windows"], - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:avl", - "//test/core/test_util:grpc_test_util", - ], -) diff --git a/test/core/backoff/BUILD b/test/core/backoff/BUILD deleted file mode 100644 index 8ce13b5f6e56c..0000000000000 --- a/test/core/backoff/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright 2016 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. - -load("//bazel:grpc_build_system.bzl", "grpc_cc_test") - -licenses(["notice"]) - -package( - features = [ - "-layering_check", - "-parse_headers", - ], -) - -grpc_cc_test( - name = "backoff_test", - srcs = ["backoff_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:backoff", - "//:grpc", - "//src/core:time", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "random_early_detection_test", - srcs = ["random_early_detection_test.cc"], - external_deps = [ - "absl/random", - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = ["//src/core:random_early_detection"], -) diff --git a/test/core/bad_client/bad_client.cc b/test/core/bad_client/bad_client.cc index 012dd6abddb6b..f338e2dc0a496 100644 --- a/test/core/bad_client/bad_client.cc +++ b/test/core/bad_client/bad_client.cc @@ -35,7 +35,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint_pair.h" @@ -45,6 +44,7 @@ #include "src/core/lib/transport/transport.h" #include "src/core/server/server.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_client/tests/duplicate_header.cc b/test/core/bad_client/tests/duplicate_header.cc index c4ed690c5b2dd..b31c966321821 100644 --- a/test/core/bad_client/tests/duplicate_header.cc +++ b/test/core/bad_client/tests/duplicate_header.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/bad_client/bad_client.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/bad_connection/close_fd_test.cc b/test/core/bad_connection/close_fd_test.cc index a2afa61fd899b..41bd7021a0f88 100644 --- a/test/core/bad_connection/close_fd_test.cc +++ b/test/core/bad_connection/close_fd_test.cc @@ -36,8 +36,6 @@ #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -45,6 +43,8 @@ #include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_TCP @@ -57,11 +57,11 @@ #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/server/server.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" static void* tag(intptr_t t) { return reinterpret_cast(t); } diff --git a/test/core/bad_ssl/bad_ssl_test.cc b/test/core/bad_ssl/bad_ssl_test.cc index c548e18870614..51fad1559446e 100644 --- a/test/core/bad_ssl/bad_ssl_test.cc +++ b/test/core/bad_ssl/bad_ssl_test.cc @@ -34,8 +34,8 @@ #include #include -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" #include "src/core/util/subprocess.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" diff --git a/test/core/call/BUILD b/test/core/call/BUILD index 3c726fbf2808b..75a590cd3e739 100644 --- a/test/core/call/BUILD +++ b/test/core/call/BUILD @@ -87,3 +87,16 @@ grpc_cc_benchmark( "//src/core:default_event_engine", ], ) + +grpc_cc_test( + name = "request_buffer_test", + srcs = [ + "request_buffer_test.cc", + ], + external_deps = ["gtest"], + language = "C++", + deps = [ + "//src/core:request_buffer", + "//test/core/promise:poll_matcher", + ], +) diff --git a/test/core/call/client_call_test.cc b/test/core/call/client_call_test.cc index 4a4ccfff0e867..ef9ba6cd1a4c8 100644 --- a/test/core/call/client_call_test.cc +++ b/test/core/call/client_call_test.cc @@ -19,9 +19,9 @@ #include #include -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/debug_location.h" #include "test/core/call/batch_builder.h" #include "test/core/call/yodel/yodel_test.h" diff --git a/test/core/call/request_buffer_test.cc b/test/core/call/request_buffer_test.cc new file mode 100644 index 0000000000000..98aba0ac49529 --- /dev/null +++ b/test/core/call/request_buffer_test.cc @@ -0,0 +1,722 @@ +// Copyright 2024 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "src/core/call/request_buffer.h" + +#include "gtest/gtest.h" + +#include "test/core/promise/poll_matcher.h" + +using testing::Mock; +using testing::StrictMock; + +namespace grpc_core { + +namespace { +void CrashOnParseError(absl::string_view error, const Slice& data) { + LOG(FATAL) << "Failed to parse " << error << " from " + << data.as_string_view(); +} + +// A mock activity that can be activated and deactivated. +class MockActivity : public Activity, public Wakeable { + public: + MOCK_METHOD(void, WakeupRequested, ()); + + void ForceImmediateRepoll(WakeupMask /*mask*/) override { WakeupRequested(); } + void Orphan() override {} + Waker MakeOwningWaker() override { return Waker(this, 0); } + Waker MakeNonOwningWaker() override { return Waker(this, 0); } + void Wakeup(WakeupMask /*mask*/) override { WakeupRequested(); } + void WakeupAsync(WakeupMask /*mask*/) override { WakeupRequested(); } + void Drop(WakeupMask /*mask*/) override {} + std::string DebugTag() const override { return "MockActivity"; } + std::string ActivityDebugTag(WakeupMask /*mask*/) const override { + return DebugTag(); + } + + void Activate() { + if (scoped_activity_ == nullptr) { + scoped_activity_ = std::make_unique(this); + } + } + + void Deactivate() { scoped_activity_.reset(); } + + private: + std::unique_ptr scoped_activity_; +}; + +#define EXPECT_WAKEUP(activity, statement) \ + EXPECT_CALL((activity), WakeupRequested()).Times(::testing::AtLeast(1)); \ + statement; \ + Mock::VerifyAndClearExpectations(&(activity)); + +ClientMetadataHandle TestMetadata() { + ClientMetadataHandle md = Arena::MakePooledForOverwrite(); + md->Append("key", Slice::FromStaticString("value"), CrashOnParseError); + return md; +} + +MessageHandle TestMessage(int index = 0) { + return Arena::MakePooled( + SliceBuffer(Slice::FromCopiedString(absl::StrCat("message ", index))), 0); +} + +MATCHER(IsTestMetadata, "") { + if (arg == nullptr) return false; + std::string backing; + if (arg->GetStringValue("key", &backing) != "value") { + *result_listener << arg->DebugString(); + return false; + } + return true; +} + +MATCHER(IsTestMessage, "") { + if (arg == nullptr) return false; + if (arg->flags() != 0) { + *result_listener << "flags: " << arg->flags(); + return false; + } + if (arg->payload()->JoinIntoString() != "message 0") { + *result_listener << "payload: " << arg->payload()->JoinIntoString(); + return false; + } + return true; +} + +MATCHER_P(IsTestMessage, index, "") { + if (arg == nullptr) return false; + if (arg->flags() != 0) { + *result_listener << "flags: " << arg->flags(); + return false; + } + if (arg->payload()->JoinIntoString() != absl::StrCat("message ", index)) { + *result_listener << "payload: " << arg->payload()->JoinIntoString(); + return false; + } + return true; +} + +} // namespace + +TEST(RequestBufferTest, NoOp) { RequestBuffer buffer; } + +TEST(RequestBufferTest, PushThenPullClientInitialMetadata) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto poll = reader.PullClientInitialMetadata()(); + ASSERT_THAT(poll, IsReady()); + auto value = std::move(poll.value()); + ASSERT_TRUE(value.ok()); + EXPECT_THAT(*value, IsTestMetadata()); +} + +TEST(RequestBufferTest, PushThenFinishThenPullClientInitialMetadata) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + buffer.FinishSends(); + RequestBuffer::Reader reader(&buffer); + auto poll = reader.PullClientInitialMetadata()(); + ASSERT_THAT(poll, IsReady()); + auto value = std::move(poll.value()); + ASSERT_TRUE(value.ok()); + EXPECT_THAT(*value, IsTestMetadata()); +} + +TEST(RequestBufferTest, PullThenPushClientInitialMetadata) { + StrictMock activity; + RequestBuffer buffer; + RequestBuffer::Reader reader(&buffer); + activity.Activate(); + auto poller = reader.PullClientInitialMetadata(); + auto poll = poller(); + EXPECT_THAT(poll, IsPending()); + ClientMetadataHandle md = Arena::MakePooledForOverwrite(); + md->Append("key", Slice::FromStaticString("value"), CrashOnParseError); + EXPECT_WAKEUP(activity, + EXPECT_EQ(buffer.PushClientInitialMetadata(std::move(md)), 40)); + poll = poller(); + ASSERT_THAT(poll, IsReady()); + auto value = std::move(poll.value()); + ASSERT_TRUE(value.ok()); + EXPECT_THAT(*value, IsTestMetadata()); +} + +TEST(RequestBufferTest, PushThenPullMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PushThenPullMessageStreamBeforeInitialMetadata) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + RequestBuffer::Reader reader(&buffer); + buffer.Commit(&reader); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PushThenPullMessageStreamBeforeFirstMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + buffer.Commit(&reader); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PullThenPushMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + EXPECT_THAT(poll_msg, IsPending()); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_WAKEUP(activity, EXPECT_THAT(pusher(), IsReady(49))); + poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PullThenPushMessageSwitchBeforePullMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + buffer.Commit(&reader); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + EXPECT_THAT(poll_msg, IsPending()); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_WAKEUP(activity, EXPECT_THAT(pusher(), IsReady(0))); + poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PullThenPushMessageSwitchBeforePushMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + EXPECT_THAT(poll_msg, IsPending()); + buffer.Commit(&reader); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_WAKEUP(activity, EXPECT_THAT(pusher(), IsReady(0))); + poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PullThenPushMessageSwitchAfterPushMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + EXPECT_THAT(poll_msg, IsPending()); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_WAKEUP(activity, EXPECT_THAT(pusher(), IsReady(49))); + buffer.Commit(&reader); + poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); +} + +TEST(RequestBufferTest, PullEndOfStream) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, PullEndOfStreamSwitchBeforePullMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + buffer.Commit(&reader); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, PullEndOfStreamSwitchBeforePushMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + buffer.Commit(&reader); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsPending()); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_WAKEUP(activity, + EXPECT_THAT(pull_md(), IsReady())); // value tested elsewhere + EXPECT_THAT(pusher(), IsReady(0)); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, PullEndOfStreamQueuedWithMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, + PullEndOfStreamQueuedWithMessageSwitchBeforePushMessage) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + buffer.Commit(&reader); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsPending()); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_WAKEUP(activity, + EXPECT_THAT(pull_md(), IsReady())); // value tested elsewhere + EXPECT_THAT(pusher(), IsReady(0)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, + PullEndOfStreamQueuedWithMessageSwitchBeforePullMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + buffer.Commit(&reader); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, + PullEndOfStreamQueuedWithMessageSwitchDuringPullMessage) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pull_msg = reader.PullMessage(); + buffer.Commit(&reader); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, PushThenPullMessageRepeatedly) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + for (int i = 0; i < 10; i++) { + auto pusher = buffer.PushMessage(TestMessage(i)); + EXPECT_THAT(pusher(), IsReady(40 + 9 * (i + 1))); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage(i)); + } +} + +TEST(RequestBufferTest, PushSomeSwitchThenPushPullMessages) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + for (int i = 0; i < 10; i++) { + auto pusher = buffer.PushMessage(TestMessage(i)); + EXPECT_THAT(pusher(), IsReady(40 + 9 * (i + 1))); + } + buffer.Commit(&reader); + for (int i = 0; i < 10; i++) { + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage(i)); + } + for (int i = 0; i < 10; i++) { + auto pusher = buffer.PushMessage(TestMessage(i)); + EXPECT_THAT(pusher(), IsReady(0)); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage(i)); + } +} + +TEST(RequestBufferTest, HedgeReadMetadata) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader1(&buffer); + RequestBuffer::Reader reader2(&buffer); + auto pull_md1 = reader1.PullClientInitialMetadata(); + auto pull_md2 = reader2.PullClientInitialMetadata(); + auto poll_md1 = pull_md1(); + auto poll_md2 = pull_md2(); + ASSERT_THAT(poll_md1, IsReady()); + ASSERT_THAT(poll_md2, IsReady()); + auto value1 = std::move(poll_md1.value()); + auto value2 = std::move(poll_md2.value()); + ASSERT_TRUE(value1.ok()); + ASSERT_TRUE(value2.ok()); + EXPECT_THAT(*value1, IsTestMetadata()); + EXPECT_THAT(*value2, IsTestMetadata()); +} + +TEST(RequestBufferTest, HedgeReadMetadataSwitchBeforeFirstRead) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader1(&buffer); + buffer.Commit(&reader1); + RequestBuffer::Reader reader2(&buffer); + auto pull_md1 = reader1.PullClientInitialMetadata(); + auto pull_md2 = reader2.PullClientInitialMetadata(); + auto poll_md1 = pull_md1(); + auto poll_md2 = pull_md2(); + ASSERT_THAT(poll_md1, IsReady()); + ASSERT_THAT(poll_md2, IsReady()); + auto value1 = std::move(poll_md1.value()); + auto value2 = std::move(poll_md2.value()); + ASSERT_TRUE(value1.ok()); + EXPECT_FALSE(value2.ok()); + EXPECT_THAT(*value1, IsTestMetadata()); +} + +TEST(RequestBufferTest, HedgeReadMetadataLate) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader1(&buffer); + auto pull_md1 = reader1.PullClientInitialMetadata(); + auto poll_md1 = pull_md1(); + ASSERT_THAT(poll_md1, IsReady()); + auto value1 = std::move(poll_md1.value()); + ASSERT_TRUE(value1.ok()); + EXPECT_THAT(*value1, IsTestMetadata()); + RequestBuffer::Reader reader2(&buffer); + auto pull_md2 = reader2.PullClientInitialMetadata(); + auto poll_md2 = pull_md2(); + ASSERT_THAT(poll_md2, IsReady()); + auto value2 = std::move(poll_md2.value()); + ASSERT_TRUE(value2.ok()); + EXPECT_THAT(*value2, IsTestMetadata()); +} + +TEST(RequestBufferTest, HedgeReadMetadataLateSwitchAfterPullInitialMetadata) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader1(&buffer); + auto pull_md1 = reader1.PullClientInitialMetadata(); + auto poll_md1 = pull_md1(); + ASSERT_THAT(poll_md1, IsReady()); + auto value1 = std::move(poll_md1.value()); + ASSERT_TRUE(value1.ok()); + EXPECT_THAT(*value1, IsTestMetadata()); + RequestBuffer::Reader reader2(&buffer); + buffer.Commit(&reader1); + auto pull_md2 = reader2.PullClientInitialMetadata(); + auto poll_md2 = pull_md2(); + ASSERT_THAT(poll_md2, IsReady()); + auto value2 = std::move(poll_md2.value()); + EXPECT_FALSE(value2.ok()); +} + +TEST(RequestBufferTest, StreamingPushBeforeLastMessagePulled) { + StrictMock activity; + activity.Activate(); + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + buffer.Commit(&reader); + auto pusher1 = buffer.PushMessage(TestMessage(1)); + EXPECT_THAT(pusher1(), IsReady(0)); + auto pusher2 = buffer.PushMessage(TestMessage(2)); + EXPECT_THAT(pusher2(), IsPending()); + auto pull1 = reader.PullMessage(); + EXPECT_WAKEUP(activity, auto poll1 = pull1()); + ASSERT_THAT(poll1, IsReady()); + ASSERT_TRUE(poll1.value().ok()); + ASSERT_TRUE(poll1.value().value().has_value()); + EXPECT_THAT(poll1.value().value().value(), IsTestMessage(1)); + auto pull2 = reader.PullMessage(); + auto poll2 = pull2(); + EXPECT_THAT(poll2, IsPending()); + EXPECT_WAKEUP(activity, EXPECT_THAT(pusher2(), IsReady(0))); + poll2 = pull2(); + ASSERT_THAT(poll2, IsReady()); + ASSERT_TRUE(poll2.value().ok()); + ASSERT_TRUE(poll2.value().value().has_value()); + EXPECT_THAT(poll2.value().value().value(), IsTestMessage(2)); +} + +TEST(RequestBufferTest, SwitchAfterEndOfStream) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + buffer.Commit(&reader); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + EXPECT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, NothingAfterEndOfStream) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + EXPECT_THAT(pull_md(), IsReady()); // value tested elsewhere + auto pusher = buffer.PushMessage(TestMessage()); + EXPECT_THAT(pusher(), IsReady(49)); + EXPECT_EQ(buffer.FinishSends(), Success{}); + auto pull_msg = reader.PullMessage(); + auto poll_msg = pull_msg(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + ASSERT_TRUE(poll_msg.value().value().has_value()); + EXPECT_THAT(poll_msg.value().value().value(), IsTestMessage()); + auto pull_msg2 = reader.PullMessage(); + poll_msg = pull_msg2(); + ASSERT_THAT(poll_msg, IsReady()); + ASSERT_TRUE(poll_msg.value().ok()); + EXPECT_FALSE(poll_msg.value().value().has_value()); +} + +TEST(RequestBufferTest, CancelBeforeInitialMetadataPush) { + RequestBuffer buffer; + buffer.Cancel(); + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), Failure{}); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + auto poll_md = pull_md(); + ASSERT_THAT(poll_md, IsReady()); + ASSERT_FALSE(poll_md.value().ok()); +} + +TEST(RequestBufferTest, CancelBeforeInitialMetadataPull) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + buffer.Cancel(); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + auto poll_md = pull_md(); + ASSERT_THAT(poll_md, IsReady()); + ASSERT_FALSE(poll_md.value().ok()); +} + +TEST(RequestBufferTest, CancelBeforeMessagePush) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + buffer.Cancel(); + auto pusher = buffer.PushMessage(TestMessage()); + auto poll = pusher(); + ASSERT_THAT(poll, IsReady()); + ASSERT_FALSE(poll.value().ok()); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + auto poll_md = pull_md(); + ASSERT_THAT(poll_md, IsReady()); + ASSERT_FALSE(poll_md.value().ok()); +} + +TEST(RequestBufferTest, CancelBeforeMessagePushButAfterInitialMetadataPull) { + RequestBuffer buffer; + EXPECT_EQ(buffer.PushClientInitialMetadata(TestMetadata()), 40); + RequestBuffer::Reader reader(&buffer); + auto pull_md = reader.PullClientInitialMetadata(); + auto poll_md = pull_md(); + ASSERT_THAT(poll_md, IsReady()); + ASSERT_TRUE(poll_md.value().ok()); + EXPECT_THAT(*poll_md.value(), IsTestMetadata()); + buffer.Cancel(); + auto pusher = buffer.PushMessage(TestMessage()); + auto poll = pusher(); + ASSERT_THAT(poll, IsReady()); + ASSERT_FALSE(poll.value().ok()); +} + +} // namespace grpc_core + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/core/call/yodel/fuzzer_main.cc b/test/core/call/yodel/fuzzer_main.cc index ce9075485f912..0f14c28eb51e0 100644 --- a/test/core/call/yodel/fuzzer_main.cc +++ b/test/core/call/yodel/fuzzer_main.cc @@ -23,7 +23,7 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/call/yodel/fuzzer.pb.h" #include "test/core/call/yodel/yodel_test.h" diff --git a/test/core/call/yodel/yodel_test.h b/test/core/call/yodel/yodel_test.h index add0950e76fb7..7ccb97e7d6af0 100644 --- a/test/core/call/yodel/yodel_test.h +++ b/test/core/call/yodel/yodel_test.h @@ -24,13 +24,13 @@ #include #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/transport/call_arena_allocator.h" #include "src/core/lib/transport/call_spine.h" #include "src/core/lib/transport/metadata.h" +#include "src/core/util/debug_location.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/channel/call_finalization_test.cc b/test/core/channel/call_finalization_test.cc index 2539d753ac35a..9e7ba84794d14 100644 --- a/test/core/channel/call_finalization_test.cc +++ b/test/core/channel/call_finalization_test.cc @@ -22,9 +22,9 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_context.h" namespace grpc_core { diff --git a/test/core/channel/channel_args_test.cc b/test/core/channel/channel_args_test.cc index 09f65577f0ed6..bb19b352e2139 100644 --- a/test/core/channel/channel_args_test.cc +++ b/test/core/channel/channel_args_test.cc @@ -30,10 +30,10 @@ #include #include -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/channel/channel_stack_test.cc b/test/core/channel/channel_stack_test.cc index 10d4ee8e5fbd7..1c722beb28215 100644 --- a/test/core/channel/channel_stack_test.cc +++ b/test/core/channel/channel_stack_test.cc @@ -27,8 +27,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/status_helper.h" #include "test/core/test_util/test_config.h" static grpc_error_handle channel_init_func(grpc_channel_element* elem, diff --git a/test/core/channel/server_call_tracer_factory_test.cc b/test/core/channel/server_call_tracer_factory_test.cc index fd4b2bac8d9bb..821087f9d93af 100644 --- a/test/core/channel/server_call_tracer_factory_test.cc +++ b/test/core/channel/server_call_tracer_factory_test.cc @@ -17,9 +17,9 @@ #include "gtest/gtest.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/crash.h" namespace grpc_core { namespace { diff --git a/test/core/channelz/channelz_registry_test.cc b/test/core/channelz/channelz_registry_test.cc index 7b193c274fd81..29110f3f5c12f 100644 --- a/test/core/channelz/channelz_registry_test.cc +++ b/test/core/channelz/channelz_registry_test.cc @@ -83,9 +83,9 @@ TEST_F(ChannelzRegistryTest, RegisterManyItems) { TEST_F(ChannelzRegistryTest, NullIfNotPresentTest) { RefCountedPtr channelz_channel = CreateTestNode(); // try to pull out a uuid that does not exist. - RefCountedPtr nonexistant = + RefCountedPtr nonexistent = ChannelzRegistry::Get(channelz_channel->uuid() + 1); - EXPECT_EQ(nonexistant, nullptr); + EXPECT_EQ(nonexistent, nullptr); RefCountedPtr retrieved = ChannelzRegistry::Get(channelz_channel->uuid()); EXPECT_EQ(channelz_channel, retrieved); diff --git a/test/core/channelz/channelz_test.cc b/test/core/channelz/channelz_test.cc index 06d11c08b73da..a43950eefbbc1 100644 --- a/test/core/channelz/channelz_test.cc +++ b/test/core/channelz/channelz_test.cc @@ -42,12 +42,12 @@ #include "src/core/channelz/channelz_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" #include "src/core/server/server.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/notification.h" #include "src/core/util/useful.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/client_channel/bm_load_balanced_call_destination.cc b/test/core/client_channel/bm_load_balanced_call_destination.cc index a9024edb7685a..f3a52f40ae9b8 100644 --- a/test/core/client_channel/bm_load_balanced_call_destination.cc +++ b/test/core/client_channel/bm_load_balanced_call_destination.cc @@ -80,6 +80,8 @@ class LoadBalancedCallDestinationTraits { return call_destination_; } + std::string address() const override { return "test"; } + private: const RefCountedPtr call_destination_; }; diff --git a/test/core/client_channel/client_channel_service_config_test.cc b/test/core/client_channel/client_channel_service_config_test.cc index e0c108fdb8d5a..28ffddf7f3196 100644 --- a/test/core/client_channel/client_channel_service_config_test.cc +++ b/test/core/client_channel/client_channel_service_config_test.cc @@ -25,10 +25,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/client_channel/load_balanced_call_destination_test.cc b/test/core/client_channel/load_balanced_call_destination_test.cc index ba92f44958c26..399f7bddc5a81 100644 --- a/test/core/client_channel/load_balanced_call_destination_test.cc +++ b/test/core/client_channel/load_balanced_call_destination_test.cc @@ -118,6 +118,8 @@ class LoadBalancedCallDestinationTest : public YodelTest { return call_destination_; } + std::string address() const override { return "test"; } + private: const RefCountedPtr call_destination_; }; diff --git a/test/core/client_channel/retry_service_config_test.cc b/test/core/client_channel/retry_service_config_test.cc index 34f41a5da9aee..5578e18ed118a 100644 --- a/test/core/client_channel/retry_service_config_test.cc +++ b/test/core/client_channel/retry_service_config_test.cc @@ -27,11 +27,11 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" namespace grpc_core { @@ -473,7 +473,7 @@ TEST_F(RetryParserTest, << service_config.status(); } -TEST_F(RetryParserTest, InvalidRetryPolicyUnparseableRetryableStatusCodes) { +TEST_F(RetryParserTest, InvalidRetryPolicyUnparsableRetryableStatusCodes) { const char* test_json = "{\n" " \"methodConfig\": [ {\n" @@ -614,7 +614,7 @@ TEST_F(RetryParserTest, EXPECT_TRUE(parsed_config->retryable_status_codes().Empty()); } -TEST_F(RetryParserTest, InvalidRetryPolicyPerAttemptRecvTimeoutUnparseable) { +TEST_F(RetryParserTest, InvalidRetryPolicyPerAttemptRecvTimeoutUnparsable) { const char* test_json = "{\n" " \"methodConfig\": [ {\n" diff --git a/test/core/config/load_config_test.cc b/test/core/config/load_config_test.cc index 7e136c0f7d788..7d9ac207163bf 100644 --- a/test/core/config/load_config_test.cc +++ b/test/core/config/load_config_test.cc @@ -17,7 +17,7 @@ #include "absl/flags/flag.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" ABSL_FLAG(std::vector, comma_separated_strings, {}, ""); diff --git a/test/core/end2end/bad_server_response_test.cc b/test/core/end2end/bad_server_response_test.cc index d9c543fcfed9b..f76151aa9d310 100644 --- a/test/core/end2end/bad_server_response_test.cc +++ b/test/core/end2end/bad_server_response_test.cc @@ -40,10 +40,6 @@ #include #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -51,7 +47,11 @@ #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/util/host_port.h" +#include "src/core/util/notification.h" +#include "src/core/util/status_helper.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" @@ -75,7 +75,7 @@ "application/grpc" \ "\x10\x07:status\x03" #STATUS_CODE -#define UNPARSEABLE_RESP "Bad Request\n" +#define UNPARSABLE_RESP "Bad Request\n" #define HTTP2_DETAIL_MSG(STATUS_CODE) \ "Received http2 header with status: " #STATUS_CODE @@ -394,10 +394,10 @@ int main(int argc, char** argv) { GRPC_STATUS_UNAVAILABLE, HTTP2_DETAIL_MSG(503)); run_test(true, true, HTTP2_RESP(504), sizeof(HTTP2_RESP(504)) - 1, GRPC_STATUS_UNAVAILABLE, HTTP2_DETAIL_MSG(504)); - // unparseable response. RPC should fail immediately due to a connect + // unparsable response. RPC should fail immediately due to a connect // failure. // - run_test(false, false, UNPARSEABLE_RESP, sizeof(UNPARSEABLE_RESP) - 1, + run_test(false, false, UNPARSABLE_RESP, sizeof(UNPARSABLE_RESP) - 1, GRPC_STATUS_UNAVAILABLE, nullptr); // http1 response. RPC should fail immediately due to a connect failure. diff --git a/test/core/end2end/connection_refused_test.cc b/test/core/end2end/connection_refused_test.cc index 1e3414b88752e..436b2fb573021 100644 --- a/test/core/end2end/connection_refused_test.cc +++ b/test/core/end2end/connection_refused_test.cc @@ -33,8 +33,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/host_port.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" @@ -85,8 +85,9 @@ static void run_test(bool wait_for_ready, bool use_service_config) { grpc_channel_credentials* creds = grpc_insecure_credentials_create(); chan = grpc_channel_create(addr.c_str(), creds, args); grpc_channel_credentials_release(creds); - grpc_slice host = grpc_slice_from_static_string("nonexistant"); - gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2); + grpc_slice host = grpc_slice_from_static_string("nonexistent"); + gpr_timespec deadline = + grpc_timeout_seconds_to_deadline(wait_for_ready ? 2 : 600); call = grpc_channel_create_call(chan, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, grpc_slice_from_static_string("/service/method"), diff --git a/test/core/end2end/cq_verifier.cc b/test/core/end2end/cq_verifier.cc index cb9e62f8f6a47..d1a322bc98907 100644 --- a/test/core/end2end/cq_verifier.cc +++ b/test/core/end2end/cq_verifier.cc @@ -45,10 +45,9 @@ #include #include "src/core/lib/compression/message_compress.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/match.h" #include "src/core/lib/surface/event_string.h" +#include "src/core/util/crash.h" +#include "src/core/util/match.h" #include "test/core/test_util/build.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index ea2280e905153..d86d324895872 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -34,8 +34,8 @@ #include #include -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc index 33ab2091c1b0b..44fc736e5ca74 100644 --- a/test/core/end2end/dualstack_socket_test.cc +++ b/test/core/end2end/dualstack_socket_test.cc @@ -50,11 +50,11 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/host_port.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/end2end_test_fuzzer.cc b/test/core/end2end/end2end_test_fuzzer.cc index 98cad6424b511..e74627117a24a 100644 --- a/test/core/end2end/end2end_test_fuzzer.cc +++ b/test/core/end2end/end2end_test_fuzzer.cc @@ -33,10 +33,10 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/env.h" #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/core/util/env.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" diff --git a/test/core/end2end/end2end_test_suites.cc b/test/core/end2end/end2end_test_suites.cc index c14c5cef6311a..4b74ff032bef3 100644 --- a/test/core/end2end/end2end_test_suites.cc +++ b/test/core/end2end/end2end_test_suites.cc @@ -49,14 +49,14 @@ #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/fixtures/h2_oauth2_common.h" #include "test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h" diff --git a/test/core/end2end/end2end_tests.cc b/test/core/end2end/end2end_tests.cc index 9443758ee5c36..856b700711cd0 100644 --- a/test/core/end2end/end2end_tests.cc +++ b/test/core/end2end/end2end_tests.cc @@ -33,7 +33,7 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" #include "test/core/end2end/cq_verifier.h" namespace grpc_core { diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index c7cb58e54e8c9..9dc89e93a87e5 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -50,13 +50,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/call_test_only.h" #include "src/core/lib/surface/channel.h" +#include "src/core/util/bitset.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/time.h" #include "test/core/call/batch_builder.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/event_engine/event_engine_test_utils.h" diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 957fb7101f064..88b65d3de94c0 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -46,11 +46,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" @@ -64,7 +59,12 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/host_port.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/memory.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/thd.h" +#include "src/core/util/time.h" #include "test/core/test_util/port.h" struct grpc_end2end_http_proxy { diff --git a/test/core/end2end/fixtures/proxy.cc b/test/core/end2end/fixtures/proxy.cc index febdb809838e8..1d78ebcd2b734 100644 --- a/test/core/end2end/fixtures/proxy.cc +++ b/test/core/end2end/fixtures/proxy.cc @@ -20,6 +20,7 @@ #include +#include #include #include @@ -36,10 +37,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/surface/call.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" struct grpc_end2end_proxy { @@ -82,6 +83,10 @@ typedef struct { grpc_metadata_array c2p_initial_metadata; grpc_metadata_array p2s_initial_metadata; + grpc_core::Mutex* initial_metadata_mu; + bool p2s_initial_metadata_received ABSL_GUARDED_BY(initial_metadata_mu); + grpc_op* deferred_trailing_metadata_op ABSL_GUARDED_BY(initial_metadata_mu); + grpc_byte_buffer* c2p_msg; grpc_byte_buffer* p2s_msg; @@ -166,6 +171,13 @@ static void unrefpc(proxy_call* pc, const char* /*reason*/) { grpc_metadata_array_destroy(&pc->p2s_initial_metadata); grpc_metadata_array_destroy(&pc->p2s_trailing_metadata); grpc_slice_unref(pc->p2s_status_details); + { + grpc_core::MutexLock lock(pc->initial_metadata_mu); + if (pc->deferred_trailing_metadata_op != nullptr) { + gpr_free(pc->deferred_trailing_metadata_op); + } + } + delete pc->initial_metadata_mu; gpr_free(pc); } } @@ -179,25 +191,45 @@ static void on_c2p_sent_initial_metadata(void* arg, int /*success*/) { unrefpc(pc, "on_c2p_sent_initial_metadata"); } +static void on_c2p_sent_status(void* arg, int /*success*/) { + proxy_call* pc = static_cast(arg); + unrefpc(pc, "on_c2p_sent_status"); +} + static void on_p2s_recv_initial_metadata(void* arg, int /*success*/) { proxy_call* pc = static_cast(arg); grpc_op op; grpc_call_error err; - memset(&op, 0, sizeof(op)); - if (!pc->proxy->shutdown && !grpc_call_is_trailers_only(pc->p2s)) { - op.op = GRPC_OP_SEND_INITIAL_METADATA; - op.flags = 0; - op.reserved = nullptr; - op.data.send_initial_metadata.count = pc->p2s_initial_metadata.count; - op.data.send_initial_metadata.metadata = pc->p2s_initial_metadata.metadata; - refpc(pc, "on_c2p_sent_initial_metadata"); - err = grpc_call_start_batch(pc->c2p, &op, 1, - new_closure(on_c2p_sent_initial_metadata, pc), - nullptr); - CHECK_EQ(err, GRPC_CALL_OK); + if (!pc->proxy->shutdown) { + if (!grpc_call_is_trailers_only(pc->p2s)) { + op.op = GRPC_OP_SEND_INITIAL_METADATA; + op.flags = 0; + op.reserved = nullptr; + op.data.send_initial_metadata.count = pc->p2s_initial_metadata.count; + op.data.send_initial_metadata.metadata = + pc->p2s_initial_metadata.metadata; + refpc(pc, "on_c2p_sent_initial_metadata"); + err = grpc_call_start_batch(pc->c2p, &op, 1, + new_closure(on_c2p_sent_initial_metadata, pc), + nullptr); + CHECK_EQ(err, GRPC_CALL_OK); + } + grpc_op* deferred_trailing_metadata_op = nullptr; + { + grpc_core::MutexLock lock(pc->initial_metadata_mu); + // Start the batch without the mutex held, just in case. + // This will be nullptr if the trailing metadata has not yet been seen. + deferred_trailing_metadata_op = pc->deferred_trailing_metadata_op; + pc->p2s_initial_metadata_received = true; + } + if (deferred_trailing_metadata_op != nullptr) { + refpc(pc, "on_c2p_sent_status"); + err = grpc_call_start_batch(pc->c2p, deferred_trailing_metadata_op, 1, + new_closure(on_c2p_sent_status, pc), nullptr); + CHECK_EQ(err, GRPC_CALL_OK); + } } - unrefpc(pc, "on_p2s_recv_initial_metadata"); } @@ -308,11 +340,6 @@ static void on_p2s_recv_msg(void* arg, int success) { unrefpc(pc, "on_p2s_recv_msg"); } -static void on_c2p_sent_status(void* arg, int /*success*/) { - proxy_call* pc = static_cast(arg); - unrefpc(pc, "on_c2p_sent_status"); -} - static void on_p2s_status(void* arg, int success) { proxy_call* pc = static_cast(arg); grpc_op op[2]; // Possibly send empty initial metadata also if trailers-only @@ -340,10 +367,29 @@ static void on_p2s_status(void* arg, int success) { op[op_count].data.send_status_from_server.status_details = &pc->p2s_status_details; op_count++; - refpc(pc, "on_c2p_sent_status"); - err = grpc_call_start_batch(pc->c2p, op, op_count, - new_closure(on_c2p_sent_status, pc), nullptr); - CHECK_EQ(err, GRPC_CALL_OK); + + // TODO(ctiller): The current core implementation requires initial + // metadata batches to be started *after* initial metadata batches have + // been completed. The C++ Callback API does this accounting too, for + // example. + // + // This entire fixture will need a redesign when the batch API goes away. + bool op_deferred = false; + { + grpc_core::MutexLock lock(pc->initial_metadata_mu); + if (!pc->p2s_initial_metadata_received) { + op_deferred = true; + pc->deferred_trailing_metadata_op = + static_cast(gpr_malloc(sizeof(op))); + memcpy(pc->deferred_trailing_metadata_op, &op, sizeof(op)); + } + } + if (!op_deferred) { + refpc(pc, "on_c2p_sent_status"); + err = grpc_call_start_batch(pc->c2p, op, op_count, + new_closure(on_c2p_sent_status, pc), nullptr); + CHECK_EQ(err, GRPC_CALL_OK); + } } unrefpc(pc, "on_p2s_status"); @@ -365,6 +411,12 @@ static void on_new_call(void* arg, int success) { memset(pc, 0, sizeof(*pc)); pc->proxy = proxy; std::swap(pc->c2p_initial_metadata, proxy->new_call_metadata); + pc->initial_metadata_mu = new grpc_core::Mutex(); + { + grpc_core::MutexLock lock(pc->initial_metadata_mu); + pc->p2s_initial_metadata_received = false; + pc->deferred_trailing_metadata_op = nullptr; + } pc->c2p = proxy->new_call; pc->p2s = grpc_channel_create_call( proxy->client, pc->c2p, GRPC_PROPAGATE_DEFAULTS, proxy->cq, @@ -374,6 +426,7 @@ static void on_new_call(void* arg, int success) { op.reserved = nullptr; + // Proxy: receive initial metadata from the server op.op = GRPC_OP_RECV_INITIAL_METADATA; op.flags = 0; op.data.recv_initial_metadata.recv_initial_metadata = @@ -384,6 +437,7 @@ static void on_new_call(void* arg, int success) { nullptr); CHECK_EQ(err, GRPC_CALL_OK); + // Proxy: send initial metadata to the server op.op = GRPC_OP_SEND_INITIAL_METADATA; op.flags = 0; op.data.send_initial_metadata.count = pc->c2p_initial_metadata.count; @@ -394,6 +448,7 @@ static void on_new_call(void* arg, int success) { nullptr); CHECK_EQ(err, GRPC_CALL_OK); + // Client: receive message from the proxy op.op = GRPC_OP_RECV_MESSAGE; op.flags = 0; op.data.recv_message.recv_message = &pc->c2p_msg; @@ -402,6 +457,7 @@ static void on_new_call(void* arg, int success) { new_closure(on_c2p_recv_msg, pc), nullptr); CHECK_EQ(err, GRPC_CALL_OK); + // Proxy: receive message from the server op.op = GRPC_OP_RECV_MESSAGE; op.flags = 0; op.data.recv_message.recv_message = &pc->p2s_msg; @@ -410,6 +466,7 @@ static void on_new_call(void* arg, int success) { new_closure(on_p2s_recv_msg, pc), nullptr); CHECK_EQ(err, GRPC_CALL_OK); + // Proxy: receive status from the server op.op = GRPC_OP_RECV_STATUS_ON_CLIENT; op.flags = 0; op.data.recv_status_on_client.trailing_metadata = @@ -421,6 +478,7 @@ static void on_new_call(void* arg, int success) { nullptr); CHECK_EQ(err, GRPC_CALL_OK); + // Client: receive close-ack from the proxy op.op = GRPC_OP_RECV_CLOSE_ON_SERVER; op.flags = 0; op.data.recv_close_on_server.cancelled = &pc->c2p_server_cancelled; diff --git a/test/core/end2end/fixtures/secure_fixture.h b/test/core/end2end/fixtures/secure_fixture.h index fc9ef450c98c8..4586994981b8f 100644 --- a/test/core/end2end/fixtures/secure_fixture.h +++ b/test/core/end2end/fixtures/secure_fixture.h @@ -26,7 +26,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/port.h" diff --git a/test/core/end2end/fixtures/sockpair_fixture.h b/test/core/end2end/fixtures/sockpair_fixture.h index 8731ab05acf16..cedc002695f69 100644 --- a/test/core/end2end/fixtures/sockpair_fixture.h +++ b/test/core/end2end/fixtures/sockpair_fixture.h @@ -32,7 +32,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/error.h" @@ -43,6 +42,7 @@ #include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/transport/transport.h" #include "src/core/server/server.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/fuzzers/api_fuzzer.cc b/test/core/end2end/fuzzers/api_fuzzer.cc index b92fdb5655c55..c4e960a7d9a21 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.cc +++ b/test/core/end2end/fuzzers/api_fuzzer.cc @@ -49,10 +49,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" @@ -60,6 +56,10 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/end2end/fuzzers/api_fuzzer.pb.h" diff --git a/test/core/end2end/fuzzers/client_fuzzer.cc b/test/core/end2end/fuzzers/client_fuzzer.cc index 3d9d1778d8f0c..9278eb8d0e5e1 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.cc +++ b/test/core/end2end/fuzzers/client_fuzzer.cc @@ -27,15 +27,15 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/env.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/end2end/fuzzers/api_fuzzer.pb.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" diff --git a/test/core/end2end/fuzzers/connector_fuzzer.cc b/test/core/end2end/fuzzers/connector_fuzzer.cc index d1d93789f47e7..319e822cd03b6 100644 --- a/test/core/end2end/fuzzers/connector_fuzzer.cc +++ b/test/core/end2end/fuzzers/connector_fuzzer.cc @@ -18,9 +18,9 @@ #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/util/env.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" #include "test/core/end2end/fuzzers/network_input.h" #include "test/core/test_util/fuzz_config_vars.h" diff --git a/test/core/end2end/fuzzers/fuzzing_common.cc b/test/core/end2end/fuzzers/fuzzing_common.cc index 2597694bf3b55..820af4ab18209 100644 --- a/test/core/end2end/fuzzers/fuzzing_common.cc +++ b/test/core/end2end/fuzzers/fuzzing_common.cc @@ -38,13 +38,13 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/crash.h" #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/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/channel.h" +#include "src/core/util/crash.h" #include "test/core/end2end/fuzzers/api_fuzzer.pb.h" namespace grpc_core { diff --git a/test/core/end2end/fuzzers/fuzzing_common.h b/test/core/end2end/fuzzers/fuzzing_common.h index 95c48fd4f7eb5..b365c698e2d27 100644 --- a/test/core/end2end/fuzzers/fuzzing_common.h +++ b/test/core/end2end/fuzzers/fuzzing_common.h @@ -33,9 +33,9 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/end2end/fuzzers/api_fuzzer.pb.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" diff --git a/test/core/end2end/fuzzers/network_input.h b/test/core/end2end/fuzzers/network_input.h index afb6490d81d71..c036e88f1b9ad 100644 --- a/test/core/end2end/fuzzers/network_input.h +++ b/test/core/end2end/fuzzers/network_input.h @@ -15,8 +15,8 @@ #ifndef GRPC_TEST_CORE_END2END_FUZZERS_NETWORK_INPUT_H #define GRPC_TEST_CORE_END2END_FUZZERS_NETWORK_INPUT_H -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/util/time.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/test_util/fuzzing_channel_args.h" diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc index 05fef731cc490..ebf7034caecb0 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.cc +++ b/test/core/end2end/fuzzers/server_fuzzer.cc @@ -23,8 +23,8 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/env.h" #include "test/core/end2end/fuzzers/api_fuzzer.pb.h" #include "test/core/end2end/fuzzers/fuzzer_input.pb.h" #include "test/core/end2end/fuzzers/fuzzing_common.h" diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc index edf5807422309..2ebc094e21075 100644 --- a/test/core/end2end/goaway_server_test.cc +++ b/test/core/end2end/goaway_server_test.cc @@ -47,8 +47,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -60,6 +58,8 @@ #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/time.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc index 68173c021553f..d9509266d0f3e 100644 --- a/test/core/end2end/h2_ssl_cert_test.cc +++ b/test/core/end2end/h2_ssl_cert_test.cc @@ -42,6 +42,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" +#include "src/core/util/time.h" #include "src/core/util/tmpfile.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/end2end/data/ssl_test_data.h" @@ -196,7 +197,7 @@ static CoreTestConfigWrapper configs[] = { static void simple_request_body(grpc_core::CoreTestFixture* f, test_result expected_result) { grpc_call* c; - gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5); + gpr_timespec deadline = grpc_timeout_seconds_to_deadline(30); grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); grpc_core::CqVerifier cqv(cq); grpc_op ops[6]; @@ -226,13 +227,13 @@ static void simple_request_body(grpc_core::CoreTestFixture* f, CHECK_EQ(error, GRPC_CALL_OK); cqv.Expect(grpc_core::CqVerifier::tag(1), expected_result == SUCCESS); - cqv.Verify(); + cqv.Verify(grpc_core::Duration::Seconds(60)); grpc_call_unref(c); grpc_channel_destroy(client); grpc_server_shutdown_and_notify(server, cq, nullptr); cqv.Expect(nullptr, true); - cqv.Verify(); + cqv.Verify(grpc_core::Duration::Seconds(60)); grpc_server_destroy(server); grpc_completion_queue_shutdown(cq); CHECK(grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), diff --git a/test/core/end2end/h2_ssl_session_reuse_test.cc b/test/core/end2end/h2_ssl_session_reuse_test.cc index 6fd220719e542..882f09995e87c 100644 --- a/test/core/end2end/h2_ssl_session_reuse_test.cc +++ b/test/core/end2end/h2_ssl_session_reuse_test.cc @@ -37,9 +37,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/host_port.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" diff --git a/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc b/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc index 24fc3e7c3c034..a9f74bed93595 100644 --- a/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc +++ b/test/core/end2end/h2_tls_peer_property_external_verifier_test.cc @@ -37,9 +37,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/host_port.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" diff --git a/test/core/end2end/invalid_call_argument_test.cc b/test/core/end2end/invalid_call_argument_test.cc index 1f086c3f98a67..ee7caff77ca98 100644 --- a/test/core/end2end/invalid_call_argument_test.cc +++ b/test/core/end2end/invalid_call_argument_test.cc @@ -36,7 +36,7 @@ #include #include -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" @@ -74,11 +74,11 @@ static void prepare_test(int is_client) { memset(g_state.ops, 0, sizeof(g_state.ops)); if (is_client) { - // create a call, channel to a non existant server + // create a call, channel to a non existent server grpc_channel_credentials* creds = grpc_insecure_credentials_create(); - g_state.chan = grpc_channel_create("nonexistant:54321", creds, nullptr); + g_state.chan = grpc_channel_create("nonexistent:54321", creds, nullptr); grpc_channel_credentials_release(creds); - grpc_slice host = grpc_slice_from_static_string("nonexistant"); + grpc_slice host = grpc_slice_from_static_string("nonexistent"); g_state.call = grpc_channel_create_call( g_state.chan, nullptr, GRPC_PROPAGATE_DEFAULTS, g_state.cq, grpc_slice_from_static_string("/Foo"), &host, g_state.deadline, diff --git a/test/core/end2end/no_server_test.cc b/test/core/end2end/no_server_test.cc index 4b14f0a1a7277..5e8d9add4fd10 100644 --- a/test/core/end2end/no_server_test.cc +++ b/test/core/end2end/no_server_test.cc @@ -35,12 +35,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/resolver/resolver.h" #include "src/core/service_config/service_config.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" @@ -57,10 +57,10 @@ void run_test(bool wait_for_ready) { grpc_core::MakeRefCounted(); auto args = grpc_core::ChannelArgs().SetObject(response_generator).ToC(); - // create a call, channel to a non existant server + // create a call, channel to a non existent server grpc_channel_credentials* creds = grpc_insecure_credentials_create(); grpc_channel* chan = - grpc_channel_create("fake:nonexistant", creds, args.get()); + grpc_channel_create("fake:nonexistent", creds, args.get()); grpc_channel_credentials_release(creds); gpr_timespec deadline = grpc_timeout_seconds_to_deadline(2); grpc_call* call = grpc_channel_create_call( diff --git a/test/core/end2end/tests/bad_ping.cc b/test/core/end2end/tests/bad_ping.cc index edd8760f82b5c..1a556d5ee527c 100644 --- a/test/core/end2end/tests/bad_ping.cc +++ b/test/core/end2end/tests/bad_ping.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #define MAX_PING_STRIKES 2 diff --git a/test/core/end2end/tests/binary_metadata.cc b/test/core/end2end/tests/binary_metadata.cc index e4032f7303631..a96ce818304f0 100644 --- a/test/core/end2end/tests/binary_metadata.cc +++ b/test/core/end2end/tests/binary_metadata.cc @@ -24,8 +24,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/call_creds.cc b/test/core/end2end/tests/call_creds.cc index 9745e7347d5dc..b19d555005bc0 100644 --- a/test/core/end2end/tests/call_creds.cc +++ b/test/core/end2end/tests/call_creds.cc @@ -28,8 +28,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/call_host_override.cc b/test/core/end2end/tests/call_host_override.cc index 66b70c042af01..ee8475529699c 100644 --- a/test/core/end2end/tests/call_host_override.cc +++ b/test/core/end2end/tests/call_host_override.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/cancel_after_accept.cc b/test/core/end2end/tests/cancel_after_accept.cc index e79e664332a62..e22063354defb 100644 --- a/test/core/end2end/tests/cancel_after_accept.cc +++ b/test/core/end2end/tests/cancel_after_accept.cc @@ -26,7 +26,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/cancel_after_client_done.cc b/test/core/end2end/tests/cancel_after_client_done.cc index c1255ae758775..8ca9e005ba8e4 100644 --- a/test/core/end2end/tests/cancel_after_client_done.cc +++ b/test/core/end2end/tests/cancel_after_client_done.cc @@ -23,7 +23,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" diff --git a/test/core/end2end/tests/cancel_after_invoke.cc b/test/core/end2end/tests/cancel_after_invoke.cc index e5dec969c8703..aeaf45bd2f151 100644 --- a/test/core/end2end/tests/cancel_after_invoke.cc +++ b/test/core/end2end/tests/cancel_after_invoke.cc @@ -24,7 +24,7 @@ #include #include "src/core/ext/transport/chttp2/transport/internal.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" diff --git a/test/core/end2end/tests/cancel_after_round_trip.cc b/test/core/end2end/tests/cancel_after_round_trip.cc index fbc54a0f51e3f..00f268683a4d6 100644 --- a/test/core/end2end/tests/cancel_after_round_trip.cc +++ b/test/core/end2end/tests/cancel_after_round_trip.cc @@ -26,7 +26,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/cancel_with_status.cc b/test/core/end2end/tests/cancel_with_status.cc index e1dae672c1617..4673ade3698f0 100644 --- a/test/core/end2end/tests/cancel_with_status.cc +++ b/test/core/end2end/tests/cancel_with_status.cc @@ -25,7 +25,7 @@ #include #include "src/core/ext/transport/chttp2/transport/internal.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/channelz.cc b/test/core/end2end/tests/channelz.cc index 910495eeac4e6..dcd363a1051e1 100644 --- a/test/core/end2end/tests/channelz.cc +++ b/test/core/end2end/tests/channelz.cc @@ -27,9 +27,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/surface/channel.h" #include "src/core/server/server.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" using testing::HasSubstr; diff --git a/test/core/end2end/tests/client_streaming.cc b/test/core/end2end/tests/client_streaming.cc index e01d63d8f608e..2cf6a61755630 100644 --- a/test/core/end2end/tests/client_streaming.cc +++ b/test/core/end2end/tests/client_streaming.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc index dbe9c350696f1..cbae272da8e00 100644 --- a/test/core/end2end/tests/compressed_payload.cc +++ b/test/core/end2end/tests/compressed_payload.cc @@ -31,8 +31,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/bitset.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/bitset.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/connectivity.cc b/test/core/end2end/tests/connectivity.cc index ee2c78d0b7402..00e83236e4df1 100644 --- a/test/core/end2end/tests/connectivity.cc +++ b/test/core/end2end/tests/connectivity.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/default_host.cc b/test/core/end2end/tests/default_host.cc index 770c15c4d6181..fe5100dd845c9 100644 --- a/test/core/end2end/tests/default_host.cc +++ b/test/core/end2end/tests/default_host.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" using testing::AnyOf; diff --git a/test/core/end2end/tests/disappearing_server.cc b/test/core/end2end/tests/disappearing_server.cc index 2cbff38e35239..a42853b538bcf 100644 --- a/test/core/end2end/tests/disappearing_server.cc +++ b/test/core/end2end/tests/disappearing_server.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #ifndef GPR_WINDOWS // b/148110727 for more details diff --git a/test/core/end2end/tests/filter_causes_close.cc b/test/core/end2end/tests/filter_causes_close.cc index 8a77719e4017b..feae6776991b0 100644 --- a/test/core/end2end/tests/filter_causes_close.cc +++ b/test/core/end2end/tests/filter_causes_close.cc @@ -30,9 +30,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/arena_promise.h" @@ -40,6 +37,9 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/filter_init_fails.cc b/test/core/end2end/tests/filter_init_fails.cc index c2b08486fee1f..5183489db1ec8 100644 --- a/test/core/end2end/tests/filter_init_fails.cc +++ b/test/core/end2end/tests/filter_init_fails.cc @@ -30,8 +30,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/arena_promise.h" @@ -39,6 +37,8 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" using ::testing::AnyOf; diff --git a/test/core/end2end/tests/filtered_metadata.cc b/test/core/end2end/tests/filtered_metadata.cc index a16afba692a8d..5f14a22a85ba0 100644 --- a/test/core/end2end/tests/filtered_metadata.cc +++ b/test/core/end2end/tests/filtered_metadata.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/graceful_server_shutdown.cc b/test/core/end2end/tests/graceful_server_shutdown.cc index 1cd6fccb2f4a8..34390d02f0726 100644 --- a/test/core/end2end/tests/graceful_server_shutdown.cc +++ b/test/core/end2end/tests/graceful_server_shutdown.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/grpc_authz.cc b/test/core/end2end/tests/grpc_authz.cc index 710535ea5d30a..48553dd035795 100644 --- a/test/core/end2end/tests/grpc_authz.cc +++ b/test/core/end2end/tests/grpc_authz.cc @@ -24,10 +24,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/security/authorization/authorization_policy_provider.h" #include "src/core/lib/security/authorization/grpc_authorization_policy_provider.h" +#include "src/core/util/notification.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/end2end/tests/high_initial_seqno.cc b/test/core/end2end/tests/high_initial_seqno.cc index 03228d34d3719..e9dd5cd39a7d7 100644 --- a/test/core/end2end/tests/high_initial_seqno.cc +++ b/test/core/end2end/tests/high_initial_seqno.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/hpack_size.cc b/test/core/end2end/tests/hpack_size.cc index bbd783aa29fa2..766a00cbe9928 100644 --- a/test/core/end2end/tests/hpack_size.cc +++ b/test/core/end2end/tests/hpack_size.cc @@ -29,7 +29,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/http2_stats.cc b/test/core/end2end/tests/http2_stats.cc index a8de51639f776..51561dbbe1756 100644 --- a/test/core/end2end/tests/http2_stats.cc +++ b/test/core/end2end/tests/http2_stats.cc @@ -33,9 +33,6 @@ #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/context.h" @@ -48,6 +45,9 @@ #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/metrics.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/fake_stats_plugin.h" diff --git a/test/core/end2end/tests/invoke_large_request.cc b/test/core/end2end/tests/invoke_large_request.cc index 283ec5cb7aef2..3302ee48e8934 100644 --- a/test/core/end2end/tests/invoke_large_request.cc +++ b/test/core/end2end/tests/invoke_large_request.cc @@ -26,8 +26,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/keepalive_timeout.cc b/test/core/end2end/tests/keepalive_timeout.cc index 64b2aa09caa14..9c94b653c840d 100644 --- a/test/core/end2end/tests/keepalive_timeout.cc +++ b/test/core/end2end/tests/keepalive_timeout.cc @@ -27,8 +27,8 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/large_metadata.cc b/test/core/end2end/tests/large_metadata.cc index eb0da4d38db81..9f0539839805d 100644 --- a/test/core/end2end/tests/large_metadata.cc +++ b/test/core/end2end/tests/large_metadata.cc @@ -27,7 +27,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/max_concurrent_streams.cc b/test/core/end2end/tests/max_concurrent_streams.cc index badbec90b1caa..1b0d301b724a4 100644 --- a/test/core/end2end/tests/max_concurrent_streams.cc +++ b/test/core/end2end/tests/max_concurrent_streams.cc @@ -25,7 +25,7 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/max_connection_age.cc b/test/core/end2end/tests/max_connection_age.cc index f2d0d88a51bb3..0938eb2393c4a 100644 --- a/test/core/end2end/tests/max_connection_age.cc +++ b/test/core/end2end/tests/max_connection_age.cc @@ -20,13 +20,14 @@ #include +#include "gmock/gmock.h" #include "gtest/gtest.h" #include #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_config.h" @@ -109,6 +110,8 @@ CORE_END2END_TEST(Http2Test, MaxAgeForciblyClose) { // The connection should be closed immediately after the max age grace period, // the in-progress RPC should fail. EXPECT_EQ(server_status.status(), GRPC_STATUS_UNAVAILABLE); + EXPECT_THAT(server_status.message(), + ::testing::MatchesRegex("max connection age")); } CORE_END2END_TEST(Http2Test, MaxAgeGracefullyClose) { @@ -162,10 +165,12 @@ CORE_END2END_TEST(Http2Test, MaxAgeGracefullyClose) { Expect(101, false); } Step(); - // The connection is closed gracefully with goaway, the rpc should still be - // completed. - EXPECT_EQ(server_status.status(), GRPC_STATUS_UNIMPLEMENTED); - EXPECT_EQ(server_status.message(), "xyz"); + if (got_server) { + // The connection is closed gracefully with goaway, the rpc should still be + // completed. + EXPECT_EQ(server_status.status(), GRPC_STATUS_UNIMPLEMENTED); + EXPECT_EQ(server_status.message(), "xyz"); + } } } // namespace diff --git a/test/core/end2end/tests/max_connection_idle.cc b/test/core/end2end/tests/max_connection_idle.cc index ab9371485ab3a..1dfbd2f6ede1e 100644 --- a/test/core/end2end/tests/max_connection_idle.cc +++ b/test/core/end2end/tests/max_connection_idle.cc @@ -27,7 +27,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/negative_deadline.cc b/test/core/end2end/tests/negative_deadline.cc index 92c7aa2f12043..c1c5392c1bf0f 100644 --- a/test/core/end2end/tests/negative_deadline.cc +++ b/test/core/end2end/tests/negative_deadline.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/no_logging.cc b/test/core/end2end/tests/no_logging.cc index 1ffb8116d8c19..976c198ecb88c 100644 --- a/test/core/end2end/tests/no_logging.cc +++ b/test/core/end2end/tests/no_logging.cc @@ -37,7 +37,7 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { @@ -99,7 +99,7 @@ class VerifyLogNoiseLogSink : public absl::LogSink { std::regex("Failed to bind some addresses for.*")}, {"log.cc", std::regex("Prefer WARNING or ERROR. However if you see this " - "message in a debug environmenmt or test environmenmt " + "message in a debug environment or test environment " "it is safe to ignore this message.")}}); if (IsVlogWithVerbosityMoreThan1(entry)) { diff --git a/test/core/end2end/tests/payload.cc b/test/core/end2end/tests/payload.cc index 06cd8a7b78ef0..31c5456dee415 100644 --- a/test/core/end2end/tests/payload.cc +++ b/test/core/end2end/tests/payload.cc @@ -22,8 +22,8 @@ #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/ping.cc b/test/core/end2end/tests/ping.cc index 61eb6fbeef7d2..70b2fbb57c2ea 100644 --- a/test/core/end2end/tests/ping.cc +++ b/test/core/end2end/tests/ping.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/ping_pong_streaming.cc b/test/core/end2end/tests/ping_pong_streaming.cc index 3538e89d5fb7f..9cfd8bb92a91b 100644 --- a/test/core/end2end/tests/ping_pong_streaming.cc +++ b/test/core/end2end/tests/ping_pong_streaming.cc @@ -20,8 +20,8 @@ #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/proxy_auth.cc b/test/core/end2end/tests/proxy_auth.cc index 1de111516104d..9b2b3897b83ab 100644 --- a/test/core/end2end/tests/proxy_auth.cc +++ b/test/core/end2end/tests/proxy_auth.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/fixtures/http_proxy_fixture.h" diff --git a/test/core/end2end/tests/registered_call.cc b/test/core/end2end/tests/registered_call.cc index 1b2db49211c25..1dc13b5acd523 100644 --- a/test/core/end2end/tests/registered_call.cc +++ b/test/core/end2end/tests/registered_call.cc @@ -20,7 +20,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/request_with_flags.cc b/test/core/end2end/tests/request_with_flags.cc index fe36ebdaaa899..60db5aae583cb 100644 --- a/test/core/end2end/tests/request_with_flags.cc +++ b/test/core/end2end/tests/request_with_flags.cc @@ -30,8 +30,8 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/time.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/request_with_payload.cc b/test/core/end2end/tests/request_with_payload.cc index bbfdf8ce5edf0..d2da70e6ec606 100644 --- a/test/core/end2end/tests/request_with_payload.cc +++ b/test/core/end2end/tests/request_with_payload.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/resource_quota_server.cc b/test/core/end2end/tests/resource_quota_server.cc index 0bc7a69e0348f..4b25143b5ecbe 100644 --- a/test/core/end2end/tests/resource_quota_server.cc +++ b/test/core/end2end/tests/resource_quota_server.cc @@ -31,9 +31,9 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry.cc b/test/core/end2end/tests/retry.cc index ad9d875f9d139..22e3434e55332 100644 --- a/test/core/end2end/tests/retry.cc +++ b/test/core/end2end/tests/retry.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc b/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc index 253e34db8cfc0..cf33d71876067 100644 --- a/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc +++ b/test/core/end2end/tests/retry_cancel_after_first_attempt_starts.cc @@ -22,7 +22,7 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_cancel_during_delay.cc b/test/core/end2end/tests/retry_cancel_during_delay.cc index 57c1c825b4dd6..255d31ffe877f 100644 --- a/test/core/end2end/tests/retry_cancel_during_delay.cc +++ b/test/core/end2end/tests/retry_cancel_during_delay.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc b/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc index a5b932a7ea0ec..0fa65238d885e 100644 --- a/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc +++ b/test/core/end2end/tests/retry_cancel_with_multiple_send_batches.cc @@ -32,13 +32,13 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/retry_cancellation.cc b/test/core/end2end/tests/retry_cancellation.cc index 37000c08bf974..fd26c53c51362 100644 --- a/test/core/end2end/tests/retry_cancellation.cc +++ b/test/core/end2end/tests/retry_cancellation.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/end2end/tests/cancel_test_helpers.h" diff --git a/test/core/end2end/tests/retry_disabled.cc b/test/core/end2end/tests/retry_disabled.cc index dc59d38f28bef..be335e8cd6d3b 100644 --- a/test/core/end2end/tests/retry_disabled.cc +++ b/test/core/end2end/tests/retry_disabled.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc index 3a0b681d19840..0171d6a828d18 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_delay.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc index 9d1382f4fa7e3..90ac8edd5a014 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_initial_batch.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc index 1d6669c11213c..f962de4171969 100644 --- a/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc +++ b/test/core/end2end/tests/retry_exceeds_buffer_size_in_subsequent_batch.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_lb_drop.cc b/test/core/end2end/tests/retry_lb_drop.cc index d53c680037dd2..abe92f8f9ac29 100644 --- a/test/core/end2end/tests/retry_lb_drop.cc +++ b/test/core/end2end/tests/retry_lb_drop.cc @@ -31,12 +31,12 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_lb_policies.h" diff --git a/test/core/end2end/tests/retry_lb_fail.cc b/test/core/end2end/tests/retry_lb_fail.cc index 84f8b3fac6033..77ef319f3e347 100644 --- a/test/core/end2end/tests/retry_lb_fail.cc +++ b/test/core/end2end/tests/retry_lb_fail.cc @@ -25,7 +25,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_lb_policies.h" diff --git a/test/core/end2end/tests/retry_non_retriable_status.cc b/test/core/end2end/tests/retry_non_retriable_status.cc index ce09e2a575dd6..4051f38daa672 100644 --- a/test/core/end2end/tests/retry_non_retriable_status.cc +++ b/test/core/end2end/tests/retry_non_retriable_status.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc b/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc index 55bd0480e1f1c..07340b8d7f9a8 100644 --- a/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc +++ b/test/core/end2end/tests/retry_non_retriable_status_before_trailers.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc b/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc index 4f7cbc05aa2d6..d21ce8ae7c3fc 100644 --- a/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc +++ b/test/core/end2end/tests/retry_per_attempt_recv_timeout.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc b/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc index 7e126c5dd261a..f0447521b8c03 100644 --- a/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc +++ b/test/core/end2end/tests/retry_per_attempt_recv_timeout_on_last_attempt.cc @@ -24,7 +24,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/retry_recv_initial_metadata.cc b/test/core/end2end/tests/retry_recv_initial_metadata.cc index 9738cd5dee138..2c4d44e6e1a75 100644 --- a/test/core/end2end/tests/retry_recv_initial_metadata.cc +++ b/test/core/end2end/tests/retry_recv_initial_metadata.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_recv_message.cc b/test/core/end2end/tests/retry_recv_message.cc index bee892a9e9e82..a2fcbc5ebd017 100644 --- a/test/core/end2end/tests/retry_recv_message.cc +++ b/test/core/end2end/tests/retry_recv_message.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_recv_message_replay.cc b/test/core/end2end/tests/retry_recv_message_replay.cc index c3057f88161a4..1260785976aee 100644 --- a/test/core/end2end/tests/retry_recv_message_replay.cc +++ b/test/core/end2end/tests/retry_recv_message_replay.cc @@ -30,14 +30,14 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc b/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc index cdbd9b7544925..ab8a0fe4e340e 100644 --- a/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc +++ b/test/core/end2end/tests/retry_recv_trailing_metadata_error.cc @@ -28,13 +28,13 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_send_initial_metadata_refs.cc b/test/core/end2end/tests/retry_send_initial_metadata_refs.cc index 5958580cb90eb..2f99da1ed2fa3 100644 --- a/test/core/end2end/tests/retry_send_initial_metadata_refs.cc +++ b/test/core/end2end/tests/retry_send_initial_metadata_refs.cc @@ -26,7 +26,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_send_op_fails.cc b/test/core/end2end/tests/retry_send_op_fails.cc index 825745ab96ac7..46ac40cff79b3 100644 --- a/test/core/end2end/tests/retry_send_op_fails.cc +++ b/test/core/end2end/tests/retry_send_op_fails.cc @@ -30,13 +30,13 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_send_recv_batch.cc b/test/core/end2end/tests/retry_send_recv_batch.cc index 75194d043c399..5f9ac9c7aa4a0 100644 --- a/test/core/end2end/tests/retry_send_recv_batch.cc +++ b/test/core/end2end/tests/retry_send_recv_batch.cc @@ -22,7 +22,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_server_pushback_delay.cc b/test/core/end2end/tests/retry_server_pushback_delay.cc index dff07f9698f90..58507c833c39c 100644 --- a/test/core/end2end/tests/retry_server_pushback_delay.cc +++ b/test/core/end2end/tests/retry_server_pushback_delay.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_server_pushback_disabled.cc b/test/core/end2end/tests/retry_server_pushback_disabled.cc index ecbac8e8969e0..33226294b89f3 100644 --- a/test/core/end2end/tests/retry_server_pushback_disabled.cc +++ b/test/core/end2end/tests/retry_server_pushback_disabled.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_streaming.cc b/test/core/end2end/tests/retry_streaming.cc index ab06d00a86229..57b081803ac68 100644 --- a/test/core/end2end/tests/retry_streaming.cc +++ b/test/core/end2end/tests/retry_streaming.cc @@ -27,8 +27,8 @@ #include "src/core/channelz/channelz.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/surface/channel.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" using testing::HasSubstr; diff --git a/test/core/end2end/tests/retry_streaming_after_commit.cc b/test/core/end2end/tests/retry_streaming_after_commit.cc index ecb42085956db..2e642d4852f51 100644 --- a/test/core/end2end/tests/retry_streaming_after_commit.cc +++ b/test/core/end2end/tests/retry_streaming_after_commit.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc index 6870ec0ab9fdd..1d2e1f54d814f 100644 --- a/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc +++ b/test/core/end2end/tests/retry_streaming_succeeds_before_replay_finished.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_throttled.cc b/test/core/end2end/tests/retry_throttled.cc index 52415d623ea1c..a0ca05f8757db 100644 --- a/test/core/end2end/tests/retry_throttled.cc +++ b/test/core/end2end/tests/retry_throttled.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_too_many_attempts.cc b/test/core/end2end/tests/retry_too_many_attempts.cc index 90cea14dd7765..b68b5c1485300 100644 --- a/test/core/end2end/tests/retry_too_many_attempts.cc +++ b/test/core/end2end/tests/retry_too_many_attempts.cc @@ -25,7 +25,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_transparent_goaway.cc b/test/core/end2end/tests/retry_transparent_goaway.cc index be68169cc26a5..40352a5148f7b 100644 --- a/test/core/end2end/tests/retry_transparent_goaway.cc +++ b/test/core/end2end/tests/retry_transparent_goaway.cc @@ -27,15 +27,15 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc b/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc index 7cb19fc15dbea..75e4c8a9264a2 100644 --- a/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc +++ b/test/core/end2end/tests/retry_transparent_max_concurrent_streams.cc @@ -25,7 +25,7 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc b/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc index b55ee605c4cb3..1a7ca65aae6e8 100644 --- a/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc +++ b/test/core/end2end/tests/retry_transparent_not_sent_on_wire.cc @@ -29,15 +29,15 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/call_combiner.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_unref_before_finish.cc b/test/core/end2end/tests/retry_unref_before_finish.cc index 8957160457b2c..5c6a460c23ddd 100644 --- a/test/core/end2end/tests/retry_unref_before_finish.cc +++ b/test/core/end2end/tests/retry_unref_before_finish.cc @@ -22,7 +22,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/retry_unref_before_recv.cc b/test/core/end2end/tests/retry_unref_before_recv.cc index c6503dea747ad..569e8114d6bd5 100644 --- a/test/core/end2end/tests/retry_unref_before_recv.cc +++ b/test/core/end2end/tests/retry_unref_before_recv.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/server_finishes_request.cc b/test/core/end2end/tests/server_finishes_request.cc index 6061207fd4c07..b1df0a39904e2 100644 --- a/test/core/end2end/tests/server_finishes_request.cc +++ b/test/core/end2end/tests/server_finishes_request.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/server_streaming.cc b/test/core/end2end/tests/server_streaming.cc index f1397b8e9d4f8..fd4e34d9afcb1 100644 --- a/test/core/end2end/tests/server_streaming.cc +++ b/test/core/end2end/tests/server_streaming.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/end2end/end2end_tests.h" diff --git a/test/core/end2end/tests/shutdown_finishes_calls.cc b/test/core/end2end/tests/shutdown_finishes_calls.cc index 5474f263f0924..03e83c57c62a0 100644 --- a/test/core/end2end/tests/shutdown_finishes_calls.cc +++ b/test/core/end2end/tests/shutdown_finishes_calls.cc @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/end2end/tests/simple_delayed_request.cc b/test/core/end2end/tests/simple_delayed_request.cc index bbdfe4ab790ef..e9c61145e2b82 100644 --- a/test/core/end2end/tests/simple_delayed_request.cc +++ b/test/core/end2end/tests/simple_delayed_request.cc @@ -26,7 +26,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/simple_metadata.cc b/test/core/end2end/tests/simple_metadata.cc index 93893c85118d6..4d1df2c05ff2e 100644 --- a/test/core/end2end/tests/simple_metadata.cc +++ b/test/core/end2end/tests/simple_metadata.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/simple_request.cc b/test/core/end2end/tests/simple_request.cc index a68816ec78c10..5236e9692daf7 100644 --- a/test/core/end2end/tests/simple_request.cc +++ b/test/core/end2end/tests/simple_request.cc @@ -30,9 +30,9 @@ #include -#include "src/core/lib/gprpp/time.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" using testing::HasSubstr; diff --git a/test/core/end2end/tests/streaming_error_response.cc b/test/core/end2end/tests/streaming_error_response.cc index 47d1e2ea9f1e8..3ac939ed861c8 100644 --- a/test/core/end2end/tests/streaming_error_response.cc +++ b/test/core/end2end/tests/streaming_error_response.cc @@ -25,7 +25,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/timeout_before_request_call.cc b/test/core/end2end/tests/timeout_before_request_call.cc index 9d1635bd2454d..3a7217ed49dc5 100644 --- a/test/core/end2end/tests/timeout_before_request_call.cc +++ b/test/core/end2end/tests/timeout_before_request_call.cc @@ -24,8 +24,8 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/trailing_metadata.cc b/test/core/end2end/tests/trailing_metadata.cc index b20f996f6254e..268b699b42752 100644 --- a/test/core/end2end/tests/trailing_metadata.cc +++ b/test/core/end2end/tests/trailing_metadata.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/write_buffering.cc b/test/core/end2end/tests/write_buffering.cc index a551eb02c8d3f..d3956f8003165 100644 --- a/test/core/end2end/tests/write_buffering.cc +++ b/test/core/end2end/tests/write_buffering.cc @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/end2end/tests/write_buffering_at_end.cc b/test/core/end2end/tests/write_buffering_at_end.cc index 684318d21864d..064e979e8fbb3 100644 --- a/test/core/end2end/tests/write_buffering_at_end.cc +++ b/test/core/end2end/tests/write_buffering_at_end.cc @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/end2end/end2end_tests.h" namespace grpc_core { diff --git a/test/core/event_engine/common_closures_test.cc b/test/core/event_engine/common_closures_test.cc index ee4f71937d123..a09d2061d69d6 100644 --- a/test/core/event_engine/common_closures_test.cc +++ b/test/core/event_engine/common_closures_test.cc @@ -21,7 +21,7 @@ #include -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" using ::grpc_event_engine::experimental::AnyInvocableClosure; using ::grpc_event_engine::experimental::SelfDeletingClosure; diff --git a/test/core/event_engine/event_engine_test_utils.cc b/test/core/event_engine/event_engine_test_utils.cc index c567ffa5f1974..65b609a63d4f5 100644 --- a/test/core/event_engine/event_engine_test_utils.cc +++ b/test/core/event_engine/event_engine_test_utils.cc @@ -39,10 +39,10 @@ #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" +#include "src/core/util/time.h" #include "test/core/test_util/build.h" // IWYU pragma: no_include diff --git a/test/core/event_engine/event_engine_test_utils.h b/test/core/event_engine/event_engine_test_utils.h index 1b71dc549f7eb..fa0f3622e1ade 100644 --- a/test/core/event_engine/event_engine_test_utils.h +++ b/test/core/event_engine/event_engine_test_utils.h @@ -31,9 +31,9 @@ #include #include -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" using EventEngineFactory = std::function< std::unique_ptr()>; diff --git a/test/core/event_engine/forkable_test.cc b/test/core/event_engine/forkable_test.cc index c15c3d7649461..86dbe63659342 100644 --- a/test/core/event_engine/forkable_test.cc +++ b/test/core/event_engine/forkable_test.cc @@ -30,7 +30,7 @@ #include "gtest/gtest.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" namespace { using ::grpc_event_engine::experimental::Forkable; diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc index 913da90303891..0a85dafe2b406 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc @@ -32,10 +32,10 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" #include "src/core/telemetry/stats.h" +#include "src/core/util/dump_args.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" #include "test/core/test_util/port.h" @@ -43,7 +43,7 @@ #if defined(GRPC_POSIX_SOCKET_TCP) #include "src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.h" #else -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #endif // IWYU pragma: no_include diff --git a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h index 93aa42c356333..23193ce99c6e7 100644 --- a/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h +++ b/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h @@ -42,8 +42,8 @@ #include #include "src/core/lib/event_engine/time_util.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/sync.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" #include "test/core/test_util/port.h" 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 e78e4aaa01e58..e5eb79fccc372 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 @@ -21,7 +21,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" using ::grpc_event_engine::experimental::FuzzingEventEngine; diff --git a/test/core/event_engine/posix/event_poller_posix_test.cc b/test/core/event_engine/posix/event_poller_posix_test.cc index d6c29bcfc5137..673c4f9c78ad4 100644 --- a/test/core/event_engine/posix/event_poller_posix_test.cc +++ b/test/core/event_engine/posix/event_poller_posix_test.cc @@ -35,8 +35,8 @@ #include "src/core/lib/event_engine/poller.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_pipe.h" #include "src/core/lib/event_engine/posix_engine/wakeup_fd_posix.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/ref_counted_ptr.h" // IWYU pragma: no_include // IWYU pragma: no_include @@ -63,10 +63,10 @@ #include "src/core/lib/event_engine/posix_engine/event_poller_posix_default.h" #include "src/core/lib/event_engine/posix_engine/posix_engine.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/crash.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/notification.h" +#include "src/core/util/strerror.h" #include "test/core/event_engine/posix/posix_engine_test_utils.h" #include "test/core/test_util/port.h" diff --git a/test/core/event_engine/posix/lock_free_event_test.cc b/test/core/event_engine/posix/lock_free_event_test.cc index c00ac1c6e2a39..f53aea94ad5b8 100644 --- a/test/core/event_engine/posix/lock_free_event_test.cc +++ b/test/core/event_engine/posix/lock_free_event_test.cc @@ -32,7 +32,7 @@ #include "src/core/lib/event_engine/posix_engine/event_poller.h" #include "src/core/lib/event_engine/posix_engine/lockfree_event.h" #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" using ::grpc_event_engine::experimental::EventEngine; using ::grpc_event_engine::experimental::Scheduler; diff --git a/test/core/event_engine/posix/log_too_many_open_files_test.cc b/test/core/event_engine/posix/log_too_many_open_files_test.cc index 3ae18a73edeeb..c87b879a2863e 100644 --- a/test/core/event_engine/posix/log_too_many_open_files_test.cc +++ b/test/core/event_engine/posix/log_too_many_open_files_test.cc @@ -24,7 +24,7 @@ #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/strerror.h" #include "test/core/test_util/test_config.h" using ::grpc_event_engine::experimental::PosixSocketWrapper; diff --git a/test/core/event_engine/posix/posix_endpoint_test.cc b/test/core/event_engine/posix/posix_endpoint_test.cc index 5effe01234e06..a8ec3af12c559 100644 --- a/test/core/event_engine/posix/posix_endpoint_test.cc +++ b/test/core/event_engine/posix/posix_endpoint_test.cc @@ -45,10 +45,10 @@ #include "src/core/lib/event_engine/posix_engine/posix_engine_closure.h" #include "src/core/lib/event_engine/posix_engine/tcp_socket_utils.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/event_engine/posix/posix_engine_test_utils.h" #include "test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h" diff --git a/test/core/event_engine/posix/posix_engine_test_utils.cc b/test/core/event_engine/posix/posix_engine_test_utils.cc index 6f35b9065b924..30c7f4088045a 100644 --- a/test/core/event_engine/posix/posix_engine_test_utils.cc +++ b/test/core/event_engine/posix/posix_engine_test_utils.cc @@ -23,7 +23,7 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/posix/posix_event_engine_connect_test.cc b/test/core/event_engine/posix/posix_event_engine_connect_test.cc index bf89dafc3fb3c..989e6c9f34150 100644 --- a/test/core/event_engine/posix/posix_event_engine_connect_test.cc +++ b/test/core/event_engine/posix/posix_event_engine_connect_test.cc @@ -43,10 +43,10 @@ #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/posix_engine/posix_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/event_engine/posix/timer_heap_test.cc b/test/core/event_engine/posix/timer_heap_test.cc index e9249444dd43c..ee1a82e6e0b35 100644 --- a/test/core/event_engine/posix/timer_heap_test.cc +++ b/test/core/event_engine/posix/timer_heap_test.cc @@ -29,7 +29,7 @@ #include "gtest/gtest.h" #include "src/core/lib/event_engine/posix_engine/timer.h" -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" using testing::Contains; using testing::Not; diff --git a/test/core/event_engine/posix/timer_list_test.cc b/test/core/event_engine/posix/timer_list_test.cc index 4d77f2a5e5865..0fae801fb9484 100644 --- a/test/core/event_engine/posix/timer_list_test.cc +++ b/test/core/event_engine/posix/timer_list_test.cc @@ -28,7 +28,7 @@ #include #include "src/core/lib/event_engine/posix_engine/timer.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" using testing::Mock; using testing::Return; diff --git a/test/core/event_engine/posix/traced_buffer_list_test.cc b/test/core/event_engine/posix/traced_buffer_list_test.cc index b6c8c0b7b3d59..9e267fe1d3fe2 100644 --- a/test/core/event_engine/posix/traced_buffer_list_test.cc +++ b/test/core/event_engine/posix/traced_buffer_list_test.cc @@ -24,9 +24,9 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #ifdef GRPC_LINUX_ERRQUEUE diff --git a/test/core/event_engine/query_extensions_test.cc b/test/core/event_engine/query_extensions_test.cc index 5f9f43ab55e2d..d657f43b81fc4 100644 --- a/test/core/event_engine/query_extensions_test.cc +++ b/test/core/event_engine/query_extensions_test.cc @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc index 54cf3d599e8e8..3efef67009fe0 100644 --- a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc +++ b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.cc @@ -35,9 +35,9 @@ #include #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/resolved_address.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" namespace grpc_event_engine { namespace experimental { diff --git a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h index 52e9953c2b147..94fbb928832ae 100644 --- a/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h +++ b/test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h @@ -30,10 +30,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" #include "test/core/event_engine/event_engine_test_utils.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/test_suite/tests/client_test.cc b/test/core/event_engine/test_suite/tests/client_test.cc index 331d59a6c573d..c6bd435a3cbbe 100644 --- a/test/core/event_engine/test_suite/tests/client_test.cc +++ b/test/core/event_engine/test_suite/tests/client_test.cc @@ -37,10 +37,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" #include "test/core/test_util/port.h" 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 9af554f61e476..a50102970edba 100644 --- a/test/core/event_engine/test_suite/tests/dns_test.cc +++ b/test/core/event_engine/test_suite/tests/dns_test.cc @@ -37,9 +37,9 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/crash.h" // IWYU pragma: keep -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/util/crash.h" // IWYU pragma: keep +#include "src/core/util/notification.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" @@ -557,7 +557,7 @@ TEST_F(EventEngineDNSTest, InvalidIPv6Addresses) { &dns_resolver_signal_, "[2001:db8::11111]:1"); } -void TestUnparseableHostPort( +void TestUnparsableHostPort( std::unique_ptr dns_resolver, grpc_core::Notification* barrier, absl::string_view target) { dns_resolver->LookupHostname( @@ -569,38 +569,38 @@ void TestUnparseableHostPort( barrier->WaitForNotification(); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsOnlyBracket) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "["); +TEST_F(EventEngineDNSTest, UnparsableHostPortsOnlyBracket) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "["); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsMissingRightBracket) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "[::1"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsMissingRightBracket) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "[::1"); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsBadPort) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "[::1]bad"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsBadPort) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "[::1]bad"); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsBadIPv6) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "[1.2.3.4]"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsBadIPv6) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "[1.2.3.4]"); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsBadLocalhost) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "[localhost]"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsBadLocalhost) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "[localhost]"); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsBadLocalhostWithPort) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, "[localhost]:1"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsBadLocalhostWithPort) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, "[localhost]:1"); } -TEST_F(EventEngineDNSTest, UnparseableHostPortsEmptyHostname) { - TestUnparseableHostPort(CreateDNSResolverWithoutSpecifyingServer(), - &dns_resolver_signal_, ":443"); +TEST_F(EventEngineDNSTest, UnparsableHostPortsEmptyHostname) { + TestUnparsableHostPort(CreateDNSResolverWithoutSpecifyingServer(), + &dns_resolver_signal_, ":443"); } // END diff --git a/test/core/event_engine/test_suite/tests/server_test.cc b/test/core/event_engine/test_suite/tests/server_test.cc index e71bcd58cb8dd..88e64ef04e0a4 100644 --- a/test/core/event_engine/test_suite/tests/server_test.cc +++ b/test/core/event_engine/test_suite/tests/server_test.cc @@ -37,10 +37,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" #include "test/core/test_util/port.h" diff --git a/test/core/event_engine/test_suite/tests/timer_test.cc b/test/core/event_engine/test_suite/tests/timer_test.cc index 543f5c97d2c08..c4a4e5cc35aba 100644 --- a/test/core/event_engine/test_suite/tests/timer_test.cc +++ b/test/core/event_engine/test_suite/tests/timer_test.cc @@ -35,7 +35,7 @@ #include #include "src/core/lib/event_engine/time_util.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "test/core/event_engine/test_suite/event_engine_test_framework.h" using ::testing::ElementsAre; 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 afc109e78ed69..76749f5830911 100644 --- a/test/core/event_engine/test_suite/tools/echo_client.cc +++ b/test/core/event_engine/test_suite/tools/echo_client.cc @@ -53,9 +53,9 @@ #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/notification.h" extern absl::AnyInvocable< std::unique_ptr(void)> diff --git a/test/core/event_engine/thread_pool_test.cc b/test/core/event_engine/thread_pool_test.cc index ead7e44e13492..29f32d16691c9 100644 --- a/test/core/event_engine/thread_pool_test.cc +++ b/test/core/event_engine/thread_pool_test.cc @@ -32,9 +32,9 @@ #include "src/core/lib/event_engine/thread_pool/thread_count.h" #include "src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/notification.h" +#include "src/core/util/thd.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" namespace grpc_event_engine { diff --git a/test/core/event_engine/windows/iocp_test.cc b/test/core/event_engine/windows/iocp_test.cc index e96b8d3816d8a..b5ee504c643a9 100644 --- a/test/core/event_engine/windows/iocp_test.cc +++ b/test/core/event_engine/windows/iocp_test.cc @@ -32,8 +32,8 @@ #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/windows/create_sockpair.h" namespace { diff --git a/test/core/event_engine/windows/win_socket_test.cc b/test/core/event_engine/windows/win_socket_test.cc index fe780f8c1901e..daa3c5360f5e3 100644 --- a/test/core/event_engine/windows/win_socket_test.cc +++ b/test/core/event_engine/windows/win_socket_test.cc @@ -27,8 +27,8 @@ #include "src/core/lib/event_engine/thread_pool/thread_pool.h" #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/win_socket.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/windows/create_sockpair.h" namespace { diff --git a/test/core/event_engine/windows/windows_endpoint_test.cc b/test/core/event_engine/windows/windows_endpoint_test.cc index a5682b7c356ef..9ada4bbf471cf 100644 --- a/test/core/event_engine/windows/windows_endpoint_test.cc +++ b/test/core/event_engine/windows/windows_endpoint_test.cc @@ -28,8 +28,8 @@ #include "src/core/lib/event_engine/windows/iocp.h" #include "src/core/lib/event_engine/windows/windows_endpoint.h" #include "src/core/lib/event_engine/windows/windows_engine.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/notification.h" #include "test/core/event_engine/windows/create_sockpair.h" namespace grpc_event_engine { 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 a363e872eac50..56e8783629b6c 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 @@ -33,13 +33,13 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/dns/event_engine/event_engine_client_channel_resolver.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" diff --git a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc index 0d5868881ec56..369ebcc468d53 100644 --- a/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc +++ b/test/core/ext/filters/rbac/rbac_service_config_parser_test.cc @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/filters/client_auth_filter_test.cc b/test/core/filters/client_auth_filter_test.cc index a8659d9f3cd94..f6a29e17d89ce 100644 --- a/test/core/filters/client_auth_filter_test.cc +++ b/test/core/filters/client_auth_filter_test.cc @@ -28,8 +28,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/promise/promise.h" #include "src/core/lib/security/context/security_context.h" @@ -39,6 +37,8 @@ #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "src/core/util/useful.h" #include "test/core/filters/filter_test.h" diff --git a/test/core/filters/filter_test.cc b/test/core/filters/filter_test.cc index 694c26350b9ce..11ff4cfa08793 100644 --- a/test/core/filters/filter_test.cc +++ b/test/core/filters/filter_test.cc @@ -29,7 +29,6 @@ #include "src/core/lib/channel/call_finalization.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/arena_promise.h" @@ -39,6 +38,7 @@ #include "src/core/lib/promise/seq.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/crash.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" using grpc_event_engine::experimental::FuzzingEventEngine; diff --git a/test/core/filters/filter_test.h b/test/core/filters/filter_test.h index e905b84c8c6bc..4c193efce31ac 100644 --- a/test/core/filters/filter_test.h +++ b/test/core/filters/filter_test.h @@ -38,13 +38,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/filters/filter_test.h" diff --git a/test/core/filters/gcp_authentication_filter_test.cc b/test/core/filters/gcp_authentication_filter_test.cc index 4c677df2b45b5..5f3880fa9988c 100644 --- a/test/core/filters/gcp_authentication_filter_test.cc +++ b/test/core/filters/gcp_authentication_filter_test.cc @@ -25,8 +25,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/gcp_service_account_identity/gcp_service_account_identity_credentials.h" @@ -34,6 +32,8 @@ #include "src/core/resolver/xds/xds_resolver_attributes.h" #include "src/core/service_config/service_config_call_data.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/unique_type_name.h" #include "test/core/filters/filter_test.h" namespace grpc_core { diff --git a/test/core/gprpp/BUILD b/test/core/gprpp/BUILD deleted file mode 100644 index 70ba953476600..0000000000000 --- a/test/core/gprpp/BUILD +++ /dev/null @@ -1,516 +0,0 @@ -# Copyright 2016 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. - -load("//bazel:custom_exec_properties.bzl", "LARGE_MACHINE") -load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") -load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_proto_fuzzer") - -licenses(["notice"]) - -grpc_package(name = "test/core/gprpp") - -grpc_cc_test( - name = "directory_reader_test", - srcs = ["directory_reader_test.cc"], - data = [ - "//test/core/tsi/test_creds/crl_data/crls:ab06acdd.r0", - "//test/core/tsi/test_creds/crl_data/crls:b9322cac.r0", - "//test/core/tsi/test_creds/crl_data/crls:current.crl", - "//test/core/tsi/test_creds/crl_data/crls:intermediate.crl", - ], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:directory_reader", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "examine_stack_test", - srcs = ["examine_stack_test.cc"], - external_deps = [ - "absl/debugging:stacktrace", - "absl/debugging:symbolize", - "absl/log:log", - "gtest", - ], - language = "C++", - # TODO(https://github.com/grpc/grpc/issues/24627): Disable this on Windows - tags = ["no_windows"], - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "dump_args_test", - srcs = ["dump_args_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:dump_args", - ], -) - -# TODO(hork): solidify fork support requirements for EventEngines -grpc_cc_test( - name = "fork_test", - srcs = ["fork_test.cc"], - external_deps = ["gtest"], - language = "C++", - tags = ["no_windows"], - uses_event_engine = True, # engines should behave appropriately on Fork - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "bitset_test", - srcs = ["bitset_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:bitset", - ], -) - -grpc_cc_test( - name = "if_list_test", - srcs = ["if_list_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:if_list", - ], -) - -grpc_cc_test( - name = "no_destruct_test", - srcs = ["no_destruct_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:no_destruct", - ], -) - -grpc_cc_test( - name = "match_test", - srcs = ["match_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:match", - ], -) - -grpc_cc_test( - name = "overload_test", - srcs = ["overload_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:overload", - ], -) - -grpc_cc_test( - name = "down_cast_test", - srcs = ["down_cast_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:down_cast", - ], -) - -grpc_cc_test( - name = "table_test", - srcs = ["table_test.cc"], - external_deps = [ - "gtest", - "absl/types:optional", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:table", - ], -) - -grpc_cc_test( - name = "host_port_test", - srcs = ["host_port_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "mpscq_test", - srcs = ["mpscq_test.cc"], - exec_properties = LARGE_MACHINE, - external_deps = [ - "absl/log:log", - "gtest", - ], - language = "C++", - tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "orphanable_test", - srcs = ["orphanable_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - deps = [ - "//:orphanable", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "ref_counted_test", - srcs = ["ref_counted_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - deps = [ - "//src/core:ref_counted", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "dual_ref_counted_test", - srcs = ["dual_ref_counted_test.cc"], - external_deps = [ - "absl/log:check", - "gtest", - ], - language = "C++", - deps = [ - "//src/core:dual_ref_counted", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "ref_counted_ptr_test", - srcs = ["ref_counted_ptr_test.cc"], - external_deps = [ - "absl/container:flat_hash_set", - "absl/log:check", - "gtest", - ], - language = "C++", - deps = [ - "//:ref_counted_ptr", - "//src/core:dual_ref_counted", - "//src/core:ref_counted", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "thd_test", - srcs = ["thd_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "stat_test", - srcs = ["stat_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//:grpc", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "status_helper_test", - srcs = ["status_helper_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "time_util_test", - srcs = ["time_util_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "cpp_impl_of_test", - srcs = ["cpp_impl_of_test.cc"], - external_deps = ["gtest"], - language = "c++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:cpp_impl_of", - ], -) - -grpc_cc_test( - name = "chunked_vector_test", - srcs = ["chunked_vector_test.cc"], - external_deps = ["gtest"], - language = "c++", - tags = [ - "resource_quota_test", - ], - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//src/core:chunked_vector", - "//src/core:resource_quota", - ], -) - -grpc_proto_fuzzer( - name = "chunked_vector_fuzzer", - srcs = ["chunked_vector_fuzzer.cc"], - corpus = "chunked_vector_corpora", - external_deps = ["absl/log:check"], - language = "C++", - proto = "chunked_vector_fuzzer.proto", - tags = ["no_windows"], - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:chunked_vector", - "//src/core:resource_quota", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "time_test", - srcs = ["time_test.cc"], - external_deps = ["gtest"], - language = "c++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:time", - ], -) - -grpc_cc_test( - name = "single_set_ptr_test", - srcs = ["single_set_ptr_test.cc"], - external_deps = [ - "absl/log:log", - "gtest", - ], - language = "c++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:single_set_ptr", - ], -) - -grpc_cc_test( - name = "sorted_pack_test", - srcs = ["sorted_pack_test.cc"], - external_deps = ["gtest"], - language = "c++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:sorted_pack", - ], -) - -grpc_cc_test( - name = "unique_type_name_test", - srcs = ["unique_type_name_test.cc"], - external_deps = [ - "gtest", - "absl/strings:str_format", - "absl/container:flat_hash_map", - ], - language = "c++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:unique_type_name", - ], -) - -grpc_cc_test( - name = "work_serializer_test", - srcs = ["work_serializer_test.cc"], - exec_properties = LARGE_MACHINE, - external_deps = [ - "gtest", - ], - flaky = True, - language = "C++", - shard_count = 5, - tags = [ - "no_windows", # LARGE_MACHINE is not configured for windows RBE - ], - deps = [ - "//:gpr", - "//:grpc", - "//test/core/event_engine:event_engine_test_utils", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "validation_errors_test", - srcs = ["validation_errors_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - deps = [ - "//src/core:validation_errors", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "notification_test", - srcs = ["notification_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = ["//src/core:notification"], -) - -grpc_cc_test( - name = "load_file_test", - srcs = ["load_file_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:load_file", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "uuid_v4_test", - srcs = ["uuid_v4_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//src/core:uuid_v4", - "//test/core/test_util:grpc_test_util", - ], -) - -grpc_cc_test( - name = "glob_test", - srcs = ["glob_test.cc"], - external_deps = ["gtest"], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//src/core:useful", - "//test/core/test_util:grpc_test_util", - ], -) diff --git a/test/core/gprpp/time_test.cc b/test/core/gprpp/time_test.cc deleted file mode 100644 index db554ac68cb06..0000000000000 --- a/test/core/gprpp/time_test.cc +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2021 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "src/core/lib/gprpp/time.h" - -#include - -#include "gtest/gtest.h" - -namespace grpc_core { -namespace testing { - -TEST(TimestampTest, Empty) { - EXPECT_EQ(Timestamp(), Timestamp::ProcessEpoch()); -} - -TEST(TimestampTest, Infinities) { - EXPECT_EQ(Timestamp::InfFuture() - Duration::Milliseconds(1), - Timestamp::InfFuture()); - EXPECT_EQ(Timestamp::InfPast() + Duration::Milliseconds(1), - Timestamp::InfPast()); - EXPECT_EQ(Timestamp::Now() - Timestamp::InfPast(), Duration::Infinity()); - EXPECT_EQ(Timestamp::Now() - Timestamp::InfFuture(), - Duration::NegativeInfinity()); - EXPECT_EQ(Timestamp::InfPast() - Timestamp::InfPast(), - Duration::NegativeInfinity()); - EXPECT_EQ(Timestamp::InfFuture() - Timestamp::InfPast(), - Duration::Infinity()); - EXPECT_EQ(Timestamp::InfFuture() - Timestamp::InfFuture(), - Duration::Infinity()); - EXPECT_EQ(Timestamp::InfPast() - Timestamp::InfFuture(), - Duration::NegativeInfinity()); -} - -TEST(TimestampTest, ToString) { - EXPECT_EQ(Timestamp::FromMillisecondsAfterProcessEpoch(42).ToString(), - "@42ms"); - EXPECT_EQ(Timestamp::InfFuture().ToString(), "@∞"); - EXPECT_EQ(Timestamp::InfPast().ToString(), "@-∞"); -} - -TEST(DurationTest, Empty) { EXPECT_EQ(Duration(), Duration::Zero()); } - -TEST(DurationTest, Scales) { - EXPECT_EQ(Duration::Milliseconds(1000), Duration::Seconds(1)); - EXPECT_EQ(Duration::Seconds(60), Duration::Minutes(1)); - EXPECT_EQ(Duration::Minutes(60), Duration::Hours(1)); - EXPECT_EQ(Duration::FromSecondsAsDouble(1.2), Duration::Milliseconds(1200)); - EXPECT_EQ(Duration::FromSecondsAndNanoseconds(1, 300000000), - Duration::Milliseconds(1300)); -} - -TEST(DurationTest, Epsilon) { - EXPECT_LE(Duration::Epsilon(), Duration::Milliseconds(1)); -} - -TEST(DurationTest, Infinities) { - EXPECT_EQ(Duration::Infinity() - Duration::Milliseconds(1), - Duration::Infinity()); - EXPECT_EQ(Duration::Infinity() + Duration::Milliseconds(1), - Duration::Infinity()); - EXPECT_EQ(Duration::Infinity() * 2, Duration::Infinity()); - EXPECT_EQ(Duration::Infinity() * -1, Duration::NegativeInfinity()); - EXPECT_EQ(Duration::Infinity() / 3, Duration::Infinity()); - EXPECT_EQ(Duration::NegativeInfinity() / -3, Duration::Infinity()); - EXPECT_EQ(Duration::NegativeInfinity() + Duration::Milliseconds(1), - Duration::NegativeInfinity()); - EXPECT_EQ(Duration::NegativeInfinity() - Duration::Milliseconds(1), - Duration::NegativeInfinity()); - EXPECT_EQ(Duration::NegativeInfinity() / 3, Duration::NegativeInfinity()); - EXPECT_EQ(Duration::Hours(std::numeric_limits::max()), - Duration::Infinity()); - EXPECT_EQ(Duration::FromSecondsAsDouble(1e100), Duration::Infinity()); - EXPECT_EQ(Duration::FromSecondsAsDouble(-1e100), - Duration::NegativeInfinity()); -} - -TEST(DurationTest, Multiplication) { - Duration d = Duration::Seconds(5); - EXPECT_EQ(d * 2, Duration::Seconds(10)); - d *= 3; - EXPECT_EQ(d, Duration::Seconds(15)); -} - -TEST(DurationTest, FromTimespan) { - EXPECT_EQ(Duration::FromTimespec(gpr_time_from_millis(1234, GPR_TIMESPAN)), - Duration::Milliseconds(1234)); -} - -TEST(DurationTest, ToString) { - EXPECT_EQ(Duration::Milliseconds(42).ToString(), "42ms"); - EXPECT_EQ(Duration::Infinity().ToString(), "∞"); - EXPECT_EQ(Duration::NegativeInfinity().ToString(), "-∞"); -} - -} // namespace testing -} // namespace grpc_core - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index 8eb2db12ea668..3032abf8cedea 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -58,9 +58,9 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" #include "test/core/test_util/tls_utils.h" #define SSL_CERT_PATH "src/core/tsi/test_creds/server1.pem" diff --git a/test/core/handshake/readahead_handshaker_server_ssl.cc b/test/core/handshake/readahead_handshaker_server_ssl.cc index b15edfc32c681..9b4203ec6f267 100644 --- a/test/core/handshake/readahead_handshaker_server_ssl.cc +++ b/test/core/handshake/readahead_handshaker_server_ssl.cc @@ -29,13 +29,13 @@ #include "src/core/handshaker/handshaker_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "test/core/handshake/server_ssl_common.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index 0bebf83ed2eea..7a8910fac3463 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -46,10 +46,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/handshake/verify_peer_options.cc b/test/core/handshake/verify_peer_options.cc index 3e5e2b1590d93..626dc964468d2 100644 --- a/test/core/handshake/verify_peer_options.cc +++ b/test/core/handshake/verify_peer_options.cc @@ -41,8 +41,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/http/httpcli_test.cc b/test/core/http/httpcli_test.cc index e63cbfe4f22a9..0f9b26ab912a6 100644 --- a/test/core/http/httpcli_test.cc +++ b/test/core/http/httpcli_test.cc @@ -43,14 +43,14 @@ #include #include -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/time_util.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/status_helper.h" #include "src/core/util/subprocess.h" +#include "src/core/util/time.h" +#include "src/core/util/time_util.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" diff --git a/test/core/http/httpscli_test.cc b/test/core/http/httpscli_test.cc index 4c15ea82dcffd..11596745a6dcb 100644 --- a/test/core/http/httpscli_test.cc +++ b/test/core/http/httpscli_test.cc @@ -42,11 +42,6 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/time_util.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -54,11 +49,16 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" // IWYU pragma: keep -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/status_helper.h" #include "src/core/util/subprocess.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/time_util.h" +#include "src/core/util/uri.h" #include "test/core/http/httpcli_test_util.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/buffer_list_test.cc b/test/core/iomgr/buffer_list_test.cc index 9994961a727cd..d6620314c291e 100644 --- a/test/core/iomgr/buffer_list_test.cc +++ b/test/core/iomgr/buffer_list_test.cc @@ -25,10 +25,10 @@ #include #include -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/internal_errqueue.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #ifdef GRPC_LINUX_ERRQUEUE diff --git a/test/core/iomgr/combiner_test.cc b/test/core/iomgr/combiner_test.cc index bdd625adad509..1e3daba39787a 100644 --- a/test/core/iomgr/combiner_test.cc +++ b/test/core/iomgr/combiner_test.cc @@ -25,9 +25,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/endpoint_pair_test.cc b/test/core/iomgr/endpoint_pair_test.cc index 71b631fb18432..76518fa5cd0bb 100644 --- a/test/core/iomgr/endpoint_pair_test.cc +++ b/test/core/iomgr/endpoint_pair_test.cc @@ -35,9 +35,9 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/shim.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/notification.h" #include "src/core/util/useful.h" #include "test/core/iomgr/endpoint_tests.h" #include "test/core/test_util/port.h" diff --git a/test/core/iomgr/endpoint_tests.cc b/test/core/iomgr/endpoint_tests.cc index 828fc5d40f5a3..5f0044bb6f025 100644 --- a/test/core/iomgr/endpoint_tests.cc +++ b/test/core/iomgr/endpoint_tests.cc @@ -29,10 +29,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/error_test.cc b/test/core/iomgr/error_test.cc index 86650ac9d45d4..93ce01db7020a 100644 --- a/test/core/iomgr/error_test.cc +++ b/test/core/iomgr/error_test.cc @@ -28,8 +28,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" #include "test/core/test_util/test_config.h" TEST(ErrorTest, SetGetInt) { diff --git a/test/core/iomgr/fd_conservation_posix_test.cc b/test/core/iomgr/fd_conservation_posix_test.cc index 4a37f512a064b..8a75b4f41e2d6 100644 --- a/test/core/iomgr/fd_conservation_posix_test.cc +++ b/test/core/iomgr/fd_conservation_posix_test.cc @@ -22,9 +22,9 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" int main(int argc, char** argv) { diff --git a/test/core/iomgr/fd_posix_test.cc b/test/core/iomgr/fd_posix_test.cc index 8395b75dec2b7..4de02c79db3ea 100644 --- a/test/core/iomgr/fd_posix_test.cc +++ b/test/core/iomgr/fd_posix_test.cc @@ -44,11 +44,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/crash.h" +#include "src/core/util/strerror.h" static gpr_mu* g_mu; static grpc_pollset* g_pollset; diff --git a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc index 2b8ae366778d6..e1d615ea9cab3 100644 --- a/test/core/iomgr/grpc_ipv6_loopback_available_test.cc +++ b/test/core/iomgr/grpc_ipv6_loopback_available_test.cc @@ -20,8 +20,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #ifdef GPR_WINDOWS diff --git a/test/core/iomgr/pollset_windows_starvation_test.cc b/test/core/iomgr/pollset_windows_starvation_test.cc index ef554e4c46896..dc75b1f61d68b 100644 --- a/test/core/iomgr/pollset_windows_starvation_test.cc +++ b/test/core/iomgr/pollset_windows_starvation_test.cc @@ -20,13 +20,13 @@ #include #include -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_windows.h" #include "src/core/lib/surface/init.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" #if defined(GRPC_WINSOCK_SOCKET) diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc index 9cebdbfa87e96..1c0eecfa04c5e 100644 --- a/test/core/iomgr/resolve_address_posix_test.cc +++ b/test/core/iomgr/resolve_address_posix_test.cc @@ -35,15 +35,15 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #include "test/core/test_util/cmdline.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/resolve_address_test.cc b/test/core/iomgr/resolve_address_test.cc index ec5834646dc06..97da4df464c69 100644 --- a/test/core/iomgr/resolve_address_test.cc +++ b/test/core/iomgr/resolve_address_test.cc @@ -35,14 +35,14 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "test/core/test_util/cmdline.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/test_config.h" @@ -240,7 +240,7 @@ const address_sorting_source_addr_factory_vtable } // namespace -TEST_F(ResolveAddressTest, LocalhostResultHasIPv4FirstWhenIPv6IsntAvalailable) { +TEST_F(ResolveAddressTest, LocalhostResultHasIPv4FirstWhenIPv6IsntAvailable) { if (std::string(g_resolver_type) != "ares") { GTEST_SKIP() << "this test is only valid with the c-ares resolver"; } @@ -326,7 +326,7 @@ TEST_F(ResolveAddressTest, InvalidIPv6Addresses) { TestInvalidIPAddress(this, "[2001:db8::11111]:1"); } -void TestUnparseableHostPort(ResolveAddressTest* test, const char* target) { +void TestUnparsableHostPort(ResolveAddressTest* test, const char* target) { grpc_core::ExecCtx exec_ctx; grpc_core::GetDNSResolver()->LookupHostname( absl::bind_front(&ResolveAddressTest::MustFail, test), target, "1", @@ -335,28 +335,28 @@ void TestUnparseableHostPort(ResolveAddressTest* test, const char* target) { test->PollPollsetUntilRequestDone(); } -TEST_F(ResolveAddressTest, UnparseableHostPortsOnlyBracket) { - TestUnparseableHostPort(this, "["); +TEST_F(ResolveAddressTest, UnparsableHostPortsOnlyBracket) { + TestUnparsableHostPort(this, "["); } -TEST_F(ResolveAddressTest, UnparseableHostPortsMissingRightBracket) { - TestUnparseableHostPort(this, "[::1"); +TEST_F(ResolveAddressTest, UnparsableHostPortsMissingRightBracket) { + TestUnparsableHostPort(this, "[::1"); } -TEST_F(ResolveAddressTest, UnparseableHostPortsBadPort) { - TestUnparseableHostPort(this, "[::1]bad"); +TEST_F(ResolveAddressTest, UnparsableHostPortsBadPort) { + TestUnparsableHostPort(this, "[::1]bad"); } -TEST_F(ResolveAddressTest, UnparseableHostPortsBadIPv6) { - TestUnparseableHostPort(this, "[1.2.3.4]"); +TEST_F(ResolveAddressTest, UnparsableHostPortsBadIPv6) { + TestUnparsableHostPort(this, "[1.2.3.4]"); } -TEST_F(ResolveAddressTest, UnparseableHostPortsBadLocalhost) { - TestUnparseableHostPort(this, "[localhost]"); +TEST_F(ResolveAddressTest, UnparsableHostPortsBadLocalhost) { + TestUnparsableHostPort(this, "[localhost]"); } -TEST_F(ResolveAddressTest, UnparseableHostPortsBadLocalhostWithPort) { - TestUnparseableHostPort(this, "[localhost]:1"); +TEST_F(ResolveAddressTest, UnparsableHostPortsBadLocalhostWithPort) { + TestUnparsableHostPort(this, "[localhost]:1"); } // Kick off a simple DNS resolution and then immediately cancel. This diff --git a/test/core/iomgr/socket_utils_test.cc b/test/core/iomgr/socket_utils_test.cc index 6d56ad9d65c75..861ea5eae25b2 100644 --- a/test/core/iomgr/socket_utils_test.cc +++ b/test/core/iomgr/socket_utils_test.cc @@ -33,9 +33,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/socket_mutator.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/tcp_client_posix_test.cc b/test/core/iomgr/tcp_client_posix_test.cc index a32e874a9d79a..6a567765b3823 100644 --- a/test/core/iomgr/tcp_client_posix_test.cc +++ b/test/core/iomgr/tcp_client_posix_test.cc @@ -20,8 +20,8 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/time.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" @@ -43,13 +43,13 @@ #include #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/resource_quota/api.h" +#include "src/core/util/crash.h" static grpc_pollset_set* g_pollset_set; static gpr_mu* g_mu; diff --git a/test/core/iomgr/tcp_posix_test.cc b/test/core/iomgr/tcp_posix_test.cc index 6117be2beb159..897df84cf3e67 100644 --- a/test/core/iomgr/tcp_posix_test.cc +++ b/test/core/iomgr/tcp_posix_test.cc @@ -19,9 +19,9 @@ #include "absl/time/time.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/notification.h" +#include "src/core/util/time.h" // This test won't work except with posix sockets enabled #ifdef GRPC_POSIX_SOCKET_TCP @@ -47,7 +47,6 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/posix.h" #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/buffer_list.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" @@ -55,6 +54,7 @@ #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/iomgr/endpoint_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/tcp_server_posix_test.cc b/test/core/iomgr/tcp_server_posix_test.cc index 6f4cc33cb008d..09c4a5c0d83e6 100644 --- a/test/core/iomgr/tcp_server_posix_test.cc +++ b/test/core/iomgr/tcp_server_posix_test.cc @@ -19,8 +19,8 @@ #include #include "src/core/lib/event_engine/shim.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" // This test won't work except with posix sockets enabled @@ -51,14 +51,14 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/strerror.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/resource_quota/api.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" +#include "src/core/util/strerror.h" #include "test/core/test_util/port.h" #define LOG_TEST(x) LOG(INFO) << #x diff --git a/test/core/iomgr/timer_heap_test.cc b/test/core/iomgr/timer_heap_test.cc index af4571a403140..3e2b907e7b5b8 100644 --- a/test/core/iomgr/timer_heap_test.cc +++ b/test/core/iomgr/timer_heap_test.cc @@ -27,8 +27,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/iomgr/timer_list_test.cc b/test/core/iomgr/timer_list_test.cc index e3064c299ffae..cd0a5221d60e3 100644 --- a/test/core/iomgr/timer_list_test.cc +++ b/test/core/iomgr/timer_list_test.cc @@ -27,11 +27,11 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tracer_util.h" @@ -47,6 +47,8 @@ static void cb(void* arg, grpc_error_handle error) { } static void add_test(void) { + if (grpc_core::IsTimeCachingInPartyEnabled()) return; + int i; grpc_timer timers[20]; grpc_core::ExecCtx exec_ctx; @@ -116,6 +118,8 @@ static void add_test(void) { // Cleaning up a list with pending timers. void destruction_test(void) { + if (grpc_core::IsTimeCachingInPartyEnabled()) return; + grpc_timer timers[5]; grpc_core::ExecCtx exec_ctx; @@ -173,6 +177,8 @@ void destruction_test(void) { // 4) Shuts down the timer list // https://github.com/grpc/grpc/issues/15904 void long_running_service_cleanup_test(void) { + if (grpc_core::IsTimeCachingInPartyEnabled()) return; + grpc_timer timers[4]; grpc_core::ExecCtx exec_ctx; diff --git a/test/core/json/json_object_loader_test.cc b/test/core/json/json_object_loader_test.cc index 6ea9b7b05986a..aad3567f86b3e 100644 --- a/test/core/json/json_object_loader_test.cc +++ b/test/core/json/json_object_loader_test.cc @@ -22,10 +22,10 @@ #include -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { namespace { diff --git a/test/core/load_balancing/bm_picker.cc b/test/core/load_balancing/bm_picker.cc index fb16691674e3c..51aee364d3f53 100644 --- a/test/core/load_balancing/bm_picker.cc +++ b/test/core/load_balancing/bm_picker.cc @@ -124,6 +124,8 @@ class BenchmarkHelper : public std::enable_shared_from_this { void CancelDataWatcher(DataWatcherInterface* watcher) override {} + std::string address() const override { return "test"; } + private: void AddConnectivityWatcherInternal( std::shared_ptr watcher) { diff --git a/test/core/load_balancing/lb_policy_test_lib.h b/test/core/load_balancing/lb_policy_test_lib.h index fcd85c8928eee..00c21dcd9a327 100644 --- a/test/core/load_balancing/lb_policy_test_lib.h +++ b/test/core/load_balancing/lb_policy_test_lib.h @@ -62,19 +62,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.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/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/transport/connectivity_state.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/health_check_client_internal.h" #include "src/core/load_balancing/lb_policy.h" @@ -84,7 +75,16 @@ #include "src/core/load_balancing/subchannel_interface.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/service_config/service_config_call_data.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/match.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" @@ -121,6 +121,8 @@ class LoadBalancingPolicyTest : public ::testing::Test { SubchannelState* state() const { return state_; } + std::string address() const override { return state_->address_; } + private: // Converts between // SubchannelInterface::ConnectivityStateWatcherInterface and diff --git a/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc b/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc index 40dad8d96d3f6..b5145f451ff58 100644 --- a/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc +++ b/test/core/load_balancing/outlier_detection_lb_config_parser_test.cc @@ -24,9 +24,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/load_balancing/outlier_detection_test.cc b/test/core/load_balancing/outlier_detection_test.cc index 2a809d485f7ae..e92c3bc4e8405 100644 --- a/test/core/load_balancing/outlier_detection_test.cc +++ b/test/core/load_balancing/outlier_detection_test.cc @@ -35,13 +35,13 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/pick_first_test.cc b/test/core/load_balancing/pick_first_test.cc index 413c58be6ff47..0f07d6fd39d33 100644 --- a/test/core/load_balancing/pick_first_test.cc +++ b/test/core/load_balancing/pick_first_test.cc @@ -38,16 +38,16 @@ #include #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/telemetry/metrics.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" +#include "src/core/util/work_serializer.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/fake_stats_plugin.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/ring_hash_test.cc b/test/core/load_balancing/ring_hash_test.cc index 9420834d51f63..0861cdcb5db06 100644 --- a/test/core/load_balancing/ring_hash_test.cc +++ b/test/core/load_balancing/ring_hash_test.cc @@ -34,11 +34,11 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/xxhash_inline.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/util/json/json.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/xxhash_inline.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/rls_lb_config_parser_test.cc b/test/core/load_balancing/rls_lb_config_parser_test.cc index 0c1da6ef8c34c..edf3e8127bf24 100644 --- a/test/core/load_balancing/rls_lb_config_parser_test.cc +++ b/test/core/load_balancing/rls_lb_config_parser_test.cc @@ -24,9 +24,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/test_config.h" namespace grpc_core { @@ -90,7 +90,7 @@ TEST_F(RlsConfigParsingTest, TopLevelRequiredFieldsMissing) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig error:field not present]")) @@ -115,7 +115,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsWrongTypes) { EXPECT_EQ(service_config.status().message(), "errors validating service config: [" "field:loadBalancingConfig " - "error:errors validing RLS LB policy config: [" + "error:errors validating RLS LB policy config: [" "field:childPolicy error:is not an array; " "field:childPolicyConfigTargetFieldName error:is not a string; " "field:routeLookupChannelServiceConfig error:is not an object; " @@ -141,7 +141,7 @@ TEST_F(RlsConfigParsingTest, TopLevelFieldsInvalidValues) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:No known policies in list: unknown; " "field:childPolicyConfigTargetFieldName error:must be non-empty; " "field:routeLookupConfig error:field not present]")) @@ -165,7 +165,7 @@ TEST_F(RlsConfigParsingTest, InvalidChildPolicyConfig) { EXPECT_EQ(service_config.status().code(), absl::StatusCode::kInvalidArgument); EXPECT_THAT( service_config.status().message(), - ::testing::HasSubstr("errors validing RLS LB policy config: [" + ::testing::HasSubstr("errors validating RLS LB policy config: [" "field:childPolicy error:" "errors validating grpclb LB policy config: [" "field:childPolicy error:type should be array]; " @@ -194,7 +194,7 @@ TEST_F(RlsConfigParsingTest, InvalidRlsChannelServiceConfig) { EXPECT_EQ(service_config.status().message(), "errors validating service config: [" "field:loadBalancingConfig " - "error:errors validing RLS LB policy config: [" + "error:errors validating RLS LB policy config: [" "field:routeLookupChannelServiceConfig.loadBalancingPolicy " "error:unknown LB policy \"unknown\"; " "field:routeLookupConfig error:field not present]]") @@ -221,7 +221,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigRequiredFieldsMissing) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -254,7 +254,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsWrongTypes) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:" @@ -286,7 +286,7 @@ TEST_F(RlsConfigParsingTest, RouteLookupConfigFieldsInvalidValues) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:" @@ -321,7 +321,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderRequiredFieldsMissing) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -355,7 +355,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderWrongFieldTypes) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -400,7 +400,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidValues) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -458,7 +458,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderInvalidHeaders) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -515,7 +515,7 @@ TEST_F(RlsConfigParsingTest, GrpcKeybuilderNameWrongFieldTypes) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -559,7 +559,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInSameKeyBuilder) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " @@ -603,7 +603,7 @@ TEST_F(RlsConfigParsingTest, DuplicateMethodNamesInDifferentKeyBuilders) { EXPECT_THAT( service_config.status().message(), ::testing::HasSubstr( - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:childPolicy error:field not present; " "field:childPolicyConfigTargetFieldName error:field not present; " "field:routeLookupConfig.cacheSizeBytes error:field not present; " diff --git a/test/core/load_balancing/round_robin_test.cc b/test/core/load_balancing/round_robin_test.cc index 697b0ebc1070f..78da9b904f372 100644 --- a/test/core/load_balancing/round_robin_test.cc +++ b/test/core/load_balancing/round_robin_test.cc @@ -24,9 +24,9 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/static_stride_scheduler_benchmark.cc b/test/core/load_balancing/static_stride_scheduler_benchmark.cc index 7ae3973637b3b..aba086e7e40bc 100644 --- a/test/core/load_balancing/static_stride_scheduler_benchmark.cc +++ b/test/core/load_balancing/static_stride_scheduler_benchmark.cc @@ -27,8 +27,8 @@ #include "absl/types/optional.h" #include "absl/types/span.h" -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" +#include "src/core/util/no_destruct.h" namespace grpc_core { namespace { diff --git a/test/core/load_balancing/weighted_round_robin_config_test.cc b/test/core/load_balancing/weighted_round_robin_config_test.cc index 7d6f3bb81b217..5da2fb5a0065d 100644 --- a/test/core/load_balancing/weighted_round_robin_config_test.cc +++ b/test/core/load_balancing/weighted_round_robin_config_test.cc @@ -23,9 +23,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/load_balancing/weighted_round_robin_test.cc b/test/core/load_balancing/weighted_round_robin_test.cc index d680a1c3e37e6..8faa6c693e162 100644 --- a/test/core/load_balancing/weighted_round_robin_test.cc +++ b/test/core/load_balancing/weighted_round_robin_test.cc @@ -40,16 +40,16 @@ #include #include -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/load_balancing/backend_metric_data.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/weighted_target/weighted_target.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/fake_stats_plugin.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc b/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc index 175c41aedbd5a..3407ababe5933 100644 --- a/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc +++ b/test/core/load_balancing/xds_override_host_lb_config_parser_test.cc @@ -24,10 +24,10 @@ #include "src/core/client_channel/client_channel_service_config.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/load_balancing/xds/xds_override_host.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_health_status.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/load_balancing/xds_override_host_test.cc b/test/core/load_balancing/xds_override_host_test.cc index 11208870e89de..4352b6db370c6 100644 --- a/test/core/load_balancing/xds_override_host_test.cc +++ b/test/core/load_balancing/xds_override_host_test.cc @@ -39,12 +39,11 @@ #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/xds/xds_config.h" #include "src/core/util/json/json.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_health_status.h" #include "test/core/load_balancing/lb_policy_test_lib.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/matchers/BUILD b/test/core/matchers/BUILD deleted file mode 100644 index 8609304bd6ca9..0000000000000 --- a/test/core/matchers/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -# 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. - -load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") - -licenses(["notice"]) - -grpc_package(name = "test/core/matchers") - -grpc_cc_test( - name = "matchers_test", - srcs = ["matchers_test.cc"], - external_deps = ["gtest"], - language = "C++", - deps = [ - "//:gpr", - "//:grpc", - "//test/core/test_util:grpc_test_util", - "//test/core/test_util:grpc_test_util_base", - ], -) diff --git a/test/core/memory_usage/callback_client.cc b/test/core/memory_usage/callback_client.cc index f36abd6ca1c4f..449fcbd34fe9f 100644 --- a/test/core/memory_usage/callback_client.cc +++ b/test/core/memory_usage/callback_client.cc @@ -38,7 +38,7 @@ #include #include -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" #include "src/cpp/ext/chaotic_good.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/core/memory_usage/memory_usage_test.cc b/test/core/memory_usage/memory_usage_test.cc index 9433d633cef9e..798b90093daa6 100644 --- a/test/core/memory_usage/memory_usage_test.cc +++ b/test/core/memory_usage/memory_usage_test.cc @@ -46,7 +46,7 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/subprocess.h" #include "src/proto/grpc/testing/xds/v3/cluster.pb.h" #include "src/proto/grpc/testing/xds/v3/health_check.pb.h" diff --git a/test/core/memory_usage/server.cc b/test/core/memory_usage/server.cc index 2a91f74368faa..4f41754d06c6d 100644 --- a/test/core/memory_usage/server.cc +++ b/test/core/memory_usage/server.cc @@ -49,7 +49,7 @@ #include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "src/core/xds/grpc/xds_enabled_server.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/memory_usage/memstats.h" diff --git a/test/core/message_size/message_size_service_config_test.cc b/test/core/message_size/message_size_service_config_test.cc index e88434ed4d59c..65fd3a1111828 100644 --- a/test/core/message_size/message_size_service_config_test.cc +++ b/test/core/message_size/message_size_service_config_test.cc @@ -28,10 +28,10 @@ #include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/network_benchmarks/low_level_ping_pong.cc b/test/core/network_benchmarks/low_level_ping_pong.cc index 49bd712bb7a63..9211b83e7eada 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.cc +++ b/test/core/network_benchmarks/low_level_ping_pong.cc @@ -41,10 +41,10 @@ #include #include -#include "src/core/lib/gprpp/strerror.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/strerror.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/test_util/cmdline.h" #include "test/core/test_util/histogram.h" diff --git a/test/core/promise/arena_promise_test.cc b/test/core/promise/arena_promise_test.cc index d8f43426012b0..2f4da3b2c5d76 100644 --- a/test/core/promise/arena_promise_test.cc +++ b/test/core/promise/arena_promise_test.cc @@ -21,10 +21,10 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_context.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/promise/event_engine_wakeup_scheduler_test.cc b/test/core/promise/event_engine_wakeup_scheduler_test.cc index 306105d26ce74..739c1a25f4e3a 100644 --- a/test/core/promise/event_engine_wakeup_scheduler_test.cc +++ b/test/core/promise/event_engine_wakeup_scheduler_test.cc @@ -24,9 +24,9 @@ #include #include -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/poll.h" +#include "src/core/util/notification.h" namespace grpc_core { diff --git a/test/core/promise/for_each_test.cc b/test/core/promise/for_each_test.cc index 4ce3914004f4c..ea0f63732c1d9 100644 --- a/test/core/promise/for_each_test.cc +++ b/test/core/promise/for_each_test.cc @@ -21,7 +21,6 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/inter_activity_pipe.h" #include "src/core/lib/promise/join.h" @@ -32,6 +31,7 @@ #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_wakeup_schedulers.h" using testing::Mock; diff --git a/test/core/promise/inter_activity_latch_test.cc b/test/core/promise/inter_activity_latch_test.cc index 087489b240e94..925062c561b22 100644 --- a/test/core/promise/inter_activity_latch_test.cc +++ b/test/core/promise/inter_activity_latch_test.cc @@ -20,9 +20,9 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/promise/event_engine_wakeup_scheduler.h" #include "src/core/lib/promise/seq.h" +#include "src/core/util/notification.h" using grpc_event_engine::experimental::GetDefaultEventEngine; diff --git a/test/core/promise/interceptor_list_test.cc b/test/core/promise/interceptor_list_test.cc index f9ff107d289ac..d52ba61100603 100644 --- a/test/core/promise/interceptor_list_test.cc +++ b/test/core/promise/interceptor_list_test.cc @@ -20,10 +20,10 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_context.h" namespace grpc_core { diff --git a/test/core/promise/map_pipe_test.cc b/test/core/promise/map_pipe_test.cc index 0bcc4f7c73984..5b702f2f8d0b5 100644 --- a/test/core/promise/map_pipe_test.cc +++ b/test/core/promise/map_pipe_test.cc @@ -22,7 +22,6 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/for_each.h" #include "src/core/lib/promise/join.h" @@ -33,6 +32,7 @@ #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_wakeup_schedulers.h" using testing::Mock; diff --git a/test/core/promise/observable_test.cc b/test/core/promise/observable_test.cc index 12fd66fe36cfa..45fb438ebd18b 100644 --- a/test/core/promise/observable_test.cc +++ b/test/core/promise/observable_test.cc @@ -25,9 +25,9 @@ #include -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/promise/loop.h" #include "src/core/lib/promise/map.h" +#include "src/core/util/notification.h" #include "test/core/promise/poll_matcher.h" using testing::Mock; diff --git a/test/core/promise/party_test.cc b/test/core/promise/party_test.cc index 5695abffe0947..09075395bf411 100644 --- a/test/core/promise/party_test.cc +++ b/test/core/promise/party_test.cc @@ -32,10 +32,6 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/inter_activity_latch.h" @@ -45,6 +41,10 @@ #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" namespace grpc_core { diff --git a/test/core/promise/pipe_test.cc b/test/core/promise/pipe_test.cc index e1219c55400ef..b74f29df2e8c0 100644 --- a/test/core/promise/pipe_test.cc +++ b/test/core/promise/pipe_test.cc @@ -26,14 +26,14 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/join.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/promise/test_wakeup_schedulers.h" using testing::MockFunction; diff --git a/test/core/promise/sleep_test.cc b/test/core/promise/sleep_test.cc index fc0c2f03c4b90..eaa816294da7d 100644 --- a/test/core/promise/sleep_test.cc +++ b/test/core/promise/sleep_test.cc @@ -28,12 +28,12 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/race.h" #include "src/core/lib/resource_quota/arena.h" +#include "src/core/util/notification.h" +#include "src/core/util/orphanable.h" #include "test/core/event_engine/mock_event_engine.h" #include "test/core/promise/test_wakeup_schedulers.h" diff --git a/test/core/promise/wait_for_callback_test.cc b/test/core/promise/wait_for_callback_test.cc index cb54ccf2e0e3c..25f5771379c33 100644 --- a/test/core/promise/wait_for_callback_test.cc +++ b/test/core/promise/wait_for_callback_test.cc @@ -17,8 +17,8 @@ #include "absl/status/status.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/promise/map.h" +#include "src/core/util/notification.h" #include "test/core/promise/test_wakeup_schedulers.h" namespace grpc_core { diff --git a/test/core/resolver/binder_resolver_test.cc b/test/core/resolver/binder_resolver_test.cc index 9fad73a67041b..7f6d3b9f14c92 100644 --- a/test/core/resolver/binder_resolver_test.cc +++ b/test/core/resolver/binder_resolver_test.cc @@ -22,13 +22,13 @@ #include "gtest/gtest.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" #include "test/core/test_util/test_config.h" #ifdef GRPC_HAVE_UNIX_SOCKET diff --git a/test/core/resolver/dns_resolver_cooldown_test.cc b/test/core/resolver/dns_resolver_cooldown_test.cc index 0bc27e4b3c0ff..ad7b6a3a8c37e 100644 --- a/test/core/resolver/dns_resolver_cooldown_test.cc +++ b/test/core/resolver/dns_resolver_cooldown_test.cc @@ -42,12 +42,6 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/no_destruct.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -56,12 +50,18 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/no_destruct.h" +#include "src/core/util/notification.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "test/core/test_util/test_config.h" using ::grpc_event_engine::experimental::GetDefaultEventEngine; diff --git a/test/core/resolver/dns_resolver_test.cc b/test/core/resolver/dns_resolver_test.cc index 14bb534ed4319..4bf8a069c8b20 100644 --- a/test/core/resolver/dns_resolver_test.cc +++ b/test/core/resolver/dns_resolver_test.cc @@ -30,13 +30,13 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "test/core/test_util/test_config.h" using ::grpc_event_engine::experimental::GetDefaultEventEngine; diff --git a/test/core/resolver/endpoint_addresses_test.cc b/test/core/resolver/endpoint_addresses_test.cc index d5f14f624da58..dafb5a54aac38 100644 --- a/test/core/resolver/endpoint_addresses_test.cc +++ b/test/core/resolver/endpoint_addresses_test.cc @@ -29,7 +29,7 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/resolver/fake_resolver_test.cc b/test/core/resolver/fake_resolver_test.cc index c9ece82509c23..9b14b43d431e5 100644 --- a/test/core/resolver/fake_resolver_test.cc +++ b/test/core/resolver/fake_resolver_test.cc @@ -41,16 +41,16 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.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" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "test/core/test_util/test_config.h" namespace grpc_core { @@ -115,7 +115,6 @@ class FakeResolverTest : public ::testing::Test { EXPECT_TRUE(uri.ok()); grpc_resolved_address address; EXPECT_TRUE(grpc_parse_uri(*uri, &address)); - absl::InlinedVector args_to_add; addresses.emplace_back(address, ChannelArgs()); } ++test_counter; diff --git a/test/core/resolver/google_c2p_resolver_test.cc b/test/core/resolver/google_c2p_resolver_test.cc index a95843b588c55..96ddc587c4e9e 100644 --- a/test/core/resolver/google_c2p_resolver_test.cc +++ b/test/core/resolver/google_c2p_resolver_test.cc @@ -32,7 +32,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/resolver/sockaddr_resolver_test.cc b/test/core/resolver/sockaddr_resolver_test.cc index a4aa4bc068dd5..faf9040036445 100644 --- a/test/core/resolver/sockaddr_resolver_test.cc +++ b/test/core/resolver/sockaddr_resolver_test.cc @@ -27,14 +27,14 @@ #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/port.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_factory.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/uri.h" +#include "src/core/util/work_serializer.h" #include "test/core/test_util/test_config.h" static std::shared_ptr* g_work_serializer; diff --git a/test/core/resource_quota/arena_test.cc b/test/core/resource_quota/arena_test.cc index ee22b8d4b6f9c..997b7760d22bd 100644 --- a/test/core/resource_quota/arena_test.cc +++ b/test/core/resource_quota/arena_test.cc @@ -35,10 +35,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" using testing::Mock; diff --git a/test/core/resource_quota/memory_quota_fuzzer.cc b/test/core/resource_quota/memory_quota_fuzzer.cc index 2fb432cbe2839..654f20e291a04 100644 --- a/test/core/resource_quota/memory_quota_fuzzer.cc +++ b/test/core/resource_quota/memory_quota_fuzzer.cc @@ -31,11 +31,11 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/debug_location.h" #include "src/core/util/useful.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/resource_quota/call_checker.h" diff --git a/test/core/resource_quota/memory_quota_stress_test.cc b/test/core/resource_quota/memory_quota_stress_test.cc index ab1634c3775f3..a8086810cc75b 100644 --- a/test/core/resource_quota/memory_quota_stress_test.cc +++ b/test/core/resource_quota/memory_quota_stress_test.cc @@ -33,9 +33,9 @@ #include #include -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" +#include "src/core/util/sync.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 664032de7fa82..0824e81eea5fa 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -456,6 +456,8 @@ grpc_cc_test( srcs = ["grpc_tls_certificate_provider_test.cc"], data = [ "//src/core/tsi/test_creds:ca.pem", + "//src/core/tsi/test_creds:malformed-cert.pem", + "//src/core/tsi/test_creds:malformed-key.pem", "//src/core/tsi/test_creds:multi-domain.key", "//src/core/tsi/test_creds:multi-domain.pem", "//src/core/tsi/test_creds:server0.key", diff --git a/test/core/security/alts_credentials_fuzzer.cc b/test/core/security/alts_credentials_fuzzer.cc index 4913a3b29c963..9f76b2bf7387d 100644 --- a/test/core/security/alts_credentials_fuzzer.cc +++ b/test/core/security/alts_credentials_fuzzer.cc @@ -26,11 +26,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/security/credentials/alts/alts_credentials.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" #include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "test/core/test_util/fuzzer_util.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/alts_security_connector_test.cc b/test/core/security/alts_security_connector_test.cc index 3fa83df1e65a5..02a7cf5e1a402 100644 --- a/test/core/security/alts_security_connector_test.cc +++ b/test/core/security/alts_security_connector_test.cc @@ -29,11 +29,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/transport/transport.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" using grpc_core::internal::grpc_alts_auth_context_from_tsi_peer; diff --git a/test/core/security/auth_context_test.cc b/test/core/security/auth_context_test.cc index ea9be077e2417..9443712cc918f 100644 --- a/test/core/security/auth_context_test.cc +++ b/test/core/security/auth_context_test.cc @@ -22,9 +22,9 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" #include "test/core/test_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 4217c0eb346a9..b4122a8051e33 100644 --- a/test/core/security/check_gcp_environment_linux_test.cc +++ b/test/core/security/check_gcp_environment_linux_test.cc @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" +#include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" #if GPR_LINUX diff --git a/test/core/security/check_gcp_environment_windows_test.cc b/test/core/security/check_gcp_environment_windows_test.cc index 8a1cbbb3fba4f..7d1db40d69ff3 100644 --- a/test/core/security/check_gcp_environment_windows_test.cc +++ b/test/core/security/check_gcp_environment_windows_test.cc @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/alts/check_gcp_environment.h" +#include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" #ifdef GPR_WINDOWS diff --git a/test/core/security/create_jwt.cc b/test/core/security/create_jwt.cc index 79be2b68e1c02..f4f84a4ff4b43 100644 --- a/test/core/security/create_jwt.cc +++ b/test/core/security/create_jwt.cc @@ -23,8 +23,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include "src/core/util/crash.h" #include "test/core/test_util/cmdline.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 721a02f6e33fe..da207a6474b06 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -42,11 +42,6 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" @@ -69,12 +64,17 @@ #include "src/core/lib/security/credentials/xds/xds_credentials.h" #include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/transport/error_utils.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/httpcli_ssl_credentials.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/string.h" +#include "src/core/util/time.h" #include "src/core/util/tmpfile.h" +#include "src/core/util/unique_type_name.h" +#include "src/core/util/uri.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/test_util/test_config.h" @@ -213,7 +213,7 @@ const char "\"headers\":{\"Metadata-Flavor\":\"Google\"}}"; const char - valid_url_external_account_creds_options_credential_source_with_qurey_params_format_text + valid_url_external_account_creds_options_credential_source_with_query_params_format_text [] = "{\"url\":\"https://foo.com:5555/" "path/to/url/creds?p1=v1&p2=v2\"," "\"headers\":{\"Metadata-Flavor\":\"Google\"}}"; @@ -2122,7 +2122,7 @@ TEST_F(CredentialsTest, TestAuthMetadataContext) { } } -void validate_external_account_creds_token_exchage_request( +void validate_external_account_creds_token_exchange_request( const grpc_http_request* request, const URI& request_uri, absl::string_view body) { // Check that the body is constructed properly. @@ -2154,7 +2154,7 @@ void validate_external_account_creds_token_exchage_request( "Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ="); } -void validate_external_account_creds_token_exchage_request_with_url_encode( +void validate_external_account_creds_token_exchange_request_with_url_encode( const grpc_http_request* request, const URI& uri, absl::string_view body) { // Check that the body is constructed properly. EXPECT_EQ( @@ -2214,7 +2214,7 @@ int external_acc_creds_serv_acc_imp_custom_lifetime_httpcli_post_success( Timestamp /*deadline*/, grpc_closure* on_done, grpc_http_response* response) { if (uri.path() == "/token") { - validate_external_account_creds_token_exchage_request(request, uri, body); + validate_external_account_creds_token_exchange_request(request, uri, body); *response = http_response( 200, valid_external_account_creds_token_exchange_response); } else if (uri.path() == "/service_account_impersonation") { @@ -2233,7 +2233,7 @@ int external_account_creds_httpcli_post_success( Timestamp /*deadline*/, grpc_closure* on_done, grpc_http_response* response) { if (uri.path() == "/token") { - validate_external_account_creds_token_exchage_request(request, uri, body); + validate_external_account_creds_token_exchange_request(request, uri, body); *response = http_response( 200, valid_external_account_creds_token_exchange_response); } else if (uri.path() == "/service_account_impersonation") { @@ -2243,7 +2243,7 @@ int external_account_creds_httpcli_post_success( 200, valid_external_account_creds_service_account_impersonation_response); } else if (uri.path() == "/token_url_encode") { - validate_external_account_creds_token_exchage_request_with_url_encode( + validate_external_account_creds_token_exchange_request_with_url_encode( request, uri, body); *response = http_response( 200, valid_external_account_creds_token_exchange_response); @@ -2291,7 +2291,7 @@ int url_external_account_creds_httpcli_get_success( return 1; } -void validate_aws_external_account_creds_token_exchage_request( +void validate_aws_external_account_creds_token_exchange_request( const grpc_http_request* request, const URI& request_uri, absl::string_view body) { // Check that the regional_cred_verification_url got constructed @@ -2380,8 +2380,8 @@ int aws_external_account_creds_httpcli_post_success( Timestamp /*deadline*/, grpc_closure* on_done, grpc_http_response* response) { if (uri.path() == "/token") { - validate_aws_external_account_creds_token_exchage_request(request, uri, - body); + validate_aws_external_account_creds_token_exchange_request(request, uri, + body); *response = http_response( 200, valid_external_account_creds_token_exchange_response); } @@ -2492,6 +2492,7 @@ TEST_F(TokenFetcherCredentialsTest, Basic) { ExecCtx exec_ctx; creds_->AddResult(MakeToken("foo", kExpirationTime)); // First request will trigger a fetch. + LOG(INFO) << "First request"; auto state = RequestMetadataState::NewInstance( absl::OkStatus(), "authorization: foo", /*expect_delay=*/true); state->RunRequestMetadataTest(creds_.get(), kTestUrlScheme, kTestAuthority, @@ -2499,6 +2500,7 @@ TEST_F(TokenFetcherCredentialsTest, Basic) { EXPECT_EQ(creds_->num_fetches(), 1); // Second request while fetch is still outstanding will be delayed but // will not trigger a new fetch. + LOG(INFO) << "Second request"; state = RequestMetadataState::NewInstance( absl::OkStatus(), "authorization: foo", /*expect_delay=*/true); state->RunRequestMetadataTest(creds_.get(), kTestUrlScheme, kTestAuthority, @@ -2507,6 +2509,7 @@ TEST_F(TokenFetcherCredentialsTest, Basic) { // Now tick to finish the fetch. event_engine_->TickUntilIdle(); // Next request will be served from cache with no delay. + LOG(INFO) << "Third request"; state = RequestMetadataState::NewInstance( absl::OkStatus(), "authorization: foo", /*expect_delay=*/false); state->RunRequestMetadataTest(creds_.get(), kTestUrlScheme, kTestAuthority, @@ -2519,6 +2522,7 @@ TEST_F(TokenFetcherCredentialsTest, Basic) { // Next request will trigger a new fetch but will still use the // cached token. creds_->AddResult(MakeToken("bar")); + LOG(INFO) << "Fourth request"; state = RequestMetadataState::NewInstance( absl::OkStatus(), "authorization: foo", /*expect_delay=*/false); state->RunRequestMetadataTest(creds_.get(), kTestUrlScheme, kTestAuthority, @@ -2526,6 +2530,7 @@ TEST_F(TokenFetcherCredentialsTest, Basic) { EXPECT_EQ(creds_->num_fetches(), 2); event_engine_->TickUntilIdle(); // Next request will use the new data. + LOG(INFO) << "Fifth request"; state = RequestMetadataState::NewInstance( absl::OkStatus(), "authorization: bar", /*expect_delay=*/false); state->RunRequestMetadataTest(creds_.get(), kTestUrlScheme, kTestAuthority, @@ -3200,12 +3205,12 @@ TEST_F(ExternalAccountCredentialsTest, } TEST_F(ExternalAccountCredentialsTest, - UrlExternalAccountCredsSuccessWithQureyParamsFormatText) { + UrlExternalAccountCredsSuccessWithQueryParamsFormatText) { std::map emd = { {"authorization", "Bearer token_exchange_access_token"}}; ExecCtx exec_ctx; auto credential_source = JsonParse( - valid_url_external_account_creds_options_credential_source_with_qurey_params_format_text); + valid_url_external_account_creds_options_credential_source_with_query_params_format_text); ASSERT_TRUE(credential_source.ok()) << credential_source.status(); TestExternalAccountCredentials::ServiceAccountImpersonation service_account_impersonation; @@ -4464,7 +4469,7 @@ TEST_F(CredentialsTest, TestTlsCredentialsWithVerifierCompareFailure) { grpc_channel_credentials_release(tls_creds_2); } -TEST_F(CredentialsTest, TestXdsCredentialsCompareSucces) { +TEST_F(CredentialsTest, TestXdsCredentialsCompareSuccess) { auto* insecure_creds = grpc_insecure_credentials_create(); auto* xds_creds_1 = grpc_xds_credentials_create(insecure_creds); auto* xds_creds_2 = grpc_xds_credentials_create(insecure_creds); diff --git a/test/core/security/fetch_oauth2.cc b/test/core/security/fetch_oauth2.cc index 8faad222de307..b99d41f9dce5a 100644 --- a/test/core/security/fetch_oauth2.cc +++ b/test/core/security/fetch_oauth2.cc @@ -30,10 +30,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/util/json_util.h" +#include "src/core/util/crash.h" #include "src/cpp/client/secure_credentials.h" #include "test/core/security/oauth2_utils.h" #include "test/core/test_util/cmdline.h" diff --git a/test/core/security/grpc_alts_credentials_options_test.cc b/test/core/security/grpc_alts_credentials_options_test.cc index 9c53cd25bf3cf..77f41ef7a8df2 100644 --- a/test/core/security/grpc_alts_credentials_options_test.cc +++ b/test/core/security/grpc_alts_credentials_options_test.cc @@ -26,7 +26,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #define ALTS_CLIENT_OPTIONS_TEST_TARGET_SERVICE_ACCOUNT_1 "abc@google.com" #define ALTS_CLIENT_OPTIONS_TEST_TARGET_SERVICE_ACCOUNT_2 "def@google.com" diff --git a/test/core/security/grpc_tls_certificate_distributor_test.cc b/test/core/security/grpc_tls_certificate_distributor_test.cc index e0fbd238468b2..c3459b22370e4 100644 --- a/test/core/security/grpc_tls_certificate_distributor_test.cc +++ b/test/core/security/grpc_tls_certificate_distributor_test.cc @@ -29,8 +29,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/grpc_tls_certificate_provider_test.cc b/test/core/security/grpc_tls_certificate_provider_test.cc index 31e7a06bd6313..d0ce58ecafbda 100644 --- a/test/core/security/grpc_tls_certificate_provider_test.cc +++ b/test/core/security/grpc_tls_certificate_provider_test.cc @@ -23,12 +23,13 @@ #include #include "absl/log/check.h" +#include "absl/status/status.h" #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" @@ -40,6 +41,8 @@ #define SERVER_CERT_PATH_2 "src/core/tsi/test_creds/server0.pem" #define SERVER_KEY_PATH_2 "src/core/tsi/test_creds/server0.key" #define INVALID_PATH "invalid/path" +#define MALFORMED_CERT_PATH "src/core/tsi/test_creds/malformed-cert.pem" +#define MALFORMED_KEY_PATH "src/core/tsi/test_creds/malformed-key.pem" namespace grpc_core { @@ -162,6 +165,8 @@ class GrpcTlsCertificateProviderTest : public ::testing::Test { root_cert_2_ = GetFileContents(CA_CERT_PATH_2); cert_chain_2_ = GetFileContents(SERVER_CERT_PATH_2); private_key_2_ = GetFileContents(SERVER_KEY_PATH_2); + malformed_cert_ = GetFileContents(MALFORMED_CERT_PATH); + malformed_key_ = GetFileContents(MALFORMED_KEY_PATH); } WatcherState* MakeWatcher( @@ -195,6 +200,8 @@ class GrpcTlsCertificateProviderTest : public ::testing::Test { std::string root_cert_2_; std::string private_key_2_; std::string cert_chain_2_; + std::string malformed_cert_; + std::string malformed_key_; RefCountedPtr distributor_; // Use a std::list<> here to avoid the address invalidation caused by internal // reallocation of std::vector<>. @@ -230,6 +237,40 @@ TEST_F(GrpcTlsCertificateProviderTest, StaticDataCertificateProviderCreation) { CancelWatch(watcher_state_3); } +TEST_F(GrpcTlsCertificateProviderTest, + StaticDataCertificateProviderWithGoodPathsAndCredentialValidation) { + StaticDataCertificateProvider provider( + root_cert_, MakeCertKeyPairs(private_key_.c_str(), cert_chain_.c_str())); + EXPECT_EQ(provider.ValidateCredentials(), absl::OkStatus()); +} + +TEST_F(GrpcTlsCertificateProviderTest, + StaticDataCertificateProviderWithMalformedRootCertificate) { + StaticDataCertificateProvider provider( + malformed_cert_, + MakeCertKeyPairs(private_key_.c_str(), cert_chain_.c_str())); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + +TEST_F(GrpcTlsCertificateProviderTest, + StaticDataCertificateProviderWithMalformedIdentityCertificate) { + StaticDataCertificateProvider provider( + root_cert_, + MakeCertKeyPairs(private_key_.c_str(), malformed_cert_.c_str())); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + +TEST_F(GrpcTlsCertificateProviderTest, + StaticDataCertificateProviderWithMalformedIdentityKey) { + StaticDataCertificateProvider provider( + root_cert_, + MakeCertKeyPairs(malformed_key_.c_str(), cert_chain_.c_str())); + EXPECT_EQ(provider.ValidateCredentials(), + absl::NotFoundError("No private key found.")); +} + TEST_F(GrpcTlsCertificateProviderTest, FileWatcherCertificateProviderWithGoodPaths) { FileWatcherCertificateProvider provider(SERVER_KEY_PATH, SERVER_CERT_PATH, @@ -258,6 +299,37 @@ TEST_F(GrpcTlsCertificateProviderTest, CancelWatch(watcher_state_3); } +TEST_F(GrpcTlsCertificateProviderTest, + FileWatcherCertificateProviderWithGoodPathsAndCredentialValidation) { + FileWatcherCertificateProvider provider(SERVER_KEY_PATH, SERVER_CERT_PATH, + CA_CERT_PATH, 1); + EXPECT_EQ(provider.ValidateCredentials(), absl::OkStatus()); +} + +TEST_F(GrpcTlsCertificateProviderTest, + FileWatcherCertificateProviderWithMalformedRootCertificate) { + FileWatcherCertificateProvider provider(SERVER_KEY_PATH_2, SERVER_CERT_PATH_2, + MALFORMED_CERT_PATH, 1); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + +TEST_F(GrpcTlsCertificateProviderTest, + FileWatcherCertificateProviderWithMalformedIdentityCertificate) { + FileWatcherCertificateProvider provider( + SERVER_KEY_PATH_2, MALFORMED_CERT_PATH, CA_CERT_PATH_2, 1); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + +TEST_F(GrpcTlsCertificateProviderTest, + FileWatcherCertificateProviderWithMalformedIdentityKey) { + FileWatcherCertificateProvider provider( + MALFORMED_KEY_PATH, SERVER_CERT_PATH_2, CA_CERT_PATH_2, 1); + EXPECT_EQ(provider.ValidateCredentials(), + absl::NotFoundError("No private key found.")); +} + TEST_F(GrpcTlsCertificateProviderTest, FileWatcherCertificateProviderWithBadPaths) { FileWatcherCertificateProvider provider(INVALID_PATH, INVALID_PATH, diff --git a/test/core/security/grpc_tls_certificate_verifier_test.cc b/test/core/security/grpc_tls_certificate_verifier_test.cc index e775fe7a847bd..162c2e3c367dd 100644 --- a/test/core/security/grpc_tls_certificate_verifier_test.cc +++ b/test/core/security/grpc_tls_certificate_verifier_test.cc @@ -27,9 +27,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/security_connector/tls/tls_security_connector.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/grpc_tls_credentials_options_test.cc b/test/core/security/grpc_tls_credentials_options_test.cc index 8270f7955dd78..8e2784c77d6b3 100644 --- a/test/core/security/grpc_tls_credentials_options_test.cc +++ b/test/core/security/grpc_tls_credentials_options_test.cc @@ -27,9 +27,9 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/tls/tls_credentials.h" #include "src/core/lib/security/security_connector/tls/tls_security_connector.h" +#include "src/core/util/crash.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/json_token_test.cc b/test/core/security/json_token_test.cc index 95e01826c5791..03569c4d1b5ce 100644 --- a/test/core/security/json_token_test.cc +++ b/test/core/security/json_token_test.cc @@ -31,9 +31,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/jwt_verifier_test.cc b/test/core/security/jwt_verifier_test.cc index e250d352cce5b..448dd57e7fcdc 100644 --- a/test/core/security/jwt_verifier_test.cc +++ b/test/core/security/jwt_verifier_test.cc @@ -29,8 +29,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/jwt/json_token.h" +#include "src/core/util/crash.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/json/json_reader.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/oauth2_utils.cc b/test/core/security/oauth2_utils.cc index b135ac3eef28e..6111bb25e617c 100644 --- a/test/core/security/oauth2_utils.cc +++ b/test/core/security/oauth2_utils.cc @@ -30,14 +30,14 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/exec_ctx_wakeup_scheduler.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" char* grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials* creds) { diff --git a/test/core/security/print_google_default_creds_token.cc b/test/core/security/print_google_default_creds_token.cc index 305ea25eb5958..1d715fe18cd55 100644 --- a/test/core/security/print_google_default_creds_token.cc +++ b/test/core/security/print_google_default_creds_token.cc @@ -28,10 +28,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/cmdline.h" diff --git a/test/core/security/rbac_translator_test.cc b/test/core/security/rbac_translator_test.cc index 49e9c21a10a84..0d7a798da341f 100644 --- a/test/core/security/rbac_translator_test.cc +++ b/test/core/security/rbac_translator_test.cc @@ -24,8 +24,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/authorization/audit_logging.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/secure_endpoint_test.cc b/test/core/security/secure_endpoint_test.cc index b09e04c4b19eb..6f4cd31882057 100644 --- a/test/core/security/secure_endpoint_test.cc +++ b/test/core/security/secure_endpoint_test.cc @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/tsi/fake_transport_security.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/iomgr/endpoint_tests.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/security_connector_test.cc b/test/core/security/security_connector_test.cc index 63d14a065fcf8..dfccc4b7abe11 100644 --- a/test/core/security/security_connector_test.cc +++ b/test/core/security/security_connector_test.cc @@ -31,13 +31,13 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/ssl_credentials_test.cc b/test/core/security/ssl_credentials_test.cc index 5d1de6b08b092..8e63303c8b8f0 100644 --- a/test/core/security/ssl_credentials_test.cc +++ b/test/core/security/ssl_credentials_test.cc @@ -26,9 +26,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" TEST(SslCredentialsTest, ConvertGrpcToTsiCertPairs) { diff --git a/test/core/security/ssl_server_fuzzer.cc b/test/core/security/ssl_server_fuzzer.cc index 214a40812ecb1..7ca9762c124f0 100644 --- a/test/core/security/ssl_server_fuzzer.cc +++ b/test/core/security/ssl_server_fuzzer.cc @@ -25,9 +25,9 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/security_connector.h" +#include "src/core/util/notification.h" #include "test/core/test_util/mock_endpoint.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/system_roots_test.cc b/test/core/security/system_roots_test.cc index 5bb566d89b1cf..9d94185edfbf5 100644 --- a/test/core/security/system_roots_test.cc +++ b/test/core/security/system_roots_test.cc @@ -33,9 +33,6 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/security_connector/load_system_roots.h" #include "src/core/lib/security/security_connector/load_system_roots_supported.h" @@ -44,6 +41,9 @@ #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/load_file.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/security/tls_security_connector_test.cc b/test/core/security/tls_security_connector_test.cc index 7c602c37750a9..b2e933d6d169c 100644 --- a/test/core/security/tls_security_connector_test.cc +++ b/test/core/security/tls_security_connector_test.cc @@ -32,13 +32,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/unique_type_name.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h" #include "src/core/lib/security/credentials/tls/tls_credentials.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" +#include "src/core/util/unique_type_name.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/security/verify_jwt.cc b/test/core/security/verify_jwt.cc index cf5a2581c92a4..b330c0dbf331a 100644 --- a/test/core/security/verify_jwt.cc +++ b/test/core/security/verify_jwt.cc @@ -27,10 +27,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" #include "test/core/test_util/cmdline.h" diff --git a/test/core/service_config/service_config_test.cc b/test/core/service_config/service_config_test.cc index d20b92ae55c0d..24112d7732f85 100644 --- a/test/core/service_config/service_config_test.cc +++ b/test/core/service_config/service_config_test.cc @@ -32,13 +32,13 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/service_config/service_config_impl.h" #include "src/core/service_config/service_config_parser.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc index 3b1977145bb10..1503e11abc765 100644 --- a/test/core/slice/slice_test.cc +++ b/test/core/slice/slice_test.cc @@ -35,10 +35,10 @@ #include #include -#include "src/core/lib/gprpp/memory.h" -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_refcount.h" +#include "src/core/util/memory.h" +#include "src/core/util/no_destruct.h" #include "test/core/test_util/build.h" TEST(GrpcSliceTest, MallocReturnsSomethingSensible) { diff --git a/test/core/surface/completion_queue_threading_test.cc b/test/core/surface/completion_queue_threading_test.cc index ad81f5194f908..3d6dbd1fc970f 100644 --- a/test/core/surface/completion_queue_threading_test.cc +++ b/test/core/surface/completion_queue_threading_test.cc @@ -30,10 +30,10 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/crash.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc index a412363927390..329dd0ef2862c 100644 --- a/test/core/surface/concurrent_connectivity_test.cc +++ b/test/core/surface/concurrent_connectivity_test.cc @@ -37,8 +37,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -48,6 +46,8 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/thd.h" +#include "src/core/util/time.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/surface/init_test.cc b/test/core/surface/init_test.cc index fe0ca1e57e3ab..58d0347a2bb2c 100644 --- a/test/core/surface/init_test.cc +++ b/test/core/surface/init_test.cc @@ -30,6 +30,7 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" static void test(int rounds) { @@ -115,6 +116,40 @@ TEST(Init, Repeatedly) { EXPECT_FALSE(grpc_is_initialized()); } +TEST(Init, WaitForShutdownBeforeInit) { + EXPECT_TRUE(grpc_wait_for_shutdown_with_timeout(absl::ZeroDuration())); +} + +TEST(Init, WaitForShutdownAfterShutdown) { + grpc_init(); + grpc_shutdown(); + EXPECT_TRUE(grpc_wait_for_shutdown_with_timeout(absl::ZeroDuration())); +} + +TEST(Init, WaitForShutdownWithTimeout) { + grpc_init(); + grpc_init(); + grpc_shutdown(); + grpc_core::Thread t0( + "init_test", + [](void*) { + EXPECT_FALSE(grpc_wait_for_shutdown_with_timeout(absl::Seconds(0.5))); + }, + nullptr); + grpc_core::Thread t1( + "init_test", + [](void*) { + EXPECT_TRUE(grpc_wait_for_shutdown_with_timeout(absl::Seconds(1.5))); + }, + nullptr); + t0.Start(); + t1.Start(); + absl::SleepFor(absl::Seconds(1)); + grpc_shutdown(); + t0.Join(); + t1.Join(); +} + TEST(Init, RepeatedlyBlocking) { for (int i = 0; i < 10; i++) { grpc_init(); diff --git a/test/core/surface/lame_client_test.cc b/test/core/surface/lame_client_test.cc index 7d5b57af46f6c..c81f2492c2b01 100644 --- a/test/core/surface/lame_client_test.cc +++ b/test/core/surface/lame_client_test.cc @@ -32,13 +32,13 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/orphanable.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/surface/num_external_connectivity_watchers_test.cc b/test/core/surface/num_external_connectivity_watchers_test.cc index 0194592f5e848..8eeb546e35b44 100644 --- a/test/core/surface/num_external_connectivity_watchers_test.cc +++ b/test/core/surface/num_external_connectivity_watchers_test.cc @@ -31,9 +31,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/host_port.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/surface/sequential_connectivity_test.cc b/test/core/surface/sequential_connectivity_test.cc index 79accd74c3d32..ab6dfe4b1a6b0 100644 --- a/test/core/surface/sequential_connectivity_test.cc +++ b/test/core/surface/sequential_connectivity_test.cc @@ -33,9 +33,9 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/host_port.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/surface/server_chttp2_test.cc b/test/core/surface/server_chttp2_test.cc index d3fd84b544baa..359af60ff2816 100644 --- a/test/core/surface/server_chttp2_test.cc +++ b/test/core/surface/server_chttp2_test.cc @@ -27,12 +27,12 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/util/host_port.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" -TEST(ServerChttp2, UnparseableTarget) { +TEST(ServerChttp2, UnparsableTarget) { grpc_channel_args args = {0, nullptr}; grpc_server* server = grpc_server_create(&args, nullptr); grpc_server_credentials* server_creds = diff --git a/test/core/surface/server_test.cc b/test/core/surface/server_test.cc index 958d033cef0c6..ec58b556a7fe4 100644 --- a/test/core/surface/server_test.cc +++ b/test/core/surface/server_test.cc @@ -34,10 +34,10 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/util/host_port.h" #include "src/core/util/useful.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/telemetry/call_tracer_test.cc b/test/core/telemetry/call_tracer_test.cc index c9af4d745b47e..688a5114156c4 100644 --- a/test/core/telemetry/call_tracer_test.cc +++ b/test/core/telemetry/call_tracer_test.cc @@ -25,10 +25,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/fake_stats_plugin.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/BUILD b/test/core/test_util/BUILD index 12ae1064e4516..854105b5fe2e1 100644 --- a/test/core/test_util/BUILD +++ b/test/core/test_util/BUILD @@ -142,7 +142,7 @@ grpc_cc_library( "//:orphanable", "//:ref_counted_ptr", "//:tsi_ssl_credentials", - "//:uri_parser", + "//:uri", "//src/core:channel_args_endpoint_config", "//src/core:channel_args_preconditioning", "//src/core:closure", @@ -188,7 +188,7 @@ grpc_cc_library( "//:httpcli", "//:orphanable", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", "//src/core:channel_args_endpoint_config", "//src/core:channel_args_preconditioning", "//src/core:closure", @@ -332,7 +332,7 @@ grpc_cc_library( "//:orphanable", "//:parse_address", "//:ref_counted_ptr", - "//:uri_parser", + "//:uri", "//src/core:channel_args", "//src/core:delegating_helper", "//src/core:down_cast", @@ -395,7 +395,10 @@ grpc_cc_library( testonly = True, srcs = ["socket_use_after_close_detector.cc"], hdrs = ["socket_use_after_close_detector.h"], - external_deps = ["gtest"], + external_deps = [ + "absl/log:log", + "gtest", + ], language = "C++", deps = [ "grpc_test_util", diff --git a/test/core/test_util/cmdline.cc b/test/core/test_util/cmdline.cc index f3bf0abbc6938..b22d0767c09f8 100644 --- a/test/core/test_util/cmdline.cc +++ b/test/core/test_util/cmdline.cc @@ -33,7 +33,7 @@ #include -#include "src/core/lib/gprpp/memory.h" +#include "src/core/util/memory.h" typedef enum { ARGTYPE_INT, ARGTYPE_BOOL, ARGTYPE_STRING } argtype; diff --git a/test/core/test_util/evaluate_args_test_util.h b/test/core/test_util/evaluate_args_test_util.h index 1bd6438f1aa53..2d681d3b50fdb 100644 --- a/test/core/test_util/evaluate_args_test_util.h +++ b/test/core/test_util/evaluate_args_test_util.h @@ -27,7 +27,6 @@ #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" @@ -35,6 +34,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { diff --git a/test/core/test_util/fake_stats_plugin.h b/test/core/test_util/fake_stats_plugin.h index e5e93a6b50344..4c60f0735fb07 100644 --- a/test/core/test_util/fake_stats_plugin.h +++ b/test/core/test_util/fake_stats_plugin.h @@ -30,10 +30,10 @@ #include "gmock/gmock.h" #include "src/core/lib/channel/promise_based_filter.h" -#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/telemetry/call_tracer.h" #include "src/core/telemetry/metrics.h" #include "src/core/telemetry/tcp_tracer.h" +#include "src/core/util/ref_counted.h" namespace grpc_core { diff --git a/test/core/test_util/fuzzer_corpus_test.cc b/test/core/test_util/fuzzer_corpus_test.cc index 0bdbf3a8c8f09..3eaef693f1045 100644 --- a/test/core/test_util/fuzzer_corpus_test.cc +++ b/test/core/test_util/fuzzer_corpus_test.cc @@ -35,8 +35,8 @@ #include #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/env.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" #include "test/cpp/util/test_config.h" diff --git a/test/core/test_util/fuzzing_channel_args.h b/test/core/test_util/fuzzing_channel_args.h index 9b4eb78f0a403..83cb5497bd33e 100644 --- a/test/core/test_util/fuzzing_channel_args.h +++ b/test/core/test_util/fuzzing_channel_args.h @@ -20,8 +20,8 @@ #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" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/fuzzing_channel_args.pb.h" namespace grpc_core { diff --git a/test/core/test_util/mock_endpoint.cc b/test/core/test_util/mock_endpoint.cc index e09fb191cb6fd..8d16b2293eefe 100644 --- a/test/core/test_util/mock_endpoint.cc +++ b/test/core/test_util/mock_endpoint.cc @@ -29,8 +29,8 @@ #include #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/down_cast.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" +#include "src/core/util/down_cast.h" namespace grpc_event_engine { namespace experimental { diff --git a/test/core/test_util/one_corpus_entry_fuzzer.cc b/test/core/test_util/one_corpus_entry_fuzzer.cc index ffde40a4f0fce..d6cbe2b682738 100644 --- a/test/core/test_util/one_corpus_entry_fuzzer.cc +++ b/test/core/test_util/one_corpus_entry_fuzzer.cc @@ -22,8 +22,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/crash.h" #include "test/core/test_util/tls_utils.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); diff --git a/test/core/test_util/passthrough_endpoint.h b/test/core/test_util/passthrough_endpoint.h index f7af994b1c8a8..cf8abe834d155 100644 --- a/test/core/test_util/passthrough_endpoint.h +++ b/test/core/test_util/passthrough_endpoint.h @@ -21,7 +21,7 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" namespace grpc_event_engine { namespace experimental { diff --git a/test/core/test_util/port.cc b/test/core/test_util/port.cc index 123608d61c2d1..3a5a04bf11751 100644 --- a/test/core/test_util/port.cc +++ b/test/core/test_util/port.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "test/core/test_util/port.h" #include "test/core/test_util/port_server_client.h" diff --git a/test/core/test_util/port_isolated_runtime_environment.cc b/test/core/test_util/port_isolated_runtime_environment.cc index 8e841cf1b4d2c..57fa386511210 100644 --- a/test/core/test_util/port_isolated_runtime_environment.cc +++ b/test/core/test_util/port_isolated_runtime_environment.cc @@ -29,8 +29,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/port_server_client.cc b/test/core/test_util/port_server_client.cc index 2f59e1c473b4b..5a8b4d4d2ed90 100644 --- a/test/core/test_util/port_server_client.cc +++ b/test/core/test_util/port_server_client.cc @@ -40,10 +40,6 @@ #include #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -51,9 +47,13 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/util/http_client/httpcli.h" #include "src/core/util/http_client/parser.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" typedef struct freereq { gpr_mu* mu = nullptr; diff --git a/test/core/test_util/scoped_env_var.h b/test/core/test_util/scoped_env_var.h index 0f5041ab11908..6a7127a2faf8a 100644 --- a/test/core/test_util/scoped_env_var.h +++ b/test/core/test_util/scoped_env_var.h @@ -19,7 +19,7 @@ #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" namespace grpc_core { namespace testing { diff --git a/test/core/test_util/socket_use_after_close_detector.cc b/test/core/test_util/socket_use_after_close_detector.cc index ab55cbacfaee5..8d2c77b25555e 100644 --- a/test/core/test_util/socket_use_after_close_detector.cc +++ b/test/core/test_util/socket_use_after_close_detector.cc @@ -33,6 +33,7 @@ #include #include +#include "absl/log/log.h" #include "gtest/gtest.h" #include @@ -40,71 +41,17 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "test/core/test_util/port.h" -// TODO(unknown): pull in different headers when enabling this -// test on windows. Also set BAD_SOCKET_RETURN_VAL -// to INVALID_SOCKET on windows. -#ifdef GPR_WINDOWS -#include "src/core/lib/iomgr/socket_windows.h" -#include "src/core/lib/iomgr/tcp_windows.h" - -#define BAD_SOCKET_RETURN_VAL INVALID_SOCKET -#else #define BAD_SOCKET_RETURN_VAL (-1) -#endif namespace { #ifdef GPR_WINDOWS void OpenAndCloseSocketsStressLoop(int port, gpr_event* done_ev) { - sockaddr_in6 addr; - memset(&addr, 0, sizeof(addr)); - addr.sin6_family = AF_INET6; - addr.sin6_port = htons(port); - ((char*)&addr.sin6_addr)[15] = 1; - for (;;) { - if (gpr_event_get(done_ev)) { - return; - } - std::vector sockets; - for (size_t i = 0; i < 50; i++) { - SOCKET s = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, nullptr, 0, - WSA_FLAG_OVERLAPPED); - ASSERT_TRUE(s != BAD_SOCKET_RETURN_VAL) - << "Failed to create TCP ipv6 socket"; - char val = 1; - ASSERT_TRUE(setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) != - SOCKET_ERROR) - << "Failed to set socketopt reuseaddr. WSA error: " + - std::to_string(WSAGetLastError()); - ASSERT_TRUE(grpc_tcp_set_non_block(s) == absl::OkStatus()) - << "Failed to set socket non-blocking"; - ASSERT_TRUE(bind(s, (const sockaddr*)&addr, sizeof(addr)) != SOCKET_ERROR) - << "Failed to bind socket " + std::to_string(s) + - " to [::1]:" + std::to_string(port) + - ". WSA error: " + std::to_string(WSAGetLastError()); - ASSERT_TRUE(listen(s, 1) != SOCKET_ERROR) - << "Failed to listen on socket " + std::to_string(s) + - ". WSA error: " + std::to_string(WSAGetLastError()); - sockets.push_back(s); - } - // Do a non-blocking accept followed by a close on all of those sockets. - // Do this in a separate loop to try to induce a time window to hit races. - for (size_t i = 0; i < sockets.size(); i++) { - ASSERT_TRUE(accept(sockets[i], nullptr, nullptr) == INVALID_SOCKET) - << "Accept on phony socket unexpectedly accepted actual connection."; - ASSERT_TRUE(WSAGetLastError() == WSAEWOULDBLOCK) - << "OpenAndCloseSocketsStressLoop accept on socket " + - std::to_string(sockets[i]) + - " failed in " - "an unexpected way. " - "WSA error: " + - std::to_string(WSAGetLastError()) + - ". Socket use-after-close bugs are likely."; - ASSERT_TRUE(closesocket(sockets[i]) != SOCKET_ERROR) - << "Failed to close socket: " + std::to_string(sockets[i]) + - ". WSA error: " + std::to_string(WSAGetLastError()); - } - } + // TODO(apolcyn): re-enable this on windows if we can debug the failure. + // Previously, this was causing test flakes for a while b/c bind calls + // would fail with WSAEACCESS. Not clear if we were just making windows + // unhappy. + LOG(INFO) << "OpenAndCloseSocketsStressLoop is a no-op for windows"; return; } #else diff --git a/test/core/test_util/stack_tracer.cc b/test/core/test_util/stack_tracer.cc index 1960ce3353cde..305a43c8fc47b 100644 --- a/test/core/test_util/stack_tracer.cc +++ b/test/core/test_util/stack_tracer.cc @@ -26,7 +26,7 @@ #include -#include "src/core/lib/gprpp/examine_stack.h" +#include "src/core/util/examine_stack.h" namespace { diff --git a/test/core/test_util/test_config.cc b/test/core/test_util/test_config.cc index 1f428d557763f..0395887fe7a65 100644 --- a/test/core/test_util/test_config.cc +++ b/test/core/test_util/test_config.cc @@ -36,8 +36,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/surface/init.h" +#include "src/core/util/crash.h" #include "test/core/event_engine/test_init.h" #include "test/core/test_util/build.h" #include "test/core/test_util/stack_tracer.h" diff --git a/test/core/test_util/test_lb_policies.cc b/test/core/test_util/test_lb_policies.cc index 348d430e3d623..afd701417cb9b 100644 --- a/test/core/test_util/test_lb_policies.cc +++ b/test/core/test_util/test_lb_policies.cc @@ -34,23 +34,23 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/down_cast.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/delegating_helper.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" #include "src/core/load_balancing/lb_policy_registry.h" #include "src/core/load_balancing/oob_backend_metric.h" #include "src/core/load_balancing/subchannel_interface.h" +#include "src/core/util/down_cast.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_util.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" namespace grpc_core { diff --git a/test/core/test_util/test_tcp_server.cc b/test/core/test_util/test_tcp_server.cc index 41cb382dd4685..cc3d2957648fe 100644 --- a/test/core/test_util/test_tcp_server.cc +++ b/test/core/test_util/test_tcp_server.cc @@ -34,7 +34,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" @@ -42,6 +41,7 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" static void on_server_destroyed(void* data, grpc_error_handle /*error*/) { diff --git a/test/core/test_util/tls_utils.cc b/test/core/test_util/tls_utils.cc index aca44f0fbb8f2..c2dfd13eea9f7 100644 --- a/test/core/test_util/tls_utils.cc +++ b/test/core/test_util/tls_utils.cc @@ -25,9 +25,9 @@ #include #include -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/load_file.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/test_util/tls_utils.h b/test/core/test_util/tls_utils.h index 6b1bc1f1fa294..5cd12ac6a103e 100644 --- a/test/core/test_util/tls_utils.h +++ b/test/core/test_util/tls_utils.h @@ -28,9 +28,9 @@ #include #include -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/security/security_connector/ssl_utils.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" namespace grpc_core { diff --git a/test/core/transport/binder/binder_transport_test.cc b/test/core/transport/binder/binder_transport_test.cc index bc42040826cdc..5ad7150e8e263 100644 --- a/test/core/transport/binder/binder_transport_test.cc +++ b/test/core/transport/binder/binder_transport_test.cc @@ -32,8 +32,8 @@ #include #include "src/core/ext/transport/binder/transport/binder_stream.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" #include "test/core/transport/binder/mock_objects.h" diff --git a/test/core/transport/binder/end2end/fake_binder.cc b/test/core/transport/binder/end2end/fake_binder.cc index bc132e8fe076a..6a5cc9698ac02 100644 --- a/test/core/transport/binder/end2end/fake_binder.cc +++ b/test/core/transport/binder/end2end/fake_binder.cc @@ -19,7 +19,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc_binder { namespace end2end_testing { diff --git a/test/core/transport/binder/end2end/fake_binder.h b/test/core/transport/binder/end2end/fake_binder.h index a50359e0f2f43..6dbb532a23077 100644 --- a/test/core/transport/binder/end2end/fake_binder.h +++ b/test/core/transport/binder/end2end/fake_binder.h @@ -66,8 +66,8 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/sync.h" +#include "src/core/util/thd.h" namespace grpc_binder { namespace end2end_testing { diff --git a/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h b/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h index 2506cb0c2426a..8b4affab2cc21 100644 --- a/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h +++ b/test/core/transport/binder/end2end/fuzzers/fuzzer_utils.h @@ -26,7 +26,7 @@ #include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/wire_reader.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/transport/binder/end2end/fuzzers/binder_transport_fuzzer.pb.h" namespace grpc_binder { diff --git a/test/core/transport/call_arena_allocator_test.cc b/test/core/transport/call_arena_allocator_test.cc index b33335ce6f497..1c5c222cf8615 100644 --- a/test/core/transport/call_arena_allocator_test.cc +++ b/test/core/transport/call_arena_allocator_test.cc @@ -35,10 +35,10 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/transport/call_spine_benchmarks.h b/test/core/transport/call_spine_benchmarks.h index ebdf7c1888448..d89f3678bdbb8 100644 --- a/test/core/transport/call_spine_benchmarks.h +++ b/test/core/transport/call_spine_benchmarks.h @@ -21,13 +21,13 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/promise/all_ok.h" #include "src/core/lib/promise/map.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/transport/call_spine.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/notification.h" namespace grpc_core { diff --git a/test/core/transport/call_state_test.cc b/test/core/transport/call_state_test.cc index cc35b5b7ec55c..c8dcca2825bdb 100644 --- a/test/core/transport/call_state_test.cc +++ b/test/core/transport/call_state_test.cc @@ -245,7 +245,6 @@ TEST(CallStateTest, ReceiveTrailersOnly) { EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); - state.FinishPullServerTrailingMetadata(); } TEST(CallStateTest, ReceiveTrailersOnlySkipsInitialMetadataOnUnstartedCalls) { @@ -256,7 +255,6 @@ TEST(CallStateTest, ReceiveTrailersOnlySkipsInitialMetadataOnUnstartedCalls) { EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); - state.FinishPullServerTrailingMetadata(); } TEST(CallStateTest, RecallNoCancellation) { @@ -268,8 +266,6 @@ TEST(CallStateTest, RecallNoCancellation) { EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); - EXPECT_THAT(state.PollWasCancelled(), IsPending()); - EXPECT_WAKEUP(activity, state.FinishPullServerTrailingMetadata()); EXPECT_THAT(state.PollWasCancelled(), IsReady(false)); } @@ -282,8 +278,6 @@ TEST(CallStateTest, RecallCancellation) { EXPECT_THAT(state.PollPullServerInitialMetadataAvailable(), IsReady(false)); state.FinishPullServerInitialMetadata(); EXPECT_THAT(state.PollServerTrailingMetadataAvailable(), IsReady()); - EXPECT_THAT(state.PollWasCancelled(), IsPending()); - EXPECT_WAKEUP(activity, state.FinishPullServerTrailingMetadata()); EXPECT_THAT(state.PollWasCancelled(), IsReady(true)); } diff --git a/test/core/transport/chaotic_good/BUILD b/test/core/transport/chaotic_good/BUILD index 2b22ea94c4cc5..e400aae142b42 100644 --- a/test/core/transport/chaotic_good/BUILD +++ b/test/core/transport/chaotic_good/BUILD @@ -241,7 +241,7 @@ grpc_cc_test( "//:grpc++", "//:grpc_public_hdrs", "//:parse_address", - "//:uri_parser", + "//:uri", "//src/core:channel_args", "//src/core:chaotic_good_connector", "//src/core:chaotic_good_server", diff --git a/test/core/transport/chaotic_good/chaotic_good_server_test.cc b/test/core/transport/chaotic_good/chaotic_good_server_test.cc index 0b9b49a370b66..1f1335f5f6ca8 100644 --- a/test/core/transport/chaotic_good/chaotic_good_server_test.cc +++ b/test/core/transport/chaotic_good/chaotic_good_server_test.cc @@ -35,10 +35,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/server/server.h" +#include "src/core/util/notification.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/test_util/build.h" #include "test/core/test_util/port.h" diff --git a/test/core/transport/chaotic_good/client_transport_error_test.cc b/test/core/transport/chaotic_good/client_transport_error_test.cc index 190580f1eb7fe..8de2701818398 100644 --- a/test/core/transport/chaotic_good/client_transport_error_test.cc +++ b/test/core/transport/chaotic_good/client_transport_error_test.cc @@ -39,7 +39,6 @@ #include "src/core/ext/transport/chaotic_good/client_transport.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/event_engine_context.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/event_engine_wakeup_scheduler.h" @@ -56,6 +55,7 @@ #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/promise_endpoint.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" diff --git a/test/core/transport/chaotic_good/frame_fuzzer.cc b/test/core/transport/chaotic_good/frame_fuzzer.cc index 23530d10a4457..3082b3645f0b5 100644 --- a/test/core/transport/chaotic_good/frame_fuzzer.cc +++ b/test/core/transport/chaotic_good/frame_fuzzer.cc @@ -29,13 +29,13 @@ #include "src/core/ext/transport/chaotic_good/frame_header.h" #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/promise/test_context.h" #include "test/core/transport/chaotic_good/frame_fuzzer.pb.h" diff --git a/test/core/transport/chaotic_good/server_transport_test.cc b/test/core/transport/chaotic_good/server_transport_test.cc index 21977563c60ee..af5b223c2fbd4 100644 --- a/test/core/transport/chaotic_good/server_transport_test.cc +++ b/test/core/transport/chaotic_good/server_transport_test.cc @@ -34,7 +34,6 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/promise/seq.h" #include "src/core/lib/resource_quota/arena.h" @@ -43,6 +42,7 @@ #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" #include "test/core/transport/chaotic_good/mock_promise_endpoint.h" diff --git a/test/core/transport/chttp2/flow_control_fuzzer.cc b/test/core/transport/chttp2/flow_control_fuzzer.cc index 99e82f4853a62..b72541d4d38e2 100644 --- a/test/core/transport/chttp2/flow_control_fuzzer.cc +++ b/test/core/transport/chttp2/flow_control_fuzzer.cc @@ -36,10 +36,10 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/transport/bdp_estimator.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/test_util/fuzz_config_vars.h" diff --git a/test/core/transport/chttp2/flow_control_test.cc b/test/core/transport/chttp2/flow_control_test.cc index 75652fcfb16a5..618cdfb064396 100644 --- a/test/core/transport/chttp2/flow_control_test.cc +++ b/test/core/transport/chttp2/flow_control_test.cc @@ -23,11 +23,11 @@ #include #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/transport/bdp_estimator.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" extern gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type); diff --git a/test/core/transport/chttp2/graceful_shutdown_test.cc b/test/core/transport/chttp2/graceful_shutdown_test.cc index 4f24b8d65af3b..7402c2ba28c04 100644 --- a/test/core/transport/chttp2/graceful_shutdown_test.cc +++ b/test/core/transport/chttp2/graceful_shutdown_test.cc @@ -48,10 +48,6 @@ #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" #include "src/core/ext/transport/chttp2/transport/frame_ping.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint_pair.h" @@ -61,6 +57,10 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/server/server.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/sync.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 91d835c631e6c..141d38f71c488 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -32,11 +32,11 @@ #include #include "src/core/ext/transport/chttp2/transport/legacy_frame.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" #include "test/core/test_util/parse_hexstring.h" #include "test/core/test_util/slice_splitter.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index 538988ebf9f00..7954ccbaeca24 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -31,14 +31,14 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/test_util/fuzz_config_vars.h" #include "test/core/test_util/proto_bit_gen.h" diff --git a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc index 4094a669b3c57..c01dff488a8fe 100644 --- a/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_parser_input_size_fuzzer.cc @@ -35,8 +35,6 @@ #include #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" @@ -44,6 +42,8 @@ #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" #include "test/core/test_util/slice_splitter.h" bool squelch = true; diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index d15d990678c34..0439490d7c20c 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -36,15 +36,15 @@ #include #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/test_util/parse_hexstring.h" #include "test/core/test_util/slice_splitter.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/hpack_sync_fuzzer.cc b/test/core/transport/chttp2/hpack_sync_fuzzer.cc index 2697029928d74..dff3b6879994b 100644 --- a/test/core/transport/chttp2/hpack_sync_fuzzer.cc +++ b/test/core/transport/chttp2/hpack_sync_fuzzer.cc @@ -32,8 +32,6 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser_table.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/arena.h" @@ -42,6 +40,8 @@ #include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/status_helper.h" #include "src/libfuzzer/libfuzzer_macro.h" #include "test/core/test_util/fuzz_config_vars.h" #include "test/core/test_util/proto_bit_gen.h" diff --git a/test/core/transport/chttp2/ping_callbacks_test.cc b/test/core/transport/chttp2/ping_callbacks_test.cc index 32b02fa024106..18731f4f7612c 100644 --- a/test/core/transport/chttp2/ping_callbacks_test.cc +++ b/test/core/transport/chttp2/ping_callbacks_test.cc @@ -20,7 +20,7 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/event_engine/mock_event_engine.h" using grpc_event_engine::experimental::EventEngine; diff --git a/test/core/transport/chttp2/ping_configuration_test.cc b/test/core/transport/chttp2/ping_configuration_test.cc index 705276ff38e7a..30873180124ba 100644 --- a/test/core/transport/chttp2/ping_configuration_test.cc +++ b/test/core/transport/chttp2/ping_configuration_test.cc @@ -28,9 +28,10 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/time.h" #include "test/core/test_util/mock_endpoint.h" #include "test/core/test_util/test_config.h" 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 56cf47212053c..291add0aaeff8 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 @@ -45,8 +45,8 @@ #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/host_port.h" +#include "src/core/util/sync.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/settings_timeout_test.cc b/test/core/transport/chttp2/settings_timeout_test.cc index 3093bc2afaf47..7e5c52045305c 100644 --- a/test/core/transport/chttp2/settings_timeout_test.cc +++ b/test/core/transport/chttp2/settings_timeout_test.cc @@ -45,8 +45,6 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/status_helper.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -58,6 +56,8 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/resource_quota/api.h" +#include "src/core/util/status_helper.h" +#include "src/core/util/time.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.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 0bae088a3aab7..178e29de62590 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 @@ -36,8 +36,8 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/host_port.h" +#include "src/core/util/sync.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/transport/chttp2/streams_not_seen_test.cc b/test/core/transport/chttp2/streams_not_seen_test.cc index cc296008f8414..49a6075cd4286 100644 --- a/test/core/transport/chttp2/streams_not_seen_test.cc +++ b/test/core/transport/chttp2/streams_not_seen_test.cc @@ -55,11 +55,6 @@ #include "src/core/lib/channel/channel_fwd.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" @@ -71,6 +66,11 @@ #include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/host_port.h" +#include "src/core/util/notification.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" diff --git a/test/core/transport/chttp2/too_many_pings_test.cc b/test/core/transport/chttp2/too_many_pings_test.cc index 8fd0570616fe1..942268fc96730 100644 --- a/test/core/transport/chttp2/too_many_pings_test.cc +++ b/test/core/transport/chttp2/too_many_pings_test.cc @@ -46,17 +46,17 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/surface/channel.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/resolver/resolver.h" +#include "src/core/util/host_port.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/port.h" @@ -123,7 +123,7 @@ grpc_status_code PerformCall(grpc_channel* channel, grpc_server* server, grpc_status_code status; grpc_call_error error; grpc_slice details; - gpr_timespec deadline = grpc_timeout_seconds_to_deadline(5); + gpr_timespec deadline = grpc_timeout_seconds_to_deadline(30); // Start a call c = grpc_channel_create_call(channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, grpc_slice_from_static_string("/foo"), nullptr, diff --git a/test/core/transport/error_utils_test.cc b/test/core/transport/error_utils_test.cc index 0817f34ee53bd..c60b4bf5d7993 100644 --- a/test/core/transport/error_utils_test.cc +++ b/test/core/transport/error_utils_test.cc @@ -23,8 +23,8 @@ #include "absl/status/status.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/status_helper.h" #include "test/core/test_util/test_config.h" namespace { diff --git a/test/core/transport/metadata_map_test.cc b/test/core/transport/metadata_map_test.cc index 91d60baab270a..1e985459a746e 100644 --- a/test/core/transport/metadata_map_test.cc +++ b/test/core/transport/metadata_map_test.cc @@ -28,13 +28,13 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/transport/timeout_encoding_test.cc b/test/core/transport/timeout_encoding_test.cc index 0f03dfa7b3f2d..6de2dcd0398b4 100644 --- a/test/core/transport/timeout_encoding_test.cc +++ b/test/core/transport/timeout_encoding_test.cc @@ -24,7 +24,7 @@ #include "absl/strings/string_view.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/core/util/useful.h" namespace grpc_core { diff --git a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc index e7f58d93c94b4..1c2c8892e4c4b 100644 --- a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc +++ b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server.cc @@ -33,7 +33,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/tsi/alts/fake_handshaker/handshaker.grpc.pb.h" #include "test/core/tsi/alts/fake_handshaker/handshaker.pb.h" #include "test/core/tsi/alts/fake_handshaker/transport_security_common.pb.h" diff --git a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc index 711ca4206d106..4e8df4b23f028 100644 --- a/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc +++ b/test/core/tsi/alts/fake_handshaker/fake_handshaker_server_main.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/fake_handshaker/fake_handshaker_server.h" #include "test/cpp/util/test_config.h" diff --git a/test/core/tsi/alts/frame_protector/alts_counter_test.cc b/test/core/tsi/alts/frame_protector/alts_counter_test.cc index b36700c9f2702..989530d5e274f 100644 --- a/test/core/tsi/alts/frame_protector/alts_counter_test.cc +++ b/test/core/tsi/alts/frame_protector/alts_counter_test.cc @@ -22,7 +22,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" const size_t kSmallCounterSize = 4; diff --git a/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc b/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc index e513caf067842..06b18b7f7ae3d 100644 --- a/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc +++ b/test/core/tsi/alts/frame_protector/alts_frame_protector_test.cc @@ -24,9 +24,9 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/tsi/alts/crypt/gsec.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/crash.h" #include "test/core/tsi/alts/crypt/gsec_test_util.h" #include "test/core/tsi/transport_security_test_lib.h" @@ -402,6 +402,19 @@ TEST(AltsFrameProtectorTest, MainTest) { alts_test_do_round_trip_all(/*rekey=*/true); } +TEST(AltsFrameProtectorTest, MemoryLeakTest) { + tsi_frame_protector* client_frame_protector = nullptr; + // Create a key with a wrong key length (off-by-one). + uint8_t* key = nullptr; + size_t key_length = kAes128GcmKeyLength - 1; + gsec_test_random_array(&key, key_length); + EXPECT_EQ(alts_create_frame_protector(key, key_length, /*is_client=*/true, + /*is_rekey=*/false, nullptr, + &client_frame_protector), + TSI_INTERNAL_ERROR); + gpr_free(key); +} + int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/test/core/tsi/alts/frame_protector/frame_handler_test.cc b/test/core/tsi/alts/frame_protector/frame_handler_test.cc index feb7a5310aa3c..2784bc0f74b76 100644 --- a/test/core/tsi/alts/frame_protector/frame_handler_test.cc +++ b/test/core/tsi/alts/frame_protector/frame_handler_test.cc @@ -28,7 +28,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/useful.h" #include "test/core/tsi/alts/crypt/gsec_test_util.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 913224a88cca9..0b079ebc88e69 100644 --- a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc +++ b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc @@ -47,16 +47,17 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/credentials/alts/alts_credentials.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/security_connector/alts/alts_security_connector.h" #include "src/core/lib/slice/slice_string_helpers.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/end2end/cq_verifier.h" +#include "test/core/test_util/build.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" @@ -293,6 +294,9 @@ TEST(AltsConcurrentConnectivityTest, TestConcurrentClientServerHandshakes) { { TestServer test_server; size_t num_concurrent_connects = 50; + if (BuiltUnderMsan()) { + num_concurrent_connects = 25; + } std::vector> connect_loop_runners; VLOG(2) << "start performing concurrent expected-to-succeed connects"; for (size_t i = 0; i < num_concurrent_connects; i++) { diff --git a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc index 1d2248a4617a6..22c42030cb516 100644 --- a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc +++ b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc @@ -26,13 +26,13 @@ #include #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/env.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" diff --git a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc index 59479f0c7fbd0..3fb9cc715ec2a 100644 --- a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc +++ b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc @@ -28,12 +28,12 @@ #include #include -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" #include "src/core/tsi/alts/handshaker/alts_shared_resource.h" #include "src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h" #include "src/core/tsi/transport_security_grpc.h" +#include "src/core/util/thd.h" #include "src/proto/grpc/gcp/altscontext.upb.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" diff --git a/test/core/tsi/crl_ssl_transport_security_test.cc b/test/core/tsi/crl_ssl_transport_security_test.cc index 37f0f905b166b..0b8d4cf081173 100644 --- a/test/core/tsi/crl_ssl_transport_security_test.cc +++ b/test/core/tsi/crl_ssl_transport_security_test.cc @@ -31,11 +31,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/ssl_transport_security.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" #include "test/core/tsi/transport_security_test_lib.h" diff --git a/test/core/tsi/fake_transport_security_test.cc b/test/core/tsi/fake_transport_security_test.cc index 69c280717a459..c61b9a487a768 100644 --- a/test/core/tsi/fake_transport_security_test.cc +++ b/test/core/tsi/fake_transport_security_test.cc @@ -27,9 +27,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/tsi/transport_security.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/transport_security_test_lib.h" diff --git a/test/core/tsi/ssl_session_cache_test.cc b/test/core/tsi/ssl_session_cache_test.cc index f9711f2eba128..61a5f707e939f 100644 --- a/test/core/tsi/ssl_session_cache_test.cc +++ b/test/core/tsi/ssl_session_cache_test.cc @@ -27,7 +27,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index a66720e0ca0a8..228372d86b68f 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -34,9 +34,9 @@ #include #include -#include "src/core/lib/gprpp/memory.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/memory.h" #include "test/core/test_util/build.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/tsi/ssl_transport_security_utils_test.cc b/test/core/tsi/ssl_transport_security_utils_test.cc index 5b64dc212df77..ac105c42fa514 100644 --- a/test/core/tsi/ssl_transport_security_utils_test.cc +++ b/test/core/tsi/ssl_transport_security_utils_test.cc @@ -34,10 +34,10 @@ #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "src/core/lib/gprpp/load_file.h" #include "src/core/lib/slice/slice.h" #include "src/core/tsi/transport_security.h" #include "src/core/tsi/transport_security_interface.h" +#include "src/core/util/load_file.h" #include "test/core/test_util/test_config.h" #include "test/core/tsi/transport_security_test_lib.h" diff --git a/test/core/tsi/transport_security_test.cc b/test/core/tsi/transport_security_test.cc index 8d9e1bed6e6ca..a0ff0488b9361 100644 --- a/test/core/tsi/transport_security_test.cc +++ b/test/core/tsi/transport_security_test.cc @@ -31,9 +31,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/ssl_transport_security.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/tsi/transport_security_test_lib.cc b/test/core/tsi/transport_security_test_lib.cc index 1c744415db23a..1239270a0e6f7 100644 --- a/test/core/tsi/transport_security_test_lib.cc +++ b/test/core/tsi/transport_security_test_lib.cc @@ -37,9 +37,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/memory.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" +#include "src/core/util/memory.h" static void notification_signal(tsi_test_fixture* fixture) { gpr_mu_lock(&fixture->mu); diff --git a/test/core/uri/BUILD b/test/core/uri/BUILD deleted file mode 100644 index 4bac9d7cba777..0000000000000 --- a/test/core/uri/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -# 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. - -load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") -load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_fuzzer") - -grpc_package(name = "test/core/uri") - -licenses(["notice"]) - -grpc_fuzzer( - name = "uri_fuzzer_test", - srcs = ["uri_fuzzer_test.cc"], - corpus = "uri_corpus", - language = "C++", - tags = [ - "no_windows", - # Without "nofixdeps", "//:grpc" gets substituted with "//:event_engine_base_hdrs" - "nofixdeps", - ], - deps = [ - "//:exec_ctx", - "//:gpr", - "//:grpc", - "//:uri_parser", - ], -) - -grpc_cc_test( - name = "uri_parser_test", - srcs = ["uri_parser_test.cc"], - external_deps = [ - "absl/status", - "gtest", - ], - language = "C++", - deps = [ - "//:event_engine_base_hdrs", - "//:uri_parser", - "//test/core/test_util:grpc_test_util_unsecure", - ], -) diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 869a9b96672cb..ca652af6ababa 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -12,12 +12,588 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("//bazel:custom_exec_properties.bzl", "LARGE_MACHINE") load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") +load( + "//test/core/test_util:grpc_fuzzer.bzl", + "grpc_fuzzer", + "grpc_proto_fuzzer", +) licenses(["notice"]) grpc_package(name = "test/core/util") +grpc_cc_test( + name = "directory_reader_test", + srcs = ["directory_reader_test.cc"], + data = [ + "//test/core/tsi/test_creds/crl_data/crls:ab06acdd.r0", + "//test/core/tsi/test_creds/crl_data/crls:b9322cac.r0", + "//test/core/tsi/test_creds/crl_data/crls:current.crl", + "//test/core/tsi/test_creds/crl_data/crls:intermediate.crl", + ], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:directory_reader", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "examine_stack_test", + srcs = ["examine_stack_test.cc"], + external_deps = [ + "absl/debugging:stacktrace", + "absl/debugging:symbolize", + "absl/log:log", + "gtest", + ], + language = "C++", + # TODO(https://github.com/grpc/grpc/issues/24627): Disable this on Windows + tags = ["no_windows"], + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "dump_args_test", + srcs = ["dump_args_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:dump_args", + ], +) + +# TODO(hork): solidify fork support requirements for EventEngines +grpc_cc_test( + name = "fork_test", + srcs = ["fork_test.cc"], + external_deps = ["gtest"], + language = "C++", + tags = ["no_windows"], + uses_event_engine = True, # engines should behave appropriately on Fork + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "bitset_test", + srcs = ["bitset_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:bitset", + ], +) + +grpc_cc_test( + name = "if_list_test", + srcs = ["if_list_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:if_list", + ], +) + +grpc_cc_test( + name = "no_destruct_test", + srcs = ["no_destruct_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:no_destruct", + ], +) + +grpc_cc_test( + name = "match_test", + srcs = ["match_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:match", + ], +) + +grpc_cc_test( + name = "overload_test", + srcs = ["overload_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:overload", + ], +) + +grpc_cc_test( + name = "down_cast_test", + srcs = ["down_cast_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:down_cast", + ], +) + +grpc_cc_test( + name = "table_test", + srcs = ["table_test.cc"], + external_deps = [ + "gtest", + "absl/types:optional", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:table", + ], +) + +grpc_cc_test( + name = "host_port_test", + srcs = ["host_port_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "mpscq_test", + srcs = ["mpscq_test.cc"], + exec_properties = LARGE_MACHINE, + external_deps = [ + "absl/log:log", + "gtest", + ], + language = "C++", + tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "orphanable_test", + srcs = ["orphanable_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + deps = [ + "//:orphanable", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "ref_counted_test", + srcs = ["ref_counted_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + deps = [ + "//src/core:ref_counted", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "dual_ref_counted_test", + srcs = ["dual_ref_counted_test.cc"], + external_deps = [ + "absl/log:check", + "gtest", + ], + language = "C++", + deps = [ + "//src/core:dual_ref_counted", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "ref_counted_ptr_test", + srcs = ["ref_counted_ptr_test.cc"], + external_deps = [ + "absl/container:flat_hash_set", + "absl/log:check", + "gtest", + ], + language = "C++", + deps = [ + "//:ref_counted_ptr", + "//src/core:dual_ref_counted", + "//src/core:ref_counted", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "thd_test", + srcs = ["thd_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "stat_test", + srcs = ["stat_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//:grpc", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "status_helper_test", + srcs = ["status_helper_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "time_util_test", + srcs = ["time_util_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "cpp_impl_of_test", + srcs = ["cpp_impl_of_test.cc"], + external_deps = ["gtest"], + language = "c++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:cpp_impl_of", + ], +) + +grpc_cc_test( + name = "chunked_vector_test", + srcs = ["chunked_vector_test.cc"], + external_deps = ["gtest"], + language = "c++", + tags = [ + "resource_quota_test", + ], + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//src/core:chunked_vector", + "//src/core:resource_quota", + ], +) + +grpc_proto_fuzzer( + name = "chunked_vector_fuzzer", + srcs = ["chunked_vector_fuzzer.cc"], + corpus = "chunked_vector_corpora", + external_deps = ["absl/log:check"], + language = "C++", + proto = "chunked_vector_fuzzer.proto", + tags = ["no_windows"], + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:chunked_vector", + "//src/core:resource_quota", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "time_test", + srcs = ["time_test.cc"], + external_deps = ["gtest"], + language = "c++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:time", + ], +) + +grpc_cc_test( + name = "single_set_ptr_test", + srcs = ["single_set_ptr_test.cc"], + external_deps = [ + "absl/log:log", + "gtest", + ], + language = "c++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:single_set_ptr", + ], +) + +grpc_cc_test( + name = "sorted_pack_test", + srcs = ["sorted_pack_test.cc"], + external_deps = ["gtest"], + language = "c++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:sorted_pack", + ], +) + +grpc_cc_test( + name = "unique_type_name_test", + srcs = ["unique_type_name_test.cc"], + external_deps = [ + "gtest", + "absl/container:flat_hash_map", + "absl/strings:str_format", + ], + language = "c++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:unique_type_name", + ], +) + +grpc_cc_test( + name = "work_serializer_test", + srcs = ["work_serializer_test.cc"], + exec_properties = LARGE_MACHINE, + external_deps = [ + "gtest", + ], + flaky = True, + language = "C++", + shard_count = 5, + tags = [ + "no_windows", # LARGE_MACHINE is not configured for windows RBE + ], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/event_engine:event_engine_test_utils", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "validation_errors_test", + srcs = ["validation_errors_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + deps = [ + "//src/core:validation_errors", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "notification_test", + srcs = ["notification_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = ["//src/core:notification"], +) + +grpc_cc_test( + name = "load_file_test", + srcs = ["load_file_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:load_file", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "uuid_v4_test", + srcs = ["uuid_v4_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:uuid_v4", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "glob_test", + srcs = ["glob_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:gpr", + "//src/core:useful", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_fuzzer( + name = "uri_fuzzer_test", + srcs = ["uri_fuzzer_test.cc"], + corpus = "uri_corpus", + language = "C++", + tags = [ + "no_windows", + # Without "nofixdeps", "//:grpc" gets substituted with "//:event_engine_base_hdrs" + "nofixdeps", + ], + deps = [ + "//:exec_ctx", + "//:gpr", + "//:grpc", + "//:uri", + ], +) + +grpc_cc_test( + name = "uri_test", + srcs = ["uri_test.cc"], + external_deps = [ + "absl/status", + "gtest", + ], + language = "C++", + deps = [ + "//:event_engine_base_hdrs", + "//:uri", + "//test/core/test_util:grpc_test_util_unsecure", + ], +) + +grpc_cc_test( + name = "matchers_test", + srcs = ["matchers_test.cc"], + external_deps = ["gtest"], + language = "C++", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/test_util:grpc_test_util", + "//test/core/test_util:grpc_test_util_base", + ], +) + +grpc_cc_test( + name = "backoff_test", + srcs = ["backoff_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//:backoff", + "//:exec_ctx", + "//:grpc", + "//src/core:time", + "//test/core/test_util:grpc_test_util", + ], +) + +grpc_cc_test( + name = "random_early_detection_test", + srcs = ["random_early_detection_test.cc"], + external_deps = [ + "absl/random", + "gtest", + ], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = ["//src/core:random_early_detection"], +) + grpc_cc_test( name = "alloc_test", srcs = ["alloc_test.cc"], @@ -100,8 +676,8 @@ grpc_cc_test( ) grpc_cc_test( - name = "time_test", - srcs = ["time_test.cc"], + name = "gpr_time_test", + srcs = ["gpr_time_test.cc"], external_deps = ["gtest"], language = "C++", uses_event_engine = False, @@ -151,6 +727,33 @@ grpc_cc_test( ], ) +grpc_cc_test( + name = "avl_test", + srcs = ["avl_test.cc"], + external_deps = ["gtest"], + language = "C++", + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:avl", + ], +) + +grpc_proto_fuzzer( + name = "avl_fuzzer", + srcs = ["avl_fuzzer.cc"], + corpus = "avl_fuzzer_corpus", + language = "C++", + proto = "avl_fuzzer.proto", + tags = ["no_windows"], + uses_event_engine = False, + uses_polling = False, + deps = [ + "//src/core:avl", + "//test/core/test_util:grpc_test_util", + ], +) + grpc_cc_test( name = "lru_cache_test", srcs = ["lru_cache_test.cc"], diff --git a/test/core/avl/avl_fuzzer.cc b/test/core/util/avl_fuzzer.cc similarity index 97% rename from test/core/avl/avl_fuzzer.cc rename to test/core/util/avl_fuzzer.cc index 914fdb78b3a24..a0760e659cdbf 100644 --- a/test/core/avl/avl_fuzzer.cc +++ b/test/core/util/avl_fuzzer.cc @@ -19,9 +19,9 @@ #include #include -#include "src/core/lib/avl/avl.h" +#include "src/core/util/avl.h" #include "src/libfuzzer/libfuzzer_macro.h" -#include "test/core/avl/avl_fuzzer.pb.h" +#include "test/core/util/avl_fuzzer.pb.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/avl/avl_fuzzer.proto b/test/core/util/avl_fuzzer.proto similarity index 100% rename from test/core/avl/avl_fuzzer.proto rename to test/core/util/avl_fuzzer.proto diff --git a/test/core/avl/avl_fuzzer_corpus/0 b/test/core/util/avl_fuzzer_corpus/0 similarity index 100% rename from test/core/avl/avl_fuzzer_corpus/0 rename to test/core/util/avl_fuzzer_corpus/0 diff --git a/test/core/avl/avl_fuzzer_corpus/crash-060a9a897130ba7bb2f4313daa604c47f7c7c907 b/test/core/util/avl_fuzzer_corpus/crash-060a9a897130ba7bb2f4313daa604c47f7c7c907 similarity index 100% rename from test/core/avl/avl_fuzzer_corpus/crash-060a9a897130ba7bb2f4313daa604c47f7c7c907 rename to test/core/util/avl_fuzzer_corpus/crash-060a9a897130ba7bb2f4313daa604c47f7c7c907 diff --git a/test/core/avl/avl_fuzzer_corpus/crash-1fbe8edb82f9a7aa4c2dffe4a6eaa40c34b1e360 b/test/core/util/avl_fuzzer_corpus/crash-1fbe8edb82f9a7aa4c2dffe4a6eaa40c34b1e360 similarity index 100% rename from test/core/avl/avl_fuzzer_corpus/crash-1fbe8edb82f9a7aa4c2dffe4a6eaa40c34b1e360 rename to test/core/util/avl_fuzzer_corpus/crash-1fbe8edb82f9a7aa4c2dffe4a6eaa40c34b1e360 diff --git a/test/core/avl/avl_test.cc b/test/core/util/avl_test.cc similarity index 97% rename from test/core/avl/avl_test.cc rename to test/core/util/avl_test.cc index 2bd56c81bc618..1c8c33a18bff8 100644 --- a/test/core/avl/avl_test.cc +++ b/test/core/util/avl_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/avl/avl.h" +#include "src/core/util/avl.h" #include diff --git a/test/core/backoff/backoff_test.cc b/test/core/util/backoff_test.cc similarity index 98% rename from test/core/backoff/backoff_test.cc rename to test/core/util/backoff_test.cc index 13710acffad79..3ee1cf7fe2182 100644 --- a/test/core/backoff/backoff_test.cc +++ b/test/core/util/backoff_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/backoff/backoff.h" +#include "src/core/util/backoff.h" #include #include @@ -26,7 +26,7 @@ #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/gprpp/bitset_test.cc b/test/core/util/bitset_test.cc similarity index 98% rename from test/core/gprpp/bitset_test.cc rename to test/core/util/bitset_test.cc index 58a23f628c181..99f1f72a7ee75 100644 --- a/test/core/gprpp/bitset_test.cc +++ b/test/core/util/bitset_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" #include #include diff --git a/test/core/gprpp/chunked_vector_corpora/crash-a0868ce3a0f76feefcc715148ed9e71fa0738c2a b/test/core/util/chunked_vector_corpora/crash-a0868ce3a0f76feefcc715148ed9e71fa0738c2a similarity index 100% rename from test/core/gprpp/chunked_vector_corpora/crash-a0868ce3a0f76feefcc715148ed9e71fa0738c2a rename to test/core/util/chunked_vector_corpora/crash-a0868ce3a0f76feefcc715148ed9e71fa0738c2a diff --git a/test/core/gprpp/chunked_vector_corpora/testcase-5405829431427072 b/test/core/util/chunked_vector_corpora/testcase-5405829431427072 similarity index 100% rename from test/core/gprpp/chunked_vector_corpora/testcase-5405829431427072 rename to test/core/util/chunked_vector_corpora/testcase-5405829431427072 diff --git a/test/core/gprpp/chunked_vector_fuzzer.cc b/test/core/util/chunked_vector_fuzzer.cc similarity index 97% rename from test/core/gprpp/chunked_vector_fuzzer.cc rename to test/core/util/chunked_vector_fuzzer.cc index d857208c2e5d0..37bcc3df4e1fe 100644 --- a/test/core/gprpp/chunked_vector_fuzzer.cc +++ b/test/core/util/chunked_vector_fuzzer.cc @@ -24,13 +24,13 @@ #include -#include "src/core/lib/gprpp/chunked_vector.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/chunked_vector.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/libfuzzer/libfuzzer_macro.h" -#include "test/core/gprpp/chunked_vector_fuzzer.pb.h" +#include "test/core/util/chunked_vector_fuzzer.pb.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/gprpp/chunked_vector_fuzzer.proto b/test/core/util/chunked_vector_fuzzer.proto similarity index 100% rename from test/core/gprpp/chunked_vector_fuzzer.proto rename to test/core/util/chunked_vector_fuzzer.proto diff --git a/test/core/gprpp/chunked_vector_test.cc b/test/core/util/chunked_vector_test.cc similarity index 97% rename from test/core/gprpp/chunked_vector_test.cc rename to test/core/util/chunked_vector_test.cc index 6299b0209d718..82f10436edc23 100644 --- a/test/core/gprpp/chunked_vector_test.cc +++ b/test/core/util/chunked_vector_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/chunked_vector.h" +#include "src/core/util/chunked_vector.h" #include #include @@ -21,9 +21,9 @@ #include -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/resource_quota.h" +#include "src/core/util/ref_counted_ptr.h" namespace grpc_core { namespace testing { diff --git a/test/core/gprpp/cpp_impl_of_test.cc b/test/core/util/cpp_impl_of_test.cc similarity index 95% rename from test/core/gprpp/cpp_impl_of_test.cc rename to test/core/util/cpp_impl_of_test.cc index 00b164cb3aa00..49653bee36b39 100644 --- a/test/core/gprpp/cpp_impl_of_test.cc +++ b/test/core/util/cpp_impl_of_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/cpp_impl_of.h" +#include "src/core/util/cpp_impl_of.h" #include diff --git a/test/core/util/cpu_test.cc b/test/core/util/cpu_test.cc index b71922e45940d..1c480304f47bc 100644 --- a/test/core/util/cpu_test.cc +++ b/test/core/util/cpu_test.cc @@ -34,7 +34,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" // Test structure is essentially: diff --git a/test/core/gprpp/directory_reader_test.cc b/test/core/util/directory_reader_test.cc similarity index 97% rename from test/core/gprpp/directory_reader_test.cc rename to test/core/util/directory_reader_test.cc index b20e167b078e7..e117bc2b058b3 100644 --- a/test/core/gprpp/directory_reader_test.cc +++ b/test/core/util/directory_reader_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/gprpp/directory_reader.h" +#include "src/core/util/directory_reader.h" #include #include diff --git a/test/core/gprpp/down_cast_test.cc b/test/core/util/down_cast_test.cc similarity index 96% rename from test/core/gprpp/down_cast_test.cc rename to test/core/util/down_cast_test.cc index e0af70817346c..dd84b197f7078 100644 --- a/test/core/gprpp/down_cast_test.cc +++ b/test/core/util/down_cast_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/down_cast.h" +#include "src/core/util/down_cast.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/dual_ref_counted_test.cc b/test/core/util/dual_ref_counted_test.cc similarity index 96% rename from test/core/gprpp/dual_ref_counted_test.cc rename to test/core/util/dual_ref_counted_test.cc index 1f7cf80e41da4..4c9e2de162f97 100644 --- a/test/core/gprpp/dual_ref_counted_test.cc +++ b/test/core/util/dual_ref_counted_test.cc @@ -14,15 +14,15 @@ // limitations under the License. // -#include "src/core/lib/gprpp/dual_ref_counted.h" +#include "src/core/util/dual_ref_counted.h" #include #include "absl/log/check.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/manual_constructor.h" -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/manual_constructor.h" +#include "src/core/util/ref_counted.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/gprpp/dump_args_test.cc b/test/core/util/dump_args_test.cc similarity index 96% rename from test/core/gprpp/dump_args_test.cc rename to test/core/util/dump_args_test.cc index 09c6fafc38703..06f26a1fce537 100644 --- a/test/core/gprpp/dump_args_test.cc +++ b/test/core/util/dump_args_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/dump_args.h" +#include "src/core/util/dump_args.h" #include diff --git a/test/core/util/env_test.cc b/test/core/util/env_test.cc index b3f09966c0759..df82aa37752bd 100644 --- a/test/core/util/env_test.cc +++ b/test/core/util/env_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "absl/log/log.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/examine_stack_test.cc b/test/core/util/examine_stack_test.cc similarity index 98% rename from test/core/gprpp/examine_stack_test.cc rename to test/core/util/examine_stack_test.cc index f9384842c7da7..e257f114828f2 100644 --- a/test/core/gprpp/examine_stack_test.cc +++ b/test/core/util/examine_stack_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/examine_stack.h" +#include "src/core/util/examine_stack.h" #include "absl/debugging/stacktrace.h" #include "absl/debugging/symbolize.h" diff --git a/test/core/gprpp/fork_test.cc b/test/core/util/fork_test.cc similarity index 98% rename from test/core/gprpp/fork_test.cc rename to test/core/util/fork_test.cc index 24f74c77d6b67..543c00da713ef 100644 --- a/test/core/gprpp/fork_test.cc +++ b/test/core/util/fork_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/fork.h" +#include "src/core/util/fork.h" #include @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" TEST(ForkTest, Init) { diff --git a/test/core/gprpp/glob_test.cc b/test/core/util/glob_test.cc similarity index 98% rename from test/core/gprpp/glob_test.cc rename to test/core/util/glob_test.cc index 5233c666235ff..84df18db721ed 100644 --- a/test/core/gprpp/glob_test.cc +++ b/test/core/util/glob_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/glob.h" +#include "src/core/util/glob.h" #include "absl/strings/match.h" #include "gtest/gtest.h" diff --git a/test/core/util/gpr_time_test.cc b/test/core/util/gpr_time_test.cc new file mode 100644 index 0000000000000..48ea2ce17a2ec --- /dev/null +++ b/test/core/util/gpr_time_test.cc @@ -0,0 +1,268 @@ +// +// +// Copyright 2015 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// + +// Test of gpr time support. + +#include +#include +#include + +#include + +#include "gtest/gtest.h" + +#include + +#include "test/core/test_util/test_config.h" + +static void to_fp(void* arg, const char* buf, size_t len) { + fwrite(buf, 1, len, static_cast(arg)); +} + +// Convert gpr_intmax x to ascii base b (2..16), and write with +// (*writer)(arg, ...), zero padding to "chars" digits). +static void i_to_s(intmax_t x, int base, int chars, + void (*writer)(void* arg, const char* buf, size_t len), + void* arg) { + char buf[64]; + char fmt[32]; + ASSERT_TRUE(base == 16 || base == 10); + sprintf(fmt, "%%0%d%s", chars, base == 16 ? PRIxMAX : PRIdMAX); + sprintf(buf, fmt, x); + (*writer)(arg, buf, strlen(buf)); +} + +// Convert ts to ascii, and write with (*writer)(arg, ...). +static void ts_to_s(gpr_timespec t, + void (*writer)(void* arg, const char* buf, size_t len), + void* arg) { + if (t.tv_sec < 0 && t.tv_nsec != 0) { + t.tv_sec++; + t.tv_nsec = GPR_NS_PER_SEC - t.tv_nsec; + } + i_to_s(t.tv_sec, 10, 0, writer, arg); + (*writer)(arg, ".", 1); + i_to_s(t.tv_nsec, 10, 9, writer, arg); +} + +TEST(TimeTest, Values) { + int i; + + gpr_timespec x = gpr_time_0(GPR_CLOCK_REALTIME); + ASSERT_TRUE(x.tv_sec == 0 && x.tv_nsec == 0); + + x = gpr_inf_future(GPR_CLOCK_REALTIME); + fprintf(stderr, "far future "); + fflush(stderr); + i_to_s(x.tv_sec, 16, 16, &to_fp, stderr); + fprintf(stderr, "\n"); + ASSERT_EQ(x.tv_sec, INT64_MAX); + fprintf(stderr, "far future "); + fflush(stderr); + ts_to_s(x, &to_fp, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + + x = gpr_inf_past(GPR_CLOCK_REALTIME); + fprintf(stderr, "far past "); + fflush(stderr); + i_to_s(x.tv_sec, 16, 16, &to_fp, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + ASSERT_EQ(x.tv_sec, INT64_MIN); + fprintf(stderr, "far past "); + fflush(stderr); + ts_to_s(x, &to_fp, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + + for (i = 1; i != 1000 * 1000 * 1000; i *= 10) { + x = gpr_time_from_micros(i, GPR_TIMESPAN); + ASSERT_TRUE(x.tv_sec == i / GPR_US_PER_SEC && + x.tv_nsec == (i % GPR_US_PER_SEC) * GPR_NS_PER_US); + x = gpr_time_from_nanos(i, GPR_TIMESPAN); + ASSERT_TRUE(x.tv_sec == i / GPR_NS_PER_SEC && + x.tv_nsec == (i % GPR_NS_PER_SEC)); + x = gpr_time_from_millis(i, GPR_TIMESPAN); + ASSERT_TRUE(x.tv_sec == i / GPR_MS_PER_SEC && + x.tv_nsec == (i % GPR_MS_PER_SEC) * GPR_NS_PER_MS); + } + + // Test possible overflow in conversion of -ve values. + x = gpr_time_from_micros(-(INT64_MAX - 999997), GPR_TIMESPAN); + ASSERT_LT(x.tv_sec, 0); + ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); + EXPECT_EQ((x.tv_sec * GPR_US_PER_SEC + + x.tv_nsec / (GPR_NS_PER_SEC / GPR_US_PER_SEC)), + -(INT64_MAX - 999997)); + + x = gpr_time_from_nanos(-(INT64_MAX - 999999997), GPR_TIMESPAN); + ASSERT_LT(x.tv_sec, 0); + ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); + EXPECT_EQ((x.tv_sec * GPR_NS_PER_SEC + x.tv_nsec), -(INT64_MAX - 999999997)); + + x = gpr_time_from_millis(-(INT64_MAX - 997), GPR_TIMESPAN); + ASSERT_LT(x.tv_sec, 0); + ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); + EXPECT_EQ((x.tv_sec * GPR_MS_PER_SEC + + x.tv_nsec / (GPR_NS_PER_SEC / GPR_MS_PER_SEC)), + -(INT64_MAX - 997)); + + // Test general -ve values. + for (i = -1; i > -1000 * 1000 * 1000; i *= 7) { + x = gpr_time_from_micros(i, GPR_TIMESPAN); + ASSERT_EQ(x.tv_sec * GPR_US_PER_SEC + x.tv_nsec / GPR_NS_PER_US, i); + x = gpr_time_from_nanos(i, GPR_TIMESPAN); + ASSERT_EQ(x.tv_sec * GPR_NS_PER_SEC + x.tv_nsec, i); + x = gpr_time_from_millis(i, GPR_TIMESPAN); + ASSERT_EQ(x.tv_sec * GPR_MS_PER_SEC + x.tv_nsec / GPR_NS_PER_MS, i); + } +} + +TEST(TimeTest, AddSub) { + int i; + int j; + int k; + // Basic addition and subtraction. + for (i = -100; i <= 100; i++) { + for (j = -100; j <= 100; j++) { + for (k = 1; k <= 10000000; k *= 10) { + int sum = i + j; + int diff = i - j; + gpr_timespec it = gpr_time_from_micros(i * k, GPR_TIMESPAN); + gpr_timespec jt = gpr_time_from_micros(j * k, GPR_TIMESPAN); + gpr_timespec sumt = gpr_time_add(it, jt); + gpr_timespec difft = gpr_time_sub(it, jt); + if (gpr_time_cmp(gpr_time_from_micros(sum * k, GPR_TIMESPAN), sumt) != + 0) { + fprintf(stderr, "i %d j %d sum %d sumt ", i, j, sum); + fflush(stderr); + ts_to_s(sumt, &to_fp, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + ASSERT_TRUE(0); + } + if (gpr_time_cmp(gpr_time_from_micros(diff * k, GPR_TIMESPAN), difft) != + 0) { + fprintf(stderr, "i %d j %d diff %d diff ", i, j, diff); + fflush(stderr); + ts_to_s(sumt, &to_fp, stderr); + fprintf(stderr, "\n"); + fflush(stderr); + ASSERT_TRUE(0); + } + } + } + } +} + +TEST(TimeTest, Overflow) { + // overflow + gpr_timespec x = gpr_time_from_micros(1, GPR_TIMESPAN); + do { + x = gpr_time_add(x, x); + } while (gpr_time_cmp(x, gpr_inf_future(GPR_TIMESPAN)) < 0); + ASSERT_EQ(gpr_time_cmp(x, gpr_inf_future(GPR_TIMESPAN)), 0); + x = gpr_time_from_micros(-1, GPR_TIMESPAN); + do { + x = gpr_time_add(x, x); + } while (gpr_time_cmp(x, gpr_inf_past(GPR_TIMESPAN)) > 0); + ASSERT_EQ(gpr_time_cmp(x, gpr_inf_past(GPR_TIMESPAN)), 0); +} + +TEST(TimeTest, StickyInfinities) { + int i; + int j; + int k; + gpr_timespec infinity[2]; + gpr_timespec addend[3]; + infinity[0] = gpr_inf_future(GPR_TIMESPAN); + infinity[1] = gpr_inf_past(GPR_TIMESPAN); + addend[0] = gpr_inf_future(GPR_TIMESPAN); + addend[1] = gpr_inf_past(GPR_TIMESPAN); + addend[2] = gpr_time_0(GPR_TIMESPAN); + + // Infinities are sticky + for (i = 0; i != sizeof(infinity) / sizeof(infinity[0]); i++) { + for (j = 0; j != sizeof(addend) / sizeof(addend[0]); j++) { + gpr_timespec x = gpr_time_add(infinity[i], addend[j]); + ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); + x = gpr_time_sub(infinity[i], addend[j]); + ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); + } + for (k = -200; k <= 200; k++) { + gpr_timespec y = gpr_time_from_micros(k * 100000, GPR_TIMESPAN); + gpr_timespec x = gpr_time_add(infinity[i], y); + ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); + x = gpr_time_sub(infinity[i], y); + ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); + } + } +} + +TEST(TimeTest, Similar) { + ASSERT_EQ(1, gpr_time_similar(gpr_inf_future(GPR_TIMESPAN), + gpr_inf_future(GPR_TIMESPAN), + gpr_time_0(GPR_TIMESPAN))); + ASSERT_EQ(1, gpr_time_similar(gpr_inf_past(GPR_TIMESPAN), + gpr_inf_past(GPR_TIMESPAN), + gpr_time_0(GPR_TIMESPAN))); + ASSERT_EQ(0, gpr_time_similar(gpr_inf_past(GPR_TIMESPAN), + gpr_inf_future(GPR_TIMESPAN), + gpr_time_0(GPR_TIMESPAN))); + ASSERT_EQ(0, gpr_time_similar(gpr_inf_future(GPR_TIMESPAN), + gpr_inf_past(GPR_TIMESPAN), + gpr_time_0(GPR_TIMESPAN))); + ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_0(GPR_TIMESPAN))); + ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_from_micros(15, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN))); + ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(15, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN))); + ASSERT_EQ(0, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_from_micros(25, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN))); + ASSERT_EQ(0, gpr_time_similar(gpr_time_from_micros(25, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN), + gpr_time_from_micros(10, GPR_TIMESPAN))); +} + +TEST(TimeTest, ConvertExtreme) { + gpr_timespec realtime = {INT64_MAX, 1, GPR_CLOCK_REALTIME}; + gpr_timespec monotime = gpr_convert_clock_type(realtime, GPR_CLOCK_MONOTONIC); + ASSERT_EQ(monotime.tv_sec, realtime.tv_sec); + ASSERT_EQ(monotime.clock_type, GPR_CLOCK_MONOTONIC); +} + +TEST(TimeTest, CmpExtreme) { + gpr_timespec t1 = {INT64_MAX, 1, GPR_CLOCK_REALTIME}; + gpr_timespec t2 = {INT64_MAX, 2, GPR_CLOCK_REALTIME}; + ASSERT_EQ(gpr_time_cmp(t1, t2), 0); + t1.tv_sec = INT64_MIN; + t2.tv_sec = INT64_MIN; + ASSERT_EQ(gpr_time_cmp(t1, t2), 0); +} + +int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(&argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/core/gprpp/host_port_test.cc b/test/core/util/host_port_test.cc similarity index 98% rename from test/core/gprpp/host_port_test.cc rename to test/core/util/host_port_test.cc index 77432e3155d21..3f7607c0a56a3 100644 --- a/test/core/gprpp/host_port_test.cc +++ b/test/core/util/host_port_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/if_list_test.cc b/test/core/util/if_list_test.cc similarity index 96% rename from test/core/gprpp/if_list_test.cc rename to test/core/util/if_list_test.cc index 38dce561bf42b..d99d8ed6ba31c 100644 --- a/test/core/gprpp/if_list_test.cc +++ b/test/core/util/if_list_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/if_list.h" +#include "src/core/util/if_list.h" #include diff --git a/test/core/gprpp/load_file_test.cc b/test/core/util/load_file_test.cc similarity index 98% rename from test/core/gprpp/load_file_test.cc rename to test/core/util/load_file_test.cc index 180624c9eb482..4888749fb4002 100644 --- a/test/core/gprpp/load_file_test.cc +++ b/test/core/util/load_file_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/load_file.h" +#include "src/core/util/load_file.h" #include #include diff --git a/test/core/gprpp/match_test.cc b/test/core/util/match_test.cc similarity index 98% rename from test/core/gprpp/match_test.cc rename to test/core/util/match_test.cc index 8df0b69a17378..481bb2d6c5974 100644 --- a/test/core/gprpp/match_test.cc +++ b/test/core/util/match_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/match.h" #include diff --git a/test/core/matchers/matchers_test.cc b/test/core/util/matchers_test.cc similarity index 99% rename from test/core/matchers/matchers_test.cc rename to test/core/util/matchers_test.cc index 75c6b49888627..d772dcbcfbe4e 100644 --- a/test/core/matchers/matchers_test.cc +++ b/test/core/util/matchers_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/matchers.h" #include "absl/status/status.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/mpscq_test.cc b/test/core/util/mpscq_test.cc similarity index 98% rename from test/core/gprpp/mpscq_test.cc rename to test/core/util/mpscq_test.cc index 1bf92acd18934..65dce481d43c5 100644 --- a/test/core/gprpp/mpscq_test.cc +++ b/test/core/util/mpscq_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/mpscq.h" +#include "src/core/util/mpscq.h" #include #include @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/gprpp/no_destruct_test.cc b/test/core/util/no_destruct_test.cc similarity index 97% rename from test/core/gprpp/no_destruct_test.cc rename to test/core/util/no_destruct_test.cc index d0f9d19a4c9d1..7a440e65a2d17 100644 --- a/test/core/gprpp/no_destruct_test.cc +++ b/test/core/util/no_destruct_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" #include diff --git a/test/core/gprpp/notification_test.cc b/test/core/util/notification_test.cc similarity index 97% rename from test/core/gprpp/notification_test.cc rename to test/core/util/notification_test.cc index ed5dcf48021b9..3a4fb77a53d70 100644 --- a/test/core/gprpp/notification_test.cc +++ b/test/core/util/notification_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" #include #include diff --git a/test/core/gprpp/orphanable_test.cc b/test/core/util/orphanable_test.cc similarity index 98% rename from test/core/gprpp/orphanable_test.cc rename to test/core/util/orphanable_test.cc index fe53367c9a2d7..4e38d719d9c6f 100644 --- a/test/core/gprpp/orphanable_test.cc +++ b/test/core/util/orphanable_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/orphanable.h" +#include "src/core/util/orphanable.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/overload_test.cc b/test/core/util/overload_test.cc similarity index 96% rename from test/core/gprpp/overload_test.cc rename to test/core/util/overload_test.cc index e7443a5be2c61..c3b26549fd4f2 100644 --- a/test/core/gprpp/overload_test.cc +++ b/test/core/util/overload_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/overload.h" +#include "src/core/util/overload.h" #include diff --git a/test/core/backoff/random_early_detection_test.cc b/test/core/util/random_early_detection_test.cc similarity index 97% rename from test/core/backoff/random_early_detection_test.cc rename to test/core/util/random_early_detection_test.cc index 778fe873bf0af..c0531d647d5f4 100644 --- a/test/core/backoff/random_early_detection_test.cc +++ b/test/core/util/random_early_detection_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/backoff/random_early_detection.h" +#include "src/core/util/random_early_detection.h" #include diff --git a/test/core/gprpp/ref_counted_ptr_test.cc b/test/core/util/ref_counted_ptr_test.cc similarity index 99% rename from test/core/gprpp/ref_counted_ptr_test.cc rename to test/core/util/ref_counted_ptr_test.cc index 5c3e0f0f6c7af..e2d7cd0f4db23 100644 --- a/test/core/gprpp/ref_counted_ptr_test.cc +++ b/test/core/util/ref_counted_ptr_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/ref_counted_ptr.h" #include @@ -24,8 +24,8 @@ #include "absl/log/check.h" #include "gtest/gtest.h" -#include "src/core/lib/gprpp/dual_ref_counted.h" -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/dual_ref_counted.h" +#include "src/core/util/ref_counted.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/gprpp/ref_counted_test.cc b/test/core/util/ref_counted_test.cc similarity index 99% rename from test/core/gprpp/ref_counted_test.cc rename to test/core/util/ref_counted_test.cc index 15ee86e5c524b..5b0171d3b4fde 100644 --- a/test/core/gprpp/ref_counted_test.cc +++ b/test/core/util/ref_counted_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" #include #include diff --git a/test/core/gprpp/single_set_ptr_test.cc b/test/core/util/single_set_ptr_test.cc similarity index 97% rename from test/core/gprpp/single_set_ptr_test.cc rename to test/core/util/single_set_ptr_test.cc index b93aa14c3e862..67f9cc39b965c 100644 --- a/test/core/gprpp/single_set_ptr_test.cc +++ b/test/core/util/single_set_ptr_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/single_set_ptr.h" +#include "src/core/util/single_set_ptr.h" #include #include diff --git a/test/core/gprpp/sorted_pack_test.cc b/test/core/util/sorted_pack_test.cc similarity index 97% rename from test/core/gprpp/sorted_pack_test.cc rename to test/core/util/sorted_pack_test.cc index ad4e911c813ba..74e0bb6823db7 100644 --- a/test/core/gprpp/sorted_pack_test.cc +++ b/test/core/util/sorted_pack_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/sorted_pack.h" +#include "src/core/util/sorted_pack.h" #include diff --git a/test/core/util/spinlock_test.cc b/test/core/util/spinlock_test.cc index 6e8be4a853e50..da7c4b4ca57bd 100644 --- a/test/core/util/spinlock_test.cc +++ b/test/core/util/spinlock_test.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" // ------------------------------------------------- diff --git a/test/core/gprpp/stat_test.cc b/test/core/util/stat_test.cc similarity index 98% rename from test/core/gprpp/stat_test.cc rename to test/core/util/stat_test.cc index 29536b4a0e632..4595a6208bd6e 100644 --- a/test/core/gprpp/stat_test.cc +++ b/test/core/util/stat_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/gprpp/stat.h" +#include "src/core/util/stat.h" #include diff --git a/test/core/gprpp/status_helper_test.cc b/test/core/util/status_helper_test.cc similarity index 99% rename from test/core/gprpp/status_helper_test.cc rename to test/core/util/status_helper_test.cc index 51f9a571cffee..a5c7c14e3579c 100644 --- a/test/core/gprpp/status_helper_test.cc +++ b/test/core/util/status_helper_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/gprpp/status_helper.h" +#include "src/core/util/status_helper.h" #include diff --git a/test/core/util/sync_test.cc b/test/core/util/sync_test.cc index 32f44c56a9e9f..256664302e232 100644 --- a/test/core/util/sync_test.cc +++ b/test/core/util/sync_test.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/test_config.h" // ==================Example use of interface=================== diff --git a/test/core/gprpp/table_test.cc b/test/core/util/table_test.cc similarity index 99% rename from test/core/gprpp/table_test.cc rename to test/core/util/table_test.cc index 9c9ba50726329..7d959b311e50a 100644 --- a/test/core/gprpp/table_test.cc +++ b/test/core/util/table_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/table.h" +#include "src/core/util/table.h" #include #include diff --git a/test/core/gprpp/thd_test.cc b/test/core/util/thd_test.cc similarity index 98% rename from test/core/gprpp/thd_test.cc rename to test/core/util/thd_test.cc index c26a417a38718..fd93eb278d368 100644 --- a/test/core/gprpp/thd_test.cc +++ b/test/core/util/thd_test.cc @@ -18,7 +18,7 @@ // Test of gpr thread support. -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include diff --git a/test/core/gprpp/time_averaged_stats_test.cc b/test/core/util/time_averaged_stats_test.cc similarity index 99% rename from test/core/gprpp/time_averaged_stats_test.cc rename to test/core/util/time_averaged_stats_test.cc index 1407c2694aaca..f42f27e335342 100644 --- a/test/core/gprpp/time_averaged_stats_test.cc +++ b/test/core/util/time_averaged_stats_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/time_averaged_stats.h" +#include "src/core/util/time_averaged_stats.h" #include diff --git a/test/core/util/time_test.cc b/test/core/util/time_test.cc index 48ea2ce17a2ec..01ab35e3b4739 100644 --- a/test/core/util/time_test.cc +++ b/test/core/util/time_test.cc @@ -1,6 +1,4 @@ -// -// -// Copyright 2015 gRPC authors. +// Copyright 2021 gRPC authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,256 +11,103 @@ // 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. -// -// -// Test of gpr time support. +#include "src/core/util/time.h" -#include -#include -#include - -#include +#include #include "gtest/gtest.h" -#include - -#include "test/core/test_util/test_config.h" +namespace grpc_core { +namespace testing { -static void to_fp(void* arg, const char* buf, size_t len) { - fwrite(buf, 1, len, static_cast(arg)); +TEST(TimestampTest, Empty) { + EXPECT_EQ(Timestamp(), Timestamp::ProcessEpoch()); } -// Convert gpr_intmax x to ascii base b (2..16), and write with -// (*writer)(arg, ...), zero padding to "chars" digits). -static void i_to_s(intmax_t x, int base, int chars, - void (*writer)(void* arg, const char* buf, size_t len), - void* arg) { - char buf[64]; - char fmt[32]; - ASSERT_TRUE(base == 16 || base == 10); - sprintf(fmt, "%%0%d%s", chars, base == 16 ? PRIxMAX : PRIdMAX); - sprintf(buf, fmt, x); - (*writer)(arg, buf, strlen(buf)); +TEST(TimestampTest, Infinities) { + EXPECT_EQ(Timestamp::InfFuture() - Duration::Milliseconds(1), + Timestamp::InfFuture()); + EXPECT_EQ(Timestamp::InfPast() + Duration::Milliseconds(1), + Timestamp::InfPast()); + EXPECT_EQ(Timestamp::Now() - Timestamp::InfPast(), Duration::Infinity()); + EXPECT_EQ(Timestamp::Now() - Timestamp::InfFuture(), + Duration::NegativeInfinity()); + EXPECT_EQ(Timestamp::InfPast() - Timestamp::InfPast(), + Duration::NegativeInfinity()); + EXPECT_EQ(Timestamp::InfFuture() - Timestamp::InfPast(), + Duration::Infinity()); + EXPECT_EQ(Timestamp::InfFuture() - Timestamp::InfFuture(), + Duration::Infinity()); + EXPECT_EQ(Timestamp::InfPast() - Timestamp::InfFuture(), + Duration::NegativeInfinity()); } -// Convert ts to ascii, and write with (*writer)(arg, ...). -static void ts_to_s(gpr_timespec t, - void (*writer)(void* arg, const char* buf, size_t len), - void* arg) { - if (t.tv_sec < 0 && t.tv_nsec != 0) { - t.tv_sec++; - t.tv_nsec = GPR_NS_PER_SEC - t.tv_nsec; - } - i_to_s(t.tv_sec, 10, 0, writer, arg); - (*writer)(arg, ".", 1); - i_to_s(t.tv_nsec, 10, 9, writer, arg); +TEST(TimestampTest, ToString) { + EXPECT_EQ(Timestamp::FromMillisecondsAfterProcessEpoch(42).ToString(), + "@42ms"); + EXPECT_EQ(Timestamp::InfFuture().ToString(), "@∞"); + EXPECT_EQ(Timestamp::InfPast().ToString(), "@-∞"); } -TEST(TimeTest, Values) { - int i; - - gpr_timespec x = gpr_time_0(GPR_CLOCK_REALTIME); - ASSERT_TRUE(x.tv_sec == 0 && x.tv_nsec == 0); - - x = gpr_inf_future(GPR_CLOCK_REALTIME); - fprintf(stderr, "far future "); - fflush(stderr); - i_to_s(x.tv_sec, 16, 16, &to_fp, stderr); - fprintf(stderr, "\n"); - ASSERT_EQ(x.tv_sec, INT64_MAX); - fprintf(stderr, "far future "); - fflush(stderr); - ts_to_s(x, &to_fp, stderr); - fprintf(stderr, "\n"); - fflush(stderr); +TEST(DurationTest, Empty) { EXPECT_EQ(Duration(), Duration::Zero()); } - x = gpr_inf_past(GPR_CLOCK_REALTIME); - fprintf(stderr, "far past "); - fflush(stderr); - i_to_s(x.tv_sec, 16, 16, &to_fp, stderr); - fprintf(stderr, "\n"); - fflush(stderr); - ASSERT_EQ(x.tv_sec, INT64_MIN); - fprintf(stderr, "far past "); - fflush(stderr); - ts_to_s(x, &to_fp, stderr); - fprintf(stderr, "\n"); - fflush(stderr); - - for (i = 1; i != 1000 * 1000 * 1000; i *= 10) { - x = gpr_time_from_micros(i, GPR_TIMESPAN); - ASSERT_TRUE(x.tv_sec == i / GPR_US_PER_SEC && - x.tv_nsec == (i % GPR_US_PER_SEC) * GPR_NS_PER_US); - x = gpr_time_from_nanos(i, GPR_TIMESPAN); - ASSERT_TRUE(x.tv_sec == i / GPR_NS_PER_SEC && - x.tv_nsec == (i % GPR_NS_PER_SEC)); - x = gpr_time_from_millis(i, GPR_TIMESPAN); - ASSERT_TRUE(x.tv_sec == i / GPR_MS_PER_SEC && - x.tv_nsec == (i % GPR_MS_PER_SEC) * GPR_NS_PER_MS); - } - - // Test possible overflow in conversion of -ve values. - x = gpr_time_from_micros(-(INT64_MAX - 999997), GPR_TIMESPAN); - ASSERT_LT(x.tv_sec, 0); - ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); - EXPECT_EQ((x.tv_sec * GPR_US_PER_SEC + - x.tv_nsec / (GPR_NS_PER_SEC / GPR_US_PER_SEC)), - -(INT64_MAX - 999997)); - - x = gpr_time_from_nanos(-(INT64_MAX - 999999997), GPR_TIMESPAN); - ASSERT_LT(x.tv_sec, 0); - ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); - EXPECT_EQ((x.tv_sec * GPR_NS_PER_SEC + x.tv_nsec), -(INT64_MAX - 999999997)); - - x = gpr_time_from_millis(-(INT64_MAX - 997), GPR_TIMESPAN); - ASSERT_LT(x.tv_sec, 0); - ASSERT_TRUE(x.tv_nsec >= 0 && x.tv_nsec < GPR_NS_PER_SEC); - EXPECT_EQ((x.tv_sec * GPR_MS_PER_SEC + - x.tv_nsec / (GPR_NS_PER_SEC / GPR_MS_PER_SEC)), - -(INT64_MAX - 997)); - - // Test general -ve values. - for (i = -1; i > -1000 * 1000 * 1000; i *= 7) { - x = gpr_time_from_micros(i, GPR_TIMESPAN); - ASSERT_EQ(x.tv_sec * GPR_US_PER_SEC + x.tv_nsec / GPR_NS_PER_US, i); - x = gpr_time_from_nanos(i, GPR_TIMESPAN); - ASSERT_EQ(x.tv_sec * GPR_NS_PER_SEC + x.tv_nsec, i); - x = gpr_time_from_millis(i, GPR_TIMESPAN); - ASSERT_EQ(x.tv_sec * GPR_MS_PER_SEC + x.tv_nsec / GPR_NS_PER_MS, i); - } +TEST(DurationTest, Scales) { + EXPECT_EQ(Duration::Milliseconds(1000), Duration::Seconds(1)); + EXPECT_EQ(Duration::Seconds(60), Duration::Minutes(1)); + EXPECT_EQ(Duration::Minutes(60), Duration::Hours(1)); + EXPECT_EQ(Duration::FromSecondsAsDouble(1.2), Duration::Milliseconds(1200)); + EXPECT_EQ(Duration::FromSecondsAndNanoseconds(1, 300000000), + Duration::Milliseconds(1300)); } -TEST(TimeTest, AddSub) { - int i; - int j; - int k; - // Basic addition and subtraction. - for (i = -100; i <= 100; i++) { - for (j = -100; j <= 100; j++) { - for (k = 1; k <= 10000000; k *= 10) { - int sum = i + j; - int diff = i - j; - gpr_timespec it = gpr_time_from_micros(i * k, GPR_TIMESPAN); - gpr_timespec jt = gpr_time_from_micros(j * k, GPR_TIMESPAN); - gpr_timespec sumt = gpr_time_add(it, jt); - gpr_timespec difft = gpr_time_sub(it, jt); - if (gpr_time_cmp(gpr_time_from_micros(sum * k, GPR_TIMESPAN), sumt) != - 0) { - fprintf(stderr, "i %d j %d sum %d sumt ", i, j, sum); - fflush(stderr); - ts_to_s(sumt, &to_fp, stderr); - fprintf(stderr, "\n"); - fflush(stderr); - ASSERT_TRUE(0); - } - if (gpr_time_cmp(gpr_time_from_micros(diff * k, GPR_TIMESPAN), difft) != - 0) { - fprintf(stderr, "i %d j %d diff %d diff ", i, j, diff); - fflush(stderr); - ts_to_s(sumt, &to_fp, stderr); - fprintf(stderr, "\n"); - fflush(stderr); - ASSERT_TRUE(0); - } - } - } - } +TEST(DurationTest, Epsilon) { + EXPECT_LE(Duration::Epsilon(), Duration::Milliseconds(1)); } -TEST(TimeTest, Overflow) { - // overflow - gpr_timespec x = gpr_time_from_micros(1, GPR_TIMESPAN); - do { - x = gpr_time_add(x, x); - } while (gpr_time_cmp(x, gpr_inf_future(GPR_TIMESPAN)) < 0); - ASSERT_EQ(gpr_time_cmp(x, gpr_inf_future(GPR_TIMESPAN)), 0); - x = gpr_time_from_micros(-1, GPR_TIMESPAN); - do { - x = gpr_time_add(x, x); - } while (gpr_time_cmp(x, gpr_inf_past(GPR_TIMESPAN)) > 0); - ASSERT_EQ(gpr_time_cmp(x, gpr_inf_past(GPR_TIMESPAN)), 0); +TEST(DurationTest, Infinities) { + EXPECT_EQ(Duration::Infinity() - Duration::Milliseconds(1), + Duration::Infinity()); + EXPECT_EQ(Duration::Infinity() + Duration::Milliseconds(1), + Duration::Infinity()); + EXPECT_EQ(Duration::Infinity() * 2, Duration::Infinity()); + EXPECT_EQ(Duration::Infinity() * -1, Duration::NegativeInfinity()); + EXPECT_EQ(Duration::Infinity() / 3, Duration::Infinity()); + EXPECT_EQ(Duration::NegativeInfinity() / -3, Duration::Infinity()); + EXPECT_EQ(Duration::NegativeInfinity() + Duration::Milliseconds(1), + Duration::NegativeInfinity()); + EXPECT_EQ(Duration::NegativeInfinity() - Duration::Milliseconds(1), + Duration::NegativeInfinity()); + EXPECT_EQ(Duration::NegativeInfinity() / 3, Duration::NegativeInfinity()); + EXPECT_EQ(Duration::Hours(std::numeric_limits::max()), + Duration::Infinity()); + EXPECT_EQ(Duration::FromSecondsAsDouble(1e100), Duration::Infinity()); + EXPECT_EQ(Duration::FromSecondsAsDouble(-1e100), + Duration::NegativeInfinity()); } -TEST(TimeTest, StickyInfinities) { - int i; - int j; - int k; - gpr_timespec infinity[2]; - gpr_timespec addend[3]; - infinity[0] = gpr_inf_future(GPR_TIMESPAN); - infinity[1] = gpr_inf_past(GPR_TIMESPAN); - addend[0] = gpr_inf_future(GPR_TIMESPAN); - addend[1] = gpr_inf_past(GPR_TIMESPAN); - addend[2] = gpr_time_0(GPR_TIMESPAN); - - // Infinities are sticky - for (i = 0; i != sizeof(infinity) / sizeof(infinity[0]); i++) { - for (j = 0; j != sizeof(addend) / sizeof(addend[0]); j++) { - gpr_timespec x = gpr_time_add(infinity[i], addend[j]); - ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); - x = gpr_time_sub(infinity[i], addend[j]); - ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); - } - for (k = -200; k <= 200; k++) { - gpr_timespec y = gpr_time_from_micros(k * 100000, GPR_TIMESPAN); - gpr_timespec x = gpr_time_add(infinity[i], y); - ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); - x = gpr_time_sub(infinity[i], y); - ASSERT_EQ(gpr_time_cmp(x, infinity[i]), 0); - } - } +TEST(DurationTest, Multiplication) { + Duration d = Duration::Seconds(5); + EXPECT_EQ(d * 2, Duration::Seconds(10)); + d *= 3; + EXPECT_EQ(d, Duration::Seconds(15)); } -TEST(TimeTest, Similar) { - ASSERT_EQ(1, gpr_time_similar(gpr_inf_future(GPR_TIMESPAN), - gpr_inf_future(GPR_TIMESPAN), - gpr_time_0(GPR_TIMESPAN))); - ASSERT_EQ(1, gpr_time_similar(gpr_inf_past(GPR_TIMESPAN), - gpr_inf_past(GPR_TIMESPAN), - gpr_time_0(GPR_TIMESPAN))); - ASSERT_EQ(0, gpr_time_similar(gpr_inf_past(GPR_TIMESPAN), - gpr_inf_future(GPR_TIMESPAN), - gpr_time_0(GPR_TIMESPAN))); - ASSERT_EQ(0, gpr_time_similar(gpr_inf_future(GPR_TIMESPAN), - gpr_inf_past(GPR_TIMESPAN), - gpr_time_0(GPR_TIMESPAN))); - ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_0(GPR_TIMESPAN))); - ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_from_micros(15, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN))); - ASSERT_EQ(1, gpr_time_similar(gpr_time_from_micros(15, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN))); - ASSERT_EQ(0, gpr_time_similar(gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_from_micros(25, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN))); - ASSERT_EQ(0, gpr_time_similar(gpr_time_from_micros(25, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN), - gpr_time_from_micros(10, GPR_TIMESPAN))); +TEST(DurationTest, FromTimespan) { + EXPECT_EQ(Duration::FromTimespec(gpr_time_from_millis(1234, GPR_TIMESPAN)), + Duration::Milliseconds(1234)); } -TEST(TimeTest, ConvertExtreme) { - gpr_timespec realtime = {INT64_MAX, 1, GPR_CLOCK_REALTIME}; - gpr_timespec monotime = gpr_convert_clock_type(realtime, GPR_CLOCK_MONOTONIC); - ASSERT_EQ(monotime.tv_sec, realtime.tv_sec); - ASSERT_EQ(monotime.clock_type, GPR_CLOCK_MONOTONIC); +TEST(DurationTest, ToString) { + EXPECT_EQ(Duration::Milliseconds(42).ToString(), "42ms"); + EXPECT_EQ(Duration::Infinity().ToString(), "∞"); + EXPECT_EQ(Duration::NegativeInfinity().ToString(), "-∞"); } -TEST(TimeTest, CmpExtreme) { - gpr_timespec t1 = {INT64_MAX, 1, GPR_CLOCK_REALTIME}; - gpr_timespec t2 = {INT64_MAX, 2, GPR_CLOCK_REALTIME}; - ASSERT_EQ(gpr_time_cmp(t1, t2), 0); - t1.tv_sec = INT64_MIN; - t2.tv_sec = INT64_MIN; - ASSERT_EQ(gpr_time_cmp(t1, t2), 0); -} +} // namespace testing +} // namespace grpc_core int main(int argc, char** argv) { - grpc::testing::TestEnvironment env(&argc, argv); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } diff --git a/test/core/gprpp/time_util_test.cc b/test/core/util/time_util_test.cc similarity index 99% rename from test/core/gprpp/time_util_test.cc rename to test/core/util/time_util_test.cc index 09a6650932e65..749a6f26ec0ca 100644 --- a/test/core/gprpp/time_util_test.cc +++ b/test/core/util/time_util_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/gprpp/time_util.h" +#include "src/core/util/time_util.h" #include #include diff --git a/test/core/gprpp/unique_type_name_test.cc b/test/core/util/unique_type_name_test.cc similarity index 98% rename from test/core/gprpp/unique_type_name_test.cc rename to test/core/util/unique_type_name_test.cc index 74f8a7c1d0dec..80cffc497aaf5 100644 --- a/test/core/gprpp/unique_type_name_test.cc +++ b/test/core/util/unique_type_name_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/util/unique_type_name.h" #include #include diff --git a/test/core/uri/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 b/test/core/util/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 similarity index 100% rename from test/core/uri/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 rename to test/core/util/uri_corpus/02d156dc5e6f2c11c90c2e06fcee04adf036a342 diff --git a/test/core/uri/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 b/test/core/util/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 similarity index 100% rename from test/core/uri/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 rename to test/core/util/uri_corpus/042dc4512fa3d391c5170cf3aa61e6a638f84342 diff --git a/test/core/uri/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 b/test/core/util/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 similarity index 100% rename from test/core/uri/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 rename to test/core/util/uri_corpus/0e9bbe975f2027e8c39c89f85f667530368e7d11 diff --git a/test/core/uri/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f b/test/core/util/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f similarity index 100% rename from test/core/uri/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f rename to test/core/util/uri_corpus/1155aa6ea7ef262a81a63692513ea395f84dad6f diff --git a/test/core/uri/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 b/test/core/util/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 similarity index 100% rename from test/core/uri/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 rename to test/core/util/uri_corpus/13856a5569ffd085a4d5c07af5f8e9310835a118 diff --git a/test/core/uri/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc b/test/core/util/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc similarity index 100% rename from test/core/uri/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc rename to test/core/util/uri_corpus/14b57bcbf1e17b1db1de491ef2ba3768f704b7dc diff --git a/test/core/uri/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f b/test/core/util/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f similarity index 100% rename from test/core/uri/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f rename to test/core/util/uri_corpus/1794310671a060eead6e5ee66ac978a18ec7e84f diff --git a/test/core/uri/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 b/test/core/util/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 similarity index 100% rename from test/core/uri/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 rename to test/core/util/uri_corpus/1d30b2a79afbaf2828ff42b9a9647e942ba1ab80 diff --git a/test/core/uri/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 b/test/core/util/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 similarity index 100% rename from test/core/uri/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 rename to test/core/util/uri_corpus/1fcf5d9c333b70596cf5ba04d1f7affdf445b971 diff --git a/test/core/uri/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc b/test/core/util/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc similarity index 100% rename from test/core/uri/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc rename to test/core/util/uri_corpus/23162c8a8936e20b195404c21337ee734d02a6bc diff --git a/test/core/uri/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 b/test/core/util/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 similarity index 100% rename from test/core/uri/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 rename to test/core/util/uri_corpus/23f3198b815ca60bdadcaae682b9f965dda387f1 diff --git a/test/core/uri/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf b/test/core/util/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf similarity index 100% rename from test/core/uri/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf rename to test/core/util/uri_corpus/2ef3893b43f1f60b77b59ce06a6bce9815d78eaf diff --git a/test/core/uri/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce b/test/core/util/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce similarity index 100% rename from test/core/uri/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce rename to test/core/util/uri_corpus/356c3c129e203b5c74550b4209764d74b9caefce diff --git a/test/core/uri/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 b/test/core/util/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 similarity index 100% rename from test/core/uri/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 rename to test/core/util/uri_corpus/396568fc41c8ccb31ec925b4a862e4d29ead1327 diff --git a/test/core/uri/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c b/test/core/util/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c similarity index 100% rename from test/core/uri/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c rename to test/core/util/uri_corpus/3b1e7526a99918006b87e499d2beb6c4ac9c3c0c diff --git a/test/core/uri/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc b/test/core/util/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc similarity index 100% rename from test/core/uri/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc rename to test/core/util/uri_corpus/3b58860f3451d3e7aad99690a8d39782ca5116fc diff --git a/test/core/uri/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c b/test/core/util/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c similarity index 100% rename from test/core/uri/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c rename to test/core/util/uri_corpus/41963cc10752f70c3af7e3d85868efb097a0ea9c diff --git a/test/core/uri/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 b/test/core/util/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 similarity index 100% rename from test/core/uri/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 rename to test/core/util/uri_corpus/47b5228404451fc9d4071fa69192514bb4ce33c1 diff --git a/test/core/uri/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab b/test/core/util/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab similarity index 100% rename from test/core/uri/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab rename to test/core/util/uri_corpus/56a2da4b2e6fb795243901023ed8d0aa083d1aab diff --git a/test/core/uri/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 b/test/core/util/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 similarity index 100% rename from test/core/uri/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 rename to test/core/util/uri_corpus/574c2f13858a9a6d724654bd913ede9ae3abf822 diff --git a/test/core/uri/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb b/test/core/util/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb similarity index 100% rename from test/core/uri/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb rename to test/core/util/uri_corpus/582f789c19033a152094cbf8565f14154a778ddb diff --git a/test/core/uri/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 b/test/core/util/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 similarity index 100% rename from test/core/uri/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 rename to test/core/util/uri_corpus/636c5606fc23713a1bae88c8899c0541cfad4fd8 diff --git a/test/core/uri/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a b/test/core/util/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a similarity index 100% rename from test/core/uri/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a rename to test/core/util/uri_corpus/63fe493b270b17426d77a27cbf3abac5b2c2794a diff --git a/test/core/uri/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb b/test/core/util/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb similarity index 100% rename from test/core/uri/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb rename to test/core/util/uri_corpus/655300a902b62662296a8e46bfb04fbcb07182cb diff --git a/test/core/uri/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 b/test/core/util/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 similarity index 100% rename from test/core/uri/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 rename to test/core/util/uri_corpus/6ae3acd9d8507b61bf235748026080a4138dba58 diff --git a/test/core/uri/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 b/test/core/util/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 similarity index 100% rename from test/core/uri/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 rename to test/core/util/uri_corpus/6b70979a70a038ff6607d6cf85485ee95baf58e6 diff --git a/test/core/uri/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 b/test/core/util/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 similarity index 100% rename from test/core/uri/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 rename to test/core/util/uri_corpus/7314ab3545a7535a26e0e8aad67caea5534d68b1 diff --git a/test/core/uri/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb b/test/core/util/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb similarity index 100% rename from test/core/uri/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb rename to test/core/util/uri_corpus/7ff4d8b8d1ffd0d42c48bbb91e5856a9ec31aecb diff --git a/test/core/uri/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d b/test/core/util/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d similarity index 100% rename from test/core/uri/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d rename to test/core/util/uri_corpus/87daa131e0973b77a232a870ed749ef29cf58e6d diff --git a/test/core/uri/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 b/test/core/util/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 similarity index 100% rename from test/core/uri/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 rename to test/core/util/uri_corpus/884dcaee2908ffe5f12b65b8eba81016099c4266 diff --git a/test/core/uri/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb b/test/core/util/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb similarity index 100% rename from test/core/uri/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb rename to test/core/util/uri_corpus/8d7e944fd5d0ede94097fcc98b47b09a3f9c76cb diff --git a/test/core/uri/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 b/test/core/util/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 similarity index 100% rename from test/core/uri/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 rename to test/core/util/uri_corpus/9671149af0b444f59bbdf71340d3441dadd8a7b4 diff --git a/test/core/uri/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb b/test/core/util/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb similarity index 100% rename from test/core/uri/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb rename to test/core/util/uri_corpus/96c8d266b7dc037288ef305c996608270f72e7fb diff --git a/test/core/uri/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 b/test/core/util/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 similarity index 100% rename from test/core/uri/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 rename to test/core/util/uri_corpus/975536c71ade4800415a7e9c2f1b45c35a6d5ea8 diff --git a/test/core/uri/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b b/test/core/util/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b similarity index 100% rename from test/core/uri/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b rename to test/core/util/uri_corpus/99750aa67d30beaea8af565c829d4999aa8cb91b diff --git a/test/core/uri/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 b/test/core/util/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 similarity index 100% rename from test/core/uri/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 rename to test/core/util/uri_corpus/a1140f3f8b5cffc1010221b9a4084a25fb75c1f6 diff --git a/test/core/uri/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de b/test/core/util/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de similarity index 100% rename from test/core/uri/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de rename to test/core/util/uri_corpus/a1f0f9b75bb354eb063d7cba4fcfa2d0b88d63de diff --git a/test/core/uri/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d b/test/core/util/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d similarity index 100% rename from test/core/uri/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d rename to test/core/util/uri_corpus/a296eb3d1d436ed7df7195b10aa3c4de3896f98d diff --git a/test/core/uri/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 b/test/core/util/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 similarity index 100% rename from test/core/uri/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 rename to test/core/util/uri_corpus/a8b8e66050b424f1b8c07d46f868199fb7f60e38 diff --git a/test/core/uri/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 b/test/core/util/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 similarity index 100% rename from test/core/uri/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 rename to test/core/util/uri_corpus/aba1472880406a318ce207ee79815b7acf087757 diff --git a/test/core/uri/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 b/test/core/util/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 similarity index 100% rename from test/core/uri/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 rename to test/core/util/uri_corpus/af55baf8c8855e563befdf1eefbcbd46c5ddb8d2 diff --git a/test/core/uri/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd b/test/core/util/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd similarity index 100% rename from test/core/uri/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd rename to test/core/util/uri_corpus/b3c0bf66c2bf5d24ef1daf4cc5a9d6d5bd0e8bfd diff --git a/test/core/uri/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 b/test/core/util/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 similarity index 100% rename from test/core/uri/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 rename to test/core/util/uri_corpus/c28a47409cf5d95bb372238d01e73d8b831408e4 diff --git a/test/core/uri/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 b/test/core/util/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 similarity index 100% rename from test/core/uri/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 rename to test/core/util/uri_corpus/c3ef1d41888063a08700c3add1e4465aabcf8807 diff --git a/test/core/uri/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d b/test/core/util/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d similarity index 100% rename from test/core/uri/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d rename to test/core/util/uri_corpus/c550a76af21f9b9cc92a386d5c8998b26f8f2e4d diff --git a/test/core/uri/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 b/test/core/util/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 similarity index 100% rename from test/core/uri/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 rename to test/core/util/uri_corpus/c79721406d0ab80495f186fd88e37fba98637ae9 diff --git a/test/core/uri/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 b/test/core/util/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 similarity index 100% rename from test/core/uri/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 rename to test/core/util/uri_corpus/ceb4e2264ba7a8d5be47d276b37ec09489e00245 diff --git a/test/core/uri/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c b/test/core/util/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c similarity index 100% rename from test/core/uri/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c rename to test/core/util/uri_corpus/cf4395958f5bfb46fd6f535a39657d016c75114c diff --git a/test/core/uri/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca b/test/core/util/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca similarity index 100% rename from test/core/uri/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca rename to test/core/util/uri_corpus/d46668372b7e20154a89409a7430a28e642afdca diff --git a/test/core/uri/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a b/test/core/util/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a similarity index 100% rename from test/core/uri/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a rename to test/core/util/uri_corpus/d6fe7412a0a1d1c733160246f3fa425f4f97682a diff --git a/test/core/uri/uri_corpus/dns.txt b/test/core/util/uri_corpus/dns.txt similarity index 100% rename from test/core/uri/uri_corpus/dns.txt rename to test/core/util/uri_corpus/dns.txt diff --git a/test/core/uri/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd b/test/core/util/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd similarity index 100% rename from test/core/uri/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd rename to test/core/util/uri_corpus/e241f29957b0e30ec11aaaf91b2339f7015fa5fd diff --git a/test/core/uri/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 b/test/core/util/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 similarity index 100% rename from test/core/uri/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 rename to test/core/util/uri_corpus/ea02d9fea9bad5b89cf353a0169238f584177e71 diff --git a/test/core/uri/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee b/test/core/util/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee similarity index 100% rename from test/core/uri/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee rename to test/core/util/uri_corpus/ec4731dddf94ed3ea92ae4d5a71f145ab6e3f6ee diff --git a/test/core/uri/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 b/test/core/util/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 similarity index 100% rename from test/core/uri/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 rename to test/core/util/uri_corpus/ed2f78646f19fc47dd85ff0877c232b71913ece2 diff --git a/test/core/uri/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 b/test/core/util/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 similarity index 100% rename from test/core/uri/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 rename to test/core/util/uri_corpus/f6889f4a6350fea1596a3adea5cdac02bd5d1ff3 diff --git a/test/core/uri/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 b/test/core/util/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 similarity index 100% rename from test/core/uri/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 rename to test/core/util/uri_corpus/f6f3bd030f0d321efe7c51ca3f057de23509af67 diff --git a/test/core/uri/uri_corpus/f97598cff03306af3c70400608fec47268b5075d b/test/core/util/uri_corpus/f97598cff03306af3c70400608fec47268b5075d similarity index 100% rename from test/core/uri/uri_corpus/f97598cff03306af3c70400608fec47268b5075d rename to test/core/util/uri_corpus/f97598cff03306af3c70400608fec47268b5075d diff --git a/test/core/uri/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 b/test/core/util/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 similarity index 100% rename from test/core/uri/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 rename to test/core/util/uri_corpus/f9e1ec1fc642b575bc9955618b7065747f56b101 diff --git a/test/core/uri/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 b/test/core/util/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 similarity index 100% rename from test/core/uri/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 rename to test/core/util/uri_corpus/fe0630a3aeed2ec6f474f362e4c839478290d5c4 diff --git a/test/core/uri/uri_corpus/ipv4.txt b/test/core/util/uri_corpus/ipv4.txt similarity index 100% rename from test/core/uri/uri_corpus/ipv4.txt rename to test/core/util/uri_corpus/ipv4.txt diff --git a/test/core/uri/uri_corpus/ipv6.txt b/test/core/util/uri_corpus/ipv6.txt similarity index 100% rename from test/core/uri/uri_corpus/ipv6.txt rename to test/core/util/uri_corpus/ipv6.txt diff --git a/test/core/uri/uri_corpus/unix.txt b/test/core/util/uri_corpus/unix.txt similarity index 100% rename from test/core/uri/uri_corpus/unix.txt rename to test/core/util/uri_corpus/unix.txt diff --git a/test/core/uri/uri_fuzzer_test.cc b/test/core/util/uri_fuzzer_test.cc similarity index 96% rename from test/core/uri/uri_fuzzer_test.cc rename to test/core/util/uri_fuzzer_test.cc index 0220c20b700df..dd4b1c0f86171 100644 --- a/test/core/uri/uri_fuzzer_test.cc +++ b/test/core/util/uri_fuzzer_test.cc @@ -23,7 +23,7 @@ #include #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" bool squelch = true; bool leak_check = true; diff --git a/test/core/uri/uri_parser_test.cc b/test/core/util/uri_test.cc similarity index 99% rename from test/core/uri/uri_parser_test.cc rename to test/core/util/uri_test.cc index adadba6e7796c..965d208ae7c2b 100644 --- a/test/core/uri/uri_parser_test.cc +++ b/test/core/util/uri_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/uri/uri_parser.h" +#include "src/core/util/uri.h" #include diff --git a/test/core/gprpp/uuid_v4_test.cc b/test/core/util/uuid_v4_test.cc similarity index 96% rename from test/core/gprpp/uuid_v4_test.cc rename to test/core/util/uuid_v4_test.cc index e970d54ebceb1..a5a73e2f82620 100644 --- a/test/core/gprpp/uuid_v4_test.cc +++ b/test/core/util/uuid_v4_test.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "src/core/lib/gprpp/uuid_v4.h" +#include "src/core/util/uuid_v4.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/validation_errors_test.cc b/test/core/util/validation_errors_test.cc similarity index 98% rename from test/core/gprpp/validation_errors_test.cc rename to test/core/util/validation_errors_test.cc index cbf5add2febfd..e3222408d2eb7 100644 --- a/test/core/gprpp/validation_errors_test.cc +++ b/test/core/util/validation_errors_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/lib/gprpp/validation_errors.h" +#include "src/core/util/validation_errors.h" #include "gtest/gtest.h" diff --git a/test/core/gprpp/work_serializer_test.cc b/test/core/util/work_serializer_test.cc similarity index 99% rename from test/core/gprpp/work_serializer_test.cc rename to test/core/util/work_serializer_test.cc index 0d92acecba85b..773255725bb36 100644 --- a/test/core/gprpp/work_serializer_test.cc +++ b/test/core/util/work_serializer_test.cc @@ -16,7 +16,7 @@ // // -#include "src/core/lib/gprpp/work_serializer.h" +#include "src/core/util/work_serializer.h" #include @@ -37,12 +37,12 @@ #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/telemetry/histogram_view.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/notification.h" +#include "src/core/util/thd.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/test_util/test_config.h" diff --git a/test/core/xds/certificate_provider_store_test.cc b/test/core/xds/certificate_provider_store_test.cc index 3cbd61460599e..a0b76e521fb16 100644 --- a/test/core/xds/certificate_provider_store_test.cc +++ b/test/core/xds/certificate_provider_store_test.cc @@ -29,7 +29,7 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/unique_type_name.h" +#include "src/core/util/unique_type_name.h" #include "test/core/test_util/test_config.h" namespace grpc_core { diff --git a/test/core/xds/xds_audit_logger_registry_test.cc b/test/core/xds/xds_audit_logger_registry_test.cc index dc79749f98362..1d673ff7302f7 100644 --- a/test/core/xds/xds_audit_logger_registry_test.cc +++ b/test/core/xds/xds_audit_logger_registry_test.cc @@ -36,8 +36,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/security/authorization/audit_logging.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" diff --git a/test/core/xds/xds_bootstrap_test.cc b/test/core/xds/xds_bootstrap_test.cc index 1a30de17492d5..cc77846ae13e8 100644 --- a/test/core/xds/xds_bootstrap_test.cc +++ b/test/core/xds/xds_bootstrap_test.cc @@ -36,16 +36,16 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/security/certificate_provider/certificate_provider_factory.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" +#include "src/core/util/env.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/tmpfile.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/certificate_provider_store.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_server_grpc.h" diff --git a/test/core/xds/xds_certificate_provider_test.cc b/test/core/xds/xds_certificate_provider_test.cc index a005b1d0f6cdc..a81e03421e834 100644 --- a/test/core/xds/xds_certificate_provider_test.cc +++ b/test/core/xds/xds_certificate_provider_test.cc @@ -25,9 +25,9 @@ #include -#include "src/core/lib/gprpp/status_helper.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/security/security_connector/ssl_utils.h" +#include "src/core/util/status_helper.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/tls_utils.h" diff --git a/test/core/xds/xds_client_fuzzer.cc b/test/core/xds/xds_client_fuzzer.cc index 4649329523e15..ef660977c8dae 100644 --- a/test/core/xds/xds_client_fuzzer.cc +++ b/test/core/xds/xds_client_fuzzer.cc @@ -31,8 +31,8 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_cluster_parser.h" @@ -61,13 +61,12 @@ class Fuzzer { // Leave xds_client_ unset, so Act() will be a no-op. return; } - auto transport_factory = MakeOrphanable( + transport_factory_ = MakeRefCounted( []() { Crash("Multiple concurrent reads"); }); - transport_factory->SetAutoCompleteMessagesFromClient(false); - transport_factory->SetAbortOnUndrainedMessages(false); - transport_factory_ = transport_factory.get(); + transport_factory_->SetAutoCompleteMessagesFromClient(false); + transport_factory_->SetAbortOnUndrainedMessages(false); xds_client_ = MakeRefCounted( - std::move(*bootstrap), std::move(transport_factory), + std::move(*bootstrap), transport_factory_, grpc_event_engine::experimental::GetDefaultEventEngine(), /*metrics_reporter=*/nullptr, "foo agent", "foo version"); } @@ -322,7 +321,7 @@ class Fuzzer { } RefCountedPtr xds_client_; - FakeXdsTransportFactory* transport_factory_; + RefCountedPtr transport_factory_; // Maps of currently active watchers for each resource type, keyed by // resource name. diff --git a/test/core/xds/xds_client_test.cc b/test/core/xds/xds_client_test.cc index a970e2173601f..87e3a8a2e11a1 100644 --- a/test/core/xds/xds_client_test.cc +++ b/test/core/xds/xds_client_test.cc @@ -47,14 +47,14 @@ #include #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/util/debug_location.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_args.h" #include "src/core/util/json/json_object_loader.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/match.h" +#include "src/core/util/sync.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_resource_type_impl.h" #include "src/proto/grpc/testing/xds/v3/base.pb.h" @@ -729,14 +729,12 @@ class XdsClientTest : public ::testing::Test { void InitXdsClient( FakeXdsBootstrap::Builder bootstrap_builder = FakeXdsBootstrap::Builder(), Duration resource_request_timeout = Duration::Seconds(15)) { - auto transport_factory = MakeOrphanable( + transport_factory_ = MakeRefCounted( []() { FAIL() << "Multiple concurrent reads"; }); - transport_factory_ = - transport_factory->Ref().TakeAsSubclass(); auto metrics_reporter = std::make_unique(); metrics_reporter_ = metrics_reporter.get(); xds_client_ = MakeRefCounted( - bootstrap_builder.Build(), std::move(transport_factory), + bootstrap_builder.Build(), transport_factory_, grpc_event_engine::experimental::GetDefaultEventEngine(), std::move(metrics_reporter), "foo agent", "foo version", resource_request_timeout * grpc_test_slowdown_factor()); @@ -986,7 +984,7 @@ TEST_F(XdsClientTest, BasicWatch) { /*resource_names=*/{"foo1"}); // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); // Check metric data. EXPECT_TRUE(metrics_reporter_->WaitForMetricsReporterData( ::testing::ElementsAre(::testing::Pair( @@ -1081,7 +1079,7 @@ TEST_F(XdsClientTest, UpdateFromServer) { /*resource_names=*/{"foo1"}); // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, MultipleWatchersForSameResource) { @@ -1185,7 +1183,7 @@ TEST_F(XdsClientTest, MultipleWatchersForSameResource) { ASSERT_FALSE(WaitForRequest(stream.get())); // Now cancel the second watcher. CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, SubscribeToMultipleResources) { @@ -1319,7 +1317,7 @@ TEST_F(XdsClientTest, SubscribeToMultipleResources) { /*error_detail=*/absl::OkStatus(), /*resource_names=*/{"foo2"}); // Now cancel watch for "foo2". CancelFooWatch(watcher2.get(), "foo2"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, UpdateContainsOnlyChangedResource) { @@ -1441,7 +1439,7 @@ TEST_F(XdsClientTest, UpdateContainsOnlyChangedResource) { /*error_detail=*/absl::OkStatus(), /*resource_names=*/{"foo2"}); // Now cancel watch for "foo2". CancelFooWatch(watcher2.get(), "foo2"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceValidationFailure) { @@ -1568,7 +1566,7 @@ TEST_F(XdsClientTest, ResourceValidationFailure) { // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceValidationFailureMultipleResources) { @@ -1767,7 +1765,7 @@ TEST_F(XdsClientTest, ResourceValidationFailureMultipleResources) { CancelFooWatch(watcher2.get(), "foo2", /*delay_unsubscription=*/true); CancelFooWatch(watcher3.get(), "foo3", /*delay_unsubscription=*/true); CancelFooWatch(watcher4.get(), "foo4"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceValidationFailureForCachedResource) { @@ -1882,7 +1880,7 @@ TEST_F(XdsClientTest, ResourceValidationFailureForCachedResource) { // Cancel watches. CancelFooWatch(watcher.get(), "foo1"); CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, WildcardCapableResponseWithEmptyResource) { @@ -1949,7 +1947,7 @@ TEST_F(XdsClientTest, WildcardCapableResponseWithEmptyResource) { /*resource_names=*/{"wc1"}); // Cancel watch. CancelWildcardCapableWatch(watcher.get(), "wc1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } // This tests resource removal triggered by the server when using a @@ -2079,7 +2077,7 @@ TEST_F(XdsClientTest, ResourceDeletion) { // Cancel watch. CancelWildcardCapableWatch(watcher.get(), "wc1"); CancelWildcardCapableWatch(watcher2.get(), "wc1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } // This tests that when we ignore resource deletions from the server @@ -2213,7 +2211,7 @@ TEST_F(XdsClientTest, ResourceDeletionIgnoredWhenConfigured) { // Cancel watch. CancelWildcardCapableWatch(watcher.get(), "wc1"); CancelWildcardCapableWatch(watcher2.get(), "wc1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, StreamClosedByServer) { @@ -2262,7 +2260,7 @@ TEST_F(XdsClientTest, StreamClosedByServer) { // XdsClient should NOT report error to watcher, because we saw a // response on the stream before it failed. // Stream should be orphaned. - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); // Check metric data. EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( kDefaultXdsServerUrl, true))); @@ -2306,7 +2304,7 @@ TEST_F(XdsClientTest, StreamClosedByServer) { // Cancel watcher. CancelFooWatch(watcher.get(), "foo1"); CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { @@ -2390,7 +2388,7 @@ TEST_F(XdsClientTest, StreamClosedByServerWithoutSeeingResponse) { /*resource_names=*/{"foo1"}); // Cancel watcher. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ConnectionFails) { @@ -2486,7 +2484,7 @@ TEST_F(XdsClientTest, ConnectionFails) { // Cancel watches. CancelFooWatch(watcher.get(), "foo1"); CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { @@ -2572,7 +2570,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistUponTimeout) { // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); CancelFooWatch(watcher2.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { @@ -2687,7 +2685,7 @@ TEST_F(XdsClientTest, ResourceDoesNotExistAfterStreamRestart) { /*resource_names=*/{"foo1"}); // Cancel watcher. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { @@ -2765,7 +2763,7 @@ TEST_F(XdsClientTest, DoesNotExistTimerNotStartedUntilSendCompletes) { stream->CompleteSendMessageFromClient(); // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } // In https://github.com/grpc/grpc/issues/29583, we ran into a case @@ -2921,7 +2919,7 @@ TEST_F(XdsClientTest, // Cancel watches. CancelFooWatch(watcher.get(), "foo1", /*delay_unsubscription=*/true); CancelFooWatch(watcher2.get(), "foo2"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { @@ -3041,7 +3039,7 @@ TEST_F(XdsClientTest, DoNotSendDoesNotExistForCachedResource) { /*resource_names=*/{"foo1"}); // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, ResourceWrappedInResourceMessage) { @@ -3096,7 +3094,7 @@ TEST_F(XdsClientTest, ResourceWrappedInResourceMessage) { /*resource_names=*/{"foo1"}); // Cancel watch. CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, MultipleResourceTypes) { @@ -3211,7 +3209,7 @@ TEST_F(XdsClientTest, MultipleResourceTypes) { /*error_detail=*/absl::OkStatus(), /*resource_names=*/{}); // Now cancel watch for "bar1". CancelBarWatch(watcher2.get(), "bar1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, Federation) { @@ -3360,10 +3358,10 @@ TEST_F(XdsClientTest, Federation) { /*resource_names=*/{kXdstpResourceName}); // Cancel watch for "foo1". CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); // Now cancel watch for xdstp resource name. CancelFooWatch(watcher2.get(), kXdstpResourceName); - EXPECT_TRUE(stream2->Orphaned()); + EXPECT_TRUE(stream2->IsOrphaned()); } TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { @@ -3486,7 +3484,7 @@ TEST_F(XdsClientTest, FederationAuthorityDefaultsToTopLevelXdsServer) { /*resource_names=*/{kXdstpResourceName}); // Now cancel watch for xdstp resource name. CancelFooWatch(watcher2.get(), kXdstpResourceName); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, FederationWithUnknownAuthority) { @@ -3506,7 +3504,7 @@ TEST_F(XdsClientTest, FederationWithUnknownAuthority) { << *error; } -TEST_F(XdsClientTest, FederationWithUnparseableXdstpResourceName) { +TEST_F(XdsClientTest, FederationWithUnparsableXdstpResourceName) { // Note: Not adding authority to bootstrap config. InitXdsClient(); // Start a watch for the xdstp resource name. @@ -3566,7 +3564,7 @@ TEST_F(XdsClientTest, FederationDisabledWithNewStyleName) { /*resource_names=*/{kXdstpResourceName}); // Cancel watch. CancelFooWatch(watcher.get(), kXdstpResourceName); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { @@ -3719,10 +3717,10 @@ TEST_F(XdsClientTest, FederationChannelFailureReportedToWatchers) { ::testing::Pair(authority_server.server_uri(), 1)))); // Cancel watch for "foo1". CancelFooWatch(watcher.get(), "foo1"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); // Now cancel watch for xdstp resource name. CancelFooWatch(watcher2.get(), kXdstpResourceName); - EXPECT_TRUE(stream2->Orphaned()); + EXPECT_TRUE(stream2->IsOrphaned()); } TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { @@ -3808,7 +3806,7 @@ TEST_F(XdsClientTest, AdsReadWaitsForHandleRelease) { /*error_detail=*/absl::OkStatus(), /*resource_names=*/{"foo2"}); CancelFooWatch(watcher2.get(), "foo2"); - EXPECT_TRUE(stream->Orphaned()); + EXPECT_TRUE(stream->IsOrphaned()); } TEST_F(XdsClientTest, FallbackAndRecover) { @@ -4017,7 +4015,7 @@ TEST_F(XdsClientTest, FallbackAndRecover) { EXPECT_THAT(GetServerConnections(), ::testing::ElementsAre(::testing::Pair( kDefaultXdsServerUrl, true))); // Result (remote): The stream to the fallback server has been orphaned. - EXPECT_TRUE(stream2->Orphaned()); + EXPECT_TRUE(stream2->IsOrphaned()); // Result (local): Resources are delivered to watchers. resource = watcher->WaitForNextResource(); ASSERT_NE(resource, nullptr); @@ -4038,7 +4036,7 @@ TEST_F(XdsClientTest, FallbackAndRecover) { 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()); + EXPECT_TRUE(stream->IsOrphaned()); } // Test for both servers being unavailable @@ -4165,7 +4163,7 @@ TEST_F(XdsClientTest, FallbackOnStartup) { .set_nonce("D") .AddFooResource(XdsFooResource("foo1", 42)) .Serialize()); - EXPECT_TRUE(fallback_stream->Orphaned()); + EXPECT_TRUE(fallback_stream->IsOrphaned()); resource = watcher->WaitForNextResource(); ASSERT_NE(resource, nullptr); EXPECT_EQ(resource->name, "foo1"); diff --git a/test/core/xds/xds_cluster_resource_type_test.cc b/test/core/xds/xds_cluster_resource_type_test.cc index 23ce91782d39b..fed2848dc651f 100644 --- a/test/core/xds/xds_cluster_resource_type_test.cc +++ b/test/core/xds/xds_cluster_resource_type_test.cc @@ -36,13 +36,13 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" #include "src/core/load_balancing/outlier_detection/outlier_detection.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_cluster.h" #include "src/core/xds/grpc/xds_cluster_parser.h" @@ -136,7 +136,7 @@ TEST_F(XdsClusterTest, Definition) { EXPECT_TRUE(resource_type->AllResourcesRequiredInSotW()); } -TEST_F(XdsClusterTest, UnparseableProto) { +TEST_F(XdsClusterTest, UnparsableProto) { std::string serialized_resource("\0", 1); auto* resource_type = XdsClusterResourceType::Get(); auto decode_result = @@ -170,7 +170,7 @@ TEST_F(XdsClusterTest, MinimumValidConfig) { EXPECT_EQ(JsonDump(Json::FromArray(resource.lb_policy_config)), "[{\"xds_wrr_locality_experimental\":{\"childPolicy\":" "[{\"round_robin\":{}}]}}]"); - EXPECT_FALSE(resource.lrs_load_reporting_server.has_value()); + EXPECT_EQ(resource.lrs_load_reporting_server, nullptr); EXPECT_EQ(resource.max_concurrent_requests, 1024); EXPECT_FALSE(resource.outlier_detection.has_value()); } @@ -586,7 +586,7 @@ TEST_F(ClusterTypeTest, AggregateClusterValid) { ::testing::ElementsAre("bar", "baz", "quux")); } -TEST_F(ClusterTypeTest, AggregateClusterUnparseableProto) { +TEST_F(ClusterTypeTest, AggregateClusterUnparsableProto) { Cluster cluster; cluster.set_name("foo"); cluster.mutable_cluster_type()->set_name("envoy.clusters.aggregate"); @@ -1031,7 +1031,7 @@ TEST_F(TlsConfigTest, UnknownTransportSocketType) { << decode_result.resource.status(); } -TEST_F(TlsConfigTest, UnparseableUpstreamTlsContext) { +TEST_F(TlsConfigTest, UnparsableUpstreamTlsContext) { Cluster cluster; cluster.set_name("foo"); cluster.set_type(cluster.EDS); @@ -1134,7 +1134,7 @@ TEST_F(LrsTest, Valid) { EXPECT_EQ(*decode_result.name, "foo"); auto& resource = static_cast(**decode_result.resource); - ASSERT_TRUE(resource.lrs_load_reporting_server.has_value()); + ASSERT_NE(resource.lrs_load_reporting_server, nullptr); EXPECT_EQ(*resource.lrs_load_reporting_server, *xds_client_->bootstrap().servers().front()); } @@ -1275,7 +1275,7 @@ TEST_F(UpstreamConfigTest, UnknownUpstreamConfigType) { << decode_result.resource.status(); } -TEST_F(UpstreamConfigTest, UnparseableHttpProtocolOptions) { +TEST_F(UpstreamConfigTest, UnparsableHttpProtocolOptions) { Cluster cluster; cluster.set_name("foo"); cluster.set_type(cluster.EDS); diff --git a/test/core/xds/xds_common_types_test.cc b/test/core/xds/xds_common_types_test.cc index d940015cc8fdb..45ac7574b7527 100644 --- a/test/core/xds/xds_common_types_test.cc +++ b/test/core/xds/xds_common_types_test.cc @@ -39,13 +39,13 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/validation_errors.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/matchers.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/util/upb_utils.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_common_types_parser.h" #include "src/core/xds/xds_client/xds_bootstrap.h" diff --git a/test/core/xds/xds_endpoint_resource_type_test.cc b/test/core/xds/xds_endpoint_resource_type_test.cc index bd365c63836de..8e9da777bc25c 100644 --- a/test/core/xds/xds_endpoint_resource_type_test.cc +++ b/test/core/xds/xds_endpoint_resource_type_test.cc @@ -38,18 +38,18 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/resolver/endpoint_addresses.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_endpoint.h" #include "src/core/xds/grpc/xds_endpoint_parser.h" #include "src/core/xds/grpc/xds_health_status.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_client.h" -#include "src/core/xds/xds_client/xds_client_stats.h" +#include "src/core/xds/xds_client/xds_locality.h" #include "src/core/xds/xds_client/xds_resource_type.h" #include "src/proto/grpc/testing/xds/v3/address.pb.h" #include "src/proto/grpc/testing/xds/v3/base.pb.h" @@ -111,7 +111,7 @@ TEST_F(XdsEndpointTest, Definition) { EXPECT_FALSE(resource_type->AllResourcesRequiredInSotW()); } -TEST_F(XdsEndpointTest, UnparseableProto) { +TEST_F(XdsEndpointTest, UnparsableProto) { std::string serialized_resource("\0", 1); auto* resource_type = XdsEndpointResourceType::Get(); auto decode_result = diff --git a/test/core/xds/xds_http_filters_test.cc b/test/core/xds/xds_http_filters_test.cc index f1811d7c6add7..c5a76d01ee2c0 100644 --- a/test/core/xds/xds_http_filters_test.cc +++ b/test/core/xds/xds_http_filters_test.cc @@ -44,10 +44,10 @@ #include "src/core/ext/filters/rbac/rbac_service_config_parser.h" #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_http_filter.h" #include "src/core/xds/grpc/xds_http_filter_registry.h" @@ -238,7 +238,7 @@ TEST_F(XdsRouterFilterTest, GenerateFilterConfigTypedStruct) { << status; } -TEST_F(XdsRouterFilterTest, GenerateFilterConfigUnparseable) { +TEST_F(XdsRouterFilterTest, GenerateFilterConfigUnparsable) { XdsExtension extension = MakeXdsExtension(Router()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -469,7 +469,7 @@ TEST_P(XdsFaultInjectionFilterConfigTest, TypedStruct) { << status; } -TEST_P(XdsFaultInjectionFilterConfigTest, Unparseable) { +TEST_P(XdsFaultInjectionFilterConfigTest, Unparsable) { XdsExtension extension = MakeXdsExtension(HTTPFault()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -544,7 +544,7 @@ TEST_F(XdsRbacFilterTest, GenerateFilterConfigTypedStruct) { << status; } -TEST_F(XdsRbacFilterTest, GenerateFilterConfigUnparseable) { +TEST_F(XdsRbacFilterTest, GenerateFilterConfigUnparsable) { XdsExtension extension = MakeXdsExtension(RBAC()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -587,7 +587,7 @@ TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideTypedStruct) { << status; } -TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideUnparseable) { +TEST_F(XdsRbacFilterTest, GenerateFilterConfigOverrideUnparsable) { XdsExtension extension = MakeXdsExtension(RBACPerRoute()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -1219,7 +1219,7 @@ TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigTypedStruct) { << status; } -TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigUnparseable) { +TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigUnparsable) { XdsExtension extension = MakeXdsExtension(StatefulSession()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -1254,7 +1254,7 @@ TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideTypedStruct) { << status; } -TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideUnparseable) { +TEST_F(XdsStatefulSessionFilterTest, GenerateFilterConfigOverrideUnparsable) { XdsExtension extension = MakeXdsExtension(StatefulSessionPerRoute()); std::string serialized_resource("\0", 1); extension.value = absl::string_view(serialized_resource); @@ -1457,7 +1457,7 @@ TEST_P(XdsStatefulSessionFilterConfigTest, TypedStructSessionState) { << status; } -TEST_P(XdsStatefulSessionFilterConfigTest, UnparseableSessionState) { +TEST_P(XdsStatefulSessionFilterConfigTest, UnparsableSessionState) { StatefulSession stateful_session; stateful_session.mutable_session_state()->mutable_typed_config()->PackFrom( CookieBasedSessionState()); diff --git a/test/core/xds/xds_lb_policy_registry_test.cc b/test/core/xds/xds_lb_policy_registry_test.cc index c1e0e0fdda392..34f516e84ef95 100644 --- a/test/core/xds/xds_lb_policy_registry_test.cc +++ b/test/core/xds/xds_lb_policy_registry_test.cc @@ -35,13 +35,13 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/validation_errors.h" #include "src/core/load_balancing/lb_policy.h" #include "src/core/load_balancing/lb_policy_factory.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/validation_errors.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/proto/grpc/testing/xds/v3/client_side_weighted_round_robin.pb.h" #include "src/proto/grpc/testing/xds/v3/cluster.pb.h" diff --git a/test/core/xds/xds_listener_resource_type_test.cc b/test/core/xds/xds_listener_resource_type_test.cc index 39419318b7410..0f3f815faf9b7 100644 --- a/test/core/xds/xds_listener_resource_type_test.cc +++ b/test/core/xds/xds_listener_resource_type_test.cc @@ -40,12 +40,12 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_common_types.h" #include "src/core/xds/grpc/xds_listener.h" @@ -134,7 +134,7 @@ TEST_F(XdsListenerTest, Definition) { EXPECT_TRUE(resource_type->AllResourcesRequiredInSotW()); } -TEST_F(XdsListenerTest, UnparseableProto) { +TEST_F(XdsListenerTest, UnparsableProto) { std::string serialized_resource("\0", 1); auto* resource_type = XdsListenerResourceType::Get(); auto decode_result = @@ -911,7 +911,7 @@ TEST_F(ApiListenerTest, DoesNotContainHttpConnectionManager) { << decode_result.resource.status(); } -TEST_F(ApiListenerTest, UnparseableHttpConnectionManagerConfig) { +TEST_F(ApiListenerTest, UnparsableHttpConnectionManagerConfig) { Listener listener; listener.set_name("foo"); auto* any = listener.mutable_api_listener()->mutable_api_listener(); @@ -1753,7 +1753,7 @@ TEST_F(TcpListenerTest, UnknownTransportSocketType) { << decode_result.resource.status(); } -TEST_F(TcpListenerTest, UnparseableDownstreamTlsContext) { +TEST_F(TcpListenerTest, UnparsableDownstreamTlsContext) { Listener listener; listener.set_name("foo"); HttpConnectionManager hcm; diff --git a/test/core/xds/xds_metadata_test.cc b/test/core/xds/xds_metadata_test.cc index ad489b45464f2..76769ea1b70bb 100644 --- a/test/core/xds/xds_metadata_test.cc +++ b/test/core/xds/xds_metadata_test.cc @@ -29,10 +29,10 @@ #include "gtest/gtest.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_metadata_parser.h" #include "src/core/xds/xds_client/xds_bootstrap.h" diff --git a/test/core/xds/xds_route_config_resource_type_test.cc b/test/core/xds/xds_route_config_resource_type_test.cc index de1bb3e245f07..61311226c5225 100644 --- a/test/core/xds/xds_route_config_resource_type_test.cc +++ b/test/core/xds/xds_route_config_resource_type_test.cc @@ -45,12 +45,12 @@ #include "src/core/lib/channel/status_util.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/error.h" -#include "src/core/lib/matchers/matchers.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json_writer.h" +#include "src/core/util/matchers.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/core/xds/grpc/xds_bootstrap_grpc.h" #include "src/core/xds/grpc/xds_route_config.h" #include "src/core/xds/grpc/xds_route_config_parser.h" @@ -125,7 +125,7 @@ TEST_F(XdsRouteConfigTest, Definition) { EXPECT_FALSE(resource_type->AllResourcesRequiredInSotW()); } -TEST_F(XdsRouteConfigTest, UnparseableProto) { +TEST_F(XdsRouteConfigTest, UnparsableProto) { std::string serialized_resource("\0", 1); auto* resource_type = XdsRouteConfigResourceType::Get(); auto decode_result = @@ -561,7 +561,7 @@ TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperInTypedStruct) { << decode_result.resource.status(); } -TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperUnparseable) { +TEST_P(TypedPerFilterConfigTest, FilterConfigWrapperUnparsable) { auto* typed_per_filter_config_proto = GetTypedPerFilterConfigProto(&route_config_); auto& any = (*typed_per_filter_config_proto)["fault"]; @@ -2200,7 +2200,7 @@ TEST_F(RlsTest, InvalidGrpcLbPolicyConfig) { "errors validating RouteConfiguration resource: [" "field:cluster_specifier_plugins[0].extension.typed_config " "error:ClusterSpecifierPlugin returned invalid LB policy config: " - "errors validing RLS LB policy config: [" + "errors validating RLS LB policy config: [" "field:routeLookupConfig.lookupService error:field not present]]") << decode_result.resource.status(); } @@ -2237,7 +2237,7 @@ TEST_F(RlsTest, RlsInTypedStruct) { << decode_result.resource.status(); } -TEST_F(RlsTest, RlsConfigUnparseable) { +TEST_F(RlsTest, RlsConfigUnparsable) { ScopedExperimentalEnvVar env_var("GRPC_EXPERIMENTAL_XDS_RLS_LB"); RouteConfiguration route_config; route_config.set_name("foo"); diff --git a/test/core/xds/xds_transport_fake.cc b/test/core/xds/xds_transport_fake.cc index bd6c21730fcf6..8c0fc5f5ea3b2 100644 --- a/test/core/xds/xds_transport_fake.cc +++ b/test/core/xds/xds_transport_fake.cc @@ -30,9 +30,9 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "test/core/test_util/test_config.h" @@ -187,7 +187,7 @@ void FakeXdsTransportFactory::FakeStreamingCall::MaybeSendStatusToClient( event_handler->OnStatusReceived(std::move(status)); } -bool FakeXdsTransportFactory::FakeStreamingCall::Orphaned() { +bool FakeXdsTransportFactory::FakeStreamingCall::IsOrphaned() { MutexLock lock(&mu_); return orphaned_; } @@ -198,18 +198,18 @@ bool FakeXdsTransportFactory::FakeStreamingCall::Orphaned() { void FakeXdsTransportFactory::FakeXdsTransport::TriggerConnectionFailure( absl::Status status) { - RefCountedPtr on_connectivity_failure; + std::set> watchers; { MutexLock lock(&mu_); - on_connectivity_failure = on_connectivity_failure_; + watchers = watchers_; } ExecCtx exec_ctx; - if (on_connectivity_failure != nullptr) { - on_connectivity_failure->Run(std::move(status)); + for (const auto& watcher : watchers) { + watcher->OnConnectivityFailure(status); } } -void FakeXdsTransportFactory::FakeXdsTransport::Orphan() { +void FakeXdsTransportFactory::FakeXdsTransport::Orphaned() { { MutexLock lock(&factory_->mu_); auto it = factory_->transport_map_.find(server_.Key()); @@ -220,16 +220,14 @@ void FakeXdsTransportFactory::FakeXdsTransport::Orphan() { factory_.reset(); { MutexLock lock(&mu_); - // Can't destroy on_connectivity_failure_ synchronously, since that - // operation will trigger code in XdsClient that acquires its mutex, but - // it was already holding its mutex when it called us, so it would deadlock. - GetDefaultEventEngine()->Run([on_connectivity_failure = std::move( - on_connectivity_failure_)]() mutable { + // Can't destroy watchers synchronously, since that operation will trigger + // code in XdsClient that acquires its mutex, but it was already holding + // its mutex when it called us, so it would deadlock. + GetDefaultEventEngine()->Run([watchers = std::move(watchers_)]() mutable { ExecCtx exec_ctx; - on_connectivity_failure.reset(); + watchers.clear(); }); } - Unref(); } RefCountedPtr @@ -255,12 +253,24 @@ void FakeXdsTransportFactory::FakeXdsTransport::RemoveStream( } } +void FakeXdsTransportFactory::FakeXdsTransport::StartConnectivityFailureWatch( + RefCountedPtr watcher) { + MutexLock lock(&mu_); + watchers_.insert(std::move(watcher)); +} + +void FakeXdsTransportFactory::FakeXdsTransport::StopConnectivityFailureWatch( + const RefCountedPtr& watcher) { + MutexLock lock(&mu_); + watchers_.erase(watcher); +} + OrphanablePtr FakeXdsTransportFactory::FakeXdsTransport::CreateStreamingCall( const char* method, std::unique_ptr event_handler) { auto call = MakeOrphanable( - RefAsSubclass(), method, std::move(event_handler)); + WeakRefAsSubclass(), method, std::move(event_handler)); MutexLock lock(&mu_); active_calls_[method] = call->Ref().TakeAsSubclass(); cv_.Signal(); @@ -274,19 +284,18 @@ FakeXdsTransportFactory::FakeXdsTransport::CreateStreamingCall( constexpr char FakeXdsTransportFactory::kAdsMethod[]; constexpr char FakeXdsTransportFactory::kLrsMethod[]; -OrphanablePtr -FakeXdsTransportFactory::Create( - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* /*status*/) { +RefCountedPtr +FakeXdsTransportFactory::GetTransport(const XdsBootstrap::XdsServer& server, + absl::Status* /*status*/) { + std::string key = server.Key(); MutexLock lock(&mu_); - auto& entry = transport_map_[server.Key()]; - CHECK(entry == nullptr); - auto transport = MakeOrphanable( - RefAsSubclass(), server, - std::move(on_connectivity_failure), auto_complete_messages_from_client_, - abort_on_undrained_messages_); - entry = transport->Ref().TakeAsSubclass(); + auto transport = GetTransportLocked(key); + if (transport == nullptr) { + transport = MakeRefCounted( + WeakRefAsSubclass(), server, + auto_complete_messages_from_client_, abort_on_undrained_messages_); + transport_map_.emplace(std::move(key), transport.get()); + } return transport; } @@ -318,8 +327,16 @@ FakeXdsTransportFactory::WaitForStream(const XdsBootstrap::XdsServer& server, RefCountedPtr FakeXdsTransportFactory::GetTransport(const XdsBootstrap::XdsServer& server) { + std::string key = server.Key(); MutexLock lock(&mu_); - return transport_map_[server.Key()]; + return GetTransportLocked(key); +} + +RefCountedPtr +FakeXdsTransportFactory::GetTransportLocked(const std::string& key) { + auto it = transport_map_.find(key); + if (it == transport_map_.end()) return nullptr; + return it->second->RefIfNonZero().TakeAsSubclass(); } } // namespace grpc_core diff --git a/test/core/xds/xds_transport_fake.h b/test/core/xds/xds_transport_fake.h index 54c75c92d8642..0eb37e8a489ba 100644 --- a/test/core/xds/xds_transport_fake.h +++ b/test/core/xds/xds_transport_fake.h @@ -34,10 +34,10 @@ #include -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/ref_counted.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/orphanable.h" +#include "src/core/util/ref_counted.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/core/xds/xds_client/xds_bootstrap.h" #include "src/core/xds/xds_client/xds_transport.h" @@ -57,7 +57,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { class FakeStreamingCall : public XdsTransport::StreamingCall { public: FakeStreamingCall( - RefCountedPtr transport, const char* method, + WeakRefCountedPtr transport, const char* method, std::unique_ptr event_handler) : transport_(std::move(transport)), method_(method), @@ -68,6 +68,8 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void Orphan() override; + bool IsOrphaned(); + void StartRecvMessage() override; using StreamingCall::Ref; // Make it public. @@ -86,8 +88,6 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void SendMessageToClient(absl::string_view payload); void MaybeSendStatusToClient(absl::Status status); - bool Orphaned(); - bool WaitForReadsStarted(size_t expected, absl::Duration timeout) { MutexLock lock(&mu_); const absl::Time deadline = absl::Now() + timeout; @@ -124,7 +124,7 @@ class FakeXdsTransportFactory : public XdsTransportFactory { ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); void MaybeDeliverMessageToClient(); - RefCountedPtr transport_; + WeakRefCountedPtr transport_; const char* method_; Mutex mu_; @@ -144,8 +144,6 @@ class FakeXdsTransportFactory : public XdsTransportFactory { : too_many_pending_reads_callback_( std::move(too_many_pending_reads_callback)) {} - using XdsTransportFactory::Ref; // Make it public. - void TriggerConnectionFailure(const XdsBootstrap::XdsServer& server, absl::Status status); @@ -174,26 +172,22 @@ class FakeXdsTransportFactory : public XdsTransportFactory { const XdsBootstrap::XdsServer& server, const char* method, absl::Duration timeout); - void Orphan() override { Unref(); } + void Orphaned() override {} private: class FakeXdsTransport : public XdsTransport { public: - FakeXdsTransport(RefCountedPtr factory, + FakeXdsTransport(WeakRefCountedPtr factory, const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, bool auto_complete_messages_from_client, bool abort_on_undrained_messages) : factory_(std::move(factory)), server_(server), auto_complete_messages_from_client_( auto_complete_messages_from_client), - abort_on_undrained_messages_(abort_on_undrained_messages), - on_connectivity_failure_( - MakeRefCounted( - std::move(on_connectivity_failure))) {} + abort_on_undrained_messages_(abort_on_undrained_messages) {} - void Orphan() override; + void Orphaned() override; bool auto_complete_messages_from_client() const { return auto_complete_messages_from_client_; @@ -203,8 +197,6 @@ class FakeXdsTransportFactory : public XdsTransportFactory { return abort_on_undrained_messages_; } - using XdsTransport::Ref; // Make it public. - void TriggerConnectionFailure(absl::Status status); RefCountedPtr WaitForStream(const char* method, @@ -217,20 +209,10 @@ class FakeXdsTransportFactory : public XdsTransportFactory { const XdsBootstrap::XdsServer* server() const { return &server_; } private: - class RefCountedOnConnectivityFailure - : public RefCounted { - public: - explicit RefCountedOnConnectivityFailure( - std::function on_connectivity_failure) - : on_connectivity_failure_(std::move(on_connectivity_failure)) {} - - void Run(absl::Status status) { - on_connectivity_failure_(std::move(status)); - } - - private: - std::function on_connectivity_failure_; - }; + void StartConnectivityFailureWatch( + RefCountedPtr watcher) override; + void StopConnectivityFailureWatch( + const RefCountedPtr& watcher) override; OrphanablePtr CreateStreamingCall( const char* method, @@ -238,30 +220,33 @@ class FakeXdsTransportFactory : public XdsTransportFactory { void ResetBackoff() override {} - RefCountedPtr factory_; + WeakRefCountedPtr factory_; const XdsBootstrap::XdsServer& server_; const bool auto_complete_messages_from_client_; const bool abort_on_undrained_messages_; Mutex mu_; CondVar cv_; - RefCountedPtr on_connectivity_failure_ + std::set> watchers_ ABSL_GUARDED_BY(&mu_); std::map> active_calls_ ABSL_GUARDED_BY(&mu_); }; - OrphanablePtr Create( - const XdsBootstrap::XdsServer& server, - std::function on_connectivity_failure, - absl::Status* status) override; + // Returns an existing transport or creates a new one. + RefCountedPtr GetTransport( + const XdsBootstrap::XdsServer& server, absl::Status* /*status*/) override; + // Returns an existing transport, if any, or nullptr. RefCountedPtr GetTransport( const XdsBootstrap::XdsServer& server); + RefCountedPtr GetTransportLocked(const std::string& key) + ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu_); + Mutex mu_; - std::map> - transport_map_ ABSL_GUARDED_BY(&mu_); + std::map transport_map_ + ABSL_GUARDED_BY(&mu_); bool auto_complete_messages_from_client_ ABSL_GUARDED_BY(&mu_) = true; bool abort_on_undrained_messages_ ABSL_GUARDED_BY(&mu_) = true; std::function too_many_pending_reads_callback_; diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc index 10b0c80e06681..866fe098f9423 100644 --- a/test/cpp/client/credentials_test.cc +++ b/test/cpp/client/credentials_test.cc @@ -31,7 +31,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/cpp/client/secure_credentials.h" #include "test/cpp/util/tls_test_utils.h" diff --git a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc index 9331d2042c68f..c27772624753a 100644 --- a/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc +++ b/test/cpp/client/destroy_grpclb_channel_with_active_connect_stress_test.cc @@ -38,14 +38,14 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/crash.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/cocoapods/generic/generic.mm b/test/cpp/cocoapods/generic/generic.mm index 138bbe6604cae..5f38c2070fd88 100644 --- a/test/cpp/cocoapods/generic/generic.mm +++ b/test/cpp/cocoapods/generic/generic.mm @@ -32,7 +32,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/common/alarm_test.cc b/test/cpp/common/alarm_test.cc index c9ec2bb6508d2..63eb170dfc1c4 100644 --- a/test/cpp/common/alarm_test.cc +++ b/test/cpp/common/alarm_test.cc @@ -26,7 +26,7 @@ #include #include -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" namespace grpc { diff --git a/test/cpp/common/alts_util_test.cc b/test/cpp/common/alts_util_test.cc index b48ac400f5514..5fe52338ff4f3 100644 --- a/test/cpp/common/alts_util_test.cc +++ b/test/cpp/common/alts_util_test.cc @@ -85,8 +85,8 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) { std::string expected_rp("record protocol"); std::string expected_peer("peer"); std::string expected_local("local"); - std::string expected_peer_atrributes_key("peer"); - std::string expected_peer_atrributes_value("attributes"); + std::string expected_peer_attributes_key("peer"); + std::string expected_peer_attributes_value("attributes"); grpc_security_level expected_sl = GRPC_INTEGRITY_ONLY; upb::Arena context_arena; grpc_gcp_AltsContext* context = grpc_gcp_AltsContext_new(context_arena.ptr()); @@ -105,10 +105,10 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) { expected_local.length())); grpc_gcp_AltsContext_peer_attributes_set( context, - upb_StringView_FromDataAndSize(expected_peer_atrributes_key.data(), - expected_peer_atrributes_key.length()), - upb_StringView_FromDataAndSize(expected_peer_atrributes_value.data(), - expected_peer_atrributes_value.length()), + upb_StringView_FromDataAndSize(expected_peer_attributes_key.data(), + expected_peer_attributes_key.length()), + upb_StringView_FromDataAndSize(expected_peer_attributes_value.data(), + expected_peer_attributes_value.length()), context_arena.ptr()); size_t serialized_ctx_length; char* serialized_ctx = grpc_gcp_AltsContext_serialize( @@ -131,8 +131,8 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) { EXPECT_EQ(0, rpc_protocol_versions.max_rpc_version.minor_version); EXPECT_EQ(0, rpc_protocol_versions.min_rpc_version.major_version); EXPECT_EQ(0, rpc_protocol_versions.min_rpc_version.minor_version); - EXPECT_EQ(expected_peer_atrributes_value, - alts_context->peer_attributes().at(expected_peer_atrributes_key)); + EXPECT_EQ(expected_peer_attributes_value, + alts_context->peer_attributes().at(expected_peer_attributes_key)); } TEST(AltsUtilTest, AuthContextWithGoodAltsContext) { diff --git a/test/cpp/common/time_jump_test.cc b/test/cpp/common/time_jump_test.cc index ef7adb4ad027d..e1593a59daa72 100644 --- a/test/cpp/common/time_jump_test.cc +++ b/test/cpp/common/time_jump_test.cc @@ -31,13 +31,13 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" #include "test/core/test_util/test_config.h" extern char** environ; diff --git a/test/cpp/common/timer_test.cc b/test/cpp/common/timer_test.cc index 3cc129cefb231..e3f2a31c1dd44 100644 --- a/test/cpp/common/timer_test.cc +++ b/test/cpp/common/timer_test.cc @@ -25,12 +25,12 @@ #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/timer_manager.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" #ifdef GRPC_POSIX_SOCKET_EV diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 4a424354c3918..011c52d7ca630 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -373,7 +373,7 @@ grpc_cc_test( name = "end2end_test", size = "large", flaky = True, # TODO(b/151704375) - shard_count = 10, + shard_count = 30, tags = [ "cpp_end2end_test", "no_test_ios", diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index b4f7657ecfc0e..0f59bcab89286 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -39,9 +39,9 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/cfstream_test.cc b/test/cpp/end2end/cfstream_test.cc index 907622e0b62e0..c0139db761fe2 100644 --- a/test/cpp/end2end/cfstream_test.cc +++ b/test/cpp/end2end/cfstream_test.cc @@ -39,10 +39,10 @@ #include #include -#include "src/core/lib/backoff/backoff.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc index 98a6fff443685..708b4ff53f9c4 100644 --- a/test/cpp/end2end/channelz_service_test.cc +++ b/test/cpp/end2end/channelz_service_test.cc @@ -36,10 +36,10 @@ #include #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/security_connector/ssl_utils.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/util/env.h" #include "src/cpp/client/secure_credentials.h" #include "src/proto/grpc/channelz/channelz.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 88ce497a59084..fefcc81a97696 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -39,8 +39,8 @@ #include #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/client_crash_test.cc b/test/cpp/end2end/client_crash_test.cc index fbd98164931fd..39e857562c884 100644 --- a/test/cpp/end2end/client_crash_test.cc +++ b/test/cpp/end2end/client_crash_test.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/client_crash_test_server.cc b/test/cpp/end2end/client_crash_test_server.cc index 441e8e3dbcb1a..6d166740ee20e 100644 --- a/test/cpp/end2end/client_crash_test_server.cc +++ b/test/cpp/end2end/client_crash_test_server.cc @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/end2end/client_fork_test.cc b/test/cpp/end2end/client_fork_test.cc index 2388e558528c3..c93ff755e836a 100644 --- a/test/cpp/end2end/client_fork_test.cc +++ b/test/cpp/end2end/client_fork_test.cc @@ -36,7 +36,7 @@ int main(int /* argc */, char** /* argv */) { return 0; } #include #include -#include "src/core/lib/gprpp/fork.h" +#include "src/core/util/fork.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index ab21e760b4c41..0b7349ceb26a2 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -54,15 +54,8 @@ #include "src/core/client_channel/global_subchannel_pool.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/transport/connectivity_state.h" @@ -71,6 +64,13 @@ #include "src/core/server/server.h" #include "src/core/service_config/service_config.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" +#include "src/core/util/notification.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/time.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" @@ -3277,7 +3277,7 @@ TEST_F(WeightedRoundRobinTest, CallAndServerMetric) { // all of its subchannels every time it saw an update, thus causing the // WRR policy to re-enter the blackout period for that address. TEST_F(WeightedRoundRobinTest, WithOutlierDetection) { - const int kBlackoutPeriodSeconds = 5; + const int kBlackoutPeriodSeconds = 10; const int kNumServers = 3; StartServers(kNumServers); // Report server metrics that should give 6:4:3 WRR picks. diff --git a/test/cpp/end2end/connection_attempt_injector.cc b/test/cpp/end2end/connection_attempt_injector.cc index ab285203d8b75..a7b64bfcea370 100644 --- a/test/cpp/end2end/connection_attempt_injector.cc +++ b/test/cpp/end2end/connection_attempt_injector.cc @@ -23,8 +23,8 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/sync.h" // defined in tcp_client.cc extern grpc_tcp_client_vtable* grpc_tcp_client_impl; diff --git a/test/cpp/end2end/connection_attempt_injector.h b/test/cpp/end2end/connection_attempt_injector.h index bc56f85284bea..4eb35d6850e2d 100644 --- a/test/cpp/end2end/connection_attempt_injector.h +++ b/test/cpp/end2end/connection_attempt_injector.h @@ -18,8 +18,8 @@ #include #include "src/core/lib/event_engine/channel_args_endpoint_config.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/util/time.h" namespace grpc { namespace testing { diff --git a/test/cpp/end2end/counted_service.h b/test/cpp/end2end/counted_service.h index 4d875acc65de3..2f07675eb59bc 100644 --- a/test/cpp/end2end/counted_service.h +++ b/test/cpp/end2end/counted_service.h @@ -17,7 +17,7 @@ #ifndef GRPC_TEST_CPP_END2END_COUNTED_SERVICE_H #define GRPC_TEST_CPP_END2END_COUNTED_SERVICE_H -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" namespace grpc { namespace testing { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 543be34226f3e..1bf4344444297 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -44,10 +44,10 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/flaky_network_test.cc b/test/cpp/end2end/flaky_network_test.cc index add00a63ccae4..3df6f1e080fe1 100644 --- a/test/cpp/end2end/flaky_network_test.cc +++ b/test/cpp/end2end/flaky_network_test.cc @@ -41,9 +41,9 @@ #include #include -#include "src/core/lib/backoff/backoff.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index a640d8b499a67..34eeb7b520245 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -48,11 +48,6 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/load_balancing/grpclb/grpclb.h" @@ -60,6 +55,11 @@ #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/env.h" +#include "src/core/util/ref_counted_ptr.h" +#include "src/core/util/sync.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" @@ -952,12 +952,19 @@ TEST_F(GrpclbEnd2endTest, UsePickFirstChildPolicy) { "}"); SendBalancerResponse(BuildResponseForBackends(GetBackendPorts(), {})); CheckRpcSendOk(kNumRpcs, 3000 /* timeout_ms */, true /* wait_for_ready */); - // Check that all requests went to the first backend. This verifies - // that we used pick_first instead of round_robin as the child policy. - EXPECT_EQ(backends_[0]->service().request_count(), kNumRpcs); - for (size_t i = 1; i < backends_.size(); ++i) { - EXPECT_EQ(backends_[i]->service().request_count(), 0UL); + // Check that all requests went to one backend. This verifies that we + // used pick_first instead of round_robin as the child policy. + bool found = false; + for (size_t i = 0; i < backends_.size(); ++i) { + if (backends_[i]->service().request_count() > 0) { + LOG(INFO) << "backend " << i << " saw traffic"; + EXPECT_EQ(backends_[i]->service().request_count(), kNumRpcs) + << "backend " << i; + EXPECT_FALSE(found) << "multiple backends saw traffic"; + found = true; + } } + EXPECT_TRUE(found) << "no backends saw traffic"; // The balancer got a single request. EXPECT_EQ(1U, balancer_->service().request_count()); // and sent a single response. @@ -982,21 +989,24 @@ TEST_F(GrpclbEnd2endTest, SwapChildPolicy) { "}"); SendBalancerResponse(BuildResponseForBackends(GetBackendPorts(), {})); CheckRpcSendOk(kNumRpcs, 3000 /* timeout_ms */, true /* wait_for_ready */); - // Check that all requests went to the first backend. This verifies - // that we used pick_first instead of round_robin as the child policy. - EXPECT_EQ(backends_[0]->service().request_count(), kNumRpcs); - for (size_t i = 1; i < backends_.size(); ++i) { - EXPECT_EQ(backends_[i]->service().request_count(), 0UL); + // Check that all requests went to one backend. This verifies that we + // used pick_first instead of round_robin as the child policy. + bool found = false; + for (size_t i = 0; i < backends_.size(); ++i) { + if (backends_[i]->service().request_count() > 0) { + LOG(INFO) << "backend " << i << " saw traffic"; + EXPECT_EQ(backends_[i]->service().request_count(), kNumRpcs) + << "backend " << i; + EXPECT_FALSE(found) << "multiple backends saw traffic"; + found = true; + } } + EXPECT_TRUE(found) << "no backends saw traffic"; // Send new resolution that removes child policy from service config. SetNextResolutionDefaultBalancer(); + // We should now be using round_robin, which will send traffic to all + // backends. WaitForAllBackends(); - CheckRpcSendOk(kNumRpcs, 3000 /* timeout_ms */, true /* wait_for_ready */); - // Check that every backend saw the same number of requests. This verifies - // that we used round_robin. - for (size_t i = 0; i < backends_.size(); ++i) { - EXPECT_EQ(backends_[i]->service().request_count(), 2UL); - } // The balancer got a single request. EXPECT_EQ(1U, balancer_->service().request_count()); // and sent a single response. diff --git a/test/cpp/end2end/health_service_end2end_test.cc b/test/cpp/end2end/health_service_end2end_test.cc index 48209bb5e496f..167396cad4512 100644 --- a/test/cpp/end2end/health_service_end2end_test.cc +++ b/test/cpp/end2end/health_service_end2end_test.cc @@ -33,7 +33,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 20b920f627600..139dda2eb5db8 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -33,8 +33,8 @@ #include #include -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/interceptors_util.h b/test/cpp/end2end/interceptors_util.h index 73e443a46b364..c16c34cd7147e 100644 --- a/test/cpp/end2end/interceptors_util.h +++ b/test/cpp/end2end/interceptors_util.h @@ -28,7 +28,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 073b67dcbfe58..281267a7f9cd0 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -36,7 +36,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_mock.grpc.pb.h" diff --git a/test/cpp/end2end/orca_service_end2end_test.cc b/test/cpp/end2end/orca_service_end2end_test.cc index bf67dd0bc3644..ce88cb19110be 100644 --- a/test/cpp/end2end/orca_service_end2end_test.cc +++ b/test/cpp/end2end/orca_service_end2end_test.cc @@ -32,7 +32,7 @@ #include #include -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/proto/grpc/testing/xds/v3/orca_service.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/orca_service.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/port_sharing_end2end_test.cc b/test/cpp/end2end/port_sharing_end2end_test.cc index 05c03c79a938f..93461bd9ff426 100644 --- a/test/cpp/end2end/port_sharing_end2end_test.cc +++ b/test/cpp/end2end/port_sharing_end2end_test.cc @@ -36,16 +36,18 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" +#include "test/core/test_util/resolve_localhost_ip46.h" #include "test/core/test_util/test_config.h" #include "test/core/test_util/test_tcp_server.h" #include "test/cpp/end2end/test_service_impl.h" @@ -96,9 +98,11 @@ class TestTcpServer { : shutdown_(false), queue_data_(false), port_(grpc_pick_unused_port_or_die()) { - std::ostringstream server_address; - server_address << "localhost:" << port_; - address_ = server_address.str(); + grpc_init(); // needed by LocalIpAndPort() + // This test does not do well with multiple connection attempts at the same + // time to the same tcp server, so use the local IP address instead of + // "localhost" which can result in two connections (ipv4 and ipv6). + address_ = grpc_core::LocalIpAndPort(port_); test_tcp_server_init(&tcp_server_, &TestTcpServer::OnConnect, this); GRPC_CLOSURE_INIT(&on_fd_released_, &TestTcpServer::OnFdReleased, this, grpc_schedule_on_exec_ctx); @@ -108,6 +112,7 @@ class TestTcpServer { running_thread_.join(); test_tcp_server_destroy(&tcp_server_); grpc_recycle_unused_port(port_); + grpc_shutdown(); } // Read some data before handing off the connection. @@ -168,7 +173,7 @@ class TestTcpServer { grpc_tcp_destroy_and_release_fd(tcp, &fd_, &on_fd_released_); } - void OnFdReleased(grpc_error_handle err) { + void OnFdReleased(const absl::Status& err) { EXPECT_EQ(absl::OkStatus(), err); experimental::ExternalConnectionAcceptor::NewConnectionParameters p; p.listener_fd = listener_fd_; diff --git a/test/cpp/end2end/raw_end2end_test.cc b/test/cpp/end2end/raw_end2end_test.cc index c41bb7a60df60..8b28df798f66c 100644 --- a/test/cpp/end2end/raw_end2end_test.cc +++ b/test/cpp/end2end/raw_end2end_test.cc @@ -34,9 +34,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/lib/iomgr/port.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/resource_quota_end2end_stress_test.cc b/test/cpp/end2end/resource_quota_end2end_stress_test.cc index 9960bdff93daa..64987700a62db 100644 --- a/test/cpp/end2end/resource_quota_end2end_stress_test.cc +++ b/test/cpp/end2end/resource_quota_end2end_stress_test.cc @@ -32,8 +32,8 @@ #include "src/core/lib/event_engine/tcp_socket_utils.h" #include "src/core/lib/experiments/config.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/util/notification.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/rls_end2end_test.cc b/test/cpp/end2end/rls_end2end_test.cc index 618b9213c0108..2ed47362d5ed2 100644 --- a/test/cpp/end2end/rls_end2end_test.cc +++ b/test/cpp/end2end/rls_end2end_test.cc @@ -46,15 +46,15 @@ #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" -#include "src/core/lib/uri/uri_parser.h" #include "src/core/load_balancing/rls/rls.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" +#include "src/core/util/time.h" +#include "src/core/util/uri.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" #include "src/proto/grpc/lookup/v1/rls.pb.h" @@ -234,7 +234,7 @@ class RlsEnd2endTest : public ::testing::Test { } struct RpcOptions { - int timeout_ms = 2000; + int timeout_ms = 5000; bool wait_for_ready = false; std::vector> metadata; @@ -922,14 +922,15 @@ TEST_F(RlsEnd2endTest, RlsRequestTimeout) { .set_default_target(grpc_core::LocalIpUri(backends_[1]->port_)) .set_lookup_service_timeout(grpc_core::Duration::Seconds(2)) .Build()); - // RLS server will send a response, but it's longer than the timeout. + // RLS server will send a response, but it takes longer than the + // timeout set in the LB policy config. rls_server_->service_.SetResponse( BuildRlsRequest({{kTestKey, kTestValue}}), BuildRlsResponse({grpc_core::LocalIpUri(backends_[0]->port_)}), /*response_delay=*/grpc_core::Duration::Seconds(3)); // The data plane RPC should be sent to the default target. - CheckRpcSendOk(DEBUG_LOCATION, RpcOptions().set_timeout_ms(4000).set_metadata( - {{"key1", kTestValue}})); + CheckRpcSendOk(DEBUG_LOCATION, + RpcOptions().set_metadata({{"key1", kTestValue}})); EXPECT_EQ(rls_server_->service_.request_count(), 1); EXPECT_EQ(backends_[0]->service_.request_count(), 0); EXPECT_EQ(backends_[1]->service_.request_count(), 1); diff --git a/test/cpp/end2end/rls_server.h b/test/cpp/end2end/rls_server.h index a169c15dfe6c6..149e38c63959b 100644 --- a/test/cpp/end2end/rls_server.h +++ b/test/cpp/end2end/rls_server.h @@ -19,7 +19,7 @@ #include "absl/types/optional.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" #include "src/proto/grpc/lookup/v1/rls.pb.h" #include "test/cpp/end2end/counted_service.h" diff --git a/test/cpp/end2end/server_crash_test.cc b/test/cpp/end2end/server_crash_test.cc index 6973f054dcbe2..bbdea2c1af2e5 100644 --- a/test/cpp/end2end/server_crash_test.cc +++ b/test/cpp/end2end/server_crash_test.cc @@ -31,7 +31,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/server_crash_test_client.cc b/test/cpp/end2end/server_crash_test_client.cc index 4d2e266f025c5..01b25967be33e 100644 --- a/test/cpp/end2end/server_crash_test_client.cc +++ b/test/cpp/end2end/server_crash_test_client.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/end2end/server_early_return_test.cc b/test/cpp/end2end/server_early_return_test.cc index 2489b09341c95..ddcc713cb861c 100644 --- a/test/cpp/end2end/server_early_return_test.cc +++ b/test/cpp/end2end/server_early_return_test.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/server_load_reporting_end2end_test.cc b/test/cpp/end2end/server_load_reporting_end2end_test.cc index d5e057d386abf..5365264c5bd18 100644 --- a/test/cpp/end2end/server_load_reporting_end2end_test.cc +++ b/test/cpp/end2end/server_load_reporting_end2end_test.cc @@ -32,7 +32,7 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/lb/v1/load_reporter.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index 380ebc2e26164..6ff1835aa2ffc 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -48,18 +48,18 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/client_channel/global_subchannel_pool.h" #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/debug_location.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" #include "src/core/service_config/service_config_impl.h" +#include "src/core/util/backoff.h" +#include "src/core/util/crash.h" +#include "src/core/util/debug_location.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index baae51856b536..dcfb52099b63b 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -32,8 +32,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/streaming_throughput_test.cc b/test/cpp/end2end/streaming_throughput_test.cc index a7a3511d15792..8fb9f975349c5 100644 --- a/test/cpp/end2end/streaming_throughput_test.cc +++ b/test/cpp/end2end/streaming_throughput_test.cc @@ -37,7 +37,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index 079dca44feb4d..26810842ac316 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -30,8 +30,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h index 84cb324e46b36..c1860573d9e97 100644 --- a/test/cpp/end2end/test_service_impl.h +++ b/test/cpp/end2end/test_service_impl.h @@ -35,7 +35,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/test_config.h" #include "test/cpp/util/string_ref_helper.h" diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index ee2f558a5be9c..b8171015e6c97 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -35,7 +35,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/end2end/time_change_test.cc b/test/cpp/end2end/time_change_test.cc index fa7dff0602877..dd8a9a9444138 100644 --- a/test/cpp/end2end/time_change_test.cc +++ b/test/cpp/end2end/time_change_test.cc @@ -34,8 +34,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/xds/BUILD b/test/cpp/end2end/xds/BUILD index 07e486e6b6285..f247f14425b8a 100644 --- a/test/cpp/end2end/xds/BUILD +++ b/test/cpp/end2end/xds/BUILD @@ -281,6 +281,7 @@ grpc_cc_test( linkstatic = True, # Fixes dyld error on MacOS shard_count = 5, tags = [ + "no_mac", "no_test_ios", "no_windows", "xds_end2end_test", diff --git a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc index 951639f2db52b..24398adf7f3a2 100644 --- a/test/cpp/end2end/xds/xds_cluster_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_end2end_test.cc @@ -108,7 +108,7 @@ TEST_P(CdsTest, InvalidClusterStillExistsIfPreviouslyCached) { CheckRpcSendOk(DEBUG_LOCATION); } -// Tests round robin is not implacted by the endpoint weight, and that the +// Tests round robin is not impacted by the endpoint weight, and that the // localities in a locality map are picked according to their weights. TEST_P(CdsTest, EndpointWeightDoesNotImpactWeightedRoundRobin) { CreateAndStartBackends(2); @@ -507,7 +507,7 @@ TEST_P(EdsTest, IgnoresUnhealthyEndpoints) { CreateAndStartBackends(2); const size_t kNumRpcsPerAddress = 100; auto endpoints = CreateEndpointsForBackends(); - endpoints.push_back(MakeNonExistantEndpoint()); + endpoints.push_back(MakeNonExistentEndpoint()); endpoints.back().health_status = HealthStatus::DRAINING; EdsResourceArgs args({ {"locality0", std::move(endpoints), kDefaultLocalityWeight, @@ -607,12 +607,12 @@ TEST_P(EdsTest, AllServersUnreachableFailFast) { const size_t kNumUnreachableServers = 5; std::vector endpoints; for (size_t i = 0; i < kNumUnreachableServers; ++i) { - endpoints.emplace_back(MakeNonExistantEndpoint()); + endpoints.emplace_back(MakeNonExistentEndpoint()); } EdsResourceArgs args({{"locality0", std::move(endpoints)}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // The error shouldn't be DEADLINE_EXCEEDED because timeout is set to 5 - // seconds, and we should disocver in that time that the target backend is + // seconds, and we should discover in that time that the target backend is // down. CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::UNAVAILABLE, MakeConnectionFailureRegex( @@ -677,7 +677,7 @@ TEST_P(EdsTest, IgnoresDuplicateUpdates) { // of the invalid cases. TEST_P(EdsTest, NacksInvalidResource) { EdsResourceArgs args({ - {"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1}, + {"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); const auto response_state = WaitForEdsNack(DEBUG_LOCATION); @@ -1073,7 +1073,7 @@ TEST_P(EdsTest, DropPerTenThousand) { // Tests that drop is working correctly after update. TEST_P(EdsTest, DropConfigUpdate) { - CreateAndStartBackends(1); + CreateAndStartBackends(2); const uint32_t kDropPerMillionForLb = 100000; const uint32_t kDropPerMillionForThrottle = 200000; const double kErrorTolerance = 0.05; @@ -1085,8 +1085,8 @@ TEST_P(EdsTest, DropConfigUpdate) { ComputeIdealNumRpcs(kDropRateForLb, kErrorTolerance); const size_t kNumRpcsBoth = ComputeIdealNumRpcs(kDropRateForLbAndThrottle, kErrorTolerance); - // The first ADS response contains one drop category. - EdsResourceArgs args({{"locality0", CreateEndpointsForBackends()}}); + // The first EDS response contains backend 0 and one drop category. + EdsResourceArgs args({{"locality0", CreateEndpointsForBackends(0, 1)}}); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}}; balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Send kNumRpcsLbOnly RPCs and count the drops. @@ -1100,32 +1100,20 @@ TEST_P(EdsTest, DropConfigUpdate) { LOG(INFO) << "First batch drop rate " << seen_drop_rate; EXPECT_THAT(seen_drop_rate, ::testing::DoubleNear(kDropRateForLb, kErrorTolerance)); - // The second ADS response contains two drop categories, send an update EDS - // response. + // The second EDS response contains both backends and two drop categories. + args = EdsResourceArgs({{"locality0", CreateEndpointsForBackends()}}); args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, {kThrottleDropType, kDropPerMillionForThrottle}}; balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - // Wait until the drop rate increases to the middle of the two configs, - // which implies that the update has been in effect. - const double kDropRateThreshold = - (kDropRateForLb + kDropRateForLbAndThrottle) / 2; - size_t num_rpcs = kNumRpcsBoth; - SendRpcsUntil( - DEBUG_LOCATION, - [&](const RpcResult& result) { - ++num_rpcs; - if (result.status.ok()) { - EXPECT_EQ(result.response.message(), kRequestMessage); - } else { - EXPECT_EQ(result.status.error_code(), StatusCode::UNAVAILABLE); - EXPECT_THAT(result.status.error_message(), - ::testing::StartsWith(kStatusMessageDropPrefix)); - ++num_drops; - } - seen_drop_rate = static_cast(num_drops) / num_rpcs; - return seen_drop_rate < kDropRateThreshold; - }, - /*timeout_ms=*/40000); + // Wait until backend 1 sees traffic, so that we know the client has + // seen the update. + WaitForBackend(DEBUG_LOCATION, 1, [&](const RpcResult& result) { + if (!result.status.ok()) { + EXPECT_EQ(result.status.error_code(), StatusCode::UNAVAILABLE); + EXPECT_THAT(result.status.error_message(), + ::testing::StartsWith(kStatusMessageDropPrefix)); + } + }); // Send kNumRpcsBoth RPCs and count the drops. LOG(INFO) << "========= BEFORE SECOND BATCH =========="; num_drops = SendRpcsAndCountFailuresWithMessage(DEBUG_LOCATION, kNumRpcsBoth, @@ -1191,10 +1179,10 @@ TEST_P(EdsAuthorityRewriteTest, AutoAuthorityRewrite) { { CreateEndpoint(0), CreateEndpoint(1, ::envoy::config::core::v3::HealthStatus::UNKNOWN, - /*lb_weight=*/1, /*additional_backend_indxes=*/{}, + /*lb_weight=*/1, /*additional_backend_indexes=*/{}, /*hostname=*/kAltAuthority1), CreateEndpoint(2, ::envoy::config::core::v3::HealthStatus::UNKNOWN, - /*lb_weight=*/1, /*additional_backend_indxes=*/{}, + /*lb_weight=*/1, /*additional_backend_indexes=*/{}, /*hostname=*/kAltAuthority2), }}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); @@ -1231,7 +1219,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteWithoutEnvVar) { EdsResourceArgs args( {{"locality0", {CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN, - /*lb_weight=*/1, /*additional_backend_indxes=*/{}, + /*lb_weight=*/1, /*additional_backend_indexes=*/{}, /*hostname=*/kAltAuthority)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Send an RPC and check the authority seen on the server side. @@ -1261,7 +1249,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteIfServerNotTrustedInBootstrap) { EdsResourceArgs args( {{"locality0", {CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN, - /*lb_weight=*/1, /*additional_backend_indxes=*/{}, + /*lb_weight=*/1, /*additional_backend_indexes=*/{}, /*hostname=*/kAltAuthority)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Send an RPC and check the authority seen on the server side. @@ -1308,7 +1296,7 @@ TEST_P(EdsAuthorityRewriteTest, NoRewriteIfNotEnabledInRoute) { EdsResourceArgs args( {{"locality0", {CreateEndpoint(0, ::envoy::config::core::v3::HealthStatus::UNKNOWN, - /*lb_weight=*/1, /*additional_backend_indxes=*/{}, + /*lb_weight=*/1, /*additional_backend_indexes=*/{}, /*hostname=*/kAltAuthority)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Send an RPC and check the authority seen on the server side. @@ -1395,12 +1383,12 @@ TEST_P(FailoverTest, DoesNotUseLocalityWithNoEndpoints) { TEST_P(FailoverTest, Failover) { CreateAndStartBackends(2); EdsResourceArgs args({ - {"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1}, + {"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, {"locality1", CreateEndpointsForBackends(0, 1), kDefaultLocalityWeight, 2}, {"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight, 3}, - {"locality3", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0}, + {"locality3", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); WaitForBackend(DEBUG_LOCATION, 0, /*check_status=*/nullptr, @@ -1413,7 +1401,7 @@ TEST_P(FailoverTest, ReportsConnectingDuringFailover) { CreateAndStartBackends(1); // Priority 0 will be unreachable, so we'll use priority 1. EdsResourceArgs args({ - {"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0}, + {"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, {"locality1", CreateEndpointsForBackends(), kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); @@ -1470,8 +1458,8 @@ TEST_P(FailoverTest, SwitchBackToHigherPriority) { TEST_P(FailoverTest, UpdateInitialUnavailable) { CreateAndStartBackends(2); EdsResourceArgs args({ - {"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0}, - {"locality1", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1}, + {"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, + {"locality1", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); CheckRpcSendFailure(DEBUG_LOCATION, StatusCode::UNAVAILABLE, @@ -1534,12 +1522,12 @@ TEST_P(FailoverTest, UpdatePriority) { // Moves all localities in the current priority to a higher priority. TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) { CreateAndStartBackends(3); - auto non_existant_endpoint = MakeNonExistantEndpoint(); + auto non_existent_endpoint = MakeNonExistentEndpoint(); // First update: // - Priority 0 is locality 0, containing an unreachable backend. // - Priority 1 is locality 1, containing backends 0 and 1. EdsResourceArgs args({ - {"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0}, + {"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0}, {"locality1", CreateEndpointsForBackends(0, 2), kDefaultLocalityWeight, 1}, }); @@ -1556,15 +1544,13 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) { // - We add backend 2 to locality 1, just so we have a way to know // when the update has been seen by the client. args = EdsResourceArgs({ - {"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0}, + {"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0}, {"locality1", CreateEndpointsForBackends(0, 3), kDefaultLocalityWeight, 0}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // When backend 2 gets traffic, we know the second update has been seen. WaitForBackend(DEBUG_LOCATION, 2); - // The xDS server got at least 1 response. - EXPECT_TRUE(balancer_->ads_service()->eds_response_state().has_value()); } // This tests a bug triggered by the xds_cluster_resolver policy reusing @@ -1572,13 +1558,13 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) { // present but deactivated. TEST_P(FailoverTest, PriorityChildNameChurn) { CreateAndStartBackends(4); - auto non_existant_endpoint = MakeNonExistantEndpoint(); + auto non_existent_endpoint = MakeNonExistentEndpoint(); // Initial update: // - P0:locality0, child number 0 (unreachable) // - P1:locality1, child number 1 // - P2:locality2, child number 2 EdsResourceArgs args({ - {"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0}, + {"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0}, {"locality1", CreateEndpointsForBackends(0, 1), kDefaultLocalityWeight, 1}, {"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight, @@ -1592,7 +1578,7 @@ TEST_P(FailoverTest, PriorityChildNameChurn) { // - P2:locality3, child number 3 (new child) // Child number 1 will be deactivated. args = EdsResourceArgs({ - {"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0}, + {"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0}, {"locality2", CreateEndpointsForBackends(1, 2), kDefaultLocalityWeight, 1}, {"locality3", CreateEndpointsForBackends(2, 3), kDefaultLocalityWeight, @@ -1606,7 +1592,7 @@ TEST_P(FailoverTest, PriorityChildNameChurn) { // - P2:locality3, child number 3 // Child number 1 will be deactivated. args = EdsResourceArgs({ - {"locality0", {non_existant_endpoint}, kDefaultLocalityWeight, 0}, + {"locality0", {non_existent_endpoint}, kDefaultLocalityWeight, 0}, {"locality4", CreateEndpointsForBackends(3, 4), kDefaultLocalityWeight, 1}, {"locality3", CreateEndpointsForBackends(2, 3), kDefaultLocalityWeight, diff --git a/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc b/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc index b0af0178e8e91..b80b344da0303 100644 --- a/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc @@ -28,10 +28,10 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/xds/v3/aggregate_cluster.grpc.pb.h" #include "test/core/test_util/resolve_localhost_ip46.h" #include "test/core/test_util/scoped_env_var.h" @@ -757,9 +757,9 @@ TEST_P(AggregateClusterTest, ReconfigEdsWhileLogicalDnsChildFails) { // - Priority 0: locality0 // - Priority 1: locality1, locality2 EdsResourceArgs args1({ - {"locality0", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 0}, - {"locality1", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1}, - {"locality2", {MakeNonExistantEndpoint()}, kDefaultLocalityWeight, 1}, + {"locality0", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, + {"locality1", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, + {"locality2", {MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource( BuildEdsResource(args1, kNewEdsService1Name)); @@ -829,7 +829,7 @@ TEST_P(AggregateClusterTest, MultipleClustersWithSameLocalities) { const char* kNewClusterName2 = "new_cluster_2"; const char* kNewEdsServiceName2 = "new_eds_service_name_2"; // Populate EDS resource for cluster 1 with unreachable endpoint. - EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource( BuildEdsResource(args1, kNewEdsServiceName1)); // Populate CDS resource for cluster 1. diff --git a/test/cpp/end2end/xds/xds_core_end2end_test.cc b/test/cpp/end2end/xds/xds_core_end2end_test.cc index f3b6d78f90101..e8d0ed404ebd8 100644 --- a/test/cpp/end2end/xds/xds_core_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_core_end2end_test.cc @@ -540,7 +540,7 @@ TEST_P(TimeoutTest, EdsSecondResourceNotPresentInRequest) { EdsResourceArgs args({{"locality0", CreateEndpointsForBackends()}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); CheckRpcSendOk(DEBUG_LOCATION, 1, RpcOptions().set_timeout_ms(4000)); - // New cluster that points to a non-existant EDS resource. + // New cluster that points to a non-existent EDS resource. const char* kNewClusterName = "new_cluster_name"; Cluster cluster = default_cluster_; cluster.set_name(kNewClusterName); @@ -1060,7 +1060,7 @@ TEST_P(XdsFederationTest, FederationServer) { "xdstp://xds.example.com/envoy.config.listener.v3.Listener" "client/%s?client_listener_resource_name_template_not_in_use"); InitClient(builder); - CreateAndStartBackends(2, /*xds_enabled=*/true); + CreateBackends(2, /*xds_enabled=*/true); // Eds for new authority balancer. EdsResourceArgs args = EdsResourceArgs({{"locality0", CreateEndpointsForBackends()}}); @@ -1099,6 +1099,13 @@ TEST_P(XdsFederationTest, FederationServer) { new_server_route_config, ServerHcmAccessor()); } + // Start backends and wait for them to start serving. + StartAllBackends(); + for (const auto& backend : backends_) { + ASSERT_TRUE(backend->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backend->port()), grpc::StatusCode::OK)); + } + // Make sure everything works. WaitForAllBackends(DEBUG_LOCATION); } @@ -1244,7 +1251,10 @@ TEST_P(XdsMetricsTest, MetricValues) { EdsResourceArgs args = EdsResourceArgs({{"locality0", CreateEndpointsForBackends()}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); - CheckRpcSendOk(DEBUG_LOCATION); + // Use wait_for_ready and increase timeout, in case the client takes a + // little while to get connected. + CheckRpcSendOk(DEBUG_LOCATION, /*times=*/1, + RpcOptions().set_wait_for_ready(true).set_timeout_ms(15000)); stats_plugin_->TriggerCallbacks(); // Check client metrics. EXPECT_THAT(stats_plugin_->GetInt64CallbackGaugeValue( diff --git a/test/cpp/end2end/xds/xds_end2end_test.cc b/test/cpp/end2end/xds/xds_end2end_test.cc index 0c6cfab5e84a9..cf003274740ea 100644 --- a/test/cpp/end2end/xds/xds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_end2end_test.cc @@ -63,12 +63,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/ref_counted_ptr.h" -#include "src/core/lib/gprpp/sync.h" -#include "src/core/lib/gprpp/time.h" -#include "src/core/lib/gprpp/time_util.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/authorization/audit_logging.h" #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" @@ -77,8 +71,14 @@ #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/fake/fake_resolver.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/ref_counted_ptr.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" +#include "src/core/util/time.h" #include "src/core/util/time_precise.h" +#include "src/core/util/time_util.h" #include "src/core/util/tmpfile.h" #include "src/core/xds/grpc/xds_listener.h" #include "src/core/xds/xds_client/xds_api.h" @@ -833,12 +833,16 @@ class XdsEnabledServerTest : public XdsEnd2endTest { TEST_P(XdsEnabledServerTest, Basic) { DoSetUp(); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); WaitForBackend(DEBUG_LOCATION, 0); } TEST_P(XdsEnabledServerTest, ListenerDeletionIgnored) { DoSetUp(MakeBootstrapBuilder().SetIgnoreResourceDeletion()); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); WaitForBackend(DEBUG_LOCATION, 0); // Check that we ACKed. // TODO(roth): There may be multiple entries in the resource state response @@ -906,9 +910,9 @@ TEST_P(XdsEnabledServerTest, NonTcpListener) { ClientHcmAccessor().Pack(hcm, &listener); balancer_->ads_service()->SetLdsResource(listener); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::FAILED_PRECONDITION); + grpc::StatusCode::FAILED_PRECONDITION)); } // Verify that a mismatch of listening address results in "not serving" @@ -923,9 +927,9 @@ TEST_P(XdsEnabledServerTest, ListenerAddressMismatch) { backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::FAILED_PRECONDITION); + grpc::StatusCode::FAILED_PRECONDITION)); } class XdsServerSecurityTest : public XdsEnd2endTest { @@ -944,7 +948,11 @@ class XdsServerSecurityTest : public XdsEnd2endTest { builder.AddCertificateProviderPlugin("file_plugin", "file_watcher", absl::StrJoin(fields, ",\n")); InitClient(builder, /*lb_expected_authority=*/"", - /*xds_resource_does_not_exist_timeout_ms=*/0, + /*xds_resource_does_not_exist_timeout_ms=*/ + 500, // using a low timeout to quickly end negative tests. + // Prefer using WaitOnServingStatusChange() or a similar + // loop on the client side to wait on status changes + // instead of increasing this timeout. /*balancer_authority_override=*/"", /*args=*/nullptr, CreateXdsChannelCredentials()); CreateBackends(1, /*xds_enabled=*/true, @@ -1071,23 +1079,25 @@ class XdsServerSecurityTest : public XdsEnd2endTest { } void SendRpc( - std::function()> channel_creator, - std::vector expected_server_identity, - std::vector expected_client_identity, + absl::FunctionRef()> channel_creator, + const RpcOptions& rpc_options, + const std::vector& expected_server_identity, + const std::vector& expected_client_identity, bool test_expects_failure = false, - absl::optional expected_status = absl::nullopt) { + absl::optional expected_status = absl::nullopt, + absl::string_view expected_error_message_regex = "") { LOG(INFO) << "Sending RPC"; int num_tries = 0; constexpr int kRetryCount = 100; - auto overall_deadline = absl::Now() + absl::Seconds(5); + auto overall_deadline = + absl::Now() + absl::Seconds(20) * grpc_test_slowdown_factor(); + auto channel = channel_creator(); + auto stub = grpc::testing::EchoTestService::NewStub(channel); for (; num_tries < kRetryCount || absl::Now() < overall_deadline; num_tries++) { - auto channel = channel_creator(); - auto stub = grpc::testing::EchoTestService::NewStub(channel); ClientContext context; - context.set_wait_for_ready(true); - context.set_deadline(grpc_timeout_milliseconds_to_deadline(2000)); EchoRequest request; + rpc_options.SetupRpc(&context, &request); // TODO(yashykt): Skipping the cancelled check on the server since the // server's graceful shutdown isn't as per spec and the check isn't // necessary for what we want to test here anyway. @@ -1108,6 +1118,8 @@ class XdsServerSecurityTest : public XdsEnd2endTest { << *expected_status << ")"; continue; } + EXPECT_THAT(status.error_message(), + ::testing::MatchesRegex(expected_error_message_regex)); } else { if (!status.ok()) { LOG(ERROR) << "RPC failed. code=" << status.error_code() @@ -1142,7 +1154,7 @@ class XdsServerSecurityTest : public XdsEnd2endTest { } break; } - EXPECT_LT(num_tries, kRetryCount); + EXPECT_TRUE(absl::Now() <= overall_deadline || num_tries < kRetryCount); } std::string root_cert_; @@ -1173,23 +1185,34 @@ TEST_P(XdsServerSecurityTest, backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); } TEST_P(XdsServerSecurityTest, CertificatesNotAvailable) { g_fake1_cert_data_map->Set({}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); - SendRpc([this]() { return CreateMtlsChannel(); }, {}, {}, - true /* test_expects_failure */); + backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateMtlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerSecurityTest, TestMtls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); } TEST_P(XdsServerSecurityTest, TestMtlsWithRootPluginUpdate) { @@ -1197,11 +1220,16 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithRootPluginUpdate) { g_fake2_cert_data_map->Set({{"", {bad_root_cert_, bad_identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin2", "", "fake_plugin1", "", true); - SendRpc([this]() { return CreateMtlsChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateMtlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityPluginUpdate) { @@ -1209,10 +1237,14 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityPluginUpdate) { g_fake2_cert_data_map->Set({{"", {root_cert_, identity_pair_2_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin1", "", "fake_plugin2", "", true); SendRpc([this]() { return CreateMtlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, client_authenticated_identity_); } @@ -1222,13 +1254,19 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithBothPluginsUpdated) { {"", {bad_root_cert_, bad_identity_pair_}}}); SetLdsUpdate("fake_plugin2", "", "fake_plugin2", "", true); backends_[0]->Start(); - SendRpc([this]() { return CreateMtlsChannel(); }, {}, {}, - true /* test_expects_failure */); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateMtlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeTlsHandshakeFailureRegex( + "failed to connect to all addresses; last error: ")); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin2", "good", "fake_plugin2", "good", true); SendRpc([this]() { return CreateMtlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, client_authenticated_identity_); } @@ -1237,11 +1275,16 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithRootCertificateNameUpdate) { {"bad", {bad_root_cert_, bad_identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin1", "bad", "fake_plugin1", "", true); - SendRpc([this]() { return CreateMtlsChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateMtlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityCertificateNameUpdate) { @@ -1249,10 +1292,14 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityCertificateNameUpdate) { {"good", {root_cert_, identity_pair_2_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "good", true); SendRpc([this]() { return CreateMtlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, client_authenticated_identity_); } @@ -1261,10 +1308,14 @@ TEST_P(XdsServerSecurityTest, TestMtlsWithBothCertificateNamesUpdated) { {"good", {root_cert_, identity_pair_2_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("fake_plugin1", "good", "fake_plugin1", "good", true); SendRpc([this]() { return CreateMtlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, client_authenticated_identity_); } @@ -1272,24 +1323,33 @@ TEST_P(XdsServerSecurityTest, TestMtlsNotRequiringButProvidingClientCerts) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); } TEST_P(XdsServerSecurityTest, TestMtlsNotRequiringAndNotProvidingClientCerts) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); } TEST_P(XdsServerSecurityTest, TestTls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); } TEST_P(XdsServerSecurityTest, TestTlsWithIdentityPluginUpdate) { @@ -1297,10 +1357,14 @@ TEST_P(XdsServerSecurityTest, TestTlsWithIdentityPluginUpdate) { g_fake2_cert_data_map->Set({{"", {root_cert_, identity_pair_2_}}}); SetLdsUpdate("", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); SetLdsUpdate("", "", "fake_plugin2", "", false); SendRpc([this]() { return CreateTlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, {}); } @@ -1309,10 +1373,14 @@ TEST_P(XdsServerSecurityTest, TestTlsWithIdentityCertificateNameUpdate) { {"good", {root_cert_, identity_pair_2_}}}); SetLdsUpdate("", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); SetLdsUpdate("", "", "fake_plugin1", "good", false); SendRpc([this]() { return CreateTlsChannel(); }, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_2_, {}); } @@ -1320,69 +1388,98 @@ TEST_P(XdsServerSecurityTest, TestFallback) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "", "", false); backends_[0]->Start(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerSecurityTest, TestMtlsToTls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); backends_[0]->Start(); - SendRpc([this]() { return CreateTlsChannel(); }, {}, {}, - true /* test_expects_failure */); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateTlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); SetLdsUpdate("", "", "fake_plugin1", "", false); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); } TEST_P(XdsServerSecurityTest, TestTlsToMtls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); - SendRpc([this]() { return CreateTlsChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateTlsChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerSecurityTest, TestMtlsToFallback) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); SetLdsUpdate("", "", "", "", false); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerSecurityTest, TestFallbackToMtls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "", "", false); backends_[0]->Start(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_); } TEST_P(XdsServerSecurityTest, TestTlsToFallback) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "fake_plugin1", "", false); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); SetLdsUpdate("", "", "", "", false); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerSecurityTest, TestFallbackToTls) { g_fake1_cert_data_map->Set({{"", {root_cert_, identity_pair_}}}); SetLdsUpdate("", "", "", "", false); backends_[0]->Start(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); SetLdsUpdate("", "", "fake_plugin1", "", false); SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); } class XdsEnabledServerStatusNotificationTest : public XdsServerSecurityTest { @@ -1409,51 +1506,60 @@ class XdsEnabledServerStatusNotificationTest : public XdsServerSecurityTest { TEST_P(XdsEnabledServerStatusNotificationTest, ServingStatus) { SetValidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsEnabledServerStatusNotificationTest, NotServingStatus) { SetInvalidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::UNAVAILABLE); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + grpc::StatusCode::UNAVAILABLE)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsEnabledServerStatusNotificationTest, ErrorUpdateWhenAlreadyServing) { SetValidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); // Invalid update does not lead to a change in the serving status. SetInvalidLdsUpdate(); do { - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } while (!balancer_->ads_service()->lds_response_state().has_value()); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsEnabledServerStatusNotificationTest, NotServingStatusToServingStatusTransition) { SetInvalidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::UNAVAILABLE); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + grpc::StatusCode::UNAVAILABLE)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); // Send a valid LDS update to change to serving status SetValidLdsUpdate(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } // This test verifies that the resource getting deleted when already serving @@ -1462,16 +1568,19 @@ TEST_P(XdsEnabledServerStatusNotificationTest, ServingStatusToNonServingStatusTransition) { SetValidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); // Deleting the resource should result in a non-serving status. UnsetLdsUpdate(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::NOT_FOUND); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + grpc::StatusCode::NOT_FOUND)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsEnabledServerStatusNotificationTest, RepeatedServingStatusChanges) { @@ -1479,16 +1588,19 @@ TEST_P(XdsEnabledServerStatusNotificationTest, RepeatedServingStatusChanges) { for (int i = 0; i < 5; i++) { // Send a valid LDS update to get the server to start listening SetValidLdsUpdate(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); // Deleting the resource will make the server start rejecting connections UnsetLdsUpdate(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::NOT_FOUND); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + grpc::StatusCode::NOT_FOUND)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } } @@ -1496,8 +1608,8 @@ TEST_P(XdsEnabledServerStatusNotificationTest, ExistingRpcsOnResourceDeletion) { // Send a valid LDS update to get the server to start listening SetValidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); constexpr int kNumChannels = 10; struct StreamingRpc { std::shared_ptr channel; @@ -1521,11 +1633,13 @@ TEST_P(XdsEnabledServerStatusNotificationTest, ExistingRpcsOnResourceDeletion) { } // Deleting the resource will make the server start rejecting connections UnsetLdsUpdate(); - backends_[0]->notifier()->WaitOnServingStatusChange( + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( grpc_core::LocalIpAndPort(backends_[0]->port()), - grpc::StatusCode::NOT_FOUND); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + grpc::StatusCode::NOT_FOUND)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); for (int i = 0; i < kNumChannels; i++) { EXPECT_TRUE(streaming_rpcs[i].stream->Write(request)); streaming_rpcs[i].stream->Read(&response); @@ -1551,8 +1665,8 @@ TEST_P(XdsEnabledServerStatusNotificationTest, // Send a valid LDS update to get the server to start listening SetValidLdsUpdate(); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); constexpr int kNumChannels = 10; struct StreamingRpc { std::shared_ptr channel; @@ -1579,7 +1693,8 @@ TEST_P(XdsEnabledServerStatusNotificationTest, SetLdsUpdate("", "", "fake_plugin1", "", false); // Wait for the updated resource to take effect. SendRpc([this]() { return CreateTlsChannel(); }, - server_authenticated_identity_, {}); + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + {}); // After the drain grace time expires, the existing RPCs should all fail. for (int i = 0; i < kNumChannels; i++) { // Wait for the drain grace time to expire @@ -1592,6 +1707,8 @@ TEST_P(XdsEnabledServerStatusNotificationTest, << status.error_code() << ", " << status.error_message() << ", " << status.error_details() << ", " << streaming_rpcs[i].context.debug_error_string(); + EXPECT_EQ(status.error_message(), + "Drain grace time expired. Closing connection immediately."); } } @@ -1609,7 +1726,10 @@ class XdsServerFilterChainMatchTest : public XdsServerSecurityTest { TEST_P(XdsServerFilterChainMatchTest, DefaultFilterChainUsedWhenNoFilterChainMentioned) { backends_[0]->Start(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1626,7 +1746,10 @@ TEST_P(XdsServerFilterChainMatchTest, backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1643,10 +1766,14 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // RPC should fail since no matching filter chain was found and no default // filter chain is configured. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerFilterChainMatchTest, FilterChainsWithServerNamesDontMatch) { @@ -1660,10 +1787,14 @@ TEST_P(XdsServerFilterChainMatchTest, FilterChainsWithServerNamesDontMatch) { balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // RPC should fail since no matching filter chain was found and no default // filter chain is configured. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerFilterChainMatchTest, @@ -1678,10 +1809,14 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // RPC should fail since no matching filter chain was found and no default // filter chain is configured. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerFilterChainMatchTest, @@ -1696,10 +1831,14 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // RPC should fail since no matching filter chain was found and no default // filter chain is configured. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + MakeConnectionFailureRegex( + "failed to connect to all addresses; last error: ")); } TEST_P(XdsServerFilterChainMatchTest, @@ -1721,9 +1860,12 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A successful RPC proves that filter chains that mention "raw_buffer" as // the transport protocol are chosen as the best match in the round. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1775,9 +1917,12 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A successful RPC proves that the filter chain with the longest matching // prefix range was the best match. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1809,9 +1954,12 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A successful RPC proves that the filter chain with the longest matching // prefix range was the best match. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1869,9 +2017,12 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A successful RPC proves that the filter chain with the longest matching // source prefix range was the best match. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerFilterChainMatchTest, @@ -1901,18 +2052,22 @@ TEST_P(XdsServerFilterChainMatchTest, balancer_->ads_service()->SetLdsResource( PopulateServerListenerNameAndPort(listener, backends_[0]->port())); backends_[0]->Start(); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A successful RPC proves that the filter chain with matching source port // was chosen. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } using XdsServerRdsTest = XdsEnabledServerStatusNotificationTest; TEST_P(XdsServerRdsTest, Basic) { backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerRdsTest, FailsRouteMatchesOtherThanNonForwardingAction) { @@ -1921,10 +2076,11 @@ TEST_P(XdsServerRdsTest, FailsRouteMatchesOtherThanNonForwardingAction) { default_route_config_ /* inappropriate route config for servers */); backends_[0]->Start(); // The server should be ready to serve but RPCs should fail. - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::UNAVAILABLE, + "UNAVAILABLE:matching route has unsupported action"); } // Test that non-inline route configuration also works for non-default filter @@ -1946,9 +2102,10 @@ TEST_P(XdsServerRdsTest, NonInlineRouteConfigurationNonDefaultFilterChain) { backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsServerRdsTest, NonInlineRouteConfigurationNotAvailable) { @@ -1968,10 +2125,11 @@ TEST_P(XdsServerRdsTest, NonInlineRouteConfigurationNotAvailable) { backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, - true /* test_expects_failure */); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, RpcOptions(), {}, {}, + true /* test_expects_failure */, grpc::StatusCode::NOT_FOUND, + "Requested route config does not exist"); } // TODO(yashykt): Once https://github.com/grpc/grpc/issues/24035 is fixed, we @@ -2020,9 +2178,10 @@ TEST_P(XdsServerRdsTest, MultipleRouteConfigurations) { backends_[0]->port(), default_server_route_config_); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } // Tests RBAC configurations on the server with RDS testing and route config @@ -2086,10 +2245,11 @@ class XdsRbacTest : public XdsServerRdsTest { TEST_P(XdsRbacTest, AbsentRbacPolicy) { SetServerRbacPolicy(RBAC()); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // An absent RBAC policy leads to all RPCs being accepted. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } TEST_P(XdsRbacTest, LogAction) { @@ -2098,10 +2258,11 @@ TEST_P(XdsRbacTest, LogAction) { rules->set_action(RBAC_Action_LOG); SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // A Log action is identical to no rbac policy being configured. - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } // Tests RBAC policies where a route override is always present. Action @@ -2139,9 +2300,10 @@ TEST_P(XdsRbacTestWithRouteOverrideAlwaysPresent, EmptyRBACPerRouteOverride) { SetServerListenerNameAndRouteConfiguration( balancer_.get(), listener, backends_[0]->port(), route_config); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } // Test a non-empty top level RBAC with a non-empty RBACPerRouteOverride @@ -2180,9 +2342,10 @@ TEST_P(XdsRbacTestWithRouteOverrideAlwaysPresent, SetServerListenerNameAndRouteConfiguration( balancer_.get(), listener, backends_[0]->port(), route_config); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}); } // Adds Action Permutations to XdsRbacTest @@ -2193,13 +2356,14 @@ TEST_P(XdsRbacTestWithActionPermutations, EmptyRbacPolicy) { rbac.mutable_rules()->set_action(GetParam().rbac_action()); SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // An empty RBAC policy leads to all RPCs being rejected. SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAnyPrincipal) { @@ -2212,11 +2376,12 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, MultipleRbacPolicies) { @@ -2234,11 +2399,12 @@ TEST_P(XdsRbacTestWithActionPermutations, MultipleRbacPolicies) { SetServerRbacPolicies(default_server_listener_, {always_allow, rbac, always_allow}); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, MethodPostPermissionAnyPrincipal) { @@ -2254,17 +2420,18 @@ TEST_P(XdsRbacTestWithActionPermutations, MethodPostPermissionAnyPrincipal) { SetServerRbacPolicy(rbac); backends_[0]->set_allow_put_requests(true); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // All RPCs use POST method by default - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test that an RPC with PUT method is handled properly. SendRpc([this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, - {}, {}, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() != RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, MethodGetPermissionAnyPrincipal) { @@ -2279,13 +2446,14 @@ TEST_P(XdsRbacTestWithActionPermutations, MethodGetPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // Test that an RPC with a POST method gets rejected SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // TODO(yashykt): When we start supporting GET requests in the future, this // should be modified to test that they are accepted with this rule. } @@ -2303,19 +2471,20 @@ TEST_P(XdsRbacTestWithActionPermutations, MethodPutPermissionAnyPrincipal) { SetServerRbacPolicy(rbac); backends_[0]->set_allow_put_requests(true); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // Test that an RPC with a POST method gets rejected SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test that an RPC with a PUT method gets accepted SendRpc( - [this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, {}, - {}, + [this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() != RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, UrlPathPermissionAnyPrincipal) { @@ -2329,11 +2498,12 @@ TEST_P(XdsRbacTestWithActionPermutations, UrlPathPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test an RPC with a different URL path auto stub = grpc::testing::EchoTestService::NewStub(CreateInsecureChannel()); ClientContext context; @@ -2362,11 +2532,12 @@ TEST_P(XdsRbacTestWithActionPermutations, DestinationIpPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_permissions(); range = policy.add_permissions()->mutable_destination_ip(); @@ -2377,9 +2548,10 @@ TEST_P(XdsRbacTestWithActionPermutations, DestinationIpPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, @@ -2393,20 +2565,22 @@ TEST_P(XdsRbacTestWithActionPermutations, (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_permissions(); policy.add_permissions()->set_destination_port(1); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, MetadataPermissionAnyPrincipal) { @@ -2419,20 +2593,22 @@ TEST_P(XdsRbacTestWithActionPermutations, MetadataPermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test metadata with inverted match policy.clear_permissions(); policy.add_permissions()->mutable_metadata()->set_invert(true); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, ReqServerNamePermissionAnyPrincipal) { @@ -2446,19 +2622,21 @@ TEST_P(XdsRbacTestWithActionPermutations, ReqServerNamePermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); policy.clear_permissions(); policy.add_permissions()->mutable_requested_server_name()->set_exact(""); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, NotRulePermissionAnyPrincipal) { @@ -2474,20 +2652,22 @@ TEST_P(XdsRbacTestWithActionPermutations, NotRulePermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_permissions(); policy.add_permissions()->mutable_not_rule()->set_any(true); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AndRulePermissionAnyPrincipal) { @@ -2502,20 +2682,22 @@ TEST_P(XdsRbacTestWithActionPermutations, AndRulePermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. and_rules = (*policy.mutable_permissions())[0].mutable_and_rules(); (*and_rules->mutable_rules())[1].set_destination_port(1); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, OrRulePermissionAnyPrincipal) { @@ -2530,20 +2712,22 @@ TEST_P(XdsRbacTestWithActionPermutations, OrRulePermissionAnyPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. or_rules = (*policy.mutable_permissions())[0].mutable_or_rules(); (*or_rules->mutable_rules())[1].set_destination_port(1); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMethodPostPrincipal) { @@ -2559,17 +2743,18 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMethodPostPrincipal) { SetServerRbacPolicy(rbac); backends_[0]->set_allow_put_requests(true); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // All RPCs use POST method by default - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test that an RPC with PUT method is handled properly. SendRpc([this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, - {}, {}, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() != RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMethodGetPrincipal) { @@ -2584,13 +2769,14 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMethodGetPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // Test that an RPC with a POST method gets rejected SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // TODO(yashykt): When we start supporting GET requests in the future, this // should be modified to test that they are accepted with this rule. } @@ -2608,19 +2794,20 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMethodPutPrincipal) { SetServerRbacPolicy(rbac); backends_[0]->set_allow_put_requests(true); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // Test that an RPC with a PUT method gets accepted SendRpc( - [this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, {}, - {}, + [this]() { return CreateInsecureChannel(/*use_put_requests=*/true); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() != RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test that an RPC with a POST method gets rejected SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionUrlPathPrincipal) { @@ -2634,11 +2821,12 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionUrlPathPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test an RPC with a different URL path auto stub = grpc::testing::EchoTestService::NewStub(CreateInsecureChannel()); ClientContext context; @@ -2668,11 +2856,12 @@ TEST_P(XdsRbacTestWithActionPermutations, (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_principals(); range = policy.add_principals()->mutable_direct_remote_ip(); @@ -2683,9 +2872,10 @@ TEST_P(XdsRbacTestWithActionPermutations, (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionRemoteIpPrincipal) { @@ -2701,11 +2891,12 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionRemoteIpPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_principals(); range = policy.add_principals()->mutable_remote_ip(); @@ -2716,9 +2907,10 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionRemoteIpPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAuthenticatedPrincipal) { @@ -2749,12 +2941,13 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAuthenticatedPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(listener, rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc([this]() { return CreateMtlsChannel(); }, - server_authenticated_identity_, client_authenticated_identity_, + RpcOptions().set_wait_for_ready(true), server_authenticated_identity_, + client_authenticated_identity_, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMetadataPrincipal) { @@ -2767,20 +2960,22 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionMetadataPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Test metadata with inverted match policy.clear_principals(); policy.add_principals()->mutable_metadata()->set_invert(true); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionNotIdPrincipal) { @@ -2797,20 +2992,22 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionNotIdPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. policy.clear_principals(); policy.add_principals()->mutable_not_id()->set_any(true); (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAndIdPrincipal) { @@ -2826,11 +3023,12 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAndIdPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. and_ids = (*policy.mutable_principals())[0].mutable_and_ids(); (*and_ids->mutable_ids())[1].mutable_url_path()->mutable_path()->set_exact( @@ -2838,9 +3036,10 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionAndIdPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionOrIdPrincipal) { @@ -2856,11 +3055,12 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionOrIdPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Change the policy itself for a negative test where there is no match. or_ids = (*policy.mutable_principals())[0].mutable_or_ids(); (*or_ids->mutable_ids())[1].mutable_url_path()->mutable_path()->set_exact( @@ -2868,9 +3068,10 @@ TEST_P(XdsRbacTestWithActionPermutations, AnyPermissionOrIdPrincipal) { (*rules->mutable_policies())["policy"] = policy; SetServerRbacPolicy(rbac); SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); } TEST_P(XdsRbacTestWithActionPermutations, @@ -2888,13 +3089,14 @@ TEST_P(XdsRbacTestWithActionPermutations, audit_logger->mutable_typed_config()->PackFrom(typed_struct); SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); // An empty RBAC policy leads to all RPCs being rejected. SendRpc( - [this]() { return CreateInsecureChannel(); }, {}, {}, + [this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_ALLOW, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); EXPECT_THAT(audit_logs_, ::testing::ElementsAre()); } @@ -2930,11 +3132,12 @@ TEST_P(XdsRbacTestWithActionPermutations, SetServerRbacPolicies(default_server_listener_, {always_allow, rbac, always_allow}); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // If the second rbac denies the rpc, only one log from the first rbac. // Otherwise, all three rbacs log. std::vector expected( @@ -2976,11 +3179,12 @@ TEST_P(XdsRbacTestWithActionPermutations, MultipleRbacPoliciesWithAuditOnDeny) { SetServerRbacPolicies(default_server_listener_, {always_allow, rbac, always_allow}); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // Only the second rbac logs if it denies the rpc. std::vector expected; if (GetParam().rbac_action() == RBAC_Action_DENY) { @@ -3024,11 +3228,12 @@ TEST_P(XdsRbacTestWithActionPermutations, SetServerRbacPolicies(default_server_listener_, {always_allow, rbac, always_allow}); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); // If the second rbac denies the request, the last rbac won't log. Otherwise // all rbacs log. std::vector expected = { @@ -3073,11 +3278,12 @@ TEST_P(XdsRbacTestWithActionAndAuditConditionPermutations, audit_logger->mutable_typed_config()->PackFrom(typed_struct); SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/GetParam().rbac_action() == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); EXPECT_THAT(audit_logs_, ::testing::ElementsAre()); } @@ -3105,12 +3311,13 @@ TEST_P(XdsRbacTestWithActionAndAuditConditionPermutations, MultipleLoggers) { test_logger->mutable_typed_config()->PackFrom(typed_struct); SetServerRbacPolicy(rbac); backends_[0]->Start(); - backends_[0]->notifier()->WaitOnServingStatusChange( - grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK); + ASSERT_TRUE(backends_[0]->notifier()->WaitOnServingStatusChange( + grpc_core::LocalIpAndPort(backends_[0]->port()), grpc::StatusCode::OK)); auto action = GetParam().rbac_action(); - SendRpc([this]() { return CreateInsecureChannel(); }, {}, {}, + SendRpc([this]() { return CreateInsecureChannel(); }, + RpcOptions().set_wait_for_ready(true), {}, {}, /*test_expects_failure=*/action == RBAC_Action_DENY, - grpc::StatusCode::PERMISSION_DENIED); + grpc::StatusCode::PERMISSION_DENIED, "Unauthorized RPC rejected"); auto audit_condition = GetParam().rbac_audit_condition(); bool should_log = (audit_condition == diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.cc b/test/cpp/end2end/xds/xds_end2end_test_lib.cc index 88dd6af93c657..1ba85995c099e 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.cc +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.cc @@ -38,8 +38,8 @@ #include #include "src/core/ext/filters/http/server/http_server_filter.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/server/server.h" +#include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/xds_client/xds_channel_args.h" @@ -72,15 +72,26 @@ void XdsEnd2endTest::ServerThread::XdsServingStatusNotifier:: cond_.Signal(); } -void XdsEnd2endTest::ServerThread::XdsServingStatusNotifier:: - WaitOnServingStatusChange(std::string uri, - grpc::StatusCode expected_status) { +bool XdsEnd2endTest::ServerThread::XdsServingStatusNotifier:: + WaitOnServingStatusChange(const std::string& uri, + grpc::StatusCode expected_status, + absl::Duration timeout) { grpc_core::MutexLock lock(&mu_); + absl::Time deadline = absl::Now() + timeout * grpc_test_slowdown_factor(); std::map::iterator it; while ((it = status_map.find(uri)) == status_map.end() || it->second.error_code() != expected_status) { - cond_.Wait(&mu_); + if (cond_.WaitWithDeadline(&mu_, deadline)) { + LOG(ERROR) << "\nTimeout Elapsed waiting on serving status " + "change\nExpected status: " + << expected_status << "\nActual:" + << (it == status_map.end() + ? "Entry not found in map" + : absl::StrCat(it->second.error_code())); + return false; + } } + return true; } // @@ -714,33 +725,37 @@ Status XdsEnd2endTest::LongRunningRpc::GetStatus() { return status_; } -std::vector XdsEnd2endTest::SendConcurrentRpcs( +std::vector> +XdsEnd2endTest::SendConcurrentRpcs( const grpc_core::DebugLocation& debug_location, grpc::testing::EchoTestService::Stub* stub, size_t num_rpcs, const RpcOptions& rpc_options) { // Variables for RPCs. - std::vector rpcs(num_rpcs); + std::vector> rpcs; + rpcs.reserve(num_rpcs); EchoRequest request; // Variables for synchronization grpc_core::Mutex mu; grpc_core::CondVar cv; size_t completed = 0; // Set-off callback RPCs - for (size_t i = 0; i < num_rpcs; i++) { - ConcurrentRpc* rpc = &rpcs[i]; + for (size_t i = 0; i < num_rpcs; ++i) { + auto rpc = std::make_unique(); rpc_options.SetupRpc(&rpc->context, &request); grpc_core::Timestamp t0 = NowFromCycleCounter(); - stub->async()->Echo(&rpc->context, &request, &rpc->response, - [rpc, &mu, &completed, &cv, num_rpcs, t0](Status s) { - rpc->status = s; - rpc->elapsed_time = NowFromCycleCounter() - t0; - bool done; - { - grpc_core::MutexLock lock(&mu); - done = (++completed) == num_rpcs; - } - if (done) cv.Signal(); - }); + stub->async()->Echo( + &rpc->context, &request, &rpc->response, + [rpc = rpc.get(), &mu, &completed, &cv, num_rpcs, t0](Status s) { + rpc->status = s; + rpc->elapsed_time = NowFromCycleCounter() - t0; + bool done; + { + grpc_core::MutexLock lock(&mu); + done = (++completed) == num_rpcs; + } + if (done) cv.Signal(); + }); + rpcs.push_back(std::move(rpc)); } { grpc_core::MutexLock lock(&mu); @@ -828,11 +843,26 @@ std::string XdsEnd2endTest::MakeConnectionFailureRegex( "(Connection refused" "|Connection reset by peer" "|Socket closed" + "|Broken pipe" "|FD shutdown)" // errno value "( \\([0-9]+\\))?"); } +std::string XdsEnd2endTest::MakeTlsHandshakeFailureRegex( + absl::string_view prefix) { + return absl::StrCat( + prefix, + "(UNKNOWN|UNAVAILABLE): " + // IP address + "(ipv6:%5B::1%5D|ipv4:127.0.0.1):[0-9]+: " + // Prefixes added for context + "(Failed to connect to remote host: )?" + // Tls handshake failure + "Tls handshake failed \\(TSI_PROTOCOL_FAILURE\\): SSL_ERROR_SSL: " + "error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED"); +} + grpc_core::PemKeyCertPairList XdsEnd2endTest::ReadTlsIdentityPair( const char* key_path, const char* cert_path) { return grpc_core::PemKeyCertPairList{grpc_core::PemKeyCertPair( diff --git a/test/cpp/end2end/xds/xds_end2end_test_lib.h b/test/cpp/end2end/xds/xds_end2end_test_lib.h index 68991fc881cf5..5183e9cd56235 100644 --- a/test/cpp/end2end/xds/xds_end2end_test_lib.h +++ b/test/cpp/end2end/xds/xds_end2end_test_lib.h @@ -217,8 +217,9 @@ class XdsEnd2endTest : public ::testing::TestWithParam, void OnServingStatusUpdate(std::string uri, ServingStatusUpdate update) override; - void WaitOnServingStatusChange(std::string uri, - grpc::StatusCode expected_status); + GRPC_MUST_USE_RESULT bool WaitOnServingStatusChange( + const std::string& uri, grpc::StatusCode expected_status, + absl::Duration timeout = absl::Seconds(10)); private: grpc_core::Mutex mu_; @@ -475,11 +476,11 @@ class XdsEnd2endTest : public ::testing::TestWithParam, size_t backend_idx, ::envoy::config::core::v3::HealthStatus health_status = ::envoy::config::core::v3::HealthStatus::UNKNOWN, - int lb_weight = 1, std::vector additional_backend_indxes = {}, + int lb_weight = 1, std::vector additional_backend_indexes = {}, absl::string_view hostname = "") { std::vector additional_ports; - additional_ports.reserve(additional_backend_indxes.size()); - for (size_t idx : additional_backend_indxes) { + additional_ports.reserve(additional_backend_indexes.size()); + for (size_t idx : additional_backend_indexes) { additional_ports.push_back(backends_[idx]->port()); } return EdsResourceArgs::Endpoint(backends_[backend_idx]->port(), @@ -497,7 +498,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // Returns an endpoint for an unused port, for use in constructing an // EDS resource. - EdsResourceArgs::Endpoint MakeNonExistantEndpoint() { + EdsResourceArgs::Endpoint MakeNonExistentEndpoint() { return EdsResourceArgs::Endpoint(grpc_pick_unused_port_or_die()); } @@ -747,7 +748,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam, const RpcOptions& rpc_options = RpcOptions()); // Sends num_rpcs RPCs, counting how many of them fail with a message - // matching the specfied expected_message_prefix. + // matching the specified expected_message_prefix. // Any failure with a non-matching status or message is a test failure. size_t SendRpcsAndCountFailuresWithMessage( const grpc_core::DebugLocation& debug_location, size_t num_rpcs, @@ -785,7 +786,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam, grpc_core::Duration elapsed_time; EchoResponse response; }; - std::vector SendConcurrentRpcs( + std::vector> SendConcurrentRpcs( const grpc_core::DebugLocation& debug_location, grpc::testing::EchoTestService::Stub* stub, size_t num_rpcs, const RpcOptions& rpc_options); @@ -943,7 +944,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // sigma (standard deviation) to cover the probability area of 99.99994%. In // another word, for a sample with size "n" probability "p" error-tolerance // "k", we want the error always land within 5.00 sigma. The sigma of - // binominal distribution and be computed as sqrt(np(1-p)). Hence, we have + // binomial distribution and be computed as sqrt(np(1-p)). Hence, we have // the equation: // // kn <= 5.00 * sqrt(np(1-p)) @@ -965,6 +966,10 @@ class XdsEnd2endTest : public ::testing::TestWithParam, // message for a connection failure. static std::string MakeConnectionFailureRegex(absl::string_view prefix); + // Returns a regex that can be matched against an RPC failure status + // message for a Tls handshake failure. + static std::string MakeTlsHandshakeFailureRegex(absl::string_view prefix); + // Returns a private key pair, read from local files. static grpc_core::PemKeyCertPairList ReadTlsIdentityPair( const char* key_path, const char* cert_path); diff --git a/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc b/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc index 35653fd8748fb..3c560fc5c5ee8 100644 --- a/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_fault_injection_end2end_test.cc @@ -108,7 +108,7 @@ INSTANTIATE_TEST_SUITE_P( TEST_P(FaultInjectionTest, XdsFaultInjectionAlwaysAbort) { const uint32_t kAbortPercentagePerHundred = 100; // Create an EDS resource - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Construct the fault injection filter config HTTPFault http_fault; @@ -240,12 +240,12 @@ TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageDelay) { // Send kNumRpcs RPCs and count the delays. RpcOptions rpc_options = RpcOptions().set_timeout(kRpcTimeout).set_skip_cancelled_check(true); - std::vector rpcs = + std::vector> rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); size_t num_delayed = 0; for (auto& rpc : rpcs) { - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc.status.error_code()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc->status.error_code()); ++num_delayed; } // The delay rate should be roughly equal to the expectation. @@ -295,12 +295,12 @@ TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageDelayViaHeaders) { .set_metadata(metadata) .set_timeout(kRpcTimeout) .set_skip_cancelled_check(true); - std::vector rpcs = + std::vector> rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); size_t num_delayed = 0; for (auto& rpc : rpcs) { - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc.status.error_code()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc->status.error_code()); ++num_delayed; } // The delay rate should be roughly equal to the expectation. @@ -381,12 +381,12 @@ TEST_P(FaultInjectionTest, XdsFaultInjectionAlwaysDelayPercentageAbort) { // Send kNumRpcs RPCs and count the aborts. int num_aborted = 0; RpcOptions rpc_options = RpcOptions().set_timeout(kRpcTimeout); - std::vector rpcs = + std::vector> rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); for (auto& rpc : rpcs) { - EXPECT_GE(rpc.elapsed_time, kFixedDelay * grpc_test_slowdown_factor()); - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ("Fault injected", rpc.status.error_message()); + EXPECT_GE(rpc->elapsed_time, kFixedDelay * grpc_test_slowdown_factor()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ("Fault injected", rpc->status.error_message()); ++num_aborted; } // The abort rate should be roughly equal to the expectation. @@ -438,12 +438,12 @@ TEST_P(FaultInjectionTest, // Send kNumRpcs RPCs and count the aborts. int num_aborted = 0; RpcOptions rpc_options = RpcOptions().set_timeout(kRpcTimeout); - std::vector rpcs = + std::vector> rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); for (auto& rpc : rpcs) { - EXPECT_GE(rpc.elapsed_time, kFixedDelay * grpc_test_slowdown_factor()); - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ("Fault injected", rpc.status.error_message()); + EXPECT_GE(rpc->elapsed_time, kFixedDelay * grpc_test_slowdown_factor()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ("Fault injected", rpc->status.error_message()); ++num_aborted; } // The abort rate should be roughly equal to the expectation. @@ -481,11 +481,11 @@ TEST_P(FaultInjectionTest, XdsFaultInjectionMaxFault) { // active faults quota. int num_delayed = 0; RpcOptions rpc_options = RpcOptions().set_timeout(kRpcTimeout); - std::vector rpcs = + std::vector> rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); for (auto& rpc : rpcs) { - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc.status.error_code()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc->status.error_code()); ++num_delayed; } // Only kMaxFault number of RPC should be fault injected. @@ -495,8 +495,8 @@ TEST_P(FaultInjectionTest, XdsFaultInjectionMaxFault) { num_delayed = 0; rpcs = SendConcurrentRpcs(DEBUG_LOCATION, stub_.get(), kNumRpcs, rpc_options); for (auto& rpc : rpcs) { - if (rpc.status.error_code() == StatusCode::OK) continue; - EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc.status.error_code()); + if (rpc->status.error_code() == StatusCode::OK) continue; + EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, rpc->status.error_code()); ++num_delayed; } // Only kMaxFault number of RPC should be fault injected. If the max fault diff --git a/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc b/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc index 99c5b38ded188..17df1d08cac5d 100644 --- a/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_outlier_detection_end2end_test.cc @@ -266,7 +266,7 @@ TEST_P(OutlierDetectionTest, SuccessRateStdevFactor) { gpr_sleep_until(grpc_timeout_milliseconds_to_deadline( 3000 * grpc_test_slowdown_factor())); ResetBackendCounters(); - // 1 backend experenced failure, but since the stdev_factor is high, no + // 1 backend experienced failure, but since the stdev_factor is high, no // backend will be noticed as an outlier so no ejection. // Both backends are still getting the RPCs intended for them. CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options); @@ -326,9 +326,9 @@ TEST_P(OutlierDetectionTest, SuccessRateEnforcementPercentage) { gpr_sleep_until(grpc_timeout_milliseconds_to_deadline( 3000 * grpc_test_slowdown_factor())); ResetBackendCounters(); - // 1 backend experenced failure, but since the enforcement percentage is 0, no - // backend will be ejected. - // Both backends are still getting the RPCs intended for them. + // 1 backend experienced failure, but since the enforcement percentage is 0, + // no backend will be ejected. Both backends are still getting the RPCs + // intended for them. CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options); CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1); EXPECT_EQ(100, backends_[0]->backend_service()->request_count()); @@ -677,7 +677,7 @@ TEST_P(OutlierDetectionTest, FailurePercentageThreshold) { gpr_sleep_until(grpc_timeout_milliseconds_to_deadline( 3000 * grpc_test_slowdown_factor())); ResetBackendCounters(); - // 1 backend experenced 1 failure, but since the threshold is 50 % no + // 1 backend experienced 1 failure, but since the threshold is 50 % no // backend will be noticed as an outlier so no ejection. // Both backends are still getting the RPCs intended for them. CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options); @@ -738,9 +738,9 @@ TEST_P(OutlierDetectionTest, FailurePercentageEnforcementPercentage) { gpr_sleep_until(grpc_timeout_milliseconds_to_deadline( 3000 * grpc_test_slowdown_factor())); ResetBackendCounters(); - // 1 backend experenced failure, but since the enforcement percentage is 0, no - // backend will be ejected. - // Both backends are still getting the RPCs intended for them. + // 1 backend experienced failure, but since the enforcement percentage is 0, + // no backend will be ejected. Both backends are still getting the RPCs + // intended for them. CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options); CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1); EXPECT_EQ(100, backends_[0]->backend_service()->request_count()); @@ -935,7 +935,7 @@ TEST_P(OutlierDetectionTest, SuccessRateAndFailurePercentage) { // Cause 2 errors on 1 backend and 1 error on 2 backends and wait for 2 // backends to be ejected. The 2 errors to the 1 backend will make exactly 1 // outlier from the success rate algorithm; all 4 errors will make 3 outliers - // from the failure pecentage algorithm because the threahold is set to 0. I + // from the failure percentage algorithm because the threshold is set to 0. I // have verified through debug logs we eject 1 backend because of success // rate, 1 backend because of failure percentage; but as we attempt to eject // another backend because of failure percentage we will stop as we have @@ -1037,7 +1037,7 @@ TEST_P(OutlierDetectionTest, SuccessRateAndFailurePercentageBothDisabled) { gpr_sleep_until(grpc_timeout_milliseconds_to_deadline( 3000 * grpc_test_slowdown_factor())); ResetBackendCounters(); - // 1 backend experenced failure, but since there is no counting there is no + // 1 backend experienced failure, but since there is no counting there is no // ejection. Both backends are still getting the RPCs intended for them. CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options); CheckRpcSendOk(DEBUG_LOCATION, 100, rpc_options1); @@ -1136,7 +1136,7 @@ TEST_P(OutlierDetectionTest, EjectionRetainedAcrossPriorities) { // Priority 0: backend 0 and a non-existent backend. // Priority 1: backend 1. EdsResourceArgs args({ - {"locality0", {CreateEndpoint(0), MakeNonExistantEndpoint()}}, + {"locality0", {CreateEndpoint(0), MakeNonExistentEndpoint()}}, {"locality1", {CreateEndpoint(1)}, kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); @@ -1156,7 +1156,7 @@ TEST_P(OutlierDetectionTest, EjectionRetainedAcrossPriorities) { // Now send an EDS update that moves backend 0 to priority 1. // We also add backend 2, so that we know when the client sees the update. args = EdsResourceArgs({ - {"locality0", {MakeNonExistantEndpoint()}}, + {"locality0", {MakeNonExistentEndpoint()}}, {"locality1", CreateEndpointsForBackends(), kDefaultLocalityWeight, 1}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); diff --git a/test/cpp/end2end/xds/xds_override_host_end2end_test.cc b/test/cpp/end2end/xds/xds_override_host_end2end_test.cc index 88f57285c2198..69eb72cbddd60 100644 --- a/test/cpp/end2end/xds/xds_override_host_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_override_host_end2end_test.cc @@ -24,7 +24,7 @@ #include "absl/strings/str_split.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/time.h" +#include "src/core/util/time.h" #include "src/proto/grpc/testing/xds/v3/stateful_session.pb.h" #include "src/proto/grpc/testing/xds/v3/stateful_session_cookie.pb.h" #include "test/core/test_util/scoped_env_var.h" diff --git a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc index c637f6375526d..f0d6796691d81 100644 --- a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc @@ -32,9 +32,9 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/fake/fake_resolver.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/pick_first.pb.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc b/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc index 70188884d2efc..86aba3e812196 100644 --- a/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc @@ -29,9 +29,9 @@ #include "src/core/client_channel/backup_poller.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/resolver/fake/fake_resolver.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/xds/v3/aggregate_cluster.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" #include "test/core/test_util/resolve_localhost_ip46.h" @@ -105,7 +105,7 @@ TEST_P(RingHashTest, AggregateClusterFallBackFromRingHashAtStartup) { const char* kNewEdsService2Name = "new_eds_service_name_2"; // Populate new EDS resources. EdsResourceArgs args1({ - {"locality0", {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}}, + {"locality0", {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}}, }); EdsResourceArgs args2({ {"locality0", CreateEndpointsForBackends()}, @@ -166,11 +166,11 @@ TEST_P(RingHashTest, // Populate EDS resource. EdsResourceArgs args({ {"locality0", - {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}, + {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, {"locality1", - {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}, + {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, }); @@ -234,11 +234,11 @@ TEST_P(RingHashTest, // Populate EDS resource. EdsResourceArgs args({ {"locality0", - {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}, + {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 0}, {"locality1", - {MakeNonExistantEndpoint(), MakeNonExistantEndpoint()}, + {MakeNonExistentEndpoint(), MakeNonExistentEndpoint()}, kDefaultLocalityWeight, 1}, }); @@ -786,9 +786,9 @@ TEST_P(RingHashTest, IdleToReady) { TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) { // Create EDS resource. CreateAndStartBackends(1); - auto non_existant_endpoint = MakeNonExistantEndpoint(); + auto non_existent_endpoint = MakeNonExistentEndpoint(); EdsResourceArgs args( - {{"locality0", {non_existant_endpoint, CreateEndpoint(0)}}}); + {{"locality0", {non_existent_endpoint, CreateEndpoint(0)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Change CDS resource to use RING_HASH. auto cluster = default_cluster_; @@ -804,12 +804,12 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) { // Start connection attempt injector and add a hold for the P0 // connection attempt. ConnectionAttemptInjector injector; - auto hold = injector.AddHold(non_existant_endpoint.port); + auto hold = injector.AddHold(non_existent_endpoint.port); // A long-running RPC, just used to send the RPC in another thread. LongRunningRpc rpc; std::vector> metadata = { {"address_hash", - CreateMetadataValueThatHashesToBackendPort(non_existant_endpoint.port)}}; + CreateMetadataValueThatHashesToBackendPort(non_existent_endpoint.port)}}; rpc.StartRpc(stub_.get(), RpcOptions().set_timeout_ms(0).set_metadata( std::move(metadata))); // Wait for the RPC to trigger the P0 connection attempt, then cancel it, @@ -829,12 +829,12 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicks) { TEST_P(RingHashTest, ContinuesConnectingWithoutPicksOneSubchannelAtATime) { // Create EDS resource. CreateAndStartBackends(1); - auto non_existant_endpoint0 = MakeNonExistantEndpoint(); - auto non_existant_endpoint1 = MakeNonExistantEndpoint(); - auto non_existant_endpoint2 = MakeNonExistantEndpoint(); + auto non_existent_endpoint0 = MakeNonExistentEndpoint(); + auto non_existent_endpoint1 = MakeNonExistentEndpoint(); + auto non_existent_endpoint2 = MakeNonExistentEndpoint(); EdsResourceArgs args({{"locality0", - {non_existant_endpoint0, non_existant_endpoint1, - non_existant_endpoint2, CreateEndpoint(0)}}}); + {non_existent_endpoint0, non_existent_endpoint1, + non_existent_endpoint2, CreateEndpoint(0)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); // Change CDS resource to use RING_HASH. auto cluster = default_cluster_; @@ -849,59 +849,59 @@ TEST_P(RingHashTest, ContinuesConnectingWithoutPicksOneSubchannelAtATime) { new_route_config); // Start connection attempt injector. ConnectionAttemptInjector injector; - auto hold_non_existant0 = injector.AddHold(non_existant_endpoint0.port); - auto hold_non_existant1 = injector.AddHold(non_existant_endpoint1.port); - auto hold_non_existant2 = injector.AddHold(non_existant_endpoint2.port); + auto hold_non_existent0 = injector.AddHold(non_existent_endpoint0.port); + auto hold_non_existent1 = injector.AddHold(non_existent_endpoint1.port); + auto hold_non_existent2 = injector.AddHold(non_existent_endpoint2.port); auto hold_good = injector.AddHold(backends_[0]->port()); // A long-running RPC, just used to send the RPC in another thread. LongRunningRpc rpc; std::vector> metadata = { {"address_hash", CreateMetadataValueThatHashesToBackendPort( - non_existant_endpoint0.port)}}; + non_existent_endpoint0.port)}}; rpc.StartRpc(stub_.get(), RpcOptions().set_timeout_ms(0).set_metadata( std::move(metadata))); // Wait for the RPC to trigger a connection attempt to the first address, // then cancel the RPC. No other connection attempts should be started yet. - hold_non_existant0->Wait(); + hold_non_existent0->Wait(); rpc.CancelRpc(); - EXPECT_FALSE(hold_non_existant1->IsStarted()); - EXPECT_FALSE(hold_non_existant2->IsStarted()); + EXPECT_FALSE(hold_non_existent1->IsStarted()); + EXPECT_FALSE(hold_non_existent2->IsStarted()); EXPECT_FALSE(hold_good->IsStarted()); // Allow the connection attempt to the first address to resume and wait // for the attempt for the second address. No other connection // attempts should be started yet. - auto hold_non_existant0_again = injector.AddHold(non_existant_endpoint0.port); - hold_non_existant0->Resume(); - hold_non_existant1->Wait(); - EXPECT_FALSE(hold_non_existant0_again->IsStarted()); - EXPECT_FALSE(hold_non_existant2->IsStarted()); + auto hold_non_existent0_again = injector.AddHold(non_existent_endpoint0.port); + hold_non_existent0->Resume(); + hold_non_existent1->Wait(); + EXPECT_FALSE(hold_non_existent0_again->IsStarted()); + EXPECT_FALSE(hold_non_existent2->IsStarted()); EXPECT_FALSE(hold_good->IsStarted()); // Allow the connection attempt to the second address to resume and wait // for the attempt for the third address. No other connection // attempts should be started yet. - auto hold_non_existant1_again = injector.AddHold(non_existant_endpoint1.port); - hold_non_existant1->Resume(); - hold_non_existant2->Wait(); - EXPECT_FALSE(hold_non_existant0_again->IsStarted()); - EXPECT_FALSE(hold_non_existant1_again->IsStarted()); + auto hold_non_existent1_again = injector.AddHold(non_existent_endpoint1.port); + hold_non_existent1->Resume(); + hold_non_existent2->Wait(); + EXPECT_FALSE(hold_non_existent0_again->IsStarted()); + EXPECT_FALSE(hold_non_existent1_again->IsStarted()); EXPECT_FALSE(hold_good->IsStarted()); // Allow the connection attempt to the third address to resume and wait // for the attempt for the final address. No other connection // attempts should be started yet. - auto hold_non_existant2_again = injector.AddHold(non_existant_endpoint2.port); - hold_non_existant2->Resume(); + auto hold_non_existent2_again = injector.AddHold(non_existent_endpoint2.port); + hold_non_existent2->Resume(); hold_good->Wait(); - EXPECT_FALSE(hold_non_existant0_again->IsStarted()); - EXPECT_FALSE(hold_non_existant1_again->IsStarted()); - EXPECT_FALSE(hold_non_existant2_again->IsStarted()); + EXPECT_FALSE(hold_non_existent0_again->IsStarted()); + EXPECT_FALSE(hold_non_existent1_again->IsStarted()); + EXPECT_FALSE(hold_non_existent2_again->IsStarted()); // Allow the final attempt to resume. hold_good->Resume(); // Wait for channel to become connected without any pending RPC. EXPECT_TRUE(channel_->WaitForConnected(grpc_timeout_seconds_to_deadline(10))); // No other connection attempts should have been started. - EXPECT_FALSE(hold_non_existant0_again->IsStarted()); - EXPECT_FALSE(hold_non_existant1_again->IsStarted()); - EXPECT_FALSE(hold_non_existant2_again->IsStarted()); + EXPECT_FALSE(hold_non_existent0_again->IsStarted()); + EXPECT_FALSE(hold_non_existent1_again->IsStarted()); + EXPECT_FALSE(hold_non_existent2_again->IsStarted()); // RPC should have been cancelled. EXPECT_EQ(StatusCode::CANCELLED, rpc.GetStatus().error_code()); // Make sure the backend did not get any requests. @@ -940,7 +940,7 @@ TEST_P(RingHashTest, TransientFailureCheckNextOne) { // Test that when a backend goes down, we will move on to the next subchannel // (with a lower priority). When the backend comes back up, traffic will move // back. -TEST_P(RingHashTest, SwitchToLowerPrioirtyAndThenBack) { +TEST_P(RingHashTest, SwitchToLowerPriorityAndThenBack) { CreateAndStartBackends(2); auto cluster = default_cluster_; cluster.set_lb_policy(Cluster::RING_HASH); @@ -990,7 +990,7 @@ TEST_P(RingHashTest, ReattemptWhenAllEndpointsUnreachable) { SetListenerAndRouteConfiguration(balancer_.get(), default_listener_, new_route_config); EdsResourceArgs args( - {{"locality0", {MakeNonExistantEndpoint(), CreateEndpoint(0)}}}); + {{"locality0", {MakeNonExistentEndpoint(), CreateEndpoint(0)}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); std::vector> metadata = { {"address_hash", CreateMetadataValueThatHashesToBackend(0)}}; @@ -1024,8 +1024,8 @@ TEST_P(RingHashTest, TransientFailureSkipToAvailableReady) { // Make sure we include some unused ports to fill the ring. EdsResourceArgs args({ {"locality0", - {CreateEndpoint(0), CreateEndpoint(1), MakeNonExistantEndpoint(), - MakeNonExistantEndpoint()}}, + {CreateEndpoint(0), CreateEndpoint(1), MakeNonExistentEndpoint(), + MakeNonExistentEndpoint()}}, }); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); std::vector> metadata = { @@ -1124,7 +1124,7 @@ TEST_P(RingHashTest, ReattemptWhenGoingFromTransientFailureToIdle) { EXPECT_EQ(GRPC_CHANNEL_READY, channel_->GetState(false)); } -// Test unspported hash policy types are all ignored before a supported +// Test unsupported hash policy types are all ignored before a supported // policy. TEST_P(RingHashTest, UnsupportedHashPolicyUntilChannelIdHashing) { CreateAndStartBackends(2); diff --git a/test/cpp/end2end/xds/xds_rls_end2end_test.cc b/test/cpp/end2end/xds/xds_rls_end2end_test.cc index 4e18874b7e8eb..2297d159ca941 100644 --- a/test/cpp/end2end/xds/xds_rls_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_rls_end2end_test.cc @@ -23,7 +23,7 @@ #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/core/util/env.h" #include "src/proto/grpc/lookup/v1/rls.grpc.pb.h" #include "src/proto/grpc/lookup/v1/rls.pb.h" #include "src/proto/grpc/lookup/v1/rls_config.pb.h" diff --git a/test/cpp/end2end/xds/xds_routing_end2end_test.cc b/test/cpp/end2end/xds/xds_routing_end2end_test.cc index 1c6369f0cc3ba..7b7a2be9a5236 100644 --- a/test/cpp/end2end/xds/xds_routing_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_routing_end2end_test.cc @@ -472,7 +472,7 @@ TEST_P(LdsRdsTest, ChooseLastRoute) { } TEST_P(LdsRdsTest, NoMatchingRoute) { - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); RouteConfiguration route_config = default_route_config_; route_config.mutable_virtual_hosts(0) @@ -531,7 +531,7 @@ TEST_P(LdsRdsTest, NacksInvalidRouteConfig) { // Tests that LDS client should fail RPCs with UNAVAILABLE status code if the // matching route has an action other than RouteAction. TEST_P(LdsRdsTest, MatchingRouteHasNoRouteAction) { - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); RouteConfiguration route_config = default_route_config_; // Set a route with an inappropriate route action @@ -1548,10 +1548,10 @@ TEST_P(LdsRdsTest, XdsRoutingApplyXdsTimeout) { const char* kNewCluster3Name = "new_cluster_3"; const char* kNewEdsService3Name = "new_eds_service_name_3"; // Populate new EDS resources. - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); - EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}}); - EdsResourceArgs args2({{"locality0", {MakeNonExistantEndpoint()}}}); - EdsResourceArgs args3({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); + EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}}); + EdsResourceArgs args2({{"locality0", {MakeNonExistentEndpoint()}}}); + EdsResourceArgs args3({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); balancer_->ads_service()->SetEdsResource( BuildEdsResource(args1, kNewEdsService1Name)); @@ -1661,9 +1661,9 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenXdsTimeoutExplicit) { const char* kNewCluster2Name = "new_cluster_2"; const char* kNewEdsService2Name = "new_eds_service_name_2"; // Populate new EDS resources. - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); - EdsResourceArgs args1({{"locality0", {MakeNonExistantEndpoint()}}}); - EdsResourceArgs args2({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); + EdsResourceArgs args1({{"locality0", {MakeNonExistentEndpoint()}}}); + EdsResourceArgs args2({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); balancer_->ads_service()->SetEdsResource( BuildEdsResource(args1, kNewEdsService1Name)); @@ -1749,7 +1749,7 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenXdsTimeoutExplicit) { TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenHttpTimeoutExplicit) { const auto kTimeoutApplication = grpc_core::Duration::Milliseconds(4500); // Populate new EDS resources. - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); auto listener = default_listener_; HttpConnectionManager http_connection_manager; @@ -1784,7 +1784,7 @@ TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenHttpTimeoutExplicit) { TEST_P(LdsRdsTest, XdsRoutingWithOnlyApplicationTimeout) { const auto kTimeoutApplication = grpc_core::Duration::Milliseconds(4500); // Populate new EDS resources. - EdsResourceArgs args({{"locality0", {MakeNonExistantEndpoint()}}}); + EdsResourceArgs args({{"locality0", {MakeNonExistentEndpoint()}}}); balancer_->ads_service()->SetEdsResource(BuildEdsResource(args)); auto t0 = system_clock::now(); CheckRpcSendFailure( diff --git a/test/cpp/end2end/xds/xds_server.cc b/test/cpp/end2end/xds/xds_server.cc index a4019c7fdfed5..bbae462c994be 100644 --- a/test/cpp/end2end/xds/xds_server.cc +++ b/test/cpp/end2end/xds/xds_server.cc @@ -27,8 +27,8 @@ #include "absl/types/optional.h" #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/xds/v3/ads.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/discovery.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/lrs.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_server.h b/test/cpp/end2end/xds/xds_server.h index 4cd3982c9551f..4131362f7b05b 100644 --- a/test/cpp/end2end/xds/xds_server.h +++ b/test/cpp/end2end/xds/xds_server.h @@ -30,8 +30,8 @@ #include #include "src/core/lib/address_utils/parse_address.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/xds/v3/ads.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/discovery.grpc.pb.h" diff --git a/test/cpp/end2end/xds/xds_utils.cc b/test/cpp/end2end/xds/xds_utils.cc index b1b69ddcc54be..c52e819172eb1 100644 --- a/test/cpp/end2end/xds/xds_utils.cc +++ b/test/cpp/end2end/xds/xds_utils.cc @@ -34,8 +34,8 @@ #include #include "src/core/ext/filters/http/server/http_server_filter.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/server/server.h" +#include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/core/xds/grpc/xds_client_grpc.h" #include "src/core/xds/xds_client/xds_channel_args.h" diff --git a/test/cpp/ext/csm/mesh_id_test.cc b/test/cpp/ext/csm/mesh_id_test.cc index 7d0b8ba8c21b4..e1a7f86fc80aa 100644 --- a/test/cpp/ext/csm/mesh_id_test.cc +++ b/test/cpp/ext/csm/mesh_id_test.cc @@ -20,7 +20,7 @@ #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/cpp/ext/csm/metadata_exchange.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/ext/csm/metadata_exchange_test.cc b/test/cpp/ext/csm/metadata_exchange_test.cc index f83577cc7d921..1b85eaf185a37 100644 --- a/test/cpp/ext/csm/metadata_exchange_test.cc +++ b/test/cpp/ext/csm/metadata_exchange_test.cc @@ -30,8 +30,8 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/env.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/env.h" #include "src/core/util/tmpfile.h" #include "src/cpp/ext/csm/csm_observability.h" #include "src/cpp/ext/otel/otel_plugin.h" diff --git a/test/cpp/ext/filters/logging/library.h b/test/cpp/ext/filters/logging/library.h index 92b7311c5a6a8..f1ca3fc9576ba 100644 --- a/test/cpp/ext/filters/logging/library.h +++ b/test/cpp/ext/filters/logging/library.h @@ -35,7 +35,7 @@ #include #include "src/core/ext/filters/logging/logging_filter.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/gcp/observability_logging_sink.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/ext/filters/logging/logging_census_integration_test.cc b/test/cpp/ext/filters/logging/logging_census_integration_test.cc index b8c196d1c09d7..622c93ffbb415 100644 --- a/test/cpp/ext/filters/logging/logging_census_integration_test.cc +++ b/test/cpp/ext/filters/logging/logging_census_integration_test.cc @@ -32,7 +32,7 @@ #include "src/core/ext/filters/logging/logging_filter.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/gcp/observability_logging_sink.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/ext/filters/logging/logging_test.cc b/test/cpp/ext/filters/logging/logging_test.cc index 09df6f7f90617..6441e1cefcf4b 100644 --- a/test/cpp/ext/filters/logging/logging_test.cc +++ b/test/cpp/ext/filters/logging/logging_test.cc @@ -29,8 +29,8 @@ #include #include "src/core/ext/filters/logging/logging_filter.h" -#include "src/core/lib/gprpp/dump_args.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/dump_args.h" +#include "src/core/util/sync.h" #include "src/cpp/ext/gcp/observability_logging_sink.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo_messages.pb.h" diff --git a/test/cpp/ext/gcp/environment_autodetect_test.cc b/test/cpp/ext/gcp/environment_autodetect_test.cc index 947f18838bd18..d466a48ba933f 100644 --- a/test/cpp/ext/gcp/environment_autodetect_test.cc +++ b/test/cpp/ext/gcp/environment_autodetect_test.cc @@ -29,8 +29,8 @@ #include -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/env.h" +#include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" namespace grpc { diff --git a/test/cpp/ext/gcp/observability_config_test.cc b/test/cpp/ext/gcp/observability_config_test.cc index 4a586ba217533..391832b13d50d 100644 --- a/test/cpp/ext/gcp/observability_config_test.cc +++ b/test/cpp/ext/gcp/observability_config_test.cc @@ -22,7 +22,7 @@ #include #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/tmpfile.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/ext/otel/otel_plugin_test.cc b/test/cpp/ext/otel/otel_plugin_test.cc index 22b971ac370be..d5f95377d00cd 100644 --- a/test/cpp/ext/otel/otel_plugin_test.cc +++ b/test/cpp/ext/otel/otel_plugin_test.cc @@ -2085,6 +2085,53 @@ TEST_F(OpenTelemetryPluginCallbackMetricsTest, VerifyCallbacksAreCleanedUp) { EXPECT_EQ(report_count_2, 2 * kIterations); } +TEST_F(OpenTelemetryPluginCallbackMetricsTest, + ReportDifferentGaugeThanRegisteredWontCrash) { + constexpr absl::string_view kInt64CallbackGaugeMetric = + "yet_another_int64_callback_gauge"; + constexpr absl::string_view kDoubleCallbackGaugeMetric = + "yet_another_double_callback_gauge"; + auto integer_gauge_handle = + grpc_core::GlobalInstrumentsRegistry::RegisterCallbackInt64Gauge( + kInt64CallbackGaugeMetric, "An int64 callback gauge.", "unit", + /*enable_by_default=*/true) + .Build(); + auto double_gauge_handle = + grpc_core::GlobalInstrumentsRegistry::RegisterCallbackDoubleGauge( + kDoubleCallbackGaugeMetric, "A double callback gauge.", "unit", + /*enable_by_default=*/true) + .Build(); + Init(std::move(Options().set_metric_names( + {kInt64CallbackGaugeMetric, kDoubleCallbackGaugeMetric}))); + auto stats_plugins = + grpc_core::GlobalStatsPluginRegistry::GetStatsPluginsForChannel( + grpc_core::experimental::StatsPluginChannelScope( + "dns:///localhost:8080", "", endpoint_config_)); + // Registers integer_gauge_handle but reports double_gauge_handle. + int report_count_1 = 0; + double double_value_1 = 0.5; + auto registered_metric_callback_1 = stats_plugins.RegisterCallback( + [&](grpc_core::CallbackMetricReporter& reporter) { + ++report_count_1; + reporter.Report(double_gauge_handle, double_value_1++, {}, {}); + }, + grpc_core::Duration::Milliseconds(50) * grpc_test_slowdown_factor(), + integer_gauge_handle); + constexpr int kIterations = 50; + { + MetricsCollectorThread collector{ + this, + grpc_core::Duration::Milliseconds(100) * grpc_test_slowdown_factor(), + kIterations, + [&](const absl::flat_hash_map< + std::string, + std::vector>& + data) { return false; }}; + } + // Verify that callbacks are invoked + EXPECT_EQ(report_count_1, kIterations); +} + TEST(OpenTelemetryPluginMetricsEnablingDisablingTest, TestEnableDisableAPIs) { grpc::internal::OpenTelemetryPluginBuilderImpl builder; // First disable all metrics diff --git a/test/cpp/ext/otel/otel_test_library.cc b/test/cpp/ext/otel/otel_test_library.cc index 7bc0daac2615c..131aeef222fde 100644 --- a/test/cpp/ext/otel/otel_test_library.cc +++ b/test/cpp/ext/otel/otel_test_library.cc @@ -33,8 +33,8 @@ #include "src/core/lib/channel/promise_based_filter.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/telemetry/call_tracer.h" +#include "src/core/util/notification.h" #include "test/core/test_util/fake_stats_plugin.h" #include "test/core/test_util/test_config.h" #include "test/cpp/end2end/test_service_impl.h" diff --git a/test/cpp/interop/backend_metrics_lb_policy_test.cc b/test/cpp/interop/backend_metrics_lb_policy_test.cc index 56d5e9f6e9602..0a5fb277bab87 100644 --- a/test/cpp/interop/backend_metrics_lb_policy_test.cc +++ b/test/cpp/interop/backend_metrics_lb_policy_test.cc @@ -31,7 +31,7 @@ #include #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 8a708c345dac5..fe211e71ddb7b 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/client_helper.h" diff --git a/test/cpp/interop/grpclb_fallback_test.cc b/test/cpp/interop/grpclb_fallback_test.cc index 594c5b6b39b94..7d3c637fee214 100644 --- a/test/cpp/interop/grpclb_fallback_test.cc +++ b/test/cpp/interop/grpclb_fallback_test.cc @@ -43,9 +43,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/socket_mutator.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/http2_client.cc b/test/cpp/interop/http2_client.cc index 62c728d4c7868..d19b0b6616a89 100644 --- a/test/cpp/interop/http2_client.cc +++ b/test/cpp/interop/http2_client.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "src/core/util/useful.h" #include "src/proto/grpc/testing/messages.pb.h" diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 1cfcb10be65a6..1190ecd747618 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -43,7 +43,7 @@ #include "src/core/lib/config/config_vars.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index fb7d3430107a5..25f5f633bfc1d 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -35,9 +35,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index d46e2a531cd8a..1134971371d0f 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -34,8 +34,8 @@ #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/port.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/interop/istio_echo_server.cc b/test/cpp/interop/istio_echo_server.cc index e81b1b2f17039..bb24edcae46ea 100644 --- a/test/cpp/interop/istio_echo_server.cc +++ b/test/cpp/interop/istio_echo_server.cc @@ -45,9 +45,9 @@ #include #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/iomgr/gethostname.h" +#include "src/core/util/env.h" +#include "src/core/util/gethostname.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/istio_echo.pb.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/istio_echo_server_lib.h" diff --git a/test/cpp/interop/istio_echo_server_lib.cc b/test/cpp/interop/istio_echo_server_lib.cc index cb39a15cf997c..f0ddd49c80abc 100644 --- a/test/cpp/interop/istio_echo_server_lib.cc +++ b/test/cpp/interop/istio_echo_server_lib.cc @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/istio_echo.pb.h" using proto::EchoRequest; diff --git a/test/cpp/interop/istio_echo_server_test.cc b/test/cpp/interop/istio_echo_server_test.cc index 8f1e39c2c3ce5..faa9a47ac570b 100644 --- a/test/cpp/interop/istio_echo_server_test.cc +++ b/test/cpp/interop/istio_echo_server_test.cc @@ -27,8 +27,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/istio_echo_server_lib.h" diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc index c42208fd46c21..9eb4f488b1451 100644 --- a/test/cpp/interop/metrics_client.cc +++ b/test/cpp/interop/metrics_client.cc @@ -23,7 +23,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/interop/observability_client.cc b/test/cpp/interop/observability_client.cc index 247ab1d173806..c264aa504ec0b 100644 --- a/test/cpp/interop/observability_client.cc +++ b/test/cpp/interop/observability_client.cc @@ -32,7 +32,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/core/util/string.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/client_helper.h" diff --git a/test/cpp/interop/pre_stop_hook_server.cc b/test/cpp/interop/pre_stop_hook_server.cc index ff9def05fd2ed..a00ab791a9db3 100644 --- a/test/cpp/interop/pre_stop_hook_server.cc +++ b/test/cpp/interop/pre_stop_hook_server.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/messages.pb.h" namespace grpc { diff --git a/test/cpp/interop/pre_stop_hook_server.h b/test/cpp/interop/pre_stop_hook_server.h index c491d4140dfa4..a2ab3f35568e9 100644 --- a/test/cpp/interop/pre_stop_hook_server.h +++ b/test/cpp/interop/pre_stop_hook_server.h @@ -22,7 +22,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/pre_stop_hook_server_test.cc b/test/cpp/interop/pre_stop_hook_server_test.cc index c1da2a6a624fc..32aa91b1bc2c6 100644 --- a/test/cpp/interop/pre_stop_hook_server_test.cc +++ b/test/cpp/interop/pre_stop_hook_server_test.cc @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/reconnect_interop_client.cc b/test/cpp/interop/reconnect_interop_client.cc index bdc7b27aa077c..1c2e4837ec050 100644 --- a/test/cpp/interop/reconnect_interop_client.cc +++ b/test/cpp/interop/reconnect_interop_client.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/reconnect_interop_server.cc b/test/cpp/interop/reconnect_interop_server.cc index 656bf77e906bc..a5ac668bb2939 100644 --- a/test/cpp/interop/reconnect_interop_server.cc +++ b/test/cpp/interop/reconnect_interop_server.cc @@ -34,7 +34,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 91a33d2547c00..0ccacfaefb114 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -28,7 +28,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/metrics_server.h" diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index a87d8b7d2cd75..3f27484111cde 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -33,7 +33,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" #include "test/cpp/interop/interop_client.h" diff --git a/test/cpp/interop/xds_interop_client.cc b/test/cpp/interop/xds_interop_client.cc index 8480c24691df5..f3af46b19f2b4 100644 --- a/test/cpp/interop/xds_interop_client.cc +++ b/test/cpp/interop/xds_interop_client.cc @@ -48,7 +48,7 @@ #include #include "src/core/lib/channel/status_util.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" diff --git a/test/cpp/interop/xds_interop_server.cc b/test/cpp/interop/xds_interop_server.cc index 09553cb82b60b..eb2fa7ad08f1f 100644 --- a/test/cpp/interop/xds_interop_server.cc +++ b/test/cpp/interop/xds_interop_server.cc @@ -28,7 +28,7 @@ #include #include -#include "src/core/lib/iomgr/gethostname.h" +#include "src/core/util/gethostname.h" #include "test/core/test_util/test_config.h" #include "test/cpp/interop/xds_interop_server_lib.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/interop/xds_interop_server_test.cc b/test/cpp/interop/xds_interop_server_test.cc index 479bf9125c3d4..808924ed0b342 100644 --- a/test/cpp/interop/xds_interop_server_test.cc +++ b/test/cpp/interop/xds_interop_server_test.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "src/proto/grpc/testing/empty.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/microbenchmarks/bm_basic_work_queue.cc b/test/cpp/microbenchmarks/bm_basic_work_queue.cc index 320c8fc509370..c84cd3d1829d0 100644 --- a/test/cpp/microbenchmarks/bm_basic_work_queue.cc +++ b/test/cpp/microbenchmarks/bm_basic_work_queue.cc @@ -22,7 +22,7 @@ #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/work_queue/basic_work_queue.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" #include "test/core/test_util/test_config.h" namespace { diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 1a8bda0380b1b..90d4ccee01f0d 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -34,13 +34,13 @@ #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/timeout_encoding.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 6b769f7da7f51..6b490df906bf6 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -27,9 +27,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index e0144995e0d78..f504af9f5fedf 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -28,11 +28,11 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/time.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/crash.h" +#include "src/core/util/time.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_event_engine_run.cc b/test/cpp/microbenchmarks/bm_event_engine_run.cc index 8693024f95596..5f70aea856f5c 100644 --- a/test/cpp/microbenchmarks/bm_event_engine_run.cc +++ b/test/cpp/microbenchmarks/bm_event_engine_run.cc @@ -29,8 +29,8 @@ #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/default_event_engine.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_exec_ctx.cc b/test/cpp/microbenchmarks/bm_exec_ctx.cc index 3df871af00e61..4a464856764c5 100644 --- a/test/cpp/microbenchmarks/bm_exec_ctx.cc +++ b/test/cpp/microbenchmarks/bm_exec_ctx.cc @@ -19,8 +19,8 @@ #include -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/util/notification.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" diff --git a/test/cpp/microbenchmarks/bm_huffman_decode.cc b/test/cpp/microbenchmarks/bm_huffman_decode.cc index 1766f02826916..59a684f129884 100644 --- a/test/cpp/microbenchmarks/bm_huffman_decode.cc +++ b/test/cpp/microbenchmarks/bm_huffman_decode.cc @@ -21,8 +21,8 @@ #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/decode_huff.h" -#include "src/core/lib/gprpp/no_destruct.h" #include "src/core/lib/slice/slice.h" +#include "src/core/util/no_destruct.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/huffman_geometries/index.h" diff --git a/test/cpp/microbenchmarks/bm_rng.cc b/test/cpp/microbenchmarks/bm_rng.cc index 8797ee633a6a6..bf84e39910e56 100644 --- a/test/cpp/microbenchmarks/bm_rng.cc +++ b/test/cpp/microbenchmarks/bm_rng.cc @@ -22,7 +22,7 @@ #include "absl/random/random.h" -#include "src/core/lib/gprpp/sync.h" +#include "src/core/util/sync.h" static void BM_OneRngFromFreshBitSet(benchmark::State& state) { for (auto _ : state) { diff --git a/test/cpp/microbenchmarks/bm_thread_pool.cc b/test/cpp/microbenchmarks/bm_thread_pool.cc index 323c5267c564f..620a7ce7d1c72 100644 --- a/test/cpp/microbenchmarks/bm_thread_pool.cc +++ b/test/cpp/microbenchmarks/bm_thread_pool.cc @@ -27,8 +27,8 @@ #include "src/core/lib/event_engine/common_closures.h" #include "src/core/lib/event_engine/thread_pool/thread_pool.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" #include "src/core/util/useful.h" #include "test/core/test_util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/fullstack_context_mutators.h b/test/cpp/microbenchmarks/fullstack_context_mutators.h index 29b668ddf3069..f239052e80ba8 100644 --- a/test/cpp/microbenchmarks/fullstack_context_mutators.h +++ b/test/cpp/microbenchmarks/fullstack_context_mutators.h @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/cpp/microbenchmarks/helpers.h" namespace grpc { diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index dcfd227e53ae4..79e48ae646b21 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -33,7 +33,6 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -42,6 +41,7 @@ #include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/completion_queue.h" #include "src/core/server/server.h" +#include "src/core/util/crash.h" #include "src/cpp/client/create_channel_internal.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/naming/address_sorting_test.cc b/test/cpp/naming/address_sorting_test.cc index 563ce7d8a36a6..e1fa4111ed61d 100644 --- a/test/cpp/naming/address_sorting_test.cc +++ b/test/cpp/naming/address_sorting_test.cc @@ -37,8 +37,6 @@ #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/config_vars.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" @@ -47,6 +45,8 @@ #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "src/core/util/string.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/naming/cancel_ares_query_test.cc b/test/cpp/naming/cancel_ares_query_test.cc index 775dc1961ceda..b77330ee59535 100644 --- a/test/cpp/naming/cancel_ares_query_test.cc +++ b/test/cpp/naming/cancel_ares_query_test.cc @@ -40,11 +40,6 @@ #include "src/core/lib/event_engine/ares_resolver.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/notification.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/thd.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -53,7 +48,12 @@ #include "src/core/resolver/resolver_registry.h" #include "src/core/telemetry/stats.h" #include "src/core/telemetry/stats_data.h" +#include "src/core/util/crash.h" +#include "src/core/util/notification.h" +#include "src/core/util/orphanable.h" #include "src/core/util/string.h" +#include "src/core/util/thd.h" +#include "src/core/util/work_serializer.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/test_util/cmdline.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index d42e5f7dda162..f5a4984e98cde 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -48,10 +48,6 @@ #include "src/core/lib/event_engine/ares_resolver.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/experiments/experiments.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/orphanable.h" -#include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -61,7 +57,11 @@ #include "src/core/resolver/endpoint_addresses.h" #include "src/core/resolver/resolver.h" #include "src/core/resolver/resolver_registry.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" +#include "src/core/util/orphanable.h" #include "src/core/util/string.h" +#include "src/core/util/work_serializer.h" #include "test/core/test_util/fake_udp_and_tcp_server.h" #include "test/core/test_util/port.h" #include "test/core/test_util/socket_use_after_close_detector.h" diff --git a/test/cpp/naming/resolver_component_tests_runner_invoker.cc b/test/cpp/naming/resolver_component_tests_runner_invoker.cc index 4fb67300c5c56..26fe87fb600ba 100644 --- a/test/cpp/naming/resolver_component_tests_runner_invoker.cc +++ b/test/cpp/naming/resolver_component_tests_runner_invoker.cc @@ -35,13 +35,13 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #ifdef __FreeBSD__ #include #endif -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" #include "test/cpp/util/subprocess.h" diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index 54a1d6faadf9b..d540c21a22500 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -38,7 +38,6 @@ #include "src/core/lib/event_engine/channel_args_endpoint_config.h" #include "src/core/lib/event_engine/default_event_engine.h" #include "src/core/lib/event_engine/tcp_socket_utils.h" -#include "src/core/lib/gprpp/notification.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/event_engine_shims/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -46,6 +45,7 @@ #include "src/core/lib/surface/channel_create.h" #include "src/core/server/server.h" #include "src/core/telemetry/stats.h" +#include "src/core/util/notification.h" #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h" diff --git a/test/cpp/qps/benchmark_config.cc b/test/cpp/qps/benchmark_config.cc index 39cfbe6b18f29..58b4f57be42a5 100644 --- a/test/cpp/qps/benchmark_config.cc +++ b/test/cpp/qps/benchmark_config.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/cpp/util/test_credentials_provider.h" ABSL_FLAG(bool, enable_log_reporter, true, diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 792d271242bc3..fe66465bbcee1 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,8 +40,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "src/proto/grpc/testing/payloads.pb.h" #include "test/cpp/qps/histogram.h" diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 11fd6b89e62d7..889d935f989e0 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -38,8 +38,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/usage_timer.h" diff --git a/test/cpp/qps/client_callback.cc b/test/cpp/qps/client_callback.cc index 51cead4e3ea1a..29a35676aa437 100644 --- a/test/cpp/qps/client_callback.cc +++ b/test/cpp/qps/client_callback.cc @@ -34,7 +34,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/usage_timer.h" diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index eb1d8aeea72fe..23778475ac74f 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -35,7 +35,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/interarrival.h" diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index d7d6c5baf5cb1..3f015de12363c 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -35,9 +35,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/worker_service.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc index e876e50cf7809..57e826a5dff7e 100644 --- a/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/inproc_sync_unary_ping_pong_test.cc @@ -20,7 +20,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/json_run_localhost.cc b/test/cpp/qps/json_run_localhost.cc index 8bc842328c99f..59d46414bca89 100644 --- a/test/cpp/qps/json_run_localhost.cc +++ b/test/cpp/qps/json_run_localhost.cc @@ -31,8 +31,8 @@ #include "absl/log/check.h" #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/crash.h" +#include "src/core/util/env.h" #include "test/core/test_util/port.h" #include "test/cpp/util/subprocess.h" diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index e283c8eae7df5..0b6af9f962d2a 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -24,7 +24,7 @@ #include "absl/log/log.h" #include "absl/strings/str_format.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 50734258b5051..c11e9f2bd8167 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -27,7 +27,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 21c834184272a..92db5ef53c437 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -20,7 +20,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f2b444fc9c8a8..4f396456c511b 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -37,8 +37,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/worker_service.grpc.pb.h" #include "test/core/test_util/grpc_profiler.h" #include "test/core/test_util/histogram.h" diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index fa43276cf8630..e0b0cd646b2f0 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -24,7 +24,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/report_qps_scenario_service.grpc.pb.h" #include "test/cpp/qps/driver.h" #include "test/cpp/qps/parse_json.h" diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc index 6829f0dcd294f..d64d40c8e8a72 100644 --- a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -20,7 +20,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 2413d2d566d67..98d0ee1dd6d52 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/control.pb.h" #include "src/proto/grpc/testing/messages.pb.h" #include "test/core/end2end/data/ssl_test_data.h" diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 4d2017dd23e50..f091c11d69bbf 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -35,9 +35,9 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/util/crash.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/core/test_util/test_config.h" #include "test/cpp/qps/qps_server_builder.h" diff --git a/test/cpp/qps/server_callback.cc b/test/cpp/qps/server_callback.cc index c198b3d86b023..07c6522687208 100644 --- a/test/cpp/qps/server_callback.cc +++ b/test/cpp/qps/server_callback.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/qps_server_builder.h" #include "test/cpp/qps/server.h" diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 59a688d9b3ef9..fe9f8274f52de 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -27,7 +27,7 @@ #include #include -#include "src/core/lib/gprpp/host_port.h" +#include "src/core/util/host_port.h" #include "src/proto/grpc/testing/benchmark_service.grpc.pb.h" #include "test/cpp/qps/qps_server_builder.h" #include "test/cpp/qps/server.h" diff --git a/test/cpp/qps/usage_timer.cc b/test/cpp/qps/usage_timer.cc index 0f717141d25b2..9bea4846a4f31 100644 --- a/test/cpp/qps/usage_timer.cc +++ b/test/cpp/qps/usage_timer.cc @@ -26,7 +26,7 @@ #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #ifdef __linux__ #include #include diff --git a/test/cpp/server/BUILD b/test/cpp/server/BUILD index b65ec5c9e86b5..92423465fb447 100644 --- a/test/cpp/server/BUILD +++ b/test/cpp/server/BUILD @@ -69,6 +69,8 @@ grpc_cc_test( srcs = ["credentials_test.cc"], data = [ "//src/core/tsi/test_creds:ca.pem", + "//src/core/tsi/test_creds:malformed-cert.pem", + "//src/core/tsi/test_creds:malformed-key.pem", "//src/core/tsi/test_creds:server1.key", "//src/core/tsi/test_creds:server1.pem", ], diff --git a/test/cpp/server/credentials_test.cc b/test/cpp/server/credentials_test.cc index b5665c15556ce..32f14c38752db 100644 --- a/test/cpp/server/credentials_test.cc +++ b/test/cpp/server/credentials_test.cc @@ -28,12 +28,14 @@ #include #include "test/core/test_util/test_config.h" +#include "test/core/test_util/tls_utils.h" #include "test/cpp/util/tls_test_utils.h" #define CA_CERT_PATH "src/core/tsi/test_creds/ca.pem" #define SERVER_CERT_PATH "src/core/tsi/test_creds/server1.pem" #define SERVER_KEY_PATH "src/core/tsi/test_creds/server1.key" #define CRL_DIR_PATH "test/core/tsi/test_creds/crl_data/crls" +#define MALFORMED_CERT_PATH "src/core/tsi/test_creds/malformed-cert.pem" namespace { @@ -50,6 +52,7 @@ using ::grpc::experimental::NoOpCertificateVerifier; using ::grpc::experimental::StaticDataCertificateProvider; using ::grpc::experimental::TlsServerCredentials; using ::grpc::experimental::TlsServerCredentialsOptions; +using ::grpc_core::testing::GetFileContents; } // namespace @@ -116,6 +119,40 @@ TEST( CHECK_NE(server_credentials.get(), nullptr); } +TEST(CredentialsTest, + StaticDataCertificateProviderValidationSuccessWithAllCredentials) { + std::string root_certificates = GetFileContents(CA_CERT_PATH); + experimental::IdentityKeyCertPair key_cert_pair; + key_cert_pair.private_key = GetFileContents(SERVER_KEY_PATH); + key_cert_pair.certificate_chain = GetFileContents(SERVER_CERT_PATH); + StaticDataCertificateProvider provider(root_certificates, {key_cert_pair}); + EXPECT_EQ(provider.ValidateCredentials(), absl::OkStatus()); +} + +TEST(CredentialsTest, StaticDataCertificateProviderWithMalformedRoot) { + std::string root_certificates = GetFileContents(MALFORMED_CERT_PATH); + experimental::IdentityKeyCertPair key_cert_pair; + key_cert_pair.private_key = GetFileContents(SERVER_KEY_PATH); + key_cert_pair.certificate_chain = GetFileContents(SERVER_CERT_PATH); + StaticDataCertificateProvider provider(root_certificates, {key_cert_pair}); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + +TEST(CredentialsTest, + FileWatcherCertificateProviderValidationSuccessWithAllCredentials) { + FileWatcherCertificateProvider provider(SERVER_KEY_PATH, SERVER_CERT_PATH, + CA_CERT_PATH, 1); + EXPECT_EQ(provider.ValidateCredentials(), absl::OkStatus()); +} + +TEST(CredentialsTest, FileWatcherCertificateProviderWithMalformedRoot) { + FileWatcherCertificateProvider provider(SERVER_KEY_PATH, SERVER_CERT_PATH, + MALFORMED_CERT_PATH, 1); + EXPECT_EQ(provider.ValidateCredentials(), + absl::FailedPreconditionError("Invalid PEM.")); +} + TEST(CredentialsTest, TlsServerCredentialsWithCrlChecking) { auto certificate_provider = std::make_shared( SERVER_KEY_PATH, SERVER_CERT_PATH, CA_CERT_PATH, 1); diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index 089f7c38ecf2f..73e02cedbdefc 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -26,7 +26,7 @@ #include #include -#include "src/core/lib/gprpp/notification.h" +#include "src/core/util/notification.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/event_engine/event_engine_test_utils.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/server/server_request_call_test.cc b/test/cpp/server/server_request_call_test.cc index 96bbf15400a17..bf781e3e2bf4f 100644 --- a/test/cpp/server/server_request_call_test.cc +++ b/test/cpp/server/server_request_call_test.cc @@ -29,7 +29,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 6c7eb3a3f3461..751ab3977c6c4 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -31,7 +31,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/test_util/test_config.h" namespace grpc { diff --git a/test/cpp/util/channel_trace_proto_helper.cc b/test/cpp/util/channel_trace_proto_helper.cc index 8acb762a889e5..0c11284c81a71 100644 --- a/test/cpp/util/channel_trace_proto_helper.cc +++ b/test/cpp/util/channel_trace_proto_helper.cc @@ -25,8 +25,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/iomgr/error.h" +#include "src/core/util/crash.h" #include "src/core/util/json/json.h" #include "src/core/util/json/json_reader.h" #include "src/core/util/json/json_writer.h" @@ -40,7 +40,7 @@ namespace { // then back to json. This ensures that the json string was correctly formatted // according to https://developers.google.com/protocol-buffers/docs/proto3#json template -void VaidateProtoJsonTranslation(absl::string_view json_str) { +void ValidateProtoJsonTranslation(absl::string_view json_str) { Message msg; grpc::protobuf::json::JsonParseOptions parse_options; // If the following line is failing, then uncomment the last line of the @@ -73,42 +73,42 @@ void VaidateProtoJsonTranslation(absl::string_view json_str) { namespace testing { void ValidateChannelTraceProtoJsonTranslation(absl::string_view json_string) { - VaidateProtoJsonTranslation(json_string); + ValidateProtoJsonTranslation(json_string); } void ValidateChannelProtoJsonTranslation(absl::string_view json_string) { - VaidateProtoJsonTranslation(json_string); + ValidateProtoJsonTranslation(json_string); } void ValidateGetTopChannelsResponseProtoJsonTranslation( absl::string_view json_string) { - VaidateProtoJsonTranslation( + ValidateProtoJsonTranslation( json_string); } void ValidateGetChannelResponseProtoJsonTranslation( absl::string_view json_string) { - VaidateProtoJsonTranslation( + ValidateProtoJsonTranslation( json_string); } void ValidateGetServerResponseProtoJsonTranslation( absl::string_view json_string) { - VaidateProtoJsonTranslation( + ValidateProtoJsonTranslation( json_string); } void ValidateSubchannelProtoJsonTranslation(absl::string_view json_string) { - VaidateProtoJsonTranslation(json_string); + ValidateProtoJsonTranslation(json_string); } void ValidateServerProtoJsonTranslation(absl::string_view json_string) { - VaidateProtoJsonTranslation(json_string); + ValidateProtoJsonTranslation(json_string); } void ValidateGetServersResponseProtoJsonTranslation( absl::string_view json_string) { - VaidateProtoJsonTranslation( + ValidateProtoJsonTranslation( json_string); } diff --git a/test/cpp/util/channelz_sampler.cc b/test/cpp/util/channelz_sampler.cc index d689319f52c12..043625afa4d95 100644 --- a/test/cpp/util/channelz_sampler.cc +++ b/test/cpp/util/channelz_sampler.cc @@ -178,9 +178,9 @@ class ChannelzSampler final { return get_socket_response.socket(); } - // get the descedent channels/subchannels/sockets of a channel - // push descedent channels/subchannels to queue for layer traverse - // store descedent channels/subchannels/sockets for dumping data + // get the descendant channels/subchannels/sockets of a channel + // push descendant channels/subchannels to queue for layer traverse + // store descendant channels/subchannels/sockets for dumping data void GetChannelDescedence( const grpc::channelz::v1::Channel& channel, std::queue& channel_queue, @@ -232,9 +232,9 @@ class ChannelzSampler final { std::cout << std::endl; } - // get the descedent channels/subchannels/sockets of a subchannel - // push descedent channels/subchannels to queue for layer traverse - // store descedent channels/subchannels/sockets for dumping data + // get the descendant channels/subchannels/sockets of a subchannel + // push descendant channels/subchannels to queue for layer traverse + // store descendant channels/subchannels/sockets for dumping data void GetSubchannelDescedence( grpc::channelz::v1::Subchannel& subchannel, std::queue& channel_queue, diff --git a/test/cpp/util/channelz_sampler_test.cc b/test/cpp/util/channelz_sampler_test.cc index fde2a019f97d0..5c5f1118d6072 100644 --- a/test/cpp/util/channelz_sampler_test.cc +++ b/test/cpp/util/channelz_sampler_test.cc @@ -43,7 +43,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/cpp/server/channelz/channelz_service.h" #include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 3cae389d89862..9f7df96bf8e7b 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -30,7 +30,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { namespace testing { diff --git a/test/cpp/util/cli_credentials.cc b/test/cpp/util/cli_credentials.cc index d0c355a09ccad..61e90282ae0ee 100644 --- a/test/cpp/util/cli_credentials.cc +++ b/test/cpp/util/cli_credentials.cc @@ -24,8 +24,8 @@ #include #include -#include "src/core/lib/gprpp/crash.h" -#include "src/core/lib/gprpp/load_file.h" +#include "src/core/util/crash.h" +#include "src/core/util/load_file.h" ABSL_RETIRED_FLAG(bool, enable_ssl, false, "Replaced by --channel_creds_type=ssl."); diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index a355c15ce20a9..73d92b20ae400 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -24,7 +24,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/cpp/util/test_credentials_provider.h" ABSL_FLAG(std::string, grpc_test_use_grpclb_with_child_policy, "", diff --git a/test/cpp/util/get_grpc_test_runfile_dir.cc b/test/cpp/util/get_grpc_test_runfile_dir.cc index 4e0ce11ca5a58..68107d6368535 100644 --- a/test/cpp/util/get_grpc_test_runfile_dir.cc +++ b/test/cpp/util/get_grpc_test_runfile_dir.cc @@ -14,7 +14,7 @@ #include "test/cpp/util/get_grpc_test_runfile_dir.h" -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" namespace grpc { diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc index c6a513bbd38ba..6d3b6d528da95 100644 --- a/test/cpp/util/grpc_tool_test.cc +++ b/test/cpp/util/grpc_tool_test.cc @@ -38,7 +38,7 @@ #include #include -#include "src/core/lib/gprpp/env.h" +#include "src/core/util/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo.pb.h" #include "test/core/test_util/port.h" diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index 57a3abf3ea75b..28dc7e670be81 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index b5441f87596ca..ac0113fd50985 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -22,7 +22,7 @@ #include "absl/log/log.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" using grpc::reflection::v1alpha::ErrorResponse; using grpc::reflection::v1alpha::ListServiceResponse; diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index 0198a3f14ff1f..b4d3e116cd3a9 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -32,7 +32,7 @@ #include #include -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" #include "test/core/end2end/data/ssl_test_data.h" ABSL_FLAG(std::string, tls_cert_file, "", diff --git a/test/cpp/util/tls_test_utils.cc b/test/cpp/util/tls_test_utils.cc index 15c9b6211ed39..45d1e5c7f882d 100644 --- a/test/cpp/util/tls_test_utils.cc +++ b/test/cpp/util/tls_test_utils.cc @@ -18,7 +18,7 @@ #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" #include "test/core/test_util/port.h" #include "test/core/test_util/test_config.h" diff --git a/test/cpp/util/tls_test_utils.h b/test/cpp/util/tls_test_utils.h index 6f7d84acaa92a..9b4e69bcd8014 100644 --- a/test/cpp/util/tls_test_utils.h +++ b/test/cpp/util/tls_test_utils.h @@ -23,7 +23,7 @@ #include #include -#include "src/core/lib/gprpp/thd.h" +#include "src/core/util/thd.h" namespace grpc { namespace testing { diff --git a/test/cpp/util/windows/manifest_file.cc b/test/cpp/util/windows/manifest_file.cc index a1f377032fd25..85ac3d7eb3740 100644 --- a/test/cpp/util/windows/manifest_file.cc +++ b/test/cpp/util/windows/manifest_file.cc @@ -29,7 +29,7 @@ #include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" -#include "src/core/lib/gprpp/crash.h" +#include "src/core/util/crash.h" namespace grpc { namespace testing { diff --git a/test/distrib/gcf/python/run_single.sh b/test/distrib/gcf/python/run_single.sh index c2387555035d2..6d436e2510e5b 100755 --- a/test/distrib/gcf/python/run_single.sh +++ b/test/distrib/gcf/python/run_single.sh @@ -44,7 +44,8 @@ function cleanup() { trap cleanup SIGINT SIGTERM EXIT # Deploy -DEPLOY_OUTPUT=$(gcloud functions deploy "${FUNCTION_NAME}" --entry-point test_publish --runtime "${RUNTIME}" --trigger-http --allow-unauthenticated) + +DEPLOY_OUTPUT=$(gcloud functions deploy "${FUNCTION_NAME}" --entry-point test_publish --runtime "${RUNTIME}" --trigger-http --allow-unauthenticated --no-gen2) HTTP_URL=$(echo "${DEPLOY_OUTPUT}" | grep "url: " | awk '{print $2;}') # Send Requests diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel index 16c8d3db1af20..b8b3e6e111667 160000 --- a/third_party/boringssl-with-bazel +++ b/third_party/boringssl-with-bazel @@ -1 +1 @@ -Subproject commit 16c8d3db1af20fcc04b5190b25242aadcb1fbb30 +Subproject commit b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6 diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index f530880c612d8..5a349762058dd 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -72,7 +72,7 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/interoptest/grpc_interop_aspnetcore.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_aspnetcore@sha256:8e2e732e78724a8382c340dca72e7653c5f82c251a3110fa2874cc00ba538878", "tools/dockerfile/interoptest/grpc_interop_cxx.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_cxx@sha256:e5a474d33773d52ec6a8abbe2d61ee0c2a9c2b5f48793a5ea3b82c4445becf3f", "tools/dockerfile/interoptest/grpc_interop_dart.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_dart@sha256:4915a280788126dad029858eb384dbbef2dc18cadccb434df6450dfd7a4929f2", - "tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584", + "tools/dockerfile/interoptest/grpc_interop_go.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go@sha256:c925667feb3e065abf586a9e8b028f64b4673cb94bfb4b5e389c652ce906f5dc", "tools/dockerfile/interoptest/grpc_interop_go1.11.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.11@sha256:f2fe3a0a581c687ee4217bf58fd42b18bb1f63d3d006f1b67379ff553b0e23c6", "tools/dockerfile/interoptest/grpc_interop_go1.16.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.16@sha256:3767f47c9d06584c6c07b7ab536e13f3e87550330e6c2652ad288d3a72b0de23", "tools/dockerfile/interoptest/grpc_interop_go1.19.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go1.19@sha256:889e7ff34399a5e16af87940d1eaa239e56da307f7faca3f8f1d28379c2e3df3", diff --git a/tools/codegen/core/gen_grpc_tls_credentials_options.py b/tools/codegen/core/gen_grpc_tls_credentials_options.py index 20350765fda2e..24a153e9c9af9 100755 --- a/tools/codegen/core/gen_grpc_tls_credentials_options.py +++ b/tools/codegen/core/gen_grpc_tls_credentials_options.py @@ -308,7 +308,7 @@ def get_file_differences(file1, file2): #include #include -#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/util/ref_counted.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h" diff --git a/tools/codegen/core/gen_huffman_decompressor.cc b/tools/codegen/core/gen_huffman_decompressor.cc index 9ffc1744aa0cb..2e760cc9e02bb 100644 --- a/tools/codegen/core/gen_huffman_decompressor.cc +++ b/tools/codegen/core/gen_huffman_decompressor.cc @@ -38,8 +38,8 @@ #include "absl/types/variant.h" #include "src/core/ext/transport/chttp2/transport/huffsyms.h" -#include "src/core/lib/gprpp/env.h" -#include "src/core/lib/gprpp/match.h" +#include "src/core/util/env.h" +#include "src/core/util/match.h" /////////////////////////////////////////////////////////////////////////////// // SHA256 hash handling diff --git a/tools/codegen/core/gen_if_list.py b/tools/codegen/core/gen_if_list.py index 0411ef3ef8860..ecd131d5a6b23 100755 --- a/tools/codegen/core/gen_if_list.py +++ b/tools/codegen/core/gen_if_list.py @@ -25,7 +25,7 @@ def put_banner(files, banner): print("", file=f) -with open("src/core/lib/gprpp/if_list.h", "w") as H: +with open("src/core/util/if_list.h", "w") as H: # copy-paste copyright notice from this file with open(sys.argv[0]) as my_source: copyright = [] @@ -44,8 +44,8 @@ def put_banner(files, banner): put_banner([H], ["", "Automatically generated by %s" % sys.argv[0], ""]) - print("#ifndef GRPC_CORE_LIB_GPRPP_IF_LIST_H", file=H) - print("#define GRPC_CORE_LIB_GPRPP_IF_LIST_H", file=H) + print("#ifndef GRPC_CORE_UTIL_IF_LIST_H", file=H) + print("#define GRPC_CORE_UTIL_IF_LIST_H", file=H) print("", file=H) print("#include ", file=H) print("", file=H) @@ -78,4 +78,4 @@ def put_banner(files, banner): print("", file=H) print("}", file=H) print("", file=H) - print("#endif // GRPC_CORE_LIB_GPRPP_IF_LIST_H", file=H) + print("#endif // GRPC_CORE_UTIL_IF_LIST_H", file=H) diff --git a/tools/codegen/core/gen_join.py b/tools/codegen/core/gen_join.py index cd90390ae3c70..4f53a982d4174 100755 --- a/tools/codegen/core/gen_join.py +++ b/tools/codegen/core/gen_join.py @@ -104,10 +104,10 @@ #include "absl/log/log.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" +#include "src/core/util/construct_destruct.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" -#include "src/core/lib/gprpp/bitset.h" +#include "src/core/util/bitset.h" #include #include #include diff --git a/tools/codegen/core/gen_seq.py b/tools/codegen/core/gen_seq.py index a33072270f3a3..1b735c1eba197 100755 --- a/tools/codegen/core/gen_seq.py +++ b/tools/codegen/core/gen_seq.py @@ -191,8 +191,8 @@ #include "absl/strings/str_cat.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/construct_destruct.h" -#include "src/core/lib/gprpp/debug_location.h" +#include "src/core/util/construct_destruct.h" +#include "src/core/util/debug_location.h" #include "src/core/lib/promise/detail/promise_factory.h" #include "src/core/lib/promise/detail/promise_like.h" #include "src/core/lib/promise/poll.h" diff --git a/tools/codegen/core/gen_stats_data.py b/tools/codegen/core/gen_stats_data.py index 44fdcb00abc71..64764473c76a1 100755 --- a/tools/codegen/core/gen_stats_data.py +++ b/tools/codegen/core/gen_stats_data.py @@ -289,7 +289,7 @@ def snake_to_pascal(name): print("#include ", file=H) print('#include "src/core/telemetry/histogram_view.h"', file=H) print('#include "absl/strings/string_view.h"', file=H) - print('#include "src/core/lib/gprpp/per_cpu.h"', file=H) + print('#include "src/core/util/per_cpu.h"', file=H) print(file=H) print("namespace grpc_core {", file=H) diff --git a/tools/codegen/core/templates/trace_flags.cc.mako b/tools/codegen/core/templates/trace_flags.cc.mako index 401f5feed0cba..417921351eebc 100644 --- a/tools/codegen/core/templates/trace_flags.cc.mako +++ b/tools/codegen/core/templates/trace_flags.cc.mako @@ -19,7 +19,7 @@ #include "${absl_prefix}absl/container/flat_hash_map.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/util/no_destruct.h" namespace grpc_core { diff --git a/tools/distrib/check_namespace_qualification.py b/tools/distrib/check_namespace_qualification.py index f08f73c66fc2d..be12f113fda4e 100755 --- a/tools/distrib/check_namespace_qualification.py +++ b/tools/distrib/check_namespace_qualification.py @@ -74,10 +74,9 @@ def check(self, fpath, fix): # users would be better off using unique namespaces. "src/compiler/cpp_generator.cc", # multi-line #define statements are not handled - "src/core/lib/gprpp/global_config_env.h", "src/core/lib/profiling/timers.h", - "src/core/lib/gprpp/crash.h", - "src/core/lib/gprpp/unique_type_name.h", + "src/core/util/crash.h", + "src/core/util/unique_type_name.h", # The grpc_core::Server redundant namespace qualification is required for # older gcc versions. "src/core/ext/transport/chttp2/server/chttp2_server.h", diff --git a/tools/distrib/fix_build_deps.py b/tools/distrib/fix_build_deps.py index 79bd9bbbe861c..01d0704c7e498 100755 --- a/tools/distrib/fix_build_deps.py +++ b/tools/distrib/fix_build_deps.py @@ -399,13 +399,13 @@ def score_best(proposed, existing): "src/cpp/ext/gcp", "src/cpp/ext/csm", "src/cpp/ext/otel", - "test/core/backoff", + "test/core/util", "test/core/call", "test/core/call/yodel", "test/core/client_channel", "test/core/experiments", "test/core/load_balancing", - "test/core/uri", + "test/core/util", "test/core/test_util", "test/core/end2end", "test/core/event_engine", diff --git a/tools/distrib/python/grpc_version.py b/tools/distrib/python/grpc_version.py index 0a2b4c0a17ced..2bc64495fe9c5 100644 --- a/tools/distrib/python/grpc_version.py +++ b/tools/distrib/python/grpc_version.py @@ -14,5 +14,5 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' PROTOBUF_VERSION = '3.27.2' diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_tools/grpc_version.py index 164aa76d02a9c..dc1b11d287454 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_tools/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 85cac2659c304..66dd7d524fd24 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,5 +14,5 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' PROTOBUF_VERSION = '3.27.2' diff --git a/tools/distrib/python/xds_protos/grpc_version.py b/tools/distrib/python/xds_protos/grpc_version.py index 978c2c572b6c9..ccf4716adfaf9 100644 --- a/tools/distrib/python/xds_protos/grpc_version.py +++ b/tools/distrib/python/xds_protos/grpc_version.py @@ -14,5 +14,5 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION = '1.67.0.dev0' +VERSION = '1.68.0.dev0' PROTOBUF_VERSION = '3.27.2' diff --git a/tools/dockerfile/interoptest/grpc_interop_go.current_version b/tools/dockerfile/interoptest/grpc_interop_go.current_version index 9be91cba0c400..2aca19d40be57 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go.current_version +++ b/tools/dockerfile/interoptest/grpc_interop_go.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:98dba9a99a13bf3cd11a4ebdde4fea2e3eaa9b41@sha256:9d02b61552a93770ebb022f588daf9acd1088d29197fe120e0b082ede73f4584 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_interop_go:969ce4614d1152a43f9083e7d08f1932c63a1616@sha256:c925667feb3e065abf586a9e8b028f64b4673cb94bfb4b5e389c652ce906f5dc \ No newline at end of file diff --git a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile index 38e8543153241..bf41ce181e00f 100644 --- a/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Since the image names depend on the digest of the Dockerfile, updating the +# the following comment is a simple way to re-build the image with a new Go +# version. +# latest points to 1.23.1 at the time of building. FROM golang:latest # Using login shell removes Go from path, so we add it. diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 351040cc19230..396a70209f2b6 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.67.0-dev +PROJECT_NUMBER = 1.68.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 75cba764be56f..3688a56884191 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.67.0-dev +PROJECT_NUMBER = 1.68.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -2104,11 +2104,6 @@ src/core/lib/address_utils/parse_address.cc \ src/core/lib/address_utils/parse_address.h \ src/core/lib/address_utils/sockaddr_utils.cc \ src/core/lib/address_utils/sockaddr_utils.h \ -src/core/lib/avl/avl.h \ -src/core/lib/backoff/backoff.cc \ -src/core/lib/backoff/backoff.h \ -src/core/lib/backoff/random_early_detection.cc \ -src/core/lib/backoff/random_early_detection.h \ src/core/lib/channel/call_finalization.h \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_args.h \ @@ -2139,8 +2134,6 @@ src/core/lib/config/core_configuration.cc \ src/core/lib/config/core_configuration.h \ src/core/lib/config/load_config.cc \ src/core/lib/config/load_config.h \ -src/core/lib/debug/event_log.cc \ -src/core/lib/debug/event_log.h \ src/core/lib/debug/trace.cc \ src/core/lib/debug/trace.h \ src/core/lib/debug/trace_flags.cc \ @@ -2261,83 +2254,6 @@ src/core/lib/experiments/config.cc \ src/core/lib/experiments/config.h \ src/core/lib/experiments/experiments.cc \ src/core/lib/experiments/experiments.h \ -src/core/lib/gprpp/atomic_utils.h \ -src/core/lib/gprpp/bitset.h \ -src/core/lib/gprpp/chunked_vector.h \ -src/core/lib/gprpp/construct_destruct.h \ -src/core/lib/gprpp/cpp_impl_of.h \ -src/core/lib/gprpp/crash.cc \ -src/core/lib/gprpp/crash.h \ -src/core/lib/gprpp/debug_location.h \ -src/core/lib/gprpp/directory_reader.h \ -src/core/lib/gprpp/down_cast.h \ -src/core/lib/gprpp/dual_ref_counted.h \ -src/core/lib/gprpp/dump_args.cc \ -src/core/lib/gprpp/dump_args.h \ -src/core/lib/gprpp/env.h \ -src/core/lib/gprpp/examine_stack.cc \ -src/core/lib/gprpp/examine_stack.h \ -src/core/lib/gprpp/fork.cc \ -src/core/lib/gprpp/fork.h \ -src/core/lib/gprpp/glob.cc \ -src/core/lib/gprpp/glob.h \ -src/core/lib/gprpp/host_port.cc \ -src/core/lib/gprpp/host_port.h \ -src/core/lib/gprpp/if_list.h \ -src/core/lib/gprpp/linux/env.cc \ -src/core/lib/gprpp/load_file.cc \ -src/core/lib/gprpp/load_file.h \ -src/core/lib/gprpp/manual_constructor.h \ -src/core/lib/gprpp/match.h \ -src/core/lib/gprpp/memory.h \ -src/core/lib/gprpp/mpscq.cc \ -src/core/lib/gprpp/mpscq.h \ -src/core/lib/gprpp/no_destruct.h \ -src/core/lib/gprpp/notification.h \ -src/core/lib/gprpp/orphanable.h \ -src/core/lib/gprpp/overload.h \ -src/core/lib/gprpp/packed_table.h \ -src/core/lib/gprpp/per_cpu.cc \ -src/core/lib/gprpp/per_cpu.h \ -src/core/lib/gprpp/posix/directory_reader.cc \ -src/core/lib/gprpp/posix/env.cc \ -src/core/lib/gprpp/posix/stat.cc \ -src/core/lib/gprpp/posix/thd.cc \ -src/core/lib/gprpp/ref_counted.h \ -src/core/lib/gprpp/ref_counted_ptr.h \ -src/core/lib/gprpp/ref_counted_string.cc \ -src/core/lib/gprpp/ref_counted_string.h \ -src/core/lib/gprpp/single_set_ptr.h \ -src/core/lib/gprpp/sorted_pack.h \ -src/core/lib/gprpp/stat.h \ -src/core/lib/gprpp/status_helper.cc \ -src/core/lib/gprpp/status_helper.h \ -src/core/lib/gprpp/strerror.cc \ -src/core/lib/gprpp/strerror.h \ -src/core/lib/gprpp/sync.h \ -src/core/lib/gprpp/table.h \ -src/core/lib/gprpp/tchar.cc \ -src/core/lib/gprpp/tchar.h \ -src/core/lib/gprpp/thd.h \ -src/core/lib/gprpp/time.cc \ -src/core/lib/gprpp/time.h \ -src/core/lib/gprpp/time_averaged_stats.cc \ -src/core/lib/gprpp/time_averaged_stats.h \ -src/core/lib/gprpp/time_util.cc \ -src/core/lib/gprpp/time_util.h \ -src/core/lib/gprpp/type_list.h \ -src/core/lib/gprpp/unique_type_name.h \ -src/core/lib/gprpp/uuid_v4.cc \ -src/core/lib/gprpp/uuid_v4.h \ -src/core/lib/gprpp/validation_errors.cc \ -src/core/lib/gprpp/validation_errors.h \ -src/core/lib/gprpp/windows/directory_reader.cc \ -src/core/lib/gprpp/windows/env.cc \ -src/core/lib/gprpp/windows/stat.cc \ -src/core/lib/gprpp/windows/thd.cc \ -src/core/lib/gprpp/work_serializer.cc \ -src/core/lib/gprpp/work_serializer.h \ -src/core/lib/gprpp/xxhash_inline.h \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ src/core/lib/iomgr/buffer_list.h \ @@ -2382,13 +2298,6 @@ src/core/lib/iomgr/executor.cc \ src/core/lib/iomgr/executor.h \ src/core/lib/iomgr/fork_posix.cc \ src/core/lib/iomgr/fork_windows.cc \ -src/core/lib/iomgr/gethostname.h \ -src/core/lib/iomgr/gethostname_fallback.cc \ -src/core/lib/iomgr/gethostname_host_name_max.cc \ -src/core/lib/iomgr/gethostname_sysconf.cc \ -src/core/lib/iomgr/grpc_if_nametoindex.h \ -src/core/lib/iomgr/grpc_if_nametoindex_posix.cc \ -src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc \ src/core/lib/iomgr/internal_errqueue.cc \ src/core/lib/iomgr/internal_errqueue.h \ src/core/lib/iomgr/iocp_windows.cc \ @@ -2479,8 +2388,6 @@ src/core/lib/iomgr/wakeup_fd_pipe.cc \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.cc \ src/core/lib/iomgr/wakeup_fd_posix.h \ -src/core/lib/matchers/matchers.cc \ -src/core/lib/matchers/matchers.h \ src/core/lib/promise/activity.cc \ src/core/lib/promise/activity.h \ src/core/lib/promise/all_ok.h \ @@ -2741,8 +2648,6 @@ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_fwd.h \ src/core/lib/transport/transport_op_string.cc \ -src/core/lib/uri/uri_parser.cc \ -src/core/lib/uri/uri_parser.h \ src/core/load_balancing/address_filtering.cc \ src/core/load_balancing/address_filtering.h \ src/core/load_balancing/backend_metric_data.h \ @@ -2927,8 +2832,43 @@ src/core/tsi/transport_security_interface.h \ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/atm.cc \ +src/core/util/atomic_utils.h \ +src/core/util/avl.h \ +src/core/util/backoff.cc \ +src/core/util/backoff.h \ +src/core/util/bitset.h \ +src/core/util/chunked_vector.h \ +src/core/util/construct_destruct.h \ +src/core/util/cpp_impl_of.h \ +src/core/util/crash.cc \ +src/core/util/crash.h \ +src/core/util/debug_location.h \ +src/core/util/directory_reader.h \ +src/core/util/down_cast.h \ +src/core/util/dual_ref_counted.h \ +src/core/util/dump_args.cc \ +src/core/util/dump_args.h \ +src/core/util/env.h \ +src/core/util/event_log.cc \ +src/core/util/event_log.h \ +src/core/util/examine_stack.cc \ +src/core/util/examine_stack.h \ +src/core/util/fork.cc \ +src/core/util/fork.h \ src/core/util/gcp_metadata_query.cc \ src/core/util/gcp_metadata_query.h \ +src/core/util/gethostname.h \ +src/core/util/gethostname_fallback.cc \ +src/core/util/gethostname_host_name_max.cc \ +src/core/util/gethostname_sysconf.cc \ +src/core/util/glob.cc \ +src/core/util/glob.h \ +src/core/util/gpr_time.cc \ +src/core/util/grpc_if_nametoindex.h \ +src/core/util/grpc_if_nametoindex_posix.cc \ +src/core/util/grpc_if_nametoindex_unsupported.cc \ +src/core/util/host_port.cc \ +src/core/util/host_port.h \ src/core/util/http_client/format_request.cc \ src/core/util/http_client/format_request.h \ src/core/util/http_client/httpcli.cc \ @@ -2937,6 +2877,7 @@ src/core/util/http_client/httpcli_security_connector.cc \ src/core/util/http_client/httpcli_ssl_credentials.h \ src/core/util/http_client/parser.cc \ src/core/util/http_client/parser.h \ +src/core/util/if_list.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ @@ -2952,33 +2893,92 @@ src/core/util/json/json_writer.h \ src/core/util/latent_see.cc \ src/core/util/latent_see.h \ src/core/util/linux/cpu.cc \ +src/core/util/linux/env.cc \ +src/core/util/load_file.cc \ +src/core/util/load_file.h \ src/core/util/log.cc \ src/core/util/lru_cache.h \ +src/core/util/manual_constructor.h \ +src/core/util/match.h \ +src/core/util/matchers.cc \ +src/core/util/matchers.h \ +src/core/util/memory.h \ +src/core/util/mpscq.cc \ +src/core/util/mpscq.h \ src/core/util/msys/tmpfile.cc \ +src/core/util/no_destruct.h \ +src/core/util/notification.h \ +src/core/util/orphanable.h \ +src/core/util/overload.h \ +src/core/util/packed_table.h \ +src/core/util/per_cpu.cc \ +src/core/util/per_cpu.h \ src/core/util/posix/cpu.cc \ +src/core/util/posix/directory_reader.cc \ +src/core/util/posix/env.cc \ +src/core/util/posix/stat.cc \ src/core/util/posix/string.cc \ src/core/util/posix/sync.cc \ +src/core/util/posix/thd.cc \ src/core/util/posix/time.cc \ src/core/util/posix/tmpfile.cc \ +src/core/util/random_early_detection.cc \ +src/core/util/random_early_detection.h \ +src/core/util/ref_counted.h \ +src/core/util/ref_counted_ptr.h \ +src/core/util/ref_counted_string.cc \ +src/core/util/ref_counted_string.h \ src/core/util/ring_buffer.h \ +src/core/util/single_set_ptr.h \ +src/core/util/sorted_pack.h \ src/core/util/spinlock.h \ +src/core/util/stat.h \ +src/core/util/status_helper.cc \ +src/core/util/status_helper.h \ +src/core/util/strerror.cc \ +src/core/util/strerror.h \ src/core/util/string.cc \ src/core/util/string.h \ src/core/util/sync.cc \ +src/core/util/sync.h \ src/core/util/sync_abseil.cc \ +src/core/util/table.h \ +src/core/util/tchar.cc \ +src/core/util/tchar.h \ +src/core/util/thd.h \ src/core/util/time.cc \ +src/core/util/time.h \ +src/core/util/time_averaged_stats.cc \ +src/core/util/time_averaged_stats.h \ src/core/util/time_precise.cc \ src/core/util/time_precise.h \ +src/core/util/time_util.cc \ +src/core/util/time_util.h \ src/core/util/tmpfile.h \ +src/core/util/type_list.h \ src/core/util/unique_ptr_with_bitset.h \ +src/core/util/unique_type_name.h \ src/core/util/upb_utils.h \ +src/core/util/uri.cc \ +src/core/util/uri.h \ src/core/util/useful.h \ +src/core/util/uuid_v4.cc \ +src/core/util/uuid_v4.h \ +src/core/util/validation_errors.cc \ +src/core/util/validation_errors.h \ src/core/util/windows/cpu.cc \ +src/core/util/windows/directory_reader.cc \ +src/core/util/windows/env.cc \ +src/core/util/windows/stat.cc \ src/core/util/windows/string.cc \ src/core/util/windows/string_util.cc \ src/core/util/windows/sync.cc \ +src/core/util/windows/thd.cc \ src/core/util/windows/time.cc \ src/core/util/windows/tmpfile.cc \ +src/core/util/work_serializer.cc \ +src/core/util/work_serializer.h \ +src/core/util/xxhash_inline.h \ src/core/xds/grpc/certificate_provider_store.cc \ src/core/xds/grpc/certificate_provider_store.h \ src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \ @@ -3039,6 +3039,8 @@ src/core/xds/grpc/xds_server_grpc.cc \ src/core/xds/grpc/xds_server_grpc.h \ src/core/xds/grpc/xds_transport_grpc.cc \ src/core/xds/grpc/xds_transport_grpc.h \ +src/core/xds/xds_client/lrs_client.cc \ +src/core/xds/xds_client/lrs_client.h \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_api.h \ src/core/xds/xds_client/xds_bootstrap.cc \ @@ -3046,8 +3048,7 @@ src/core/xds/xds_client/xds_bootstrap.h \ src/core/xds/xds_client/xds_channel_args.h \ src/core/xds/xds_client/xds_client.cc \ src/core/xds/xds_client/xds_client.h \ -src/core/xds/xds_client/xds_client_stats.cc \ -src/core/xds/xds_client/xds_client_stats.h \ +src/core/xds/xds_client/xds_locality.h \ src/core/xds/xds_client/xds_metrics.h \ src/core/xds/xds_client/xds_resource_type.h \ src/core/xds/xds_client/xds_resource_type_impl.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 9a92a5424c239..ac83d73e8aaea 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 43.0.0 +PROJECT_NUMBER = 44.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 2c6b3e5be7714..9b118d61fd855 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 43.0.0 +PROJECT_NUMBER = 44.0.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -1872,11 +1872,6 @@ src/core/lib/address_utils/parse_address.cc \ src/core/lib/address_utils/parse_address.h \ src/core/lib/address_utils/sockaddr_utils.cc \ src/core/lib/address_utils/sockaddr_utils.h \ -src/core/lib/avl/avl.h \ -src/core/lib/backoff/backoff.cc \ -src/core/lib/backoff/backoff.h \ -src/core/lib/backoff/random_early_detection.cc \ -src/core/lib/backoff/random_early_detection.h \ src/core/lib/channel/README.md \ src/core/lib/channel/call_finalization.h \ src/core/lib/channel/channel_args.cc \ @@ -1908,8 +1903,6 @@ src/core/lib/config/core_configuration.cc \ src/core/lib/config/core_configuration.h \ src/core/lib/config/load_config.cc \ src/core/lib/config/load_config.h \ -src/core/lib/debug/event_log.cc \ -src/core/lib/debug/event_log.h \ src/core/lib/debug/trace.cc \ src/core/lib/debug/trace.h \ src/core/lib/debug/trace_flags.cc \ @@ -2030,84 +2023,6 @@ src/core/lib/experiments/config.cc \ src/core/lib/experiments/config.h \ src/core/lib/experiments/experiments.cc \ src/core/lib/experiments/experiments.h \ -src/core/lib/gprpp/README.md \ -src/core/lib/gprpp/atomic_utils.h \ -src/core/lib/gprpp/bitset.h \ -src/core/lib/gprpp/chunked_vector.h \ -src/core/lib/gprpp/construct_destruct.h \ -src/core/lib/gprpp/cpp_impl_of.h \ -src/core/lib/gprpp/crash.cc \ -src/core/lib/gprpp/crash.h \ -src/core/lib/gprpp/debug_location.h \ -src/core/lib/gprpp/directory_reader.h \ -src/core/lib/gprpp/down_cast.h \ -src/core/lib/gprpp/dual_ref_counted.h \ -src/core/lib/gprpp/dump_args.cc \ -src/core/lib/gprpp/dump_args.h \ -src/core/lib/gprpp/env.h \ -src/core/lib/gprpp/examine_stack.cc \ -src/core/lib/gprpp/examine_stack.h \ -src/core/lib/gprpp/fork.cc \ -src/core/lib/gprpp/fork.h \ -src/core/lib/gprpp/glob.cc \ -src/core/lib/gprpp/glob.h \ -src/core/lib/gprpp/host_port.cc \ -src/core/lib/gprpp/host_port.h \ -src/core/lib/gprpp/if_list.h \ -src/core/lib/gprpp/linux/env.cc \ -src/core/lib/gprpp/load_file.cc \ -src/core/lib/gprpp/load_file.h \ -src/core/lib/gprpp/manual_constructor.h \ -src/core/lib/gprpp/match.h \ -src/core/lib/gprpp/memory.h \ -src/core/lib/gprpp/mpscq.cc \ -src/core/lib/gprpp/mpscq.h \ -src/core/lib/gprpp/no_destruct.h \ -src/core/lib/gprpp/notification.h \ -src/core/lib/gprpp/orphanable.h \ -src/core/lib/gprpp/overload.h \ -src/core/lib/gprpp/packed_table.h \ -src/core/lib/gprpp/per_cpu.cc \ -src/core/lib/gprpp/per_cpu.h \ -src/core/lib/gprpp/posix/directory_reader.cc \ -src/core/lib/gprpp/posix/env.cc \ -src/core/lib/gprpp/posix/stat.cc \ -src/core/lib/gprpp/posix/thd.cc \ -src/core/lib/gprpp/ref_counted.h \ -src/core/lib/gprpp/ref_counted_ptr.h \ -src/core/lib/gprpp/ref_counted_string.cc \ -src/core/lib/gprpp/ref_counted_string.h \ -src/core/lib/gprpp/single_set_ptr.h \ -src/core/lib/gprpp/sorted_pack.h \ -src/core/lib/gprpp/stat.h \ -src/core/lib/gprpp/status_helper.cc \ -src/core/lib/gprpp/status_helper.h \ -src/core/lib/gprpp/strerror.cc \ -src/core/lib/gprpp/strerror.h \ -src/core/lib/gprpp/sync.h \ -src/core/lib/gprpp/table.h \ -src/core/lib/gprpp/tchar.cc \ -src/core/lib/gprpp/tchar.h \ -src/core/lib/gprpp/thd.h \ -src/core/lib/gprpp/time.cc \ -src/core/lib/gprpp/time.h \ -src/core/lib/gprpp/time_averaged_stats.cc \ -src/core/lib/gprpp/time_averaged_stats.h \ -src/core/lib/gprpp/time_util.cc \ -src/core/lib/gprpp/time_util.h \ -src/core/lib/gprpp/type_list.h \ -src/core/lib/gprpp/unique_type_name.h \ -src/core/lib/gprpp/uuid_v4.cc \ -src/core/lib/gprpp/uuid_v4.h \ -src/core/lib/gprpp/validation_errors.cc \ -src/core/lib/gprpp/validation_errors.h \ -src/core/lib/gprpp/windows/directory_reader.cc \ -src/core/lib/gprpp/windows/env.cc \ -src/core/lib/gprpp/windows/stat.cc \ -src/core/lib/gprpp/windows/thd.cc \ -src/core/lib/gprpp/work_serializer.cc \ -src/core/lib/gprpp/work_serializer.h \ -src/core/lib/gprpp/xxhash_inline.h \ src/core/lib/iomgr/README.md \ src/core/lib/iomgr/block_annotate.h \ src/core/lib/iomgr/buffer_list.cc \ @@ -2153,13 +2068,6 @@ src/core/lib/iomgr/executor.cc \ src/core/lib/iomgr/executor.h \ src/core/lib/iomgr/fork_posix.cc \ src/core/lib/iomgr/fork_windows.cc \ -src/core/lib/iomgr/gethostname.h \ -src/core/lib/iomgr/gethostname_fallback.cc \ -src/core/lib/iomgr/gethostname_host_name_max.cc \ -src/core/lib/iomgr/gethostname_sysconf.cc \ -src/core/lib/iomgr/grpc_if_nametoindex.h \ -src/core/lib/iomgr/grpc_if_nametoindex_posix.cc \ -src/core/lib/iomgr/grpc_if_nametoindex_unsupported.cc \ src/core/lib/iomgr/internal_errqueue.cc \ src/core/lib/iomgr/internal_errqueue.h \ src/core/lib/iomgr/iocp_windows.cc \ @@ -2250,8 +2158,6 @@ src/core/lib/iomgr/wakeup_fd_pipe.cc \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.cc \ src/core/lib/iomgr/wakeup_fd_posix.h \ -src/core/lib/matchers/matchers.cc \ -src/core/lib/matchers/matchers.h \ src/core/lib/promise/activity.cc \ src/core/lib/promise/activity.h \ src/core/lib/promise/all_ok.h \ @@ -2514,8 +2420,6 @@ src/core/lib/transport/transport.cc \ src/core/lib/transport/transport.h \ src/core/lib/transport/transport_fwd.h \ src/core/lib/transport/transport_op_string.cc \ -src/core/lib/uri/uri_parser.cc \ -src/core/lib/uri/uri_parser.h \ src/core/load_balancing/address_filtering.cc \ src/core/load_balancing/address_filtering.h \ src/core/load_balancing/backend_metric_data.h \ @@ -2706,8 +2610,43 @@ src/core/util/README.md \ src/core/util/alloc.cc \ src/core/util/alloc.h \ src/core/util/atm.cc \ +src/core/util/atomic_utils.h \ +src/core/util/avl.h \ +src/core/util/backoff.cc \ +src/core/util/backoff.h \ +src/core/util/bitset.h \ +src/core/util/chunked_vector.h \ +src/core/util/construct_destruct.h \ +src/core/util/cpp_impl_of.h \ +src/core/util/crash.cc \ +src/core/util/crash.h \ +src/core/util/debug_location.h \ +src/core/util/directory_reader.h \ +src/core/util/down_cast.h \ +src/core/util/dual_ref_counted.h \ +src/core/util/dump_args.cc \ +src/core/util/dump_args.h \ +src/core/util/env.h \ +src/core/util/event_log.cc \ +src/core/util/event_log.h \ +src/core/util/examine_stack.cc \ +src/core/util/examine_stack.h \ +src/core/util/fork.cc \ +src/core/util/fork.h \ src/core/util/gcp_metadata_query.cc \ src/core/util/gcp_metadata_query.h \ +src/core/util/gethostname.h \ +src/core/util/gethostname_fallback.cc \ +src/core/util/gethostname_host_name_max.cc \ +src/core/util/gethostname_sysconf.cc \ +src/core/util/glob.cc \ +src/core/util/glob.h \ +src/core/util/gpr_time.cc \ +src/core/util/grpc_if_nametoindex.h \ +src/core/util/grpc_if_nametoindex_posix.cc \ +src/core/util/grpc_if_nametoindex_unsupported.cc \ +src/core/util/host_port.cc \ +src/core/util/host_port.h \ src/core/util/http_client/format_request.cc \ src/core/util/http_client/format_request.h \ src/core/util/http_client/httpcli.cc \ @@ -2716,6 +2655,7 @@ src/core/util/http_client/httpcli_security_connector.cc \ src/core/util/http_client/httpcli_ssl_credentials.h \ src/core/util/http_client/parser.cc \ src/core/util/http_client/parser.h \ +src/core/util/if_list.h \ src/core/util/iphone/cpu.cc \ src/core/util/json/json.h \ src/core/util/json/json_args.h \ @@ -2731,33 +2671,92 @@ src/core/util/json/json_writer.h \ src/core/util/latent_see.cc \ src/core/util/latent_see.h \ src/core/util/linux/cpu.cc \ +src/core/util/linux/env.cc \ +src/core/util/load_file.cc \ +src/core/util/load_file.h \ src/core/util/log.cc \ src/core/util/lru_cache.h \ +src/core/util/manual_constructor.h \ +src/core/util/match.h \ +src/core/util/matchers.cc \ +src/core/util/matchers.h \ +src/core/util/memory.h \ +src/core/util/mpscq.cc \ +src/core/util/mpscq.h \ src/core/util/msys/tmpfile.cc \ +src/core/util/no_destruct.h \ +src/core/util/notification.h \ +src/core/util/orphanable.h \ +src/core/util/overload.h \ +src/core/util/packed_table.h \ +src/core/util/per_cpu.cc \ +src/core/util/per_cpu.h \ src/core/util/posix/cpu.cc \ +src/core/util/posix/directory_reader.cc \ +src/core/util/posix/env.cc \ +src/core/util/posix/stat.cc \ src/core/util/posix/string.cc \ src/core/util/posix/sync.cc \ +src/core/util/posix/thd.cc \ src/core/util/posix/time.cc \ src/core/util/posix/tmpfile.cc \ +src/core/util/random_early_detection.cc \ +src/core/util/random_early_detection.h \ +src/core/util/ref_counted.h \ +src/core/util/ref_counted_ptr.h \ +src/core/util/ref_counted_string.cc \ +src/core/util/ref_counted_string.h \ src/core/util/ring_buffer.h \ +src/core/util/single_set_ptr.h \ +src/core/util/sorted_pack.h \ src/core/util/spinlock.h \ +src/core/util/stat.h \ +src/core/util/status_helper.cc \ +src/core/util/status_helper.h \ +src/core/util/strerror.cc \ +src/core/util/strerror.h \ src/core/util/string.cc \ src/core/util/string.h \ src/core/util/sync.cc \ +src/core/util/sync.h \ src/core/util/sync_abseil.cc \ +src/core/util/table.h \ +src/core/util/tchar.cc \ +src/core/util/tchar.h \ +src/core/util/thd.h \ src/core/util/time.cc \ +src/core/util/time.h \ +src/core/util/time_averaged_stats.cc \ +src/core/util/time_averaged_stats.h \ src/core/util/time_precise.cc \ src/core/util/time_precise.h \ +src/core/util/time_util.cc \ +src/core/util/time_util.h \ src/core/util/tmpfile.h \ +src/core/util/type_list.h \ src/core/util/unique_ptr_with_bitset.h \ +src/core/util/unique_type_name.h \ src/core/util/upb_utils.h \ +src/core/util/uri.cc \ +src/core/util/uri.h \ src/core/util/useful.h \ +src/core/util/uuid_v4.cc \ +src/core/util/uuid_v4.h \ +src/core/util/validation_errors.cc \ +src/core/util/validation_errors.h \ src/core/util/windows/cpu.cc \ +src/core/util/windows/directory_reader.cc \ +src/core/util/windows/env.cc \ +src/core/util/windows/stat.cc \ src/core/util/windows/string.cc \ src/core/util/windows/string_util.cc \ src/core/util/windows/sync.cc \ +src/core/util/windows/thd.cc \ src/core/util/windows/time.cc \ src/core/util/windows/tmpfile.cc \ +src/core/util/work_serializer.cc \ +src/core/util/work_serializer.h \ +src/core/util/xxhash_inline.h \ src/core/xds/grpc/certificate_provider_store.cc \ src/core/xds/grpc/certificate_provider_store.h \ src/core/xds/grpc/file_watcher_certificate_provider_factory.cc \ @@ -2817,6 +2816,8 @@ src/core/xds/grpc/xds_server_grpc.cc \ src/core/xds/grpc/xds_server_grpc.h \ src/core/xds/grpc/xds_transport_grpc.cc \ src/core/xds/grpc/xds_transport_grpc.h \ +src/core/xds/xds_client/lrs_client.cc \ +src/core/xds/xds_client/lrs_client.h \ src/core/xds/xds_client/xds_api.cc \ src/core/xds/xds_client/xds_api.h \ src/core/xds/xds_client/xds_bootstrap.cc \ @@ -2824,8 +2825,7 @@ src/core/xds/xds_client/xds_bootstrap.h \ src/core/xds/xds_client/xds_channel_args.h \ src/core/xds/xds_client/xds_client.cc \ src/core/xds/xds_client/xds_client.h \ -src/core/xds/xds_client/xds_client_stats.cc \ -src/core/xds/xds_client/xds_client_stats.h \ +src/core/xds/xds_client/xds_locality.h \ src/core/xds/xds_client/xds_metrics.h \ src/core/xds/xds_client/xds_resource_type.h \ src/core/xds/xds_client/xds_resource_type_impl.h \ diff --git a/tools/doxygen/Doxyfile.objc b/tools/doxygen/Doxyfile.objc index b8ac808811b0f..d81be1bba3c32 100644 --- a/tools/doxygen/Doxyfile.objc +++ b/tools/doxygen/Doxyfile.objc @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Objective-C" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.67.0-dev +PROJECT_NUMBER = 1.68.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.objc.internal b/tools/doxygen/Doxyfile.objc.internal index 0a95c92d78313..8da26876bcff4 100644 --- a/tools/doxygen/Doxyfile.objc.internal +++ b/tools/doxygen/Doxyfile.objc.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Objective-C" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.67.0-dev +PROJECT_NUMBER = 1.68.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.php b/tools/doxygen/Doxyfile.php index 3c8936d9dc2eb..ac29fc4103926 100644 --- a/tools/doxygen/Doxyfile.php +++ b/tools/doxygen/Doxyfile.php @@ -40,7 +40,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.67.0-dev +PROJECT_NUMBER = 1.68.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index a37749f1a02b5..bc4ea2d919e2e 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -305,7 +305,7 @@ def __init__(self, patch=[], runtimes=[], testcases_file=None): ("v1.63.3", ReleaseInfo()), ("v1.64.1", ReleaseInfo()), ("v1.65.0", ReleaseInfo()), - ("v1.66.0", ReleaseInfo()), + ("v1.66.2", ReleaseInfo()), ] ), "java": OrderedDict( diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 5d7c07fd08fba..98ffb7f4c192a 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -4095,6 +4095,30 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "gpr_time_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": false, @@ -7765,6 +7789,30 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "request_buffer_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": true + }, { "args": [], "benchmark": false, @@ -10613,30 +10661,6 @@ ], "uses_polling": true }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": true, - "language": "c++", - "name": "test_core_gprpp_time_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "uses_polling": false - }, { "args": [], "benchmark": false, @@ -11578,7 +11602,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "uri_parser_test", + "name": "uri_test", "platforms": [ "linux", "mac", diff --git a/tools/run_tests/helper_scripts/build_ruby.sh b/tools/run_tests/helper_scripts/build_ruby.sh index cbf7a3cb191ab..2d1c8b51925da 100755 --- a/tools/run_tests/helper_scripts/build_ruby.sh +++ b/tools/run_tests/helper_scripts/build_ruby.sh @@ -36,6 +36,18 @@ if [ "$SYSTEM" == "Darwin" ]; then fi bundle exec rake compile +# Log stuff and save a hash of the binary verify later at test runtime, in order +# to detect corruption. +if [ "$SYSTEM" == "Darwin" ]; then + ls -l src/ruby/lib/grpc/grpc_c.bundle + file src/ruby/lib/grpc/grpc_c.bundle + shasum -a 256 src/ruby/lib/grpc/grpc_c.bundle | awk '{print $1}' > src/ruby/lib/grpc/grpc_c_sha256 +else + ls -l src/ruby/lib/grpc/grpc_c.so + file src/ruby/lib/grpc/grpc_c.so + sha256sum src/ruby/lib/grpc/grpc_c.so | awk '{print $1}' > src/ruby/lib/grpc/grpc_c_sha256 +fi + # build grpc_ruby_plugin mkdir -p cmake/build pushd cmake/build diff --git a/tools/run_tests/python_utils/start_port_server.py b/tools/run_tests/python_utils/start_port_server.py index 4205dddb852d9..9d9f0b1045082 100644 --- a/tools/run_tests/python_utils/start_port_server.py +++ b/tools/run_tests/python_utils/start_port_server.py @@ -31,7 +31,7 @@ _PORT_SERVER_PORT = 32766 -def start_port_server(): +def start_port_server(verbose=False): # check if a compatible port server is running # if incompatible (version mismatch) ==> start a new one # if not running ==> start a new one @@ -45,7 +45,8 @@ def start_port_server(): logging.info("detected port server running version %d", version) running = True except Exception as e: - logging.exception("failed to detect port server") + if verbose: + logging.exception("failed to detect port server") running = False if running: current_version = int( diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 287431d617a15..16f055338829e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -719,7 +719,7 @@ def test_specs(self): self.config.job_spec( python_config.run + [self._TEST_COMMAND[io_platform]], - timeout_seconds=8 * 60, + timeout_seconds=10 * 60, environ=dict( GRPC_PYTHON_TESTRUNNER_FILTER=str(test_case), **environment, @@ -926,6 +926,7 @@ def test_specs(self): # This crashes have been unreproducible outside of CI. Also see # b/266212253. # - src/ruby/end2end/grpc_class_init_test.rb + # - src/ruby/end2end/load_grpc_with_gc_stress_test.rb for test in [ "src/ruby/end2end/fork_test.rb", "src/ruby/end2end/simple_fork_test.rb", @@ -938,7 +939,6 @@ def test_specs(self): "src/ruby/end2end/killed_client_thread_test.rb", "src/ruby/end2end/forking_client_test.rb", "src/ruby/end2end/multiple_killed_watching_threads_test.rb", - "src/ruby/end2end/load_grpc_with_gc_stress_test.rb", "src/ruby/end2end/client_memory_usage_test.rb", "src/ruby/end2end/package_with_underscore_test.rb", "src/ruby/end2end/graceful_sig_handling_test.rb", @@ -1113,7 +1113,7 @@ def test_specs(self): out.append( self.config.job_spec( ["src/objective-c/tests/build_one_example.sh"], - timeout_seconds=20 * 60, + timeout_seconds=60 * 60, shortname="ios-buildtest-example-sample", cpu_cost=1e6, environ={ @@ -1126,7 +1126,7 @@ def test_specs(self): out.append( self.config.job_spec( ["src/objective-c/tests/build_one_example.sh"], - timeout_seconds=20 * 60, + timeout_seconds=60 * 60, shortname="ios-buildtest-example-switftsample", cpu_cost=1e6, environ={ @@ -1138,7 +1138,7 @@ def test_specs(self): out.append( self.config.job_spec( ["src/objective-c/tests/build_one_example.sh"], - timeout_seconds=20 * 60, + timeout_seconds=60 * 60, shortname="ios-buildtest-example-switft-use-frameworks", cpu_cost=1e6, environ={ @@ -1164,15 +1164,16 @@ def test_specs(self): # TODO(jtattermusch): move the test out of the test/core/iomgr/CFStreamTests directory? # How does one add the cfstream dependency in bazel? - out.append( - self.config.job_spec( - ["test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh"], - timeout_seconds=60 * 60, - shortname="ios-test-cfstream-tests", - cpu_cost=1e6, - environ=_FORCE_ENVIRON_FOR_WRAPPERS, - ) - ) + # Disabled due to flakiness and being replaced with event engine + # out.append( + # self.config.job_spec( + # ["test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh"], + # timeout_seconds=60 * 60, + # shortname="ios-test-cfstream-tests", + # cpu_cost=1e6, + # environ=_FORCE_ENVIRON_FOR_WRAPPERS, + # ) + # ) return sorted(out) def pre_build_steps(self): diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py index fc2cc2ee7d527..4058cc5261d1f 100755 --- a/tools/run_tests/run_tests_matrix.py +++ b/tools/run_tests/run_tests_matrix.py @@ -34,7 +34,7 @@ _CPP_RUNTESTS_TIMEOUT = 4 * 60 * 60 # Set timeout high for ObjC for Cocoapods to install pods -_OBJC_RUNTESTS_TIMEOUT = 2 * 60 * 60 +_OBJC_RUNTESTS_TIMEOUT = 4 * 60 * 60 # Number of jobs assigned to each run_tests.py instance _DEFAULT_INNER_JOBS = 2 diff --git a/tools/run_tests/sanity/check_absl_mutex.sh b/tools/run_tests/sanity/check_absl_mutex.sh index 7243f9e471a68..99bdbc60b73a0 100755 --- a/tools/run_tests/sanity/check_absl_mutex.sh +++ b/tools/run_tests/sanity/check_absl_mutex.sh @@ -28,7 +28,7 @@ find . \( \( -name "*.cc" \) -or \( -name "*.h" \) \) \ -or \( -wholename "./include/*" \) \ -or \( -wholename "./test/*" \) \) \ -a -not -wholename "./include/grpcpp/impl/sync.h" \ - -a -not -wholename "./src/core/lib/gprpp/sync.h" \ + -a -not -wholename "./src/core/util/sync.h" \ -a -not -wholename "./src/core/util/sync_abseil.cc" \ -a -not -wholename "./test/core/transport/call_spine_benchmarks.h" \ -print0 |\ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index dbb6ee6c4f6b2..7e5245b963bba 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -28,7 +28,7 @@ cat <"$want_submodules" third_party/abseil-cpp 4a2c63365eff8823a5221db86ef490e828306f9d third_party/benchmark 344117638c8ff7e239044fd0fa7085839fc03021 third_party/bloaty 60209eb1ccc34d5deefb002d1b7f37545204f7f2 -third_party/boringssl-with-bazel 16c8d3db1af20fcc04b5190b25242aadcb1fbb30 +third_party/boringssl-with-bazel b8b3e6e11166719a8ebfa43c0cde9ad7d57a84f6 third_party/cares/cares 6360e96b5cf8e5980c887ce58ef727e53d77243a third_party/envoy-api f8b75d1efa92bbf534596a013d9ca5873f79dd30 third_party/googleapis fe8ba054ad4f7eca946c2d14a63c3f07c0b586a0 diff --git a/tools/run_tests/sanity/cpp_banned_constructs.sh b/tools/run_tests/sanity/cpp_banned_constructs.sh index 2296cfd8ebd8c..2318fd95b71f4 100755 --- a/tools/run_tests/sanity/cpp_banned_constructs.sh +++ b/tools/run_tests/sanity/cpp_banned_constructs.sh @@ -26,7 +26,7 @@ cd "$(dirname "$0")/../../.." grep -EIrn \ 'std::(mutex|condition_variable|lock_guard|unique_lock|thread)' \ include/grpc include/grpcpp src/core src/cpp | \ - grep -Ev 'include/grpcpp/impl/sync.h|src/core/lib/gprpp/work_serializer.cc' | \ + grep -Ev 'include/grpcpp/impl/sync.h|src/core/util/work_serializer.cc' | \ diff - /dev/null # @@ -36,7 +36,7 @@ grep -EIrn \ grep -EIrn \ '^#include (||||||)' \ include/grpc include/grpcpp src/core src/cpp | \ - grep -Ev 'include/grpcpp/impl/sync.h|src/core/lib/gprpp/work_serializer.cc' | \ + grep -Ev 'include/grpcpp/impl/sync.h|src/core/util/work_serializer.cc' | \ diff - /dev/null #