diff --git a/BUILD b/BUILD index 6534f189793..3dd6e4f8d62 100644 --- a/BUILD +++ b/BUILD @@ -3014,8 +3014,6 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/dynamic_filters.cc", "//src/core:ext/filters/client_channel/global_subchannel_pool.cc", "//src/core:ext/filters/client_channel/http_proxy_mapper.cc", - "//src/core:ext/filters/client_channel/lb_policy/child_policy_handler.cc", - "//src/core:ext/filters/client_channel/lb_policy/oob_backend_metric.cc", "//src/core:ext/filters/client_channel/local_subchannel_pool.cc", "//src/core:ext/filters/client_channel/retry_filter.cc", "//src/core:ext/filters/client_channel/retry_filter_legacy_call_data.cc", @@ -3025,6 +3023,8 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/subchannel.cc", "//src/core:ext/filters/client_channel/subchannel_pool_interface.cc", "//src/core:ext/filters/client_channel/subchannel_stream_client.cc", + "//src/core:load_balancing/child_policy_handler.cc", + "//src/core:load_balancing/oob_backend_metric.cc", ], hdrs = [ "//src/core:ext/filters/client_channel/backend_metric.h", @@ -3039,9 +3039,6 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/dynamic_filters.h", "//src/core:ext/filters/client_channel/global_subchannel_pool.h", "//src/core:ext/filters/client_channel/http_proxy_mapper.h", - "//src/core:ext/filters/client_channel/lb_policy/child_policy_handler.h", - "//src/core:ext/filters/client_channel/lb_policy/oob_backend_metric.h", - "//src/core:ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h", "//src/core:ext/filters/client_channel/local_subchannel_pool.h", "//src/core:ext/filters/client_channel/retry_filter.h", "//src/core:ext/filters/client_channel/retry_filter_legacy_call_data.h", @@ -3051,6 +3048,9 @@ grpc_cc_library( "//src/core:ext/filters/client_channel/subchannel_interface_internal.h", "//src/core:ext/filters/client_channel/subchannel_pool_interface.h", "//src/core:ext/filters/client_channel/subchannel_stream_client.h", + "//src/core:load_balancing/child_policy_handler.h", + "//src/core:load_balancing/oob_backend_metric.h", + "//src/core:load_balancing/oob_backend_metric_internal.h", ], external_deps = [ "absl/base:core_headers", @@ -3646,10 +3646,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_grpclb_balancer_addresses", srcs = [ - "//src/core:ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc", + "//src/core:load_balancing/grpclb/grpclb_balancer_addresses.cc", ], hdrs = [ - "//src/core:ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h", + "//src/core:load_balancing/grpclb/grpclb_balancer_addresses.h", ], language = "c++", visibility = ["@grpc:grpclb"], diff --git a/CMakeLists.txt b/CMakeLists.txt index acd54733f57..12959352064 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1794,30 +1794,6 @@ add_library(grpc src/core/ext/filters/client_channel/dynamic_filters.cc src/core/ext/filters/client_channel/global_subchannel_pool.cc src/core/ext/filters/client_channel/http_proxy_mapper.cc - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc - src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc - src/core/ext/filters/client_channel/lb_policy/xds/cds.cc - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc - src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc - src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc src/core/ext/filters/client_channel/local_subchannel_pool.cc src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -2412,8 +2388,6 @@ add_library(grpc src/core/lib/json/json_reader.cc src/core/lib/json/json_util.cc src/core/lib/json/json_writer.cc - src/core/lib/load_balancing/lb_policy.cc - src/core/lib/load_balancing/lb_policy_registry.cc src/core/lib/matchers/matchers.cc src/core/lib/promise/activity.cc src/core/lib/promise/party.cc @@ -2546,6 +2520,32 @@ add_library(grpc 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/child_policy_handler.cc + src/core/load_balancing/endpoint_list.cc + src/core/load_balancing/grpclb/client_load_reporting_filter.cc + src/core/load_balancing/grpclb/grpclb.cc + src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc + src/core/load_balancing/grpclb/grpclb_client_stats.cc + src/core/load_balancing/grpclb/load_balancer_api.cc + src/core/load_balancing/health_check_client.cc + src/core/load_balancing/lb_policy.cc + src/core/load_balancing/lb_policy_registry.cc + src/core/load_balancing/oob_backend_metric.cc + src/core/load_balancing/outlier_detection/outlier_detection.cc + src/core/load_balancing/pick_first/pick_first.cc + src/core/load_balancing/priority/priority.cc + src/core/load_balancing/ring_hash/ring_hash.cc + src/core/load_balancing/rls/rls.cc + src/core/load_balancing/round_robin/round_robin.cc + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc + src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc + src/core/load_balancing/weighted_target/weighted_target.cc + src/core/load_balancing/xds/cds.cc + src/core/load_balancing/xds/xds_cluster_impl.cc + src/core/load_balancing/xds/xds_cluster_manager.cc + src/core/load_balancing/xds/xds_override_host.cc + src/core/load_balancing/xds/xds_wrr_locality.cc src/core/plugin_registry/grpc_plugin_registry.cc src/core/plugin_registry/grpc_plugin_registry_extra.cc src/core/tsi/alts/crypt/aes_gcm.cc @@ -2892,24 +2892,6 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/dynamic_filters.cc src/core/ext/filters/client_channel/global_subchannel_pool.cc src/core/ext/filters/client_channel/http_proxy_mapper.cc - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc src/core/ext/filters/client_channel/local_subchannel_pool.cc src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -3165,8 +3147,6 @@ add_library(grpc_unsecure src/core/lib/json/json_object_loader.cc src/core/lib/json/json_reader.cc src/core/lib/json/json_writer.cc - src/core/lib/load_balancing/lb_policy.cc - src/core/lib/load_balancing/lb_policy_registry.cc src/core/lib/promise/activity.cc src/core/lib/promise/party.cc src/core/lib/promise/sleep.cc @@ -3264,6 +3244,26 @@ add_library(grpc_unsecure 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/child_policy_handler.cc + src/core/load_balancing/endpoint_list.cc + src/core/load_balancing/grpclb/client_load_reporting_filter.cc + src/core/load_balancing/grpclb/grpclb.cc + src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc + src/core/load_balancing/grpclb/grpclb_client_stats.cc + src/core/load_balancing/grpclb/load_balancer_api.cc + src/core/load_balancing/health_check_client.cc + src/core/load_balancing/lb_policy.cc + src/core/load_balancing/lb_policy_registry.cc + src/core/load_balancing/oob_backend_metric.cc + src/core/load_balancing/outlier_detection/outlier_detection.cc + src/core/load_balancing/pick_first/pick_first.cc + src/core/load_balancing/priority/priority.cc + src/core/load_balancing/rls/rls.cc + src/core/load_balancing/round_robin/round_robin.cc + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc + src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc + src/core/load_balancing/weighted_target/weighted_target.cc src/core/plugin_registry/grpc_plugin_registry.cc src/core/plugin_registry/grpc_plugin_registry_noextra.cc src/core/tsi/alts/handshaker/transport_security_common_api.cc @@ -5255,8 +5255,6 @@ add_library(grpc_authorization_provider src/core/lib/iomgr/wakeup_fd_posix.cc src/core/lib/json/json_reader.cc src/core/lib/json/json_writer.cc - src/core/lib/load_balancing/lb_policy.cc - src/core/lib/load_balancing/lb_policy_registry.cc src/core/lib/matchers/matchers.cc src/core/lib/promise/activity.cc src/core/lib/promise/party.cc @@ -5352,6 +5350,8 @@ add_library(grpc_authorization_provider 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/tsi/alts/handshaker/transport_security_common_api.cc src/core/tsi/transport_security.cc src/core/tsi/transport_security_grpc.cc @@ -5804,7 +5804,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_executable(static_stride_scheduler_benchmark - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc ) if(WIN32 AND MSVC) @@ -27472,7 +27472,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(static_stride_scheduler_test - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc test/core/client_channel/lb_policy/static_stride_scheduler_test.cc ) if(WIN32 AND MSVC) diff --git a/Makefile b/Makefile index 2ae705ccef8..d72aa44ba90 100644 --- a/Makefile +++ b/Makefile @@ -976,30 +976,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/dynamic_filters.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/http_proxy_mapper.cc \ - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc \ - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc \ - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc \ - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc \ - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc \ - src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc \ - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc \ - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/cds.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -1594,8 +1570,6 @@ LIBGRPC_SRC = \ src/core/lib/json/json_reader.cc \ src/core/lib/json/json_util.cc \ src/core/lib/json/json_writer.cc \ - src/core/lib/load_balancing/lb_policy.cc \ - src/core/lib/load_balancing/lb_policy_registry.cc \ src/core/lib/matchers/matchers.cc \ src/core/lib/promise/activity.cc \ src/core/lib/promise/party.cc \ @@ -1728,6 +1702,32 @@ LIBGRPC_SRC = \ 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/child_policy_handler.cc \ + src/core/load_balancing/endpoint_list.cc \ + src/core/load_balancing/grpclb/client_load_reporting_filter.cc \ + src/core/load_balancing/grpclb/grpclb.cc \ + src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc \ + src/core/load_balancing/grpclb/grpclb_client_stats.cc \ + src/core/load_balancing/grpclb/load_balancer_api.cc \ + src/core/load_balancing/health_check_client.cc \ + src/core/load_balancing/lb_policy.cc \ + src/core/load_balancing/lb_policy_registry.cc \ + src/core/load_balancing/oob_backend_metric.cc \ + src/core/load_balancing/outlier_detection/outlier_detection.cc \ + src/core/load_balancing/pick_first/pick_first.cc \ + src/core/load_balancing/priority/priority.cc \ + src/core/load_balancing/ring_hash/ring_hash.cc \ + src/core/load_balancing/rls/rls.cc \ + src/core/load_balancing/round_robin/round_robin.cc \ + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc \ + src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc \ + src/core/load_balancing/weighted_target/weighted_target.cc \ + src/core/load_balancing/xds/cds.cc \ + src/core/load_balancing/xds/xds_cluster_impl.cc \ + src/core/load_balancing/xds/xds_cluster_manager.cc \ + src/core/load_balancing/xds/xds_override_host.cc \ + src/core/load_balancing/xds/xds_wrr_locality.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/plugin_registry/grpc_plugin_registry_extra.cc \ src/core/tsi/alts/crypt/aes_gcm.cc \ @@ -1908,24 +1908,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/dynamic_filters.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/http_proxy_mapper.cc \ - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc \ - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc \ - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc \ - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc \ - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc \ - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc \ - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -2181,8 +2163,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/json/json_object_loader.cc \ src/core/lib/json/json_reader.cc \ src/core/lib/json/json_writer.cc \ - src/core/lib/load_balancing/lb_policy.cc \ - src/core/lib/load_balancing/lb_policy_registry.cc \ src/core/lib/promise/activity.cc \ src/core/lib/promise/party.cc \ src/core/lib/promise/sleep.cc \ @@ -2280,6 +2260,26 @@ LIBGRPC_UNSECURE_SRC = \ 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/child_policy_handler.cc \ + src/core/load_balancing/endpoint_list.cc \ + src/core/load_balancing/grpclb/client_load_reporting_filter.cc \ + src/core/load_balancing/grpclb/grpclb.cc \ + src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc \ + src/core/load_balancing/grpclb/grpclb_client_stats.cc \ + src/core/load_balancing/grpclb/load_balancer_api.cc \ + src/core/load_balancing/health_check_client.cc \ + src/core/load_balancing/lb_policy.cc \ + src/core/load_balancing/lb_policy_registry.cc \ + src/core/load_balancing/oob_backend_metric.cc \ + src/core/load_balancing/outlier_detection/outlier_detection.cc \ + src/core/load_balancing/pick_first/pick_first.cc \ + src/core/load_balancing/priority/priority.cc \ + src/core/load_balancing/rls/rls.cc \ + src/core/load_balancing/round_robin/round_robin.cc \ + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc \ + src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc \ + src/core/load_balancing/weighted_target/weighted_target.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/plugin_registry/grpc_plugin_registry_noextra.cc \ src/core/tsi/alts/handshaker/transport_security_common_api.cc \ @@ -3422,12 +3422,6 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. -src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc: $(OPENSSL_DEP) -src/core/ext/filters/client_channel/lb_policy/xds/cds.cc: $(OPENSSL_DEP) -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc: $(OPENSSL_DEP) -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc: $(OPENSSL_DEP) -src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc: $(OPENSSL_DEP) -src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc: $(OPENSSL_DEP) src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc: $(OPENSSL_DEP) src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.cc: $(OPENSSL_DEP) src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc: $(OPENSSL_DEP) @@ -3802,6 +3796,12 @@ src/core/lib/security/security_connector/local/local_security_connector.cc: $(OP src/core/lib/security/security_connector/ssl/ssl_security_connector.cc: $(OPENSSL_DEP) src/core/lib/security/security_connector/ssl_utils.cc: $(OPENSSL_DEP) src/core/lib/security/security_connector/tls/tls_security_connector.cc: $(OPENSSL_DEP) +src/core/load_balancing/ring_hash/ring_hash.cc: $(OPENSSL_DEP) +src/core/load_balancing/xds/cds.cc: $(OPENSSL_DEP) +src/core/load_balancing/xds/xds_cluster_impl.cc: $(OPENSSL_DEP) +src/core/load_balancing/xds/xds_cluster_manager.cc: $(OPENSSL_DEP) +src/core/load_balancing/xds/xds_override_host.cc: $(OPENSSL_DEP) +src/core/load_balancing/xds/xds_wrr_locality.cc: $(OPENSSL_DEP) src/core/plugin_registry/grpc_plugin_registry_extra.cc: $(OPENSSL_DEP) src/core/tsi/alts/crypt/aes_gcm.cc: $(OPENSSL_DEP) src/core/tsi/alts/crypt/gsec.cc: $(OPENSSL_DEP) diff --git a/Package.swift b/Package.swift index bab01bcf692..39976a00980 100644 --- a/Package.swift +++ b/Package.swift @@ -149,50 +149,6 @@ let package = Package( "src/core/ext/filters/client_channel/global_subchannel_pool.h", "src/core/ext/filters/client_channel/http_proxy_mapper.cc", "src/core/ext/filters/client_channel/http_proxy_mapper.h", - "src/core/ext/filters/client_channel/lb_policy/address_filtering.cc", - "src/core/ext/filters/client_channel/lb_policy/address_filtering.h", - "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h", - "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc", - "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h", - "src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc", - "src/core/ext/filters/client_channel/lb_policy/endpoint_list.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", - "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc", - "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/filters/client_channel/lb_policy/health_check_client.cc", - "src/core/ext/filters/client_channel/lb_policy/health_check_client.h", - "src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h", - "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc", - "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h", - "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h", - "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc", - "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h", - "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc", - "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h", - "src/core/ext/filters/client_channel/lb_policy/priority/priority.cc", - "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc", - "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h", - "src/core/ext/filters/client_channel/lb_policy/rls/rls.cc", - "src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc", - "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h", - "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc", - "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h", - "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc", - "src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc", - "src/core/ext/filters/client_channel/lb_policy/xds/cds.cc", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h", - "src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc", "src/core/ext/filters/client_channel/local_subchannel_pool.cc", "src/core/ext/filters/client_channel/local_subchannel_pool.h", "src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc", @@ -1645,13 +1601,6 @@ let package = Package( "src/core/lib/json/json_util.h", "src/core/lib/json/json_writer.cc", "src/core/lib/json/json_writer.h", - "src/core/lib/load_balancing/delegating_helper.h", - "src/core/lib/load_balancing/lb_policy.cc", - "src/core/lib/load_balancing/lb_policy.h", - "src/core/lib/load_balancing/lb_policy_factory.h", - "src/core/lib/load_balancing/lb_policy_registry.cc", - "src/core/lib/load_balancing/lb_policy_registry.h", - "src/core/lib/load_balancing/subchannel_interface.h", "src/core/lib/matchers/matchers.cc", "src/core/lib/matchers/matchers.h", "src/core/lib/promise/activity.cc", @@ -1944,6 +1893,57 @@ let package = Package( "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", + "src/core/load_balancing/child_policy_handler.cc", + "src/core/load_balancing/child_policy_handler.h", + "src/core/load_balancing/delegating_helper.h", + "src/core/load_balancing/endpoint_list.cc", + "src/core/load_balancing/endpoint_list.h", + "src/core/load_balancing/grpclb/client_load_reporting_filter.cc", + "src/core/load_balancing/grpclb/client_load_reporting_filter.h", + "src/core/load_balancing/grpclb/grpclb.cc", + "src/core/load_balancing/grpclb/grpclb.h", + "src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc", + "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h", + "src/core/load_balancing/grpclb/grpclb_client_stats.cc", + "src/core/load_balancing/grpclb/grpclb_client_stats.h", + "src/core/load_balancing/grpclb/load_balancer_api.cc", + "src/core/load_balancing/grpclb/load_balancer_api.h", + "src/core/load_balancing/health_check_client.cc", + "src/core/load_balancing/health_check_client.h", + "src/core/load_balancing/health_check_client_internal.h", + "src/core/load_balancing/lb_policy.cc", + "src/core/load_balancing/lb_policy.h", + "src/core/load_balancing/lb_policy_factory.h", + "src/core/load_balancing/lb_policy_registry.cc", + "src/core/load_balancing/lb_policy_registry.h", + "src/core/load_balancing/oob_backend_metric.cc", + "src/core/load_balancing/oob_backend_metric.h", + "src/core/load_balancing/oob_backend_metric_internal.h", + "src/core/load_balancing/outlier_detection/outlier_detection.cc", + "src/core/load_balancing/outlier_detection/outlier_detection.h", + "src/core/load_balancing/pick_first/pick_first.cc", + "src/core/load_balancing/pick_first/pick_first.h", + "src/core/load_balancing/priority/priority.cc", + "src/core/load_balancing/ring_hash/ring_hash.cc", + "src/core/load_balancing/ring_hash/ring_hash.h", + "src/core/load_balancing/rls/rls.cc", + "src/core/load_balancing/round_robin/round_robin.cc", + "src/core/load_balancing/subchannel_interface.h", + "src/core/load_balancing/subchannel_list.h", + "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc", + "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h", + "src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc", + "src/core/load_balancing/weighted_target/weighted_target.cc", + "src/core/load_balancing/xds/cds.cc", + "src/core/load_balancing/xds/xds_channel_args.h", + "src/core/load_balancing/xds/xds_cluster_impl.cc", + "src/core/load_balancing/xds/xds_cluster_manager.cc", + "src/core/load_balancing/xds/xds_override_host.cc", + "src/core/load_balancing/xds/xds_override_host.h", + "src/core/load_balancing/xds/xds_wrr_locality.cc", "src/core/plugin_registry/grpc_plugin_registry.cc", "src/core/plugin_registry/grpc_plugin_registry_extra.cc", "src/core/tsi/alts/crypt/aes_gcm.cc", diff --git a/bazel/experiments.bzl b/bazel/experiments.bzl index 29a92b05430..ca5894b6010 100644 --- a/bazel/experiments.bzl +++ b/bazel/experiments.bzl @@ -38,7 +38,6 @@ EXPERIMENT_ENABLES = { "promise_based_server_call": "promise_based_server_call", "registered_method_lookup_in_transport": "registered_method_lookup_in_transport", "promise_based_inproc_transport": "promise_based_client_call,promise_based_inproc_transport,promise_based_server_call,registered_method_lookup_in_transport", - "registered_methods_map": "registered_methods_map", "rfc_max_concurrent_streams": "rfc_max_concurrent_streams", "round_robin_delegate_to_pick_first": "round_robin_delegate_to_pick_first", "rstpit": "rstpit", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 05981fbb7c9..1964edf6d8a 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -234,26 +234,6 @@ libs: - src/core/ext/filters/client_channel/dynamic_filters.h - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/http_proxy_mapper.h - - src/core/ext/filters/client_channel/lb_policy/address_filtering.h - - src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h - - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h - - src/core/ext/filters/client_channel/lb_policy/endpoint_list.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h - - src/core/ext/filters/client_channel/lb_policy/health_check_client.h - - src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h - - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h - - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h - - src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h - - src/core/ext/filters/client_channel/lb_policy/subchannel_list.h - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h - - src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h - - src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h - src/core/ext/filters/client_channel/local_subchannel_pool.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -1041,11 +1021,6 @@ libs: - src/core/lib/json/json_reader.h - src/core/lib/json/json_util.h - src/core/lib/json/json_writer.h - - src/core/lib/load_balancing/delegating_helper.h - - src/core/lib/load_balancing/lb_policy.h - - src/core/lib/load_balancing/lb_policy_factory.h - - src/core/lib/load_balancing/lb_policy_registry.h - - src/core/lib/load_balancing/subchannel_interface.h - src/core/lib/matchers/matchers.h - src/core/lib/promise/activity.h - src/core/lib/promise/all_ok.h @@ -1202,6 +1177,31 @@ libs: - 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/child_policy_handler.h + - src/core/load_balancing/delegating_helper.h + - src/core/load_balancing/endpoint_list.h + - src/core/load_balancing/grpclb/client_load_reporting_filter.h + - src/core/load_balancing/grpclb/grpclb.h + - src/core/load_balancing/grpclb/grpclb_balancer_addresses.h + - src/core/load_balancing/grpclb/grpclb_client_stats.h + - src/core/load_balancing/grpclb/load_balancer_api.h + - src/core/load_balancing/health_check_client.h + - src/core/load_balancing/health_check_client_internal.h + - src/core/load_balancing/lb_policy.h + - src/core/load_balancing/lb_policy_factory.h + - src/core/load_balancing/lb_policy_registry.h + - src/core/load_balancing/oob_backend_metric.h + - src/core/load_balancing/oob_backend_metric_internal.h + - src/core/load_balancing/outlier_detection/outlier_detection.h + - src/core/load_balancing/pick_first/pick_first.h + - src/core/load_balancing/ring_hash/ring_hash.h + - src/core/load_balancing/subchannel_interface.h + - src/core/load_balancing/subchannel_list.h + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h + - src/core/load_balancing/xds/xds_channel_args.h + - src/core/load_balancing/xds/xds_override_host.h - src/core/tsi/alts/crypt/gsec.h - src/core/tsi/alts/frame_protector/alts_counter.h - src/core/tsi/alts/frame_protector/alts_crypter.h @@ -1251,30 +1251,6 @@ libs: - src/core/ext/filters/client_channel/dynamic_filters.cc - src/core/ext/filters/client_channel/global_subchannel_pool.cc - src/core/ext/filters/client_channel/http_proxy_mapper.cc - - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc - - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc - - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc - - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc - - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc - - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc - - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc - - src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc - - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc - - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc - - src/core/ext/filters/client_channel/lb_policy/xds/cds.cc - - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc - - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc - - src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc - - src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc - src/core/ext/filters/client_channel/local_subchannel_pool.cc - src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -1869,8 +1845,6 @@ libs: - src/core/lib/json/json_reader.cc - src/core/lib/json/json_util.cc - src/core/lib/json/json_writer.cc - - src/core/lib/load_balancing/lb_policy.cc - - src/core/lib/load_balancing/lb_policy_registry.cc - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc - src/core/lib/promise/party.cc @@ -2003,6 +1977,32 @@ libs: - 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/child_policy_handler.cc + - src/core/load_balancing/endpoint_list.cc + - src/core/load_balancing/grpclb/client_load_reporting_filter.cc + - src/core/load_balancing/grpclb/grpclb.cc + - src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc + - src/core/load_balancing/grpclb/grpclb_client_stats.cc + - src/core/load_balancing/grpclb/load_balancer_api.cc + - src/core/load_balancing/health_check_client.cc + - src/core/load_balancing/lb_policy.cc + - src/core/load_balancing/lb_policy_registry.cc + - src/core/load_balancing/oob_backend_metric.cc + - src/core/load_balancing/outlier_detection/outlier_detection.cc + - src/core/load_balancing/pick_first/pick_first.cc + - src/core/load_balancing/priority/priority.cc + - src/core/load_balancing/ring_hash/ring_hash.cc + - src/core/load_balancing/rls/rls.cc + - src/core/load_balancing/round_robin/round_robin.cc + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc + - src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc + - src/core/load_balancing/weighted_target/weighted_target.cc + - src/core/load_balancing/xds/cds.cc + - src/core/load_balancing/xds/xds_cluster_impl.cc + - src/core/load_balancing/xds/xds_cluster_manager.cc + - src/core/load_balancing/xds/xds_override_host.cc + - src/core/load_balancing/xds/xds_wrr_locality.cc - src/core/plugin_registry/grpc_plugin_registry.cc - src/core/plugin_registry/grpc_plugin_registry_extra.cc - src/core/tsi/alts/crypt/aes_gcm.cc @@ -2213,23 +2213,6 @@ libs: - src/core/ext/filters/client_channel/dynamic_filters.h - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/http_proxy_mapper.h - - src/core/ext/filters/client_channel/lb_policy/address_filtering.h - - src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h - - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h - - src/core/ext/filters/client_channel/lb_policy/endpoint_list.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h - - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h - - src/core/ext/filters/client_channel/lb_policy/health_check_client.h - - src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h - - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h - - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h - - src/core/ext/filters/client_channel/lb_policy/subchannel_list.h - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h - src/core/ext/filters/client_channel/local_subchannel_pool.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h - src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h @@ -2528,11 +2511,6 @@ libs: - src/core/lib/json/json_object_loader.h - src/core/lib/json/json_reader.h - src/core/lib/json/json_writer.h - - src/core/lib/load_balancing/delegating_helper.h - - src/core/lib/load_balancing/lb_policy.h - - src/core/lib/load_balancing/lb_policy_factory.h - - src/core/lib/load_balancing/lb_policy_registry.h - - src/core/lib/load_balancing/subchannel_interface.h - src/core/lib/promise/activity.h - src/core/lib/promise/all_ok.h - src/core/lib/promise/arena_promise.h @@ -2657,6 +2635,28 @@ libs: - 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/child_policy_handler.h + - src/core/load_balancing/delegating_helper.h + - src/core/load_balancing/endpoint_list.h + - src/core/load_balancing/grpclb/client_load_reporting_filter.h + - src/core/load_balancing/grpclb/grpclb.h + - src/core/load_balancing/grpclb/grpclb_balancer_addresses.h + - src/core/load_balancing/grpclb/grpclb_client_stats.h + - src/core/load_balancing/grpclb/load_balancer_api.h + - src/core/load_balancing/health_check_client.h + - src/core/load_balancing/health_check_client_internal.h + - src/core/load_balancing/lb_policy.h + - src/core/load_balancing/lb_policy_factory.h + - src/core/load_balancing/lb_policy_registry.h + - src/core/load_balancing/oob_backend_metric.h + - src/core/load_balancing/oob_backend_metric_internal.h + - src/core/load_balancing/outlier_detection/outlier_detection.h + - src/core/load_balancing/pick_first/pick_first.h + - src/core/load_balancing/subchannel_interface.h + - src/core/load_balancing/subchannel_list.h + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h - src/core/tsi/alts/handshaker/transport_security_common_api.h - src/core/tsi/fake_transport_security.h - src/core/tsi/local_transport_security.h @@ -2702,24 +2702,6 @@ libs: - src/core/ext/filters/client_channel/dynamic_filters.cc - src/core/ext/filters/client_channel/global_subchannel_pool.cc - src/core/ext/filters/client_channel/http_proxy_mapper.cc - - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc - - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc - - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc - - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc - - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc - - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc - - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc - - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc - - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc - - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc - - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc - - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc - src/core/ext/filters/client_channel/local_subchannel_pool.cc - src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc - src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -2975,8 +2957,6 @@ libs: - src/core/lib/json/json_object_loader.cc - src/core/lib/json/json_reader.cc - src/core/lib/json/json_writer.cc - - src/core/lib/load_balancing/lb_policy.cc - - src/core/lib/load_balancing/lb_policy_registry.cc - src/core/lib/promise/activity.cc - src/core/lib/promise/party.cc - src/core/lib/promise/sleep.cc @@ -3074,6 +3054,26 @@ libs: - 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/child_policy_handler.cc + - src/core/load_balancing/endpoint_list.cc + - src/core/load_balancing/grpclb/client_load_reporting_filter.cc + - src/core/load_balancing/grpclb/grpclb.cc + - src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc + - src/core/load_balancing/grpclb/grpclb_client_stats.cc + - src/core/load_balancing/grpclb/load_balancer_api.cc + - src/core/load_balancing/health_check_client.cc + - src/core/load_balancing/lb_policy.cc + - src/core/load_balancing/lb_policy_registry.cc + - src/core/load_balancing/oob_backend_metric.cc + - src/core/load_balancing/outlier_detection/outlier_detection.cc + - src/core/load_balancing/pick_first/pick_first.cc + - src/core/load_balancing/priority/priority.cc + - src/core/load_balancing/rls/rls.cc + - src/core/load_balancing/round_robin/round_robin.cc + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc + - src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc + - src/core/load_balancing/weighted_target/weighted_target.cc - src/core/plugin_registry/grpc_plugin_registry.cc - src/core/plugin_registry/grpc_plugin_registry_noextra.cc - src/core/tsi/alts/handshaker/transport_security_common_api.cc @@ -4370,7 +4370,6 @@ libs: - include/grpc/support/time.h - include/grpc/support/workaround_list.h headers: - - src/core/ext/filters/client_channel/lb_policy/backend_metric_data.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/protobuf/descriptor.upb.h @@ -4575,10 +4574,6 @@ libs: - src/core/lib/json/json_args.h - src/core/lib/json/json_reader.h - src/core/lib/json/json_writer.h - - src/core/lib/load_balancing/lb_policy.h - - src/core/lib/load_balancing/lb_policy_factory.h - - src/core/lib/load_balancing/lb_policy_registry.h - - src/core/lib/load_balancing/subchannel_interface.h - src/core/lib/matchers/matchers.h - src/core/lib/promise/activity.h - src/core/lib/promise/all_ok.h @@ -4702,6 +4697,11 @@ libs: - 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 + - src/core/load_balancing/lb_policy_registry.h + - src/core/load_balancing/subchannel_interface.h - src/core/tsi/alts/handshaker/transport_security_common_api.h - src/core/tsi/transport_security.h - src/core/tsi/transport_security_grpc.h @@ -4899,8 +4899,6 @@ libs: - src/core/lib/iomgr/wakeup_fd_posix.cc - src/core/lib/json/json_reader.cc - src/core/lib/json/json_writer.cc - - src/core/lib/load_balancing/lb_policy.cc - - src/core/lib/load_balancing/lb_policy_registry.cc - src/core/lib/matchers/matchers.cc - src/core/lib/promise/activity.cc - src/core/lib/promise/party.cc @@ -4996,6 +4994,8 @@ libs: - 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/tsi/alts/handshaker/transport_security_common_api.cc - src/core/tsi/transport_security.cc - src/core/tsi/transport_security_grpc.cc @@ -5146,9 +5146,9 @@ targets: build: test language: c headers: - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h src: - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc - test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc deps: - absl/algorithm:container @@ -15988,9 +15988,9 @@ targets: build: test language: c++ headers: - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h src: - - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc + - src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc - test/core/client_channel/lb_policy/static_stride_scheduler_test.cc deps: - gtest diff --git a/config.m4 b/config.m4 index 35683cf5ede..30bbb2dcf5c 100644 --- a/config.m4 +++ b/config.m4 @@ -58,30 +58,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/dynamic_filters.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/http_proxy_mapper.cc \ - src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ - src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc \ - src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ - src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ - src/core/ext/filters/client_channel/lb_policy/health_check_client.cc \ - src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc \ - src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc \ - src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ - src/core/ext/filters/client_channel/lb_policy/priority/priority.cc \ - src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc \ - src/core/ext/filters/client_channel/lb_policy/rls/rls.cc \ - src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc \ - src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/cds.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc \ - src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -722,8 +698,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/json/json_reader.cc \ src/core/lib/json/json_util.cc \ src/core/lib/json/json_writer.cc \ - src/core/lib/load_balancing/lb_policy.cc \ - src/core/lib/load_balancing/lb_policy_registry.cc \ src/core/lib/matchers/matchers.cc \ src/core/lib/promise/activity.cc \ src/core/lib/promise/party.cc \ @@ -856,6 +830,32 @@ if test "$PHP_GRPC" != "no"; then 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/child_policy_handler.cc \ + src/core/load_balancing/endpoint_list.cc \ + src/core/load_balancing/grpclb/client_load_reporting_filter.cc \ + src/core/load_balancing/grpclb/grpclb.cc \ + src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc \ + src/core/load_balancing/grpclb/grpclb_client_stats.cc \ + src/core/load_balancing/grpclb/load_balancer_api.cc \ + src/core/load_balancing/health_check_client.cc \ + src/core/load_balancing/lb_policy.cc \ + src/core/load_balancing/lb_policy_registry.cc \ + src/core/load_balancing/oob_backend_metric.cc \ + src/core/load_balancing/outlier_detection/outlier_detection.cc \ + src/core/load_balancing/pick_first/pick_first.cc \ + src/core/load_balancing/priority/priority.cc \ + src/core/load_balancing/ring_hash/ring_hash.cc \ + src/core/load_balancing/rls/rls.cc \ + src/core/load_balancing/round_robin/round_robin.cc \ + src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc \ + src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc \ + src/core/load_balancing/weighted_target/weighted_target.cc \ + src/core/load_balancing/xds/cds.cc \ + src/core/load_balancing/xds/xds_cluster_impl.cc \ + src/core/load_balancing/xds/xds_cluster_manager.cc \ + src/core/load_balancing/xds/xds_override_host.cc \ + src/core/load_balancing/xds/xds_wrr_locality.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/plugin_registry/grpc_plugin_registry_extra.cc \ src/core/tsi/alts/crypt/aes_gcm.cc \ @@ -1374,17 +1374,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/census) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/channel_idle) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/grpclb) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/outlier_detection) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/pick_first) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/priority) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/ring_hash) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/rls) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/round_robin) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/weighted_target) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/lb_policy/xds) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/binder) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/client_channel/resolver/dns) @@ -1544,7 +1533,6 @@ if test "$PHP_GRPC" != "no"; then 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/json) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/load_balancing) 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/resolver) @@ -1581,6 +1569,17 @@ if test "$PHP_GRPC" != "no"; then 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) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/pick_first) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/priority) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/ring_hash) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/rls) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/round_robin) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/weighted_round_robin) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/weighted_target) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/load_balancing/xds) PHP_ADD_BUILD_DIR($ext_builddir/src/core/plugin_registry) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/crypt) diff --git a/config.w32 b/config.w32 index b34f443eeea..b316bb9bbcb 100644 --- a/config.w32 +++ b/config.w32 @@ -23,30 +23,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\dynamic_filters.cc " + "src\\core\\ext\\filters\\client_channel\\global_subchannel_pool.cc " + "src\\core\\ext\\filters\\client_channel\\http_proxy_mapper.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\address_filtering.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\child_policy_handler.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\endpoint_list.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_balancer_addresses.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\health_check_client.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\oob_backend_metric.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\outlier_detection\\outlier_detection.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\priority\\priority.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\ring_hash\\ring_hash.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\rls\\rls.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\weighted_round_robin\\static_stride_scheduler.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\weighted_round_robin\\weighted_round_robin.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\weighted_target\\weighted_target.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\cds.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_cluster_impl.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_cluster_manager.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_override_host.cc " + - "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_wrr_locality.cc " + "src\\core\\ext\\filters\\client_channel\\local_subchannel_pool.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\binder\\binder_resolver.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " + @@ -687,8 +663,6 @@ if (PHP_GRPC != "no") { "src\\core\\lib\\json\\json_reader.cc " + "src\\core\\lib\\json\\json_util.cc " + "src\\core\\lib\\json\\json_writer.cc " + - "src\\core\\lib\\load_balancing\\lb_policy.cc " + - "src\\core\\lib\\load_balancing\\lb_policy_registry.cc " + "src\\core\\lib\\matchers\\matchers.cc " + "src\\core\\lib\\promise\\activity.cc " + "src\\core\\lib\\promise\\party.cc " + @@ -821,6 +795,32 @@ if (PHP_GRPC != "no") { "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\\child_policy_handler.cc " + + "src\\core\\load_balancing\\endpoint_list.cc " + + "src\\core\\load_balancing\\grpclb\\client_load_reporting_filter.cc " + + "src\\core\\load_balancing\\grpclb\\grpclb.cc " + + "src\\core\\load_balancing\\grpclb\\grpclb_balancer_addresses.cc " + + "src\\core\\load_balancing\\grpclb\\grpclb_client_stats.cc " + + "src\\core\\load_balancing\\grpclb\\load_balancer_api.cc " + + "src\\core\\load_balancing\\health_check_client.cc " + + "src\\core\\load_balancing\\lb_policy.cc " + + "src\\core\\load_balancing\\lb_policy_registry.cc " + + "src\\core\\load_balancing\\oob_backend_metric.cc " + + "src\\core\\load_balancing\\outlier_detection\\outlier_detection.cc " + + "src\\core\\load_balancing\\pick_first\\pick_first.cc " + + "src\\core\\load_balancing\\priority\\priority.cc " + + "src\\core\\load_balancing\\ring_hash\\ring_hash.cc " + + "src\\core\\load_balancing\\rls\\rls.cc " + + "src\\core\\load_balancing\\round_robin\\round_robin.cc " + + "src\\core\\load_balancing\\weighted_round_robin\\static_stride_scheduler.cc " + + "src\\core\\load_balancing\\weighted_round_robin\\weighted_round_robin.cc " + + "src\\core\\load_balancing\\weighted_target\\weighted_target.cc " + + "src\\core\\load_balancing\\xds\\cds.cc " + + "src\\core\\load_balancing\\xds\\xds_cluster_impl.cc " + + "src\\core\\load_balancing\\xds\\xds_cluster_manager.cc " + + "src\\core\\load_balancing\\xds\\xds_override_host.cc " + + "src\\core\\load_balancing\\xds\\xds_wrr_locality.cc " + "src\\core\\plugin_registry\\grpc_plugin_registry.cc " + "src\\core\\plugin_registry\\grpc_plugin_registry_extra.cc " + "src\\core\\tsi\\alts\\crypt\\aes_gcm.cc " + @@ -1368,17 +1368,6 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\census"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\channel_idle"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\outlier_detection"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\priority"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\ring_hash"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\rls"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\weighted_round_robin"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\weighted_target"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\xds"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\binder"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns"); @@ -1681,7 +1670,6 @@ if (PHP_GRPC != "no") { 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\\json"); - FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\load_balancing"); 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\\resolver"); @@ -1719,6 +1707,17 @@ if (PHP_GRPC != "no") { 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"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\pick_first"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\priority"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\ring_hash"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\rls"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\round_robin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\weighted_round_robin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\weighted_target"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\load_balancing\\xds"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\plugin_registry"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts"); diff --git a/examples/cpp/csm/Dockerfile.client b/examples/cpp/csm/Dockerfile.client index 8773240b916..69f01f5248a 100644 --- a/examples/cpp/csm/Dockerfile.client +++ b/examples/cpp/csm/Dockerfile.client @@ -22,7 +22,7 @@ RUN ln -s /usr/bin/python3 /usr/bin/python RUN mkdir /artifacts COPY . . -RUN OVERRIDE_BAZEL_VERSION=5.4.0 tools/bazel build //examples/cpp/csm:csm_greeter_client +RUN tools/bazel build //examples/cpp/csm:csm_greeter_client RUN cp -rL /workdir/bazel-bin/examples/cpp/csm/csm_greeter_client /artifacts/ FROM python:3.9-slim-bookworm diff --git a/examples/cpp/csm/README.md b/examples/cpp/csm/README.md index 5774d2b33b8..db766e42f1a 100644 --- a/examples/cpp/csm/README.md +++ b/examples/cpp/csm/README.md @@ -6,6 +6,30 @@ This CSM example builds on the [Hello World Example](https://github.com/grpc/grp The client takes the following command-line arguments - * target - By default, the client tries to connect to the xDS "xds:///helloworld:50051" and gRPC would use xDS to resolve this target and connect to the server backend. This can be overriden to change the target. +* cookie_name - session affinity cookie name. Defaults to "GSSA" +* delay_s - delay (in seconds) between the RPCs. Default value is 5 + The server takes the following command-line arguments - * port - Port on which the Hello World service is run. Defaults to 50051. + +## Building + +From the gRPC workspace folder: + +Client: +``` +docker build -f examples/cpp/csm/Dockerfile.client +``` +Server: +``` +docker build -f examples/cpp/csm/Dockerfile.server +``` + +To push to a registry, add a tag to the image either by adding a `-t` flag to `docker build` command above or run: + +``` +docker image tag ${sha from build command above} ${tag} +``` + +And then push the tagged image using `docker push` \ No newline at end of file diff --git a/examples/cpp/csm/csm_greeter_client.cc b/examples/cpp/csm/csm_greeter_client.cc index 6ad635f5a63..3aba7058562 100644 --- a/examples/cpp/csm/csm_greeter_client.cc +++ b/examples/cpp/csm/csm_greeter_client.cc @@ -16,16 +16,20 @@ * */ +#include + +#include #include #include #include -#include +#include #include #include "absl/flags/flag.h" #include "absl/flags/parse.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" +#include "absl/types/optional.h" #include "opentelemetry/exporters/prometheus/exporter_factory.h" #include "opentelemetry/exporters/prometheus/exporter_options.h" #include "opentelemetry/sdk/metrics/meter_provider.h" @@ -41,6 +45,8 @@ #endif ABSL_FLAG(std::string, target, "xds:///helloworld:50051", "Target string"); +ABSL_FLAG(std::string, cookie_name, "GSSA", "Cookie name"); +ABSL_FLAG(uint, delay_s, 5, "Delay between requests"); using grpc::Channel; using grpc::ClientContext; @@ -49,15 +55,13 @@ using helloworld::Greeter; using helloworld::HelloReply; using helloworld::HelloRequest; +namespace { + struct Cookie { std::string name; std::string value; std::set attributes; - std::pair Header() const { - return std::make_pair("cookie", absl::StrFormat("%s=%s", name, value)); - } - template friend void AbslStringify(Sink& sink, const Cookie& cookie) { absl::Format(&sink, "(Cookie: %s, value: %s, attributes: {%s})", @@ -66,49 +70,45 @@ struct Cookie { } }; -class GreeterClient { - protected: - static Cookie ParseCookie(absl::string_view header) { - Cookie cookie; - std::pair name_value = - absl::StrSplit(header, absl::MaxSplits('=', 1)); - cookie.name = std::string(name_value.first); - std::pair value_attrs = - absl::StrSplit(name_value.second, absl::MaxSplits(';', 1)); - cookie.value = std::string(value_attrs.first); - for (absl::string_view segment : absl::StrSplit(value_attrs.second, ';')) { - cookie.attributes.emplace(absl::StripAsciiWhitespace(segment)); - } - return cookie; +Cookie ParseCookie(absl::string_view header) { + Cookie cookie; + std::pair name_value = + absl::StrSplit(header, absl::MaxSplits('=', 1)); + cookie.name = std::string(name_value.first); + std::pair value_attrs = + absl::StrSplit(name_value.second, absl::MaxSplits(';', 1)); + cookie.value = std::string(value_attrs.first); + for (absl::string_view segment : absl::StrSplit(value_attrs.second, ';')) { + cookie.attributes.emplace(absl::StripAsciiWhitespace(segment)); } + return cookie; +} - static std::vector GetCookies( - const std::multimap& - server_initial_metadata, - absl::string_view cookie_name) { - std::vector values; - auto pair = server_initial_metadata.equal_range("set-cookie"); - for (auto it = pair.first; it != pair.second; ++it) { - gpr_log(GPR_INFO, "set-cookie header: %s", it->second.data()); - const auto cookie = ParseCookie(it->second.data()); - if (cookie.name == cookie_name) { - values.emplace_back(cookie); - } +std::vector GetCookies( + const std::multimap& initial_metadata, + absl::string_view cookie_name) { + std::vector values; + auto pair = initial_metadata.equal_range("set-cookie"); + for (auto it = pair.first; it != pair.second; ++it) { + const auto cookie = ParseCookie(it->second.data()); + if (cookie.name == cookie_name) { + values.emplace_back(std::move(cookie)); } - return values; } + return values; +} +class GreeterClient { public: - GreeterClient(std::shared_ptr channel) - : stub_(Greeter::NewStub(channel)) {} + GreeterClient(std::shared_ptr channel, absl::string_view cookie_name) + : stub_(Greeter::NewStub(channel)), cookie_name_(cookie_name) {} // Assembles the client's payload, sends it and presents the response back // from the server. - std::string SayHello(const std::string& user, Cookie* cookieFromServer, - const Cookie* cookieToServer) { + void SayHello() { // Data we are sending to the server. HelloRequest request; - request.set_name(user); + request.set_name("world"); // Container for the data we expect from the server. HelloReply reply; @@ -120,59 +120,45 @@ class GreeterClient { // The actual RPC. std::mutex mu; std::condition_variable cv; - bool done = false; - Status status; - if (cookieToServer != NULL) { - std::pair cookieHeader = - cookieToServer->Header(); - context.AddMetadata(cookieHeader.first, cookieHeader.second); + absl::optional status; + // Set the cookie header if we already got a cookie from the server + if (cookie_from_server_.has_value()) { + context.AddMetadata("cookie", + absl::StrFormat("%s=%s", cookie_from_server_->name, + cookie_from_server_->value)); } - stub_->async()->SayHello(&context, &request, &reply, - [&mu, &cv, &done, &status](Status s) { - status = std::move(s); - std::lock_guard lock(mu); - done = true; - cv.notify_one(); - }); - std::unique_lock lock(mu); - while (!done) { + stub_->async()->SayHello(&context, &request, &reply, [&](Status s) { + std::lock_guard lock(mu); + status = std::move(s); + cv.notify_one(); + }); + while (!status.has_value()) { cv.wait(lock); } - - // Act upon its status. - if (status.ok()) { - if (cookieFromServer != NULL) { - const std::multimap& - server_initial_metadata = context.GetServerInitialMetadata(); - std::vector cookies = - GetCookies(server_initial_metadata, "GSSA"); - if (!cookies.empty()) { - *cookieFromServer = cookies.front(); - } - } - return reply.message(); - } else { - std::cout << status.error_code() << ": " << status.error_message() - << std::endl; - return "RPC failed"; + if (!status->ok()) { + std::cout << "RPC failed" << status->error_code() << ": " + << status->error_message() << std::endl; + return; } + const std::multimap& + server_initial_metadata = context.GetServerInitialMetadata(); + // Update a cookie after a successful request + std::vector cookies = + GetCookies(server_initial_metadata, cookie_name_); + if (!cookies.empty()) { + cookie_from_server_.emplace(std::move(cookies.front())); + } + std::cout << "Greeter received: " << reply.message() << std::endl; } private: std::unique_ptr stub_; + std::string cookie_name_; + absl::optional cookie_from_server_; }; -static void sayHello(GreeterClient& greeter, Cookie* cookieFromServer, - const Cookie* cookieToServer) { - std::string user("world"); - std::string reply = greeter.SayHello(user, cookieFromServer, cookieToServer); - std::cout << "Greeter received: " << reply << std::endl; - std::this_thread::sleep_for(std::chrono::seconds(5)); -} - -int main(int argc, char** argv) { - absl::ParseCommandLine(argc, argv); +absl::StatusOr InitializeObservability() { opentelemetry::exporter::metrics::PrometheusExporterOptions opts; // default was "localhost:9464" which causes connection issue across GKE pods opts.url = "0.0.0.0:9464"; @@ -181,21 +167,29 @@ int main(int argc, char** argv) { auto meter_provider = std::make_shared(); meter_provider->AddMetricReader(std::move(prometheus_exporter)); - auto observability = grpc::experimental::CsmObservabilityBuilder() - .SetMeterProvider(std::move(meter_provider)) - .BuildAndRegister(); + return grpc::experimental::CsmObservabilityBuilder() + .SetMeterProvider(std::move(meter_provider)) + .BuildAndRegister(); +} + +} // namespace + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + // Setup the observability + auto observability = InitializeObservability(); if (!observability.ok()) { std::cerr << "CsmObservability::Init() failed: " << observability.status().ToString() << std::endl; return static_cast(observability.status().code()); } - GreeterClient greeter(grpc::CreateChannel( - absl::GetFlag(FLAGS_target), grpc::InsecureChannelCredentials())); - - Cookie session_cookie; - sayHello(greeter, &session_cookie, NULL); + GreeterClient greeter(grpc::CreateChannel(absl::GetFlag(FLAGS_target), + grpc::InsecureChannelCredentials()), + absl::GetFlag(FLAGS_cookie_name)); while (true) { - sayHello(greeter, NULL, &session_cookie); + greeter.SayHello(); + std::this_thread::sleep_for( + std::chrono::seconds(absl::GetFlag(FLAGS_delay_s))); } return 0; } diff --git a/examples/cpp/otel/BUILD b/examples/cpp/otel/BUILD new file mode 100644 index 00000000000..0a9b75c5464 --- /dev/null +++ b/examples/cpp/otel/BUILD @@ -0,0 +1,47 @@ +# Copyright 2023 the gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +licenses(["notice"]) + +cc_binary( + name = "greeter_callback_client", + srcs = ["greeter_callback_client.cc"], + defines = ["BAZEL_BUILD"], + deps = [ + "//:grpc++", + "//:grpcpp_otel_plugin", + "//examples/protos:helloworld_cc_grpc", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + "@io_opentelemetry_cpp//exporters/prometheus:prometheus_exporter", + "@io_opentelemetry_cpp//sdk/src/metrics", + ], +) + +cc_binary( + name = "greeter_callback_server", + srcs = ["greeter_callback_server.cc"], + defines = ["BAZEL_BUILD"], + deps = [ + "//:grpc++", + "//:grpc++_reflection", + "//:grpcpp_otel_plugin", + "//examples/protos:helloworld_cc_grpc", + "@com_google_absl//absl/flags:flag", + "@com_google_absl//absl/flags:parse", + "@com_google_absl//absl/strings:str_format", + "@io_opentelemetry_cpp//exporters/prometheus:prometheus_exporter", + "@io_opentelemetry_cpp//sdk/src/metrics", + ], +) diff --git a/examples/cpp/otel/README.md b/examples/cpp/otel/README.md new file mode 100644 index 00000000000..7720fd64819 --- /dev/null +++ b/examples/cpp/otel/README.md @@ -0,0 +1,45 @@ +# gRPC C++ OpenTelemetry Example + +The opentelemetry example builds on the +[Hello World Example](https://github.com/grpc/grpc/tree/master/examples/cpp/helloworld) +and changes the gRPC client and server to show a sample way of configuring the +gRPC OpenTelemetry plugin with a prometheus exporter. + +For more information on the gRPC OpenTelemetry plugin, please refer to - * +[A66: OpenTelemetry Metrics](https://github.com/grpc/proposal/blob/master/A66-otel-stats.md) +* [https://opentelemetry.io/]() + +## Running the example + +To run the server - + +``` +$ tools/bazel run examples/cpp/otel:greeter_callback_server +``` + +To run the client - + +``` +$ tools/bazel run examples/cpp/otel:greeter_callback_client +``` + +The client continuously sends an RPC to the server every second. + +To make sure that the server and client metrics are being exported properly, in +a separate terminal, run the following - + +``` +$ curl localhost:9464/metrics +``` + +``` +$ curl localhost:9465/metrics +``` + +> ***NOTE:*** If the prometheus endpoint configured is overridden, please update +> the target in the above curl command. + +You can find a complete set of instructions for building gRPC and running the +Hello World app in the [C++ Quick Start][]. + +[C++ Quick Start]: https://grpc.io/docs/languages/cpp/quickstart diff --git a/examples/cpp/otel/greeter_callback_client.cc b/examples/cpp/otel/greeter_callback_client.cc new file mode 100644 index 00000000000..653d68971c8 --- /dev/null +++ b/examples/cpp/otel/greeter_callback_client.cc @@ -0,0 +1,138 @@ +/* + * + * 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 +#include + +#include "absl/flags/flag.h" +#include "absl/flags/parse.h" +#include "opentelemetry/exporters/prometheus/exporter_factory.h" +#include "opentelemetry/exporters/prometheus/exporter_options.h" +#include "opentelemetry/sdk/metrics/meter_provider.h" + +#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"); +ABSL_FLAG(std::string, prometheus_endpoint, "localhost:9465", + "Prometheus exporter endpoint"); + +using grpc::Channel; +using grpc::ClientContext; +using grpc::Status; +using helloworld::Greeter; +using helloworld::HelloReply; +using helloworld::HelloRequest; + +class GreeterClient { + public: + GreeterClient(std::shared_ptr channel) + : stub_(Greeter::NewStub(channel)) {} + + // Assembles the client's payload, sends it and presents the response back + // from the server. + std::string SayHello(const std::string& user) { + // Data we are sending to the server. + HelloRequest request; + request.set_name(user); + + // Container for the data we expect from the server. + HelloReply reply; + + // Context for the client. It could be used to convey extra information to + // the server and/or tweak certain RPC behaviors. + ClientContext context; + + // The actual RPC. + std::mutex mu; + std::condition_variable cv; + bool done = false; + Status status; + stub_->async()->SayHello(&context, &request, &reply, + [&mu, &cv, &done, &status](Status s) { + status = std::move(s); + std::lock_guard lock(mu); + done = true; + cv.notify_one(); + }); + + std::unique_lock lock(mu); + while (!done) { + cv.wait(lock); + } + + // Act upon its status. + if (status.ok()) { + return reply.message(); + } else { + std::cout << status.error_code() << ": " << status.error_message() + << std::endl; + return "RPC failed"; + } + } + + private: + std::unique_ptr stub_; +}; + +int main(int argc, char** argv) { + absl::ParseCommandLine(argc, argv); + // Register a global gRPC OpenTelemetry plugin configured with a prometheus + // exporter. + opentelemetry::exporter::metrics::PrometheusExporterOptions opts; + opts.url = absl::GetFlag(FLAGS_prometheus_endpoint); + auto prometheus_exporter = + opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts); + auto meter_provider = + std::make_shared(); + meter_provider->AddMetricReader(std::move(prometheus_exporter)); + auto status = grpc::OpenTelemetryPluginBuilder() + .SetMeterProvider(std::move(meter_provider)) + .BuildAndRegisterGlobal(); + if (!status.ok()) { + std::cerr << "Failed to register gRPC OpenTelemetry Plugin: " + << status.ToString() << std::endl; + return static_cast(status.code()); + } + // Instantiate the client. It requires a channel, out of which the actual RPCs + // are created. This channel models a connection to an endpoint specified by + // the argument "--target=" which is the only expected argument. + std::string target_str = absl::GetFlag(FLAGS_target); + grpc::ChannelArguments args; + // Continuously send RPCs every second. + while (true) { + GreeterClient greeter(grpc::CreateCustomChannel( + target_str, grpc::InsecureChannelCredentials(), args)); + std::string user("world"); + std::string reply = greeter.SayHello(user); + std::cout << "Greeter received: " << reply << std::endl; + std::this_thread::sleep_for(std::chrono::seconds(1)); + } + + return 0; +} diff --git a/examples/cpp/otel/greeter_callback_server.cc b/examples/cpp/otel/greeter_callback_server.cc new file mode 100644 index 00000000000..0e5f1a1b9e4 --- /dev/null +++ b/examples/cpp/otel/greeter_callback_server.cc @@ -0,0 +1,110 @@ +/* + * + * 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 "absl/flags/flag.h" +#include "absl/flags/parse.h" +#include "absl/strings/str_format.h" +#include "opentelemetry/exporters/prometheus/exporter_factory.h" +#include "opentelemetry/exporters/prometheus/exporter_options.h" +#include "opentelemetry/sdk/metrics/meter_provider.h" + +#include +#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(std::string, prometheus_endpoint, "localhost:9464", + "Prometheus exporter endpoint"); + +using grpc::CallbackServerContext; +using grpc::Server; +using grpc::ServerBuilder; +using grpc::ServerUnaryReactor; +using grpc::Status; +using helloworld::Greeter; +using helloworld::HelloReply; +using helloworld::HelloRequest; + +// Logic and data behind the server's behavior. +class GreeterServiceImpl final : public Greeter::CallbackService { + ServerUnaryReactor* SayHello(CallbackServerContext* context, + const HelloRequest* request, + HelloReply* reply) override { + std::string prefix("Hello "); + reply->set_message(prefix + request->name()); + + ServerUnaryReactor* reactor = context->DefaultReactor(); + reactor->Finish(Status::OK); + return reactor; + } +}; + +void RunServer(uint16_t port) { + std::string server_address = absl::StrFormat("0.0.0.0:%d", port); + GreeterServiceImpl service; + + grpc::EnableDefaultHealthCheckService(true); + grpc::reflection::InitProtoReflectionServerBuilderPlugin(); + ServerBuilder builder; + // Listen on the given address without any authentication mechanism. + builder.AddListeningPort(server_address, grpc::InsecureServerCredentials()); + // Register "service" as the instance through which we'll communicate with + // clients. In this case it corresponds to an *synchronous* service. + builder.RegisterService(&service); + // Finally assemble the server. + std::unique_ptr server(builder.BuildAndStart()); + 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); + // Register a global gRPC OpenTelemetry plugin configured with a prometheus + // exporter. + opentelemetry::exporter::metrics::PrometheusExporterOptions opts; + opts.url = absl::GetFlag(FLAGS_prometheus_endpoint); + auto prometheus_exporter = + opentelemetry::exporter::metrics::PrometheusExporterFactory::Create(opts); + auto meter_provider = + std::make_shared(); + meter_provider->AddMetricReader(std::move(prometheus_exporter)); + auto status = grpc::OpenTelemetryPluginBuilder() + .SetMeterProvider(std::move(meter_provider)) + .BuildAndRegisterGlobal(); + if (!status.ok()) { + std::cerr << "Failed to register gRPC OpenTelemetry Plugin: " + << status.ToString() << std::endl; + return static_cast(status.code()); + } + RunServer(absl::GetFlag(FLAGS_port)); + return 0; +} diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 2550b7b9ac1..1b5a250be1b 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -274,26 +274,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/dynamic_filters.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/http_proxy_mapper.h', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', - 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h', 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', @@ -1145,11 +1125,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_util.h', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_balancing/delegating_helper.h', - 'src/core/lib/load_balancing/lb_policy.h', - 'src/core/lib/load_balancing/lb_policy_factory.h', - 'src/core/lib/load_balancing/lb_policy_registry.h', - 'src/core/lib/load_balancing/subchannel_interface.h', 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', @@ -1306,6 +1281,31 @@ Pod::Spec.new do |s| '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/child_policy_handler.h', + 'src/core/load_balancing/delegating_helper.h', + 'src/core/load_balancing/endpoint_list.h', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.h', + 'src/core/load_balancing/grpclb/grpclb.h', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.h', + 'src/core/load_balancing/grpclb/grpclb_client_stats.h', + 'src/core/load_balancing/grpclb/load_balancer_api.h', + 'src/core/load_balancing/health_check_client.h', + 'src/core/load_balancing/health_check_client_internal.h', + 'src/core/load_balancing/lb_policy.h', + 'src/core/load_balancing/lb_policy_factory.h', + 'src/core/load_balancing/lb_policy_registry.h', + 'src/core/load_balancing/oob_backend_metric.h', + 'src/core/load_balancing/oob_backend_metric_internal.h', + 'src/core/load_balancing/outlier_detection/outlier_detection.h', + 'src/core/load_balancing/pick_first/pick_first.h', + 'src/core/load_balancing/ring_hash/ring_hash.h', + 'src/core/load_balancing/subchannel_interface.h', + 'src/core/load_balancing/subchannel_list.h', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h', + 'src/core/load_balancing/xds/xds_channel_args.h', + 'src/core/load_balancing/xds/xds_override_host.h', 'src/core/tsi/alts/crypt/gsec.h', 'src/core/tsi/alts/frame_protector/alts_counter.h', 'src/core/tsi/alts/frame_protector/alts_crypter.h', @@ -1549,26 +1549,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/dynamic_filters.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/http_proxy_mapper.h', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', - 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h', 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', @@ -2402,11 +2382,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_util.h', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_balancing/delegating_helper.h', - 'src/core/lib/load_balancing/lb_policy.h', - 'src/core/lib/load_balancing/lb_policy_factory.h', - 'src/core/lib/load_balancing/lb_policy_registry.h', - 'src/core/lib/load_balancing/subchannel_interface.h', 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', @@ -2563,6 +2538,31 @@ Pod::Spec.new do |s| '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/child_policy_handler.h', + 'src/core/load_balancing/delegating_helper.h', + 'src/core/load_balancing/endpoint_list.h', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.h', + 'src/core/load_balancing/grpclb/grpclb.h', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.h', + 'src/core/load_balancing/grpclb/grpclb_client_stats.h', + 'src/core/load_balancing/grpclb/load_balancer_api.h', + 'src/core/load_balancing/health_check_client.h', + 'src/core/load_balancing/health_check_client_internal.h', + 'src/core/load_balancing/lb_policy.h', + 'src/core/load_balancing/lb_policy_factory.h', + 'src/core/load_balancing/lb_policy_registry.h', + 'src/core/load_balancing/oob_backend_metric.h', + 'src/core/load_balancing/oob_backend_metric_internal.h', + 'src/core/load_balancing/outlier_detection/outlier_detection.h', + 'src/core/load_balancing/pick_first/pick_first.h', + 'src/core/load_balancing/ring_hash/ring_hash.h', + 'src/core/load_balancing/subchannel_interface.h', + 'src/core/load_balancing/subchannel_list.h', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h', + 'src/core/load_balancing/xds/xds_channel_args.h', + 'src/core/load_balancing/xds/xds_override_host.h', 'src/core/tsi/alts/crypt/gsec.h', 'src/core/tsi/alts/frame_protector/alts_counter.h', 'src/core/tsi/alts/frame_protector/alts_crypter.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 63bb150a140..19436806e23 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -262,50 +262,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/http_proxy_mapper.cc', 'src/core/ext/filters/client_channel/http_proxy_mapper.h', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.cc', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', - 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.cc', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h', - 'src/core/ext/filters/client_channel/lb_policy/priority/priority.cc', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h', - 'src/core/ext/filters/client_channel/lb_policy/rls/rls.cc', - 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/cds.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', @@ -1758,13 +1714,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_util.h', 'src/core/lib/json/json_writer.cc', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_balancing/delegating_helper.h', - 'src/core/lib/load_balancing/lb_policy.cc', - 'src/core/lib/load_balancing/lb_policy.h', - 'src/core/lib/load_balancing/lb_policy_factory.h', - 'src/core/lib/load_balancing/lb_policy_registry.cc', - 'src/core/lib/load_balancing/lb_policy_registry.h', - 'src/core/lib/load_balancing/subchannel_interface.h', 'src/core/lib/matchers/matchers.cc', 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.cc', @@ -2053,6 +2002,57 @@ Pod::Spec.new do |s| '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', + 'src/core/load_balancing/child_policy_handler.cc', + 'src/core/load_balancing/child_policy_handler.h', + 'src/core/load_balancing/delegating_helper.h', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/endpoint_list.h', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.h', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb.h', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.h', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.h', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.h', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/health_check_client.h', + 'src/core/load_balancing/health_check_client_internal.h', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy.h', + 'src/core/load_balancing/lb_policy_factory.h', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/lb_policy_registry.h', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/oob_backend_metric.h', + 'src/core/load_balancing/oob_backend_metric_internal.h', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.h', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/pick_first/pick_first.h', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/ring_hash/ring_hash.cc', + 'src/core/load_balancing/ring_hash/ring_hash.h', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/subchannel_interface.h', + 'src/core/load_balancing/subchannel_list.h', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', + 'src/core/load_balancing/xds/cds.cc', + 'src/core/load_balancing/xds/xds_channel_args.h', + 'src/core/load_balancing/xds/xds_cluster_impl.cc', + 'src/core/load_balancing/xds/xds_cluster_manager.cc', + 'src/core/load_balancing/xds/xds_override_host.cc', + 'src/core/load_balancing/xds/xds_override_host.h', + 'src/core/load_balancing/xds/xds_wrr_locality.cc', 'src/core/plugin_registry/grpc_plugin_registry.cc', 'src/core/plugin_registry/grpc_plugin_registry_extra.cc', 'src/core/tsi/alts/crypt/aes_gcm.cc', @@ -2350,26 +2350,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/dynamic_filters.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/http_proxy_mapper.h', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.h', - 'src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.h', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h', - 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h', 'src/core/ext/filters/client_channel/local_subchannel_pool.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', @@ -3182,11 +3162,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_util.h', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_balancing/delegating_helper.h', - 'src/core/lib/load_balancing/lb_policy.h', - 'src/core/lib/load_balancing/lb_policy_factory.h', - 'src/core/lib/load_balancing/lb_policy_registry.h', - 'src/core/lib/load_balancing/subchannel_interface.h', 'src/core/lib/matchers/matchers.h', 'src/core/lib/promise/activity.h', 'src/core/lib/promise/all_ok.h', @@ -3343,6 +3318,31 @@ Pod::Spec.new do |s| '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/child_policy_handler.h', + 'src/core/load_balancing/delegating_helper.h', + 'src/core/load_balancing/endpoint_list.h', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.h', + 'src/core/load_balancing/grpclb/grpclb.h', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.h', + 'src/core/load_balancing/grpclb/grpclb_client_stats.h', + 'src/core/load_balancing/grpclb/load_balancer_api.h', + 'src/core/load_balancing/health_check_client.h', + 'src/core/load_balancing/health_check_client_internal.h', + 'src/core/load_balancing/lb_policy.h', + 'src/core/load_balancing/lb_policy_factory.h', + 'src/core/load_balancing/lb_policy_registry.h', + 'src/core/load_balancing/oob_backend_metric.h', + 'src/core/load_balancing/oob_backend_metric_internal.h', + 'src/core/load_balancing/outlier_detection/outlier_detection.h', + 'src/core/load_balancing/pick_first/pick_first.h', + 'src/core/load_balancing/ring_hash/ring_hash.h', + 'src/core/load_balancing/subchannel_interface.h', + 'src/core/load_balancing/subchannel_list.h', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h', + 'src/core/load_balancing/xds/xds_channel_args.h', + 'src/core/load_balancing/xds/xds_override_host.h', 'src/core/tsi/alts/crypt/gsec.h', 'src/core/tsi/alts/frame_protector/alts_counter.h', 'src/core/tsi/alts/frame_protector/alts_crypter.h', diff --git a/grpc.gemspec b/grpc.gemspec index 392ba76a0a1..b78139acfa3 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -155,50 +155,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/global_subchannel_pool.h ) s.files += %w( src/core/ext/filters/client_channel/http_proxy_mapper.cc ) s.files += %w( src/core/ext/filters/client_channel/http_proxy_mapper.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/address_filtering.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/address_filtering.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/endpoint_list.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/health_check_client.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/health_check_client.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/priority/priority.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/rls/rls.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/subchannel_list.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/cds.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h ) - s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc ) s.files += %w( src/core/ext/filters/client_channel/local_subchannel_pool.cc ) s.files += %w( src/core/ext/filters/client_channel/local_subchannel_pool.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc ) @@ -1651,13 +1607,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/json/json_util.h ) s.files += %w( src/core/lib/json/json_writer.cc ) s.files += %w( src/core/lib/json/json_writer.h ) - s.files += %w( src/core/lib/load_balancing/delegating_helper.h ) - s.files += %w( src/core/lib/load_balancing/lb_policy.cc ) - s.files += %w( src/core/lib/load_balancing/lb_policy.h ) - s.files += %w( src/core/lib/load_balancing/lb_policy_factory.h ) - s.files += %w( src/core/lib/load_balancing/lb_policy_registry.cc ) - s.files += %w( src/core/lib/load_balancing/lb_policy_registry.h ) - s.files += %w( src/core/lib/load_balancing/subchannel_interface.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 ) @@ -1946,6 +1895,57 @@ Gem::Specification.new do |s| 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 ) + s.files += %w( src/core/load_balancing/child_policy_handler.cc ) + s.files += %w( src/core/load_balancing/child_policy_handler.h ) + s.files += %w( src/core/load_balancing/delegating_helper.h ) + s.files += %w( src/core/load_balancing/endpoint_list.cc ) + s.files += %w( src/core/load_balancing/endpoint_list.h ) + s.files += %w( src/core/load_balancing/grpclb/client_load_reporting_filter.cc ) + s.files += %w( src/core/load_balancing/grpclb/client_load_reporting_filter.h ) + s.files += %w( src/core/load_balancing/grpclb/grpclb.cc ) + s.files += %w( src/core/load_balancing/grpclb/grpclb.h ) + s.files += %w( src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc ) + s.files += %w( src/core/load_balancing/grpclb/grpclb_balancer_addresses.h ) + s.files += %w( src/core/load_balancing/grpclb/grpclb_client_stats.cc ) + s.files += %w( src/core/load_balancing/grpclb/grpclb_client_stats.h ) + s.files += %w( src/core/load_balancing/grpclb/load_balancer_api.cc ) + s.files += %w( src/core/load_balancing/grpclb/load_balancer_api.h ) + s.files += %w( src/core/load_balancing/health_check_client.cc ) + s.files += %w( src/core/load_balancing/health_check_client.h ) + s.files += %w( src/core/load_balancing/health_check_client_internal.h ) + s.files += %w( src/core/load_balancing/lb_policy.cc ) + s.files += %w( src/core/load_balancing/lb_policy.h ) + s.files += %w( src/core/load_balancing/lb_policy_factory.h ) + s.files += %w( src/core/load_balancing/lb_policy_registry.cc ) + s.files += %w( src/core/load_balancing/lb_policy_registry.h ) + s.files += %w( src/core/load_balancing/oob_backend_metric.cc ) + s.files += %w( src/core/load_balancing/oob_backend_metric.h ) + s.files += %w( src/core/load_balancing/oob_backend_metric_internal.h ) + s.files += %w( src/core/load_balancing/outlier_detection/outlier_detection.cc ) + s.files += %w( src/core/load_balancing/outlier_detection/outlier_detection.h ) + s.files += %w( src/core/load_balancing/pick_first/pick_first.cc ) + s.files += %w( src/core/load_balancing/pick_first/pick_first.h ) + s.files += %w( src/core/load_balancing/priority/priority.cc ) + s.files += %w( src/core/load_balancing/ring_hash/ring_hash.cc ) + s.files += %w( src/core/load_balancing/ring_hash/ring_hash.h ) + s.files += %w( src/core/load_balancing/rls/rls.cc ) + s.files += %w( src/core/load_balancing/round_robin/round_robin.cc ) + s.files += %w( src/core/load_balancing/subchannel_interface.h ) + s.files += %w( src/core/load_balancing/subchannel_list.h ) + s.files += %w( src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc ) + s.files += %w( src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h ) + s.files += %w( src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc ) + s.files += %w( src/core/load_balancing/weighted_target/weighted_target.cc ) + s.files += %w( src/core/load_balancing/xds/cds.cc ) + s.files += %w( src/core/load_balancing/xds/xds_channel_args.h ) + s.files += %w( src/core/load_balancing/xds/xds_cluster_impl.cc ) + s.files += %w( src/core/load_balancing/xds/xds_cluster_manager.cc ) + s.files += %w( src/core/load_balancing/xds/xds_override_host.cc ) + s.files += %w( src/core/load_balancing/xds/xds_override_host.h ) + s.files += %w( src/core/load_balancing/xds/xds_wrr_locality.cc ) s.files += %w( src/core/plugin_registry/grpc_plugin_registry.cc ) s.files += %w( src/core/plugin_registry/grpc_plugin_registry_extra.cc ) s.files += %w( src/core/tsi/alts/crypt/aes_gcm.cc ) diff --git a/grpc.gyp b/grpc.gyp index 4e36b01858c..b43595e2b0d 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -290,30 +290,6 @@ 'src/core/ext/filters/client_channel/dynamic_filters.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/http_proxy_mapper.cc', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.cc', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.cc', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/priority/priority.cc', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc', - 'src/core/ext/filters/client_channel/lb_policy/rls/rls.cc', - 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/cds.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -908,8 +884,6 @@ 'src/core/lib/json/json_reader.cc', 'src/core/lib/json/json_util.cc', 'src/core/lib/json/json_writer.cc', - 'src/core/lib/load_balancing/lb_policy.cc', - 'src/core/lib/load_balancing/lb_policy_registry.cc', 'src/core/lib/matchers/matchers.cc', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/party.cc', @@ -1042,6 +1016,32 @@ '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/child_policy_handler.cc', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/ring_hash/ring_hash.cc', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', + 'src/core/load_balancing/xds/cds.cc', + 'src/core/load_balancing/xds/xds_cluster_impl.cc', + 'src/core/load_balancing/xds/xds_cluster_manager.cc', + 'src/core/load_balancing/xds/xds_override_host.cc', + 'src/core/load_balancing/xds/xds_wrr_locality.cc', 'src/core/plugin_registry/grpc_plugin_registry.cc', 'src/core/plugin_registry/grpc_plugin_registry_extra.cc', 'src/core/tsi/alts/crypt/aes_gcm.cc', @@ -1162,24 +1162,6 @@ 'src/core/ext/filters/client_channel/dynamic_filters.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/http_proxy_mapper.cc', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.cc', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.cc', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/priority/priority.cc', - 'src/core/ext/filters/client_channel/lb_policy/rls/rls.cc', - 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -1435,8 +1417,6 @@ 'src/core/lib/json/json_object_loader.cc', 'src/core/lib/json/json_reader.cc', 'src/core/lib/json/json_writer.cc', - 'src/core/lib/load_balancing/lb_policy.cc', - 'src/core/lib/load_balancing/lb_policy_registry.cc', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/party.cc', 'src/core/lib/promise/sleep.cc', @@ -1534,6 +1514,26 @@ '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/child_policy_handler.cc', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', 'src/core/plugin_registry/grpc_plugin_registry.cc', 'src/core/plugin_registry/grpc_plugin_registry_noextra.cc', 'src/core/tsi/alts/handshaker/transport_security_common_api.cc', @@ -2207,8 +2207,6 @@ 'src/core/lib/iomgr/wakeup_fd_posix.cc', 'src/core/lib/json/json_reader.cc', 'src/core/lib/json/json_writer.cc', - 'src/core/lib/load_balancing/lb_policy.cc', - 'src/core/lib/load_balancing/lb_policy_registry.cc', 'src/core/lib/matchers/matchers.cc', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/party.cc', @@ -2304,6 +2302,8 @@ '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/tsi/alts/handshaker/transport_security_common_api.cc', 'src/core/tsi/transport_security.cc', 'src/core/tsi/transport_security_grpc.cc', diff --git a/package.xml b/package.xml index 1e28a2a052f..2248624d4d4 100644 --- a/package.xml +++ b/package.xml @@ -137,50 +137,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1633,13 +1589,6 @@ - - - - - - - @@ -1928,6 +1877,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/BUILD b/src/core/BUILD index c2ef70a0672..4603f0cba85 100644 --- a/src/core/BUILD +++ b/src/core/BUILD @@ -1068,7 +1068,10 @@ grpc_cc_library( hdrs = [ "lib/promise/observable.h", ], - external_deps = ["absl/container:flat_hash_set"], + external_deps = [ + "absl/container:flat_hash_set", + "absl/functional:any_invocable", + ], language = "c++", deps = [ "activity", @@ -2972,8 +2975,8 @@ grpc_cc_library( grpc_cc_library( name = "lb_policy", - srcs = ["lib/load_balancing/lb_policy.cc"], - hdrs = ["lib/load_balancing/lb_policy.h"], + srcs = ["load_balancing/lb_policy.cc"], + hdrs = ["load_balancing/lb_policy.h"], external_deps = [ "absl/base:core_headers", "absl/status", @@ -3008,7 +3011,7 @@ grpc_cc_library( grpc_cc_library( name = "lb_policy_factory", - hdrs = ["lib/load_balancing/lb_policy_factory.h"], + hdrs = ["load_balancing/lb_policy_factory.h"], external_deps = [ "absl/status:statusor", "absl/strings", @@ -3024,8 +3027,8 @@ grpc_cc_library( grpc_cc_library( name = "lb_policy_registry", - srcs = ["lib/load_balancing/lb_policy_registry.cc"], - hdrs = ["lib/load_balancing/lb_policy_registry.h"], + srcs = ["load_balancing/lb_policy_registry.cc"], + hdrs = ["load_balancing/lb_policy_registry.h"], external_deps = [ "absl/status", "absl/status:statusor", @@ -3044,7 +3047,7 @@ grpc_cc_library( grpc_cc_library( name = "subchannel_interface", - hdrs = ["lib/load_balancing/subchannel_interface.h"], + hdrs = ["load_balancing/subchannel_interface.h"], external_deps = ["absl/status"], deps = [ "dual_ref_counted", @@ -3057,7 +3060,7 @@ grpc_cc_library( grpc_cc_library( name = "delegating_helper", - hdrs = ["lib/load_balancing/delegating_helper.h"], + hdrs = ["load_balancing/delegating_helper.h"], external_deps = [ "absl/status", "absl/strings", @@ -3327,9 +3330,9 @@ grpc_cc_library( "lib/security/security_connector/fake/fake_security_connector.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "lib/security/credentials/fake/fake_credentials.h", "lib/security/security_connector/fake/fake_security_connector.h", + "load_balancing/grpclb/grpclb.h", ], external_deps = [ "absl/status", @@ -3507,8 +3510,8 @@ grpc_cc_library( "lib/security/credentials/google_default/google_default_credentials.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/grpclb/grpclb.h", "lib/security/credentials/google_default/google_default_credentials.h", + "load_balancing/grpclb/grpclb.h", ], external_deps = [ "absl/status:statusor", @@ -4273,16 +4276,16 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_grpclb", srcs = [ - "ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc", - "ext/filters/client_channel/lb_policy/grpclb/grpclb.cc", - "ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc", - "ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc", + "load_balancing/grpclb/client_load_reporting_filter.cc", + "load_balancing/grpclb/grpclb.cc", + "load_balancing/grpclb/grpclb_client_stats.cc", + "load_balancing/grpclb/load_balancer_api.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h", - "ext/filters/client_channel/lb_policy/grpclb/grpclb.h", - "ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h", - "ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h", + "load_balancing/grpclb/client_load_reporting_filter.h", + "load_balancing/grpclb/grpclb.h", + "load_balancing/grpclb/grpclb_client_stats.h", + "load_balancing/grpclb/load_balancer_api.h", ], external_deps = [ "absl/base:core_headers", @@ -4374,7 +4377,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_backend_metric_data", hdrs = [ - "ext/filters/client_channel/lb_policy/backend_metric_data.h", + "load_balancing/backend_metric_data.h", ], external_deps = ["absl/strings"], language = "c++", @@ -4392,7 +4395,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_rls", srcs = [ - "ext/filters/client_channel/lb_policy/rls/rls.cc", + "load_balancing/rls/rls.cc", ], external_deps = [ "absl/base:core_headers", @@ -4768,7 +4771,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_cds", srcs = [ - "ext/filters/client_channel/lb_policy/xds/cds.cc", + "load_balancing/xds/cds.cc", ], external_deps = [ "absl/status", @@ -4814,7 +4817,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_xds_channel_args", hdrs = [ - "ext/filters/client_channel/lb_policy/xds/xds_channel_args.h", + "load_balancing/xds/xds_channel_args.h", ], language = "c++", deps = [ @@ -4826,7 +4829,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_xds_cluster_impl", srcs = [ - "ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc", + "load_balancing/xds/xds_cluster_impl.cc", ], external_deps = [ "absl/base:core_headers", @@ -4872,7 +4875,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_xds_cluster_manager", srcs = [ - "ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc", + "load_balancing/xds/xds_cluster_manager.cc", ], external_deps = [ "absl/status", @@ -4913,7 +4916,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_xds_wrr_locality", srcs = [ - "ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc", + "load_balancing/xds/xds_wrr_locality.cc", ], external_deps = [ "absl/status", @@ -4950,10 +4953,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_address_filtering", srcs = [ - "ext/filters/client_channel/lb_policy/address_filtering.cc", + "load_balancing/address_filtering.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/address_filtering.h", + "load_balancing/address_filtering.h", ], external_deps = [ "absl/functional:function_ref", @@ -4975,11 +4978,11 @@ grpc_cc_library( grpc_cc_library( name = "health_check_client", srcs = [ - "ext/filters/client_channel/lb_policy/health_check_client.cc", + "load_balancing/health_check_client.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/health_check_client.h", - "ext/filters/client_channel/lb_policy/health_check_client_internal.h", + "load_balancing/health_check_client.h", + "load_balancing/health_check_client_internal.h", ], external_deps = [ "absl/base:core_headers", @@ -5020,7 +5023,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_subchannel_list", hdrs = [ - "ext/filters/client_channel/lb_policy/subchannel_list.h", + "load_balancing/subchannel_list.h", ], external_deps = [ "absl/status", @@ -5049,10 +5052,10 @@ grpc_cc_library( grpc_cc_library( name = "lb_endpoint_list", srcs = [ - "ext/filters/client_channel/lb_policy/endpoint_list.cc", + "load_balancing/endpoint_list.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/endpoint_list.h", + "load_balancing/endpoint_list.h", ], external_deps = [ "absl/functional:function_ref", @@ -5085,10 +5088,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_pick_first", srcs = [ - "ext/filters/client_channel/lb_policy/pick_first/pick_first.cc", + "load_balancing/pick_first/pick_first.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/pick_first/pick_first.h", + "load_balancing/pick_first/pick_first.h", ], external_deps = [ "absl/algorithm:container", @@ -5200,10 +5203,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_ring_hash", srcs = [ - "ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc", + "load_balancing/ring_hash/ring_hash.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h", + "load_balancing/ring_hash/ring_hash.h", ], external_deps = [ "absl/base:core_headers", @@ -5253,7 +5256,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_round_robin", srcs = [ - "ext/filters/client_channel/lb_policy/round_robin/round_robin.cc", + "load_balancing/round_robin/round_robin.cc", ], external_deps = [ "absl/meta:type_traits", @@ -5290,10 +5293,10 @@ grpc_cc_library( grpc_cc_library( name = "static_stride_scheduler", srcs = [ - "ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc", + "load_balancing/weighted_round_robin/static_stride_scheduler.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h", + "load_balancing/weighted_round_robin/static_stride_scheduler.h", ], external_deps = [ "absl/functional:any_invocable", @@ -5307,7 +5310,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_weighted_round_robin", srcs = [ - "ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc", + "load_balancing/weighted_round_robin/weighted_round_robin.cc", ], external_deps = [ "absl/base:core_headers", @@ -5359,7 +5362,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_outlier_detection_header", hdrs = [ - "ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h", + "load_balancing/outlier_detection/outlier_detection.h", ], external_deps = ["absl/types:optional"], language = "c++", @@ -5376,7 +5379,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_outlier_detection", srcs = [ - "ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc", + "load_balancing/outlier_detection/outlier_detection.cc", ], external_deps = [ "absl/base:core_headers", @@ -5424,7 +5427,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_priority", srcs = [ - "ext/filters/client_channel/lb_policy/priority/priority.cc", + "load_balancing/priority/priority.cc", ], external_deps = [ "absl/status", @@ -5466,7 +5469,7 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_weighted_target", srcs = [ - "ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc", + "load_balancing/weighted_target/weighted_target.cc", ], external_deps = [ "absl/base:core_headers", @@ -5509,10 +5512,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_lb_policy_xds_override_host", srcs = [ - "ext/filters/client_channel/lb_policy/xds/xds_override_host.cc", + "load_balancing/xds/xds_override_host.cc", ], hdrs = [ - "ext/filters/client_channel/lb_policy/xds/xds_override_host.h", + "load_balancing/xds/xds_override_host.h", ], external_deps = [ "absl/base:core_headers", diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc index f7ad5b4ce32..85c6d318bf6 100644 --- a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc @@ -32,7 +32,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/config/core_configuration.h" @@ -43,6 +42,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/load_balancing/backend_metric_data.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/backend_metric.h b/src/core/ext/filters/client_channel/backend_metric.h index 8ad0bff053b..e6d12bbd57a 100644 --- a/src/core/ext/filters/client_channel/backend_metric.h +++ b/src/core/ext/filters/client_channel/backend_metric.h @@ -23,7 +23,7 @@ #include "absl/strings/string_view.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" +#include "src/core/load_balancing/backend_metric_data.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index c5391aff84e..47647a2da08 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -57,7 +57,6 @@ #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/dynamic_filters.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" #include "src/core/ext/filters/client_channel/local_subchannel_pool.h" #include "src/core/ext/filters/client_channel/retry_filter.h" #include "src/core/ext/filters/client_channel/subchannel.h" @@ -84,8 +83,6 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" #include "src/core/lib/promise/cancel_callback.h" #include "src/core/lib/promise/context.h" #include "src/core/lib/promise/latch.h" @@ -106,6 +103,9 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/load_balancing/child_policy_handler.h" +#include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/subchannel_interface.h" // // Client channel filter diff --git a/src/core/ext/filters/client_channel/client_channel.h b/src/core/ext/filters/client_channel/client_channel.h index 2e3b96af1d4..02f17796a19 100644 --- a/src/core/ext/filters/client_channel/client_channel.h +++ b/src/core/ext/filters/client_channel/client_channel.h @@ -40,7 +40,6 @@ #include "src/core/ext/filters/client_channel/client_channel_factory.h" #include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/dynamic_filters.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" #include "src/core/lib/channel/call_tracer.h" @@ -61,7 +60,6 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/polling_entity.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/promise/activity.h" #include "src/core/lib/promise/arena_promise.h" #include "src/core/lib/resolver/resolver.h" @@ -72,6 +70,8 @@ #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/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/lb_policy.h" // // Client channel filter diff --git a/src/core/ext/filters/client_channel/client_channel_internal.h b/src/core/ext/filters/client_channel/client_channel_internal.h index c0985c9ac28..2559068b56b 100644 --- a/src/core/ext/filters/client_channel/client_channel_internal.h +++ b/src/core/ext/filters/client_channel/client_channel_internal.h @@ -28,9 +28,9 @@ #include "src/core/lib/channel/call_tracer.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resource_quota/arena.h" #include "src/core/lib/service_config/service_config_call_data.h" +#include "src/core/load_balancing/lb_policy.h" // // This file contains internal interfaces used to allow various plugins diff --git a/src/core/ext/filters/client_channel/client_channel_service_config.cc b/src/core/ext/filters/client_channel/client_channel_service_config.cc index 679be210743..62a606775c2 100644 --- a/src/core/ext/filters/client_channel/client_channel_service_config.cc +++ b/src/core/ext/filters/client_channel/client_channel_service_config.cc @@ -27,7 +27,7 @@ #include "absl/strings/str_cat.h" #include "absl/types/optional.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/lb_policy_registry.h" // As per the retry design, we do not allow more than 5 retry attempts. #define MAX_MAX_RETRY_ATTEMPTS 5 diff --git a/src/core/ext/filters/client_channel/client_channel_service_config.h b/src/core/ext/filters/client_channel/client_channel_service_config.h index 5ce7a4baf66..74a8a770292 100644 --- a/src/core/ext/filters/client_channel/client_channel_service_config.h +++ b/src/core/ext/filters/client_channel/client_channel_service_config.h @@ -35,8 +35,8 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/service_config/service_config_parser.h" +#include "src/core/load_balancing/lb_policy.h" namespace grpc_core { namespace internal { diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc index 59ccfc1f8ee..81d7eed6c76 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -62,7 +62,6 @@ #include "absl/strings/str_cat.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/filters/client_channel/resolver/polling_resolver.h" #include "src/core/lib/backoff/backoff.h" @@ -72,6 +71,7 @@ #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/service_config/service_config_impl.h" #include "src/core/lib/transport/error_utils.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #define GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS 1 #define GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER 1.6 diff --git a/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc index 4570bb47eaa..309acf50a7c 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/event_engine/event_engine_client_channel_resolver.cc @@ -38,7 +38,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/dns/event_engine/service_config_helper.h" #include "src/core/ext/filters/client_channel/resolver/polling_resolver.h" #include "src/core/lib/backoff/backoff.h" @@ -57,6 +56,7 @@ #include "src/core/lib/resolver/resolver_factory.h" #include "src/core/lib/service_config/service_config.h" #include "src/core/lib/service_config/service_config_impl.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" // IWYU pragma: no_include diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.cc index 934881d96a7..03e4e975e95 100644 --- a/src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.cc +++ b/src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.cc @@ -20,12 +20,12 @@ #include "absl/strings/str_join.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver_trace.h" #include "src/core/ext/xds/xds_routing.h" #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" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc index 9cc094f0499..a94b8f53c2e 100644 --- a/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc @@ -50,7 +50,6 @@ #include "src/core/ext/filters/client_channel/client_channel_internal.h" #include "src/core/ext/filters/client_channel/config_selector.h" -#include "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver_attributes.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver_trace.h" @@ -93,6 +92,7 @@ #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" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/subchannel_interface_internal.h b/src/core/ext/filters/client_channel/subchannel_interface_internal.h index b71f378de5c..d1c353fd0cb 100644 --- a/src/core/ext/filters/client_channel/subchannel_interface_internal.h +++ b/src/core/ext/filters/client_channel/subchannel_interface_internal.h @@ -21,7 +21,7 @@ #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/lib/gprpp/unique_type_name.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_cluster.cc b/src/core/ext/xds/xds_cluster.cc index 5c2cca5933e..a12b20d8252 100644 --- a/src/core/ext/xds/xds_cluster.cc +++ b/src/core/ext/xds/xds_cluster.cc @@ -69,8 +69,8 @@ #include "src/core/lib/gprpp/time.h" #include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" #include "src/core/lib/matchers/matchers.h" +#include "src/core/load_balancing/lb_policy_registry.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_cluster.h b/src/core/ext/xds/xds_cluster.h index 405e6e9c25a..a8bf915a22c 100644 --- a/src/core/ext/xds/xds_cluster.h +++ b/src/core/ext/xds/xds_cluster.h @@ -36,7 +36,6 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h" #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/ext/xds/xds_bootstrap_grpc.h" #include "src/core/ext/xds/xds_client.h" @@ -45,6 +44,7 @@ #include "src/core/ext/xds/xds_resource_type.h" #include "src/core/ext/xds/xds_resource_type_impl.h" #include "src/core/lib/json/json.h" +#include "src/core/load_balancing/outlier_detection/outlier_detection.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_lb_policy_registry.cc b/src/core/ext/xds/xds_lb_policy_registry.cc index a8cb6de128e..e10b55d4b6f 100644 --- a/src/core/ext/xds/xds_lb_policy_registry.cc +++ b/src/core/ext/xds/xds_lb_policy_registry.cc @@ -40,7 +40,7 @@ #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/lib/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/lb_policy_registry.h" namespace grpc_core { diff --git a/src/core/ext/xds/xds_route_config.cc b/src/core/ext/xds/xds_route_config.cc index e4191d1ea3e..d248721b333 100644 --- a/src/core/ext/xds/xds_route_config.cc +++ b/src/core/ext/xds/xds_route_config.cc @@ -74,8 +74,8 @@ #include "src/core/lib/gprpp/time.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" #include "src/core/lib/matchers/matchers.h" +#include "src/core/load_balancing/lb_policy_registry.h" namespace grpc_core { diff --git a/src/core/lib/config/core_configuration.h b/src/core/lib/config/core_configuration.h index 88e19038557..d46138b7da4 100644 --- a/src/core/lib/config/core_configuration.h +++ b/src/core/lib/config/core_configuration.h @@ -25,13 +25,13 @@ #include "src/core/lib/channel/channel_args_preconditioning.h" #include "src/core/lib/handshaker/proxy_mapper_registry.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" #include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" #include "src/core/lib/security/credentials/channel_creds_registry.h" #include "src/core/lib/service_config/service_config_parser.h" #include "src/core/lib/surface/channel_init.h" #include "src/core/lib/transport/handshaker_registry.h" +#include "src/core/load_balancing/lb_policy_registry.h" namespace grpc_core { diff --git a/src/core/lib/experiments/experiments.cc b/src/core/lib/experiments/experiments.cc index 8d94ee0df2d..38eaf479058 100644 --- a/src/core/lib/experiments/experiments.cc +++ b/src/core/lib/experiments/experiments.cc @@ -107,9 +107,6 @@ const uint8_t required_experiments_promise_based_inproc_transport[] = { static_cast(grpc_core::kExperimentIdPromiseBasedServerCall), static_cast( grpc_core::kExperimentIdRegisteredMethodLookupInTransport)}; -const char* const description_registered_methods_map = - "Use absl::flat_hash_map for registered methods."; -const char* const additional_constraints_registered_methods_map = "{}"; const char* const description_rfc_max_concurrent_streams = "If set, enable rfc-compliant behavior (cancellation) in the advent that " "max concurrent streams are exceeded in chttp2. See " @@ -238,8 +235,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 3, false, false}, - {"registered_methods_map", description_registered_methods_map, - additional_constraints_registered_methods_map, nullptr, 0, false, true}, {"rfc_max_concurrent_streams", description_rfc_max_concurrent_streams, additional_constraints_rfc_max_concurrent_streams, nullptr, 0, false, true}, @@ -375,9 +370,6 @@ const uint8_t required_experiments_promise_based_inproc_transport[] = { static_cast(grpc_core::kExperimentIdPromiseBasedServerCall), static_cast( grpc_core::kExperimentIdRegisteredMethodLookupInTransport)}; -const char* const description_registered_methods_map = - "Use absl::flat_hash_map for registered methods."; -const char* const additional_constraints_registered_methods_map = "{}"; const char* const description_rfc_max_concurrent_streams = "If set, enable rfc-compliant behavior (cancellation) in the advent that " "max concurrent streams are exceeded in chttp2. See " @@ -506,8 +498,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 3, false, false}, - {"registered_methods_map", description_registered_methods_map, - additional_constraints_registered_methods_map, nullptr, 0, false, true}, {"rfc_max_concurrent_streams", description_rfc_max_concurrent_streams, additional_constraints_rfc_max_concurrent_streams, nullptr, 0, false, true}, @@ -643,9 +633,6 @@ const uint8_t required_experiments_promise_based_inproc_transport[] = { static_cast(grpc_core::kExperimentIdPromiseBasedServerCall), static_cast( grpc_core::kExperimentIdRegisteredMethodLookupInTransport)}; -const char* const description_registered_methods_map = - "Use absl::flat_hash_map for registered methods."; -const char* const additional_constraints_registered_methods_map = "{}"; const char* const description_rfc_max_concurrent_streams = "If set, enable rfc-compliant behavior (cancellation) in the advent that " "max concurrent streams are exceeded in chttp2. See " @@ -774,8 +761,6 @@ const ExperimentMetadata g_experiment_metadata[] = { description_promise_based_inproc_transport, additional_constraints_promise_based_inproc_transport, required_experiments_promise_based_inproc_transport, 3, false, false}, - {"registered_methods_map", description_registered_methods_map, - additional_constraints_registered_methods_map, nullptr, 0, false, true}, {"rfc_max_concurrent_streams", description_rfc_max_concurrent_streams, additional_constraints_rfc_max_concurrent_streams, nullptr, 0, false, true}, diff --git a/src/core/lib/experiments/experiments.h b/src/core/lib/experiments/experiments.h index ae5a44ca967..f7d214fa8e9 100644 --- a/src/core/lib/experiments/experiments.h +++ b/src/core/lib/experiments/experiments.h @@ -93,7 +93,6 @@ inline bool IsPromiseBasedServerCallEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; } inline bool IsPromiseBasedInprocTransportEnabled() { return false; } -inline bool IsRegisteredMethodsMapEnabled() { return false; } inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; } @@ -156,7 +155,6 @@ inline bool IsPromiseBasedServerCallEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; } inline bool IsPromiseBasedInprocTransportEnabled() { return false; } -inline bool IsRegisteredMethodsMapEnabled() { return false; } inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; } @@ -220,7 +218,6 @@ inline bool IsPromiseBasedServerCallEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHOD_LOOKUP_IN_TRANSPORT inline bool IsRegisteredMethodLookupInTransportEnabled() { return true; } inline bool IsPromiseBasedInprocTransportEnabled() { return false; } -inline bool IsRegisteredMethodsMapEnabled() { return false; } inline bool IsRfcMaxConcurrentStreamsEnabled() { return false; } #define GRPC_EXPERIMENT_IS_INCLUDED_ROUND_ROBIN_DELEGATE_TO_PICK_FIRST inline bool IsRoundRobinDelegateToPickFirstEnabled() { return true; } @@ -269,7 +266,6 @@ enum ExperimentIds { kExperimentIdPromiseBasedServerCall, kExperimentIdRegisteredMethodLookupInTransport, kExperimentIdPromiseBasedInprocTransport, - kExperimentIdRegisteredMethodsMap, kExperimentIdRfcMaxConcurrentStreams, kExperimentIdRoundRobinDelegateToPickFirst, kExperimentIdRstpit, @@ -374,10 +370,6 @@ inline bool IsRegisteredMethodLookupInTransportEnabled() { inline bool IsPromiseBasedInprocTransportEnabled() { return IsExperimentEnabled(kExperimentIdPromiseBasedInprocTransport); } -#define GRPC_EXPERIMENT_IS_INCLUDED_REGISTERED_METHODS_MAP -inline bool IsRegisteredMethodsMapEnabled() { - return IsExperimentEnabled(kExperimentIdRegisteredMethodsMap); -} #define GRPC_EXPERIMENT_IS_INCLUDED_RFC_MAX_CONCURRENT_STREAMS inline bool IsRfcMaxConcurrentStreamsEnabled() { return IsExperimentEnabled(kExperimentIdRfcMaxConcurrentStreams); diff --git a/src/core/lib/experiments/experiments.yaml b/src/core/lib/experiments/experiments.yaml index 60ebc708152..cfcb561ed3a 100644 --- a/src/core/lib/experiments/experiments.yaml +++ b/src/core/lib/experiments/experiments.yaml @@ -183,12 +183,6 @@ expiry: 2024/03/31 owner: yashkt@google.com test_tags: ["surface_registered_method_lookup"] -- name: registered_methods_map - description: - Use absl::flat_hash_map for registered methods. - expiry: 2024/01/31 - owner: alishananda@google.com - test_tags: [] - name: rfc_max_concurrent_streams description: If set, enable rfc-compliant behavior (cancellation) in the advent that diff --git a/src/core/lib/experiments/rollouts.yaml b/src/core/lib/experiments/rollouts.yaml index 6dd8df0613a..8c9e77b36d3 100644 --- a/src/core/lib/experiments/rollouts.yaml +++ b/src/core/lib/experiments/rollouts.yaml @@ -94,8 +94,6 @@ default: false - name: registered_method_lookup_in_transport default: true -- name: registered_methods_map - default: false - name: rfc_max_concurrent_streams default: false - name: round_robin_delegate_to_pick_first diff --git a/src/core/lib/promise/observable.h b/src/core/lib/promise/observable.h index 335fc393754..3c270bef34e 100644 --- a/src/core/lib/promise/observable.h +++ b/src/core/lib/promise/observable.h @@ -18,6 +18,7 @@ #include #include "absl/container/flat_hash_set.h" +#include "absl/functional/any_invocable.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/promise/activity.h" @@ -37,7 +38,13 @@ class Observable { void Set(T value) { state_->Set(std::move(value)); } // Returns a promise that resolves to a T when the value becomes != current. - auto Next(T current) { return Observer(state_, std::move(current)); } + auto Next(T current) { return ObserverIfChanged(state_, std::move(current)); } + + // Same as Next(), except it resolves only once is_acceptable returns + // true for the new value. + auto NextWhen(absl::AnyInvocable is_acceptable) { + return ObserverWhen(state_, std::move(is_acceptable)); + } private: // Forward declaration so we can form pointers to Observer in State. @@ -92,13 +99,13 @@ class Observable { T value_ ABSL_GUARDED_BY(mu_); }; - // Observer is a promise that resolves to a T when the value becomes != - // current. + // A promise that resolves to a T when ShouldReturn() returns true. + // Subclasses must implement ShouldReturn(). class Observer { public: - Observer(RefCountedPtr state, T current) - : state_(std::move(state)), current_(std::move(current)) {} - ~Observer() { + explicit Observer(RefCountedPtr state) : state_(std::move(state)) {} + + virtual ~Observer() { // If we saw a pending at all then we *may* be in the set of observers. // If not we're definitely not and we can avoid taking the lock at all. if (!saw_pending_) return; @@ -109,8 +116,7 @@ class Observable { Observer(const Observer&) = delete; Observer& operator=(const Observer&) = delete; - Observer(Observer&& other) noexcept - : state_(std::move(other.state_)), current_(std::move(other.current_)) { + Observer(Observer&& other) noexcept : state_(std::move(other.state_)) { GPR_ASSERT(other.waker_.is_unwakeable()); GPR_ASSERT(!other.saw_pending_); } @@ -118,10 +124,12 @@ class Observable { void Wakeup() { waker_.WakeupAsync(); } + virtual bool ShouldReturn(const T& current) = 0; + Poll operator()() { MutexLock lock(state_->mu()); // Check if the value has changed yet. - if (current_ != state_->current()) { + if (ShouldReturn(state_->current())) { if (saw_pending_ && !waker_.is_unwakeable()) state_->Remove(this); return state_->current(); } @@ -133,11 +141,46 @@ class Observable { private: RefCountedPtr state_; - T current_; Waker waker_; bool saw_pending_ = false; }; + // An observer that resolves to a T when the value becomes != current. + class ObserverIfChanged : public Observer { + public: + ObserverIfChanged(RefCountedPtr state, T current) + : Observer(std::move(state)), current_(std::move(current)) {} + + ObserverIfChanged(ObserverIfChanged&& other) noexcept + : Observer(std::move(other)), current_(std::move(other.current_)) {} + + bool ShouldReturn(const T& current) override { return current_ != current; } + + private: + T current_; + }; + + // A promise that resolves to a T when is_acceptable returns true for + // the current value. + class ObserverWhen : public Observer { + public: + ObserverWhen(RefCountedPtr state, + absl::AnyInvocable is_acceptable) + : Observer(std::move(state)), + is_acceptable_(std::move(is_acceptable)) {} + + ObserverWhen(ObserverWhen&& other) noexcept + : Observer(std::move(other)), + is_acceptable_(std::move(other.is_acceptable_)) {} + + bool ShouldReturn(const T& current) override { + return is_acceptable_(current); + } + + private: + absl::AnyInvocable is_acceptable_; + }; + RefCountedPtr state_; }; 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 15755378a06..517e8a85f64 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 @@ -38,8 +38,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/gprpp/env.h" @@ -70,6 +68,8 @@ #include "src/core/lib/surface/api_trace.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" using grpc_core::Json; diff --git a/src/core/lib/security/credentials/xds/xds_credentials.cc b/src/core/lib/security/credentials/xds/xds_credentials.cc index e93df47cc90..e7e4d11088b 100644 --- a/src/core/lib/security/credentials/xds/xds_credentials.cc +++ b/src/core/lib/security/credentials/xds/xds_credentials.cc @@ -26,7 +26,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/xds/xds_certificate_provider.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/useful.h" @@ -34,6 +33,7 @@ #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/lib/security/credentials/tls/tls_utils.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" namespace grpc_core { 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 ca672ab48b6..87a27ddfe2c 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 @@ -38,7 +38,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" @@ -58,6 +57,7 @@ #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/transport/security_handshaker.h" #include "src/core/lib/transport/handshaker.h" +#include "src/core/load_balancing/grpclb/grpclb.h" #include "src/core/tsi/fake_transport_security.h" #include "src/core/tsi/transport_security_interface.h" diff --git a/src/core/lib/surface/channel_init.cc b/src/core/lib/surface/channel_init.cc index 568557c1711..cb74f821f79 100644 --- a/src/core/lib/surface/channel_init.cc +++ b/src/core/lib/surface/channel_init.cc @@ -440,6 +440,7 @@ absl::StatusOr ChannelInit::CreateStackSegment( for (size_t j = 0; j < i; j++) { filters[j].vtable->destroy(p + filters[j].offset); } + gpr_free_aligned(p); return r; } } diff --git a/src/core/ext/filters/client_channel/lb_policy/.clang-format b/src/core/load_balancing/.clang-format similarity index 100% rename from src/core/ext/filters/client_channel/lb_policy/.clang-format rename to src/core/load_balancing/.clang-format diff --git a/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc b/src/core/load_balancing/address_filtering.cc similarity index 97% rename from src/core/ext/filters/client_channel/lb_policy/address_filtering.cc rename to src/core/load_balancing/address_filtering.cc index bac15550d2d..2d0731156d9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +++ b/src/core/load_balancing/address_filtering.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h" +#include "src/core/load_balancing/address_filtering.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/address_filtering.h b/src/core/load_balancing/address_filtering.h similarity index 94% rename from src/core/ext/filters/client_channel/lb_policy/address_filtering.h rename to src/core/load_balancing/address_filtering.h index 924261669bd..1f39f5d6cc9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +++ b/src/core/load_balancing/address_filtering.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ADDRESS_FILTERING_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ADDRESS_FILTERING_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_ADDRESS_FILTERING_H +#define GRPC_SRC_CORE_LOAD_BALANCING_ADDRESS_FILTERING_H #include @@ -115,4 +115,4 @@ absl::StatusOr MakeHierarchicalAddressMap( } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ADDRESS_FILTERING_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_ADDRESS_FILTERING_H diff --git a/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h b/src/core/load_balancing/backend_metric_data.h similarity index 89% rename from src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h rename to src/core/load_balancing/backend_metric_data.h index 7a5db929c17..036298681de 100644 --- a/src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h +++ b/src/core/load_balancing/backend_metric_data.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_DATA_H +#define GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_DATA_H #include @@ -54,4 +54,4 @@ struct BackendMetricData { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_BACKEND_METRIC_DATA_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_BACKEND_METRIC_DATA_H diff --git a/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc b/src/core/load_balancing/child_policy_handler.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc rename to src/core/load_balancing/child_policy_handler.cc index bb5829b4dc3..cb511b8e910 100644 --- a/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +++ b/src/core/load_balancing/child_policy_handler.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/child_policy_handler.h" #include #include @@ -33,9 +33,9 @@ #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/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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/lib/transport/connectivity_state.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h b/src/core/load_balancing/child_policy_handler.h similarity index 90% rename from src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h rename to src/core/load_balancing/child_policy_handler.h index c9a1ee42ee2..19d37a1a012 100644 --- a/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +++ b/src/core/load_balancing/child_policy_handler.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_CHILD_POLICY_HANDLER_H +#define GRPC_SRC_CORE_LOAD_BALANCING_CHILD_POLICY_HANDLER_H #include #include @@ -27,7 +27,7 @@ #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/lib/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy.h" namespace grpc_core { @@ -85,4 +85,4 @@ class ChildPolicyHandler : public LoadBalancingPolicy { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_CHILD_POLICY_HANDLER_H diff --git a/src/core/lib/load_balancing/delegating_helper.h b/src/core/load_balancing/delegating_helper.h similarity index 92% rename from src/core/lib/load_balancing/delegating_helper.h rename to src/core/load_balancing/delegating_helper.h index 57e7f3c0f3e..389fdea4542 100644 --- a/src/core/lib/load_balancing/delegating_helper.h +++ b/src/core/load_balancing/delegating_helper.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_LOAD_BALANCING_DELEGATING_HELPER_H -#define GRPC_SRC_CORE_LIB_LOAD_BALANCING_DELEGATING_HELPER_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_DELEGATING_HELPER_H +#define GRPC_SRC_CORE_LOAD_BALANCING_DELEGATING_HELPER_H #include @@ -32,8 +32,8 @@ #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/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/security/credentials/credentials.h" namespace grpc_core { @@ -113,4 +113,4 @@ class LoadBalancingPolicy::ParentOwningDelegatingChannelControlHelper } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_LOAD_BALANCING_DELEGATING_HELPER_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_DELEGATING_HELPER_H diff --git a/src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc b/src/core/load_balancing/endpoint_list.cc similarity index 95% rename from src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc rename to src/core/load_balancing/endpoint_list.cc index 9c74cb8bb9a..10f5151ff94 100644 --- a/src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc +++ b/src/core/load_balancing/endpoint_list.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/endpoint_list.h" +#include "src/core/load_balancing/endpoint_list.h" #include @@ -32,7 +32,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h" +#include "src/core/load_balancing/pick_first/pick_first.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" @@ -40,9 +40,9 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/endpoint_list.h b/src/core/load_balancing/endpoint_list.h similarity index 95% rename from src/core/ext/filters/client_channel/lb_policy/endpoint_list.h rename to src/core/load_balancing/endpoint_list.h index 8977dabf9ce..f56027f88f7 100644 --- a/src/core/ext/filters/client_channel/lb_policy/endpoint_list.h +++ b/src/core/load_balancing/endpoint_list.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ENDPOINT_LIST_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ENDPOINT_LIST_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_ENDPOINT_LIST_H +#define GRPC_SRC_CORE_LOAD_BALANCING_ENDPOINT_LIST_H #include @@ -37,8 +37,8 @@ #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/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" namespace grpc_core { @@ -217,4 +217,4 @@ class EndpointList : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_ENDPOINT_LIST_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_ENDPOINT_LIST_H diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc similarity index 94% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc rename to src/core/load_balancing/grpclb/client_load_reporting_filter.cc index a83150321a4..3b139fa8a4c 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.cc @@ -18,7 +18,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h" +#include "src/core/load_balancing/grpclb/client_load_reporting_filter.h" #include #include @@ -27,7 +27,7 @@ #include "absl/types/optional.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" +#include "src/core/load_balancing/grpclb/grpclb_client_stats.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/promise/context.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h b/src/core/load_balancing/grpclb/client_load_reporting_filter.h similarity index 82% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h rename to src/core/load_balancing/grpclb/client_load_reporting_filter.h index 5ce3e68bf5c..474a4a5464f 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +++ b/src/core/load_balancing/grpclb/client_load_reporting_filter.h @@ -16,8 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H +#define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H #include @@ -43,4 +43,4 @@ class ClientLoadReportingFilter : public ChannelFilter { }; } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_CLIENT_LOAD_REPORTING_FILTER_H diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/load_balancing/grpclb/grpclb.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc rename to src/core/load_balancing/grpclb/grpclb.cc index a6ff725a39c..812658ccde8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/load_balancing/grpclb/grpclb.cc @@ -51,7 +51,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" +#include "src/core/load_balancing/grpclb/grpclb.h" #include #include @@ -94,11 +94,11 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" +#include "src/core/load_balancing/child_policy_handler.h" +#include "src/core/load_balancing/grpclb/client_load_reporting_filter.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" +#include "src/core/load_balancing/grpclb/grpclb_client_stats.h" +#include "src/core/load_balancing/grpclb/load_balancer_api.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/backoff/backoff.h" @@ -128,11 +128,11 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/resolver.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h b/src/core/load_balancing/grpclb/grpclb.h similarity index 85% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h rename to src/core/load_balancing/grpclb/grpclb.h index 1c361821bb5..e0a0c4cb8ec 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h +++ b/src/core/load_balancing/grpclb/grpclb.h @@ -16,8 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_H +#define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_H #include @@ -36,4 +36,4 @@ #define GRPC_ARG_GRPCLB_SUBCHANNEL_CACHE_INTERVAL_MS \ "grpc.internal.grpclb_subchannel_cache_interval_ms" -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_H diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc similarity index 96% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc rename to src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc index 2624c3a5c19..06684a88ae0 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +++ b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.h similarity index 80% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h rename to src/core/load_balancing/grpclb/grpclb_balancer_addresses.h index adc689c6c01..cb6614fd17f 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +++ b/src/core/load_balancing/grpclb/grpclb_balancer_addresses.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H +#define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H #include @@ -36,4 +36,4 @@ const EndpointAddressesList* FindGrpclbBalancerAddressesInChannelArgs( } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_BALANCER_ADDRESSES_H diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc b/src/core/load_balancing/grpclb/grpclb_client_stats.cc similarity index 97% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc rename to src/core/load_balancing/grpclb/grpclb_client_stats.cc index ca23f28609f..0d3cad26494 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.cc @@ -18,7 +18,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" +#include "src/core/load_balancing/grpclb/grpclb_client_stats.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h b/src/core/load_balancing/grpclb/grpclb_client_stats.h similarity index 89% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h rename to src/core/load_balancing/grpclb/grpclb_client_stats.h index b18a6ac4edd..809163938d3 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +++ b/src/core/load_balancing/grpclb/grpclb_client_stats.h @@ -16,8 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_CLIENT_STATS_H +#define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_CLIENT_STATS_H #include @@ -78,4 +78,4 @@ class GrpcLbClientStats : public RefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_GRPCLB_CLIENT_STATS_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_GRPCLB_CLIENT_STATS_H diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc b/src/core/load_balancing/grpclb/load_balancer_api.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc rename to src/core/load_balancing/grpclb/load_balancer_api.cc index 457cd5a00ce..074e7f97f25 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +++ b/src/core/load_balancing/grpclb/load_balancer_api.cc @@ -18,7 +18,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" +#include "src/core/load_balancing/grpclb/load_balancer_api.h" #include diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h b/src/core/load_balancing/grpclb/load_balancer_api.h similarity index 86% rename from src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h rename to src/core/load_balancing/grpclb/load_balancer_api.h index 9b7177d0597..e52a62d5454 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/load_balancing/grpclb/load_balancer_api.h @@ -16,8 +16,8 @@ // // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_LOAD_BALANCER_API_H +#define GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_LOAD_BALANCER_API_H #include #include @@ -29,7 +29,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h" +#include "src/core/load_balancing/grpclb/grpclb_client_stats.h" #include "src/core/lib/gprpp/time.h" #define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128 @@ -74,4 +74,4 @@ bool GrpcLbResponseParse(const grpc_slice& serialized_response, } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_GRPCLB_LOAD_BALANCER_API_H diff --git a/src/core/ext/filters/client_channel/lb_policy/health_check_client.cc b/src/core/load_balancing/health_check_client.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/health_check_client.cc rename to src/core/load_balancing/health_check_client.cc index f6e7e8c5903..dac81f49079 100644 --- a/src/core/ext/filters/client_channel/lb_policy/health_check_client.cc +++ b/src/core/load_balancing/health_check_client.cc @@ -42,7 +42,7 @@ #include "src/core/ext/filters/client_channel/client_channel_channelz.h" #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h" +#include "src/core/load_balancing/health_check_client_internal.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_stream_client.h" #include "src/core/lib/address_utils/sockaddr_utils.h" @@ -59,7 +59,7 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr_fwd.h" #include "src/core/lib/iomgr/pollset_set.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/slice/slice.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/proto/grpc/health/v1/health.upb.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/health_check_client.h b/src/core/load_balancing/health_check_client.h similarity index 85% rename from src/core/ext/filters/client_channel/lb_policy/health_check_client.h rename to src/core/load_balancing/health_check_client.h index 04c9f139114..74205a3596b 100644 --- a/src/core/ext/filters/client_channel/lb_policy/health_check_client.h +++ b/src/core/load_balancing/health_check_client.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_H +#define GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_H #include @@ -23,7 +23,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/work_serializer.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" namespace grpc_core { @@ -49,4 +49,4 @@ MakeHealthCheckWatcher( } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_H diff --git a/src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h b/src/core/load_balancing/health_check_client_internal.h similarity index 95% rename from src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h rename to src/core/load_balancing/health_check_client_internal.h index 160cadd86fc..aeb48becc37 100644 --- a/src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h +++ b/src/core/load_balancing/health_check_client_internal.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_INTERNAL_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_INTERNAL_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_INTERNAL_H +#define GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_INTERNAL_H #include @@ -42,7 +42,7 @@ #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/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" namespace grpc_core { @@ -201,4 +201,4 @@ class HealthWatcher : public InternalSubchannelDataWatcherInterface { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_HEALTH_CHECK_CLIENT_INTERNAL_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_HEALTH_CHECK_CLIENT_INTERNAL_H diff --git a/src/core/lib/load_balancing/lb_policy.cc b/src/core/load_balancing/lb_policy.cc similarity index 98% rename from src/core/lib/load_balancing/lb_policy.cc rename to src/core/load_balancing/lb_policy.cc index 018f7069aac..79cd63868e8 100644 --- a/src/core/lib/load_balancing/lb_policy.cc +++ b/src/core/load_balancing/lb_policy.cc @@ -18,7 +18,7 @@ #include -#include "src/core/lib/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/load_balancing/lb_policy.h b/src/core/load_balancing/lb_policy.h similarity index 98% rename from src/core/lib/load_balancing/lb_policy.h rename to src/core/load_balancing/lb_policy.h index a36280c163b..9224e1e61d2 100644 --- a/src/core/lib/load_balancing/lb_policy.h +++ b/src/core/load_balancing/lb_policy.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_H -#define GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H +#define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H #include @@ -38,7 +38,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" +#include "src/core/load_balancing/backend_metric_data.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/gprpp/debug_location.h" @@ -50,7 +50,7 @@ #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/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" namespace grpc_core { @@ -478,4 +478,4 @@ class LoadBalancingPolicy : public InternallyRefCounted { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_H diff --git a/src/core/lib/load_balancing/lb_policy_factory.h b/src/core/load_balancing/lb_policy_factory.h similarity index 85% rename from src/core/lib/load_balancing/lb_policy_factory.h rename to src/core/load_balancing/lb_policy_factory.h index 84486b582da..ca46e912d4a 100644 --- a/src/core/lib/load_balancing/lb_policy_factory.h +++ b/src/core/load_balancing/lb_policy_factory.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_FACTORY_H -#define GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_FACTORY_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_FACTORY_H +#define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_FACTORY_H #include @@ -25,7 +25,7 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy.h" namespace grpc_core { @@ -46,4 +46,4 @@ class LoadBalancingPolicyFactory { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_FACTORY_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_FACTORY_H diff --git a/src/core/lib/load_balancing/lb_policy_registry.cc b/src/core/load_balancing/lb_policy_registry.cc similarity index 97% rename from src/core/lib/load_balancing/lb_policy_registry.cc rename to src/core/load_balancing/lb_policy_registry.cc index 6d6c15eb4b2..a03219bb1e1 100644 --- a/src/core/lib/load_balancing/lb_policy_registry.cc +++ b/src/core/load_balancing/lb_policy_registry.cc @@ -16,7 +16,7 @@ #include -#include "src/core/lib/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/lb_policy_registry.h" #include #include @@ -33,7 +33,7 @@ #include #include -#include "src/core/lib/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy.h" namespace grpc_core { diff --git a/src/core/lib/load_balancing/lb_policy_registry.h b/src/core/load_balancing/lb_policy_registry.h similarity index 89% rename from src/core/lib/load_balancing/lb_policy_registry.h rename to src/core/load_balancing/lb_policy_registry.h index 9201c121353..7e50b6d1474 100644 --- a/src/core/lib/load_balancing/lb_policy_registry.h +++ b/src/core/load_balancing/lb_policy_registry.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_REGISTRY_H -#define GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_REGISTRY_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_REGISTRY_H +#define GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_REGISTRY_H #include @@ -28,8 +28,8 @@ #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.h" namespace grpc_core { @@ -79,4 +79,4 @@ class LoadBalancingPolicyRegistry { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_LOAD_BALANCING_LB_POLICY_REGISTRY_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_LB_POLICY_REGISTRY_H diff --git a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc b/src/core/load_balancing/oob_backend_metric.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc rename to src/core/load_balancing/oob_backend_metric.cc index 36f149adf60..c3720577654 100644 --- a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc +++ b/src/core/load_balancing/oob_backend_metric.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" +#include "src/core/load_balancing/oob_backend_metric.h" #include @@ -40,7 +40,7 @@ #include "src/core/ext/filters/client_channel/backend_metric.h" #include "src/core/ext/filters/client_channel/client_channel_channelz.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h" +#include "src/core/load_balancing/oob_backend_metric_internal.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_stream_client.h" #include "src/core/lib/channel/channel_trace.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h b/src/core/load_balancing/oob_backend_metric.h similarity index 81% rename from src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h rename to src/core/load_balancing/oob_backend_metric.h index fa930ee01a0..b31a4c748cb 100644 --- a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h +++ b/src/core/load_balancing/oob_backend_metric.h @@ -14,16 +14,16 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_H +#define GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_H #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" +#include "src/core/load_balancing/backend_metric_data.h" #include "src/core/lib/gprpp/time.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/subchannel_interface.h" namespace grpc_core { @@ -54,4 +54,4 @@ MakeOobBackendMetricWatcher(Duration report_interval, } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_H diff --git a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h b/src/core/load_balancing/oob_backend_metric_internal.h similarity index 90% rename from src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h rename to src/core/load_balancing/oob_backend_metric_internal.h index 3b8a54f7741..49667c3bad8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h +++ b/src/core/load_balancing/oob_backend_metric_internal.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_INTERNAL_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_INTERNAL_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_INTERNAL_H +#define GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_INTERNAL_H #include @@ -28,8 +28,8 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" +#include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/oob_backend_metric.h" #include "src/core/ext/filters/client_channel/subchannel.h" #include "src/core/ext/filters/client_channel/subchannel_interface_internal.h" #include "src/core/ext/filters/client_channel/subchannel_stream_client.h" @@ -116,4 +116,4 @@ class OrcaWatcher : public InternalSubchannelDataWatcherInterface { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OOB_BACKEND_METRIC_INTERNAL_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_OOB_BACKEND_METRIC_INTERNAL_H diff --git a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc b/src/core/load_balancing/outlier_detection/outlier_detection.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc rename to src/core/load_balancing/outlier_detection/outlier_detection.cc index 7a1abad0e01..14da92d770e 100644 --- a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc +++ b/src/core/load_balancing/outlier_detection/outlier_detection.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h" +#include "src/core/load_balancing/outlier_detection/outlier_detection.h" #include #include @@ -44,8 +44,8 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" -#include "src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h" +#include "src/core/load_balancing/child_policy_handler.h" +#include "src/core/load_balancing/health_check_client_internal.h" #include "src/core/ext/filters/client_channel/subchannel_interface_internal.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" @@ -65,11 +65,11 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h b/src/core/load_balancing/outlier_detection/outlier_detection.h similarity index 91% rename from src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h rename to src/core/load_balancing/outlier_detection/outlier_detection.h index 4118e99555c..fd247997f21 100644 --- a/src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h +++ b/src/core/load_balancing/outlier_detection/outlier_detection.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OUTLIER_DETECTION_OUTLIER_DETECTION_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OUTLIER_DETECTION_OUTLIER_DETECTION_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_OUTLIER_DETECTION_OUTLIER_DETECTION_H +#define GRPC_SRC_CORE_LOAD_BALANCING_OUTLIER_DETECTION_OUTLIER_DETECTION_H #include @@ -91,4 +91,4 @@ struct OutlierDetectionConfig { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_OUTLIER_DETECTION_OUTLIER_DETECTION_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_OUTLIER_DETECTION_OUTLIER_DETECTION_H diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/load_balancing/pick_first/pick_first.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc rename to src/core/load_balancing/pick_first/pick_first.cc index f2f9c8870fb..91a654f1ede 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +++ b/src/core/load_balancing/pick_first/pick_first.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h" +#include "src/core/load_balancing/pick_first/pick_first.h" #include #include @@ -41,7 +41,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/health_check_client.h" +#include "src/core/load_balancing/health_check_client.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" @@ -60,9 +60,9 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h b/src/core/load_balancing/pick_first/pick_first.h similarity index 84% rename from src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h rename to src/core/load_balancing/pick_first/pick_first.h index 4796742526d..0bbfee66c7a 100644 --- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h +++ b/src/core/load_balancing/pick_first/pick_first.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_PICK_FIRST_PICK_FIRST_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_PICK_FIRST_PICK_FIRST_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_PICK_FIRST_PICK_FIRST_H +#define GRPC_SRC_CORE_LOAD_BALANCING_PICK_FIRST_PICK_FIRST_H #include @@ -33,4 +33,4 @@ #define GRPC_ARG_INTERNAL_PICK_FIRST_OMIT_STATUS_MESSAGE_PREFIX \ GRPC_ARG_NO_SUBCHANNEL_PREFIX "pick_first_omit_status_message_prefix" -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_PICK_FIRST_PICK_FIRST_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_PICK_FIRST_PICK_FIRST_H diff --git a/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc b/src/core/load_balancing/priority/priority.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/priority/priority.cc rename to src/core/load_balancing/priority/priority.cc index 25773602d89..4cbf19d9cd3 100644 --- a/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +++ b/src/core/load_balancing/priority/priority.cc @@ -39,8 +39,8 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/address_filtering.h" +#include "src/core/load_balancing/child_policy_handler.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" @@ -56,10 +56,10 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc b/src/core/load_balancing/ring_hash/ring_hash.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc rename to src/core/load_balancing/ring_hash/ring_hash.cc index bbe944681b7..7958e098290 100644 --- a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +++ b/src/core/load_balancing/ring_hash/ring_hash.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h" +#include "src/core/load_balancing/ring_hash/ring_hash.h" #include #include @@ -43,7 +43,7 @@ #include #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h" +#include "src/core/load_balancing/pick_first/pick_first.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" @@ -62,10 +62,10 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h b/src/core/load_balancing/ring_hash/ring_hash.h similarity index 87% rename from src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h rename to src/core/load_balancing/ring_hash/ring_hash.h index 5fee8319aaf..b70c3c9ddc1 100644 --- a/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +++ b/src/core/load_balancing/ring_hash/ring_hash.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_RING_HASH_RING_HASH_H +#define GRPC_SRC_CORE_LOAD_BALANCING_RING_HASH_RING_HASH_H #include @@ -59,4 +59,4 @@ struct RingHashConfig { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_RING_HASH_RING_HASH_H diff --git a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc b/src/core/load_balancing/rls/rls.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/rls/rls.cc rename to src/core/load_balancing/rls/rls.cc index 66758a47e41..62429272509 100644 --- a/src/core/ext/filters/client_channel/lb_policy/rls/rls.cc +++ b/src/core/load_balancing/rls/rls.cc @@ -64,7 +64,7 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/child_policy_handler.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channelz.h" @@ -87,10 +87,10 @@ #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/resolver_registry.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/load_balancing/round_robin/round_robin.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc rename to src/core/load_balancing/round_robin/round_robin.cc index 7a580b1873f..0f2863d6a20 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +++ b/src/core/load_balancing/round_robin/round_robin.cc @@ -37,8 +37,8 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/endpoint_list.h" -#include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h" +#include "src/core/load_balancing/endpoint_list.h" +#include "src/core/load_balancing/subchannel_list.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" @@ -48,9 +48,9 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/lib/load_balancing/subchannel_interface.h b/src/core/load_balancing/subchannel_interface.h similarity index 96% rename from src/core/lib/load_balancing/subchannel_interface.h rename to src/core/load_balancing/subchannel_interface.h index 9a9e855546a..bc43ed764ca 100644 --- a/src/core/lib/load_balancing/subchannel_interface.h +++ b/src/core/load_balancing/subchannel_interface.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_LIB_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H -#define GRPC_SRC_CORE_LIB_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H +#define GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H #include @@ -138,4 +138,4 @@ class DelegatingSubchannel : public SubchannelInterface { } // namespace grpc_core -#endif // GRPC_SRC_CORE_LIB_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_INTERFACE_H diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/load_balancing/subchannel_list.h similarity index 97% rename from src/core/ext/filters/client_channel/lb_policy/subchannel_list.h rename to src/core/load_balancing/subchannel_list.h index b5076a9f492..71a59015787 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/load_balancing/subchannel_list.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_SUBCHANNEL_LIST_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_SUBCHANNEL_LIST_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_LIST_H +#define GRPC_SRC_CORE_LOAD_BALANCING_SUBCHANNEL_LIST_H #include @@ -32,7 +32,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/health_check_client.h" +#include "src/core/load_balancing/health_check_client.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/dual_ref_counted.h" @@ -40,8 +40,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/iomgr_fwd.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" @@ -452,4 +452,4 @@ bool SubchannelList -#include "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h" +#include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" #include #include diff --git a/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h similarity index 88% rename from src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h rename to src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h index 53ff38f00ee..72c72a0ff79 100644 --- a/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h +++ b/src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H +#define GRPC_SRC_CORE_LOAD_BALANCING_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H #include @@ -68,4 +68,4 @@ class StaticStrideScheduler { } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_WEIGHTED_ROUND_ROBIN_STATIC_STRIDE_SCHEDULER_H diff --git a/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc rename to src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc index 2bcf45a211b..6cafea50c1c 100644 --- a/src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc +++ b/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc @@ -46,11 +46,11 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" -#include "src/core/ext/filters/client_channel/lb_policy/endpoint_list.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" -#include "src/core/ext/filters/client_channel/lb_policy/subchannel_list.h" -#include "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h" +#include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/endpoint_list.h" +#include "src/core/load_balancing/oob_backend_metric.h" +#include "src/core/load_balancing/subchannel_list.h" +#include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" @@ -71,9 +71,9 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/server_address.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc b/src/core/load_balancing/weighted_target/weighted_target.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc rename to src/core/load_balancing/weighted_target/weighted_target.cc index 8be2f0de861..ca50b79bd66 100644 --- a/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +++ b/src/core/load_balancing/weighted_target/weighted_target.cc @@ -40,8 +40,8 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/address_filtering.h" +#include "src/core/load_balancing/child_policy_handler.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/debug/trace.h" @@ -57,10 +57,10 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc b/src/core/load_balancing/xds/cds.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/xds/cds.cc rename to src/core/load_balancing/xds/cds.cc index 0d51f391db6..d30724fd275 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +++ b/src/core/load_balancing/xds/cds.cc @@ -37,9 +37,9 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h" -#include "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" +#include "src/core/load_balancing/address_filtering.h" +#include "src/core/load_balancing/outlier_detection/outlier_detection.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.h" #include "src/core/ext/xds/xds_cluster.h" #include "src/core/ext/xds/xds_common_types.h" @@ -60,10 +60,10 @@ #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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" namespace grpc_core { diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h b/src/core/load_balancing/xds/xds_channel_args.h similarity index 84% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h rename to src/core/load_balancing/xds/xds_channel_args.h index 1df82d2fa18..8f47a0796a9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +++ b/src/core/load_balancing/xds/xds_channel_args.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_CHANNEL_ARGS_H +#define GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_CHANNEL_ARGS_H #include @@ -34,4 +34,4 @@ #define GRPC_ARG_XDS_LOCALITY_WEIGHT \ GRPC_ARG_NO_SUBCHANNEL_PREFIX "xds_locality_weight" -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_CHANNEL_ARGS_H diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc b/src/core/load_balancing/xds/xds_cluster_impl.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc rename to src/core/load_balancing/xds/xds_cluster_impl.cc index c495d83cd54..5fab4494a80 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +++ b/src/core/load_balancing/xds/xds_cluster_impl.cc @@ -38,9 +38,9 @@ #include #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" +#include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/child_policy_handler.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.h" #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/ext/xds/xds_bootstrap_grpc.h" @@ -62,11 +62,11 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/security/credentials/xds/xds_credentials.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc b/src/core/load_balancing/xds/xds_cluster_manager.cc similarity index 98% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc rename to src/core/load_balancing/xds/xds_cluster_manager.cc index 447a1c5abf9..2693c61c9fd 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +++ b/src/core/load_balancing/xds/xds_cluster_manager.cc @@ -39,7 +39,7 @@ #include #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/child_policy_handler.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver_attributes.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" @@ -55,10 +55,10 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc b/src/core/load_balancing/xds/xds_override_host.cc similarity index 99% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc rename to src/core/load_balancing/xds/xds_override_host.cc index 6f27ba90ecd..698a2af62c0 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc +++ b/src/core/load_balancing/xds/xds_override_host.cc @@ -16,7 +16,7 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h" +#include "src/core/load_balancing/xds/xds_override_host.h" #include @@ -48,7 +48,7 @@ #include #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" +#include "src/core/load_balancing/child_policy_handler.h" #include "src/core/ext/filters/client_channel/resolver/xds/xds_dependency_manager.h" #include "src/core/ext/filters/stateful_session/stateful_session_filter.h" #include "src/core/ext/xds/xds_health_status.h" @@ -75,11 +75,11 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/transport/connectivity_state.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h b/src/core/load_balancing/xds/xds_override_host.h similarity index 86% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h rename to src/core/load_balancing/xds/xds_override_host.h index 2cf33345421..6c4d18b96d0 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h +++ b/src/core/load_balancing/xds/xds_override_host.h @@ -14,8 +14,8 @@ // limitations under the License. // -#ifndef GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_OVERRIDE_HOST_H -#define GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_OVERRIDE_HOST_H +#ifndef GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_OVERRIDE_HOST_H +#define GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_OVERRIDE_HOST_H #include @@ -26,7 +26,7 @@ #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy.h" namespace grpc_core { @@ -60,4 +60,4 @@ class XdsOverrideHostLbConfig : public LoadBalancingPolicy::Config { }; } // namespace grpc_core -#endif // GRPC_SRC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_OVERRIDE_HOST_H +#endif // GRPC_SRC_CORE_LOAD_BALANCING_XDS_XDS_OVERRIDE_HOST_H diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc b/src/core/load_balancing/xds/xds_wrr_locality.cc similarity index 97% rename from src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc rename to src/core/load_balancing/xds/xds_wrr_locality.cc index ee4b7794137..cf32f2082f8 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc +++ b/src/core/load_balancing/xds/xds_wrr_locality.cc @@ -32,7 +32,7 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/core/ext/xds/xds_client_stats.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/config/core_configuration.h" @@ -46,10 +46,10 @@ #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.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/lib/resolver/endpoint_addresses.h" namespace grpc_core { diff --git a/src/cpp/ext/csm/csm_observability.cc b/src/cpp/ext/csm/csm_observability.cc index 978442f9278..b012ce04fec 100644 --- a/src/cpp/ext/csm/csm_observability.cc +++ b/src/cpp/ext/csm/csm_observability.cc @@ -130,13 +130,8 @@ CsmObservabilityBuilder::SetGenericMethodAttributeFilter( } absl::StatusOr CsmObservabilityBuilder::BuildAndRegister() { - builder_->SetServerSelector(internal::CsmServerSelector); - builder_->SetTargetSelector(internal::CsmChannelTargetSelector); - builder_->SetLabelsInjector( - std::make_unique( - google::cloud::otel::MakeResourceDetector() - ->Detect() - .GetAttributes())); + builder_->AddPluginOption( + std::make_unique()); auto status = builder_->BuildAndRegisterGlobal(); if (!status.ok()) { return status; diff --git a/src/cpp/ext/otel/key_value_iterable.h b/src/cpp/ext/otel/key_value_iterable.h index d1744b02938..76a48d01448 100644 --- a/src/cpp/ext/otel/key_value_iterable.h +++ b/src/cpp/ext/otel/key_value_iterable.h @@ -49,7 +49,6 @@ inline opentelemetry::nostd::string_view AbslStrViewToOpenTelemetryStrView( class KeyValueIterable : public opentelemetry::common::KeyValueIterable { public: explicit KeyValueIterable( - LabelsIterable* injected_labels_iterable, const std::vector>& injected_labels_from_plugin_options, absl::Span> @@ -58,8 +57,7 @@ class KeyValueIterable : public opentelemetry::common::KeyValueIterable { absl::Span>> optional_labels_span, bool is_client) - : injected_labels_iterable_(injected_labels_iterable), - injected_labels_from_plugin_options_( + : injected_labels_from_plugin_options_( injected_labels_from_plugin_options), additional_labels_(additional_labels), active_plugin_options_view_(active_plugin_options_view), @@ -70,20 +68,6 @@ class KeyValueIterable : public opentelemetry::common::KeyValueIterable { bool(opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue)> callback) const noexcept override { - if (injected_labels_iterable_ != nullptr) { - injected_labels_iterable_->ResetIteratorPosition(); - while (const auto& pair = injected_labels_iterable_->Next()) { - if (!callback(AbslStrViewToOpenTelemetryStrView(pair->first), - AbslStrViewToOpenTelemetryStrView(pair->second))) { - return false; - } - } - } - if (OpenTelemetryPluginState().labels_injector != nullptr && - !OpenTelemetryPluginState().labels_injector->AddOptionalLabels( - is_client_, optional_labels_, callback)) { - return false; - } if (active_plugin_options_view_ != nullptr && !active_plugin_options_view_->ForEach( [callback, this]( @@ -116,9 +100,7 @@ class KeyValueIterable : public opentelemetry::common::KeyValueIterable { } size_t size() const noexcept override { - size_t size = injected_labels_iterable_ != nullptr - ? injected_labels_iterable_->Size() - : 0; + size_t size = 0; for (const auto& plugin_option_injected_iterable : injected_labels_from_plugin_options_) { if (plugin_option_injected_iterable != nullptr) { @@ -126,10 +108,6 @@ class KeyValueIterable : public opentelemetry::common::KeyValueIterable { } } size += additional_labels_.size(); - if (OpenTelemetryPluginState().labels_injector != nullptr) { - size += OpenTelemetryPluginState().labels_injector->GetOptionalLabelsSize( - is_client_, optional_labels_); - } if (active_plugin_options_view_ != nullptr) { active_plugin_options_view_->ForEach( [&size, this](const InternalOpenTelemetryPluginOption& plugin_option, @@ -143,7 +121,6 @@ class KeyValueIterable : public opentelemetry::common::KeyValueIterable { } private: - LabelsIterable* injected_labels_iterable_; const std::vector>& injected_labels_from_plugin_options_; absl::Span> diff --git a/src/cpp/ext/otel/otel_client_filter.cc b/src/cpp/ext/otel/otel_client_filter.cc index ca966e80fbe..0a9f6cc714d 100644 --- a/src/cpp/ext/otel/otel_client_filter.cc +++ b/src/cpp/ext/otel/otel_client_filter.cc @@ -131,19 +131,15 @@ OpenTelemetryCallTracer::OpenTelemetryCallAttemptTracer:: // We might not have all the injected labels that we want at this point, so // avoid recording a subset of injected labels here. OpenTelemetryPluginState().client.attempt.started->Add( - 1, KeyValueIterable( - /*injected_labels_iterable=*/nullptr, {}, additional_labels, - /*active_plugin_options_view=*/nullptr, - /*optional_labels_span=*/{}, /*is_client=*/true)); + 1, KeyValueIterable(/*injected_labels_from_plugin_options=*/{}, + additional_labels, + /*active_plugin_options_view=*/nullptr, + /*optional_labels_span=*/{}, /*is_client=*/true)); } } void OpenTelemetryCallTracer::OpenTelemetryCallAttemptTracer:: RecordReceivedInitialMetadata(grpc_metadata_batch* recv_initial_metadata) { - if (OpenTelemetryPluginState().labels_injector != nullptr) { - injected_labels_ = OpenTelemetryPluginState().labels_injector->GetLabels( - recv_initial_metadata); - } parent_->parent_->active_plugin_options_view().ForEach( [&](const InternalOpenTelemetryPluginOption& plugin_option, size_t /*index*/) { @@ -158,10 +154,6 @@ void OpenTelemetryCallTracer::OpenTelemetryCallAttemptTracer:: void OpenTelemetryCallTracer::OpenTelemetryCallAttemptTracer:: RecordSendInitialMetadata(grpc_metadata_batch* send_initial_metadata) { - if (OpenTelemetryPluginState().labels_injector != nullptr) { - OpenTelemetryPluginState().labels_injector->AddLabels(send_initial_metadata, - nullptr); - } parent_->parent_->active_plugin_options_view().ForEach( [&](const InternalOpenTelemetryPluginOption& plugin_option, size_t /*index*/) { @@ -210,10 +202,10 @@ void OpenTelemetryCallTracer::OpenTelemetryCallAttemptTracer:: {OpenTelemetryStatusKey(), grpc_status_code_to_string( static_cast(status.code()))}}}; - KeyValueIterable labels( - injected_labels_.get(), injected_labels_from_plugin_options_, - additional_labels, &parent_->parent_->active_plugin_options_view(), - optional_labels_array_, /*is_client=*/true); + KeyValueIterable labels(injected_labels_from_plugin_options_, + additional_labels, + &parent_->parent_->active_plugin_options_view(), + optional_labels_array_, /*is_client=*/true); if (OpenTelemetryPluginState().client.attempt.duration != nullptr) { OpenTelemetryPluginState().client.attempt.duration->Record( absl::ToDoubleSeconds(absl::Now() - start_time_), labels, diff --git a/src/cpp/ext/otel/otel_plugin.cc b/src/cpp/ext/otel/otel_plugin.cc index d7e5ddb78bb..2e56245df01 100644 --- a/src/cpp/ext/otel/otel_plugin.cc +++ b/src/cpp/ext/otel/otel_plugin.cc @@ -116,13 +116,6 @@ OpenTelemetryPluginBuilderImpl::DisableAllMetrics() { return *this; } -OpenTelemetryPluginBuilderImpl& -OpenTelemetryPluginBuilderImpl::SetLabelsInjector( - std::unique_ptr labels_injector) { - labels_injector_ = std::move(labels_injector); - return *this; -} - OpenTelemetryPluginBuilderImpl& OpenTelemetryPluginBuilderImpl::SetTargetSelector( absl::AnyInvocable @@ -243,7 +236,6 @@ absl::Status OpenTelemetryPluginBuilderImpl::BuildAndRegisterGlobal() { kServerCallRcvdTotalCompressedMessageSizeInstrumentName), "Compressed message bytes received per server call", "By"); } - g_otel_plugin_state_->labels_injector = std::move(labels_injector_); g_otel_plugin_state_->target_attribute_filter = std::move(target_attribute_filter_); g_otel_plugin_state_->server_selector = std::move(server_selector_); diff --git a/src/cpp/ext/otel/otel_plugin.h b/src/cpp/ext/otel/otel_plugin.h index 61264dbb0e6..90b17ab2353 100644 --- a/src/cpp/ext/otel/otel_plugin.h +++ b/src/cpp/ext/otel/otel_plugin.h @@ -135,7 +135,6 @@ struct OpenTelemetryPluginState { } server; opentelemetry::nostd::shared_ptr meter_provider; - std::unique_ptr labels_injector; absl::AnyInvocable target_attribute_filter; absl::AnyInvocable @@ -173,9 +172,6 @@ class OpenTelemetryPluginBuilderImpl { OpenTelemetryPluginBuilderImpl& EnableMetric(absl::string_view metric_name); OpenTelemetryPluginBuilderImpl& DisableMetric(absl::string_view metric_name); OpenTelemetryPluginBuilderImpl& DisableAllMetrics(); - // Allows setting a labels injector on calls traced through this plugin. - OpenTelemetryPluginBuilderImpl& SetLabelsInjector( - std::unique_ptr labels_injector); // If set, \a target_selector is called per channel to decide whether to // collect metrics on that target or not. OpenTelemetryPluginBuilderImpl& SetTargetSelector( diff --git a/src/cpp/ext/otel/otel_server_call_tracer.cc b/src/cpp/ext/otel/otel_server_call_tracer.cc index f4029ac1772..9ca45a3db3a 100644 --- a/src/cpp/ext/otel/otel_server_call_tracer.cc +++ b/src/cpp/ext/otel/otel_server_call_tracer.cc @@ -82,10 +82,6 @@ class OpenTelemetryServerCallTracer : public grpc_core::ServerCallTracer { // arguments. void RecordSendInitialMetadata( grpc_metadata_batch* send_initial_metadata) override { - if (OpenTelemetryPluginState().labels_injector != nullptr) { - OpenTelemetryPluginState().labels_injector->AddLabels( - send_initial_metadata, injected_labels_.get()); - } active_plugin_options_view_.ForEach( [&](const InternalOpenTelemetryPluginOption& plugin_option, size_t index) { @@ -162,7 +158,6 @@ class OpenTelemetryServerCallTracer : public grpc_core::ServerCallTracer { absl::Time start_time_; absl::Duration elapsed_time_; grpc_core::Slice path_; - std::unique_ptr injected_labels_; bool registered_method_; ActivePluginOptionsView active_plugin_options_view_; // TODO(yashykt): It's wasteful to do this per call. When we re-haul the stats @@ -175,10 +170,6 @@ void OpenTelemetryServerCallTracer::RecordReceivedInitialMetadata( grpc_metadata_batch* recv_initial_metadata) { path_ = recv_initial_metadata->get_pointer(grpc_core::HttpPathMetadata())->Ref(); - if (OpenTelemetryPluginState().labels_injector != nullptr) { - injected_labels_ = OpenTelemetryPluginState().labels_injector->GetLabels( - recv_initial_metadata); - } active_plugin_options_view_.ForEach( [&](const InternalOpenTelemetryPluginOption& plugin_option, size_t index) { @@ -198,7 +189,7 @@ void OpenTelemetryServerCallTracer::RecordReceivedInitialMetadata( // We might not have all the injected labels that we want at this point, so // avoid recording a subset of injected labels here. OpenTelemetryPluginState().server.call.started->Add( - 1, KeyValueIterable(/*injected_labels_iterable=*/nullptr, {}, + 1, KeyValueIterable(/*injected_labels_from_plugin_options=*/{}, additional_labels, /*active_plugin_options_view=*/nullptr, {}, /*is_client=*/false)); @@ -221,8 +212,7 @@ void OpenTelemetryServerCallTracer::RecordEnd( grpc_status_code_to_string(final_info->final_status)}}}; // Currently we do not have any optional labels on the server side. KeyValueIterable labels( - injected_labels_.get(), injected_labels_from_plugin_options_, - additional_labels, + injected_labels_from_plugin_options_, additional_labels, /*active_plugin_options_view=*/nullptr, /*optional_labels_span=*/{}, /*is_client=*/false); if (OpenTelemetryPluginState().server.call.duration != nullptr) { diff --git a/src/cpp/server/backend_metric_recorder.cc b/src/cpp/server/backend_metric_recorder.cc index 5fa2aada76b..020a2db6efe 100644 --- a/src/cpp/server/backend_metric_recorder.cc +++ b/src/cpp/server/backend_metric_recorder.cc @@ -28,8 +28,8 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/lib/debug/trace.h" +#include "src/core/load_balancing/backend_metric_data.h" using grpc_core::BackendMetricData; diff --git a/src/cpp/server/backend_metric_recorder.h b/src/cpp/server/backend_metric_recorder.h index 6c5ad9e3346..0863d2b6a31 100644 --- a/src/cpp/server/backend_metric_recorder.h +++ b/src/cpp/server/backend_metric_recorder.h @@ -33,7 +33,7 @@ #include #include "src/core/ext/filters/backend_metrics/backend_metric_provider.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" +#include "src/core/load_balancing/backend_metric_data.h" namespace grpc { namespace experimental { diff --git a/src/cpp/server/orca/orca_service.cc b/src/cpp/server/orca/orca_service.cc index 58a605e18e8..f139a95887f 100644 --- a/src/cpp/server/orca/orca_service.cc +++ b/src/cpp/server/orca/orca_service.cc @@ -44,13 +44,13 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #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/cpp/server/backend_metric_recorder.h" namespace grpc { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1b68ac8336b..9d766455be7 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -32,30 +32,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/dynamic_filters.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/http_proxy_mapper.cc', - 'src/core/ext/filters/client_channel/lb_policy/address_filtering.cc', - 'src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc', - 'src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', - 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', - 'src/core/ext/filters/client_channel/lb_policy/health_check_client.cc', - 'src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc', - 'src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc', - 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', - 'src/core/ext/filters/client_channel/lb_policy/priority/priority.cc', - 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc', - 'src/core/ext/filters/client_channel/lb_policy/rls/rls.cc', - 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc', - 'src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/cds.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc', - 'src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc', 'src/core/ext/filters/client_channel/local_subchannel_pool.cc', 'src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -696,8 +672,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/json/json_reader.cc', 'src/core/lib/json/json_util.cc', 'src/core/lib/json/json_writer.cc', - 'src/core/lib/load_balancing/lb_policy.cc', - 'src/core/lib/load_balancing/lb_policy_registry.cc', 'src/core/lib/matchers/matchers.cc', 'src/core/lib/promise/activity.cc', 'src/core/lib/promise/party.cc', @@ -830,6 +804,32 @@ CORE_SOURCE_FILES = [ '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/child_policy_handler.cc', + 'src/core/load_balancing/endpoint_list.cc', + 'src/core/load_balancing/grpclb/client_load_reporting_filter.cc', + 'src/core/load_balancing/grpclb/grpclb.cc', + 'src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc', + 'src/core/load_balancing/grpclb/grpclb_client_stats.cc', + 'src/core/load_balancing/grpclb/load_balancer_api.cc', + 'src/core/load_balancing/health_check_client.cc', + 'src/core/load_balancing/lb_policy.cc', + 'src/core/load_balancing/lb_policy_registry.cc', + 'src/core/load_balancing/oob_backend_metric.cc', + 'src/core/load_balancing/outlier_detection/outlier_detection.cc', + 'src/core/load_balancing/pick_first/pick_first.cc', + 'src/core/load_balancing/priority/priority.cc', + 'src/core/load_balancing/ring_hash/ring_hash.cc', + 'src/core/load_balancing/rls/rls.cc', + 'src/core/load_balancing/round_robin/round_robin.cc', + 'src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc', + 'src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc', + 'src/core/load_balancing/weighted_target/weighted_target.cc', + 'src/core/load_balancing/xds/cds.cc', + 'src/core/load_balancing/xds/xds_cluster_impl.cc', + 'src/core/load_balancing/xds/xds_cluster_manager.cc', + 'src/core/load_balancing/xds/xds_override_host.cc', + 'src/core/load_balancing/xds/xds_wrr_locality.cc', 'src/core/plugin_registry/grpc_plugin_registry.cc', 'src/core/plugin_registry/grpc_plugin_registry_extra.cc', 'src/core/tsi/alts/crypt/aes_gcm.cc', diff --git a/src/python/grpcio_observability/make_grpcio_observability.py b/src/python/grpcio_observability/make_grpcio_observability.py index 9d6e4a2d654..740cdfffc4a 100755 --- a/src/python/grpcio_observability/make_grpcio_observability.py +++ b/src/python/grpcio_observability/make_grpcio_observability.py @@ -68,8 +68,8 @@ COPY_FILES_SOURCE_TARGET_PAIRS = [ ("third_party/abseil-cpp/absl", "third_party/abseil-cpp/absl"), ("src/core/lib", "grpc_root/src/core/lib"), ( - "src/core/ext/filters/client_channel/lb_policy", - "grpc_root/src/core/ext/filters/client_channel/lb_policy", + "src/core/load_balancing", + "grpc_root/src/core/load_balancing", ), ] diff --git a/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile.template b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile.template new file mode 100644 index 00000000000..2bff360192c --- /dev/null +++ b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + # 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. + + FROM debian:10 + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_3_0_deps.include"/> + + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile.template b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile.template new file mode 100644 index 00000000000..a0f67ff7d89 --- /dev/null +++ b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + # 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. + + FROM debian:10 + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_3_1_deps.include"/> + + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile.template b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile.template new file mode 100644 index 00000000000..a19720ff436 --- /dev/null +++ b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + # 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. + + FROM debian:10 + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_3_2_deps.include"/> + + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile.template b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile.template new file mode 100644 index 00000000000..8fc44ef1a80 --- /dev/null +++ b/templates/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + # 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. + + FROM debian:10 + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_3_3_deps.include"/> + + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/ruby_3_0_deps.include b/templates/tools/dockerfile/ruby_3_0_deps.include new file mode 100644 index 00000000000..7ca23e21325 --- /dev/null +++ b/templates/tools/dockerfile/ruby_3_0_deps.include @@ -0,0 +1,16 @@ +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.0 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.0.5" +RUN /bin/bash -l -c "rvm use --default ruby-3.0.5" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.5' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" diff --git a/templates/tools/dockerfile/ruby_3_1_deps.include b/templates/tools/dockerfile/ruby_3_1_deps.include new file mode 100644 index 00000000000..f5c46ef84f1 --- /dev/null +++ b/templates/tools/dockerfile/ruby_3_1_deps.include @@ -0,0 +1,16 @@ +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.1 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.1.3" +RUN /bin/bash -l -c "rvm use --default ruby-3.1.3" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.1.3' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" diff --git a/templates/tools/dockerfile/ruby_3_2_deps.include b/templates/tools/dockerfile/ruby_3_2_deps.include new file mode 100644 index 00000000000..36f6711e946 --- /dev/null +++ b/templates/tools/dockerfile/ruby_3_2_deps.include @@ -0,0 +1,16 @@ +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.2 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.2.0" +RUN /bin/bash -l -c "rvm use --default ruby-3.2.0" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" diff --git a/templates/tools/dockerfile/ruby_3_3_deps.include b/templates/tools/dockerfile/ruby_3_3_deps.include new file mode 100644 index 00000000000..ae3fb964949 --- /dev/null +++ b/templates/tools/dockerfile/ruby_3_3_deps.include @@ -0,0 +1,16 @@ +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.3 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.3.0" +RUN /bin/bash -l -c "rvm use --default ruby-3.3.0" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.3.0' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" diff --git a/test/core/client_channel/lb_policy/lb_policy_test_lib.h b/test/core/client_channel/lb_policy/lb_policy_test_lib.h index 48f97ca9524..9b0224a4b69 100644 --- a/test/core/client_channel/lb_policy/lb_policy_test_lib.h +++ b/test/core/client_channel/lb_policy/lb_policy_test_lib.h @@ -55,10 +55,6 @@ #include #include "src/core/ext/filters/client_channel/client_channel_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" -#include "src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h" #include "src/core/ext/filters/client_channel/subchannel_interface_internal.h" #include "src/core/ext/filters/client_channel/subchannel_pool_interface.h" #include "src/core/lib/address_utils/parse_address.h" @@ -77,14 +73,18 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/service_config/service_config_call_data.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" +#include "src/core/load_balancing/lb_policy_registry.h" +#include "src/core/load_balancing/oob_backend_metric.h" +#include "src/core/load_balancing/oob_backend_metric_internal.h" +#include "src/core/load_balancing/subchannel_interface.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" diff --git a/test/core/client_channel/lb_policy/outlier_detection_test.cc b/test/core/client_channel/lb_policy/outlier_detection_test.cc index 809941ea1f2..45515cf4e69 100644 --- a/test/core/client_channel/lb_policy/outlier_detection_test.cc +++ b/test/core/client_channel/lb_policy/outlier_detection_test.cc @@ -35,14 +35,14 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.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/time.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/lb_policy.h" #include "test/core/client_channel/lb_policy/lb_policy_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/lb_policy/pick_first_test.cc b/test/core/client_channel/lb_policy/pick_first_test.cc index c0424a49c54..bcb4aa935a6 100644 --- a/test/core/client_channel/lb_policy/pick_first_test.cc +++ b/test/core/client_channel/lb_policy/pick_first_test.cc @@ -43,8 +43,8 @@ #include "src/core/lib/gprpp/work_serializer.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/lb_policy.h" #include "test/core/client_channel/lb_policy/lb_policy_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/lb_policy/ring_hash_test.cc b/test/core/client_channel/lb_policy/ring_hash_test.cc index b911f98c3f7..c7e2ae09a92 100644 --- a/test/core/client_channel/lb_policy/ring_hash_test.cc +++ b/test/core/client_channel/lb_policy/ring_hash_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h" +#include "src/core/load_balancing/ring_hash/ring_hash.h" #include @@ -37,8 +37,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/xxhash_inline.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/lb_policy.h" #include "test/core/client_channel/lb_policy/lb_policy_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc b/test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc index 8979272b7d2..ef434d14275 100644 --- a/test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc +++ b/test/core/client_channel/lb_policy/static_stride_scheduler_benchmark.cc @@ -28,8 +28,8 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h" #include "src/core/lib/gprpp/no_destruct.h" +#include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" namespace grpc_core { namespace { diff --git a/test/core/client_channel/lb_policy/static_stride_scheduler_test.cc b/test/core/client_channel/lb_policy/static_stride_scheduler_test.cc index 63340b9caa0..16e871fb272 100644 --- a/test/core/client_channel/lb_policy/static_stride_scheduler_test.cc +++ b/test/core/client_channel/lb_policy/static_stride_scheduler_test.cc @@ -14,7 +14,7 @@ // limitations under the License. // -#include "src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h" +#include "src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h" #include #include diff --git a/test/core/client_channel/lb_policy/weighted_round_robin_test.cc b/test/core/client_channel/lb_policy/weighted_round_robin_test.cc index a3efc6d62e2..489e9a9eadf 100644 --- a/test/core/client_channel/lb_policy/weighted_round_robin_test.cc +++ b/test/core/client_channel/lb_policy/weighted_round_robin_test.cc @@ -40,7 +40,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/lib/experiments/experiments.h" #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/orphanable.h" @@ -48,8 +47,9 @@ #include "src/core/lib/gprpp/time.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/backend_metric_data.h" +#include "src/core/load_balancing/lb_policy.h" #include "test/core/client_channel/lb_policy/lb_policy_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc b/test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc index fcf77ef8674..0a6ff47767c 100644 --- a/test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc +++ b/test/core/client_channel/lb_policy/xds_override_host_lb_config_parser_test.cc @@ -23,12 +23,12 @@ #include #include "src/core/ext/filters/client_channel/client_channel_service_config.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h" #include "src/core/ext/xds/xds_health_status.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/service_config/service_config.h" #include "src/core/lib/service_config/service_config_impl.h" +#include "src/core/load_balancing/xds/xds_override_host.h" #include "test/core/util/test_config.h" namespace grpc_core { diff --git a/test/core/client_channel/lb_policy/xds_override_host_test.cc b/test/core/client_channel/lb_policy/xds_override_host_test.cc index a255d5639fe..e634ccee399 100644 --- a/test/core/client_channel/lb_policy/xds_override_host_test.cc +++ b/test/core/client_channel/lb_policy/xds_override_host_test.cc @@ -45,8 +45,8 @@ #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/lb_policy.h" #include "test/core/client_channel/lb_policy/lb_policy_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/tests/retry_lb_drop.cc b/test/core/end2end/tests/retry_lb_drop.cc index b711a9aa0b1..8ebe2eac5ce 100644 --- a/test/core/end2end/tests/retry_lb_drop.cc +++ b/test/core/end2end/tests/retry_lb_drop.cc @@ -35,8 +35,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/time.h" #include "src/core/lib/json/json.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/util/test_lb_policies.h" diff --git a/test/core/promise/observable_test.cc b/test/core/promise/observable_test.cc index 09abca0b11a..48f52b4978c 100644 --- a/test/core/promise/observable_test.cc +++ b/test/core/promise/observable_test.cc @@ -129,6 +129,21 @@ TEST(ObservableTest, ChangeValueWakesUp) { EXPECT_THAT(next(), IsReady(2)); } +TEST(ObservableTest, NextWhen) { + StrictMock activity; + activity.Activate(); + Observable observable(1); + auto next = observable.NextWhen([](int i) { return i == 3; }); + EXPECT_THAT(next(), IsPending()); + EXPECT_CALL(activity, WakeupRequested()); + observable.Set(2); + EXPECT_THAT(next(), IsPending()); + EXPECT_CALL(activity, WakeupRequested()); + observable.Set(3); + Mock::VerifyAndClearExpectations(&activity); + EXPECT_THAT(next(), IsReady(3)); +} + TEST(ObservableTest, MultipleActivitiesWakeUp) { StrictMock activity1; StrictMock activity2; diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc index 59f912df13a..0f4f6908e8e 100644 --- a/test/core/util/test_lb_policies.cc +++ b/test/core/util/test_lb_policies.cc @@ -29,7 +29,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" #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" @@ -42,12 +41,13 @@ #include "src/core/lib/iomgr/resolved_address.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_util.h" -#include "src/core/lib/load_balancing/delegating_helper.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" -#include "src/core/lib/load_balancing/lb_policy_registry.h" -#include "src/core/lib/load_balancing/subchannel_interface.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" namespace grpc_core { diff --git a/test/core/util/test_lb_policies.h b/test/core/util/test_lb_policies.h index 90e6256b89c..842b4100d06 100644 --- a/test/core/util/test_lb_policies.h +++ b/test/core/util/test_lb_policies.h @@ -28,9 +28,9 @@ #include "absl/status/status.h" #include "absl/strings/string_view.h" -#include "src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h" #include "src/core/lib/config/core_configuration.h" #include "src/core/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/backend_metric_data.h" namespace grpc_core { diff --git a/test/core/xds/xds_cluster_resource_type_test.cc b/test/core/xds/xds_cluster_resource_type_test.cc index d59690dfe18..af8795e00fc 100644 --- a/test/core/xds/xds_cluster_resource_type_test.cc +++ b/test/core/xds/xds_cluster_resource_type_test.cc @@ -35,7 +35,6 @@ #include -#include "src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h" #include "src/core/ext/xds/xds_bootstrap.h" #include "src/core/ext/xds/xds_bootstrap_grpc.h" #include "src/core/ext/xds/xds_client.h" @@ -50,6 +49,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/json/json.h" #include "src/core/lib/json/json_writer.h" +#include "src/core/load_balancing/outlier_detection/outlier_detection.h" #include "src/proto/grpc/testing/xds/v3/address.pb.h" #include "src/proto/grpc/testing/xds/v3/aggregate_cluster.pb.h" #include "src/proto/grpc/testing/xds/v3/base.pb.h" diff --git a/test/core/xds/xds_lb_policy_registry_test.cc b/test/core/xds/xds_lb_policy_registry_test.cc index 4da93246e3b..ad2230c0cf8 100644 --- a/test/core/xds/xds_lb_policy_registry_test.cc +++ b/test/core/xds/xds_lb_policy_registry_test.cc @@ -41,8 +41,8 @@ #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/validation_errors.h" #include "src/core/lib/json/json_writer.h" -#include "src/core/lib/load_balancing/lb_policy.h" -#include "src/core/lib/load_balancing/lb_policy_factory.h" +#include "src/core/load_balancing/lb_policy.h" +#include "src/core/load_balancing/lb_policy_factory.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" #include "src/proto/grpc/testing/xds/v3/extension.pb.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 28f7a8a79a3..334b187458c 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 @@ -37,7 +37,6 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" @@ -47,6 +46,7 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/service_config/service_config_impl.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 1d3c865cdb5..2b051aae008 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -43,8 +43,6 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/channel/channel_args.h" @@ -58,6 +56,8 @@ #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/service_config/service_config_impl.h" +#include "src/core/load_balancing/grpclb/grpclb.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h" 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 0502d8b7a16..f4f4f5a00d4 100644 --- a/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_cluster_type_end2end_test.cc @@ -24,12 +24,12 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.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/lib/resolver/endpoint_addresses.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/proto/grpc/testing/xds/v3/aggregate_cluster.grpc.pb.h" #include "test/core/util/resolve_localhost_ip46.h" #include "test/core/util/scoped_env_var.h" diff --git a/test/cpp/end2end/xds/xds_end2end_test.cc b/test/cpp/end2end/xds/xds_end2end_test.cc index b66416061d7..b6dde40a810 100644 --- a/test/cpp/end2end/xds/xds_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_end2end_test.cc @@ -56,7 +56,6 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/ext/xds/xds_api.h" @@ -84,6 +83,7 @@ #include "src/core/lib/security/certificate_provider/certificate_provider_registry.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h" +#include "src/core/load_balancing/xds/xds_channel_args.h" #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" #include "src/proto/grpc/testing/echo.grpc.pb.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 825642f7195..4e1eca12ff1 100644 --- a/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_pick_first_end2end_test.cc @@ -30,11 +30,11 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.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/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/pick_first.pb.h" #include "test/core/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 9ad79d1507f..6ce5076be59 100644 --- a/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc +++ b/test/cpp/end2end/xds/xds_ring_hash_end2end_test.cc @@ -25,11 +25,11 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" -#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.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/proto/grpc/testing/xds/v3/aggregate_cluster.grpc.pb.h" #include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h" #include "test/core/util/resolve_localhost_ip46.h" diff --git a/test/cpp/ext/csm/metadata_exchange_test.cc b/test/cpp/ext/csm/metadata_exchange_test.cc index a0a61a00033..a402d4d67ad 100644 --- a/test/cpp/ext/csm/metadata_exchange_test.cc +++ b/test/cpp/ext/csm/metadata_exchange_test.cc @@ -121,6 +121,33 @@ class TestScenario { XdsBootstrapSource bootstrap_source_; }; +// A PluginOption that injects `ServiceMeshLabelsInjector`. (This is different +// from CsmOpenTelemetryPluginOption since it does not restrict itself to just +// CSM channels and servers.) +class MeshLabelsPluginOption + : public grpc::internal::InternalOpenTelemetryPluginOption { + public: + explicit MeshLabelsPluginOption( + const opentelemetry::sdk::common::AttributeMap& map) + : labels_injector_( + std::make_unique(map)) {} + + bool IsActiveOnClientChannel(absl::string_view /*target*/) const override { + return true; + } + + bool IsActiveOnServer(const grpc_core::ChannelArgs& /*args*/) const override { + return true; + } + + const grpc::internal::LabelsInjector* labels_injector() const override { + return labels_injector_.get(); + } + + private: + std::unique_ptr labels_injector_; +}; + class MetadataExchangeTest : public OpenTelemetryPluginEnd2EndTest, public ::testing::WithParamInterface { @@ -149,9 +176,8 @@ class MetadataExchangeTest OpenTelemetryPluginEnd2EndTest::Init(std::move( Options() .set_metric_names(std::move(metric_names)) - .set_labels_injector( - std::make_unique( - GetParam().GetTestResource().GetAttributes())) + .add_plugin_option(std::make_unique( + GetParam().GetTestResource().GetAttributes())) .set_labels_to_inject(std::move(labels_to_inject)) .set_target_selector( [enable_client_side_injector](absl::string_view /*target*/) { diff --git a/test/cpp/ext/otel/otel_plugin_test.cc b/test/cpp/ext/otel/otel_plugin_test.cc index ff5f9f7e2ed..20aa27f64d1 100644 --- a/test/cpp/ext/otel/otel_plugin_test.cc +++ b/test/cpp/ext/otel/otel_plugin_test.cc @@ -775,19 +775,15 @@ class CustomPluginOption }; TEST_F(OpenTelemetryPluginOptionEnd2EndTest, Basic) { - std::vector< - std::unique_ptr> - plugin_option_list; - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ true, /*enabled_on_server*/ true, - std::make_pair("key", "value"))); Init( std::move(Options() .set_metric_names({grpc::OpenTelemetryPluginBuilder:: kClientAttemptDurationInstrumentName, grpc::OpenTelemetryPluginBuilder:: kServerCallDurationInstrumentName}) - .set_plugin_options(std::move(plugin_option_list)))); + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ true, /*enabled_on_server*/ true, + std::make_pair("key", "value"))))); SendRPC(); auto data = ReadCurrentMetricsData( [&](const absl::flat_hash_map< @@ -812,19 +808,15 @@ TEST_F(OpenTelemetryPluginOptionEnd2EndTest, Basic) { } TEST_F(OpenTelemetryPluginOptionEnd2EndTest, ClientOnlyPluginOption) { - std::vector< - std::unique_ptr> - plugin_option_list; - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ true, /*enabled_on_server*/ false, - std::make_pair("key", "value"))); Init( std::move(Options() .set_metric_names({grpc::OpenTelemetryPluginBuilder:: kClientAttemptDurationInstrumentName, grpc::OpenTelemetryPluginBuilder:: kServerCallDurationInstrumentName}) - .set_plugin_options(std::move(plugin_option_list)))); + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ true, /*enabled_on_server*/ false, + std::make_pair("key", "value"))))); SendRPC(); auto data = ReadCurrentMetricsData( [&](const absl::flat_hash_map< @@ -850,19 +842,15 @@ TEST_F(OpenTelemetryPluginOptionEnd2EndTest, ClientOnlyPluginOption) { } TEST_F(OpenTelemetryPluginOptionEnd2EndTest, ServerOnlyPluginOption) { - std::vector< - std::unique_ptr> - plugin_option_list; - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ false, /*enabled_on_server*/ true, - std::make_pair("key", "value"))); Init( std::move(Options() .set_metric_names({grpc::OpenTelemetryPluginBuilder:: kClientAttemptDurationInstrumentName, grpc::OpenTelemetryPluginBuilder:: kServerCallDurationInstrumentName}) - .set_plugin_options(std::move(plugin_option_list)))); + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ false, /*enabled_on_server*/ true, + std::make_pair("key", "value"))))); SendRPC(); auto data = ReadCurrentMetricsData( [&](const absl::flat_hash_map< @@ -889,32 +877,27 @@ TEST_F(OpenTelemetryPluginOptionEnd2EndTest, ServerOnlyPluginOption) { TEST_F(OpenTelemetryPluginOptionEnd2EndTest, MultipleEnabledAndDisabledPluginOptions) { - std::vector< - std::unique_ptr> - plugin_option_list; - plugin_option_list.reserve(5); - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ true, /*enabled_on_server*/ true, - std::make_pair("key1", "value1"))); - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ true, /*enabled_on_server*/ false, - std::make_pair("key2", "value2"))); - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ true, /*enabled_on_server*/ false, - std::make_pair("key3", "value3"))); - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ false, /*enabled_on_server*/ true, - std::make_pair("key4", "value4"))); - plugin_option_list.emplace_back(std::make_unique( - /*enabled_on_client*/ false, /*enabled_on_server*/ true, - std::make_pair("key5", "value5"))); Init( std::move(Options() .set_metric_names({grpc::OpenTelemetryPluginBuilder:: kClientAttemptDurationInstrumentName, grpc::OpenTelemetryPluginBuilder:: kServerCallDurationInstrumentName}) - .set_plugin_options(std::move(plugin_option_list)))); + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ true, /*enabled_on_server*/ true, + std::make_pair("key1", "value1"))) + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ true, /*enabled_on_server*/ false, + std::make_pair("key2", "value2"))) + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ true, /*enabled_on_server*/ false, + std::make_pair("key3", "value3"))) + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ false, /*enabled_on_server*/ true, + std::make_pair("key4", "value4"))) + .add_plugin_option(std::make_unique( + /*enabled_on_client*/ false, /*enabled_on_server*/ true, + std::make_pair("key5", "value5"))))); SendRPC(); auto data = ReadCurrentMetricsData( [&](const absl::flat_hash_map< diff --git a/test/cpp/ext/otel/otel_test_library.cc b/test/cpp/ext/otel/otel_test_library.cc index 1daeca3b928..6017b58f3c5 100644 --- a/test/cpp/ext/otel/otel_test_library.cc +++ b/test/cpp/ext/otel/otel_test_library.cc @@ -105,7 +105,6 @@ void OpenTelemetryPluginEnd2EndTest::Init(Options config) { meter_provider->AddMetricReader(reader_); ot_builder.SetMeterProvider(std::move(meter_provider)); } - ot_builder.SetLabelsInjector(std::move(config.labels_injector)); ot_builder.SetTargetSelector(std::move(config.target_selector)); ot_builder.SetServerSelector(std::move(config.server_selector)); ot_builder.SetTargetAttributeFilter( diff --git a/test/cpp/ext/otel/otel_test_library.h b/test/cpp/ext/otel/otel_test_library.h index 6c90b3d3c17..303babe2d99 100644 --- a/test/cpp/ext/otel/otel_test_library.h +++ b/test/cpp/ext/otel/otel_test_library.h @@ -68,12 +68,6 @@ class OpenTelemetryPluginEnd2EndTest : public ::testing::Test { return *this; } - Options& set_labels_injector( - std::unique_ptr injector) { - labels_injector = std::move(injector); - return *this; - } - Options& set_use_meter_provider(bool flag) { use_meter_provider = flag; return *this; @@ -111,11 +105,10 @@ class OpenTelemetryPluginEnd2EndTest : public ::testing::Test { return *this; } - Options& set_plugin_options( - std::vector< - std::unique_ptr> - options) { - plugin_options = std::move(options); + Options& add_plugin_option( + std::unique_ptr + option) { + plugin_options.push_back(std::move(option)); return *this; } diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index aba646ec55b..44401c290f0 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -24,9 +24,9 @@ #include #include -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/address_utils/sockaddr_utils.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/load_balancing/grpclb/load_balancer_api.h" #include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version #include "test/core/util/test_config.h" diff --git a/test/cpp/interop/backend_metrics_lb_policy.cc b/test/cpp/interop/backend_metrics_lb_policy.cc index 30f3bb18943..cbe64559c72 100644 --- a/test/cpp/interop/backend_metrics_lb_policy.cc +++ b/test/cpp/interop/backend_metrics_lb_policy.cc @@ -22,9 +22,9 @@ #include "absl/strings/str_format.h" -#include "src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h" #include "src/core/lib/iomgr/pollset_set.h" -#include "src/core/lib/load_balancing/delegating_helper.h" +#include "src/core/load_balancing/delegating_helper.h" +#include "src/core/load_balancing/oob_backend_metric.h" namespace grpc { namespace testing { diff --git a/test/cpp/interop/rpc_behavior_lb_policy.cc b/test/cpp/interop/rpc_behavior_lb_policy.cc index 5067038bc51..9a7398789f6 100644 --- a/test/cpp/interop/rpc_behavior_lb_policy.cc +++ b/test/cpp/interop/rpc_behavior_lb_policy.cc @@ -25,7 +25,7 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/json/json_args.h" #include "src/core/lib/json/json_object_loader.h" -#include "src/core/lib/load_balancing/delegating_helper.h" +#include "src/core/load_balancing/delegating_helper.h" namespace grpc { namespace testing { diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index 96dcfedf039..6505c0b0977 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -41,7 +41,6 @@ #include #include "src/core/ext/filters/client_channel/client_channel.h" -#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/lib/address_utils/parse_address.h" #include "src/core/lib/address_utils/sockaddr_utils.h" @@ -62,6 +61,7 @@ #include "src/core/lib/resolver/endpoint_addresses.h" #include "src/core/lib/resolver/resolver.h" #include "src/core/lib/resolver/resolver_registry.h" +#include "src/core/load_balancing/grpclb/grpclb_balancer_addresses.h" #include "test/core/util/fake_udp_and_tcp_server.h" #include "test/core/util/port.h" #include "test/core/util/socket_use_after_close_detector.h" diff --git a/third_party/utf8_range/.github/workflows/bazel_tests.yml b/third_party/utf8_range/.github/workflows/bazel_tests.yml index ae3e970419c..adf711859aa 100644 --- a/third_party/utf8_range/.github/workflows/bazel_tests.yml +++ b/third_party/utf8_range/.github/workflows/bazel_tests.yml @@ -29,8 +29,15 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup Bazel + run: | + echo "BAZEL=bazel" >> $GITHUB_ENV + echo "USE_BAZEL_VERSION=5.1.1" >> $GITHUB_ENV + - name: Setup Bazel (macOS) + if: runner.os == 'macOS' + run: echo "BAZEL=bazelisk" >> $GITHUB_ENV - name: Install dependencies run: sudo apt update && sudo apt install -y ${{ matrix.install }} if: matrix.install != '' - name: Run tests - run: cd ${{ github.workspace }} && CC=${{ matrix.CC }} bazel test --test_output=errors ... ${{ matrix.flags }} + run: cd ${{ github.workspace }} && CC=${{ matrix.CC }} ${{ env.BAZEL }} test --test_output=errors ... ${{ matrix.flags }} diff --git a/third_party/utf8_range/BUILD.bazel b/third_party/utf8_range/BUILD.bazel index 8582f1bdc48..b9ba04e17c6 100644 --- a/third_party/utf8_range/BUILD.bazel +++ b/third_party/utf8_range/BUILD.bazel @@ -4,6 +4,12 @@ # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. +DEFAULT_VISIBILITY = [ + "//third_party/protobuf:__subpackages__", + "//:__subpackages__", + "//util/utf8/internal:__subpackages__", +] + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) @@ -21,6 +27,7 @@ filegroup( ], visibility = [ "@com_google_protobuf//:__subpackages__", + "@upb//:__subpackages__", ], ) diff --git a/third_party/utf8_range/CMakeLists.txt b/third_party/utf8_range/CMakeLists.txt index 69a4d899077..344952d38cf 100644 --- a/third_party/utf8_range/CMakeLists.txt +++ b/third_party/utf8_range/CMakeLists.txt @@ -73,6 +73,11 @@ if (utf8_range_ENABLE_INSTALL) install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/utf8_range.pc.cmake + ${CMAKE_CURRENT_BINARY_DIR}/utf8_range.pc @ONLY) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/utf8_range.pc + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") # Install public headers explicitly. install(FILES utf8_range.h utf8_validity.h diff --git a/third_party/utf8_range/cmake/utf8_range.pc.cmake b/third_party/utf8_range/cmake/utf8_range.pc.cmake new file mode 100644 index 00000000000..64b4b770b29 --- /dev/null +++ b/third_party/utf8_range/cmake/utf8_range.pc.cmake @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: UTF8 Range +Description: Google's UTF8 Library +Version: 1.0 +Requires: absl_strings +Libs: -L${libdir} -lutf8_validity -lutf8_range @CMAKE_THREAD_LIBS_INIT@ +Cflags: -I${includedir} diff --git a/third_party/utf8_range/utf8_validity.cc b/third_party/utf8_range/utf8_validity.cc index db811993f81..9e945766732 100644 --- a/third_party/utf8_range/utf8_validity.cc +++ b/third_party/utf8_range/utf8_validity.cc @@ -133,6 +133,7 @@ size_t ValidUTF8Span(const char* data, const char* end) { return err_pos + (1 - ReturnPosition); } +#ifdef __SSE4_1__ /* Returns the number of bytes needed to skip backwards to get to the first byte of codepoint. */ @@ -148,6 +149,7 @@ inline int CodepointSkipBackwards(int32_t codepoint_word) { } return 0; } +#endif // __SSE4_1__ /* Skipping over ASCII as much as possible, per 8 bytes. It is intentional as most strings to check for validity consist only of 1 byte codepoints. diff --git a/tools/bazelify_tests/dockerimage_current_versions.bzl b/tools/bazelify_tests/dockerimage_current_versions.bzl index 1d4696194d1..638fdcaada4 100644 --- a/tools/bazelify_tests/dockerimage_current_versions.bzl +++ b/tools/bazelify_tests/dockerimage_current_versions.bzl @@ -57,7 +57,10 @@ DOCKERIMAGE_CURRENT_VERSIONS = { "tools/dockerfile/distribtest/ruby_centos7_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_centos7_x64@sha256:4d529b984b78ca179086f7f9b416605e2d9a96ca0a28a71f4421bb5ffdc18f96", "tools/dockerfile/distribtest/ruby_debian10_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64@sha256:1298c39c950b2a48261555b6cff1ae66230a5020f100d3b381759285f0caf84e", "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_2_7.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_2_7@sha256:5ee26ad3abe2683c9a8ee03987ab0ae63f50793c3d3f5e4be6e6cbacb4556fcf", - "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0@sha256:9190da90a2a95eca1370cef64dcba7ddee9f59cc7487093da6711c1280a0b0f9", + "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0@sha256:be9dfa852af7fe5c700747bbad5b93d15c3f030ac980a107e98fc9b70fee6077", + "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_1@sha256:282a052275fa9e0378301d759f5febcc9f1ff0ebb702e536690cd4fed1a43904", + "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_2@sha256:f1ba9030d7d7496a6ed42c0e1a9a2fe3204208e94983d7d4b6b4c7752042ed28", + "tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_3@sha256:a26d6bfe8f799ae817db0bd0280283c2cc9ea0f02174fe9a2cb0cd10d71d81f8", "tools/dockerfile/distribtest/ruby_ubuntu2004_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2004_x64@sha256:426cbf625df0c0e7451b9716041996dc6a35a3788c1a24d68891256f84733d8e", "tools/dockerfile/distribtest/ruby_ubuntu2204_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_ubuntu2204_x64@sha256:1c74c312f8a4ab37e629732a35daa3056e12136b90f37540cdf9fa11303c7eb8", "tools/dockerfile/grpc_artifact_centos6_x64.current_version": "docker://us-docker.pkg.dev/grpc-testing/testing-images-public/grpc_artifact_centos6_x64@sha256:3285047265ea2b7c5d4df4c769b2d05f56288d947c75e16d27ae2dee693f791b", diff --git a/tools/buildgen/extract_metadata_from_bazel_xml.py b/tools/buildgen/extract_metadata_from_bazel_xml.py index 2a289c5e2bb..23c41909ff4 100755 --- a/tools/buildgen/extract_metadata_from_bazel_xml.py +++ b/tools/buildgen/extract_metadata_from_bazel_xml.py @@ -99,11 +99,13 @@ EXTERNAL_PROTO_LIBRARIES = { # For that we need mapping from external repo name to a corresponding # path to a git submodule. EXTERNAL_SOURCE_PREFIXES = { - "@utf8_range": "third_party/utf8_range", - "@com_googlesource_code_re2": "third_party/re2", - "@com_google_googletest": "third_party/googletest", - "@com_google_protobuf": "third_party/upb", - "@zlib": "third_party/zlib", + # TODO(veblush): Remove @utf8_range// item once protobuf is upgraded to 26.x + "@utf8_range//": "third_party/utf8_range", + "@com_googlesource_code_re2//": "third_party/re2", + "@com_google_googletest//": "third_party/googletest", + "@com_google_protobuf//upb": "third_party/upb/upb", + "@com_google_protobuf//third_party/utf8_range": "third_party/utf8_range", + "@zlib//": "third_party/zlib", } @@ -209,9 +211,9 @@ def _try_extract_source_file_path(label: str) -> str: # This is an external source file. We are only interested in sources # for some of the external libraries. for lib_name, prefix in EXTERNAL_SOURCE_PREFIXES.items(): - if label.startswith(lib_name + "//"): + if label.startswith(lib_name): return ( - label.replace("%s//" % lib_name, prefix + "/") + label.replace("%s" % lib_name, prefix) .replace(":", "/") .replace("//", "/") ) @@ -1100,7 +1102,7 @@ _BUILD_EXTRA_METADATA = { "build": "all", "_RENAME": "upb_textformat_lib", }, - "@utf8_range//:utf8_range": { + "@com_google_protobuf//third_party/utf8_range:utf8_range": { "language": "c", "build": "all", # rename to utf8_range_lib is necessary for now to avoid clash with utf8_range target in protobuf's cmake @@ -1400,6 +1402,15 @@ tests = _exclude_unwanted_cc_tests(_extract_cc_tests(bazel_rules)) # only very little "extra metadata" would be needed and/or it would be trivial # to generate it automatically. all_extra_metadata = {} +# TODO(veblush): Remove this workaround once protobuf is upgraded to 26.x +if "@com_google_protobuf//third_party/utf8_range:utf8_range" not in bazel_rules: + md = _BUILD_EXTRA_METADATA[ + "@com_google_protobuf//third_party/utf8_range:utf8_range" + ] + del _BUILD_EXTRA_METADATA[ + "@com_google_protobuf//third_party/utf8_range:utf8_range" + ] + _BUILD_EXTRA_METADATA["@utf8_range//:utf8_range"] = md all_extra_metadata.update(_BUILD_EXTRA_METADATA) all_extra_metadata.update( _generate_build_extra_metadata_for_tests(tests, bazel_rules) diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py index bc2b8c0276b..2d39d162059 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py @@ -45,14 +45,16 @@ def _get_resource_file_name( package_or_requirement: str, resource_name: str ) -> str: """Obtain the filename for a resource on the file system.""" + file_name = None if sys.version_info >= (3, 9, 0): - return ( + file_name = ( resources.files(package_or_requirement) / resource_name ).resolve() else: - return pkg_resources.resource_filename( + file_name = pkg_resources.resource_filename( package_or_requirement, resource_name ) + return str(file_name) # NOTE(rbellevi): importlib.abc is not supported on 3.4. diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version index 1f83abbda4d..709c65daebb 100644 --- a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0.current_version @@ -1 +1 @@ -us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0:c277dbca7dbd28ff6112cbc842ba3144c49266bd@sha256:9190da90a2a95eca1370cef64dcba7ddee9f59cc7487093da6711c1280a0b0f9 \ No newline at end of file +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_0:dce91a018316b35b962e5fa576fded4775457077@sha256:be9dfa852af7fe5c700747bbad5b93d15c3f030ac980a107e98fc9b70fee6077 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile index 1ca6d03190d..639bd90158c 100644 --- a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_0/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2020 gRPC authors. +# Copyright 2024 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,29 +14,71 @@ FROM debian:10 -# Install Git and basic packages. +#================= +# Basic C core dependencies + +# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md +RUN apt-get update && apt-get install -y \ + build-essential \ + autoconf \ + libtool \ + pkg-config \ + && apt-get clean + +# GCC +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + && apt-get clean + +# libc6 RUN apt-get update && apt-get install -y \ - gnupg2 \ - procps \ + libc6 \ + libc6-dbg \ + libc6-dev \ + && apt-get clean + +# Tools +RUN apt-get update && apt-get install -y \ + bzip2 \ curl \ - gcc && apt-get clean + dnsutils \ + git \ + lcov \ + make \ + strace \ + time \ + unzip \ + wget \ + zip \ + && apt-get clean + +#================= +# Setup git to access working directory across docker boundary. +# This avoids the "fatal: detected dubious ownership in repository XYZ" +# git error. + +RUN git config --global --add safe.directory '*' +RUN git config --global protocol.file.allow always + #================== # Ruby dependencies # Install rvm -RUN gpg2 --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB RUN \curl -sSL https://get.rvm.io | bash -s stable # Install Ruby 3.0 -RUN /bin/bash -l -c "rvm install ruby-3.0.0" -RUN /bin/bash -l -c "rvm use --default ruby-3.0.0" +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.0.5" +RUN /bin/bash -l -c "rvm use --default ruby-3.0.5" RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" -RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.0' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.0.5' >> ~/.bashrc" RUN /bin/bash -l -c "gem install bundler --no-document" -RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1.current_version b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1.current_version new file mode 100644 index 00000000000..4995cf042c1 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_1:348a4b975f4d19772bb9a1a95fc03720f89edbc0@sha256:282a052275fa9e0378301d759f5febcc9f1ff0ebb702e536690cd4fed1a43904 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile new file mode 100644 index 00000000000..314b0d889fb --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_1/Dockerfile @@ -0,0 +1,84 @@ +# 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. + +FROM debian:10 + +#================= +# Basic C core dependencies + +# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md +RUN apt-get update && apt-get install -y \ + build-essential \ + autoconf \ + libtool \ + pkg-config \ + && apt-get clean + +# GCC +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + && apt-get clean + +# libc6 +RUN apt-get update && apt-get install -y \ + libc6 \ + libc6-dbg \ + libc6-dev \ + && apt-get clean + +# Tools +RUN apt-get update && apt-get install -y \ + bzip2 \ + curl \ + dnsutils \ + git \ + lcov \ + make \ + strace \ + time \ + unzip \ + wget \ + zip \ + && apt-get clean + +#================= +# Setup git to access working directory across docker boundary. +# This avoids the "fatal: detected dubious ownership in repository XYZ" +# git error. + +RUN git config --global --add safe.directory '*' +RUN git config --global protocol.file.allow always + + +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.1 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.1.3" +RUN /bin/bash -l -c "rvm use --default ruby-3.1.3" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.1.3' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" + + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2.current_version b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2.current_version new file mode 100644 index 00000000000..f17c0cea7c5 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_2:e9f8640c6bb80a029c65ed6ebdfddd9574a041e4@sha256:f1ba9030d7d7496a6ed42c0e1a9a2fe3204208e94983d7d4b6b4c7752042ed28 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile new file mode 100644 index 00000000000..546acc6d0d3 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_2/Dockerfile @@ -0,0 +1,84 @@ +# 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. + +FROM debian:10 + +#================= +# Basic C core dependencies + +# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md +RUN apt-get update && apt-get install -y \ + build-essential \ + autoconf \ + libtool \ + pkg-config \ + && apt-get clean + +# GCC +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + && apt-get clean + +# libc6 +RUN apt-get update && apt-get install -y \ + libc6 \ + libc6-dbg \ + libc6-dev \ + && apt-get clean + +# Tools +RUN apt-get update && apt-get install -y \ + bzip2 \ + curl \ + dnsutils \ + git \ + lcov \ + make \ + strace \ + time \ + unzip \ + wget \ + zip \ + && apt-get clean + +#================= +# Setup git to access working directory across docker boundary. +# This avoids the "fatal: detected dubious ownership in repository XYZ" +# git error. + +RUN git config --global --add safe.directory '*' +RUN git config --global protocol.file.allow always + + +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.2 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.2.0" +RUN /bin/bash -l -c "rvm use --default ruby-3.2.0" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" + + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3.current_version b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3.current_version new file mode 100644 index 00000000000..bbe14a70714 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3.current_version @@ -0,0 +1 @@ +us-docker.pkg.dev/grpc-testing/testing-images-public/ruby_debian10_x64_ruby_3_3:c063f13c0987355593ce6bcf2123bb9717eeba35@sha256:a26d6bfe8f799ae817db0bd0280283c2cc9ea0f02174fe9a2cb0cd10d71d81f8 \ No newline at end of file diff --git a/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile new file mode 100644 index 00000000000..f7f27b649f7 --- /dev/null +++ b/tools/dockerfile/distribtest/ruby_debian10_x64_ruby_3_3/Dockerfile @@ -0,0 +1,84 @@ +# 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. + +FROM debian:10 + +#================= +# Basic C core dependencies + +# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md +RUN apt-get update && apt-get install -y \ + build-essential \ + autoconf \ + libtool \ + pkg-config \ + && apt-get clean + +# GCC +RUN apt-get update && apt-get install -y \ + gcc \ + g++ \ + && apt-get clean + +# libc6 +RUN apt-get update && apt-get install -y \ + libc6 \ + libc6-dbg \ + libc6-dev \ + && apt-get clean + +# Tools +RUN apt-get update && apt-get install -y \ + bzip2 \ + curl \ + dnsutils \ + git \ + lcov \ + make \ + strace \ + time \ + unzip \ + wget \ + zip \ + && apt-get clean + +#================= +# Setup git to access working directory across docker boundary. +# This avoids the "fatal: detected dubious ownership in repository XYZ" +# git error. + +RUN git config --global --add safe.directory '*' +RUN git config --global protocol.file.allow always + + +#================== +# Ruby dependencies + +# Install rvm +RUN apt-get update && apt-get install -y gnupg2 && apt-get clean +RUN gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 3.3 +RUN apt-get update && apt-get install -y procps && apt-get clean +RUN /bin/bash -l -c "rvm install ruby-3.3.0" +RUN /bin/bash -l -c "rvm use --default ruby-3.3.0" +RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.3.0' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-document" + + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 96fb2237f1c..ef654434917 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -52,6 +52,7 @@ do -and -not -name grpc_tls_credentials_options_comparator_test.cc \ -and -not -path '*/cmake/build/*' \ -and -not -path '*/third_party/*' \ + -and -not -path '*/src/python/grpcio_observability/grpc_root/*' \ `" done done diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 72c4c872253..70c8d9c1a39 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1115,50 +1115,6 @@ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.h \ src/core/ext/filters/client_channel/http_proxy_mapper.cc \ src/core/ext/filters/client_channel/http_proxy_mapper.h \ -src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ -src/core/ext/filters/client_channel/lb_policy/address_filtering.h \ -src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h \ -src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc \ -src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h \ -src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc \ -src/core/ext/filters/client_channel/lb_policy/endpoint_list.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \ -src/core/ext/filters/client_channel/lb_policy/health_check_client.cc \ -src/core/ext/filters/client_channel/lb_policy/health_check_client.h \ -src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h \ -src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc \ -src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h \ -src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ -src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h \ -src/core/ext/filters/client_channel/lb_policy/priority/priority.cc \ -src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc \ -src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h \ -src/core/ext/filters/client_channel/lb_policy/rls/rls.cc \ -src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ -src/core/ext/filters/client_channel/lb_policy/subchannel_list.h \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc \ -src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/cds.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.h \ src/core/ext/filters/client_channel/resolver/binder/binder_resolver.cc \ @@ -2650,13 +2606,6 @@ src/core/lib/json/json_util.cc \ src/core/lib/json/json_util.h \ src/core/lib/json/json_writer.cc \ src/core/lib/json/json_writer.h \ -src/core/lib/load_balancing/delegating_helper.h \ -src/core/lib/load_balancing/lb_policy.cc \ -src/core/lib/load_balancing/lb_policy.h \ -src/core/lib/load_balancing/lb_policy_factory.h \ -src/core/lib/load_balancing/lb_policy_registry.cc \ -src/core/lib/load_balancing/lb_policy_registry.h \ -src/core/lib/load_balancing/subchannel_interface.h \ src/core/lib/matchers/matchers.cc \ src/core/lib/matchers/matchers.h \ src/core/lib/promise/activity.cc \ @@ -2945,6 +2894,57 @@ 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 \ +src/core/load_balancing/child_policy_handler.cc \ +src/core/load_balancing/child_policy_handler.h \ +src/core/load_balancing/delegating_helper.h \ +src/core/load_balancing/endpoint_list.cc \ +src/core/load_balancing/endpoint_list.h \ +src/core/load_balancing/grpclb/client_load_reporting_filter.cc \ +src/core/load_balancing/grpclb/client_load_reporting_filter.h \ +src/core/load_balancing/grpclb/grpclb.cc \ +src/core/load_balancing/grpclb/grpclb.h \ +src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc \ +src/core/load_balancing/grpclb/grpclb_balancer_addresses.h \ +src/core/load_balancing/grpclb/grpclb_client_stats.cc \ +src/core/load_balancing/grpclb/grpclb_client_stats.h \ +src/core/load_balancing/grpclb/load_balancer_api.cc \ +src/core/load_balancing/grpclb/load_balancer_api.h \ +src/core/load_balancing/health_check_client.cc \ +src/core/load_balancing/health_check_client.h \ +src/core/load_balancing/health_check_client_internal.h \ +src/core/load_balancing/lb_policy.cc \ +src/core/load_balancing/lb_policy.h \ +src/core/load_balancing/lb_policy_factory.h \ +src/core/load_balancing/lb_policy_registry.cc \ +src/core/load_balancing/lb_policy_registry.h \ +src/core/load_balancing/oob_backend_metric.cc \ +src/core/load_balancing/oob_backend_metric.h \ +src/core/load_balancing/oob_backend_metric_internal.h \ +src/core/load_balancing/outlier_detection/outlier_detection.cc \ +src/core/load_balancing/outlier_detection/outlier_detection.h \ +src/core/load_balancing/pick_first/pick_first.cc \ +src/core/load_balancing/pick_first/pick_first.h \ +src/core/load_balancing/priority/priority.cc \ +src/core/load_balancing/ring_hash/ring_hash.cc \ +src/core/load_balancing/ring_hash/ring_hash.h \ +src/core/load_balancing/rls/rls.cc \ +src/core/load_balancing/round_robin/round_robin.cc \ +src/core/load_balancing/subchannel_interface.h \ +src/core/load_balancing/subchannel_list.h \ +src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc \ +src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h \ +src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc \ +src/core/load_balancing/weighted_target/weighted_target.cc \ +src/core/load_balancing/xds/cds.cc \ +src/core/load_balancing/xds/xds_channel_args.h \ +src/core/load_balancing/xds/xds_cluster_impl.cc \ +src/core/load_balancing/xds/xds_cluster_manager.cc \ +src/core/load_balancing/xds/xds_override_host.cc \ +src/core/load_balancing/xds/xds_override_host.h \ +src/core/load_balancing/xds/xds_wrr_locality.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/plugin_registry/grpc_plugin_registry_extra.cc \ src/core/tsi/alts/crypt/aes_gcm.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a6963aa893d..022958293f7 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -920,50 +920,6 @@ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.h \ src/core/ext/filters/client_channel/http_proxy_mapper.cc \ src/core/ext/filters/client_channel/http_proxy_mapper.h \ -src/core/ext/filters/client_channel/lb_policy/address_filtering.cc \ -src/core/ext/filters/client_channel/lb_policy/address_filtering.h \ -src/core/ext/filters/client_channel/lb_policy/backend_metric_data.h \ -src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc \ -src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h \ -src/core/ext/filters/client_channel/lb_policy/endpoint_list.cc \ -src/core/ext/filters/client_channel/lb_policy/endpoint_list.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ -src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h \ -src/core/ext/filters/client_channel/lb_policy/health_check_client.cc \ -src/core/ext/filters/client_channel/lb_policy/health_check_client.h \ -src/core/ext/filters/client_channel/lb_policy/health_check_client_internal.h \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.cc \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric.h \ -src/core/ext/filters/client_channel/lb_policy/oob_backend_metric_internal.h \ -src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.cc \ -src/core/ext/filters/client_channel/lb_policy/outlier_detection/outlier_detection.h \ -src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ -src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.h \ -src/core/ext/filters/client_channel/lb_policy/priority/priority.cc \ -src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc \ -src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h \ -src/core/ext/filters/client_channel/lb_policy/rls/rls.cc \ -src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ -src/core/ext/filters/client_channel/lb_policy/subchannel_list.h \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.cc \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/static_stride_scheduler.h \ -src/core/ext/filters/client_channel/lb_policy/weighted_round_robin/weighted_round_robin.cc \ -src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/cds.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.cc \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_override_host.h \ -src/core/ext/filters/client_channel/lb_policy/xds/xds_wrr_locality.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.cc \ src/core/ext/filters/client_channel/local_subchannel_pool.h \ src/core/ext/filters/client_channel/resolver/README.md \ @@ -2429,13 +2385,6 @@ src/core/lib/json/json_util.cc \ src/core/lib/json/json_util.h \ src/core/lib/json/json_writer.cc \ src/core/lib/json/json_writer.h \ -src/core/lib/load_balancing/delegating_helper.h \ -src/core/lib/load_balancing/lb_policy.cc \ -src/core/lib/load_balancing/lb_policy.h \ -src/core/lib/load_balancing/lb_policy_factory.h \ -src/core/lib/load_balancing/lb_policy_registry.cc \ -src/core/lib/load_balancing/lb_policy_registry.h \ -src/core/lib/load_balancing/subchannel_interface.h \ src/core/lib/matchers/matchers.cc \ src/core/lib/matchers/matchers.h \ src/core/lib/promise/activity.cc \ @@ -2726,6 +2675,57 @@ 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 \ +src/core/load_balancing/child_policy_handler.cc \ +src/core/load_balancing/child_policy_handler.h \ +src/core/load_balancing/delegating_helper.h \ +src/core/load_balancing/endpoint_list.cc \ +src/core/load_balancing/endpoint_list.h \ +src/core/load_balancing/grpclb/client_load_reporting_filter.cc \ +src/core/load_balancing/grpclb/client_load_reporting_filter.h \ +src/core/load_balancing/grpclb/grpclb.cc \ +src/core/load_balancing/grpclb/grpclb.h \ +src/core/load_balancing/grpclb/grpclb_balancer_addresses.cc \ +src/core/load_balancing/grpclb/grpclb_balancer_addresses.h \ +src/core/load_balancing/grpclb/grpclb_client_stats.cc \ +src/core/load_balancing/grpclb/grpclb_client_stats.h \ +src/core/load_balancing/grpclb/load_balancer_api.cc \ +src/core/load_balancing/grpclb/load_balancer_api.h \ +src/core/load_balancing/health_check_client.cc \ +src/core/load_balancing/health_check_client.h \ +src/core/load_balancing/health_check_client_internal.h \ +src/core/load_balancing/lb_policy.cc \ +src/core/load_balancing/lb_policy.h \ +src/core/load_balancing/lb_policy_factory.h \ +src/core/load_balancing/lb_policy_registry.cc \ +src/core/load_balancing/lb_policy_registry.h \ +src/core/load_balancing/oob_backend_metric.cc \ +src/core/load_balancing/oob_backend_metric.h \ +src/core/load_balancing/oob_backend_metric_internal.h \ +src/core/load_balancing/outlier_detection/outlier_detection.cc \ +src/core/load_balancing/outlier_detection/outlier_detection.h \ +src/core/load_balancing/pick_first/pick_first.cc \ +src/core/load_balancing/pick_first/pick_first.h \ +src/core/load_balancing/priority/priority.cc \ +src/core/load_balancing/ring_hash/ring_hash.cc \ +src/core/load_balancing/ring_hash/ring_hash.h \ +src/core/load_balancing/rls/rls.cc \ +src/core/load_balancing/round_robin/round_robin.cc \ +src/core/load_balancing/subchannel_interface.h \ +src/core/load_balancing/subchannel_list.h \ +src/core/load_balancing/weighted_round_robin/static_stride_scheduler.cc \ +src/core/load_balancing/weighted_round_robin/static_stride_scheduler.h \ +src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc \ +src/core/load_balancing/weighted_target/weighted_target.cc \ +src/core/load_balancing/xds/cds.cc \ +src/core/load_balancing/xds/xds_channel_args.h \ +src/core/load_balancing/xds/xds_cluster_impl.cc \ +src/core/load_balancing/xds/xds_cluster_manager.cc \ +src/core/load_balancing/xds/xds_override_host.cc \ +src/core/load_balancing/xds/xds_override_host.h \ +src/core/load_balancing/xds/xds_wrr_locality.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ src/core/plugin_registry/grpc_plugin_registry_extra.cc \ src/core/tsi/README.md \ diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 1eaaf59c751..48caa2560a0 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -130,6 +130,7 @@ LANG_RELEASE_MATRIX = { ("v1.57.0", ReleaseInfo()), ("v1.58.0", ReleaseInfo()), ("v1.60.0", ReleaseInfo()), + ("v1.61.0", ReleaseInfo()), ] ), "go": OrderedDict( @@ -764,6 +765,12 @@ LANG_RELEASE_MATRIX = { runtimes=["python"], testcases_file="python__master" ), ), + ( + "v1.61.0", + ReleaseInfo( + runtimes=["python"], testcases_file="python__master" + ), + ), ] ), "node": OrderedDict( @@ -858,6 +865,7 @@ LANG_RELEASE_MATRIX = { ("v1.57.0", ReleaseInfo()), ("v1.58.0", ReleaseInfo()), ("v1.60.0", ReleaseInfo()), + ("v1.61.0", ReleaseInfo()), ] ), "php": OrderedDict( @@ -916,6 +924,7 @@ LANG_RELEASE_MATRIX = { ("v1.57.0", ReleaseInfo()), ("v1.58.0", ReleaseInfo()), ("v1.60.0", ReleaseInfo()), + ("v1.61.0", ReleaseInfo()), ] ), "csharp": OrderedDict( diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index b611a1560a8..cff61987d04 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -476,6 +476,15 @@ def targets(): RubyDistribTest( "linux", "x64", "debian10", ruby_version="ruby_3_0", presubmit=True ), + RubyDistribTest( + "linux", "x64", "debian10", ruby_version="ruby_3_1", presubmit=True + ), + RubyDistribTest( + "linux", "x64", "debian10", ruby_version="ruby_3_2", presubmit=True + ), + RubyDistribTest( + "linux", "x64", "debian10", ruby_version="ruby_3_3", presubmit=True + ), RubyDistribTest("linux", "x64", "centos7"), RubyDistribTest("linux", "x64", "ubuntu2004"), RubyDistribTest("linux", "x64", "ubuntu2204", presubmit=True), diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py index fbef6563450..7421d3caedb 100755 --- a/tools/run_tests/sanity/core_banned_functions.py +++ b/tools/run_tests/sanity/core_banned_functions.py @@ -76,8 +76,9 @@ BANNED_EXCEPT = { "grpc_slice_unref(": ["src/core/lib/slice/slice.cc"], # std::random_device needs /dev/random which is not available on all linuxes that we support. # Any usage must be optional and opt-in, so that those platforms can use gRPC without problem. + # TODO(roth): Fix these callers to use the absl random library instead. "std::random_device": [ - "src/core/ext/filters/client_channel/lb_policy/rls/rls.cc", + "src/core/load_balancing/rls/rls.cc", "src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc", ], # use 'grpc_core::Crash' instead