Merge branch 'master' into tjagtap_ruby

pull/36453/head
tanvi-jagtap 10 months ago
commit f3027bdc8c
  1. 8
      .github/workflows/pr-auto-fix.yaml
  2. 8
      BUILD
  3. 116
      CMakeLists.txt
  4. 10
      Makefile
  5. 23
      Package.swift
  6. 4
      bazel/experiments.bzl
  7. 127
      build_autogenerated.yaml
  8. 12
      config.m4
  9. 12
      config.w32
  10. 6
      examples/python/helloworld/helloworld_pb2.py
  11. 3
      examples/python/helloworld/helloworld_pb2_grpc.py
  12. 26
      gRPC-C++.podspec
  13. 36
      gRPC-Core.podspec
  14. 23
      grpc.gemspec
  15. 23
      package.xml
  16. 3
      src/compiler/python_generator.cc
  17. 80
      src/core/BUILD
  18. 16
      src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc
  19. 2
      src/core/ext/transport/binder/server/binder_server.cc
  20. 2
      src/core/ext/transport/binder/server/binder_server.h
  21. 2
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
  22. 2
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
  23. 2
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  24. 2
      src/core/ext/transport/chttp2/server/chttp2_server.h
  25. 2
      src/core/ext/transport/inproc/inproc_transport.cc
  26. 2
      src/core/ext/transport/inproc/legacy_inproc_transport.cc
  27. 5
      src/core/handshaker/handshaker.cc
  28. 5
      src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc
  29. 1
      src/core/lib/config/load_config.cc
  30. 8
      src/core/lib/event_engine/windows/windows_endpoint.cc
  31. 2
      src/core/lib/experiments/rollouts.yaml
  32. 55
      src/core/lib/gpr/log_internal.h
  33. 3
      src/core/lib/promise/activity.cc
  34. 11
      src/core/lib/promise/activity.h
  35. 3
      src/core/lib/promise/context.h
  36. 18
      src/core/lib/promise/detail/join_state.h
  37. 25
      src/core/lib/promise/detail/seq_state.h
  38. 3
      src/core/lib/promise/detail/status.h
  39. 4
      src/core/lib/promise/event_engine_wakeup_scheduler.h
  40. 9
      src/core/lib/promise/for_each.h
  41. 3
      src/core/lib/promise/interceptor_list.h
  42. 13
      src/core/lib/promise/latch.h
  43. 5
      src/core/lib/promise/mpsc.h
  44. 5
      src/core/lib/promise/observable.h
  45. 13
      src/core/lib/promise/party.cc
  46. 15
      src/core/lib/promise/party.h
  47. 25
      src/core/lib/promise/pipe.h
  48. 8
      src/core/lib/promise/poll.h
  49. 12
      src/core/lib/promise/promise_mutex.h
  50. 13
      src/core/lib/promise/status_flag.h
  51. 3
      src/core/lib/promise/try_join.h
  52. 3
      src/core/lib/promise/try_seq.h
  53. 14
      src/core/lib/security/credentials/composite/composite_credentials.cc
  54. 4
      src/core/lib/security/credentials/credentials.cc
  55. 5
      src/core/lib/security/credentials/credentials.h
  56. 5
      src/core/lib/security/credentials/external/aws_external_account_credentials.cc
  57. 9
      src/core/lib/security/credentials/external/external_account_credentials.cc
  58. 3
      src/core/lib/security/credentials/external/url_external_account_credentials.cc
  59. 9
      src/core/lib/security/credentials/google_default/google_default_credentials.cc
  60. 7
      src/core/lib/security/credentials/iam/iam_credentials.cc
  61. 5
      src/core/lib/security/credentials/jwt/json_token.cc
  62. 3
      src/core/lib/security/credentials/jwt/jwt_credentials.cc
  63. 26
      src/core/lib/security/credentials/jwt/jwt_verifier.cc
  64. 13
      src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
  65. 3
      src/core/lib/security/credentials/plugin/plugin_credentials.cc
  66. 23
      src/core/lib/security/credentials/ssl/ssl_credentials.cc
  67. 4
      src/core/lib/security/credentials/ssl/ssl_credentials.h
  68. 47
      src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
  69. 9
      src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
  70. 3
      src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h
  71. 3
      src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.cc
  72. 3
      src/core/lib/security/credentials/tls/grpc_tls_certificate_verifier.h
  73. 34
      src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
  74. 9
      src/core/lib/security/credentials/xds/xds_credentials.cc
  75. 2
      src/core/lib/surface/call.cc
  76. 2
      src/core/lib/surface/call.h
  77. 8
      src/core/lib/transport/batch_builder.cc
  78. 4
      src/core/lib/transport/bdp_estimator.cc
  79. 5
      src/core/lib/transport/bdp_estimator.h
  80. 2
      src/core/lib/transport/call_destination.h
  81. 20
      src/core/lib/transport/call_filters.cc
  82. 54
      src/core/lib/transport/call_filters.h
  83. 26
      src/core/lib/transport/call_spine.h
  84. 5
      src/core/lib/transport/metadata_batch.h
  85. 5
      src/core/lib/transport/promise_endpoint.cc
  86. 20
      src/core/lib/transport/promise_endpoint.h
  87. 7
      src/core/lib/transport/timeout_encoding.cc
  88. 6
      src/core/load_balancing/endpoint_list.cc
  89. 21
      src/core/load_balancing/endpoint_list.h
  90. 11
      src/core/load_balancing/priority/priority.cc
  91. 37
      src/core/load_balancing/ring_hash/ring_hash.cc
  92. 13
      src/core/load_balancing/rls/rls.cc
  93. 21
      src/core/load_balancing/round_robin/round_robin.cc
  94. 20
      src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc
  95. 4
      src/core/plugin_registry/grpc_plugin_registry.cc
  96. 2
      src/core/server/server.cc
  97. 8
      src/core/server/server.h
  98. 2
      src/core/server/server_call_tracer_filter.cc
  99. 6
      src/core/server/server_call_tracer_filter.h
  100. 10
      src/core/server/server_config_selector.h
  101. Some files were not shown because too many files have changed in this diff Show More

@ -29,7 +29,7 @@ jobs:
path: ~/.cache/bazel path: ~/.cache/bazel
# formattedTime here is like 2021323 - the year concatenated with the week then # formattedTime here is like 2021323 - the year concatenated with the week then
# the day of that week. # the day of that week.
# As this changes every day, we cycle to a new cache once per day, with lookup # As this changes every day, we cycle to a new cache once per day, with lookup
# across the week (and then the year). # across the week (and then the year).
key: ${{ runner.os }}-${{ steps.current-time-with-day.outputs.formattedTime }} key: ${{ runner.os }}-${{ steps.current-time-with-day.outputs.formattedTime }}
restore-keys: | restore-keys: |
@ -48,13 +48,13 @@ jobs:
with: with:
script: | script: |
// If you'd like not to run this code on your commits, add your github user id here: // If you'd like not to run this code on your commits, add your github user id here:
NO_AUTOFIX_USERS = ["copybara-service[bot]"] const NO_AUTOFIX_USERS = ["copybara-service[bot]"];
const { owner, repo } = context.repo const { owner, repo } = context.repo;
console.log("Actor: " + context.actor); console.log("Actor: " + context.actor);
if (NO_AUTOFIX_USERS.includes(context.actor)) { if (NO_AUTOFIX_USERS.includes(context.actor)) {
console.log('Cancelling'); console.log('Cancelling');
const run_id = "${{ github.run_id }}"; const run_id = "${{ github.run_id }}";
await github.actions.cancelWorkflowRun({ owner, repo, run_id }); await github.rest.actions.cancelWorkflowRun({ owner, repo, run_id });
return 'go'; return 'go';
} else { } else {
return 'stay'; return 'stay';

@ -1868,10 +1868,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "server", name = "server",
srcs = [ srcs = [
"//src/core:lib/surface/server.cc", "//src/core:server/server.cc",
], ],
hdrs = [ hdrs = [
"//src/core:lib/surface/server.h", "//src/core:server/server.h",
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
@ -2270,6 +2270,7 @@ grpc_cc_library(
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/container:inlined_vector", "absl/container:inlined_vector",
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
@ -2995,7 +2996,6 @@ grpc_cc_library(
deps = [ deps = [
"gpr_platform", "gpr_platform",
"//src/core:env", "//src/core:env",
"//src/core:gpr_log_internal",
], ],
) )
@ -3112,6 +3112,7 @@ grpc_cc_library(
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/container:inlined_vector", "absl/container:inlined_vector",
"absl/log:check",
"absl/status", "absl/status",
"absl/strings:str_format", "absl/strings:str_format",
], ],
@ -3961,6 +3962,7 @@ grpc_cc_library(
"//src/core:lib/security/credentials/jwt/jwt_verifier.h", "//src/core:lib/security/credentials/jwt/jwt_verifier.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",

116
CMakeLists.txt generated

@ -1540,6 +1540,7 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx xds_audit_logger_registry_test) add_dependencies(buildtests_cxx xds_audit_logger_registry_test)
add_dependencies(buildtests_cxx xds_bootstrap_test) add_dependencies(buildtests_cxx xds_bootstrap_test)
add_dependencies(buildtests_cxx xds_certificate_provider_test) add_dependencies(buildtests_cxx xds_certificate_provider_test)
add_dependencies(buildtests_cxx xds_channel_stack_modifier_test)
add_dependencies(buildtests_cxx xds_client_test) add_dependencies(buildtests_cxx xds_client_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx xds_cluster_end2end_test) add_dependencies(buildtests_cxx xds_cluster_end2end_test)
@ -1857,7 +1858,6 @@ add_library(grpc
src/core/ext/filters/message_size/message_size_filter.cc src/core/ext/filters/message_size/message_size_filter.cc
src/core/ext/filters/rbac/rbac_filter.cc src/core/ext/filters/rbac/rbac_filter.cc
src/core/ext/filters/rbac/rbac_service_config_parser.cc src/core/ext/filters/rbac/rbac_service_config_parser.cc
src/core/ext/filters/server_config_selector/server_config_selector_filter.cc
src/core/ext/filters/stateful_session/stateful_session_filter.cc src/core/ext/filters/stateful_session/stateful_session_filter.cc
src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc
src/core/ext/gcp/metadata_query.cc src/core/ext/gcp/metadata_query.cc
@ -2220,7 +2220,6 @@ add_library(grpc
src/core/ext/xds/xds_bootstrap.cc src/core/ext/xds/xds_bootstrap.cc
src/core/ext/xds/xds_bootstrap_grpc.cc src/core/ext/xds/xds_bootstrap_grpc.cc
src/core/ext/xds/xds_certificate_provider.cc src/core/ext/xds/xds_certificate_provider.cc
src/core/ext/xds/xds_channel_stack_modifier.cc
src/core/ext/xds/xds_client.cc src/core/ext/xds/xds_client.cc
src/core/ext/xds/xds_client_grpc.cc src/core/ext/xds/xds_client_grpc.cc
src/core/ext/xds/xds_client_stats.cc src/core/ext/xds/xds_client_stats.cc
@ -2237,7 +2236,6 @@ add_library(grpc
src/core/ext/xds/xds_listener.cc src/core/ext/xds/xds_listener.cc
src/core/ext/xds/xds_route_config.cc src/core/ext/xds/xds_route_config.cc
src/core/ext/xds/xds_routing.cc src/core/ext/xds/xds_routing.cc
src/core/ext/xds/xds_server_config_fetcher.cc
src/core/ext/xds/xds_transport_grpc.cc src/core/ext/xds/xds_transport_grpc.cc
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc
src/core/handshaker/handshaker.cc src/core/handshaker/handshaker.cc
@ -2263,7 +2261,6 @@ add_library(grpc
src/core/lib/channel/connected_channel.cc src/core/lib/channel/connected_channel.cc
src/core/lib/channel/metrics.cc src/core/lib/channel/metrics.cc
src/core/lib/channel/promise_based_filter.cc src/core/lib/channel/promise_based_filter.cc
src/core/lib/channel/server_call_tracer_filter.cc
src/core/lib/channel/status_util.cc src/core/lib/channel/status_util.cc
src/core/lib/compression/compression.cc src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc src/core/lib/compression/compression_internal.cc
@ -2517,7 +2514,6 @@ add_library(grpc
src/core/lib/surface/lame_client.cc src/core/lib/surface/lame_client.cc
src/core/lib/surface/legacy_channel.cc src/core/lib/surface/legacy_channel.cc
src/core/lib/surface/metadata_array.cc src/core/lib/surface/metadata_array.cc
src/core/lib/surface/server.cc
src/core/lib/surface/validate_metadata.cc src/core/lib/surface/validate_metadata.cc
src/core/lib/surface/version.cc src/core/lib/surface/version.cc
src/core/lib/surface/wait_for_cq_end_op.cc src/core/lib/surface/wait_for_cq_end_op.cc
@ -2589,6 +2585,11 @@ add_library(grpc
src/core/resolver/xds/xds_dependency_manager.cc src/core/resolver/xds/xds_dependency_manager.cc
src/core/resolver/xds/xds_resolver.cc src/core/resolver/xds/xds_resolver.cc
src/core/resolver/xds/xds_resolver_trace.cc src/core/resolver/xds/xds_resolver_trace.cc
src/core/server/server.cc
src/core/server/server_call_tracer_filter.cc
src/core/server/server_config_selector_filter.cc
src/core/server/xds_channel_stack_modifier.cc
src/core/server/xds_server_config_fetcher.cc
src/core/service_config/service_config_channel_arg_filter.cc src/core/service_config/service_config_channel_arg_filter.cc
src/core/service_config/service_config_impl.cc src/core/service_config/service_config_impl.cc
src/core/service_config/service_config_parser.cc src/core/service_config/service_config_parser.cc
@ -3027,7 +3028,6 @@ add_library(grpc_unsecure
src/core/lib/channel/connected_channel.cc src/core/lib/channel/connected_channel.cc
src/core/lib/channel/metrics.cc src/core/lib/channel/metrics.cc
src/core/lib/channel/promise_based_filter.cc src/core/lib/channel/promise_based_filter.cc
src/core/lib/channel/server_call_tracer_filter.cc
src/core/lib/channel/status_util.cc src/core/lib/channel/status_util.cc
src/core/lib/compression/compression.cc src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc src/core/lib/compression/compression_internal.cc
@ -3242,7 +3242,6 @@ add_library(grpc_unsecure
src/core/lib/surface/lame_client.cc src/core/lib/surface/lame_client.cc
src/core/lib/surface/legacy_channel.cc src/core/lib/surface/legacy_channel.cc
src/core/lib/surface/metadata_array.cc src/core/lib/surface/metadata_array.cc
src/core/lib/surface/server.cc
src/core/lib/surface/validate_metadata.cc src/core/lib/surface/validate_metadata.cc
src/core/lib/surface/version.cc src/core/lib/surface/version.cc
src/core/lib/surface/wait_for_cq_end_op.cc src/core/lib/surface/wait_for_cq_end_op.cc
@ -3304,6 +3303,8 @@ add_library(grpc_unsecure
src/core/resolver/resolver.cc src/core/resolver/resolver.cc
src/core/resolver/resolver_registry.cc src/core/resolver/resolver_registry.cc
src/core/resolver/sockaddr/sockaddr_resolver.cc src/core/resolver/sockaddr/sockaddr_resolver.cc
src/core/server/server.cc
src/core/server/server_call_tracer_filter.cc
src/core/service_config/service_config_channel_arg_filter.cc src/core/service_config/service_config_channel_arg_filter.cc
src/core/service_config/service_config_impl.cc src/core/service_config/service_config_impl.cc
src/core/service_config/service_config_parser.cc src/core/service_config/service_config_parser.cc
@ -27040,7 +27041,7 @@ endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)
add_executable(server_config_selector_test add_executable(server_config_selector_test
test/core/server_config_selector/server_config_selector_test.cc test/core/server/server_config_selector_test.cc
) )
if(WIN32 AND MSVC) if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
@ -33190,6 +33191,105 @@ target_link_libraries(xds_certificate_provider_test
) )
endif()
if(gRPC_BUILD_TESTS)
add_executable(xds_channel_stack_modifier_test
src/core/ext/filters/logging/logging_filter.cc
src/cpp/client/call_credentials.cc
src/cpp/client/channel_cc.cc
src/cpp/client/channel_credentials.cc
src/cpp/client/client_callback.cc
src/cpp/client/client_context.cc
src/cpp/client/client_interceptor.cc
src/cpp/client/client_stats_interceptor.cc
src/cpp/client/create_channel.cc
src/cpp/client/create_channel_internal.cc
src/cpp/client/create_channel_posix.cc
src/cpp/client/insecure_credentials.cc
src/cpp/client/secure_credentials.cc
src/cpp/common/alarm.cc
src/cpp/common/auth_property_iterator.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/completion_queue_cc.cc
src/cpp/common/resource_quota_cc.cc
src/cpp/common/rpc_method.cc
src/cpp/common/secure_auth_context.cc
src/cpp/common/secure_create_auth_context.cc
src/cpp/common/tls_certificate_provider.cc
src/cpp/common/tls_certificate_verifier.cc
src/cpp/common/tls_credentials_options.cc
src/cpp/common/validate_service_config.cc
src/cpp/common/version_cc.cc
src/cpp/ext/filters/census/client_filter.cc
src/cpp/ext/filters/census/context.cc
src/cpp/ext/filters/census/grpc_plugin.cc
src/cpp/ext/filters/census/measures.cc
src/cpp/ext/filters/census/rpc_encoding.cc
src/cpp/ext/filters/census/server_call_tracer.cc
src/cpp/ext/filters/census/views.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/backend_metric_recorder.cc
src/cpp/server/channel_argument_option.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/external_connection_acceptor_impl.cc
src/cpp/server/health/default_health_check_service.cc
src/cpp/server/health/health_check_service.cc
src/cpp/server/health/health_check_service_server_builder_option.cc
src/cpp/server/insecure_server_credentials.cc
src/cpp/server/secure_server_credentials.cc
src/cpp/server/server_builder.cc
src/cpp/server/server_callback.cc
src/cpp/server/server_cc.cc
src/cpp/server/server_context.cc
src/cpp/server/server_credentials.cc
src/cpp/server/server_posix.cc
src/cpp/thread_manager/thread_manager.cc
src/cpp/util/byte_buffer_cc.cc
src/cpp/util/status.cc
src/cpp/util/string_ref.cc
src/cpp/util/time_cc.cc
test/core/server/xds_channel_stack_modifier_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(xds_channel_stack_modifier_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
)
endif()
endif()
target_compile_features(xds_channel_stack_modifier_test PUBLIC cxx_std_14)
target_include_directories(xds_channel_stack_modifier_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(xds_channel_stack_modifier_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
absl::endian
absl::int128
${_gRPC_PROTOBUF_LIBRARIES}
grpc_test_util
)
endif() endif()
if(gRPC_BUILD_TESTS) if(gRPC_BUILD_TESTS)

10
Makefile generated

@ -699,7 +699,6 @@ LIBGRPC_SRC = \
src/core/ext/filters/message_size/message_size_filter.cc \ src/core/ext/filters/message_size/message_size_filter.cc \
src/core/ext/filters/rbac/rbac_filter.cc \ src/core/ext/filters/rbac/rbac_filter.cc \
src/core/ext/filters/rbac/rbac_service_config_parser.cc \ src/core/ext/filters/rbac/rbac_service_config_parser.cc \
src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \
src/core/ext/filters/stateful_session/stateful_session_filter.cc \ src/core/ext/filters/stateful_session/stateful_session_filter.cc \
src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc \ src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc \
src/core/ext/gcp/metadata_query.cc \ src/core/ext/gcp/metadata_query.cc \
@ -1062,7 +1061,6 @@ LIBGRPC_SRC = \
src/core/ext/xds/xds_bootstrap.cc \ src/core/ext/xds/xds_bootstrap.cc \
src/core/ext/xds/xds_bootstrap_grpc.cc \ src/core/ext/xds/xds_bootstrap_grpc.cc \
src/core/ext/xds/xds_certificate_provider.cc \ src/core/ext/xds/xds_certificate_provider.cc \
src/core/ext/xds/xds_channel_stack_modifier.cc \
src/core/ext/xds/xds_client.cc \ src/core/ext/xds/xds_client.cc \
src/core/ext/xds/xds_client_grpc.cc \ src/core/ext/xds/xds_client_grpc.cc \
src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_client_stats.cc \
@ -1079,7 +1077,6 @@ LIBGRPC_SRC = \
src/core/ext/xds/xds_listener.cc \ src/core/ext/xds/xds_listener.cc \
src/core/ext/xds/xds_route_config.cc \ src/core/ext/xds/xds_route_config.cc \
src/core/ext/xds/xds_routing.cc \ src/core/ext/xds/xds_routing.cc \
src/core/ext/xds/xds_server_config_fetcher.cc \
src/core/ext/xds/xds_transport_grpc.cc \ src/core/ext/xds/xds_transport_grpc.cc \
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \
src/core/handshaker/handshaker.cc \ src/core/handshaker/handshaker.cc \
@ -1105,7 +1102,6 @@ LIBGRPC_SRC = \
src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \ src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \ src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/server_call_tracer_filter.cc \
src/core/lib/channel/status_util.cc \ src/core/lib/channel/status_util.cc \
src/core/lib/compression/compression.cc \ src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \ src/core/lib/compression/compression_internal.cc \
@ -1404,7 +1400,6 @@ LIBGRPC_SRC = \
src/core/lib/surface/lame_client.cc \ src/core/lib/surface/lame_client.cc \
src/core/lib/surface/legacy_channel.cc \ src/core/lib/surface/legacy_channel.cc \
src/core/lib/surface/metadata_array.cc \ src/core/lib/surface/metadata_array.cc \
src/core/lib/surface/server.cc \
src/core/lib/surface/validate_metadata.cc \ src/core/lib/surface/validate_metadata.cc \
src/core/lib/surface/version.cc \ src/core/lib/surface/version.cc \
src/core/lib/surface/wait_for_cq_end_op.cc \ src/core/lib/surface/wait_for_cq_end_op.cc \
@ -1476,6 +1471,11 @@ LIBGRPC_SRC = \
src/core/resolver/xds/xds_dependency_manager.cc \ src/core/resolver/xds/xds_dependency_manager.cc \
src/core/resolver/xds/xds_resolver.cc \ src/core/resolver/xds/xds_resolver.cc \
src/core/resolver/xds/xds_resolver_trace.cc \ src/core/resolver/xds/xds_resolver_trace.cc \
src/core/server/server.cc \
src/core/server/server_call_tracer_filter.cc \
src/core/server/server_config_selector_filter.cc \
src/core/server/xds_channel_stack_modifier.cc \
src/core/server/xds_server_config_fetcher.cc \
src/core/service_config/service_config_channel_arg_filter.cc \ src/core/service_config/service_config_channel_arg_filter.cc \
src/core/service_config/service_config_impl.cc \ src/core/service_config/service_config_impl.cc \
src/core/service_config/service_config_parser.cc \ src/core/service_config/service_config_parser.cc \

23
Package.swift generated

@ -184,9 +184,6 @@ let package = Package(
"src/core/ext/filters/rbac/rbac_filter.h", "src/core/ext/filters/rbac/rbac_filter.h",
"src/core/ext/filters/rbac/rbac_service_config_parser.cc", "src/core/ext/filters/rbac/rbac_service_config_parser.cc",
"src/core/ext/filters/rbac/rbac_service_config_parser.h", "src/core/ext/filters/rbac/rbac_service_config_parser.h",
"src/core/ext/filters/server_config_selector/server_config_selector.h",
"src/core/ext/filters/server_config_selector/server_config_selector_filter.cc",
"src/core/ext/filters/server_config_selector/server_config_selector_filter.h",
"src/core/ext/filters/stateful_session/stateful_session_filter.cc", "src/core/ext/filters/stateful_session/stateful_session_filter.cc",
"src/core/ext/filters/stateful_session/stateful_session_filter.h", "src/core/ext/filters/stateful_session/stateful_session_filter.h",
"src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc", "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc",
@ -1078,8 +1075,6 @@ let package = Package(
"src/core/ext/xds/xds_certificate_provider.cc", "src/core/ext/xds/xds_certificate_provider.cc",
"src/core/ext/xds/xds_certificate_provider.h", "src/core/ext/xds/xds_certificate_provider.h",
"src/core/ext/xds/xds_channel_args.h", "src/core/ext/xds/xds_channel_args.h",
"src/core/ext/xds/xds_channel_stack_modifier.cc",
"src/core/ext/xds/xds_channel_stack_modifier.h",
"src/core/ext/xds/xds_client.cc", "src/core/ext/xds/xds_client.cc",
"src/core/ext/xds/xds_client.h", "src/core/ext/xds/xds_client.h",
"src/core/ext/xds/xds_client_grpc.cc", "src/core/ext/xds/xds_client_grpc.cc",
@ -1115,7 +1110,6 @@ let package = Package(
"src/core/ext/xds/xds_route_config.h", "src/core/ext/xds/xds_route_config.h",
"src/core/ext/xds/xds_routing.cc", "src/core/ext/xds/xds_routing.cc",
"src/core/ext/xds/xds_routing.h", "src/core/ext/xds/xds_routing.h",
"src/core/ext/xds/xds_server_config_fetcher.cc",
"src/core/ext/xds/xds_transport.h", "src/core/ext/xds/xds_transport.h",
"src/core/ext/xds/xds_transport_grpc.cc", "src/core/ext/xds/xds_transport_grpc.cc",
"src/core/ext/xds/xds_transport_grpc.h", "src/core/ext/xds/xds_transport_grpc.h",
@ -1173,8 +1167,6 @@ let package = Package(
"src/core/lib/channel/metrics.h", "src/core/lib/channel/metrics.h",
"src/core/lib/channel/promise_based_filter.cc", "src/core/lib/channel/promise_based_filter.cc",
"src/core/lib/channel/promise_based_filter.h", "src/core/lib/channel/promise_based_filter.h",
"src/core/lib/channel/server_call_tracer_filter.cc",
"src/core/lib/channel/server_call_tracer_filter.h",
"src/core/lib/channel/status_util.cc", "src/core/lib/channel/status_util.cc",
"src/core/lib/channel/status_util.h", "src/core/lib/channel/status_util.h",
"src/core/lib/channel/tcp_tracer.h", "src/core/lib/channel/tcp_tracer.h",
@ -1324,7 +1316,6 @@ let package = Package(
"src/core/lib/gpr/linux/cpu.cc", "src/core/lib/gpr/linux/cpu.cc",
"src/core/lib/gpr/linux/log.cc", "src/core/lib/gpr/linux/log.cc",
"src/core/lib/gpr/log.cc", "src/core/lib/gpr/log.cc",
"src/core/lib/gpr/log_internal.h",
"src/core/lib/gpr/msys/tmpfile.cc", "src/core/lib/gpr/msys/tmpfile.cc",
"src/core/lib/gpr/posix/cpu.cc", "src/core/lib/gpr/posix/cpu.cc",
"src/core/lib/gpr/posix/log.cc", "src/core/lib/gpr/posix/log.cc",
@ -1800,9 +1791,6 @@ let package = Package(
"src/core/lib/surface/legacy_channel.cc", "src/core/lib/surface/legacy_channel.cc",
"src/core/lib/surface/legacy_channel.h", "src/core/lib/surface/legacy_channel.h",
"src/core/lib/surface/metadata_array.cc", "src/core/lib/surface/metadata_array.cc",
"src/core/lib/surface/server.cc",
"src/core/lib/surface/server.h",
"src/core/lib/surface/server_interface.h",
"src/core/lib/surface/validate_metadata.cc", "src/core/lib/surface/validate_metadata.cc",
"src/core/lib/surface/validate_metadata.h", "src/core/lib/surface/validate_metadata.h",
"src/core/lib/surface/version.cc", "src/core/lib/surface/version.cc",
@ -1942,6 +1930,17 @@ let package = Package(
"src/core/resolver/xds/xds_resolver_attributes.h", "src/core/resolver/xds/xds_resolver_attributes.h",
"src/core/resolver/xds/xds_resolver_trace.cc", "src/core/resolver/xds/xds_resolver_trace.cc",
"src/core/resolver/xds/xds_resolver_trace.h", "src/core/resolver/xds/xds_resolver_trace.h",
"src/core/server/server.cc",
"src/core/server/server.h",
"src/core/server/server_call_tracer_filter.cc",
"src/core/server/server_call_tracer_filter.h",
"src/core/server/server_config_selector.h",
"src/core/server/server_config_selector_filter.cc",
"src/core/server/server_config_selector_filter.h",
"src/core/server/server_interface.h",
"src/core/server/xds_channel_stack_modifier.cc",
"src/core/server/xds_channel_stack_modifier.h",
"src/core/server/xds_server_config_fetcher.cc",
"src/core/service_config/service_config.h", "src/core/service_config/service_config.h",
"src/core/service_config/service_config_call_data.h", "src/core/service_config/service_config_call_data.h",
"src/core/service_config/service_config_channel_arg_filter.cc", "src/core/service_config/service_config_channel_arg_filter.cc",

@ -60,12 +60,16 @@ EXPERIMENTS = {
}, },
"off": { "off": {
"core_end2end_test": [ "core_end2end_test": [
"event_engine_client",
"promise_based_server_call", "promise_based_server_call",
], ],
"endpoint_test": [ "endpoint_test": [
"tcp_frame_size_tuning", "tcp_frame_size_tuning",
"tcp_rcv_lowat", "tcp_rcv_lowat",
], ],
"event_engine_client_test": [
"event_engine_client",
],
"flow_control_test": [ "flow_control_test": [
"multiping", "multiping",
"peer_state_based_framing", "peer_state_based_framing",

@ -56,7 +56,6 @@ libs:
- src/core/lib/config/load_config.h - src/core/lib/config/load_config.h
- src/core/lib/event_engine/thread_local.h - src/core/lib/event_engine/thread_local.h
- src/core/lib/gpr/alloc.h - src/core/lib/gpr/alloc.h
- src/core/lib/gpr/log_internal.h
- src/core/lib/gpr/string.h - src/core/lib/gpr/string.h
- src/core/lib/gpr/time_precise.h - src/core/lib/gpr/time_precise.h
- src/core/lib/gpr/tmpfile.h - src/core/lib/gpr/tmpfile.h
@ -256,8 +255,6 @@ libs:
- src/core/ext/filters/message_size/message_size_filter.h - src/core/ext/filters/message_size/message_size_filter.h
- src/core/ext/filters/rbac/rbac_filter.h - src/core/ext/filters/rbac/rbac_filter.h
- src/core/ext/filters/rbac/rbac_service_config_parser.h - src/core/ext/filters/rbac/rbac_service_config_parser.h
- src/core/ext/filters/server_config_selector/server_config_selector.h
- src/core/ext/filters/server_config_selector/server_config_selector_filter.h
- src/core/ext/filters/stateful_session/stateful_session_filter.h - src/core/ext/filters/stateful_session/stateful_session_filter.h
- src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h - src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h
- src/core/ext/gcp/metadata_query.h - src/core/ext/gcp/metadata_query.h
@ -787,7 +784,6 @@ libs:
- src/core/ext/xds/xds_bootstrap_grpc.h - src/core/ext/xds/xds_bootstrap_grpc.h
- src/core/ext/xds/xds_certificate_provider.h - src/core/ext/xds/xds_certificate_provider.h
- src/core/ext/xds/xds_channel_args.h - src/core/ext/xds/xds_channel_args.h
- src/core/ext/xds/xds_channel_stack_modifier.h
- src/core/ext/xds/xds_client.h - src/core/ext/xds/xds_client.h
- src/core/ext/xds/xds_client_grpc.h - src/core/ext/xds/xds_client_grpc.h
- src/core/ext/xds/xds_client_stats.h - src/core/ext/xds/xds_client_stats.h
@ -839,7 +835,6 @@ libs:
- src/core/lib/channel/context.h - src/core/lib/channel/context.h
- src/core/lib/channel/metrics.h - src/core/lib/channel/metrics.h
- src/core/lib/channel/promise_based_filter.h - src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/server_call_tracer_filter.h
- src/core/lib/channel/status_util.h - src/core/lib/channel/status_util.h
- src/core/lib/channel/tcp_tracer.h - src/core/lib/channel/tcp_tracer.h
- src/core/lib/compression/compression_internal.h - src/core/lib/compression/compression_internal.h
@ -1138,8 +1133,6 @@ libs:
- src/core/lib/surface/init_internally.h - src/core/lib/surface/init_internally.h
- src/core/lib/surface/lame_client.h - src/core/lib/surface/lame_client.h
- src/core/lib/surface/legacy_channel.h - src/core/lib/surface/legacy_channel.h
- src/core/lib/surface/server.h
- src/core/lib/surface/server_interface.h
- src/core/lib/surface/validate_metadata.h - src/core/lib/surface/validate_metadata.h
- src/core/lib/surface/wait_for_cq_end_op.h - src/core/lib/surface/wait_for_cq_end_op.h
- src/core/lib/transport/batch_builder.h - src/core/lib/transport/batch_builder.h
@ -1208,6 +1201,12 @@ libs:
- src/core/resolver/xds/xds_dependency_manager.h - src/core/resolver/xds/xds_dependency_manager.h
- src/core/resolver/xds/xds_resolver_attributes.h - src/core/resolver/xds/xds_resolver_attributes.h
- src/core/resolver/xds/xds_resolver_trace.h - src/core/resolver/xds/xds_resolver_trace.h
- src/core/server/server.h
- src/core/server/server_call_tracer_filter.h
- src/core/server/server_config_selector.h
- src/core/server/server_config_selector_filter.h
- src/core/server/server_interface.h
- src/core/server/xds_channel_stack_modifier.h
- src/core/service_config/service_config.h - src/core/service_config/service_config.h
- src/core/service_config/service_config_call_data.h - src/core/service_config/service_config_call_data.h
- src/core/service_config/service_config_impl.h - src/core/service_config/service_config_impl.h
@ -1277,7 +1276,6 @@ libs:
- src/core/ext/filters/message_size/message_size_filter.cc - src/core/ext/filters/message_size/message_size_filter.cc
- src/core/ext/filters/rbac/rbac_filter.cc - src/core/ext/filters/rbac/rbac_filter.cc
- src/core/ext/filters/rbac/rbac_service_config_parser.cc - src/core/ext/filters/rbac/rbac_service_config_parser.cc
- src/core/ext/filters/server_config_selector/server_config_selector_filter.cc
- src/core/ext/filters/stateful_session/stateful_session_filter.cc - src/core/ext/filters/stateful_session/stateful_session_filter.cc
- src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc - src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc
- src/core/ext/gcp/metadata_query.cc - src/core/ext/gcp/metadata_query.cc
@ -1640,7 +1638,6 @@ libs:
- src/core/ext/xds/xds_bootstrap.cc - src/core/ext/xds/xds_bootstrap.cc
- src/core/ext/xds/xds_bootstrap_grpc.cc - src/core/ext/xds/xds_bootstrap_grpc.cc
- src/core/ext/xds/xds_certificate_provider.cc - src/core/ext/xds/xds_certificate_provider.cc
- src/core/ext/xds/xds_channel_stack_modifier.cc
- src/core/ext/xds/xds_client.cc - src/core/ext/xds/xds_client.cc
- src/core/ext/xds/xds_client_grpc.cc - src/core/ext/xds/xds_client_grpc.cc
- src/core/ext/xds/xds_client_stats.cc - src/core/ext/xds/xds_client_stats.cc
@ -1657,7 +1654,6 @@ libs:
- src/core/ext/xds/xds_listener.cc - src/core/ext/xds/xds_listener.cc
- src/core/ext/xds/xds_route_config.cc - src/core/ext/xds/xds_route_config.cc
- src/core/ext/xds/xds_routing.cc - src/core/ext/xds/xds_routing.cc
- src/core/ext/xds/xds_server_config_fetcher.cc
- src/core/ext/xds/xds_transport_grpc.cc - src/core/ext/xds/xds_transport_grpc.cc
- src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc - src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc
- src/core/handshaker/handshaker.cc - src/core/handshaker/handshaker.cc
@ -1683,7 +1679,6 @@ libs:
- src/core/lib/channel/connected_channel.cc - src/core/lib/channel/connected_channel.cc
- src/core/lib/channel/metrics.cc - src/core/lib/channel/metrics.cc
- src/core/lib/channel/promise_based_filter.cc - src/core/lib/channel/promise_based_filter.cc
- src/core/lib/channel/server_call_tracer_filter.cc
- src/core/lib/channel/status_util.cc - src/core/lib/channel/status_util.cc
- src/core/lib/compression/compression.cc - src/core/lib/compression/compression.cc
- src/core/lib/compression/compression_internal.cc - src/core/lib/compression/compression_internal.cc
@ -1937,7 +1932,6 @@ libs:
- src/core/lib/surface/lame_client.cc - src/core/lib/surface/lame_client.cc
- src/core/lib/surface/legacy_channel.cc - src/core/lib/surface/legacy_channel.cc
- src/core/lib/surface/metadata_array.cc - src/core/lib/surface/metadata_array.cc
- src/core/lib/surface/server.cc
- src/core/lib/surface/validate_metadata.cc - src/core/lib/surface/validate_metadata.cc
- src/core/lib/surface/version.cc - src/core/lib/surface/version.cc
- src/core/lib/surface/wait_for_cq_end_op.cc - src/core/lib/surface/wait_for_cq_end_op.cc
@ -2009,6 +2003,11 @@ libs:
- src/core/resolver/xds/xds_dependency_manager.cc - src/core/resolver/xds/xds_dependency_manager.cc
- src/core/resolver/xds/xds_resolver.cc - src/core/resolver/xds/xds_resolver.cc
- src/core/resolver/xds/xds_resolver_trace.cc - src/core/resolver/xds/xds_resolver_trace.cc
- src/core/server/server.cc
- src/core/server/server_call_tracer_filter.cc
- src/core/server/server_config_selector_filter.cc
- src/core/server/xds_channel_stack_modifier.cc
- src/core/server/xds_server_config_fetcher.cc
- src/core/service_config/service_config_channel_arg_filter.cc - src/core/service_config/service_config_channel_arg_filter.cc
- src/core/service_config/service_config_impl.cc - src/core/service_config/service_config_impl.cc
- src/core/service_config/service_config_parser.cc - src/core/service_config/service_config_parser.cc
@ -2340,7 +2339,6 @@ libs:
- src/core/lib/channel/context.h - src/core/lib/channel/context.h
- src/core/lib/channel/metrics.h - src/core/lib/channel/metrics.h
- src/core/lib/channel/promise_based_filter.h - src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/server_call_tracer_filter.h
- src/core/lib/channel/status_util.h - src/core/lib/channel/status_util.h
- src/core/lib/channel/tcp_tracer.h - src/core/lib/channel/tcp_tracer.h
- src/core/lib/compression/compression_internal.h - src/core/lib/compression/compression_internal.h
@ -2603,8 +2601,6 @@ libs:
- src/core/lib/surface/init_internally.h - src/core/lib/surface/init_internally.h
- src/core/lib/surface/lame_client.h - src/core/lib/surface/lame_client.h
- src/core/lib/surface/legacy_channel.h - src/core/lib/surface/legacy_channel.h
- src/core/lib/surface/server.h
- src/core/lib/surface/server_interface.h
- src/core/lib/surface/validate_metadata.h - src/core/lib/surface/validate_metadata.h
- src/core/lib/surface/wait_for_cq_end_op.h - src/core/lib/surface/wait_for_cq_end_op.h
- src/core/lib/transport/batch_builder.h - src/core/lib/transport/batch_builder.h
@ -2667,6 +2663,9 @@ libs:
- src/core/resolver/resolver_factory.h - src/core/resolver/resolver_factory.h
- src/core/resolver/resolver_registry.h - src/core/resolver/resolver_registry.h
- src/core/resolver/server_address.h - src/core/resolver/server_address.h
- src/core/server/server.h
- src/core/server/server_call_tracer_filter.h
- src/core/server/server_interface.h
- src/core/service_config/service_config.h - src/core/service_config/service_config.h
- src/core/service_config/service_config_call_data.h - src/core/service_config/service_config_call_data.h
- src/core/service_config/service_config_impl.h - src/core/service_config/service_config_impl.h
@ -2805,7 +2804,6 @@ libs:
- src/core/lib/channel/connected_channel.cc - src/core/lib/channel/connected_channel.cc
- src/core/lib/channel/metrics.cc - src/core/lib/channel/metrics.cc
- src/core/lib/channel/promise_based_filter.cc - src/core/lib/channel/promise_based_filter.cc
- src/core/lib/channel/server_call_tracer_filter.cc
- src/core/lib/channel/status_util.cc - src/core/lib/channel/status_util.cc
- src/core/lib/compression/compression.cc - src/core/lib/compression/compression.cc
- src/core/lib/compression/compression_internal.cc - src/core/lib/compression/compression_internal.cc
@ -3020,7 +3018,6 @@ libs:
- src/core/lib/surface/lame_client.cc - src/core/lib/surface/lame_client.cc
- src/core/lib/surface/legacy_channel.cc - src/core/lib/surface/legacy_channel.cc
- src/core/lib/surface/metadata_array.cc - src/core/lib/surface/metadata_array.cc
- src/core/lib/surface/server.cc
- src/core/lib/surface/validate_metadata.cc - src/core/lib/surface/validate_metadata.cc
- src/core/lib/surface/version.cc - src/core/lib/surface/version.cc
- src/core/lib/surface/wait_for_cq_end_op.cc - src/core/lib/surface/wait_for_cq_end_op.cc
@ -3082,6 +3079,8 @@ libs:
- src/core/resolver/resolver.cc - src/core/resolver/resolver.cc
- src/core/resolver/resolver_registry.cc - src/core/resolver/resolver_registry.cc
- src/core/resolver/sockaddr/sockaddr_resolver.cc - src/core/resolver/sockaddr/sockaddr_resolver.cc
- src/core/server/server.cc
- src/core/server/server_call_tracer_filter.cc
- src/core/service_config/service_config_channel_arg_filter.cc - src/core/service_config/service_config_channel_arg_filter.cc
- src/core/service_config/service_config_impl.cc - src/core/service_config/service_config_impl.cc
- src/core/service_config/service_config_parser.cc - src/core/service_config/service_config_parser.cc
@ -4679,7 +4678,6 @@ libs:
- src/core/lib/surface/init.h - src/core/lib/surface/init.h
- src/core/lib/surface/init_internally.h - src/core/lib/surface/init_internally.h
- src/core/lib/surface/lame_client.h - src/core/lib/surface/lame_client.h
- src/core/lib/surface/server_interface.h
- src/core/lib/surface/validate_metadata.h - src/core/lib/surface/validate_metadata.h
- src/core/lib/surface/wait_for_cq_end_op.h - src/core/lib/surface/wait_for_cq_end_op.h
- src/core/lib/transport/batch_builder.h - src/core/lib/transport/batch_builder.h
@ -4712,6 +4710,7 @@ libs:
- src/core/resolver/resolver_factory.h - src/core/resolver/resolver_factory.h
- src/core/resolver/resolver_registry.h - src/core/resolver/resolver_registry.h
- src/core/resolver/server_address.h - src/core/resolver/server_address.h
- src/core/server/server_interface.h
- src/core/service_config/service_config.h - src/core/service_config/service_config.h
- src/core/service_config/service_config_call_data.h - src/core/service_config/service_config_call_data.h
- src/core/service_config/service_config_parser.h - src/core/service_config/service_config_parser.h
@ -11834,7 +11833,6 @@ targets:
- src/core/lib/surface/init.h - src/core/lib/surface/init.h
- src/core/lib/surface/init_internally.h - src/core/lib/surface/init_internally.h
- src/core/lib/surface/lame_client.h - src/core/lib/surface/lame_client.h
- src/core/lib/surface/server_interface.h
- src/core/lib/surface/validate_metadata.h - src/core/lib/surface/validate_metadata.h
- src/core/lib/surface/wait_for_cq_end_op.h - src/core/lib/surface/wait_for_cq_end_op.h
- src/core/lib/transport/batch_builder.h - src/core/lib/transport/batch_builder.h
@ -11869,6 +11867,7 @@ targets:
- src/core/resolver/resolver_factory.h - src/core/resolver/resolver_factory.h
- src/core/resolver/resolver_registry.h - src/core/resolver/resolver_registry.h
- src/core/resolver/server_address.h - src/core/resolver/server_address.h
- src/core/server/server_interface.h
- src/core/service_config/service_config.h - src/core/service_config/service_config.h
- src/core/service_config/service_config_call_data.h - src/core/service_config/service_config_call_data.h
- src/core/service_config/service_config_parser.h - src/core/service_config/service_config_parser.h
@ -17938,7 +17937,7 @@ targets:
language: c++ language: c++
headers: [] headers: []
src: src:
- test/core/server_config_selector/server_config_selector_test.cc - test/core/server/server_config_selector_test.cc
deps: deps:
- gtest - gtest
- grpc_test_util - grpc_test_util
@ -20950,6 +20949,94 @@ targets:
- gtest - gtest
- grpc_test_util - grpc_test_util
uses_polling: false uses_polling: false
- name: xds_channel_stack_modifier_test
gtest: true
build: test
language: c++
headers:
- src/core/ext/filters/logging/logging_filter.h
- src/core/ext/filters/logging/logging_sink.h
- src/cpp/client/client_stats_interceptor.h
- src/cpp/client/create_channel_internal.h
- src/cpp/client/secure_credentials.h
- src/cpp/common/secure_auth_context.h
- src/cpp/ext/filters/census/client_filter.h
- src/cpp/ext/filters/census/context.h
- src/cpp/ext/filters/census/grpc_plugin.h
- src/cpp/ext/filters/census/measures.h
- src/cpp/ext/filters/census/open_census_call_tracer.h
- src/cpp/ext/filters/census/rpc_encoding.h
- src/cpp/ext/filters/census/server_call_tracer.h
- src/cpp/server/backend_metric_recorder.h
- src/cpp/server/dynamic_thread_pool.h
- src/cpp/server/external_connection_acceptor_impl.h
- src/cpp/server/health/default_health_check_service.h
- src/cpp/server/secure_server_credentials.h
- src/cpp/server/thread_pool_interface.h
- src/cpp/thread_manager/thread_manager.h
src:
- src/core/ext/filters/logging/logging_filter.cc
- src/cpp/client/call_credentials.cc
- src/cpp/client/channel_cc.cc
- src/cpp/client/channel_credentials.cc
- src/cpp/client/client_callback.cc
- src/cpp/client/client_context.cc
- src/cpp/client/client_interceptor.cc
- src/cpp/client/client_stats_interceptor.cc
- src/cpp/client/create_channel.cc
- src/cpp/client/create_channel_internal.cc
- src/cpp/client/create_channel_posix.cc
- src/cpp/client/insecure_credentials.cc
- src/cpp/client/secure_credentials.cc
- src/cpp/common/alarm.cc
- src/cpp/common/auth_property_iterator.cc
- src/cpp/common/channel_arguments.cc
- src/cpp/common/completion_queue_cc.cc
- src/cpp/common/resource_quota_cc.cc
- src/cpp/common/rpc_method.cc
- src/cpp/common/secure_auth_context.cc
- src/cpp/common/secure_create_auth_context.cc
- src/cpp/common/tls_certificate_provider.cc
- src/cpp/common/tls_certificate_verifier.cc
- src/cpp/common/tls_credentials_options.cc
- src/cpp/common/validate_service_config.cc
- src/cpp/common/version_cc.cc
- src/cpp/ext/filters/census/client_filter.cc
- src/cpp/ext/filters/census/context.cc
- src/cpp/ext/filters/census/grpc_plugin.cc
- src/cpp/ext/filters/census/measures.cc
- src/cpp/ext/filters/census/rpc_encoding.cc
- src/cpp/ext/filters/census/server_call_tracer.cc
- src/cpp/ext/filters/census/views.cc
- src/cpp/server/async_generic_service.cc
- src/cpp/server/backend_metric_recorder.cc
- src/cpp/server/channel_argument_option.cc
- src/cpp/server/create_default_thread_pool.cc
- src/cpp/server/external_connection_acceptor_impl.cc
- src/cpp/server/health/default_health_check_service.cc
- src/cpp/server/health/health_check_service.cc
- src/cpp/server/health/health_check_service_server_builder_option.cc
- src/cpp/server/insecure_server_credentials.cc
- src/cpp/server/secure_server_credentials.cc
- src/cpp/server/server_builder.cc
- src/cpp/server/server_callback.cc
- src/cpp/server/server_cc.cc
- src/cpp/server/server_context.cc
- src/cpp/server/server_credentials.cc
- src/cpp/server/server_posix.cc
- src/cpp/thread_manager/thread_manager.cc
- src/cpp/util/byte_buffer_cc.cc
- src/cpp/util/status.cc
- src/cpp/util/string_ref.cc
- src/cpp/util/time_cc.cc
- test/core/server/xds_channel_stack_modifier_test.cc
deps:
- gtest
- absl/base:endian
- absl/numeric:int128
- protobuf
- grpc_test_util
uses_polling: false
- name: xds_client_test - name: xds_client_test
gtest: true gtest: true
build: test build: test

12
config.m4 generated

@ -74,7 +74,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/message_size/message_size_filter.cc \ src/core/ext/filters/message_size/message_size_filter.cc \
src/core/ext/filters/rbac/rbac_filter.cc \ src/core/ext/filters/rbac/rbac_filter.cc \
src/core/ext/filters/rbac/rbac_service_config_parser.cc \ src/core/ext/filters/rbac/rbac_service_config_parser.cc \
src/core/ext/filters/server_config_selector/server_config_selector_filter.cc \
src/core/ext/filters/stateful_session/stateful_session_filter.cc \ src/core/ext/filters/stateful_session/stateful_session_filter.cc \
src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc \ src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc \
src/core/ext/gcp/metadata_query.cc \ src/core/ext/gcp/metadata_query.cc \
@ -437,7 +436,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/xds/xds_bootstrap.cc \ src/core/ext/xds/xds_bootstrap.cc \
src/core/ext/xds/xds_bootstrap_grpc.cc \ src/core/ext/xds/xds_bootstrap_grpc.cc \
src/core/ext/xds/xds_certificate_provider.cc \ src/core/ext/xds/xds_certificate_provider.cc \
src/core/ext/xds/xds_channel_stack_modifier.cc \
src/core/ext/xds/xds_client.cc \ src/core/ext/xds/xds_client.cc \
src/core/ext/xds/xds_client_grpc.cc \ src/core/ext/xds/xds_client_grpc.cc \
src/core/ext/xds/xds_client_stats.cc \ src/core/ext/xds/xds_client_stats.cc \
@ -454,7 +452,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/xds/xds_listener.cc \ src/core/ext/xds/xds_listener.cc \
src/core/ext/xds/xds_route_config.cc \ src/core/ext/xds/xds_route_config.cc \
src/core/ext/xds/xds_routing.cc \ src/core/ext/xds/xds_routing.cc \
src/core/ext/xds/xds_server_config_fetcher.cc \
src/core/ext/xds/xds_transport_grpc.cc \ src/core/ext/xds/xds_transport_grpc.cc \
src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \ src/core/handshaker/endpoint_info/endpoint_info_handshaker.cc \
src/core/handshaker/handshaker.cc \ src/core/handshaker/handshaker.cc \
@ -480,7 +477,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \ src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \ src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/server_call_tracer_filter.cc \
src/core/lib/channel/status_util.cc \ src/core/lib/channel/status_util.cc \
src/core/lib/compression/compression.cc \ src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \ src/core/lib/compression/compression_internal.cc \
@ -779,7 +775,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/surface/lame_client.cc \ src/core/lib/surface/lame_client.cc \
src/core/lib/surface/legacy_channel.cc \ src/core/lib/surface/legacy_channel.cc \
src/core/lib/surface/metadata_array.cc \ src/core/lib/surface/metadata_array.cc \
src/core/lib/surface/server.cc \
src/core/lib/surface/validate_metadata.cc \ src/core/lib/surface/validate_metadata.cc \
src/core/lib/surface/version.cc \ src/core/lib/surface/version.cc \
src/core/lib/surface/wait_for_cq_end_op.cc \ src/core/lib/surface/wait_for_cq_end_op.cc \
@ -851,6 +846,11 @@ if test "$PHP_GRPC" != "no"; then
src/core/resolver/xds/xds_dependency_manager.cc \ src/core/resolver/xds/xds_dependency_manager.cc \
src/core/resolver/xds/xds_resolver.cc \ src/core/resolver/xds/xds_resolver.cc \
src/core/resolver/xds/xds_resolver_trace.cc \ src/core/resolver/xds/xds_resolver_trace.cc \
src/core/server/server.cc \
src/core/server/server_call_tracer_filter.cc \
src/core/server/server_config_selector_filter.cc \
src/core/server/xds_channel_stack_modifier.cc \
src/core/server/xds_server_config_fetcher.cc \
src/core/service_config/service_config_channel_arg_filter.cc \ src/core/service_config/service_config_channel_arg_filter.cc \
src/core/service_config/service_config_impl.cc \ src/core/service_config/service_config_impl.cc \
src/core/service_config/service_config_parser.cc \ src/core/service_config/service_config_parser.cc \
@ -1397,7 +1397,6 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/http/server) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/http/server)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/message_size) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/message_size)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/rbac) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/rbac)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/server_config_selector)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/stateful_session) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/stateful_session)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/gcp) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/gcp)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/alpn)
@ -1598,6 +1597,7 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/google_c2p) PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/google_c2p)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/sockaddr)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/xds) PHP_ADD_BUILD_DIR($ext_builddir/src/core/resolver/xds)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/server)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/service_config) PHP_ADD_BUILD_DIR($ext_builddir/src/core/service_config)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/crypt) PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi/alts/crypt)

12
config.w32 generated

@ -39,7 +39,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\message_size\\message_size_filter.cc " + "src\\core\\ext\\filters\\message_size\\message_size_filter.cc " +
"src\\core\\ext\\filters\\rbac\\rbac_filter.cc " + "src\\core\\ext\\filters\\rbac\\rbac_filter.cc " +
"src\\core\\ext\\filters\\rbac\\rbac_service_config_parser.cc " + "src\\core\\ext\\filters\\rbac\\rbac_service_config_parser.cc " +
"src\\core\\ext\\filters\\server_config_selector\\server_config_selector_filter.cc " +
"src\\core\\ext\\filters\\stateful_session\\stateful_session_filter.cc " + "src\\core\\ext\\filters\\stateful_session\\stateful_session_filter.cc " +
"src\\core\\ext\\filters\\stateful_session\\stateful_session_service_config_parser.cc " + "src\\core\\ext\\filters\\stateful_session\\stateful_session_service_config_parser.cc " +
"src\\core\\ext\\gcp\\metadata_query.cc " + "src\\core\\ext\\gcp\\metadata_query.cc " +
@ -402,7 +401,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\xds\\xds_bootstrap.cc " + "src\\core\\ext\\xds\\xds_bootstrap.cc " +
"src\\core\\ext\\xds\\xds_bootstrap_grpc.cc " + "src\\core\\ext\\xds\\xds_bootstrap_grpc.cc " +
"src\\core\\ext\\xds\\xds_certificate_provider.cc " + "src\\core\\ext\\xds\\xds_certificate_provider.cc " +
"src\\core\\ext\\xds\\xds_channel_stack_modifier.cc " +
"src\\core\\ext\\xds\\xds_client.cc " + "src\\core\\ext\\xds\\xds_client.cc " +
"src\\core\\ext\\xds\\xds_client_grpc.cc " + "src\\core\\ext\\xds\\xds_client_grpc.cc " +
"src\\core\\ext\\xds\\xds_client_stats.cc " + "src\\core\\ext\\xds\\xds_client_stats.cc " +
@ -419,7 +417,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\xds\\xds_listener.cc " + "src\\core\\ext\\xds\\xds_listener.cc " +
"src\\core\\ext\\xds\\xds_route_config.cc " + "src\\core\\ext\\xds\\xds_route_config.cc " +
"src\\core\\ext\\xds\\xds_routing.cc " + "src\\core\\ext\\xds\\xds_routing.cc " +
"src\\core\\ext\\xds\\xds_server_config_fetcher.cc " +
"src\\core\\ext\\xds\\xds_transport_grpc.cc " + "src\\core\\ext\\xds\\xds_transport_grpc.cc " +
"src\\core\\handshaker\\endpoint_info\\endpoint_info_handshaker.cc " + "src\\core\\handshaker\\endpoint_info\\endpoint_info_handshaker.cc " +
"src\\core\\handshaker\\handshaker.cc " + "src\\core\\handshaker\\handshaker.cc " +
@ -445,7 +442,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\connected_channel.cc " + "src\\core\\lib\\channel\\connected_channel.cc " +
"src\\core\\lib\\channel\\metrics.cc " + "src\\core\\lib\\channel\\metrics.cc " +
"src\\core\\lib\\channel\\promise_based_filter.cc " + "src\\core\\lib\\channel\\promise_based_filter.cc " +
"src\\core\\lib\\channel\\server_call_tracer_filter.cc " +
"src\\core\\lib\\channel\\status_util.cc " + "src\\core\\lib\\channel\\status_util.cc " +
"src\\core\\lib\\compression\\compression.cc " + "src\\core\\lib\\compression\\compression.cc " +
"src\\core\\lib\\compression\\compression_internal.cc " + "src\\core\\lib\\compression\\compression_internal.cc " +
@ -744,7 +740,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\surface\\lame_client.cc " + "src\\core\\lib\\surface\\lame_client.cc " +
"src\\core\\lib\\surface\\legacy_channel.cc " + "src\\core\\lib\\surface\\legacy_channel.cc " +
"src\\core\\lib\\surface\\metadata_array.cc " + "src\\core\\lib\\surface\\metadata_array.cc " +
"src\\core\\lib\\surface\\server.cc " +
"src\\core\\lib\\surface\\validate_metadata.cc " + "src\\core\\lib\\surface\\validate_metadata.cc " +
"src\\core\\lib\\surface\\version.cc " + "src\\core\\lib\\surface\\version.cc " +
"src\\core\\lib\\surface\\wait_for_cq_end_op.cc " + "src\\core\\lib\\surface\\wait_for_cq_end_op.cc " +
@ -816,6 +811,11 @@ if (PHP_GRPC != "no") {
"src\\core\\resolver\\xds\\xds_dependency_manager.cc " + "src\\core\\resolver\\xds\\xds_dependency_manager.cc " +
"src\\core\\resolver\\xds\\xds_resolver.cc " + "src\\core\\resolver\\xds\\xds_resolver.cc " +
"src\\core\\resolver\\xds\\xds_resolver_trace.cc " + "src\\core\\resolver\\xds\\xds_resolver_trace.cc " +
"src\\core\\server\\server.cc " +
"src\\core\\server\\server_call_tracer_filter.cc " +
"src\\core\\server\\server_config_selector_filter.cc " +
"src\\core\\server\\xds_channel_stack_modifier.cc " +
"src\\core\\server\\xds_server_config_fetcher.cc " +
"src\\core\\service_config\\service_config_channel_arg_filter.cc " + "src\\core\\service_config\\service_config_channel_arg_filter.cc " +
"src\\core\\service_config\\service_config_impl.cc " + "src\\core\\service_config\\service_config_impl.cc " +
"src\\core\\service_config\\service_config_parser.cc " + "src\\core\\service_config\\service_config_parser.cc " +
@ -1391,7 +1391,6 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\server"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\server");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\message_size"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\message_size");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\rbac"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\rbac");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\server_config_selector");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\stateful_session"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\stateful_session");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\gcp"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\gcp");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport");
@ -1736,6 +1735,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\google_c2p"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\google_c2p");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\sockaddr"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\sockaddr");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\xds"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\resolver\\xds");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\server");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\service_config"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\service_config");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi\\alts");

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: helloworld.proto # source: helloworld.proto
# Protobuf Python Version: 4.25.1 # Protobuf Python Version: 5.26.1
"""Generated protocol buffer code.""" """Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import descriptor_pool as _descriptor_pool
@ -19,8 +19,8 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10helloworld.pro
_globals = globals() _globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'helloworld_pb2', _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'helloworld_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False: if not _descriptor._USE_C_DESCRIPTORS:
_globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._loaded_options = None
_globals['DESCRIPTOR']._serialized_options = b'\n\033io.grpc.examples.helloworldB\017HelloWorldProtoP\001\242\002\003HLW' _globals['DESCRIPTOR']._serialized_options = b'\n\033io.grpc.examples.helloworldB\017HelloWorldProtoP\001\242\002\003HLW'
_globals['_HELLOREQUEST']._serialized_start=32 _globals['_HELLOREQUEST']._serialized_start=32
_globals['_HELLOREQUEST']._serialized_end=60 _globals['_HELLOREQUEST']._serialized_end=60

@ -5,7 +5,7 @@ import warnings
import helloworld_pb2 as helloworld__pb2 import helloworld_pb2 as helloworld__pb2
GRPC_GENERATED_VERSION = '1.63.0.dev0' GRPC_GENERATED_VERSION = '1.64.0.dev0'
GRPC_VERSION = grpc.__version__ GRPC_VERSION = grpc.__version__
EXPECTED_ERROR_RELEASE = '1.65.0' EXPECTED_ERROR_RELEASE = '1.65.0'
SCHEDULED_RELEASE_DATE = 'June 25, 2024' SCHEDULED_RELEASE_DATE = 'June 25, 2024'
@ -102,6 +102,7 @@ def add_GreeterServicer_to_server(servicer, server):
generic_handler = grpc.method_handlers_generic_handler( generic_handler = grpc.method_handlers_generic_handler(
'helloworld.Greeter', rpc_method_handlers) 'helloworld.Greeter', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,)) server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('helloworld.Greeter', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API. # This class is part of an EXPERIMENTAL API.

26
gRPC-C++.podspec generated

@ -295,8 +295,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/message_size/message_size_filter.h', 'src/core/ext/filters/message_size/message_size_filter.h',
'src/core/ext/filters/rbac/rbac_filter.h', 'src/core/ext/filters/rbac/rbac_filter.h',
'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/rbac/rbac_service_config_parser.h',
'src/core/ext/filters/server_config_selector/server_config_selector.h',
'src/core/ext/filters/server_config_selector/server_config_selector_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_filter.h', 'src/core/ext/filters/stateful_session/stateful_session_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h', 'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h',
'src/core/ext/gcp/metadata_query.h', 'src/core/ext/gcp/metadata_query.h',
@ -864,7 +862,6 @@ Pod::Spec.new do |s|
'src/core/ext/xds/xds_bootstrap_grpc.h', 'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h', 'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h', 'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_channel_stack_modifier.h',
'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h', 'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_client_stats.h',
@ -917,7 +914,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/context.h', 'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h', 'src/core/lib/channel/metrics.h',
'src/core/lib/channel/promise_based_filter.h', 'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/server_call_tracer_filter.h',
'src/core/lib/channel/status_util.h', 'src/core/lib/channel/status_util.h',
'src/core/lib/channel/tcp_tracer.h', 'src/core/lib/channel/tcp_tracer.h',
'src/core/lib/compression/compression_internal.h', 'src/core/lib/compression/compression_internal.h',
@ -997,7 +993,6 @@ Pod::Spec.new do |s|
'src/core/lib/experiments/config.h', 'src/core/lib/experiments/config.h',
'src/core/lib/experiments/experiments.h', 'src/core/lib/experiments/experiments.h',
'src/core/lib/gpr/alloc.h', 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/log_internal.h',
'src/core/lib/gpr/spinlock.h', 'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h', 'src/core/lib/gpr/string.h',
'src/core/lib/gpr/time_precise.h', 'src/core/lib/gpr/time_precise.h',
@ -1241,8 +1236,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/init_internally.h', 'src/core/lib/surface/init_internally.h',
'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/legacy_channel.h', 'src/core/lib/surface/legacy_channel.h',
'src/core/lib/surface/server.h',
'src/core/lib/surface/server_interface.h',
'src/core/lib/surface/validate_metadata.h', 'src/core/lib/surface/validate_metadata.h',
'src/core/lib/surface/wait_for_cq_end_op.h', 'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h', 'src/core/lib/transport/batch_builder.h',
@ -1311,6 +1304,12 @@ Pod::Spec.new do |s|
'src/core/resolver/xds/xds_dependency_manager.h', 'src/core/resolver/xds/xds_dependency_manager.h',
'src/core/resolver/xds/xds_resolver_attributes.h', 'src/core/resolver/xds/xds_resolver_attributes.h',
'src/core/resolver/xds/xds_resolver_trace.h', 'src/core/resolver/xds/xds_resolver_trace.h',
'src/core/server/server.h',
'src/core/server/server_call_tracer_filter.h',
'src/core/server/server_config_selector.h',
'src/core/server/server_config_selector_filter.h',
'src/core/server/server_interface.h',
'src/core/server/xds_channel_stack_modifier.h',
'src/core/service_config/service_config.h', 'src/core/service_config/service_config.h',
'src/core/service_config/service_config_call_data.h', 'src/core/service_config/service_config_call_data.h',
'src/core/service_config/service_config_impl.h', 'src/core/service_config/service_config_impl.h',
@ -1583,8 +1582,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/message_size/message_size_filter.h', 'src/core/ext/filters/message_size/message_size_filter.h',
'src/core/ext/filters/rbac/rbac_filter.h', 'src/core/ext/filters/rbac/rbac_filter.h',
'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/rbac/rbac_service_config_parser.h',
'src/core/ext/filters/server_config_selector/server_config_selector.h',
'src/core/ext/filters/server_config_selector/server_config_selector_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_filter.h', 'src/core/ext/filters/stateful_session/stateful_session_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h', 'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h',
'src/core/ext/gcp/metadata_query.h', 'src/core/ext/gcp/metadata_query.h',
@ -2134,7 +2131,6 @@ Pod::Spec.new do |s|
'src/core/ext/xds/xds_bootstrap_grpc.h', 'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h', 'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h', 'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_channel_stack_modifier.h',
'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h', 'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_client_stats.h',
@ -2187,7 +2183,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/context.h', 'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h', 'src/core/lib/channel/metrics.h',
'src/core/lib/channel/promise_based_filter.h', 'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/server_call_tracer_filter.h',
'src/core/lib/channel/status_util.h', 'src/core/lib/channel/status_util.h',
'src/core/lib/channel/tcp_tracer.h', 'src/core/lib/channel/tcp_tracer.h',
'src/core/lib/compression/compression_internal.h', 'src/core/lib/compression/compression_internal.h',
@ -2267,7 +2262,6 @@ Pod::Spec.new do |s|
'src/core/lib/experiments/config.h', 'src/core/lib/experiments/config.h',
'src/core/lib/experiments/experiments.h', 'src/core/lib/experiments/experiments.h',
'src/core/lib/gpr/alloc.h', 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/log_internal.h',
'src/core/lib/gpr/spinlock.h', 'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h', 'src/core/lib/gpr/string.h',
'src/core/lib/gpr/time_precise.h', 'src/core/lib/gpr/time_precise.h',
@ -2511,8 +2505,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/init_internally.h', 'src/core/lib/surface/init_internally.h',
'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/legacy_channel.h', 'src/core/lib/surface/legacy_channel.h',
'src/core/lib/surface/server.h',
'src/core/lib/surface/server_interface.h',
'src/core/lib/surface/validate_metadata.h', 'src/core/lib/surface/validate_metadata.h',
'src/core/lib/surface/wait_for_cq_end_op.h', 'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h', 'src/core/lib/transport/batch_builder.h',
@ -2581,6 +2573,12 @@ Pod::Spec.new do |s|
'src/core/resolver/xds/xds_dependency_manager.h', 'src/core/resolver/xds/xds_dependency_manager.h',
'src/core/resolver/xds/xds_resolver_attributes.h', 'src/core/resolver/xds/xds_resolver_attributes.h',
'src/core/resolver/xds/xds_resolver_trace.h', 'src/core/resolver/xds/xds_resolver_trace.h',
'src/core/server/server.h',
'src/core/server/server_call_tracer_filter.h',
'src/core/server/server_config_selector.h',
'src/core/server/server_config_selector_filter.h',
'src/core/server/server_interface.h',
'src/core/server/xds_channel_stack_modifier.h',
'src/core/service_config/service_config.h', 'src/core/service_config/service_config.h',
'src/core/service_config/service_config_call_data.h', 'src/core/service_config/service_config_call_data.h',
'src/core/service_config/service_config_impl.h', 'src/core/service_config/service_config_impl.h',

36
gRPC-Core.podspec generated

@ -301,9 +301,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/rbac/rbac_filter.h', 'src/core/ext/filters/rbac/rbac_filter.h',
'src/core/ext/filters/rbac/rbac_service_config_parser.cc', 'src/core/ext/filters/rbac/rbac_service_config_parser.cc',
'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/rbac/rbac_service_config_parser.h',
'src/core/ext/filters/server_config_selector/server_config_selector.h',
'src/core/ext/filters/server_config_selector/server_config_selector_filter.cc',
'src/core/ext/filters/server_config_selector/server_config_selector_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_filter.cc', 'src/core/ext/filters/stateful_session/stateful_session_filter.cc',
'src/core/ext/filters/stateful_session/stateful_session_filter.h', 'src/core/ext/filters/stateful_session/stateful_session_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc', 'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc',
@ -1195,8 +1192,6 @@ Pod::Spec.new do |s|
'src/core/ext/xds/xds_certificate_provider.cc', 'src/core/ext/xds/xds_certificate_provider.cc',
'src/core/ext/xds/xds_certificate_provider.h', 'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h', 'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_channel_stack_modifier.cc',
'src/core/ext/xds/xds_channel_stack_modifier.h',
'src/core/ext/xds/xds_client.cc', 'src/core/ext/xds/xds_client.cc',
'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.cc', 'src/core/ext/xds/xds_client_grpc.cc',
@ -1232,7 +1227,6 @@ Pod::Spec.new do |s|
'src/core/ext/xds/xds_route_config.h', 'src/core/ext/xds/xds_route_config.h',
'src/core/ext/xds/xds_routing.cc', 'src/core/ext/xds/xds_routing.cc',
'src/core/ext/xds/xds_routing.h', 'src/core/ext/xds/xds_routing.h',
'src/core/ext/xds/xds_server_config_fetcher.cc',
'src/core/ext/xds/xds_transport.h', 'src/core/ext/xds/xds_transport.h',
'src/core/ext/xds/xds_transport_grpc.cc', 'src/core/ext/xds/xds_transport_grpc.cc',
'src/core/ext/xds/xds_transport_grpc.h', 'src/core/ext/xds/xds_transport_grpc.h',
@ -1290,8 +1284,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/metrics.h', 'src/core/lib/channel/metrics.h',
'src/core/lib/channel/promise_based_filter.cc', 'src/core/lib/channel/promise_based_filter.cc',
'src/core/lib/channel/promise_based_filter.h', 'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/server_call_tracer_filter.cc',
'src/core/lib/channel/server_call_tracer_filter.h',
'src/core/lib/channel/status_util.cc', 'src/core/lib/channel/status_util.cc',
'src/core/lib/channel/status_util.h', 'src/core/lib/channel/status_util.h',
'src/core/lib/channel/tcp_tracer.h', 'src/core/lib/channel/tcp_tracer.h',
@ -1441,7 +1433,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/linux/cpu.cc', 'src/core/lib/gpr/linux/cpu.cc',
'src/core/lib/gpr/linux/log.cc', 'src/core/lib/gpr/linux/log.cc',
'src/core/lib/gpr/log.cc', 'src/core/lib/gpr/log.cc',
'src/core/lib/gpr/log_internal.h',
'src/core/lib/gpr/msys/tmpfile.cc', 'src/core/lib/gpr/msys/tmpfile.cc',
'src/core/lib/gpr/posix/cpu.cc', 'src/core/lib/gpr/posix/cpu.cc',
'src/core/lib/gpr/posix/log.cc', 'src/core/lib/gpr/posix/log.cc',
@ -1913,9 +1904,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/legacy_channel.cc', 'src/core/lib/surface/legacy_channel.cc',
'src/core/lib/surface/legacy_channel.h', 'src/core/lib/surface/legacy_channel.h',
'src/core/lib/surface/metadata_array.cc', 'src/core/lib/surface/metadata_array.cc',
'src/core/lib/surface/server.cc',
'src/core/lib/surface/server.h',
'src/core/lib/surface/server_interface.h',
'src/core/lib/surface/validate_metadata.cc', 'src/core/lib/surface/validate_metadata.cc',
'src/core/lib/surface/validate_metadata.h', 'src/core/lib/surface/validate_metadata.h',
'src/core/lib/surface/version.cc', 'src/core/lib/surface/version.cc',
@ -2055,6 +2043,17 @@ Pod::Spec.new do |s|
'src/core/resolver/xds/xds_resolver_attributes.h', 'src/core/resolver/xds/xds_resolver_attributes.h',
'src/core/resolver/xds/xds_resolver_trace.cc', 'src/core/resolver/xds/xds_resolver_trace.cc',
'src/core/resolver/xds/xds_resolver_trace.h', 'src/core/resolver/xds/xds_resolver_trace.h',
'src/core/server/server.cc',
'src/core/server/server.h',
'src/core/server/server_call_tracer_filter.cc',
'src/core/server/server_call_tracer_filter.h',
'src/core/server/server_config_selector.h',
'src/core/server/server_config_selector_filter.cc',
'src/core/server/server_config_selector_filter.h',
'src/core/server/server_interface.h',
'src/core/server/xds_channel_stack_modifier.cc',
'src/core/server/xds_channel_stack_modifier.h',
'src/core/server/xds_server_config_fetcher.cc',
'src/core/service_config/service_config.h', 'src/core/service_config/service_config.h',
'src/core/service_config/service_config_call_data.h', 'src/core/service_config/service_config_call_data.h',
'src/core/service_config/service_config_channel_arg_filter.cc', 'src/core/service_config/service_config_channel_arg_filter.cc',
@ -2382,8 +2381,6 @@ Pod::Spec.new do |s|
'src/core/ext/filters/message_size/message_size_filter.h', 'src/core/ext/filters/message_size/message_size_filter.h',
'src/core/ext/filters/rbac/rbac_filter.h', 'src/core/ext/filters/rbac/rbac_filter.h',
'src/core/ext/filters/rbac/rbac_service_config_parser.h', 'src/core/ext/filters/rbac/rbac_service_config_parser.h',
'src/core/ext/filters/server_config_selector/server_config_selector.h',
'src/core/ext/filters/server_config_selector/server_config_selector_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_filter.h', 'src/core/ext/filters/stateful_session/stateful_session_filter.h',
'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h', 'src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h',
'src/core/ext/gcp/metadata_query.h', 'src/core/ext/gcp/metadata_query.h',
@ -2913,7 +2910,6 @@ Pod::Spec.new do |s|
'src/core/ext/xds/xds_bootstrap_grpc.h', 'src/core/ext/xds/xds_bootstrap_grpc.h',
'src/core/ext/xds/xds_certificate_provider.h', 'src/core/ext/xds/xds_certificate_provider.h',
'src/core/ext/xds/xds_channel_args.h', 'src/core/ext/xds/xds_channel_args.h',
'src/core/ext/xds/xds_channel_stack_modifier.h',
'src/core/ext/xds/xds_client.h', 'src/core/ext/xds/xds_client.h',
'src/core/ext/xds/xds_client_grpc.h', 'src/core/ext/xds/xds_client_grpc.h',
'src/core/ext/xds/xds_client_stats.h', 'src/core/ext/xds/xds_client_stats.h',
@ -2965,7 +2961,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/context.h', 'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h', 'src/core/lib/channel/metrics.h',
'src/core/lib/channel/promise_based_filter.h', 'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/server_call_tracer_filter.h',
'src/core/lib/channel/status_util.h', 'src/core/lib/channel/status_util.h',
'src/core/lib/channel/tcp_tracer.h', 'src/core/lib/channel/tcp_tracer.h',
'src/core/lib/compression/compression_internal.h', 'src/core/lib/compression/compression_internal.h',
@ -3045,7 +3040,6 @@ Pod::Spec.new do |s|
'src/core/lib/experiments/config.h', 'src/core/lib/experiments/config.h',
'src/core/lib/experiments/experiments.h', 'src/core/lib/experiments/experiments.h',
'src/core/lib/gpr/alloc.h', 'src/core/lib/gpr/alloc.h',
'src/core/lib/gpr/log_internal.h',
'src/core/lib/gpr/spinlock.h', 'src/core/lib/gpr/spinlock.h',
'src/core/lib/gpr/string.h', 'src/core/lib/gpr/string.h',
'src/core/lib/gpr/time_precise.h', 'src/core/lib/gpr/time_precise.h',
@ -3289,8 +3283,6 @@ Pod::Spec.new do |s|
'src/core/lib/surface/init_internally.h', 'src/core/lib/surface/init_internally.h',
'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/lame_client.h',
'src/core/lib/surface/legacy_channel.h', 'src/core/lib/surface/legacy_channel.h',
'src/core/lib/surface/server.h',
'src/core/lib/surface/server_interface.h',
'src/core/lib/surface/validate_metadata.h', 'src/core/lib/surface/validate_metadata.h',
'src/core/lib/surface/wait_for_cq_end_op.h', 'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h', 'src/core/lib/transport/batch_builder.h',
@ -3359,6 +3351,12 @@ Pod::Spec.new do |s|
'src/core/resolver/xds/xds_dependency_manager.h', 'src/core/resolver/xds/xds_dependency_manager.h',
'src/core/resolver/xds/xds_resolver_attributes.h', 'src/core/resolver/xds/xds_resolver_attributes.h',
'src/core/resolver/xds/xds_resolver_trace.h', 'src/core/resolver/xds/xds_resolver_trace.h',
'src/core/server/server.h',
'src/core/server/server_call_tracer_filter.h',
'src/core/server/server_config_selector.h',
'src/core/server/server_config_selector_filter.h',
'src/core/server/server_interface.h',
'src/core/server/xds_channel_stack_modifier.h',
'src/core/service_config/service_config.h', 'src/core/service_config/service_config.h',
'src/core/service_config/service_config_call_data.h', 'src/core/service_config/service_config_call_data.h',
'src/core/service_config/service_config_impl.h', 'src/core/service_config/service_config_impl.h',

23
grpc.gemspec generated

@ -190,9 +190,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/rbac/rbac_filter.h ) s.files += %w( src/core/ext/filters/rbac/rbac_filter.h )
s.files += %w( src/core/ext/filters/rbac/rbac_service_config_parser.cc ) s.files += %w( src/core/ext/filters/rbac/rbac_service_config_parser.cc )
s.files += %w( src/core/ext/filters/rbac/rbac_service_config_parser.h ) s.files += %w( src/core/ext/filters/rbac/rbac_service_config_parser.h )
s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector.h )
s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector_filter.cc )
s.files += %w( src/core/ext/filters/server_config_selector/server_config_selector_filter.h )
s.files += %w( src/core/ext/filters/stateful_session/stateful_session_filter.cc ) s.files += %w( src/core/ext/filters/stateful_session/stateful_session_filter.cc )
s.files += %w( src/core/ext/filters/stateful_session/stateful_session_filter.h ) s.files += %w( src/core/ext/filters/stateful_session/stateful_session_filter.h )
s.files += %w( src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc ) s.files += %w( src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc )
@ -1084,8 +1081,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/xds/xds_certificate_provider.cc ) s.files += %w( src/core/ext/xds/xds_certificate_provider.cc )
s.files += %w( src/core/ext/xds/xds_certificate_provider.h ) s.files += %w( src/core/ext/xds/xds_certificate_provider.h )
s.files += %w( src/core/ext/xds/xds_channel_args.h ) s.files += %w( src/core/ext/xds/xds_channel_args.h )
s.files += %w( src/core/ext/xds/xds_channel_stack_modifier.cc )
s.files += %w( src/core/ext/xds/xds_channel_stack_modifier.h )
s.files += %w( src/core/ext/xds/xds_client.cc ) s.files += %w( src/core/ext/xds/xds_client.cc )
s.files += %w( src/core/ext/xds/xds_client.h ) s.files += %w( src/core/ext/xds/xds_client.h )
s.files += %w( src/core/ext/xds/xds_client_grpc.cc ) s.files += %w( src/core/ext/xds/xds_client_grpc.cc )
@ -1121,7 +1116,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/xds/xds_route_config.h ) s.files += %w( src/core/ext/xds/xds_route_config.h )
s.files += %w( src/core/ext/xds/xds_routing.cc ) s.files += %w( src/core/ext/xds/xds_routing.cc )
s.files += %w( src/core/ext/xds/xds_routing.h ) s.files += %w( src/core/ext/xds/xds_routing.h )
s.files += %w( src/core/ext/xds/xds_server_config_fetcher.cc )
s.files += %w( src/core/ext/xds/xds_transport.h ) s.files += %w( src/core/ext/xds/xds_transport.h )
s.files += %w( src/core/ext/xds/xds_transport_grpc.cc ) s.files += %w( src/core/ext/xds/xds_transport_grpc.cc )
s.files += %w( src/core/ext/xds/xds_transport_grpc.h ) s.files += %w( src/core/ext/xds/xds_transport_grpc.h )
@ -1179,8 +1173,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/metrics.h ) s.files += %w( src/core/lib/channel/metrics.h )
s.files += %w( src/core/lib/channel/promise_based_filter.cc ) s.files += %w( src/core/lib/channel/promise_based_filter.cc )
s.files += %w( src/core/lib/channel/promise_based_filter.h ) s.files += %w( src/core/lib/channel/promise_based_filter.h )
s.files += %w( src/core/lib/channel/server_call_tracer_filter.cc )
s.files += %w( src/core/lib/channel/server_call_tracer_filter.h )
s.files += %w( src/core/lib/channel/status_util.cc ) s.files += %w( src/core/lib/channel/status_util.cc )
s.files += %w( src/core/lib/channel/status_util.h ) s.files += %w( src/core/lib/channel/status_util.h )
s.files += %w( src/core/lib/channel/tcp_tracer.h ) s.files += %w( src/core/lib/channel/tcp_tracer.h )
@ -1330,7 +1322,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/linux/cpu.cc ) s.files += %w( src/core/lib/gpr/linux/cpu.cc )
s.files += %w( src/core/lib/gpr/linux/log.cc ) s.files += %w( src/core/lib/gpr/linux/log.cc )
s.files += %w( src/core/lib/gpr/log.cc ) s.files += %w( src/core/lib/gpr/log.cc )
s.files += %w( src/core/lib/gpr/log_internal.h )
s.files += %w( src/core/lib/gpr/msys/tmpfile.cc ) s.files += %w( src/core/lib/gpr/msys/tmpfile.cc )
s.files += %w( src/core/lib/gpr/posix/cpu.cc ) s.files += %w( src/core/lib/gpr/posix/cpu.cc )
s.files += %w( src/core/lib/gpr/posix/log.cc ) s.files += %w( src/core/lib/gpr/posix/log.cc )
@ -1802,9 +1793,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/surface/legacy_channel.cc ) s.files += %w( src/core/lib/surface/legacy_channel.cc )
s.files += %w( src/core/lib/surface/legacy_channel.h ) s.files += %w( src/core/lib/surface/legacy_channel.h )
s.files += %w( src/core/lib/surface/metadata_array.cc ) s.files += %w( src/core/lib/surface/metadata_array.cc )
s.files += %w( src/core/lib/surface/server.cc )
s.files += %w( src/core/lib/surface/server.h )
s.files += %w( src/core/lib/surface/server_interface.h )
s.files += %w( src/core/lib/surface/validate_metadata.cc ) s.files += %w( src/core/lib/surface/validate_metadata.cc )
s.files += %w( src/core/lib/surface/validate_metadata.h ) s.files += %w( src/core/lib/surface/validate_metadata.h )
s.files += %w( src/core/lib/surface/version.cc ) s.files += %w( src/core/lib/surface/version.cc )
@ -1944,6 +1932,17 @@ Gem::Specification.new do |s|
s.files += %w( src/core/resolver/xds/xds_resolver_attributes.h ) s.files += %w( src/core/resolver/xds/xds_resolver_attributes.h )
s.files += %w( src/core/resolver/xds/xds_resolver_trace.cc ) s.files += %w( src/core/resolver/xds/xds_resolver_trace.cc )
s.files += %w( src/core/resolver/xds/xds_resolver_trace.h ) s.files += %w( src/core/resolver/xds/xds_resolver_trace.h )
s.files += %w( src/core/server/server.cc )
s.files += %w( src/core/server/server.h )
s.files += %w( src/core/server/server_call_tracer_filter.cc )
s.files += %w( src/core/server/server_call_tracer_filter.h )
s.files += %w( src/core/server/server_config_selector.h )
s.files += %w( src/core/server/server_config_selector_filter.cc )
s.files += %w( src/core/server/server_config_selector_filter.h )
s.files += %w( src/core/server/server_interface.h )
s.files += %w( src/core/server/xds_channel_stack_modifier.cc )
s.files += %w( src/core/server/xds_channel_stack_modifier.h )
s.files += %w( src/core/server/xds_server_config_fetcher.cc )
s.files += %w( src/core/service_config/service_config.h ) s.files += %w( src/core/service_config/service_config.h )
s.files += %w( src/core/service_config/service_config_call_data.h ) s.files += %w( src/core/service_config/service_config_call_data.h )
s.files += %w( src/core/service_config/service_config_channel_arg_filter.cc ) s.files += %w( src/core/service_config/service_config_channel_arg_filter.cc )

23
package.xml generated

@ -172,9 +172,6 @@
<file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_service_config_parser.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_service_config_parser.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_service_config_parser.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/rbac/rbac_service_config_parser.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/server_config_selector/server_config_selector.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/server_config_selector/server_config_selector_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/server_config_selector/server_config_selector_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_filter.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc" role="src" />
@ -1066,8 +1063,6 @@
<file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_certificate_provider.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_channel_args.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_channel_args.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_channel_stack_modifier.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_channel_stack_modifier.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_client.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_client.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_client_grpc.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_client_grpc.cc" role="src" />
@ -1103,7 +1098,6 @@
<file baseinstalldir="/" name="src/core/ext/xds/xds_route_config.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_route_config.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_routing.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_routing.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_routing.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_routing.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_server_config_fetcher.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_transport.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.cc" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.h" role="src" /> <file baseinstalldir="/" name="src/core/ext/xds/xds_transport_grpc.h" role="src" />
@ -1161,8 +1155,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/metrics.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/metrics.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/server_call_tracer_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/server_call_tracer_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/status_util.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/status_util.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/status_util.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/status_util.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/tcp_tracer.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/channel/tcp_tracer.h" role="src" />
@ -1312,7 +1304,6 @@
<file baseinstalldir="/" name="src/core/lib/gpr/linux/cpu.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/linux/cpu.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/linux/log.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/linux/log.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/log.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/log.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/log_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/msys/tmpfile.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/msys/tmpfile.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/posix/cpu.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/posix/cpu.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/posix/log.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/gpr/posix/log.cc" role="src" />
@ -1784,9 +1775,6 @@
<file baseinstalldir="/" name="src/core/lib/surface/legacy_channel.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/legacy_channel.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/legacy_channel.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/legacy_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/metadata_array.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/metadata_array.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/server.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/server.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/server_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.h" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/validate_metadata.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/version.cc" role="src" /> <file baseinstalldir="/" name="src/core/lib/surface/version.cc" role="src" />
@ -1926,6 +1914,17 @@
<file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_attributes.h" role="src" /> <file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_attributes.h" role="src" />
<file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_trace.cc" role="src" /> <file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_trace.h" role="src" /> <file baseinstalldir="/" name="src/core/resolver/xds/xds_resolver_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/server/server.cc" role="src" />
<file baseinstalldir="/" name="src/core/server/server.h" role="src" />
<file baseinstalldir="/" name="src/core/server/server_call_tracer_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/server/server_call_tracer_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/server/server_config_selector.h" role="src" />
<file baseinstalldir="/" name="src/core/server/server_config_selector_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/server/server_config_selector_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/server/server_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/server/xds_channel_stack_modifier.cc" role="src" />
<file baseinstalldir="/" name="src/core/server/xds_channel_stack_modifier.h" role="src" />
<file baseinstalldir="/" name="src/core/server/xds_server_config_fetcher.cc" role="src" />
<file baseinstalldir="/" name="src/core/service_config/service_config.h" role="src" /> <file baseinstalldir="/" name="src/core/service_config/service_config.h" role="src" />
<file baseinstalldir="/" name="src/core/service_config/service_config_call_data.h" role="src" /> <file baseinstalldir="/" name="src/core/service_config/service_config_call_data.h" role="src" />
<file baseinstalldir="/" name="src/core/service_config/service_config_channel_arg_filter.cc" role="src" /> <file baseinstalldir="/" name="src/core/service_config/service_config_channel_arg_filter.cc" role="src" />

@ -574,6 +574,9 @@ bool PrivateGenerator::PrintAddServicerToServer(
"'$PackageQualifiedServiceName$', rpc_method_handlers)\n"); "'$PackageQualifiedServiceName$', rpc_method_handlers)\n");
} }
out->Print("server.add_generic_rpc_handlers((generic_handler,))\n"); out->Print("server.add_generic_rpc_handlers((generic_handler,))\n");
out->Print(method_dict,
"server.add_registered_method_handlers('$"
"PackageQualifiedServiceName$', rpc_method_handlers)\n");
} }
return true; return true;
} }

@ -119,10 +119,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "server_call_tracer_filter", name = "server_call_tracer_filter",
srcs = [ srcs = [
"lib/channel/server_call_tracer_filter.cc", "server/server_call_tracer_filter.cc",
], ],
hdrs = [ hdrs = [
"lib/channel/server_call_tracer_filter.h", "server/server_call_tracer_filter.h",
], ],
external_deps = [ external_deps = [
"absl/status", "absl/status",
@ -288,15 +288,6 @@ grpc_cc_library(
], ],
) )
grpc_cc_library(
name = "gpr_log_internal",
hdrs = [
"lib/gpr/log_internal.h",
],
language = "c++",
deps = ["//:gpr_platform"],
)
grpc_cc_library( grpc_cc_library(
name = "env", name = "env",
srcs = [ srcs = [
@ -483,6 +474,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "poll", name = "poll",
external_deps = ["absl/log:check"],
language = "c++", language = "c++",
public_hdrs = [ public_hdrs = [
"lib/promise/poll.h", "lib/promise/poll.h",
@ -497,6 +489,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "status_flag", name = "status_flag",
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/types:optional", "absl/types:optional",
@ -542,6 +535,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
], ],
@ -564,7 +558,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "context", name = "context",
external_deps = ["absl/meta:type_traits"], external_deps = [
"absl/log:check",
"absl/meta:type_traits",
],
language = "c++", language = "c++",
public_hdrs = [ public_hdrs = [
"lib/promise/context.h", "lib/promise/context.h",
@ -705,6 +702,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "promise_status", name = "promise_status",
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
], ],
@ -750,6 +748,9 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "join_state", name = "join_state",
external_deps = [
"absl/log:check",
],
language = "c++", language = "c++",
public_hdrs = [ public_hdrs = [
"lib/promise/detail/join_state.h", "lib/promise/detail/join_state.h",
@ -782,6 +783,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "try_join", name = "try_join",
external_deps = [ external_deps = [
"absl/log:check",
"absl/meta:type_traits", "absl/meta:type_traits",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
@ -836,6 +838,7 @@ grpc_cc_library(
name = "seq_state", name = "seq_state",
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/strings", "absl/strings",
], ],
language = "c++", language = "c++",
@ -872,6 +875,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "try_seq", name = "try_seq",
external_deps = [ external_deps = [
"absl/log:check",
"absl/meta:type_traits", "absl/meta:type_traits",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
@ -899,6 +903,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/status", "absl/status",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
@ -943,6 +948,7 @@ grpc_cc_library(
hdrs = [ hdrs = [
"lib/promise/event_engine_wakeup_scheduler.h", "lib/promise/event_engine_wakeup_scheduler.h",
], ],
external_deps = ["absl/log:check"],
language = "c++", language = "c++",
deps = [ deps = [
"//:event_engine_base_hdrs", "//:event_engine_base_hdrs",
@ -970,7 +976,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "latch", name = "latch",
external_deps = ["absl/strings"], external_deps = [
"absl/log:check",
"absl/strings",
],
language = "c++", language = "c++",
public_hdrs = [ public_hdrs = [
"lib/promise/latch.h", "lib/promise/latch.h",
@ -1008,6 +1017,7 @@ grpc_cc_library(
"lib/promise/interceptor_list.h", "lib/promise/interceptor_list.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
"absl/types:optional", "absl/types:optional",
@ -1030,6 +1040,7 @@ grpc_cc_library(
"lib/promise/pipe.h", "lib/promise/pipe.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/strings", "absl/strings",
"absl/types:optional", "absl/types:optional",
"absl/types:variant", "absl/types:variant",
@ -1056,6 +1067,7 @@ grpc_cc_library(
hdrs = [ hdrs = [
"lib/promise/promise_mutex.h", "lib/promise/promise_mutex.h",
], ],
external_deps = ["absl/log:check"],
language = "c++", language = "c++",
deps = [ deps = [
"activity", "activity",
@ -1103,7 +1115,10 @@ grpc_cc_library(
hdrs = [ hdrs = [
"lib/promise/mpsc.h", "lib/promise/mpsc.h",
], ],
external_deps = ["absl/base:core_headers"], external_deps = [
"absl/base:core_headers",
"absl/log:check",
],
language = "c++", language = "c++",
deps = [ deps = [
"activity", "activity",
@ -1123,6 +1138,7 @@ grpc_cc_library(
external_deps = [ external_deps = [
"absl/container:flat_hash_set", "absl/container:flat_hash_set",
"absl/functional:any_invocable", "absl/functional:any_invocable",
"absl/log:check",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -1135,6 +1151,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "for_each", name = "for_each",
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/strings", "absl/strings",
], ],
@ -1250,6 +1267,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/types:optional", "absl/types:optional",
@ -2839,7 +2857,10 @@ grpc_cc_library(
"lib/transport/bdp_estimator.cc", "lib/transport/bdp_estimator.cc",
], ],
hdrs = ["lib/transport/bdp_estimator.h"], hdrs = ["lib/transport/bdp_estimator.h"],
external_deps = ["absl/strings"], external_deps = [
"absl/log:check",
"absl/strings",
],
deps = [ deps = [
"time", "time",
"//:gpr", "//:gpr",
@ -3040,7 +3061,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "server_interface", name = "server_interface",
hdrs = [ hdrs = [
"lib/surface/server_interface.h", "server/server_interface.h",
], ],
language = "c++", language = "c++",
deps = [ deps = [
@ -3591,7 +3612,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "grpc_server_config_selector", name = "grpc_server_config_selector",
hdrs = [ hdrs = [
"ext/filters/server_config_selector/server_config_selector.h", "server/server_config_selector.h",
], ],
external_deps = [ external_deps = [
"absl/status:statusor", "absl/status:statusor",
@ -3614,10 +3635,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "grpc_server_config_selector_filter", name = "grpc_server_config_selector_filter",
srcs = [ srcs = [
"ext/filters/server_config_selector/server_config_selector_filter.cc", "server/server_config_selector_filter.cc",
], ],
hdrs = [ hdrs = [
"ext/filters/server_config_selector/server_config_selector_filter.h", "server/server_config_selector_filter.h",
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
@ -3964,6 +3985,7 @@ grpc_cc_library(
"lib/security/security_connector/ssl/ssl_security_connector.h", "lib/security/security_connector/ssl/ssl_security_connector.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
@ -4008,6 +4030,7 @@ grpc_cc_library(
"load_balancing/grpclb/grpclb.h", "load_balancing/grpclb/grpclb.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
"absl/types:optional", "absl/types:optional",
@ -4089,6 +4112,7 @@ grpc_cc_library(
"absl/base:core_headers", "absl/base:core_headers",
"absl/container:inlined_vector", "absl/container:inlined_vector",
"absl/functional:bind_front", "absl/functional:bind_front",
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
@ -4140,6 +4164,7 @@ grpc_cc_library(
"lib/security/credentials/iam/iam_credentials.h", "lib/security/credentials/iam/iam_credentials.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
@ -4173,6 +4198,7 @@ grpc_cc_library(
"lib/security/credentials/oauth2/oauth2_credentials.h", "lib/security/credentials/oauth2/oauth2_credentials.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
@ -4234,6 +4260,7 @@ grpc_cc_library(
"lib/security/credentials/external/url_external_account_credentials.h", "lib/security/credentials/external/url_external_account_credentials.h",
], ],
external_deps = [ external_deps = [
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/strings", "absl/strings",
@ -5173,10 +5200,10 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "grpc_xds_channel_stack_modifier", name = "grpc_xds_channel_stack_modifier",
srcs = [ srcs = [
"ext/xds/xds_channel_stack_modifier.cc", "server/xds_channel_stack_modifier.cc",
], ],
hdrs = [ hdrs = [
"ext/xds/xds_channel_stack_modifier.h", "server/xds_channel_stack_modifier.h",
], ],
external_deps = ["absl/strings"], external_deps = ["absl/strings"],
language = "c++", language = "c++",
@ -5198,7 +5225,7 @@ grpc_cc_library(
grpc_cc_library( grpc_cc_library(
name = "grpc_xds_server_config_fetcher", name = "grpc_xds_server_config_fetcher",
srcs = [ srcs = [
"ext/xds/xds_server_config_fetcher.cc", "server/xds_server_config_fetcher.cc",
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
@ -7065,6 +7092,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/status", "absl/status",
"absl/status:statusor", "absl/status:statusor",
"absl/types:optional", "absl/types:optional",
@ -7266,6 +7294,9 @@ grpc_cc_library(
hdrs = [ hdrs = [
"lib/transport/call_filters.h", "lib/transport/call_filters.h",
], ],
external_deps = [
"absl/log:check",
],
deps = [ deps = [
"call_final_info", "call_final_info",
"latch", "latch",
@ -7373,6 +7404,9 @@ grpc_cc_library(
hdrs = [ hdrs = [
"lib/transport/call_spine.h", "lib/transport/call_spine.h",
], ],
external_deps = [
"absl/log:check",
],
deps = [ deps = [
"1999", "1999",
"call_arena_allocator", "call_arena_allocator",
@ -7407,6 +7441,7 @@ grpc_cc_library(
"absl/container:flat_hash_set", "absl/container:flat_hash_set",
"absl/container:inlined_vector", "absl/container:inlined_vector",
"absl/functional:function_ref", "absl/functional:function_ref",
"absl/log:check",
"absl/meta:type_traits", "absl/meta:type_traits",
"absl/strings", "absl/strings",
"absl/strings:str_format", "absl/strings:str_format",
@ -7441,6 +7476,7 @@ grpc_cc_library(
], ],
external_deps = [ external_deps = [
"absl/base:core_headers", "absl/base:core_headers",
"absl/log:check",
"absl/types:optional", "absl/types:optional",
], ],
deps = [ deps = [

@ -307,13 +307,15 @@ void RegisterLegacyChannelIdleFilters(CoreConfiguration::Builder* builder) {
.If([](const ChannelArgs& channel_args) { .If([](const ChannelArgs& channel_args) {
return GetClientIdleTimeout(channel_args) != Duration::Infinity(); return GetClientIdleTimeout(channel_args) != Duration::Infinity();
}); });
builder->channel_init() if (!IsChaoticGoodEnabled()) {
->RegisterV2Filter<LegacyMaxAgeFilter>(GRPC_SERVER_CHANNEL) builder->channel_init()
.ExcludeFromMinimalStack() ->RegisterV2Filter<LegacyMaxAgeFilter>(GRPC_SERVER_CHANNEL)
.If([](const ChannelArgs& channel_args) { .ExcludeFromMinimalStack()
return LegacyMaxAgeFilter::Config::FromChannelArgs(channel_args) .If([](const ChannelArgs& channel_args) {
.enable(); return LegacyMaxAgeFilter::Config::FromChannelArgs(channel_args)
}); .enable();
});
}
} }
LegacyMaxAgeFilter::LegacyMaxAgeFilter(grpc_channel_stack* channel_stack, LegacyMaxAgeFilter::LegacyMaxAgeFilter(grpc_channel_stack* channel_stack,

@ -30,8 +30,8 @@
#include "src/core/ext/transport/binder/utils/ndk_binder.h" #include "src/core/ext/transport/binder/utils/ndk_binder.h"
#include "src/core/ext/transport/binder/wire_format/binder_android.h" #include "src/core/ext/transport/binder/wire_format/binder_android.h"
#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/error_utils.h"
#include "src/core/server/server.h"
#ifdef GPR_SUPPORT_BINDER_TRANSPORT #ifdef GPR_SUPPORT_BINDER_TRANSPORT

@ -26,8 +26,8 @@
#include "src/core/ext/transport/binder/transport/binder_transport.h" #include "src/core/ext/transport/binder/transport/binder_transport.h"
#include "src/core/ext/transport/binder/wire_format/binder.h" #include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/error_utils.h"
#include "src/core/server/server.h"
// TODO(waynetu): This is part of the public API and should be moved to the // TODO(waynetu): This is part of the public API and should be moved to the
// include/ folder. // include/ folder.

@ -62,11 +62,11 @@
#include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_buffer.h" #include "src/core/lib/slice/slice_buffer.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/promise_endpoint.h" #include "src/core/lib/transport/promise_endpoint.h"
#include "src/core/server/server.h"
namespace grpc_core { namespace grpc_core {
namespace chaotic_good { namespace chaotic_good {

@ -44,8 +44,8 @@
#include "src/core/lib/resource_quota/memory_quota.h" #include "src/core/lib/resource_quota/memory_quota.h"
#include "src/core/lib/resource_quota/resource_quota.h" #include "src/core/lib/resource_quota/resource_quota.h"
#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/promise_endpoint.h" #include "src/core/lib/transport/promise_endpoint.h"
#include "src/core/server/server.h"
namespace grpc_core { namespace grpc_core {
namespace chaotic_good { namespace chaotic_good {

@ -80,10 +80,10 @@
#include "src/core/lib/security/credentials/insecure/insecure_credentials.h" #include "src/core/lib/security/credentials/insecure/insecure_credentials.h"
#include "src/core/lib/security/security_connector/security_connector.h" #include "src/core/lib/security/security_connector/security_connector.h"
#include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/lib/uri/uri_parser.h" #include "src/core/lib/uri/uri_parser.h"
#include "src/core/server/server.h"
#ifdef GPR_SUPPORT_CHANNELS_FROM_FD #ifdef GPR_SUPPORT_CHANNELS_FROM_FD
#include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/ev_posix.h"

@ -25,7 +25,7 @@
#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/error.h"
#include "src/core/lib/surface/server.h" #include "src/core/server/server.h"
namespace grpc_core { namespace grpc_core {

@ -27,8 +27,8 @@
#include "src/core/lib/promise/promise.h" #include "src/core/lib/promise/promise.h"
#include "src/core/lib/promise/try_seq.h" #include "src/core/lib/promise/try_seq.h"
#include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/channel_create.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/server/server.h"
namespace grpc_core { namespace grpc_core {

@ -62,10 +62,10 @@
#include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/channel_create.h" #include "src/core/lib/surface/channel_create.h"
#include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/surface/channel_stack_type.h"
#include "src/core/lib/surface/server.h"
#include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/server/server.h"
#define INPROC_LOG(...) \ #define INPROC_LOG(...) \
do { \ do { \

@ -23,6 +23,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
@ -100,7 +101,7 @@ bool HandshakeManager::CallNextHandshakerLocked(grpc_error_handle error) {
this, StatusToString(error).c_str(), is_shutdown_, index_, this, StatusToString(error).c_str(), is_shutdown_, index_,
HandshakerArgsString(&args_).c_str()); HandshakerArgsString(&args_).c_str());
} }
GPR_ASSERT(index_ <= handshakers_.size()); CHECK(index_ <= handshakers_.size());
// If we got an error or we've been shut down or we're exiting early or // If we got an error or we've been shut down or we're exiting early or
// we've finished the last handshaker, invoke the on_handshake_done // we've finished the last handshaker, invoke the on_handshake_done
// callback. Otherwise, call the next handshaker. // callback. Otherwise, call the next handshaker.
@ -177,7 +178,7 @@ void HandshakeManager::DoHandshake(grpc_endpoint* endpoint,
bool done; bool done;
{ {
MutexLock lock(&mu_); MutexLock lock(&mu_);
GPR_ASSERT(index_ == 0); CHECK_EQ(index_, 0u);
// Construct handshaker args. These will be passed through all // Construct handshaker args. These will be passed through all
// handshakers and eventually be freed by the on_handshake_done callback. // handshakers and eventually be freed by the on_handshake_done callback.
args_.endpoint = endpoint; args_.endpoint = endpoint;

@ -21,6 +21,7 @@
#include <memory> #include <memory>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -124,7 +125,7 @@ void TCPConnectHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
MutexLock lock(&mu_); MutexLock lock(&mu_);
on_handshake_done_ = on_handshake_done; on_handshake_done_ = on_handshake_done;
} }
GPR_ASSERT(args->endpoint == nullptr); CHECK_EQ(args->endpoint, nullptr);
args_ = args; args_ = args;
absl::StatusOr<URI> uri = URI::Parse( absl::StatusOr<URI> uri = URI::Parse(
args->args.GetString(GRPC_ARG_TCP_HANDSHAKER_RESOLVED_ADDRESS).value()); args->args.GetString(GRPC_ARG_TCP_HANDSHAKER_RESOLVED_ADDRESS).value());
@ -179,7 +180,7 @@ void TCPConnectHandshaker::Connected(void* arg, grpc_error_handle error) {
} }
return; return;
} }
GPR_ASSERT(self->endpoint_to_destroy_ != nullptr); CHECK_NE(self->endpoint_to_destroy_, nullptr);
self->args_->endpoint = self->endpoint_to_destroy_; self->args_->endpoint = self->endpoint_to_destroy_;
self->endpoint_to_destroy_ = nullptr; self->endpoint_to_destroy_ = nullptr;
if (self->bind_endpoint_to_pollset_) { if (self->bind_endpoint_to_pollset_) {

@ -24,7 +24,6 @@
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#include "src/core/lib/gpr/log_internal.h"
#include "src/core/lib/gprpp/env.h" #include "src/core/lib/gprpp/env.h"
namespace grpc_core { namespace grpc_core {

@ -81,7 +81,7 @@ void WindowsEndpoint::AsyncIOState::DoTcpRead(SliceBuffer* buffer) {
GRPC_EVENT_ENGINE_ENDPOINT_TRACE("WindowsEndpoint::%p reading", endpoint); GRPC_EVENT_ENGINE_ENDPOINT_TRACE("WindowsEndpoint::%p reading", endpoint);
if (socket->IsShutdown()) { if (socket->IsShutdown()) {
socket->read_info()->SetErrorStatus( socket->read_info()->SetErrorStatus(
absl::UnavailableError("Socket is shutting down.")); absl::InternalError("Socket is shutting down."));
thread_pool->Run(&handle_read_event); thread_pool->Run(&handle_read_event);
return; return;
} }
@ -131,7 +131,7 @@ bool WindowsEndpoint::Read(absl::AnyInvocable<void(absl::Status)> on_read,
SliceBuffer* buffer, const ReadArgs* /* args */) { SliceBuffer* buffer, const ReadArgs* /* args */) {
if (io_state_->socket->IsShutdown()) { if (io_state_->socket->IsShutdown()) {
io_state_->thread_pool->Run([on_read = std::move(on_read)]() mutable { io_state_->thread_pool->Run([on_read = std::move(on_read)]() mutable {
on_read(absl::UnavailableError("Socket is shutting down.")); on_read(absl::InternalError("Socket is shutting down."));
}); });
return false; return false;
} }
@ -154,7 +154,7 @@ bool WindowsEndpoint::Write(absl::AnyInvocable<void(absl::Status)> on_writable,
if (io_state_->socket->IsShutdown()) { if (io_state_->socket->IsShutdown()) {
io_state_->thread_pool->Run( io_state_->thread_pool->Run(
[on_writable = std::move(on_writable)]() mutable { [on_writable = std::move(on_writable)]() mutable {
on_writable(absl::UnavailableError("Socket is shutting down.")); on_writable(absl::InternalError("Socket is shutting down."));
}); });
return false; return false;
} }
@ -300,7 +300,7 @@ void WindowsEndpoint::HandleReadClosure::Run() {
DumpSliceBuffer(buffer_, absl::StrFormat("WindowsEndpoint::%p READ", DumpSliceBuffer(buffer_, absl::StrFormat("WindowsEndpoint::%p READ",
io_state->endpoint)); io_state->endpoint));
} }
status = absl::UnavailableError("End of TCP stream"); status = absl::InternalError("End of TCP stream");
grpc_core::StatusSetInt(&status, grpc_core::StatusIntProperty::kRpcStatus, grpc_core::StatusSetInt(&status, grpc_core::StatusIntProperty::kRpcStatus,
GRPC_STATUS_UNAVAILABLE); GRPC_STATUS_UNAVAILABLE);
buffer_->Swap(last_read_buffer_); buffer_->Swap(last_read_buffer_);

@ -60,7 +60,7 @@
posix: false posix: false
# TODO(hork): resolve when the client end2end test flake rate reduces to # TODO(hork): resolve when the client end2end test flake rate reduces to
# a tolerable amount. # a tolerable amount.
windows: broken windows: false
- name: event_engine_dns - name: event_engine_dns
default: default:
# not tested on iOS at all # not tested on iOS at all

@ -1,55 +0,0 @@
// Copyright 2022 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H
#define GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H
#include <grpc/support/port_platform.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
/// abort() the process if x is zero, with rudimentary logging to prevent
/// circular dependencies with gpr_log.
/// Intended for internal invariants. If the error can be recovered from,
/// without the possibility of corruption, or might best be reflected via
/// an exception in a higher-level language, consider returning error code.
#define GPR_ASSERT_INTERNAL(x) \
do { \
if (GPR_UNLIKELY(!(x))) { \
fprintf(stderr, "assertion failed: %s", #x); \
abort(); \
} \
} while (0)
#ifndef NDEBUG
#define GPR_DEBUG_ASSERT_INTERNAL(x) GPR_ASSERT_INTERNAL(x)
#else
#define GPR_DEBUG_ASSERT_INTERNAL(x)
#endif
#define GPR_LOG_ERROR_INTERNAL(format, ...) \
do { \
char f[] = __FILE__; \
char* display_file = f; \
char* slash_pos = strrchr(f, '/'); \
if (slash_pos != nullptr) display_file = slash_pos + 1; \
char prefix[60]; \
sprintf(prefix, "INTERNAL %37s:%d]", display_file, __LINE__); \
fprintf(stderr, "%-60s " format "\n", prefix, __VA_ARGS__); \
} while (0)
#endif // GRPC_SRC_CORE_LIB_GPR_LOG_INTERNAL_H

@ -18,6 +18,7 @@
#include <vector> #include <vector>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "absl/strings/str_join.h" #include "absl/strings/str_join.h"
@ -54,7 +55,7 @@ class FreestandingActivity::Handle final : public Wakeable {
// Activity is going away... drop its reference and sever the connection back. // Activity is going away... drop its reference and sever the connection back.
void DropActivity() ABSL_LOCKS_EXCLUDED(mu_) { void DropActivity() ABSL_LOCKS_EXCLUDED(mu_) {
mu_.Lock(); mu_.Lock();
GPR_ASSERT(activity_ != nullptr); CHECK_NE(activity_, nullptr);
activity_ = nullptr; activity_ = nullptr;
mu_.Unlock(); mu_.Unlock();
Unref(); Unref();

@ -24,6 +24,7 @@
#include <utility> #include <utility>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -467,11 +468,11 @@ class PromiseActivity final
// We shouldn't destruct without calling Cancel() first, and that must get // We shouldn't destruct without calling Cancel() first, and that must get
// us to be done_, so we assume that and have no logic to destruct the // us to be done_, so we assume that and have no logic to destruct the
// promise here. // promise here.
GPR_ASSERT(done_); CHECK(done_);
} }
void RunScheduledWakeup() { void RunScheduledWakeup() {
GPR_ASSERT(wakeup_scheduled_.exchange(false, std::memory_order_acq_rel)); CHECK(wakeup_scheduled_.exchange(false, std::memory_order_acq_rel));
Step(); Step();
WakeupComplete(); WakeupComplete();
} }
@ -535,7 +536,7 @@ class PromiseActivity final
// Notification that we're no longer executing - it's ok to destruct the // Notification that we're no longer executing - it's ok to destruct the
// promise. // promise.
void MarkDone() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) { void MarkDone() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) {
GPR_ASSERT(!std::exchange(done_, true)); CHECK(!std::exchange(done_, true));
ScopedContext contexts(this); ScopedContext contexts(this);
Destruct(&promise_holder_.promise); Destruct(&promise_holder_.promise);
} }
@ -580,10 +581,10 @@ class PromiseActivity final
// Until there are no wakeups from within and the promise is incomplete: // Until there are no wakeups from within and the promise is incomplete:
// poll the promise. // poll the promise.
absl::optional<ResultType> StepLoop() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) { absl::optional<ResultType> StepLoop() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu()) {
GPR_ASSERT(is_current()); CHECK(is_current());
while (true) { while (true) {
// Run the promise. // Run the promise.
GPR_ASSERT(!done_); CHECK(!done_);
auto r = promise_holder_.promise(); auto r = promise_holder_.promise();
if (auto* status = r.value_if_ready()) { if (auto* status = r.value_if_ready()) {
// If complete, destroy the promise, flag done, and exit this loop. // If complete, destroy the promise, flag done, and exit this loop.

@ -17,6 +17,7 @@
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/meta/type_traits.h" #include "absl/meta/type_traits.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -114,7 +115,7 @@ bool HasContext() {
template <typename T> template <typename T>
T* GetContext() { T* GetContext() {
auto* p = promise_detail::Context<T>::get(); auto* p = promise_detail::Context<T>::get();
GPR_ASSERT(p != nullptr); CHECK_NE(p, nullptr);
return p; return p;
} }

@ -21,6 +21,8 @@
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -57,7 +59,7 @@ struct JoinState<Traits, P0, P1> {
Construct(&promise1, std::forward<P1>(p1)); Construct(&promise1, std::forward<P1>(p1));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
} }
@ -172,7 +174,7 @@ struct JoinState<Traits, P0, P1, P2> {
Construct(&promise2, std::forward<P2>(p2)); Construct(&promise2, std::forward<P2>(p2));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -329,7 +331,7 @@ struct JoinState<Traits, P0, P1, P2, P3> {
Construct(&promise3, std::forward<P3>(p3)); Construct(&promise3, std::forward<P3>(p3));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -528,7 +530,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4> {
Construct(&promise4, std::forward<P4>(p4)); Construct(&promise4, std::forward<P4>(p4));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -769,7 +771,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5> {
Construct(&promise5, std::forward<P5>(p5)); Construct(&promise5, std::forward<P5>(p5));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -1051,7 +1053,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6> {
Construct(&promise6, std::forward<P6>(p6)); Construct(&promise6, std::forward<P6>(p6));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -1376,7 +1378,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6, P7> {
Construct(&promise7, std::forward<P7>(p7)); Construct(&promise7, std::forward<P7>(p7));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);
@ -1742,7 +1744,7 @@ struct JoinState<Traits, P0, P1, P2, P3, P4, P5, P6, P7, P8> {
Construct(&promise8, std::forward<P8>(p8)); Construct(&promise8, std::forward<P8>(p8));
} }
JoinState(const JoinState& other) { JoinState(const JoinState& other) {
GPR_ASSERT(other.ready.none()); CHECK(other.ready.none());
Construct(&promise0, other.promise0); Construct(&promise0, other.promise0);
Construct(&promise1, other.promise1); Construct(&promise1, other.promise1);
Construct(&promise2, other.promise2); Construct(&promise2, other.promise2);

@ -22,6 +22,7 @@
#include <utility> #include <utility>
#include "absl/base/attributes.h" #include "absl/base/attributes.h"
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -119,7 +120,7 @@ struct SeqState<Traits, P, F0> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.next_factory, other.prior.next_factory); Construct(&prior.next_factory, other.prior.next_factory);
} }
@ -254,7 +255,7 @@ struct SeqState<Traits, P, F0, F1> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.next_factory, other.prior.prior.next_factory); Construct(&prior.prior.next_factory, other.prior.prior.next_factory);
Construct(&prior.next_factory, other.prior.next_factory); Construct(&prior.next_factory, other.prior.next_factory);
@ -447,7 +448,7 @@ struct SeqState<Traits, P, F0, F1, F2> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.next_factory, Construct(&prior.prior.prior.next_factory,
other.prior.prior.prior.next_factory); other.prior.prior.prior.next_factory);
@ -700,7 +701,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.next_factory, Construct(&prior.prior.prior.prior.next_factory,
other.prior.prior.prior.prior.next_factory); other.prior.prior.prior.prior.next_factory);
@ -1021,7 +1022,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.next_factory, Construct(&prior.prior.prior.prior.prior.next_factory,
other.prior.prior.prior.prior.prior.next_factory); other.prior.prior.prior.prior.prior.next_factory);
@ -1405,7 +1406,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.prior.next_factory, Construct(&prior.prior.prior.prior.prior.prior.next_factory,
other.prior.prior.prior.prior.prior.prior.next_factory); other.prior.prior.prior.prior.prior.prior.next_factory);
@ -1855,7 +1856,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.prior.prior.next_factory, Construct(&prior.prior.prior.prior.prior.prior.prior.next_factory,
other.prior.prior.prior.prior.prior.prior.prior.next_factory); other.prior.prior.prior.prior.prior.prior.prior.next_factory);
@ -2373,7 +2374,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct( Construct(
&prior.prior.prior.prior.prior.prior.prior.prior.next_factory, &prior.prior.prior.prior.prior.prior.prior.prior.next_factory,
@ -2964,7 +2965,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct( Construct(
&prior.prior.prior.prior.prior.prior.prior.prior.prior.next_factory, &prior.prior.prior.prior.prior.prior.prior.prior.prior.next_factory,
@ -3631,7 +3632,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
.next_factory, .next_factory,
@ -4375,7 +4376,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior.prior Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
.next_factory, .next_factory,
@ -5198,7 +5199,7 @@ struct SeqState<Traits, P, F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11> {
} }
SeqState(const SeqState& other) noexcept SeqState(const SeqState& other) noexcept
: state(other.state), whence(other.whence) { : state(other.state), whence(other.whence) {
GPR_ASSERT(state == State::kState0); CHECK(state == State::kState0);
Construct(&prior.current_promise, other.prior.current_promise); Construct(&prior.current_promise, other.prior.current_promise);
Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior.prior Construct(&prior.prior.prior.prior.prior.prior.prior.prior.prior.prior.prior
.prior.next_factory, .prior.next_factory,

@ -17,6 +17,7 @@
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
@ -106,7 +107,7 @@ struct FailureStatusCastImpl<absl::StatusOr<T>, const absl::Status&> {
template <typename To, typename From> template <typename To, typename From>
To FailureStatusCast(From&& from) { To FailureStatusCast(From&& from) {
GPR_DEBUG_ASSERT(!IsStatusOk(from)); DCHECK(!IsStatusOk(from));
return FailureStatusCastImpl<To, From>::Cast(std::forward<From>(from)); return FailureStatusCastImpl<To, From>::Cast(std::forward<From>(from));
} }

@ -18,6 +18,8 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -33,7 +35,7 @@ class EventEngineWakeupScheduler {
std::shared_ptr<grpc_event_engine::experimental::EventEngine> std::shared_ptr<grpc_event_engine::experimental::EventEngine>
event_engine) event_engine)
: event_engine_(std::move(event_engine)) { : event_engine_(std::move(event_engine)) {
GPR_ASSERT(event_engine_ != nullptr); CHECK_NE(event_engine_, nullptr);
} }
template <typename ActivityType> template <typename ActivityType>

@ -20,6 +20,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
@ -129,13 +130,13 @@ class ForEach {
: reader_(std::move(other.reader_)), : reader_(std::move(other.reader_)),
action_factory_(std::move(other.action_factory_)), action_factory_(std::move(other.action_factory_)),
whence_(other.whence_) { whence_(other.whence_) {
GPR_DEBUG_ASSERT(reading_next_); DCHECK(reading_next_);
GPR_DEBUG_ASSERT(other.reading_next_); DCHECK(other.reading_next_);
Construct(&reader_next_, std::move(other.reader_next_)); Construct(&reader_next_, std::move(other.reader_next_));
} }
ForEach& operator=(ForEach&& other) noexcept { ForEach& operator=(ForEach&& other) noexcept {
GPR_DEBUG_ASSERT(reading_next_); DCHECK(reading_next_);
GPR_DEBUG_ASSERT(other.reading_next_); DCHECK(other.reading_next_);
reader_ = std::move(other.reader_); reader_ = std::move(other.reader_);
action_factory_ = std::move(other.action_factory_); action_factory_ = std::move(other.action_factory_);
reader_next_ = std::move(other.reader_next_); reader_next_ = std::move(other.reader_next_);

@ -22,6 +22,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -66,7 +67,7 @@ class InterceptorList {
// Update the next pointer stored with this map. // Update the next pointer stored with this map.
// This is only valid to call once, and only before the map is used. // This is only valid to call once, and only before the map is used.
void SetNext(Map* next) { void SetNext(Map* next) {
GPR_DEBUG_ASSERT(next_ == nullptr); DCHECK_EQ(next_, nullptr);
next_ = next; next_ = next;
} }

@ -21,6 +21,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -47,12 +48,12 @@ class Latch {
Latch(Latch&& other) noexcept Latch(Latch&& other) noexcept
: value_(std::move(other.value_)), has_value_(other.has_value_) { : value_(std::move(other.value_)), has_value_(other.has_value_) {
#ifndef NDEBUG #ifndef NDEBUG
GPR_DEBUG_ASSERT(!other.has_had_waiters_); DCHECK(!other.has_had_waiters_);
#endif #endif
} }
Latch& operator=(Latch&& other) noexcept { Latch& operator=(Latch&& other) noexcept {
#ifndef NDEBUG #ifndef NDEBUG
GPR_DEBUG_ASSERT(!other.has_had_waiters_); DCHECK(!other.has_had_waiters_);
#endif #endif
value_ = std::move(other.value_); value_ = std::move(other.value_);
has_value_ = other.has_value_; has_value_ = other.has_value_;
@ -102,7 +103,7 @@ class Latch {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%sSet %s", DebugTag().c_str(), StateString().c_str()); gpr_log(GPR_INFO, "%sSet %s", DebugTag().c_str(), StateString().c_str());
} }
GPR_DEBUG_ASSERT(!has_value_); DCHECK(!has_value_);
value_ = std::move(value); value_ = std::move(value);
has_value_ = true; has_value_ = true;
waiter_.Wake(); waiter_.Wake();
@ -145,12 +146,12 @@ class Latch<void> {
Latch& operator=(const Latch&) = delete; Latch& operator=(const Latch&) = delete;
Latch(Latch&& other) noexcept : is_set_(other.is_set_) { Latch(Latch&& other) noexcept : is_set_(other.is_set_) {
#ifndef NDEBUG #ifndef NDEBUG
GPR_DEBUG_ASSERT(!other.has_had_waiters_); DCHECK(!other.has_had_waiters_);
#endif #endif
} }
Latch& operator=(Latch&& other) noexcept { Latch& operator=(Latch&& other) noexcept {
#ifndef NDEBUG #ifndef NDEBUG
GPR_DEBUG_ASSERT(!other.has_had_waiters_); DCHECK(!other.has_had_waiters_);
#endif #endif
is_set_ = other.is_set_; is_set_ = other.is_set_;
return *this; return *this;
@ -179,7 +180,7 @@ class Latch<void> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%sSet %s", DebugTag().c_str(), StateString().c_str()); gpr_log(GPR_INFO, "%sSet %s", DebugTag().c_str(), StateString().c_str());
} }
GPR_DEBUG_ASSERT(!is_set_); DCHECK(!is_set_);
is_set_ = true; is_set_ = true;
waiter_.Wake(); waiter_.Wake();
} }

@ -22,6 +22,7 @@
#include <vector> #include <vector>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -179,10 +180,10 @@ class MpscReceiver {
// a non-empty buffer during a legal move! // a non-empty buffer during a legal move!
MpscReceiver(MpscReceiver&& other) noexcept MpscReceiver(MpscReceiver&& other) noexcept
: center_(std::move(other.center_)) { : center_(std::move(other.center_)) {
GPR_DEBUG_ASSERT(other.buffer_.empty()); DCHECK(other.buffer_.empty());
} }
MpscReceiver& operator=(MpscReceiver&& other) noexcept { MpscReceiver& operator=(MpscReceiver&& other) noexcept {
GPR_DEBUG_ASSERT(other.buffer_.empty()); DCHECK(other.buffer_.empty());
center_ = std::move(other.center_); center_ = std::move(other.center_);
return *this; return *this;
} }

@ -17,6 +17,7 @@
#include "absl/container/flat_hash_set.h" #include "absl/container/flat_hash_set.h"
#include "absl/functional/any_invocable.h" #include "absl/functional/any_invocable.h"
#include "absl/log/check.h"
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -123,8 +124,8 @@ class Observable {
Observer(const Observer&) = delete; Observer(const Observer&) = delete;
Observer& operator=(const Observer&) = delete; Observer& operator=(const Observer&) = delete;
Observer(Observer&& other) noexcept : state_(std::move(other.state_)) { Observer(Observer&& other) noexcept : state_(std::move(other.state_)) {
GPR_ASSERT(other.waker_.is_unwakeable()); CHECK(other.waker_.is_unwakeable());
GPR_ASSERT(!other.saw_pending_); CHECK(!other.saw_pending_);
} }
Observer& operator=(Observer&& other) noexcept = delete; Observer& operator=(Observer&& other) noexcept = delete;

@ -17,6 +17,7 @@
#include <atomic> #include <atomic>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -102,7 +103,7 @@ class Party::Handle final : public Wakeable {
// Activity is going away... drop its reference and sever the connection back. // Activity is going away... drop its reference and sever the connection back.
void DropActivity() ABSL_LOCKS_EXCLUDED(mu_) { void DropActivity() ABSL_LOCKS_EXCLUDED(mu_) {
mu_.Lock(); mu_.Lock();
GPR_ASSERT(party_ != nullptr); CHECK_NE(party_, nullptr);
party_ = nullptr; party_ = nullptr;
mu_.Unlock(); mu_.Unlock();
Unref(); Unref();
@ -194,13 +195,13 @@ std::string Party::ActivityDebugTag(WakeupMask wakeup_mask) const {
} }
Waker Party::MakeOwningWaker() { Waker Party::MakeOwningWaker() {
GPR_DEBUG_ASSERT(currently_polling_ != kNotPolling); DCHECK(currently_polling_ != kNotPolling);
IncrementRefCount(); IncrementRefCount();
return Waker(this, 1u << currently_polling_); return Waker(this, 1u << currently_polling_);
} }
Waker Party::MakeNonOwningWaker() { Waker Party::MakeNonOwningWaker() {
GPR_DEBUG_ASSERT(currently_polling_ != kNotPolling); DCHECK(currently_polling_ != kNotPolling);
return Waker(participants_[currently_polling_] return Waker(participants_[currently_polling_]
.load(std::memory_order_relaxed) .load(std::memory_order_relaxed)
->MakeNonOwningWakeable(this), ->MakeNonOwningWakeable(this),
@ -208,7 +209,7 @@ Waker Party::MakeNonOwningWaker() {
} }
void Party::ForceImmediateRepoll(WakeupMask mask) { void Party::ForceImmediateRepoll(WakeupMask mask) {
GPR_DEBUG_ASSERT(is_current()); DCHECK(is_current());
sync_.ForceImmediateRepoll(mask); sync_.ForceImmediateRepoll(mask);
} }
@ -232,11 +233,11 @@ void Party::RunLocked() {
return; return;
} }
auto body = [this]() { auto body = [this]() {
GPR_DEBUG_ASSERT(g_current_party_run_next == nullptr); DCHECK_EQ(g_current_party_run_next, nullptr);
Party* run_next = nullptr; Party* run_next = nullptr;
g_current_party_run_next = &run_next; g_current_party_run_next = &run_next;
const bool done = RunParty(); const bool done = RunParty();
GPR_DEBUG_ASSERT(g_current_party_run_next == &run_next); DCHECK(g_current_party_run_next == &run_next);
g_current_party_run_next = nullptr; g_current_party_run_next = nullptr;
if (done) { if (done) {
ScopedActivity activity(this); ScopedActivity activity(this);

@ -24,6 +24,7 @@
#include "absl/base/attributes.h" #include "absl/base/attributes.h"
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/event_engine/event_engine.h> #include <grpc/event_engine/event_engine.h>
@ -115,7 +116,7 @@ class PartySyncUsingAtomics {
std::memory_order_acquire); std::memory_order_acquire);
LogStateChange("Run", prev_state, LogStateChange("Run", prev_state,
prev_state & (kRefMask | kLocked | kAllocatedMask)); prev_state & (kRefMask | kLocked | kAllocatedMask));
GPR_ASSERT(prev_state & kLocked); CHECK(prev_state & kLocked);
if (prev_state & kDestroying) return true; if (prev_state & kDestroying) return true;
// From the previous state, extract which participants we're to wakeup. // From the previous state, extract which participants we're to wakeup.
uint64_t wakeups = prev_state & kWakeupMask; uint64_t wakeups = prev_state & kWakeupMask;
@ -195,7 +196,7 @@ class PartySyncUsingAtomics {
slots[n++] = bit; slots[n++] = bit;
allocated |= 1 << bit; allocated |= 1 << bit;
} }
GPR_ASSERT(n == count); CHECK(n == count);
// Try to allocate this slot and take a ref (atomically). // Try to allocate this slot and take a ref (atomically).
// Ref needs to be taken because once we store the participant it could be // Ref needs to be taken because once we store the participant it could be
// spuriously woken up and unref the party. // spuriously woken up and unref the party.
@ -293,7 +294,7 @@ class PartySyncUsingMutex {
WakeupMask freed = 0; WakeupMask freed = 0;
while (true) { while (true) {
ReleasableMutexLock lock(&mu_); ReleasableMutexLock lock(&mu_);
GPR_ASSERT(locked_); CHECK(locked_);
allocated_ &= ~std::exchange(freed, 0); allocated_ &= ~std::exchange(freed, 0);
auto wakeup = std::exchange(wakeups_, 0); auto wakeup = std::exchange(wakeups_, 0);
if (wakeup == 0) { if (wakeup == 0) {
@ -322,7 +323,7 @@ class PartySyncUsingMutex {
wakeup_mask |= 1 << bit; wakeup_mask |= 1 << bit;
allocated_ |= 1 << bit; allocated_ |= 1 << bit;
} }
GPR_ASSERT(n == count); CHECK(n == count);
store(slots); store(slots);
wakeups_ |= wakeup_mask; wakeups_ |= wakeup_mask;
return !std::exchange(locked_, true); return !std::exchange(locked_, true);
@ -390,7 +391,7 @@ class Party : public Activity, private Wakeable {
// Activity implementation: not allowed to be overridden by derived types. // Activity implementation: not allowed to be overridden by derived types.
void ForceImmediateRepoll(WakeupMask mask) final; void ForceImmediateRepoll(WakeupMask mask) final;
WakeupMask CurrentParticipant() const final { WakeupMask CurrentParticipant() const final {
GPR_DEBUG_ASSERT(currently_polling_ != kNotPolling); DCHECK(currently_polling_ != kNotPolling);
return 1u << currently_polling_; return 1u << currently_polling_;
} }
Waker MakeOwningWaker() final; Waker MakeOwningWaker() final;
@ -411,10 +412,10 @@ class Party : public Activity, private Wakeable {
// This is useful for implementing batching and the like: we can hold some // This is useful for implementing batching and the like: we can hold some
// action until the rest of the party resolves itself. // action until the rest of the party resolves itself.
auto AfterCurrentPoll() { auto AfterCurrentPoll() {
GPR_DEBUG_ASSERT(GetContext<Activity>() == this); DCHECK(GetContext<Activity>() == this);
sync_.WakeAfterPoll(CurrentParticipant()); sync_.WakeAfterPoll(CurrentParticipant());
return [this, iteration = sync_.iteration()]() -> Poll<Empty> { return [this, iteration = sync_.iteration()]() -> Poll<Empty> {
GPR_DEBUG_ASSERT(GetContext<Activity>() == this); DCHECK(GetContext<Activity>() == this);
if (iteration == sync_.iteration()) return Pending{}; if (iteration == sync_.iteration()) return Pending{};
return Empty{}; return Empty{};
}; };

@ -22,6 +22,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include "absl/types/variant.h" #include "absl/types/variant.h"
@ -63,7 +64,7 @@ class NextResult final {
NextResult() : center_(nullptr) {} NextResult() : center_(nullptr) {}
explicit NextResult(RefCountedPtr<pipe_detail::Center<T>> center) explicit NextResult(RefCountedPtr<pipe_detail::Center<T>> center)
: center_(std::move(center)) { : center_(std::move(center)) {
GPR_ASSERT(center_ != nullptr); CHECK(center_ != nullptr);
} }
explicit NextResult(bool cancelled) explicit NextResult(bool cancelled)
: center_(nullptr), cancelled_(cancelled) {} : center_(nullptr), cancelled_(cancelled) {}
@ -79,11 +80,11 @@ class NextResult final {
bool has_value() const; bool has_value() const;
// Only valid if has_value() // Only valid if has_value()
const T& value() const { const T& value() const {
GPR_ASSERT(has_value()); CHECK(has_value());
return **this; return **this;
} }
T& value() { T& value() {
GPR_ASSERT(has_value()); CHECK(has_value());
return **this; return **this;
} }
const T& operator*() const; const T& operator*() const;
@ -121,7 +122,7 @@ class Center : public InterceptorList<T> {
gpr_log(GPR_DEBUG, "%s", DebugOpString("IncrementRefCount").c_str()); gpr_log(GPR_DEBUG, "%s", DebugOpString("IncrementRefCount").c_str());
} }
refs_++; refs_++;
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
} }
RefCountedPtr<Center> Ref() { RefCountedPtr<Center> Ref() {
@ -135,7 +136,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_DEBUG, "%s", DebugOpString("Unref").c_str()); gpr_log(GPR_DEBUG, "%s", DebugOpString("Unref").c_str());
} }
GPR_DEBUG_ASSERT(refs_ > 0); DCHECK_GT(refs_, 0);
refs_--; refs_--;
if (0 == refs_) { if (0 == refs_) {
this->~Center(); this->~Center();
@ -150,7 +151,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("Push").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("Push").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kClosed: case ValueState::kClosed:
case ValueState::kReadyClosed: case ValueState::kReadyClosed:
@ -174,7 +175,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("PollAck").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("PollAck").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kClosed: case ValueState::kClosed:
return true; return true;
@ -202,7 +203,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("Next").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("Next").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kEmpty: case ValueState::kEmpty:
case ValueState::kAcked: case ValueState::kAcked:
@ -228,7 +229,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("PollClosedForSender").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("PollClosedForSender").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kEmpty: case ValueState::kEmpty:
case ValueState::kAcked: case ValueState::kAcked:
@ -251,7 +252,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("PollClosedForReceiver").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("PollClosedForReceiver").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kEmpty: case ValueState::kEmpty:
case ValueState::kAcked: case ValueState::kAcked:
@ -272,7 +273,7 @@ class Center : public InterceptorList<T> {
if (grpc_trace_promise_primitives.enabled()) { if (grpc_trace_promise_primitives.enabled()) {
gpr_log(GPR_INFO, "%s", DebugOpString("PollEmpty").c_str()); gpr_log(GPR_INFO, "%s", DebugOpString("PollEmpty").c_str());
} }
GPR_DEBUG_ASSERT(refs_ != 0); DCHECK_NE(refs_, 0);
switch (value_state_) { switch (value_state_) {
case ValueState::kReady: case ValueState::kReady:
case ValueState::kReadyClosed: case ValueState::kReadyClosed:
@ -668,7 +669,7 @@ class Push {
return Pending{}; return Pending{};
} }
} }
GPR_DEBUG_ASSERT(absl::holds_alternative<AwaitingAck>(state_)); DCHECK(absl::holds_alternative<AwaitingAck>(state_));
return center_->PollAck(); return center_->PollAck();
} }

@ -18,6 +18,8 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -95,12 +97,12 @@ class Poll {
bool ready() const { return ready_; } bool ready() const { return ready_; }
T& value() { T& value() {
GPR_DEBUG_ASSERT(ready()); DCHECK(ready());
return value_; return value_;
} }
const T& value() const { const T& value() const {
GPR_DEBUG_ASSERT(ready()); DCHECK(ready());
return value_; return value_;
} }
@ -154,7 +156,7 @@ class Poll<Empty> {
bool ready() const { return ready_; } bool ready() const { return ready_; }
Empty value() const { Empty value() const {
GPR_DEBUG_ASSERT(ready()); DCHECK(ready());
return Empty{}; return Empty{};
} }

@ -17,6 +17,8 @@
#include <utility> #include <utility>
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -35,7 +37,7 @@ class PromiseMutex {
Lock() {} Lock() {}
~Lock() { ~Lock() {
if (mutex_ != nullptr) { if (mutex_ != nullptr) {
GPR_ASSERT(mutex_->locked_); CHECK(mutex_->locked_);
mutex_->locked_ = false; mutex_->locked_ = false;
mutex_->waiter_.Wake(); mutex_->waiter_.Wake();
} }
@ -52,18 +54,18 @@ class PromiseMutex {
Lock& operator=(const Lock&) noexcept = delete; Lock& operator=(const Lock&) noexcept = delete;
T* operator->() { T* operator->() {
GPR_DEBUG_ASSERT(mutex_ != nullptr); DCHECK_NE(mutex_, nullptr);
return &mutex_->value_; return &mutex_->value_;
} }
T& operator*() { T& operator*() {
GPR_DEBUG_ASSERT(mutex_ != nullptr); DCHECK_NE(mutex_, nullptr);
return mutex_->value_; return mutex_->value_;
} }
private: private:
friend class PromiseMutex; friend class PromiseMutex;
explicit Lock(PromiseMutex* mutex) : mutex_(mutex) { explicit Lock(PromiseMutex* mutex) : mutex_(mutex) {
GPR_DEBUG_ASSERT(!mutex_->locked_); DCHECK(!mutex_->locked_);
mutex_->locked_ = true; mutex_->locked_ = true;
} }
PromiseMutex* mutex_ = nullptr; PromiseMutex* mutex_ = nullptr;
@ -71,7 +73,7 @@ class PromiseMutex {
PromiseMutex() = default; PromiseMutex() = default;
explicit PromiseMutex(T value) : value_(std::move(value)) {} explicit PromiseMutex(T value) : value_(std::move(value)) {}
~PromiseMutex() { GPR_DEBUG_ASSERT(!locked_); } ~PromiseMutex() { DCHECK(!locked_); }
auto Acquire() { auto Acquire() {
return [this]() -> Poll<Lock> { return [this]() -> Poll<Lock> {

@ -15,6 +15,7 @@
#ifndef GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H #ifndef GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H
#define GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H #define GRPC_SRC_CORE_LIB_PROMISE_STATUS_FLAG_H
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -127,7 +128,7 @@ struct StatusCastImpl<absl::Status, const StatusFlag&> {
template <typename T> template <typename T>
struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag> { struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag> {
static absl::StatusOr<T> Cast(StatusFlag flag) { static absl::StatusOr<T> Cast(StatusFlag flag) {
GPR_DEBUG_ASSERT(!flag.ok()); DCHECK(!flag.ok());
return absl::CancelledError(); return absl::CancelledError();
} }
}; };
@ -135,7 +136,7 @@ struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag> {
template <typename T> template <typename T>
struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag&> { struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag&> {
static absl::StatusOr<T> Cast(StatusFlag flag) { static absl::StatusOr<T> Cast(StatusFlag flag) {
GPR_DEBUG_ASSERT(!flag.ok()); DCHECK(!flag.ok());
return absl::CancelledError(); return absl::CancelledError();
} }
}; };
@ -143,7 +144,7 @@ struct FailureStatusCastImpl<absl::StatusOr<T>, StatusFlag&> {
template <typename T> template <typename T>
struct FailureStatusCastImpl<absl::StatusOr<T>, const StatusFlag&> { struct FailureStatusCastImpl<absl::StatusOr<T>, const StatusFlag&> {
static absl::StatusOr<T> Cast(StatusFlag flag) { static absl::StatusOr<T> Cast(StatusFlag flag) {
GPR_DEBUG_ASSERT(!flag.ok()); DCHECK(!flag.ok());
return absl::CancelledError(); return absl::CancelledError();
} }
}; };
@ -157,7 +158,7 @@ class ValueOrFailure {
// NOLINTNEXTLINE(google-explicit-constructor) // NOLINTNEXTLINE(google-explicit-constructor)
ValueOrFailure(Failure) {} ValueOrFailure(Failure) {}
// NOLINTNEXTLINE(google-explicit-constructor) // NOLINTNEXTLINE(google-explicit-constructor)
ValueOrFailure(StatusFlag status) { GPR_ASSERT(!status.ok()); } ValueOrFailure(StatusFlag status) { CHECK(!status.ok()); }
static ValueOrFailure FromOptional(absl::optional<T> value) { static ValueOrFailure FromOptional(absl::optional<T> value) {
return ValueOrFailure{std::move(value)}; return ValueOrFailure{std::move(value)};
@ -215,7 +216,7 @@ struct StatusCastImpl<ValueOrFailure<T>, Failure> {
template <typename T> template <typename T>
struct StatusCastImpl<ValueOrFailure<T>, StatusFlag&> { struct StatusCastImpl<ValueOrFailure<T>, StatusFlag&> {
static ValueOrFailure<T> Cast(StatusFlag f) { static ValueOrFailure<T> Cast(StatusFlag f) {
GPR_ASSERT(!f.ok()); CHECK(!f.ok());
return ValueOrFailure<T>(Failure{}); return ValueOrFailure<T>(Failure{});
} }
}; };
@ -223,7 +224,7 @@ struct StatusCastImpl<ValueOrFailure<T>, StatusFlag&> {
template <typename T> template <typename T>
struct StatusCastImpl<ValueOrFailure<T>, StatusFlag> { struct StatusCastImpl<ValueOrFailure<T>, StatusFlag> {
static ValueOrFailure<T> Cast(StatusFlag f) { static ValueOrFailure<T> Cast(StatusFlag f) {
GPR_ASSERT(!f.ok()); CHECK(!f.ok());
return ValueOrFailure<T>(Failure{}); return ValueOrFailure<T>(Failure{});
} }
}; };

@ -18,6 +18,7 @@
#include <tuple> #include <tuple>
#include <variant> #include <variant>
#include "absl/log/check.h"
#include "absl/meta/type_traits.h" #include "absl/meta/type_traits.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
@ -83,7 +84,7 @@ struct TryJoinTraits {
} }
template <typename R, typename T> template <typename R, typename T>
static R EarlyReturn(const ValueOrFailure<T>& x) { static R EarlyReturn(const ValueOrFailure<T>& x) {
GPR_ASSERT(!x.ok()); CHECK(!x.ok());
return FailureStatusCast<R>(Failure{}); return FailureStatusCast<R>(Failure{});
} }
template <typename... A> template <typename... A>

@ -20,6 +20,7 @@
#include <type_traits> #include <type_traits>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/meta/type_traits.h" #include "absl/meta/type_traits.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
@ -162,7 +163,7 @@ struct TrySeqTraitsWithSfinae<
} }
template <typename R> template <typename R>
static R ReturnValue(T&& status) { static R ReturnValue(T&& status) {
GPR_DEBUG_ASSERT(!IsStatusOk(status)); DCHECK(!IsStatusOk(status));
return FailureStatusCast<R>(status.status()); return FailureStatusCast<R>(status.status());
} }
template <typename Result, typename RunNext> template <typename Result, typename RunNext>

@ -22,6 +22,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/log/check.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h" #include "absl/strings/str_join.h"
@ -130,9 +131,9 @@ grpc_call_credentials* grpc_composite_call_credentials_create(
"grpc_composite_call_credentials_create(creds1=%p, creds2=%p, " "grpc_composite_call_credentials_create(creds1=%p, creds2=%p, "
"reserved=%p)", "reserved=%p)",
3, (creds1, creds2, reserved)); 3, (creds1, creds2, reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
GPR_ASSERT(creds1 != nullptr); CHECK_NE(creds1, nullptr);
GPR_ASSERT(creds2 != nullptr); CHECK_NE(creds2, nullptr);
return composite_call_credentials_create(creds1->Ref(), creds2->Ref()) return composite_call_credentials_create(creds1->Ref(), creds2->Ref())
.release(); .release();
@ -144,7 +145,8 @@ grpc_core::RefCountedPtr<grpc_channel_security_connector>
grpc_composite_channel_credentials::create_security_connector( grpc_composite_channel_credentials::create_security_connector(
grpc_core::RefCountedPtr<grpc_call_credentials> call_creds, grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
const char* target, grpc_core::ChannelArgs* args) { const char* target, grpc_core::ChannelArgs* args) {
GPR_ASSERT(inner_creds_ != nullptr && call_creds_ != nullptr); CHECK(inner_creds_ != nullptr);
CHECK(call_creds_ != nullptr);
// If we are passed a call_creds, create a call composite to pass it // If we are passed a call_creds, create a call composite to pass it
// downstream. // downstream.
if (call_creds != nullptr) { if (call_creds != nullptr) {
@ -159,8 +161,8 @@ grpc_composite_channel_credentials::create_security_connector(
grpc_channel_credentials* grpc_composite_channel_credentials_create( grpc_channel_credentials* grpc_composite_channel_credentials_create(
grpc_channel_credentials* channel_creds, grpc_call_credentials* call_creds, grpc_channel_credentials* channel_creds, grpc_call_credentials* call_creds,
void* reserved) { void* reserved) {
GPR_ASSERT(channel_creds != nullptr && call_creds != nullptr && CHECK(channel_creds != nullptr && call_creds != nullptr &&
reserved == nullptr); reserved == nullptr);
GRPC_API_TRACE( GRPC_API_TRACE(
"grpc_composite_channel_credentials_create(channel_creds=%p, " "grpc_composite_channel_credentials_create(channel_creds=%p, "
"call_creds=%p, reserved=%p)", "call_creds=%p, reserved=%p)",

@ -21,6 +21,8 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -111,7 +113,7 @@ void grpc_server_credentials::set_auth_metadata_processor(
void grpc_server_credentials_set_auth_metadata_processor( void grpc_server_credentials_set_auth_metadata_processor(
grpc_server_credentials* creds, grpc_auth_metadata_processor processor) { grpc_server_credentials* creds, grpc_auth_metadata_processor processor) {
GPR_DEBUG_ASSERT(creds != nullptr); DCHECK_NE(creds, nullptr);
creds->set_auth_metadata_processor(processor); creds->set_auth_metadata_processor(processor);
} }

@ -23,6 +23,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/log/check.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
@ -137,7 +138,7 @@ struct grpc_channel_credentials
// two different `grpc_channel_credentials` objects are used but they compare // two different `grpc_channel_credentials` objects are used but they compare
// as equal (assuming other channel args match). // as equal (assuming other channel args match).
int cmp(const grpc_channel_credentials* other) const { int cmp(const grpc_channel_credentials* other) const {
GPR_ASSERT(other != nullptr); CHECK_NE(other, nullptr);
int r = type().Compare(other->type()); int r = type().Compare(other->type());
if (r != 0) return r; if (r != 0) return r;
return cmp_impl(other); return cmp_impl(other);
@ -218,7 +219,7 @@ struct grpc_call_credentials
// If this method returns 0, it means that gRPC can treat the two call // If this method returns 0, it means that gRPC can treat the two call
// credentials as effectively the same.. // credentials as effectively the same..
int cmp(const grpc_call_credentials* other) const { int cmp(const grpc_call_credentials* other) const {
GPR_ASSERT(other != nullptr); CHECK_NE(other, nullptr);
int r = type().Compare(other->type()); int r = type().Compare(other->type());
if (r != 0) return r; if (r != 0) return r;
return cmp_impl(other); return cmp_impl(other);

@ -20,6 +20,7 @@
#include <map> #include <map>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
@ -228,8 +229,8 @@ void AwsExternalAccountCredentials::OnRetrieveImdsV2SessionTokenInternal(
void AwsExternalAccountCredentials::AddMetadataRequestHeaders( void AwsExternalAccountCredentials::AddMetadataRequestHeaders(
grpc_http_request* request) { grpc_http_request* request) {
if (!imdsv2_session_token_.empty()) { if (!imdsv2_session_token_.empty()) {
GPR_ASSERT(request->hdr_count == 0); CHECK_EQ(request->hdr_count, 0u);
GPR_ASSERT(request->hdrs == nullptr); CHECK_EQ(request->hdrs, nullptr);
grpc_http_header* headers = grpc_http_header* headers =
static_cast<grpc_http_header*>(gpr_malloc(sizeof(grpc_http_header))); static_cast<grpc_http_header*>(gpr_malloc(sizeof(grpc_http_header)));
headers[0].key = gpr_strdup("x-aws-ec2-metadata-token"); headers[0].key = gpr_strdup("x-aws-ec2-metadata-token");

@ -22,6 +22,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/escaping.h" #include "absl/strings/escaping.h"
@ -110,7 +111,7 @@ bool MatchWorkforcePoolAudience(absl::string_view audience) {
RefCountedPtr<ExternalAccountCredentials> ExternalAccountCredentials::Create( RefCountedPtr<ExternalAccountCredentials> ExternalAccountCredentials::Create(
const Json& json, std::vector<std::string> scopes, const Json& json, std::vector<std::string> scopes,
grpc_error_handle* error) { grpc_error_handle* error) {
GPR_ASSERT(error->ok()); CHECK(error->ok());
Options options; Options options;
options.type = GRPC_AUTH_JSON_TYPE_INVALID; options.type = GRPC_AUTH_JSON_TYPE_INVALID;
if (json.type() != Json::Type::kObject) { if (json.type() != Json::Type::kObject) {
@ -301,7 +302,7 @@ void ExternalAccountCredentials::fetch_oauth2(
grpc_credentials_metadata_request* metadata_req, grpc_credentials_metadata_request* metadata_req,
grpc_polling_entity* pollent, grpc_iomgr_cb_func response_cb, grpc_polling_entity* pollent, grpc_iomgr_cb_func response_cb,
Timestamp deadline) { Timestamp deadline) {
GPR_ASSERT(ctx_ == nullptr); CHECK_EQ(ctx_, nullptr);
ctx_ = new HTTPRequestContext(pollent, deadline); ctx_ = new HTTPRequestContext(pollent, deadline);
metadata_req_ = metadata_req; metadata_req_ = metadata_req;
response_cb_ = response_cb; response_cb_ = response_cb;
@ -381,7 +382,7 @@ void ExternalAccountCredentials::ExchangeToken(
grpc_http_response_destroy(&ctx_->response); grpc_http_response_destroy(&ctx_->response);
ctx_->response = {}; ctx_->response = {};
GRPC_CLOSURE_INIT(&ctx_->closure, OnExchangeToken, this, nullptr); GRPC_CLOSURE_INIT(&ctx_->closure, OnExchangeToken, this, nullptr);
GPR_ASSERT(http_request_ == nullptr); CHECK(http_request_ == nullptr);
RefCountedPtr<grpc_channel_credentials> http_request_creds; RefCountedPtr<grpc_channel_credentials> http_request_creds;
if (uri->scheme() == "http") { if (uri->scheme() == "http") {
http_request_creds = RefCountedPtr<grpc_channel_credentials>( http_request_creds = RefCountedPtr<grpc_channel_credentials>(
@ -483,7 +484,7 @@ void ExternalAccountCredentials::ImpersenateServiceAccount() {
ctx_->response = {}; ctx_->response = {};
GRPC_CLOSURE_INIT(&ctx_->closure, OnImpersenateServiceAccount, this, nullptr); GRPC_CLOSURE_INIT(&ctx_->closure, OnImpersenateServiceAccount, this, nullptr);
// TODO(ctiller): Use the callers resource quota. // TODO(ctiller): Use the callers resource quota.
GPR_ASSERT(http_request_ == nullptr); CHECK(http_request_ == nullptr);
RefCountedPtr<grpc_channel_credentials> http_request_creds; RefCountedPtr<grpc_channel_credentials> http_request_creds;
if (uri->scheme() == "http") { if (uri->scheme() == "http") {
http_request_creds = RefCountedPtr<grpc_channel_credentials>( http_request_creds = RefCountedPtr<grpc_channel_credentials>(

@ -20,6 +20,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
@ -167,7 +168,7 @@ void UrlExternalAccountCredentials::RetrieveSubjectToken(
grpc_http_response_destroy(&ctx_->response); grpc_http_response_destroy(&ctx_->response);
ctx_->response = {}; ctx_->response = {};
GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveSubjectToken, this, nullptr); GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveSubjectToken, this, nullptr);
GPR_ASSERT(http_request_ == nullptr); CHECK(http_request_ == nullptr);
RefCountedPtr<grpc_channel_credentials> http_request_creds; RefCountedPtr<grpc_channel_credentials> http_request_creds;
if (url_.scheme() == "http") { if (url_.scheme() == "http") {
http_request_creds = RefCountedPtr<grpc_channel_credentials>( http_request_creds = RefCountedPtr<grpc_channel_credentials>(

@ -23,6 +23,7 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "absl/log/check.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
@ -215,7 +216,7 @@ static int is_metadata_server_reachable() {
auto uri = auto uri =
grpc_core::URI::Create("http", GRPC_COMPUTE_ENGINE_DETECTION_HOST, "/", grpc_core::URI::Create("http", GRPC_COMPUTE_ENGINE_DETECTION_HOST, "/",
{} /* query params */, "" /* fragment */); {} /* query params */, "" /* fragment */);
GPR_ASSERT(uri.ok()); // params are hardcoded CHECK(uri.ok()); // params are hardcoded
auto http_request = grpc_core::HttpRequest::Get( auto http_request = grpc_core::HttpRequest::Get(
std::move(*uri), nullptr /* channel args */, &detector.pollent, &request, std::move(*uri), nullptr /* channel args */, &detector.pollent, &request,
grpc_core::Timestamp::Now() + max_detection_delay, grpc_core::Timestamp::Now() + max_detection_delay,
@ -317,7 +318,7 @@ static grpc_error_handle create_default_creds_from_path(
result = grpc_core::ExternalAccountCredentials::Create(json, {}, &error); result = grpc_core::ExternalAccountCredentials::Create(json, {}, &error);
end: end:
GPR_ASSERT((result == nullptr) + (error.ok()) == 1); CHECK((result == nullptr) + (error.ok()) == 1);
*creds = result; *creds = result;
return error; return error;
} }
@ -395,7 +396,7 @@ grpc_channel_credentials* grpc_google_default_credentials_create(
// Create google default credentials. // Create google default credentials.
grpc_channel_credentials* ssl_creds = grpc_channel_credentials* ssl_creds =
grpc_ssl_credentials_create(nullptr, nullptr, nullptr, nullptr); grpc_ssl_credentials_create(nullptr, nullptr, nullptr, nullptr);
GPR_ASSERT(ssl_creds != nullptr); CHECK_NE(ssl_creds, nullptr);
grpc_alts_credentials_options* options = grpc_alts_credentials_options* options =
grpc_alts_credentials_client_options_create(); grpc_alts_credentials_client_options_create();
grpc_channel_credentials* alts_creds = grpc_channel_credentials* alts_creds =
@ -407,7 +408,7 @@ grpc_channel_credentials* grpc_google_default_credentials_create(
grpc_core::RefCountedPtr<grpc_channel_credentials>(ssl_creds)); grpc_core::RefCountedPtr<grpc_channel_credentials>(ssl_creds));
result = grpc_composite_channel_credentials_create( result = grpc_composite_channel_credentials_create(
creds.get(), call_creds.get(), nullptr); creds.get(), call_creds.get(), nullptr);
GPR_ASSERT(result != nullptr); CHECK_NE(result, nullptr);
} else { } else {
gpr_log(GPR_ERROR, "Could not create google default credentials: %s", gpr_log(GPR_ERROR, "Could not create google default credentials: %s",
grpc_core::StatusToString(error).c_str()); grpc_core::StatusToString(error).c_str());

@ -23,6 +23,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
@ -73,9 +74,9 @@ grpc_call_credentials* grpc_google_iam_credentials_create(
"grpc_iam_credentials_create(token=%s, authority_selector=%s, " "grpc_iam_credentials_create(token=%s, authority_selector=%s, "
"reserved=%p)", "reserved=%p)",
3, (token, authority_selector, reserved)); 3, (token, authority_selector, reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
GPR_ASSERT(token != nullptr); CHECK_NE(token, nullptr);
GPR_ASSERT(authority_selector != nullptr); CHECK_NE(authority_selector, nullptr);
return grpc_core::MakeRefCounted<grpc_google_iam_credentials>( return grpc_core::MakeRefCounted<grpc_google_iam_credentials>(
token, authority_selector) token, authority_selector)
.release(); .release();

@ -29,6 +29,7 @@
#include <openssl/pem.h> #include <openssl/pem.h>
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/escaping.h" #include "absl/strings/escaping.h"
@ -224,8 +225,8 @@ static char* dot_concat_and_free_strings(char* str1, char* str2) {
*(current++) = '.'; *(current++) = '.';
memcpy(current, str2, str2_len); memcpy(current, str2, str2_len);
current += str2_len; current += str2_len;
GPR_ASSERT(current >= result); CHECK(current >= result);
GPR_ASSERT((uintptr_t)(current - result) == result_len); CHECK((uintptr_t)(current - result) == result_len);
*current = '\0'; *current = '\0';
gpr_free(str1); gpr_free(str1);
gpr_free(str2); gpr_free(str2);

@ -24,6 +24,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
@ -167,7 +168,7 @@ grpc_call_credentials* grpc_service_account_jwt_access_credentials_create(
static_cast<int>(token_lifetime.clock_type), reserved); static_cast<int>(token_lifetime.clock_type), reserved);
gpr_free(clean_json); gpr_free(clean_json);
} }
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( return grpc_service_account_jwt_access_credentials_create_from_auth_json_key(

@ -41,6 +41,7 @@
#include <openssl/param_build.h> #include <openssl/param_build.h>
#endif #endif
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/escaping.h" #include "absl/strings/escaping.h"
@ -313,7 +314,7 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims* claims,
gpr_timespec skewed_now; gpr_timespec skewed_now;
int audience_ok; int audience_ok;
GPR_ASSERT(claims != nullptr); CHECK_NE(claims, nullptr);
skewed_now = skewed_now =
gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew); gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_clock_skew);
@ -459,7 +460,7 @@ static EVP_PKEY* extract_pkey_from_x509(const char* x509_str) {
EVP_PKEY* result = nullptr; EVP_PKEY* result = nullptr;
BIO* bio = BIO_new(BIO_s_mem()); BIO* bio = BIO_new(BIO_s_mem());
size_t len = strlen(x509_str); size_t len = strlen(x509_str);
GPR_ASSERT(len < INT_MAX); CHECK_LT(len, static_cast<size_t>(INT_MAX));
BIO_write(bio, x509_str, static_cast<int>(len)); BIO_write(bio, x509_str, static_cast<int>(len));
x509 = PEM_read_bio_X509(bio, nullptr, nullptr, nullptr); x509 = PEM_read_bio_X509(bio, nullptr, nullptr, nullptr);
if (x509 == nullptr) { if (x509 == nullptr) {
@ -530,8 +531,8 @@ static EVP_PKEY* pkey_from_jwk(const Json& json, const char* kty) {
BIGNUM* tmp_e = nullptr; BIGNUM* tmp_e = nullptr;
Json::Object::const_iterator it; Json::Object::const_iterator it;
GPR_ASSERT(json.type() == Json::Type::kObject); CHECK(json.type() == Json::Type::kObject);
GPR_ASSERT(kty != nullptr); CHECK_NE(kty, nullptr);
if (strcmp(kty, "RSA") != 0) { if (strcmp(kty, "RSA") != 0) {
gpr_log(GPR_ERROR, "Unsupported key type %s.", kty); gpr_log(GPR_ERROR, "Unsupported key type %s.", kty);
goto end; goto end;
@ -658,7 +659,7 @@ static int verify_jwt_signature(EVP_PKEY* key, const char* alg,
const EVP_MD* md = evp_md_from_alg(alg); const EVP_MD* md = evp_md_from_alg(alg);
int result = 0; int result = 0;
GPR_ASSERT(md != nullptr); // Checked before. CHECK_NE(md, nullptr); // Checked before.
if (md_ctx == nullptr) { if (md_ctx == nullptr) {
gpr_log(GPR_ERROR, "Could not create EVP_MD_CTX."); gpr_log(GPR_ERROR, "Could not create EVP_MD_CTX.");
goto end; goto end;
@ -797,7 +798,7 @@ static email_key_mapping* verifier_get_mapping(grpc_jwt_verifier* v,
static void verifier_put_mapping(grpc_jwt_verifier* v, const char* email_domain, static void verifier_put_mapping(grpc_jwt_verifier* v, const char* email_domain,
const char* key_url_prefix) { const char* key_url_prefix) {
email_key_mapping* mapping = verifier_get_mapping(v, email_domain); email_key_mapping* mapping = verifier_get_mapping(v, email_domain);
GPR_ASSERT(v->num_mappings < v->allocated_mappings); CHECK(v->num_mappings < v->allocated_mappings);
if (mapping != nullptr) { if (mapping != nullptr) {
gpr_free(mapping->key_url_prefix); gpr_free(mapping->key_url_prefix);
mapping->key_url_prefix = gpr_strdup(key_url_prefix); mapping->key_url_prefix = gpr_strdup(key_url_prefix);
@ -806,7 +807,7 @@ static void verifier_put_mapping(grpc_jwt_verifier* v, const char* email_domain,
v->mappings[v->num_mappings].email_domain = gpr_strdup(email_domain); v->mappings[v->num_mappings].email_domain = gpr_strdup(email_domain);
v->mappings[v->num_mappings].key_url_prefix = gpr_strdup(key_url_prefix); v->mappings[v->num_mappings].key_url_prefix = gpr_strdup(key_url_prefix);
v->num_mappings++; v->num_mappings++;
GPR_ASSERT(v->num_mappings <= v->allocated_mappings); CHECK(v->num_mappings <= v->allocated_mappings);
} }
// Very non-sophisticated way to detect an email address. Should be good // Very non-sophisticated way to detect an email address. Should be good
@ -818,7 +819,7 @@ const char* grpc_jwt_issuer_email_domain(const char* issuer) {
if (*email_domain == '\0') return nullptr; if (*email_domain == '\0') return nullptr;
const char* dot = strrchr(email_domain, '.'); const char* dot = strrchr(email_domain, '.');
if (dot == nullptr || dot == email_domain) return email_domain; if (dot == nullptr || dot == email_domain) return email_domain;
GPR_ASSERT(dot > email_domain); CHECK(dot > email_domain);
// There may be a subdomain, we just want the domain. // There may be a subdomain, we just want the domain.
dot = static_cast<const char*>( dot = static_cast<const char*>(
gpr_memrchr(email_domain, '.', static_cast<size_t>(dot - email_domain))); gpr_memrchr(email_domain, '.', static_cast<size_t>(dot - email_domain)));
@ -839,8 +840,7 @@ static void retrieve_key_and_verify(verifier_cb_ctx* ctx) {
char* path; char* path;
absl::StatusOr<grpc_core::URI> uri; absl::StatusOr<grpc_core::URI> uri;
GPR_ASSERT(ctx != nullptr && ctx->header != nullptr && CHECK(ctx != nullptr && ctx->header != nullptr && ctx->claims != nullptr);
ctx->claims != nullptr);
iss = ctx->claims->iss; iss = ctx->claims->iss;
if (ctx->header->kid == nullptr) { if (ctx->header->kid == nullptr) {
gpr_log(GPR_ERROR, "Missing kid in jose header."); gpr_log(GPR_ERROR, "Missing kid in jose header.");
@ -859,7 +859,7 @@ static void retrieve_key_and_verify(verifier_cb_ctx* ctx) {
email_domain = grpc_jwt_issuer_email_domain(iss); email_domain = grpc_jwt_issuer_email_domain(iss);
if (email_domain != nullptr) { if (email_domain != nullptr) {
email_key_mapping* mapping; email_key_mapping* mapping;
GPR_ASSERT(ctx->verifier != nullptr); CHECK_NE(ctx->verifier, nullptr);
mapping = verifier_get_mapping(ctx->verifier, email_domain); mapping = verifier_get_mapping(ctx->verifier, email_domain);
if (mapping == nullptr) { if (mapping == nullptr) {
gpr_log(GPR_ERROR, "Missing mapping for issuer email."); gpr_log(GPR_ERROR, "Missing mapping for issuer email.");
@ -926,8 +926,8 @@ void grpc_jwt_verifier_verify(grpc_jwt_verifier* verifier,
Json json; Json json;
std::string signature_str; std::string signature_str;
GPR_ASSERT(verifier != nullptr && jwt != nullptr && audience != nullptr && CHECK(verifier != nullptr && jwt != nullptr && audience != nullptr &&
cb != nullptr); cb != nullptr);
dot = strchr(cur, '.'); dot = strchr(cur, '.');
if (dot == nullptr) goto error; if (dot == nullptr) goto error;
json = parse_json_part_from_jwt(cur, static_cast<size_t>(dot - cur)); json = parse_json_part_from_jwt(cur, static_cast<size_t>(dot - cur));

@ -27,6 +27,7 @@
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
@ -395,7 +396,7 @@ class grpc_compute_engine_token_fetcher_credentials
auto uri = grpc_core::URI::Create("http", GRPC_COMPUTE_ENGINE_METADATA_HOST, auto uri = grpc_core::URI::Create("http", GRPC_COMPUTE_ENGINE_METADATA_HOST,
GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH, GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH,
{} /* query params */, "" /* fragment */); {} /* query params */, "" /* fragment */);
GPR_ASSERT(uri.ok()); // params are hardcoded CHECK(uri.ok()); // params are hardcoded
http_request_ = grpc_core::HttpRequest::Get( http_request_ = grpc_core::HttpRequest::Get(
std::move(*uri), nullptr /* channel args */, pollent, &request, std::move(*uri), nullptr /* channel args */, pollent, &request,
deadline, deadline,
@ -424,7 +425,7 @@ grpc_call_credentials* grpc_google_compute_engine_credentials_create(
void* reserved) { void* reserved) {
GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1, GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1,
(reserved)); (reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return grpc_core::MakeRefCounted< return grpc_core::MakeRefCounted<
grpc_compute_engine_token_fetcher_credentials>() grpc_compute_engine_token_fetcher_credentials>()
.release(); .release();
@ -461,7 +462,7 @@ void grpc_google_refresh_token_credentials::fetch_oauth2(
auto uri = grpc_core::URI::Create("https", GRPC_GOOGLE_OAUTH2_SERVICE_HOST, auto uri = grpc_core::URI::Create("https", GRPC_GOOGLE_OAUTH2_SERVICE_HOST,
GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH, GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH,
{} /* query params */, "" /* fragment */); {} /* query params */, "" /* fragment */);
GPR_ASSERT(uri.ok()); // params are hardcoded CHECK(uri.ok()); // params are hardcoded
http_request_ = grpc_core::HttpRequest::Post( http_request_ = grpc_core::HttpRequest::Post(
std::move(*uri), nullptr /* channel args */, pollent, &request, deadline, std::move(*uri), nullptr /* channel args */, pollent, &request, deadline,
GRPC_CLOSURE_INIT(&http_post_cb_closure_, response_cb, metadata_req, GRPC_CLOSURE_INIT(&http_post_cb_closure_, response_cb, metadata_req,
@ -517,7 +518,7 @@ grpc_call_credentials* grpc_google_refresh_token_credentials_create(
"reserved=%p)", "reserved=%p)",
create_loggable_refresh_token(&token).c_str(), reserved); create_loggable_refresh_token(&token).c_str(), reserved);
} }
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return grpc_refresh_token_credentials_create_from_auth_refresh_token(token) return grpc_refresh_token_credentials_create_from_auth_refresh_token(token)
.release(); .release();
} }
@ -700,7 +701,7 @@ absl::StatusOr<URI> ValidateStsCredentialsOptions(
grpc_call_credentials* grpc_sts_credentials_create( grpc_call_credentials* grpc_sts_credentials_create(
const grpc_sts_credentials_options* options, void* reserved) { const grpc_sts_credentials_options* options, void* reserved) {
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
absl::StatusOr<grpc_core::URI> sts_url = absl::StatusOr<grpc_core::URI> sts_url =
grpc_core::ValidateStsCredentialsOptions(options); grpc_core::ValidateStsCredentialsOptions(options);
if (!sts_url.ok()) { if (!sts_url.ok()) {
@ -747,7 +748,7 @@ grpc_call_credentials* grpc_access_token_credentials_create(
"grpc_access_token_credentials_create(access_token=<redacted>, " "grpc_access_token_credentials_create(access_token=<redacted>, "
"reserved=%p)", "reserved=%p)",
1, (reserved)); 1, (reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return grpc_core::MakeRefCounted<grpc_access_token_credentials>(access_token) return grpc_core::MakeRefCounted<grpc_access_token_credentials>(access_token)
.release(); .release();
} }

@ -21,6 +21,7 @@
#include <atomic> #include <atomic>
#include <memory> #include <memory>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
@ -209,6 +210,6 @@ grpc_call_credentials* grpc_metadata_credentials_create_from_plugin(
grpc_security_level min_security_level, void* reserved) { grpc_security_level min_security_level, void* reserved) {
GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1, GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1,
(reserved)); (reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return new grpc_plugin_credentials(plugin, min_security_level); return new grpc_plugin_credentials(plugin, min_security_level);
} }

@ -23,6 +23,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/impl/channel_arg_names.h> #include <grpc/impl/channel_arg_names.h>
@ -149,8 +150,8 @@ void grpc_ssl_credentials::build_config(
const grpc_ssl_verify_peer_options* verify_options) { const grpc_ssl_verify_peer_options* verify_options) {
config_.pem_root_certs = gpr_strdup(pem_root_certs); config_.pem_root_certs = gpr_strdup(pem_root_certs);
if (pem_key_cert_pair != nullptr) { if (pem_key_cert_pair != nullptr) {
GPR_ASSERT(pem_key_cert_pair->private_key != nullptr); CHECK_NE(pem_key_cert_pair->private_key, nullptr);
GPR_ASSERT(pem_key_cert_pair->cert_chain != nullptr); CHECK_NE(pem_key_cert_pair->cert_chain, nullptr);
config_.pem_key_cert_pair = static_cast<tsi_ssl_pem_key_cert_pair*>( config_.pem_key_cert_pair = static_cast<tsi_ssl_pem_key_cert_pair*>(
gpr_zalloc(sizeof(tsi_ssl_pem_key_cert_pair))); gpr_zalloc(sizeof(tsi_ssl_pem_key_cert_pair)));
config_.pem_key_cert_pair->cert_chain = config_.pem_key_cert_pair->cert_chain =
@ -234,7 +235,7 @@ grpc_channel_credentials* grpc_ssl_credentials_create(
"verify_options=%p, " "verify_options=%p, "
"reserved=%p)", "reserved=%p)",
4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved)); 4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return new grpc_ssl_credentials( return new grpc_ssl_credentials(
pem_root_certs, pem_key_cert_pair, pem_root_certs, pem_key_cert_pair,
@ -250,7 +251,7 @@ grpc_channel_credentials* grpc_ssl_credentials_create_ex(
"verify_options=%p, " "verify_options=%p, "
"reserved=%p)", "reserved=%p)",
4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved)); 4, (pem_root_certs, pem_key_cert_pair, verify_options, reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
return new grpc_ssl_credentials(pem_root_certs, pem_key_cert_pair, return new grpc_ssl_credentials(pem_root_certs, pem_key_cert_pair,
verify_options); verify_options);
@ -300,13 +301,13 @@ tsi_ssl_pem_key_cert_pair* grpc_convert_grpc_to_tsi_cert_pairs(
size_t num_key_cert_pairs) { size_t num_key_cert_pairs) {
tsi_ssl_pem_key_cert_pair* tsi_pairs = nullptr; tsi_ssl_pem_key_cert_pair* tsi_pairs = nullptr;
if (num_key_cert_pairs > 0) { if (num_key_cert_pairs > 0) {
GPR_ASSERT(pem_key_cert_pairs != nullptr); CHECK_NE(pem_key_cert_pairs, nullptr);
tsi_pairs = static_cast<tsi_ssl_pem_key_cert_pair*>( tsi_pairs = static_cast<tsi_ssl_pem_key_cert_pair*>(
gpr_zalloc(num_key_cert_pairs * sizeof(tsi_ssl_pem_key_cert_pair))); gpr_zalloc(num_key_cert_pairs * sizeof(tsi_ssl_pem_key_cert_pair)));
} }
for (size_t i = 0; i < num_key_cert_pairs; i++) { for (size_t i = 0; i < num_key_cert_pairs; i++) {
GPR_ASSERT(pem_key_cert_pairs[i].private_key != nullptr); CHECK_NE(pem_key_cert_pairs[i].private_key, nullptr);
GPR_ASSERT(pem_key_cert_pairs[i].cert_chain != nullptr); CHECK_NE(pem_key_cert_pairs[i].cert_chain, nullptr);
tsi_pairs[i].cert_chain = gpr_strdup(pem_key_cert_pairs[i].cert_chain); tsi_pairs[i].cert_chain = gpr_strdup(pem_key_cert_pairs[i].cert_chain);
tsi_pairs[i].private_key = gpr_strdup(pem_key_cert_pairs[i].private_key); tsi_pairs[i].private_key = gpr_strdup(pem_key_cert_pairs[i].private_key);
} }
@ -343,14 +344,14 @@ grpc_ssl_server_certificate_config* grpc_ssl_server_certificate_config_create(
gpr_zalloc(sizeof(grpc_ssl_server_certificate_config))); gpr_zalloc(sizeof(grpc_ssl_server_certificate_config)));
config->pem_root_certs = gpr_strdup(pem_root_certs); config->pem_root_certs = gpr_strdup(pem_root_certs);
if (num_key_cert_pairs > 0) { if (num_key_cert_pairs > 0) {
GPR_ASSERT(pem_key_cert_pairs != nullptr); CHECK_NE(pem_key_cert_pairs, nullptr);
config->pem_key_cert_pairs = static_cast<grpc_ssl_pem_key_cert_pair*>( config->pem_key_cert_pairs = static_cast<grpc_ssl_pem_key_cert_pair*>(
gpr_zalloc(num_key_cert_pairs * sizeof(grpc_ssl_pem_key_cert_pair))); gpr_zalloc(num_key_cert_pairs * sizeof(grpc_ssl_pem_key_cert_pair)));
} }
config->num_key_cert_pairs = num_key_cert_pairs; config->num_key_cert_pairs = num_key_cert_pairs;
for (size_t i = 0; i < num_key_cert_pairs; i++) { for (size_t i = 0; i < num_key_cert_pairs; i++) {
GPR_ASSERT(pem_key_cert_pairs[i].private_key != nullptr); CHECK_NE(pem_key_cert_pairs[i].private_key, nullptr);
GPR_ASSERT(pem_key_cert_pairs[i].cert_chain != nullptr); CHECK_NE(pem_key_cert_pairs[i].cert_chain, nullptr);
config->pem_key_cert_pairs[i].cert_chain = config->pem_key_cert_pairs[i].cert_chain =
gpr_strdup(pem_key_cert_pairs[i].cert_chain); gpr_strdup(pem_key_cert_pairs[i].cert_chain);
config->pem_key_cert_pairs[i].private_key = config->pem_key_cert_pairs[i].private_key =
@ -435,7 +436,7 @@ grpc_server_credentials* grpc_ssl_server_credentials_create_ex(
5, 5,
(pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs,
client_certificate_request, reserved)); client_certificate_request, reserved));
GPR_ASSERT(reserved == nullptr); CHECK_EQ(reserved, nullptr);
grpc_ssl_server_certificate_config* cert_config = grpc_ssl_server_certificate_config* cert_config =
grpc_ssl_server_certificate_config_create( grpc_ssl_server_certificate_config_create(

@ -20,6 +20,8 @@
#include <stddef.h> #include <stddef.h>
#include "absl/log/check.h"
#include <grpc/credentials.h> #include <grpc/credentials.h>
#include <grpc/grpc.h> #include <grpc/grpc.h>
#include <grpc/grpc_security.h> #include <grpc/grpc_security.h>
@ -116,7 +118,7 @@ class grpc_ssl_server_credentials final : public grpc_server_credentials {
grpc_ssl_certificate_config_reload_status FetchCertConfig( grpc_ssl_certificate_config_reload_status FetchCertConfig(
grpc_ssl_server_certificate_config** config) { grpc_ssl_server_certificate_config** config) {
GPR_DEBUG_ASSERT(has_cert_config_fetcher()); DCHECK(has_cert_config_fetcher());
return certificate_config_fetcher_.cb(certificate_config_fetcher_.user_data, return certificate_config_fetcher_.cb(certificate_config_fetcher_.user_data,
config); config);
} }

@ -16,6 +16,7 @@
#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h" #include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h"
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include <grpc/credentials.h> #include <grpc/credentials.h>
@ -26,17 +27,17 @@
void grpc_tls_certificate_distributor::SetKeyMaterials( void grpc_tls_certificate_distributor::SetKeyMaterials(
const std::string& cert_name, absl::optional<std::string> pem_root_certs, const std::string& cert_name, absl::optional<std::string> pem_root_certs,
absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs) { absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs) {
GPR_ASSERT(pem_root_certs.has_value() || pem_key_cert_pairs.has_value()); CHECK(pem_root_certs.has_value() || pem_key_cert_pairs.has_value());
grpc_core::MutexLock lock(&mu_); grpc_core::MutexLock lock(&mu_);
auto& cert_info = certificate_info_map_[cert_name]; auto& cert_info = certificate_info_map_[cert_name];
if (pem_root_certs.has_value()) { if (pem_root_certs.has_value()) {
// Successful credential updates will clear any pre-existing error. // Successful credential updates will clear any pre-existing error.
cert_info.SetRootError(absl::OkStatus()); cert_info.SetRootError(absl::OkStatus());
for (auto* watcher_ptr : cert_info.root_cert_watchers) { for (auto* watcher_ptr : cert_info.root_cert_watchers) {
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
const auto watcher_it = watchers_.find(watcher_ptr); const auto watcher_it = watchers_.find(watcher_ptr);
GPR_ASSERT(watcher_it != watchers_.end()); CHECK(watcher_it != watchers_.end());
GPR_ASSERT(watcher_it->second.root_cert_name.has_value()); CHECK(watcher_it->second.root_cert_name.has_value());
absl::optional<grpc_core::PemKeyCertPairList> absl::optional<grpc_core::PemKeyCertPairList>
pem_key_cert_pairs_to_report; pem_key_cert_pairs_to_report;
if (pem_key_cert_pairs.has_value() && if (pem_key_cert_pairs.has_value() &&
@ -58,10 +59,10 @@ void grpc_tls_certificate_distributor::SetKeyMaterials(
// Successful credential updates will clear any pre-existing error. // Successful credential updates will clear any pre-existing error.
cert_info.SetIdentityError(absl::OkStatus()); cert_info.SetIdentityError(absl::OkStatus());
for (const auto watcher_ptr : cert_info.identity_cert_watchers) { for (const auto watcher_ptr : cert_info.identity_cert_watchers) {
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
const auto watcher_it = watchers_.find(watcher_ptr); const auto watcher_it = watchers_.find(watcher_ptr);
GPR_ASSERT(watcher_it != watchers_.end()); CHECK(watcher_it != watchers_.end());
GPR_ASSERT(watcher_it->second.identity_cert_name.has_value()); CHECK(watcher_it->second.identity_cert_name.has_value());
absl::optional<absl::string_view> pem_root_certs_to_report; absl::optional<absl::string_view> pem_root_certs_to_report;
if (pem_root_certs.has_value() && if (pem_root_certs.has_value() &&
watcher_it->second.root_cert_name == cert_name) { watcher_it->second.root_cert_name == cert_name) {
@ -102,14 +103,14 @@ void grpc_tls_certificate_distributor::SetErrorForCert(
const std::string& cert_name, const std::string& cert_name,
absl::optional<grpc_error_handle> root_cert_error, absl::optional<grpc_error_handle> root_cert_error,
absl::optional<grpc_error_handle> identity_cert_error) { absl::optional<grpc_error_handle> identity_cert_error) {
GPR_ASSERT(root_cert_error.has_value() || identity_cert_error.has_value()); CHECK(root_cert_error.has_value() || identity_cert_error.has_value());
grpc_core::MutexLock lock(&mu_); grpc_core::MutexLock lock(&mu_);
CertificateInfo& cert_info = certificate_info_map_[cert_name]; CertificateInfo& cert_info = certificate_info_map_[cert_name];
if (root_cert_error.has_value()) { if (root_cert_error.has_value()) {
for (auto* watcher_ptr : cert_info.root_cert_watchers) { for (auto* watcher_ptr : cert_info.root_cert_watchers) {
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
const auto watcher_it = watchers_.find(watcher_ptr); const auto watcher_it = watchers_.find(watcher_ptr);
GPR_ASSERT(watcher_it != watchers_.end()); CHECK(watcher_it != watchers_.end());
// identity_cert_error_to_report is the error of the identity cert this // identity_cert_error_to_report is the error of the identity cert this
// watcher is watching, if there is any. // watcher is watching, if there is any.
grpc_error_handle identity_cert_error_to_report; grpc_error_handle identity_cert_error_to_report;
@ -127,9 +128,9 @@ void grpc_tls_certificate_distributor::SetErrorForCert(
} }
if (identity_cert_error.has_value()) { if (identity_cert_error.has_value()) {
for (auto* watcher_ptr : cert_info.identity_cert_watchers) { for (auto* watcher_ptr : cert_info.identity_cert_watchers) {
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
const auto watcher_it = watchers_.find(watcher_ptr); const auto watcher_it = watchers_.find(watcher_ptr);
GPR_ASSERT(watcher_it != watchers_.end()); CHECK(watcher_it != watchers_.end());
// root_cert_error_to_report is the error of the root cert this watcher is // root_cert_error_to_report is the error of the root cert this watcher is
// watching, if there is any. // watching, if there is any.
grpc_error_handle root_cert_error_to_report; grpc_error_handle root_cert_error_to_report;
@ -150,11 +151,11 @@ void grpc_tls_certificate_distributor::SetErrorForCert(
}; };
void grpc_tls_certificate_distributor::SetError(grpc_error_handle error) { void grpc_tls_certificate_distributor::SetError(grpc_error_handle error) {
GPR_ASSERT(!error.ok()); CHECK(!error.ok());
grpc_core::MutexLock lock(&mu_); grpc_core::MutexLock lock(&mu_);
for (const auto& watcher : watchers_) { for (const auto& watcher : watchers_) {
const auto watcher_ptr = watcher.first; const auto watcher_ptr = watcher.first;
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
const auto& watcher_info = watcher.second; const auto& watcher_info = watcher.second;
watcher_ptr->OnError( watcher_ptr->OnError(
watcher_info.root_cert_name.has_value() ? error : absl::OkStatus(), watcher_info.root_cert_name.has_value() ? error : absl::OkStatus(),
@ -175,16 +176,16 @@ void grpc_tls_certificate_distributor::WatchTlsCertificates(
bool already_watching_identity_for_root_cert = false; bool already_watching_identity_for_root_cert = false;
bool start_watching_identity_cert = false; bool start_watching_identity_cert = false;
bool already_watching_root_for_identity_cert = false; bool already_watching_root_for_identity_cert = false;
GPR_ASSERT(root_cert_name.has_value() || identity_cert_name.has_value()); CHECK(root_cert_name.has_value() || identity_cert_name.has_value());
TlsCertificatesWatcherInterface* watcher_ptr = watcher.get(); TlsCertificatesWatcherInterface* watcher_ptr = watcher.get();
GPR_ASSERT(watcher_ptr != nullptr); CHECK_NE(watcher_ptr, nullptr);
// Update watchers_ and certificate_info_map_. // Update watchers_ and certificate_info_map_.
{ {
grpc_core::MutexLock lock(&mu_); grpc_core::MutexLock lock(&mu_);
const auto watcher_it = watchers_.find(watcher_ptr); const auto watcher_it = watchers_.find(watcher_ptr);
// The caller needs to cancel the watcher first if it wants to re-register // The caller needs to cancel the watcher first if it wants to re-register
// the watcher. // the watcher.
GPR_ASSERT(watcher_it == watchers_.end()); CHECK(watcher_it == watchers_.end());
watchers_[watcher_ptr] = {std::move(watcher), root_cert_name, watchers_[watcher_ptr] = {std::move(watcher), root_cert_name,
identity_cert_name}; identity_cert_name};
absl::optional<absl::string_view> updated_root_certs; absl::optional<absl::string_view> updated_root_certs;
@ -270,7 +271,7 @@ void grpc_tls_certificate_distributor::CancelTlsCertificatesWatch(
watchers_.erase(it); watchers_.erase(it);
if (root_cert_name.has_value()) { if (root_cert_name.has_value()) {
auto it = certificate_info_map_.find(*root_cert_name); auto it = certificate_info_map_.find(*root_cert_name);
GPR_ASSERT(it != certificate_info_map_.end()); CHECK(it != certificate_info_map_.end());
CertificateInfo& cert_info = it->second; CertificateInfo& cert_info = it->second;
cert_info.root_cert_watchers.erase(watcher); cert_info.root_cert_watchers.erase(watcher);
stop_watching_root_cert = cert_info.root_cert_watchers.empty(); stop_watching_root_cert = cert_info.root_cert_watchers.empty();
@ -282,7 +283,7 @@ void grpc_tls_certificate_distributor::CancelTlsCertificatesWatch(
} }
if (identity_cert_name.has_value()) { if (identity_cert_name.has_value()) {
auto it = certificate_info_map_.find(*identity_cert_name); auto it = certificate_info_map_.find(*identity_cert_name);
GPR_ASSERT(it != certificate_info_map_.end()); CHECK(it != certificate_info_map_.end());
CertificateInfo& cert_info = it->second; CertificateInfo& cert_info = it->second;
cert_info.identity_cert_watchers.erase(watcher); cert_info.identity_cert_watchers.erase(watcher);
stop_watching_identity_cert = cert_info.identity_cert_watchers.empty(); stop_watching_identity_cert = cert_info.identity_cert_watchers.empty();
@ -326,13 +327,13 @@ grpc_tls_identity_pairs* grpc_tls_identity_pairs_create() {
void grpc_tls_identity_pairs_add_pair(grpc_tls_identity_pairs* pairs, void grpc_tls_identity_pairs_add_pair(grpc_tls_identity_pairs* pairs,
const char* private_key, const char* private_key,
const char* cert_chain) { const char* cert_chain) {
GPR_ASSERT(pairs != nullptr); CHECK_NE(pairs, nullptr);
GPR_ASSERT(private_key != nullptr); CHECK_NE(private_key, nullptr);
GPR_ASSERT(cert_chain != nullptr); CHECK_NE(cert_chain, nullptr);
pairs->pem_key_cert_pairs.emplace_back(private_key, cert_chain); pairs->pem_key_cert_pairs.emplace_back(private_key, cert_chain);
} }
void grpc_tls_identity_pairs_destroy(grpc_tls_identity_pairs* pairs) { void grpc_tls_identity_pairs_destroy(grpc_tls_identity_pairs* pairs) {
GPR_ASSERT(pairs != nullptr); CHECK_NE(pairs, nullptr);
delete pairs; delete pairs;
} }

@ -23,6 +23,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include <grpc/credentials.h> #include <grpc/credentials.h>
@ -128,15 +129,15 @@ FileWatcherCertificateProvider::FileWatcherCertificateProvider(
refresh_interval_sec_ = kMinimumFileWatcherRefreshIntervalSeconds; refresh_interval_sec_ = kMinimumFileWatcherRefreshIntervalSeconds;
} }
// Private key and identity cert files must be both set or both unset. // Private key and identity cert files must be both set or both unset.
GPR_ASSERT(private_key_path_.empty() == identity_certificate_path_.empty()); CHECK(private_key_path_.empty() == identity_certificate_path_.empty());
// Must be watching either root or identity certs. // Must be watching either root or identity certs.
GPR_ASSERT(!private_key_path_.empty() || !root_cert_path_.empty()); CHECK(!private_key_path_.empty() || !root_cert_path_.empty());
gpr_event_init(&shutdown_event_); gpr_event_init(&shutdown_event_);
ForceUpdate(); ForceUpdate();
auto thread_lambda = [](void* arg) { auto thread_lambda = [](void* arg) {
FileWatcherCertificateProvider* provider = FileWatcherCertificateProvider* provider =
static_cast<FileWatcherCertificateProvider*>(arg); static_cast<FileWatcherCertificateProvider*>(arg);
GPR_ASSERT(provider != nullptr); CHECK_NE(provider, nullptr);
while (true) { while (true) {
void* value = gpr_event_wait( void* value = gpr_event_wait(
&provider->shutdown_event_, &provider->shutdown_event_,
@ -386,7 +387,7 @@ int64_t FileWatcherCertificateProvider::TestOnlyGetRefreshIntervalSecond()
grpc_tls_certificate_provider* grpc_tls_certificate_provider_static_data_create( grpc_tls_certificate_provider* grpc_tls_certificate_provider_static_data_create(
const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs) { const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs) {
GPR_ASSERT(root_certificate != nullptr || pem_key_cert_pairs != nullptr); CHECK(root_certificate != nullptr || pem_key_cert_pairs != nullptr);
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
grpc_core::PemKeyCertPairList identity_pairs_core; grpc_core::PemKeyCertPairList identity_pairs_core;
if (pem_key_cert_pairs != nullptr) { if (pem_key_cert_pairs != nullptr) {

@ -23,6 +23,7 @@
#include <string> #include <string>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -65,7 +66,7 @@ struct grpc_tls_certificate_provider
// be reused when two different `grpc_tls_certificate_provider` objects are // be reused when two different `grpc_tls_certificate_provider` objects are
// used but they compare as equal (assuming other channel args match). // used but they compare as equal (assuming other channel args match).
int Compare(const grpc_tls_certificate_provider* other) const { int Compare(const grpc_tls_certificate_provider* other) const {
GPR_ASSERT(other != nullptr); CHECK_NE(other, nullptr);
int r = type().Compare(other->type()); int r = type().Compare(other->type());
if (r != 0) return r; if (r != 0) return r;
return CompareImpl(other); return CompareImpl(other);

@ -21,6 +21,7 @@
#include <string> #include <string>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/support/alloc.h> #include <grpc/support/alloc.h>
@ -111,7 +112,7 @@ UniqueTypeName NoOpCertificateVerifier::type() const {
bool HostNameCertificateVerifier::Verify( bool HostNameCertificateVerifier::Verify(
grpc_tls_custom_verification_check_request* request, grpc_tls_custom_verification_check_request* request,
std::function<void(absl::Status)>, absl::Status* sync_status) { std::function<void(absl::Status)>, absl::Status* sync_status) {
GPR_ASSERT(request != nullptr); CHECK_NE(request, nullptr);
// Extract the target name, and remove its port. // Extract the target name, and remove its port.
const char* target_name = request->target_name; const char* target_name = request->target_name;
if (target_name == nullptr) { if (target_name == nullptr) {

@ -21,6 +21,7 @@
#include <map> #include <map>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include <grpc/credentials.h> #include <grpc/credentials.h>
@ -58,7 +59,7 @@ struct grpc_tls_certificate_verifier
// If this method returns 0, it means that gRPC can treat the two certificate // If this method returns 0, it means that gRPC can treat the two certificate
// verifiers as effectively the same. // verifiers as effectively the same.
int Compare(const grpc_tls_certificate_verifier* other) const { int Compare(const grpc_tls_certificate_verifier* other) const {
GPR_ASSERT(other != nullptr); CHECK_NE(other, nullptr);
int r = type().Compare(other->type()); int r = type().Compare(other->type());
if (r != 0) return r; if (r != 0) return r;
return CompareImpl(other); return CompareImpl(other);

@ -20,6 +20,8 @@
#include <memory> #include <memory>
#include "absl/log/check.h"
#include <grpc/grpc_crl_provider.h> #include <grpc/grpc_crl_provider.h>
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -39,7 +41,7 @@ grpc_tls_credentials_options* grpc_tls_credentials_options_create() {
grpc_tls_credentials_options* grpc_tls_credentials_options_copy( grpc_tls_credentials_options* grpc_tls_credentials_options_copy(
grpc_tls_credentials_options* options) { grpc_tls_credentials_options* options) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
return new grpc_tls_credentials_options(*options); return new grpc_tls_credentials_options(*options);
} }
@ -51,21 +53,21 @@ void grpc_tls_credentials_options_destroy(
void grpc_tls_credentials_options_set_cert_request_type( void grpc_tls_credentials_options_set_cert_request_type(
grpc_tls_credentials_options* options, grpc_tls_credentials_options* options,
grpc_ssl_client_certificate_request_type type) { grpc_ssl_client_certificate_request_type type) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_cert_request_type(type); options->set_cert_request_type(type);
} }
void grpc_tls_credentials_options_set_verify_server_cert( void grpc_tls_credentials_options_set_verify_server_cert(
grpc_tls_credentials_options* options, int verify_server_cert) { grpc_tls_credentials_options* options, int verify_server_cert) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_verify_server_cert(verify_server_cert); options->set_verify_server_cert(verify_server_cert);
} }
void grpc_tls_credentials_options_set_certificate_provider( void grpc_tls_credentials_options_set_certificate_provider(
grpc_tls_credentials_options* options, grpc_tls_credentials_options* options,
grpc_tls_certificate_provider* provider) { grpc_tls_certificate_provider* provider) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
GPR_ASSERT(provider != nullptr); CHECK_NE(provider, nullptr);
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
options->set_certificate_provider( options->set_certificate_provider(
provider->Ref(DEBUG_LOCATION, "set_certificate_provider")); provider->Ref(DEBUG_LOCATION, "set_certificate_provider"));
@ -73,45 +75,45 @@ void grpc_tls_credentials_options_set_certificate_provider(
void grpc_tls_credentials_options_watch_root_certs( void grpc_tls_credentials_options_watch_root_certs(
grpc_tls_credentials_options* options) { grpc_tls_credentials_options* options) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_watch_root_cert(true); options->set_watch_root_cert(true);
} }
void grpc_tls_credentials_options_set_root_cert_name( void grpc_tls_credentials_options_set_root_cert_name(
grpc_tls_credentials_options* options, const char* root_cert_name) { grpc_tls_credentials_options* options, const char* root_cert_name) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_root_cert_name(root_cert_name); options->set_root_cert_name(root_cert_name);
} }
void grpc_tls_credentials_options_watch_identity_key_cert_pairs( void grpc_tls_credentials_options_watch_identity_key_cert_pairs(
grpc_tls_credentials_options* options) { grpc_tls_credentials_options* options) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_watch_identity_pair(true); options->set_watch_identity_pair(true);
} }
void grpc_tls_credentials_options_set_identity_cert_name( void grpc_tls_credentials_options_set_identity_cert_name(
grpc_tls_credentials_options* options, const char* identity_cert_name) { grpc_tls_credentials_options* options, const char* identity_cert_name) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_identity_cert_name(identity_cert_name); options->set_identity_cert_name(identity_cert_name);
} }
void grpc_tls_credentials_options_set_certificate_verifier( void grpc_tls_credentials_options_set_certificate_verifier(
grpc_tls_credentials_options* options, grpc_tls_credentials_options* options,
grpc_tls_certificate_verifier* verifier) { grpc_tls_certificate_verifier* verifier) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
GPR_ASSERT(verifier != nullptr); CHECK_NE(verifier, nullptr);
options->set_certificate_verifier(verifier->Ref()); options->set_certificate_verifier(verifier->Ref());
} }
void grpc_tls_credentials_options_set_crl_directory( void grpc_tls_credentials_options_set_crl_directory(
grpc_tls_credentials_options* options, const char* crl_directory) { grpc_tls_credentials_options* options, const char* crl_directory) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_crl_directory(crl_directory); options->set_crl_directory(crl_directory);
} }
void grpc_tls_credentials_options_set_check_call_host( void grpc_tls_credentials_options_set_check_call_host(
grpc_tls_credentials_options* options, int check_call_host) { grpc_tls_credentials_options* options, int check_call_host) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_check_call_host(check_call_host); options->set_check_call_host(check_call_host);
} }
@ -145,18 +147,18 @@ void grpc_tls_credentials_options_set_send_client_ca_list(
void grpc_tls_credentials_options_set_crl_provider( void grpc_tls_credentials_options_set_crl_provider(
grpc_tls_credentials_options* options, grpc_tls_credentials_options* options,
std::shared_ptr<grpc_core::experimental::CrlProvider> provider) { std::shared_ptr<grpc_core::experimental::CrlProvider> provider) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_crl_provider(provider); options->set_crl_provider(provider);
} }
void grpc_tls_credentials_options_set_min_tls_version( void grpc_tls_credentials_options_set_min_tls_version(
grpc_tls_credentials_options* options, grpc_tls_version min_tls_version) { grpc_tls_credentials_options* options, grpc_tls_version min_tls_version) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_min_tls_version(min_tls_version); options->set_min_tls_version(min_tls_version);
} }
void grpc_tls_credentials_options_set_max_tls_version( void grpc_tls_credentials_options_set_max_tls_version(
grpc_tls_credentials_options* options, grpc_tls_version max_tls_version) { grpc_tls_credentials_options* options, grpc_tls_version max_tls_version) {
GPR_ASSERT(options != nullptr); CHECK_NE(options, nullptr);
options->set_max_tls_version(max_tls_version); options->set_max_tls_version(max_tls_version);
} }

@ -18,6 +18,7 @@
#include "src/core/lib/security/credentials/xds/xds_credentials.h" #include "src/core/lib/security/credentials/xds/xds_credentials.h"
#include "absl/log/check.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
#include <grpc/grpc_security_constants.h> #include <grpc/grpc_security_constants.h>
@ -79,7 +80,7 @@ XdsCertificateVerifier::XdsCertificateVerifier(
bool XdsCertificateVerifier::Verify( bool XdsCertificateVerifier::Verify(
grpc_tls_custom_verification_check_request* request, grpc_tls_custom_verification_check_request* request,
std::function<void(absl::Status)>, absl::Status* sync_status) { std::function<void(absl::Status)>, absl::Status* sync_status) {
GPR_ASSERT(request != nullptr); CHECK_NE(request, nullptr);
if (!XdsVerifySubjectAlternativeNames( if (!XdsVerifySubjectAlternativeNames(
request->peer_info.san_names.uri_names, request->peer_info.san_names.uri_names,
request->peer_info.san_names.uri_names_size, request->peer_info.san_names.uri_names_size,
@ -165,7 +166,7 @@ XdsCredentials::create_security_connector(
target_name, args); target_name, args);
} }
} }
GPR_ASSERT(fallback_credentials_ != nullptr); CHECK(fallback_credentials_ != nullptr);
return fallback_credentials_->create_security_connector(std::move(call_creds), return fallback_credentials_->create_security_connector(std::move(call_creds),
target_name, args); target_name, args);
} }
@ -216,12 +217,12 @@ UniqueTypeName XdsServerCredentials::Type() {
grpc_channel_credentials* grpc_xds_credentials_create( grpc_channel_credentials* grpc_xds_credentials_create(
grpc_channel_credentials* fallback_credentials) { grpc_channel_credentials* fallback_credentials) {
GPR_ASSERT(fallback_credentials != nullptr); CHECK_NE(fallback_credentials, nullptr);
return new grpc_core::XdsCredentials(fallback_credentials->Ref()); return new grpc_core::XdsCredentials(fallback_credentials->Ref());
} }
grpc_server_credentials* grpc_xds_server_credentials_create( grpc_server_credentials* grpc_xds_server_credentials_create(
grpc_server_credentials* fallback_credentials) { grpc_server_credentials* fallback_credentials) {
GPR_ASSERT(fallback_credentials != nullptr); CHECK_NE(fallback_credentials, nullptr);
return new grpc_core::XdsServerCredentials(fallback_credentials->Ref()); return new grpc_core::XdsServerCredentials(fallback_credentials->Ref());
} }

@ -98,13 +98,13 @@
#include "src/core/lib/surface/call_test_only.h" #include "src/core/lib/surface/call_test_only.h"
#include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/server_interface.h"
#include "src/core/lib/surface/validate_metadata.h" #include "src/core/lib/surface/validate_metadata.h"
#include "src/core/lib/surface/wait_for_cq_end_op.h" #include "src/core/lib/surface/wait_for_cq_end_op.h"
#include "src/core/lib/transport/batch_builder.h" #include "src/core/lib/transport/batch_builder.h"
#include "src/core/lib/transport/error_utils.h" #include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/server/server_interface.h"
grpc_core::TraceFlag grpc_call_error_trace(false, "call_error"); grpc_core::TraceFlag grpc_call_error_trace(false, "call_error");
grpc_core::TraceFlag grpc_compression_trace(false, "compression"); grpc_core::TraceFlag grpc_compression_trace(false, "compression");

@ -49,8 +49,8 @@
#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice.h"
#include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/server_interface.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/server/server_interface.h"
typedef void (*grpc_ioreq_completion_func)(grpc_call* call, int success, typedef void (*grpc_ioreq_completion_func)(grpc_call* call, int success,
void* user_data); void* user_data);

@ -16,6 +16,8 @@
#include <type_traits> #include <type_traits>
#include "absl/log/check.h"
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#include "src/core/lib/promise/poll.h" #include "src/core/lib/promise/poll.h"
@ -96,13 +98,13 @@ BatchBuilder::Batch* BatchBuilder::GetBatch(Target target) {
batch_ = GetContext<Arena>()->NewPooled<Batch>(payload_, batch_ = GetContext<Arena>()->NewPooled<Batch>(payload_,
target_->stream_refcount); target_->stream_refcount);
} }
GPR_ASSERT(batch_ != nullptr); CHECK_NE(batch_, nullptr);
return batch_; return batch_;
} }
void BatchBuilder::FlushBatch() { void BatchBuilder::FlushBatch() {
GPR_ASSERT(batch_ != nullptr); CHECK_NE(batch_, nullptr);
GPR_ASSERT(target_.has_value()); CHECK(target_.has_value());
if (grpc_call_trace.enabled()) { if (grpc_call_trace.enabled()) {
gpr_log( gpr_log(
GPR_DEBUG, "%sPerform transport stream op batch: %p %s", GPR_DEBUG, "%sPerform transport stream op batch: %p %s",

@ -23,6 +23,8 @@
#include <algorithm> #include <algorithm>
#include "absl/log/check.h"
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
grpc_core::TraceFlag grpc_bdp_estimator_trace(false, "bdp_estimator"); grpc_core::TraceFlag grpc_bdp_estimator_trace(false, "bdp_estimator");
@ -53,7 +55,7 @@ Timestamp BdpEstimator::CompletePing() {
std::string(name_).c_str(), accumulator_, estimate_, dt, std::string(name_).c_str(), accumulator_, estimate_, dt,
bw / 125000.0, bw_est_ / 125000.0); bw / 125000.0, bw_est_ / 125000.0);
} }
GPR_ASSERT(ping_state_ == PingState::STARTED); CHECK(ping_state_ == PingState::STARTED);
if (accumulator_ > 2 * estimate_ / 3 && bw > bw_est_) { if (accumulator_ > 2 * estimate_ / 3 && bw > bw_est_) {
estimate_ = std::max(accumulator_, estimate_ * 2); estimate_ = std::max(accumulator_, estimate_ * 2);
bw_est_ = bw; bw_est_ = bw;

@ -23,6 +23,7 @@
#include <string> #include <string>
#include "absl/log/check.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
@ -54,7 +55,7 @@ class BdpEstimator {
gpr_log(GPR_INFO, "bdp[%s]:sched acc=%" PRId64 " est=%" PRId64, gpr_log(GPR_INFO, "bdp[%s]:sched acc=%" PRId64 " est=%" PRId64,
std::string(name_).c_str(), accumulator_, estimate_); std::string(name_).c_str(), accumulator_, estimate_);
} }
GPR_ASSERT(ping_state_ == PingState::UNSCHEDULED); CHECK(ping_state_ == PingState::UNSCHEDULED);
ping_state_ = PingState::SCHEDULED; ping_state_ = PingState::SCHEDULED;
accumulator_ = 0; accumulator_ = 0;
} }
@ -67,7 +68,7 @@ class BdpEstimator {
gpr_log(GPR_INFO, "bdp[%s]:start acc=%" PRId64 " est=%" PRId64, gpr_log(GPR_INFO, "bdp[%s]:start acc=%" PRId64 " est=%" PRId64,
std::string(name_).c_str(), accumulator_, estimate_); std::string(name_).c_str(), accumulator_, estimate_);
} }
GPR_ASSERT(ping_state_ == PingState::SCHEDULED); CHECK(ping_state_ == PingState::SCHEDULED);
ping_state_ = PingState::STARTED; ping_state_ = PingState::STARTED;
ping_start_time_ = gpr_now(GPR_CLOCK_MONOTONIC); ping_start_time_ = gpr_now(GPR_CLOCK_MONOTONIC);
} }

@ -36,7 +36,7 @@ class UnstartedCallDestination
// and started. // and started.
// Must be called from the party owned by the call, eg the following must // Must be called from the party owned by the call, eg the following must
// hold: // hold:
// GPR_ASSERT(GetContext<Activity>() == unstarted_call_handler.party()); // CHECK(GetContext<Activity>() == unstarted_call_handler.party());
virtual void StartCall(UnstartedCallHandler unstarted_call_handler) = 0; virtual void StartCall(UnstartedCallHandler unstarted_call_handler) = 0;
}; };

@ -14,6 +14,8 @@
#include "src/core/lib/transport/call_filters.h" #include "src/core/lib/transport/call_filters.h"
#include "absl/log/check.h"
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/crash.h" #include "src/core/lib/gprpp/crash.h"
@ -43,7 +45,7 @@ Poll<ResultOr<T>> OperationExecutor<T>::Start(
if (layout->promise_size == 0) { if (layout->promise_size == 0) {
// No call state ==> instantaneously ready // No call state ==> instantaneously ready
auto r = InitStep(std::move(input), call_data); auto r = InitStep(std::move(input), call_data);
GPR_ASSERT(r.ready()); CHECK(r.ready());
return r; return r;
} }
promise_data_ = promise_data_ =
@ -53,7 +55,7 @@ Poll<ResultOr<T>> OperationExecutor<T>::Start(
template <typename T> template <typename T>
Poll<ResultOr<T>> OperationExecutor<T>::InitStep(T input, void* call_data) { Poll<ResultOr<T>> OperationExecutor<T>::InitStep(T input, void* call_data) {
GPR_ASSERT(input != nullptr); CHECK(input != nullptr);
while (true) { while (true) {
if (ops_ == end_ops_) { if (ops_ == end_ops_) {
return ResultOr<T>{std::move(input), nullptr}; return ResultOr<T>{std::move(input), nullptr};
@ -73,7 +75,7 @@ Poll<ResultOr<T>> OperationExecutor<T>::InitStep(T input, void* call_data) {
template <typename T> template <typename T>
Poll<ResultOr<T>> OperationExecutor<T>::Step(void* call_data) { Poll<ResultOr<T>> OperationExecutor<T>::Step(void* call_data) {
GPR_DEBUG_ASSERT(promise_data_ != nullptr); DCHECK_NE(promise_data_, nullptr);
auto p = ContinueStep(call_data); auto p = ContinueStep(call_data);
if (p.ready()) { if (p.ready()) {
gpr_free_aligned(promise_data_); gpr_free_aligned(promise_data_);
@ -109,7 +111,7 @@ Poll<T> InfallibleOperationExecutor<T>::Start(
if (layout->promise_size == 0) { if (layout->promise_size == 0) {
// No call state ==> instantaneously ready // No call state ==> instantaneously ready
auto r = InitStep(std::move(input), call_data); auto r = InitStep(std::move(input), call_data);
GPR_ASSERT(r.ready()); CHECK(r.ready());
return r; return r;
} }
promise_data_ = promise_data_ =
@ -137,7 +139,7 @@ Poll<T> InfallibleOperationExecutor<T>::InitStep(T input, void* call_data) {
template <typename T> template <typename T>
Poll<T> InfallibleOperationExecutor<T>::Step(void* call_data) { Poll<T> InfallibleOperationExecutor<T>::Step(void* call_data) {
GPR_DEBUG_ASSERT(promise_data_ != nullptr); DCHECK_NE(promise_data_, nullptr);
auto p = ContinueStep(call_data); auto p = ContinueStep(call_data);
if (p.ready()) { if (p.ready()) {
gpr_free_aligned(promise_data_); gpr_free_aligned(promise_data_);
@ -182,7 +184,7 @@ CallFilters::~CallFilters() {
} }
void CallFilters::SetStack(RefCountedPtr<Stack> stack) { void CallFilters::SetStack(RefCountedPtr<Stack> stack) {
GPR_ASSERT(call_data_ == nullptr); CHECK_EQ(call_data_, nullptr);
stack_ = std::move(stack); stack_ = std::move(stack);
call_data_ = gpr_malloc_aligned(stack_->data_.call_data_size, call_data_ = gpr_malloc_aligned(stack_->data_.call_data_size,
stack_->data_.call_data_alignment); stack_->data_.call_data_alignment);
@ -217,13 +219,13 @@ void CallFilters::CancelDueToFailedPipeOperation(SourceLocation but_where) {
} }
void CallFilters::PushServerTrailingMetadata(ServerMetadataHandle md) { void CallFilters::PushServerTrailingMetadata(ServerMetadataHandle md) {
GPR_ASSERT(md != nullptr); CHECK(md != nullptr);
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) {
gpr_log(GPR_INFO, "%s PushServerTrailingMetadata[%p]: %s into %s", gpr_log(GPR_INFO, "%s PushServerTrailingMetadata[%p]: %s into %s",
GetContext<Activity>()->DebugTag().c_str(), this, GetContext<Activity>()->DebugTag().c_str(), this,
md->DebugString().c_str(), DebugString().c_str()); md->DebugString().c_str(), DebugString().c_str());
} }
GPR_ASSERT(md != nullptr); CHECK(md != nullptr);
if (server_trailing_metadata_ != nullptr) return; if (server_trailing_metadata_ != nullptr) return;
server_trailing_metadata_ = std::move(md); server_trailing_metadata_ = std::move(md);
client_initial_metadata_state_.CloseWithError(); client_initial_metadata_state_.CloseWithError();
@ -286,7 +288,7 @@ RefCountedPtr<CallFilters::Stack> CallFilters::StackBuilder::Build() {
// CallFilters::PipeState // CallFilters::PipeState
void filters_detail::PipeState::Start() { void filters_detail::PipeState::Start() {
GPR_DEBUG_ASSERT(!started_); DCHECK(!started_);
started_ = true; started_ = true;
wait_recv_.Wake(); wait_recv_.Wake();
} }

@ -19,6 +19,8 @@
#include <memory> #include <memory>
#include <type_traits> #include <type_traits>
#include "absl/log/check.h"
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted.h"
@ -157,7 +159,7 @@ template <typename T>
struct ResultOr { struct ResultOr {
ResultOr(T ok, ServerMetadataHandle error) ResultOr(T ok, ServerMetadataHandle error)
: ok(std::move(ok)), error(std::move(error)) { : ok(std::move(ok)), error(std::move(error)) {
GPR_ASSERT((this->ok == nullptr) ^ (this->error == nullptr)); CHECK((this->ok == nullptr) ^ (this->error == nullptr));
} }
T ok; T ok;
ServerMetadataHandle error; ServerMetadataHandle error;
@ -990,13 +992,13 @@ struct StackData {
template <typename FilterType> template <typename FilterType>
void AddFinalizer(FilterType*, size_t, const NoInterceptor* p) { void AddFinalizer(FilterType*, size_t, const NoInterceptor* p) {
GPR_DEBUG_ASSERT(p == &FilterType::Call::OnFinalize); DCHECK(p == &FilterType::Call::OnFinalize);
} }
template <typename FilterType> template <typename FilterType>
void AddFinalizer(FilterType* channel_data, size_t call_offset, void AddFinalizer(FilterType* channel_data, size_t call_offset,
void (FilterType::Call::*p)(const grpc_call_final_info*)) { void (FilterType::Call::*p)(const grpc_call_final_info*)) {
GPR_DEBUG_ASSERT(p == &FilterType::Call::OnFinalize); DCHECK(p == &FilterType::Call::OnFinalize);
finalizers.push_back(Finalizer{ finalizers.push_back(Finalizer{
channel_data, channel_data,
call_offset, call_offset,
@ -1011,7 +1013,7 @@ struct StackData {
void AddFinalizer(FilterType* channel_data, size_t call_offset, void AddFinalizer(FilterType* channel_data, size_t call_offset,
void (FilterType::Call::*p)(const grpc_call_final_info*, void (FilterType::Call::*p)(const grpc_call_final_info*,
FilterType*)) { FilterType*)) {
GPR_DEBUG_ASSERT(p == &FilterType::Call::OnFinalize); DCHECK(p == &FilterType::Call::OnFinalize);
finalizers.push_back(Finalizer{ finalizers.push_back(Finalizer{
channel_data, channel_data,
call_offset, call_offset,
@ -1041,11 +1043,11 @@ class OperationExecutor {
OperationExecutor(OperationExecutor&& other) noexcept OperationExecutor(OperationExecutor&& other) noexcept
: ops_(other.ops_), end_ops_(other.end_ops_) { : ops_(other.ops_), end_ops_(other.end_ops_) {
// Movable iff we're not running. // Movable iff we're not running.
GPR_DEBUG_ASSERT(other.promise_data_ == nullptr); DCHECK_EQ(other.promise_data_, nullptr);
} }
OperationExecutor& operator=(OperationExecutor&& other) noexcept { OperationExecutor& operator=(OperationExecutor&& other) noexcept {
GPR_DEBUG_ASSERT(other.promise_data_ == nullptr); DCHECK_EQ(other.promise_data_, nullptr);
GPR_DEBUG_ASSERT(promise_data_ == nullptr); DCHECK_EQ(promise_data_, nullptr);
ops_ = other.ops_; ops_ = other.ops_;
end_ops_ = other.end_ops_; end_ops_ = other.end_ops_;
return *this; return *this;
@ -1094,12 +1096,12 @@ class InfallibleOperationExecutor {
InfallibleOperationExecutor(InfallibleOperationExecutor&& other) noexcept InfallibleOperationExecutor(InfallibleOperationExecutor&& other) noexcept
: ops_(other.ops_), end_ops_(other.end_ops_) { : ops_(other.ops_), end_ops_(other.end_ops_) {
// Movable iff we're not running. // Movable iff we're not running.
GPR_DEBUG_ASSERT(other.promise_data_ == nullptr); DCHECK_EQ(other.promise_data_, nullptr);
} }
InfallibleOperationExecutor& operator=( InfallibleOperationExecutor& operator=(
InfallibleOperationExecutor&& other) noexcept { InfallibleOperationExecutor&& other) noexcept {
GPR_DEBUG_ASSERT(other.promise_data_ == nullptr); DCHECK_EQ(other.promise_data_, nullptr);
GPR_DEBUG_ASSERT(promise_data_ == nullptr); DCHECK_EQ(promise_data_, nullptr);
ops_ = other.ops_; ops_ = other.ops_;
end_ops_ = other.end_ops_; end_ops_ = other.end_ops_;
return *this; return *this;
@ -1388,12 +1390,12 @@ class CallFilters {
public: public:
Push(CallFilters* filters, T x) Push(CallFilters* filters, T x)
: filters_(filters), value_(std::move(x)) { : filters_(filters), value_(std::move(x)) {
GPR_ASSERT(value_ != nullptr); CHECK(value_ != nullptr);
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) {
gpr_log(GPR_INFO, "BeginPush[%p|%p]: %s", &state(), this, gpr_log(GPR_INFO, "BeginPush[%p|%p]: %s", &state(), this,
state().DebugString().c_str()); state().DebugString().c_str());
} }
GPR_ASSERT(push_slot() == nullptr); CHECK_EQ(push_slot(), nullptr);
state().BeginPush(); state().BeginPush();
push_slot() = this; push_slot() = this;
} }
@ -1402,7 +1404,7 @@ class CallFilters {
if (value_ != nullptr) { if (value_ != nullptr) {
state().DropPush(); state().DropPush();
} }
GPR_ASSERT(push_slot() == this); CHECK(push_slot() == this);
push_slot() = nullptr; push_slot() = nullptr;
} }
} }
@ -1413,7 +1415,7 @@ class CallFilters {
: filters_(std::exchange(other.filters_, nullptr)), : filters_(std::exchange(other.filters_, nullptr)),
value_(std::move(other.value_)) { value_(std::move(other.value_)) {
if (filters_ != nullptr) { if (filters_ != nullptr) {
GPR_DEBUG_ASSERT(push_slot() == &other); DCHECK(push_slot() == &other);
push_slot() = this; push_slot() = this;
} }
} }
@ -1422,7 +1424,7 @@ class CallFilters {
Poll<StatusFlag> operator()() { Poll<StatusFlag> operator()() {
if (value_ == nullptr) { if (value_ == nullptr) {
GPR_ASSERT(filters_ == nullptr); CHECK_EQ(filters_, nullptr);
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) {
gpr_log(GPR_INFO, "Push[|%p]: already done", this); gpr_log(GPR_INFO, "Push[|%p]: already done", this);
} }
@ -1457,8 +1459,8 @@ class CallFilters {
gpr_log(GPR_INFO, "Push[%p|%p]: take value; %s", &state(), this, gpr_log(GPR_INFO, "Push[%p|%p]: take value; %s", &state(), this,
state().DebugString().c_str()); state().DebugString().c_str());
} }
GPR_ASSERT(value_ != nullptr); CHECK(value_ != nullptr);
GPR_ASSERT(filters_ != nullptr); CHECK(filters_ != nullptr);
push_slot() = nullptr; push_slot() = nullptr;
filters_ = nullptr; filters_ = nullptr;
return std::move(value_); return std::move(value_);
@ -1536,7 +1538,7 @@ class CallFilters {
Poll<filters_detail::ResultOr<T>> p) { Poll<filters_detail::ResultOr<T>> p) {
auto* r = p.value_if_ready(); auto* r = p.value_if_ready();
if (r == nullptr) return Pending{}; if (r == nullptr) return Pending{};
GPR_DEBUG_ASSERT(!executor_.IsRunning()); DCHECK(!executor_.IsRunning());
state().AckPull(); state().AckPull();
if (r->ok != nullptr) return std::move(r->ok); if (r->ok != nullptr) return std::move(r->ok);
filters_->PushServerTrailingMetadata(std::move(r->error)); filters_->PushServerTrailingMetadata(std::move(r->error));
@ -1564,7 +1566,7 @@ class CallFilters {
PullMessage& operator=(PullMessage&&) = delete; PullMessage& operator=(PullMessage&&) = delete;
Poll<ValueOrFailure<absl::optional<MessageHandle>>> operator()() { Poll<ValueOrFailure<absl::optional<MessageHandle>>> operator()() {
GPR_ASSERT(filters_ != nullptr); CHECK(filters_ != nullptr);
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) {
gpr_log(GPR_INFO, "PullMessage[%p|%p]: %s executor:%d", &state(), gpr_log(GPR_INFO, "PullMessage[%p|%p]: %s executor:%d", &state(),
this, state().DebugString().c_str(), executor_.IsRunning()); this, state().DebugString().c_str(), executor_.IsRunning());
@ -1592,7 +1594,7 @@ class CallFilters {
return Failure{}; return Failure{};
} }
if (!**r) return absl::nullopt; if (!**r) return absl::nullopt;
GPR_ASSERT(filters_ != nullptr); CHECK(filters_ != nullptr);
return FinishOperationExecutor(executor_.Start( return FinishOperationExecutor(executor_.Start(
layout(), push()->TakeValue(), filters_->call_data_)); layout(), push()->TakeValue(), filters_->call_data_));
} }
@ -1609,7 +1611,7 @@ class CallFilters {
FinishOperationExecutor(Poll<filters_detail::ResultOr<T>> p) { FinishOperationExecutor(Poll<filters_detail::ResultOr<T>> p) {
auto* r = p.value_if_ready(); auto* r = p.value_if_ready();
if (r == nullptr) return Pending{}; if (r == nullptr) return Pending{};
GPR_DEBUG_ASSERT(!executor_.IsRunning()); DCHECK(!executor_.IsRunning());
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_promise_primitives)) {
gpr_log(GPR_INFO, "PullMessage[%p|%p] executor done: %s", &state(), gpr_log(GPR_INFO, "PullMessage[%p|%p] executor done: %s", &state(),
this, state().DebugString().c_str()); this, state().DebugString().c_str());
@ -1658,7 +1660,7 @@ class CallFilters {
filters_->CancelDueToFailedPipeOperation(); filters_->CancelDueToFailedPipeOperation();
return Failure{}; return Failure{};
} }
GPR_ASSERT(filters_->client_initial_metadata_ != nullptr); CHECK(filters_->client_initial_metadata_ != nullptr);
return FinishOperationExecutor(executor_.Start( return FinishOperationExecutor(executor_.Start(
&filters_->stack_->data_.client_initial_metadata, &filters_->stack_->data_.client_initial_metadata,
std::move(filters_->client_initial_metadata_), filters_->call_data_)); std::move(filters_->client_initial_metadata_), filters_->call_data_));
@ -1673,7 +1675,7 @@ class CallFilters {
Poll<filters_detail::ResultOr<ClientMetadataHandle>> p) { Poll<filters_detail::ResultOr<ClientMetadataHandle>> p) {
auto* r = p.value_if_ready(); auto* r = p.value_if_ready();
if (r == nullptr) return Pending{}; if (r == nullptr) return Pending{};
GPR_DEBUG_ASSERT(!executor_.IsRunning()); DCHECK(!executor_.IsRunning());
state().AckPull(); state().AckPull();
if (r->ok != nullptr) return std::move(r->ok); if (r->ok != nullptr) return std::move(r->ok);
filters_->PushServerTrailingMetadata(std::move(r->error)); filters_->PushServerTrailingMetadata(std::move(r->error));
@ -1803,7 +1805,7 @@ inline auto CallFilters::PullClientInitialMetadata() {
} }
inline auto CallFilters::PushServerInitialMetadata(ServerMetadataHandle md) { inline auto CallFilters::PushServerInitialMetadata(ServerMetadataHandle md) {
GPR_ASSERT(md != nullptr); CHECK(md != nullptr);
return [p = ServerInitialMetadataPromises::Push{ return [p = ServerInitialMetadataPromises::Push{
this, std::move(md)}]() mutable { return p(); }; this, std::move(md)}]() mutable { return p(); };
} }
@ -1813,7 +1815,7 @@ inline auto CallFilters::PullServerInitialMetadata() {
} }
inline auto CallFilters::PushClientToServerMessage(MessageHandle message) { inline auto CallFilters::PushClientToServerMessage(MessageHandle message) {
GPR_ASSERT(message != nullptr); CHECK(message != nullptr);
return [p = ClientToServerMessagePromises::Push{ return [p = ClientToServerMessagePromises::Push{
this, std::move(message)}]() mutable { return p(); }; this, std::move(message)}]() mutable { return p(); };
} }
@ -1823,7 +1825,7 @@ inline auto CallFilters::PullClientToServerMessage() {
} }
inline auto CallFilters::PushServerToClientMessage(MessageHandle message) { inline auto CallFilters::PushServerToClientMessage(MessageHandle message) {
GPR_ASSERT(message != nullptr); CHECK(message != nullptr);
return [p = ServerToClientMessagePromises::Push{ return [p = ServerToClientMessagePromises::Push{
this, std::move(message)}]() mutable { return p(); }; this, std::move(message)}]() mutable { return p(); };
} }

@ -15,6 +15,8 @@
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H #ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H #define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -88,7 +90,7 @@ class CallSpineInterface {
// The resulting (returned) promise will resolve to Empty. // The resulting (returned) promise will resolve to Empty.
template <typename Promise> template <typename Promise>
auto CancelIfFails(Promise promise) { auto CancelIfFails(Promise promise) {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
using P = promise_detail::PromiseLike<Promise>; using P = promise_detail::PromiseLike<Promise>;
using ResultType = typename P::Result; using ResultType = typename P::Result;
return Map(std::move(promise), [this](ResultType r) { return Map(std::move(promise), [this](ResultType r) {
@ -151,7 +153,7 @@ class PipeBasedCallSpine : public CallSpineInterface {
Promise<ValueOrFailure<absl::optional<ServerMetadataHandle>>> Promise<ValueOrFailure<absl::optional<ServerMetadataHandle>>>
PullServerInitialMetadata() final { PullServerInitialMetadata() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(server_initial_metadata().receiver.Next(), return Map(server_initial_metadata().receiver.Next(),
[](NextResult<ServerMetadataHandle> md) [](NextResult<ServerMetadataHandle> md)
-> ValueOrFailure<absl::optional<ServerMetadataHandle>> { -> ValueOrFailure<absl::optional<ServerMetadataHandle>> {
@ -164,41 +166,41 @@ class PipeBasedCallSpine : public CallSpineInterface {
} }
Promise<ServerMetadataHandle> PullServerTrailingMetadata() final { Promise<ServerMetadataHandle> PullServerTrailingMetadata() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return cancel_latch().Wait(); return cancel_latch().Wait();
} }
Promise<ValueOrFailure<absl::optional<MessageHandle>>> Promise<ValueOrFailure<absl::optional<MessageHandle>>>
PullServerToClientMessage() final { PullServerToClientMessage() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(server_to_client_messages().receiver.Next(), MapNextMessage); return Map(server_to_client_messages().receiver.Next(), MapNextMessage);
} }
Promise<StatusFlag> PushClientToServerMessage(MessageHandle message) final { Promise<StatusFlag> PushClientToServerMessage(MessageHandle message) final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(client_to_server_messages().sender.Push(std::move(message)), return Map(client_to_server_messages().sender.Push(std::move(message)),
[](bool r) { return StatusFlag(r); }); [](bool r) { return StatusFlag(r); });
} }
Promise<ValueOrFailure<absl::optional<MessageHandle>>> Promise<ValueOrFailure<absl::optional<MessageHandle>>>
PullClientToServerMessage() final { PullClientToServerMessage() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(client_to_server_messages().receiver.Next(), MapNextMessage); return Map(client_to_server_messages().receiver.Next(), MapNextMessage);
} }
Promise<StatusFlag> PushServerToClientMessage(MessageHandle message) final { Promise<StatusFlag> PushServerToClientMessage(MessageHandle message) final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(server_to_client_messages().sender.Push(std::move(message)), return Map(server_to_client_messages().sender.Push(std::move(message)),
[](bool r) { return StatusFlag(r); }); [](bool r) { return StatusFlag(r); });
} }
void FinishSends() final { void FinishSends() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
client_to_server_messages().sender.Close(); client_to_server_messages().sender.Close();
} }
void PushServerTrailingMetadata(ServerMetadataHandle metadata) final { void PushServerTrailingMetadata(ServerMetadataHandle metadata) final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
auto& c = cancel_latch(); auto& c = cancel_latch();
if (c.is_set()) return; if (c.is_set()) return;
const bool was_cancelled = const bool was_cancelled =
@ -213,13 +215,13 @@ class PipeBasedCallSpine : public CallSpineInterface {
} }
Promise<bool> WasCancelled() final { Promise<bool> WasCancelled() final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return was_cancelled_latch().Wait(); return was_cancelled_latch().Wait();
} }
Promise<ValueOrFailure<ClientMetadataHandle>> PullClientInitialMetadata() Promise<ValueOrFailure<ClientMetadataHandle>> PullClientInitialMetadata()
final { final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return Map(client_initial_metadata().receiver.Next(), return Map(client_initial_metadata().receiver.Next(),
[](NextResult<ClientMetadataHandle> md) [](NextResult<ClientMetadataHandle> md)
-> ValueOrFailure<ClientMetadataHandle> { -> ValueOrFailure<ClientMetadataHandle> {
@ -230,7 +232,7 @@ class PipeBasedCallSpine : public CallSpineInterface {
Promise<StatusFlag> PushServerInitialMetadata( Promise<StatusFlag> PushServerInitialMetadata(
absl::optional<ServerMetadataHandle> md) final { absl::optional<ServerMetadataHandle> md) final {
GPR_DEBUG_ASSERT(GetContext<Activity>() == &party()); DCHECK(GetContext<Activity>() == &party());
return If( return If(
md.has_value(), md.has_value(),
[&md, this]() { [&md, this]() {

@ -28,6 +28,7 @@
#include "absl/container/inlined_vector.h" #include "absl/container/inlined_vector.h"
#include "absl/functional/function_ref.h" #include "absl/functional/function_ref.h"
#include "absl/log/check.h"
#include "absl/meta/type_traits.h" #include "absl/meta/type_traits.h"
#include "absl/strings/numbers.h" #include "absl/strings/numbers.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
@ -107,7 +108,7 @@ struct TeMetadata {
MetadataParseErrorFn on_error); MetadataParseErrorFn on_error);
static ValueType MementoToValue(MementoType te) { return te; } static ValueType MementoToValue(MementoType te) { return te; }
static StaticSlice Encode(ValueType x) { static StaticSlice Encode(ValueType x) {
GPR_ASSERT(x == kTrailers); CHECK(x == kTrailers);
return StaticSlice::FromStaticString("trailers"); return StaticSlice::FromStaticString("trailers");
} }
static const char* DisplayValue(ValueType te); static const char* DisplayValue(ValueType te);
@ -210,7 +211,7 @@ struct CompressionAlgorithmBasedMetadata {
MetadataParseErrorFn on_error); MetadataParseErrorFn on_error);
static ValueType MementoToValue(MementoType x) { return x; } static ValueType MementoToValue(MementoType x) { return x; }
static Slice Encode(ValueType x) { static Slice Encode(ValueType x) {
GPR_ASSERT(x != GRPC_COMPRESS_ALGORITHMS_COUNT); CHECK(x != GRPC_COMPRESS_ALGORITHMS_COUNT);
return Slice::FromStaticString(CompressionAlgorithmAsString(x)); return Slice::FromStaticString(CompressionAlgorithmAsString(x));
} }
static const char* DisplayValue(ValueType x) { static const char* DisplayValue(ValueType x) {

@ -19,6 +19,7 @@
#include <memory> #include <memory>
#include <utility> #include <utility>
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -38,7 +39,7 @@ PromiseEndpoint::PromiseEndpoint(
endpoint, endpoint,
SliceBuffer already_received) SliceBuffer already_received)
: endpoint_(std::move(endpoint)) { : endpoint_(std::move(endpoint)) {
GPR_ASSERT(endpoint_ != nullptr); CHECK_NE(endpoint_, nullptr);
read_state_->endpoint = endpoint_; read_state_->endpoint = endpoint_;
// TODO(ladynana): Replace this with `SliceBufferCast<>` when it is // TODO(ladynana): Replace this with `SliceBufferCast<>` when it is
// available. // available.
@ -72,7 +73,7 @@ void PromiseEndpoint::ReadState::Complete(absl::Status status,
// Appends `pending_buffer` to `buffer`. // Appends `pending_buffer` to `buffer`.
pending_buffer.MoveFirstNBytesIntoSliceBuffer(pending_buffer.Length(), pending_buffer.MoveFirstNBytesIntoSliceBuffer(pending_buffer.Length(),
buffer); buffer);
GPR_DEBUG_ASSERT(pending_buffer.Count() == 0u); DCHECK(pending_buffer.Count() == 0u);
if (buffer.Length() < num_bytes_requested) { if (buffer.Length() < num_bytes_requested) {
// A further read is needed. // A further read is needed.
// Set read args with number of bytes needed as hint. // Set read args with number of bytes needed as hint.

@ -25,6 +25,7 @@
#include <utility> #include <utility>
#include "absl/base/thread_annotations.h" #include "absl/base/thread_annotations.h"
#include "absl/log/check.h"
#include "absl/status/status.h" #include "absl/status/status.h"
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/types/optional.h" #include "absl/types/optional.h"
@ -75,7 +76,7 @@ class PromiseEndpoint {
// Start write and assert previous write finishes. // Start write and assert previous write finishes.
auto prev = write_state_->state.exchange(WriteState::kWriting, auto prev = write_state_->state.exchange(WriteState::kWriting,
std::memory_order_relaxed); std::memory_order_relaxed);
GPR_ASSERT(prev == WriteState::kIdle); CHECK(prev == WriteState::kIdle);
bool completed; bool completed;
if (data.Length() == 0) { if (data.Length() == 0) {
completed = true; completed = true;
@ -102,7 +103,7 @@ class PromiseEndpoint {
return [write_state = write_state_]() { return [write_state = write_state_]() {
auto prev = write_state->state.exchange(WriteState::kIdle, auto prev = write_state->state.exchange(WriteState::kIdle,
std::memory_order_relaxed); std::memory_order_relaxed);
GPR_ASSERT(prev == WriteState::kWriting); CHECK(prev == WriteState::kWriting);
return absl::OkStatus(); return absl::OkStatus();
}; };
}, },
@ -120,7 +121,7 @@ class PromiseEndpoint {
} }
// State was not Written; since we're polling it must be // State was not Written; since we're polling it must be
// Writing. Assert that and return Pending. // Writing. Assert that and return Pending.
GPR_ASSERT(expected == WriteState::kWriting); CHECK(expected == WriteState::kWriting);
return Pending(); return Pending();
}; };
}); });
@ -134,9 +135,9 @@ class PromiseEndpoint {
// undefined behavior. // undefined behavior.
auto Read(size_t num_bytes) { auto Read(size_t num_bytes) {
// Assert previous read finishes. // Assert previous read finishes.
GPR_ASSERT(!read_state_->complete.load(std::memory_order_relaxed)); CHECK(!read_state_->complete.load(std::memory_order_relaxed));
// Should not have pending reads. // Should not have pending reads.
GPR_ASSERT(read_state_->pending_buffer.Count() == 0u); CHECK(read_state_->pending_buffer.Count() == 0u);
bool complete = true; bool complete = true;
while (read_state_->buffer.Length() < num_bytes) { while (read_state_->buffer.Length() < num_bytes) {
// Set read args with hinted bytes. // Set read args with hinted bytes.
@ -156,7 +157,7 @@ class PromiseEndpoint {
read_state_->waker = Waker(); read_state_->waker = Waker();
read_state_->pending_buffer.MoveFirstNBytesIntoSliceBuffer( read_state_->pending_buffer.MoveFirstNBytesIntoSliceBuffer(
read_state_->pending_buffer.Length(), read_state_->buffer); read_state_->pending_buffer.Length(), read_state_->buffer);
GPR_DEBUG_ASSERT(read_state_->pending_buffer.Count() == 0u); DCHECK(read_state_->pending_buffer.Count() == 0u);
} else { } else {
complete = false; complete = false;
break; break;
@ -233,8 +234,7 @@ class PromiseEndpoint {
// Copy everything from read_state_->buffer into a single slice and // Copy everything from read_state_->buffer into a single slice and
// replace the contents of read_state_->buffer with that slice. // replace the contents of read_state_->buffer with that slice.
grpc_slice slice = grpc_slice_malloc_large(read_state_->buffer.Length()); grpc_slice slice = grpc_slice_malloc_large(read_state_->buffer.Length());
GPR_ASSERT( CHECK(reinterpret_cast<uintptr_t>(GRPC_SLICE_START_PTR(slice)) % 64 == 0);
reinterpret_cast<uintptr_t>(GRPC_SLICE_START_PTR(slice)) % 64 == 0);
size_t ofs = 0; size_t ofs = 0;
for (size_t i = 0; i < read_state_->buffer.Count(); i++) { for (size_t i = 0; i < read_state_->buffer.Count(); i++) {
memcpy( memcpy(
@ -249,7 +249,7 @@ class PromiseEndpoint {
read_state_->buffer.Clear(); read_state_->buffer.Clear();
read_state_->buffer.AppendIndexed( read_state_->buffer.AppendIndexed(
grpc_event_engine::experimental::Slice(slice)); grpc_event_engine::experimental::Slice(slice));
GPR_DEBUG_ASSERT(read_state_->buffer.Length() == ofs); DCHECK(read_state_->buffer.Length() == ofs);
} }
} }
@ -305,7 +305,7 @@ class PromiseEndpoint {
auto prev = state.exchange(kWritten, std::memory_order_release); auto prev = state.exchange(kWritten, std::memory_order_release);
// Previous state should be Writing. If we got anything else we've entered // Previous state should be Writing. If we got anything else we've entered
// the callback path twice. // the callback path twice.
GPR_ASSERT(prev == kWriting); CHECK(prev == kWriting);
w.Wakeup(); w.Wakeup();
} }
}; };

@ -21,6 +21,7 @@
#include <limits> #include <limits>
#include "absl/base/attributes.h" #include "absl/base/attributes.h"
#include "absl/log/check.h"
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -182,7 +183,7 @@ Timeout Timeout::FromMillis(int64_t millis) {
} }
Timeout Timeout::FromSeconds(int64_t seconds) { Timeout Timeout::FromSeconds(int64_t seconds) {
GPR_DEBUG_ASSERT(seconds != 0); DCHECK_NE(seconds, 0);
if (seconds < 1000) { if (seconds < 1000) {
if (seconds % kSecondsPerMinute != 0) { if (seconds % kSecondsPerMinute != 0) {
return Timeout(seconds, Unit::kSeconds); return Timeout(seconds, Unit::kSeconds);
@ -202,7 +203,7 @@ Timeout Timeout::FromSeconds(int64_t seconds) {
} }
Timeout Timeout::FromMinutes(int64_t minutes) { Timeout Timeout::FromMinutes(int64_t minutes) {
GPR_DEBUG_ASSERT(minutes != 0); DCHECK_NE(minutes, 0);
if (minutes < 1000) { if (minutes < 1000) {
if (minutes % kMinutesPerHour != 0) { if (minutes % kMinutesPerHour != 0) {
return Timeout(minutes, Unit::kMinutes); return Timeout(minutes, Unit::kMinutes);
@ -222,7 +223,7 @@ Timeout Timeout::FromMinutes(int64_t minutes) {
} }
Timeout Timeout::FromHours(int64_t hours) { Timeout Timeout::FromHours(int64_t hours) {
GPR_DEBUG_ASSERT(hours != 0); DCHECK_NE(hours, 0);
if (hours < kMaxHours) { if (hours < kMaxHours) {
return Timeout(hours, Unit::kHours); return Timeout(hours, Unit::kHours);
} }

@ -87,7 +87,7 @@ class EndpointList::Endpoint::Helper final
// EndpointList::Endpoint // EndpointList::Endpoint
// //
void EndpointList::Endpoint::Init( absl::Status EndpointList::Endpoint::Init(
const EndpointAddresses& addresses, const ChannelArgs& args, const EndpointAddresses& addresses, const ChannelArgs& args,
std::shared_ptr<WorkSerializer> work_serializer) { std::shared_ptr<WorkSerializer> work_serializer) {
ChannelArgs child_args = ChannelArgs child_args =
@ -123,9 +123,7 @@ void EndpointList::Endpoint::Init(
update_args.addresses = std::make_shared<SingleEndpointIterator>(addresses); update_args.addresses = std::make_shared<SingleEndpointIterator>(addresses);
update_args.args = child_args; update_args.args = child_args;
update_args.config = std::move(*config); update_args.config = std::move(*config);
// TODO(roth): If the child reports a non-OK status with the update, return child_policy_->UpdateLocked(std::move(update_args));
// we need to propagate that back to the resolver somehow.
(void)child_policy_->UpdateLocked(std::move(update_args));
} }
void EndpointList::Endpoint::Orphan() { void EndpointList::Endpoint::Orphan() {

@ -53,7 +53,8 @@ class MyEndpointList : public EndpointList {
public: public:
MyEndpointList(RefCountedPtr<MyLbPolicy> lb_policy, MyEndpointList(RefCountedPtr<MyLbPolicy> lb_policy,
EndpointAddressesIterator* endpoints, EndpointAddressesIterator* endpoints,
const ChannelArgs& args) const ChannelArgs& args,
std::vector<std::string>* errors)
: EndpointList(std::move(lb_policy), : EndpointList(std::move(lb_policy),
GRPC_TRACE_FLAG_ENABLED(grpc_my_tracer) GRPC_TRACE_FLAG_ENABLED(grpc_my_tracer)
? "MyEndpointList" ? "MyEndpointList"
@ -63,7 +64,7 @@ class MyEndpointList : public EndpointList {
const EndpointAddresses& addresses, const ChannelArgs& args) { const EndpointAddresses& addresses, const ChannelArgs& args) {
return MakeOrphanable<MyEndpoint>( return MakeOrphanable<MyEndpoint>(
std::move(endpoint_list), addresses, args, std::move(endpoint_list), addresses, args,
policy<MyLbPolicy>()->work_serializer()); policy<MyLbPolicy>()->work_serializer(), errors);
}); });
} }
@ -71,10 +72,15 @@ class MyEndpointList : public EndpointList {
class MyEndpoint : public Endpoint { class MyEndpoint : public Endpoint {
public: public:
MyEndpoint(RefCountedPtr<MyEndpointList> endpoint_list, MyEndpoint(RefCountedPtr<MyEndpointList> endpoint_list,
const EndpointAddresses& address, const ChannelArgs& args, const EndpointAddresses& addresses, const ChannelArgs& args,
std::shared_ptr<WorkSerializer> work_serializer) std::shared_ptr<WorkSerializer> work_serializer,
std::vector<std::string>* errors)
: Endpoint(std::move(endpoint_list)) { : Endpoint(std::move(endpoint_list)) {
Init(addresses, args, std::move(work_serializer)); absl::Status status = Init(addresses, args, std::move(work_serializer));
if (!status.ok()) {
errors->emplace_back(absl::StrCat(
"endpoint ", addresses.ToString(), ": ", status.ToString()));
}
} }
private: private:
@ -120,8 +126,9 @@ class EndpointList : public InternallyRefCounted<EndpointList> {
explicit Endpoint(RefCountedPtr<EndpointList> endpoint_list) explicit Endpoint(RefCountedPtr<EndpointList> endpoint_list)
: endpoint_list_(std::move(endpoint_list)) {} : endpoint_list_(std::move(endpoint_list)) {}
void Init(const EndpointAddresses& addresses, const ChannelArgs& args, absl::Status Init(const EndpointAddresses& addresses,
std::shared_ptr<WorkSerializer> work_serializer); const ChannelArgs& args,
std::shared_ptr<WorkSerializer> work_serializer);
// Templated for convenience, to provide a short-hand for // Templated for convenience, to provide a short-hand for
// down-casting in the caller. // down-casting in the caller.

@ -415,11 +415,16 @@ void PriorityLb::ChoosePriorityLocked() {
child_name); child_name);
auto child_config = config_->children().find(child_name); auto child_config = config_->children().find(child_name);
GPR_DEBUG_ASSERT(child_config != config_->children().end()); GPR_DEBUG_ASSERT(child_config != config_->children().end());
// TODO(roth): If the child reports a non-OK status with the // If the child policy returns a non-OK status, request re-resolution.
// update, we need to propagate that back to the resolver somehow. // Note that this will initially cause fixed backoff delay in the
(void)child->UpdateLocked( // resolver instead of exponential delay. However, once the
// resolver returns the initial re-resolution, we will be able to
// return non-OK from UpdateLocked(), which will trigger
// exponential backoff instead.
absl::Status status = child->UpdateLocked(
child_config->second.config, child_config->second.config,
child_config->second.ignore_reresolution_requests); child_config->second.ignore_reresolution_requests);
if (!status.ok()) channel_control_helper()->RequestReresolution();
} else { } else {
// The child already exists. Reactivate if needed. // The child already exists. Reactivate if needed.
child->MaybeReactivateLocked(); child->MaybeReactivateLocked();

@ -169,7 +169,7 @@ class RingHash final : public LoadBalancingPolicy {
size_t index() const { return index_; } size_t index() const { return index_; }
void UpdateLocked(size_t index); absl::Status UpdateLocked(size_t index);
grpc_connectivity_state connectivity_state() const { grpc_connectivity_state connectivity_state() const {
return connectivity_state_; return connectivity_state_;
@ -196,7 +196,7 @@ class RingHash final : public LoadBalancingPolicy {
class Helper; class Helper;
void CreateChildPolicy(); void CreateChildPolicy();
void UpdateChildPolicyLocked(); absl::Status UpdateChildPolicyLocked();
// Called when the child policy reports a connectivity state update. // Called when the child policy reports a connectivity state update.
void OnStateUpdate(grpc_connectivity_state new_state, void OnStateUpdate(grpc_connectivity_state new_state,
@ -498,9 +498,10 @@ void RingHash::RingHashEndpoint::Orphan() {
Unref(); Unref();
} }
void RingHash::RingHashEndpoint::UpdateLocked(size_t index) { absl::Status RingHash::RingHashEndpoint::UpdateLocked(size_t index) {
index_ = index; index_ = index;
if (child_policy_ != nullptr) UpdateChildPolicyLocked(); if (child_policy_ == nullptr) return absl::OkStatus();
return UpdateChildPolicyLocked();
} }
void RingHash::RingHashEndpoint::ResetBackoffLocked() { void RingHash::RingHashEndpoint::ResetBackoffLocked() {
@ -541,10 +542,19 @@ void RingHash::RingHashEndpoint::CreateChildPolicy() {
// this policy, which in turn is tied to the application's call. // this policy, which in turn is tied to the application's call.
grpc_pollset_set_add_pollset_set(child_policy_->interested_parties(), grpc_pollset_set_add_pollset_set(child_policy_->interested_parties(),
ring_hash_->interested_parties()); ring_hash_->interested_parties());
UpdateChildPolicyLocked(); // If the child policy returns a non-OK status, request re-resolution.
// Note that this will initially cause fixed backoff delay in the
// resolver instead of exponential delay. However, once the
// resolver returns the initial re-resolution, we will be able to
// return non-OK from UpdateLocked(), which will trigger
// exponential backoff instead.
absl::Status status = UpdateChildPolicyLocked();
if (!status.ok()) {
ring_hash_->channel_control_helper()->RequestReresolution();
}
} }
void RingHash::RingHashEndpoint::UpdateChildPolicyLocked() { absl::Status RingHash::RingHashEndpoint::UpdateChildPolicyLocked() {
// Construct pick_first config. // Construct pick_first config.
auto config = auto config =
CoreConfiguration::Get().lb_policy_registry().ParseLoadBalancingConfig( CoreConfiguration::Get().lb_policy_registry().ParseLoadBalancingConfig(
@ -557,9 +567,7 @@ void RingHash::RingHashEndpoint::UpdateChildPolicyLocked() {
std::make_shared<SingleEndpointIterator>(ring_hash_->endpoints_[index_]); std::make_shared<SingleEndpointIterator>(ring_hash_->endpoints_[index_]);
update_args.args = ring_hash_->args_; update_args.args = ring_hash_->args_;
update_args.config = std::move(*config); update_args.config = std::move(*config);
// TODO(roth): If the child reports a non-OK status with the update, return child_policy_->UpdateLocked(std::move(update_args));
// we need to propagate that back to the resolver somehow.
(void)child_policy_->UpdateLocked(std::move(update_args));
} }
void RingHash::RingHashEndpoint::OnStateUpdate( void RingHash::RingHashEndpoint::OnStateUpdate(
@ -667,13 +675,18 @@ absl::Status RingHash::UpdateLocked(UpdateArgs args) {
this, static_cast<RingHashLbConfig*>(args.config.get())); this, static_cast<RingHashLbConfig*>(args.config.get()));
// Update endpoint map. // Update endpoint map.
std::map<EndpointAddressSet, OrphanablePtr<RingHashEndpoint>> endpoint_map; std::map<EndpointAddressSet, OrphanablePtr<RingHashEndpoint>> endpoint_map;
std::vector<std::string> errors;
for (size_t i = 0; i < endpoints_.size(); ++i) { for (size_t i = 0; i < endpoints_.size(); ++i) {
const EndpointAddresses& addresses = endpoints_[i]; const EndpointAddresses& addresses = endpoints_[i];
const EndpointAddressSet address_set(addresses.addresses()); const EndpointAddressSet address_set(addresses.addresses());
// If present in old map, retain it; otherwise, create a new one. // If present in old map, retain it; otherwise, create a new one.
auto it = endpoint_map_.find(address_set); auto it = endpoint_map_.find(address_set);
if (it != endpoint_map_.end()) { if (it != endpoint_map_.end()) {
it->second->UpdateLocked(i); absl::Status status = it->second->UpdateLocked(i);
if (!status.ok()) {
errors.emplace_back(absl::StrCat("endpoint ", address_set.ToString(),
": ", status.ToString()));
}
endpoint_map.emplace(address_set, std::move(it->second)); endpoint_map.emplace(address_set, std::move(it->second));
} else { } else {
endpoint_map.emplace(address_set, MakeOrphanable<RingHashEndpoint>( endpoint_map.emplace(address_set, MakeOrphanable<RingHashEndpoint>(
@ -695,6 +708,10 @@ absl::Status RingHash::UpdateLocked(UpdateArgs args) {
// Return a new picker. // Return a new picker.
UpdateAggregatedConnectivityStateLocked(/*entered_transient_failure=*/false, UpdateAggregatedConnectivityStateLocked(/*entered_transient_failure=*/false,
absl::OkStatus()); absl::OkStatus());
if (!errors.empty()) {
return absl::UnavailableError(absl::StrCat(
"errors from children: [", absl::StrJoin(errors, "; "), "]"));
}
return absl::OkStatus(); return absl::OkStatus();
} }

@ -1860,9 +1860,16 @@ void RlsLb::RlsRequest::OnRlsCallCompleteLocked(grpc_error_handle error) {
// Now that we've released the lock, finish the update on any newly // Now that we've released the lock, finish the update on any newly
// created child policies. // created child policies.
for (ChildPolicyWrapper* child : child_policies_to_finish_update) { for (ChildPolicyWrapper* child : child_policies_to_finish_update) {
// TODO(roth): If the child reports an error with the update, we // If the child policy returns a non-OK status, request re-resolution.
// need to propagate that back to the resolver somehow. // Note that this will initially cause fixed backoff delay in the
(void)child->MaybeFinishUpdate(); // resolver instead of exponential delay. However, once the
// resolver returns the initial re-resolution, we will be able to
// return non-OK from UpdateLocked(), which will trigger
// exponential backoff instead.
absl::Status status = child->MaybeFinishUpdate();
if (!status.ok()) {
lb_policy_->channel_control_helper()->RequestReresolution();
}
} }
} }

@ -72,7 +72,8 @@ class RoundRobin final : public LoadBalancingPolicy {
public: public:
RoundRobinEndpointList(RefCountedPtr<RoundRobin> round_robin, RoundRobinEndpointList(RefCountedPtr<RoundRobin> round_robin,
EndpointAddressesIterator* endpoints, EndpointAddressesIterator* endpoints,
const ChannelArgs& args) const ChannelArgs& args,
std::vector<std::string>* errors)
: EndpointList(std::move(round_robin), : EndpointList(std::move(round_robin),
GRPC_TRACE_FLAG_ENABLED(grpc_lb_round_robin_trace) GRPC_TRACE_FLAG_ENABLED(grpc_lb_round_robin_trace)
? "RoundRobinEndpointList" ? "RoundRobinEndpointList"
@ -82,7 +83,7 @@ class RoundRobin final : public LoadBalancingPolicy {
const EndpointAddresses& addresses, const ChannelArgs& args) { const EndpointAddresses& addresses, const ChannelArgs& args) {
return MakeOrphanable<RoundRobinEndpoint>( return MakeOrphanable<RoundRobinEndpoint>(
std::move(endpoint_list), addresses, args, std::move(endpoint_list), addresses, args,
policy<RoundRobin>()->work_serializer()); policy<RoundRobin>()->work_serializer(), errors);
}); });
} }
@ -92,9 +93,14 @@ class RoundRobin final : public LoadBalancingPolicy {
RoundRobinEndpoint(RefCountedPtr<EndpointList> endpoint_list, RoundRobinEndpoint(RefCountedPtr<EndpointList> endpoint_list,
const EndpointAddresses& addresses, const EndpointAddresses& addresses,
const ChannelArgs& args, const ChannelArgs& args,
std::shared_ptr<WorkSerializer> work_serializer) std::shared_ptr<WorkSerializer> work_serializer,
std::vector<std::string>* errors)
: Endpoint(std::move(endpoint_list)) { : Endpoint(std::move(endpoint_list)) {
Init(addresses, args, std::move(work_serializer)); absl::Status status = Init(addresses, args, std::move(work_serializer));
if (!status.ok()) {
errors->emplace_back(absl::StrCat("endpoint ", addresses.ToString(),
": ", status.ToString()));
}
} }
private: private:
@ -255,9 +261,10 @@ absl::Status RoundRobin::UpdateLocked(UpdateArgs args) {
gpr_log(GPR_INFO, "[RR %p] replacing previous pending child list %p", this, gpr_log(GPR_INFO, "[RR %p] replacing previous pending child list %p", this,
latest_pending_endpoint_list_.get()); latest_pending_endpoint_list_.get());
} }
std::vector<std::string> errors;
latest_pending_endpoint_list_ = MakeOrphanable<RoundRobinEndpointList>( latest_pending_endpoint_list_ = MakeOrphanable<RoundRobinEndpointList>(
RefAsSubclass<RoundRobin>(DEBUG_LOCATION, "RoundRobinEndpointList"), RefAsSubclass<RoundRobin>(DEBUG_LOCATION, "RoundRobinEndpointList"),
addresses, args.args); addresses, args.args, &errors);
// If the new list is empty, immediately promote it to // If the new list is empty, immediately promote it to
// endpoint_list_ and report TRANSIENT_FAILURE. // endpoint_list_ and report TRANSIENT_FAILURE.
if (latest_pending_endpoint_list_->size() == 0) { if (latest_pending_endpoint_list_->size() == 0) {
@ -281,6 +288,10 @@ absl::Status RoundRobin::UpdateLocked(UpdateArgs args) {
if (endpoint_list_ == nullptr) { if (endpoint_list_ == nullptr) {
endpoint_list_ = std::move(latest_pending_endpoint_list_); endpoint_list_ = std::move(latest_pending_endpoint_list_);
} }
if (!errors.empty()) {
return absl::UnavailableError(absl::StrCat(
"errors from children: [", absl::StrJoin(errors, "; "), "]"));
}
return absl::OkStatus(); return absl::OkStatus();
} }

@ -221,11 +221,16 @@ class WeightedRoundRobin final : public LoadBalancingPolicy {
public: public:
WrrEndpoint(RefCountedPtr<EndpointList> endpoint_list, WrrEndpoint(RefCountedPtr<EndpointList> endpoint_list,
const EndpointAddresses& addresses, const ChannelArgs& args, const EndpointAddresses& addresses, const ChannelArgs& args,
std::shared_ptr<WorkSerializer> work_serializer) std::shared_ptr<WorkSerializer> work_serializer,
std::vector<std::string>* errors)
: Endpoint(std::move(endpoint_list)), : Endpoint(std::move(endpoint_list)),
weight_(policy<WeightedRoundRobin>()->GetOrCreateWeight( weight_(policy<WeightedRoundRobin>()->GetOrCreateWeight(
addresses.addresses())) { addresses.addresses())) {
Init(addresses, args, std::move(work_serializer)); absl::Status status = Init(addresses, args, std::move(work_serializer));
if (!status.ok()) {
errors->emplace_back(absl::StrCat("endpoint ", addresses.ToString(),
": ", status.ToString()));
}
} }
RefCountedPtr<EndpointWeight> weight() const { return weight_; } RefCountedPtr<EndpointWeight> weight() const { return weight_; }
@ -261,7 +266,7 @@ class WeightedRoundRobin final : public LoadBalancingPolicy {
WrrEndpointList(RefCountedPtr<WeightedRoundRobin> wrr, WrrEndpointList(RefCountedPtr<WeightedRoundRobin> wrr,
EndpointAddressesIterator* endpoints, EndpointAddressesIterator* endpoints,
const ChannelArgs& args) const ChannelArgs& args, std::vector<std::string>* errors)
: EndpointList(std::move(wrr), : EndpointList(std::move(wrr),
GRPC_TRACE_FLAG_ENABLED(grpc_lb_wrr_trace) GRPC_TRACE_FLAG_ENABLED(grpc_lb_wrr_trace)
? "WrrEndpointList" ? "WrrEndpointList"
@ -271,7 +276,7 @@ class WeightedRoundRobin final : public LoadBalancingPolicy {
const EndpointAddresses& addresses, const ChannelArgs& args) { const EndpointAddresses& addresses, const ChannelArgs& args) {
return MakeOrphanable<WrrEndpoint>( return MakeOrphanable<WrrEndpoint>(
std::move(endpoint_list), addresses, args, std::move(endpoint_list), addresses, args,
policy<WeightedRoundRobin>()->work_serializer()); policy<WeightedRoundRobin>()->work_serializer(), errors);
}); });
} }
@ -767,8 +772,9 @@ absl::Status WeightedRoundRobin::UpdateLocked(UpdateArgs args) {
gpr_log(GPR_INFO, "[WRR %p] replacing previous pending endpoint list %p", gpr_log(GPR_INFO, "[WRR %p] replacing previous pending endpoint list %p",
this, latest_pending_endpoint_list_.get()); this, latest_pending_endpoint_list_.get());
} }
std::vector<std::string> errors;
latest_pending_endpoint_list_ = MakeOrphanable<WrrEndpointList>( latest_pending_endpoint_list_ = MakeOrphanable<WrrEndpointList>(
RefAsSubclass<WeightedRoundRobin>(), addresses.get(), args.args); RefAsSubclass<WeightedRoundRobin>(), addresses.get(), args.args, &errors);
// If the new list is empty, immediately promote it to // If the new list is empty, immediately promote it to
// endpoint_list_ and report TRANSIENT_FAILURE. // endpoint_list_ and report TRANSIENT_FAILURE.
if (latest_pending_endpoint_list_->size() == 0) { if (latest_pending_endpoint_list_->size() == 0) {
@ -792,6 +798,10 @@ absl::Status WeightedRoundRobin::UpdateLocked(UpdateArgs args) {
if (endpoint_list_.get() == nullptr) { if (endpoint_list_.get() == nullptr) {
endpoint_list_ = std::move(latest_pending_endpoint_list_); endpoint_list_ = std::move(latest_pending_endpoint_list_);
} }
if (!errors.empty()) {
return absl::UnavailableError(absl::StrCat(
"errors from children: [", absl::StrJoin(errors, "; "), "]"));
}
return absl::OkStatus(); return absl::OkStatus();
} }

@ -22,11 +22,11 @@
#include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h" #include "src/core/handshaker/endpoint_info/endpoint_info_handshaker.h"
#include "src/core/handshaker/http_connect/http_connect_handshaker.h" #include "src/core/handshaker/http_connect/http_connect_handshaker.h"
#include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h" #include "src/core/handshaker/tcp_connect/tcp_connect_handshaker.h"
#include "src/core/lib/channel/server_call_tracer_filter.h"
#include "src/core/lib/config/core_configuration.h" #include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/surface/channel_stack_type.h" #include "src/core/lib/surface/channel_stack_type.h"
#include "src/core/lib/surface/lame_client.h" #include "src/core/lib/surface/lame_client.h"
#include "src/core/lib/surface/server.h" #include "src/core/server/server.h"
#include "src/core/server/server_call_tracer_filter.h"
namespace grpc_event_engine { namespace grpc_event_engine {
namespace experimental { namespace experimental {

@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
// //
#include "src/core/lib/surface/server.h" #include "src/core/server/server.h"
#include <inttypes.h> #include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>

@ -14,8 +14,8 @@
// limitations under the License. // limitations under the License.
// //
#ifndef GRPC_SRC_CORE_LIB_SURFACE_SERVER_H #ifndef GRPC_SRC_CORE_SERVER_SERVER_H
#define GRPC_SRC_CORE_LIB_SURFACE_SERVER_H #define GRPC_SRC_CORE_SERVER_SERVER_H
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
@ -65,9 +65,9 @@
#include "src/core/lib/slice/slice.h" #include "src/core/lib/slice/slice.h"
#include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/server_interface.h"
#include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/metadata_batch.h"
#include "src/core/lib/transport/transport.h" #include "src/core/lib/transport/transport.h"
#include "src/core/server/server_interface.h"
#define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS "grpc.server.max_pending_requests" #define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS "grpc.server.max_pending_requests"
#define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS_HARD_LIMIT \ #define GRPC_ARG_SERVER_MAX_PENDING_REQUESTS_HARD_LIMIT \
@ -551,4 +551,4 @@ inline void Server::set_config_fetcher(
} // namespace grpc_core } // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_SURFACE_SERVER_H #endif // GRPC_SRC_CORE_SERVER_SERVER_H

@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
// //
#include "src/core/lib/channel/server_call_tracer_filter.h" #include "src/core/server/server_call_tracer_filter.h"
#include <functional> #include <functional>
#include <memory> #include <memory>

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_SERVER_CALL_TRACER_FILTER_H #ifndef GRPC_SRC_CORE_SERVER_SERVER_CALL_TRACER_FILTER_H
#define GRPC_SRC_CORE_LIB_CHANNEL_SERVER_CALL_TRACER_FILTER_H #define GRPC_SRC_CORE_SERVER_SERVER_CALL_TRACER_FILTER_H
#include <grpc/support/port_platform.h> #include <grpc/support/port_platform.h>
@ -25,4 +25,4 @@ void RegisterServerCallTracerFilter(CoreConfiguration::Builder* builder);
} // namespace grpc_core } // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_SERVER_CALL_TRACER_FILTER_H #endif // GRPC_SRC_CORE_SERVER_SERVER_CALL_TRACER_FILTER_H

@ -14,16 +14,16 @@
// limitations under the License. // limitations under the License.
// //
#ifndef GRPC_SRC_CORE_EXT_FILTERS_SERVER_CONFIG_SELECTOR_SERVER_CONFIG_SELECTOR_H #ifndef GRPC_SRC_CORE_SERVER_SERVER_CONFIG_SELECTOR_H
#define GRPC_SRC_CORE_EXT_FILTERS_SERVER_CONFIG_SELECTOR_SERVER_CONFIG_SELECTOR_H #define GRPC_SRC_CORE_SERVER_SERVER_CONFIG_SELECTOR_H
#include <grpc/support/port_platform.h>
#include <memory> #include <memory>
#include "absl/status/statusor.h" #include "absl/status/statusor.h"
#include "absl/strings/string_view.h" #include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include "src/core/lib/gpr/useful.h" #include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/dual_ref_counted.h" #include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted.h"
@ -80,4 +80,4 @@ class ServerConfigSelectorProvider
} // namespace grpc_core } // namespace grpc_core
#endif // GRPC_SRC_CORE_EXT_FILTERS_SERVER_CONFIG_SELECTOR_SERVER_CONFIG_SELECTOR_H #endif // GRPC_SRC_CORE_SERVER_SERVER_CONFIG_SELECTOR_H

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save