merge master

pull/35931/head
Gregory Cooke 9 months ago
commit 86518a33af
  1. 26
      BUILD
  2. 198
      CMakeLists.txt
  3. 51
      Makefile
  4. 1
      Package.swift
  5. 2
      _metadata.py
  6. 14
      bazel/experiments.bzl
  7. 1
      bazel/grpc_build_system.bzl
  8. 8
      bazel/grpc_deps.bzl
  9. 11
      bazel/python_rules.bzl
  10. 129
      build_autogenerated.yaml
  11. 2
      build_config.rb
  12. 6
      build_handwritten.yaml
  13. 3
      config.m4
  14. 1
      config.w32
  15. 3
      doc/g_stands_for.md
  16. 27
      examples/python/helloworld/helloworld_pb2.py
  17. 14
      examples/python/helloworld/helloworld_pb2.pyi
  18. 104
      examples/python/helloworld/helloworld_pb2_grpc.py
  19. 4
      gRPC-C++.podspec
  20. 5
      gRPC-Core.podspec
  21. 2
      gRPC-ProtoRPC.podspec
  22. 2
      gRPC-RxLibrary.podspec
  23. 2
      gRPC.podspec
  24. 1
      grpc.def
  25. 1
      grpc.gemspec
  26. 1
      grpc.gyp
  27. 6
      include/grpc/grpc.h
  28. 4
      include/grpcpp/version_info.h
  29. 7
      package.xml
  30. 17
      setup.py
  31. 23
      src/compiler/python_generator.cc
  32. 1
      src/core/BUILD
  33. 15
      src/core/client_channel/channel_connectivity.cc
  34. 5
      src/core/client_channel/client_channel_filter.h
  35. 14
      src/core/client_channel/http_proxy_mapper.cc
  36. 7
      src/core/ext/transport/binder/client/binder_connector.cc
  37. 36
      src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
  38. 46
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
  39. 9
      src/core/lib/address_utils/parse_address.cc
  40. 9
      src/core/lib/address_utils/sockaddr_utils.cc
  41. 7
      src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc
  42. 7
      src/core/lib/event_engine/tcp_socket_utils.cc
  43. 4
      src/core/lib/event_engine/windows/win_socket.cc
  44. 3
      src/core/lib/event_engine/windows/win_socket.h
  45. 49
      src/core/lib/event_engine/windows/windows_engine.cc
  46. 58
      src/core/lib/event_engine/windows/windows_listener.cc
  47. 14
      src/core/lib/event_engine/windows/windows_listener.h
  48. 27
      src/core/lib/experiments/experiments.cc
  49. 11
      src/core/lib/experiments/experiments.h
  50. 10
      src/core/lib/experiments/experiments.yaml
  51. 7
      src/core/lib/experiments/rollouts.yaml
  52. 43
      src/core/lib/gpr/wrap_memcpy.cc
  53. 3
      src/core/lib/iomgr/port.h
  54. 29
      src/core/lib/iomgr/tcp_client_windows.cc
  55. 69
      src/core/lib/iomgr/tcp_server_windows.cc
  56. 13
      src/core/lib/iomgr/unix_sockets_posix.cc
  57. 22
      src/core/lib/security/credentials/jwt/json_token.cc
  58. 58
      src/core/lib/security/credentials/jwt/jwt_verifier.cc
  59. 2
      src/core/lib/security/credentials/tls/grpc_tls_crl_provider.cc
  60. 27
      src/core/lib/security/transport/security_handshaker.cc
  61. 6
      src/core/lib/security/transport/security_handshaker.h
  62. 4
      src/core/lib/surface/version.cc
  63. 49
      src/core/lib/transport/promise_endpoint.h
  64. 7
      src/core/resolver/binder/binder_resolver.cc
  65. 6
      src/core/resolver/google_c2p/google_c2p_resolver.cc
  66. 105
      src/core/tsi/ssl_transport_security_utils.cc
  67. 4
      src/core/tsi/ssl_transport_security_utils.h
  68. 79
      src/cpp/ext/chaotic_good.cc
  69. 30
      src/cpp/ext/chaotic_good.h
  70. 2
      src/csharp/build/dependencies.props
  71. 2
      src/objective-c/!ProtoCompiler-gRPCCppPlugin.podspec
  72. 2
      src/objective-c/!ProtoCompiler-gRPCPlugin.podspec
  73. 2
      src/objective-c/GRPCClient/version.h
  74. 4
      src/objective-c/tests/version.h
  75. 2
      src/php/composer.json
  76. 2
      src/php/ext/grpc/version.h
  77. 4
      src/python/.gitignore
  78. 26
      src/python/grpcio/README.rst
  79. 12
      src/python/grpcio/grpc/__init__.py
  80. 75
      src/python/grpcio/grpc/_channel.py
  81. 7
      src/python/grpcio/grpc/_cython/_cygrpc/channel.pxd.pxi
  82. 71
      src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
  83. 6
      src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
  84. 2
      src/python/grpcio/grpc/_grpcio_metadata.py
  85. 36
      src/python/grpcio/grpc/_interceptor.py
  86. 81
      src/python/grpcio/grpc/_simple_stubs.py
  87. 12
      src/python/grpcio/grpc/aio/_base_channel.py
  88. 21
      src/python/grpcio/grpc/aio/_channel.py
  89. 1
      src/python/grpcio/grpc_core_dependencies.py
  90. 2
      src/python/grpcio/grpc_version.py
  91. 2
      src/python/grpcio_admin/grpc_version.py
  92. 2
      src/python/grpcio_channelz/grpc_version.py
  93. 2
      src/python/grpcio_csds/grpc_version.py
  94. 2
      src/python/grpcio_health_checking/grpc_version.py
  95. 2
      src/python/grpcio_observability/grpc_version.py
  96. 1
      src/python/grpcio_observability/observability_lib_deps.py
  97. 17
      src/python/grpcio_observability/setup.py
  98. 2
      src/python/grpcio_reflection/grpc_version.py
  99. 2
      src/python/grpcio_status/grpc_version.py
  100. 27
      src/python/grpcio_testing/grpc_testing/_channel/_channel.py
  101. Some files were not shown because too many files have changed in this diff Show More

26
BUILD

@ -211,11 +211,11 @@ config_setting(
python_config_settings()
# This should be updated along with build_handwritten.yaml
g_stands_for = "guardian" # @unused
g_stands_for = "giggle" # @unused
core_version = "38.0.0" # @unused
core_version = "39.0.0" # @unused
version = "1.62.0-dev" # @unused
version = "1.63.0-dev" # @unused
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
@ -706,7 +706,6 @@ grpc_cc_library(
"//src/core:lib/gpr/windows/sync.cc",
"//src/core:lib/gpr/windows/time.cc",
"//src/core:lib/gpr/windows/tmpfile.cc",
"//src/core:lib/gpr/wrap_memcpy.cc",
"//src/core:lib/gprpp/crash.cc",
"//src/core:lib/gprpp/fork.cc",
"//src/core:lib/gprpp/host_port.cc",
@ -3384,6 +3383,7 @@ grpc_cc_library(
"//src/core:arena_promise",
"//src/core:closure",
"//src/core:error",
"//src/core:experiments",
"//src/core:gpr_manual_constructor",
"//src/core:httpcli_ssl_credentials",
"//src/core:iomgr_fwd",
@ -4141,6 +4141,24 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "grpcpp_chaotic_good",
srcs = [
"src/cpp/ext/chaotic_good.cc",
],
hdrs = [
"src/cpp/ext/chaotic_good.h",
],
visibility = ["@grpc:chaotic_good"],
deps = [
"gpr",
"grpc++_public_hdrs",
"grpc_public_hdrs",
"//src/core:chaotic_good_connector",
"//src/core:chaotic_good_server",
],
)
grpc_cc_library(
name = "subprocess",
srcs = [

198
CMakeLists.txt generated

@ -25,11 +25,11 @@
cmake_minimum_required(VERSION 3.13)
set(PACKAGE_NAME "grpc")
set(PACKAGE_VERSION "1.62.0-dev")
set(gRPC_CORE_VERSION "38.0.0")
set(gRPC_CORE_SOVERSION "38")
set(gRPC_CPP_VERSION "1.62.0-dev")
set(gRPC_CPP_SOVERSION "1.62")
set(PACKAGE_VERSION "1.63.0-dev")
set(gRPC_CORE_VERSION "39.0.0")
set(gRPC_CORE_SOVERSION "39")
set(gRPC_CPP_VERSION "1.63.0-dev")
set(gRPC_CPP_SOVERSION "1.63")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
@ -953,9 +953,6 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx channel_trace_test)
add_dependencies(buildtests_cxx channelz_registry_test)
add_dependencies(buildtests_cxx channelz_service_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx chaotic_good_test)
endif()
add_dependencies(buildtests_cxx check_gcp_environment_linux_test)
add_dependencies(buildtests_cxx check_gcp_environment_windows_test)
add_dependencies(buildtests_cxx chunked_vector_test)
@ -1424,8 +1421,12 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx test_core_security_ssl_credentials_test)
add_dependencies(buildtests_cxx test_core_slice_slice_buffer_test)
add_dependencies(buildtests_cxx test_core_slice_slice_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_cxx test_core_transport_test_suite_chaotic_good_test)
endif()
add_dependencies(buildtests_cxx test_cpp_client_credentials_test)
add_dependencies(buildtests_cxx test_cpp_end2end_ssl_credentials_test)
add_dependencies(buildtests_cxx test_cpp_ext_chaotic_good_test)
add_dependencies(buildtests_cxx test_cpp_server_credentials_test)
add_dependencies(buildtests_cxx test_cpp_util_slice_test)
add_dependencies(buildtests_cxx test_cpp_util_time_test)
@ -1640,7 +1641,6 @@ add_library(gpr
src/core/lib/gpr/windows/sync.cc
src/core/lib/gpr/windows/time.cc
src/core/lib/gpr/windows/tmpfile.cc
src/core/lib/gpr/wrap_memcpy.cc
src/core/lib/gprpp/crash.cc
src/core/lib/gprpp/examine_stack.cc
src/core/lib/gprpp/fork.cc
@ -10000,69 +10000,6 @@ target_link_libraries(channelz_service_test
)
endif()
if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX)
add_executable(chaotic_good_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
src/core/ext/transport/chaotic_good/client_transport.cc
src/core/ext/transport/chaotic_good/frame.cc
src/core/ext/transport/chaotic_good/frame_header.cc
src/core/ext/transport/chaotic_good/server_transport.cc
src/core/lib/transport/promise_endpoint.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/transport/test_suite/call_content.cc
test/core/transport/test_suite/call_shapes.cc
test/core/transport/test_suite/chaotic_good_fixture.cc
test/core/transport/test_suite/fixture.cc
test/core/transport/test_suite/no_op.cc
test/core/transport/test_suite/stress.cc
test/core/transport/test_suite/test.cc
test/core/transport/test_suite/test_main.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(chaotic_good_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
)
endif()
endif()
target_compile_features(chaotic_good_test PUBLIC cxx_std_14)
target_include_directories(chaotic_good_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(chaotic_good_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
${_gRPC_PROTOBUF_LIBRARIES}
grpc_test_util
)
endif()
endif()
if(gRPC_BUILD_TESTS)
@ -29850,6 +29787,69 @@ target_link_libraries(test_core_slice_slice_test
)
endif()
if(gRPC_BUILD_TESTS)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX)
add_executable(test_core_transport_test_suite_chaotic_good_test
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h
${_gRPC_PROTO_GENS_DIR}/test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.grpc.pb.h
src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
src/core/ext/transport/chaotic_good/client_transport.cc
src/core/ext/transport/chaotic_good/frame.cc
src/core/ext/transport/chaotic_good/frame_header.cc
src/core/ext/transport/chaotic_good/server_transport.cc
src/core/lib/transport/promise_endpoint.cc
test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
test/core/transport/test_suite/call_content.cc
test/core/transport/test_suite/call_shapes.cc
test/core/transport/test_suite/chaotic_good_fixture.cc
test/core/transport/test_suite/fixture.cc
test/core/transport/test_suite/no_op.cc
test/core/transport/test_suite/stress.cc
test/core/transport/test_suite/test.cc
test/core/transport/test_suite/test_main.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(test_core_transport_test_suite_chaotic_good_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
)
endif()
endif()
target_compile_features(test_core_transport_test_suite_chaotic_good_test PUBLIC cxx_std_14)
target_include_directories(test_core_transport_test_suite_chaotic_good_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(test_core_transport_test_suite_chaotic_good_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
${_gRPC_PROTOBUF_LIBRARIES}
grpc_test_util
)
endif()
endif()
if(gRPC_BUILD_TESTS)
@ -29955,6 +29955,60 @@ target_link_libraries(test_cpp_end2end_ssl_credentials_test
)
endif()
if(gRPC_BUILD_TESTS)
add_executable(test_cpp_ext_chaotic_good_test
src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
src/core/ext/transport/chaotic_good/client_transport.cc
src/core/ext/transport/chaotic_good/frame.cc
src/core/ext/transport/chaotic_good/frame_header.cc
src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
src/core/ext/transport/chaotic_good/server_transport.cc
src/core/ext/transport/chaotic_good/settings_metadata.cc
src/core/lib/transport/promise_endpoint.cc
src/cpp/ext/chaotic_good.cc
test/cpp/ext/chaotic_good_test.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(test_cpp_ext_chaotic_good_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
"GRPCXX_DLL_IMPORTS"
)
endif()
endif()
target_compile_features(test_cpp_ext_chaotic_good_test PUBLIC cxx_std_14)
target_include_directories(test_cpp_ext_chaotic_good_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(test_cpp_ext_chaotic_good_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
grpc++
grpc_test_util
)
endif()
if(gRPC_BUILD_TESTS)

51
Makefile generated

@ -410,8 +410,8 @@ E = @echo
Q = @
endif
CORE_VERSION = 38.0.0
CPP_VERSION = 1.62.0-dev
CORE_VERSION = 39.0.0
CPP_VERSION = 1.63.0-dev
CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES))
CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
@ -447,7 +447,7 @@ SHARED_EXT_CORE = dll
SHARED_EXT_CPP = dll
SHARED_PREFIX =
SHARED_VERSION_CORE = -38
SHARED_VERSION_CORE = -39
SHARED_VERSION_CPP = -1
else ifeq ($(SYSTEM),Darwin)
EXECUTABLE_SUFFIX =
@ -818,8 +818,8 @@ $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE):
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.38 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.39 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so
endif
endif
@ -864,7 +864,6 @@ LIBGPR_SRC = \
src/core/lib/gpr/windows/sync.cc \
src/core/lib/gpr/windows/time.cc \
src/core/lib/gpr/windows/tmpfile.cc \
src/core/lib/gpr/wrap_memcpy.cc \
src/core/lib/gprpp/crash.cc \
src/core/lib/gprpp/examine_stack.cc \
src/core/lib/gprpp/fork.cc \
@ -943,8 +942,8 @@ $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OB
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.38 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.39 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so
endif
endif
@ -1871,8 +1870,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libre2.a $(LIBDIR)/$(CONFIG)/libupb_textformat_lib.a $(LIBDIR)/$(CONFIG)/libupb_json_lib.a $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.38 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libre2.a $(LIBDIR)/$(CONFIG)/libupb_textformat_lib.a $(LIBDIR)/$(CONFIG)/libupb_json_lib.a $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.39 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libre2.a $(LIBDIR)/$(CONFIG)/libupb_textformat_lib.a $(LIBDIR)/$(CONFIG)/libupb_json_lib.a $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so
endif
endif
@ -2400,8 +2399,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.38 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.39 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(GRPC_ABSEIL_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libcares.a $(ZLIB_MERGE_LIBS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so
endif
endif
@ -2467,8 +2466,8 @@ $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBRE2_OB
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libre2.so.38 -o $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libre2.so.39 -o $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).so
endif
endif
@ -2513,8 +2512,8 @@ $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_BASE_LIB_OBJS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_base_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_BASE_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_base_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_BASE_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)upb_base_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_base_lib$(SHARED_VERSION_CORE).so
endif
endif
@ -2593,8 +2592,8 @@ $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_JSON_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_json_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_JSON_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_json_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_JSON_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)upb_json_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_json_lib$(SHARED_VERSION_CORE).so
endif
endif
@ -2640,8 +2639,8 @@ $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(L
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MEM_LIB_OBJS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_mem_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MEM_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_mem_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MEM_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)upb_mem_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_mem_lib$(SHARED_VERSION_CORE).so
endif
endif
@ -2693,8 +2692,8 @@ $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE):
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MESSAGE_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_message_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MESSAGE_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_message_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_MESSAGE_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)upb_message_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_message_lib$(SHARED_VERSION_CORE).so
endif
endif
@ -2772,8 +2771,8 @@ $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_COR
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_TEXTFORMAT_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_textformat_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_TEXTFORMAT_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb_textformat_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_TEXTFORMAT_LIB_OBJS) $(LIBDIR)/$(CONFIG)/libutf8_range_lib.a $(LIBDIR)/$(CONFIG)/libupb_message_lib.a $(LIBDIR)/$(CONFIG)/libupb_mem_lib.a $(LIBDIR)/$(CONFIG)/libupb_base_lib.a $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)upb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)upb_textformat_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb_textformat_lib$(SHARED_VERSION_CORE).so
endif
endif
@ -2820,8 +2819,8 @@ $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE):
ifeq ($(SYSTEM),Darwin)
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)utf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUTF8_RANGE_LIB_OBJS) $(LDLIBS)
else
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libutf8_range_lib.so.38 -o $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUTF8_RANGE_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)utf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).so.38
$(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libutf8_range_lib.so.39 -o $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUTF8_RANGE_LIB_OBJS) $(LDLIBS)
$(Q) ln -sf $(SHARED_PREFIX)utf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).so.39
$(Q) ln -sf $(SHARED_PREFIX)utf8_range_lib$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libutf8_range_lib$(SHARED_VERSION_CORE).so
endif
endif

1
Package.swift generated

@ -1333,7 +1333,6 @@ let package = Package(
"src/core/lib/gpr/windows/sync.cc",
"src/core/lib/gpr/windows/time.cc",
"src/core/lib/gpr/windows/tmpfile.cc",
"src/core/lib/gpr/wrap_memcpy.cc",
"src/core/lib/gprpp/atomic_utils.h",
"src/core/lib/gprpp/bitset.h",
"src/core/lib/gprpp/chunked_vector.h",

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
__version__ = """1.62.0.dev0"""
__version__ = """1.63.0.dev0"""

@ -17,6 +17,7 @@
"""Dictionary of tags to experiments so we know when to test different experiments."""
EXPERIMENT_ENABLES = {
"absl_base64": "absl_base64",
"call_status_override_on_cancellation": "call_status_override_on_cancellation",
"call_v3": "call_v3",
"canary_client_privacy": "canary_client_privacy",
@ -53,7 +54,7 @@ EXPERIMENT_ENABLES = {
"v3_compression_filter": "v3_compression_filter",
"v3_server_auth_filter": "v3_server_auth_filter",
"work_serializer_clears_time_cache": "work_serializer_clears_time_cache",
"work_serializer_dispatch": "work_serializer_dispatch",
"work_serializer_dispatch": "event_engine_client,work_serializer_dispatch",
"write_size_policy": "write_size_policy",
"write_size_cap": "write_size_cap,write_size_policy",
"wrr_delegate_to_pick_first": "wrr_delegate_to_pick_first",
@ -77,7 +78,6 @@ EXPERIMENTS = {
"v3_compression_filter",
],
"core_end2end_test": [
"chaotic_good",
"promise_based_client_call",
"promise_based_server_call",
"work_serializer_dispatch",
@ -124,6 +124,9 @@ EXPERIMENTS = {
"round_robin_delegate_to_pick_first",
"wrr_delegate_to_pick_first",
],
"credential_token_tests": [
"absl_base64",
],
"event_engine_listener_test": [
"event_engine_listener",
],
@ -157,7 +160,6 @@ EXPERIMENTS = {
"v3_compression_filter",
],
"core_end2end_test": [
"chaotic_good",
"promise_based_client_call",
"promise_based_server_call",
"work_serializer_dispatch",
@ -201,6 +203,9 @@ EXPERIMENTS = {
"round_robin_delegate_to_pick_first",
"wrr_delegate_to_pick_first",
],
"credential_token_tests": [
"absl_base64",
],
"flow_control_test": [
"write_size_cap",
"write_size_policy",
@ -288,6 +293,9 @@ EXPERIMENTS = {
"round_robin_delegate_to_pick_first",
"wrr_delegate_to_pick_first",
],
"credential_token_tests": [
"absl_base64",
],
"event_engine_listener_test": [
"event_engine_listener",
],

@ -95,6 +95,7 @@ def _update_visibility(visibility):
"alt_grpc++_base_unsecure_legacy": PRIVATE,
"alts_frame_protector": PRIVATE,
"channelz": PRIVATE,
"chaotic_good": PRIVATE,
"client_channel": PRIVATE,
"cli": PRIVATE,
"debug_location": PRIVATE,

@ -618,11 +618,11 @@ def grpc_test_only_deps():
if "com_google_libprotobuf_mutator" not in native.existing_rules():
http_archive(
name = "com_google_libprotobuf_mutator",
sha256 = "11ab4c57b4051977d8fedb86dba5c9092e578bc293c47be146e0b0596b6a0bdc",
sha256 = "9c8f800aed088cdf89adc3eaaa66b56b4da7da041f26338aa71a2ab43d860d46",
urls = [
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/c390388561be36f94a559a4aed7e2fe60470f60b.tar.gz",
"https://github.com/google/libprotobuf-mutator/archive/c390388561be36f94a559a4aed7e2fe60470f60b.tar.gz",
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
"https://github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
],
strip_prefix = "libprotobuf-mutator-c390388561be36f94a559a4aed7e2fe60470f60b",
strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d",
build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD",
)

@ -222,11 +222,11 @@ def _generate_pb2_grpc_src_impl(context):
py_info = _merge_pyinfos(
[
p,
context.attr._grpc_library[PyInfo],
context.attr.grpc_library[PyInfo],
] + [dep[PyInfo] for dep in context.attr.py_deps],
)
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr._grpc_library[DefaultInfo].data_runfiles)
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr.grpc_library[DefaultInfo].data_runfiles)
return [
DefaultInfo(
@ -261,7 +261,7 @@ _generate_pb2_grpc_src = rule(
cfg = "exec",
default = Label("//external:protocol_compiler"),
),
"_grpc_library": attr.label(
"grpc_library": attr.label(
default = Label("//src/python/grpcio/grpc:grpcio"),
providers = [PyInfo],
),
@ -274,6 +274,7 @@ def py_grpc_library(
srcs,
deps,
strip_prefixes = [],
grpc_library = Label("//src/python/grpcio/grpc:grpcio"),
**kwargs):
"""Generate python code for gRPC services defined in a protobuf.
@ -287,6 +288,9 @@ def py_grpc_library(
stripped from the beginning of foo_pb2 modules imported by the
generated stubs. This is useful in combination with the `imports`
attribute of the `py_library` rule.
grpc_library: (`label`) a single `py_library` target representing the
python gRPC library target to be depended upon. This can be used to
generate code that depends on `grpcio` from the Python Package Index.
**kwargs: Additional arguments to be supplied to the invocation of
py_library.
"""
@ -301,5 +305,6 @@ def py_grpc_library(
deps = srcs,
py_deps = deps,
strip_prefixes = strip_prefixes,
grpc_library = grpc_library,
**kwargs
)

@ -107,7 +107,6 @@ libs:
- src/core/lib/gpr/windows/sync.cc
- src/core/lib/gpr/windows/time.cc
- src/core/lib/gpr/windows/tmpfile.cc
- src/core/lib/gpr/wrap_memcpy.cc
- src/core/lib/gprpp/crash.cc
- src/core/lib/gprpp/examine_stack.cc
- src/core/lib/gprpp/fork.cc
@ -7574,51 +7573,6 @@ targets:
- gtest
- grpcpp_channelz
- grpc++_test_util
- name: chaotic_good_test
gtest: true
build: test
language: c++
headers:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.h
- src/core/ext/transport/chaotic_good/client_transport.h
- src/core/ext/transport/chaotic_good/frame.h
- src/core/ext/transport/chaotic_good/frame_header.h
- src/core/ext/transport/chaotic_good/server_transport.h
- src/core/lib/promise/event_engine_wakeup_scheduler.h
- src/core/lib/promise/inter_activity_latch.h
- src/core/lib/promise/inter_activity_pipe.h
- src/core/lib/promise/mpsc.h
- src/core/lib/promise/switch.h
- src/core/lib/promise/wait_set.h
- src/core/lib/transport/promise_endpoint.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/transport/test_suite/fixture.h
- test/core/transport/test_suite/test.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- src/core/ext/transport/chaotic_good/client_transport.cc
- src/core/ext/transport/chaotic_good/frame.cc
- src/core/ext/transport/chaotic_good/frame_header.cc
- src/core/ext/transport/chaotic_good/server_transport.cc
- src/core/lib/transport/promise_endpoint.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/transport/test_suite/call_content.cc
- test/core/transport/test_suite/call_shapes.cc
- test/core/transport/test_suite/chaotic_good_fixture.cc
- test/core/transport/test_suite/fixture.cc
- test/core/transport/test_suite/no_op.cc
- test/core/transport/test_suite/stress.cc
- test/core/transport/test_suite/test.cc
- test/core/transport/test_suite/test_main.cc
deps:
- gtest
- protobuf
- grpc_test_util
platforms:
- linux
- posix
uses_polling: false
- name: check_gcp_environment_linux_test
gtest: true
build: test
@ -18872,6 +18826,51 @@ targets:
- gtest
- grpc
uses_polling: false
- name: test_core_transport_test_suite_chaotic_good_test
gtest: true
build: test
language: c++
headers:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.h
- src/core/ext/transport/chaotic_good/client_transport.h
- src/core/ext/transport/chaotic_good/frame.h
- src/core/ext/transport/chaotic_good/frame_header.h
- src/core/ext/transport/chaotic_good/server_transport.h
- src/core/lib/promise/event_engine_wakeup_scheduler.h
- src/core/lib/promise/inter_activity_latch.h
- src/core/lib/promise/inter_activity_pipe.h
- src/core/lib/promise/mpsc.h
- src/core/lib/promise/switch.h
- src/core/lib/promise/wait_set.h
- src/core/lib/transport/promise_endpoint.h
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.h
- test/core/transport/test_suite/fixture.h
- test/core/transport/test_suite/test.h
src:
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.proto
- src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- src/core/ext/transport/chaotic_good/client_transport.cc
- src/core/ext/transport/chaotic_good/frame.cc
- src/core/ext/transport/chaotic_good/frame_header.cc
- src/core/ext/transport/chaotic_good/server_transport.cc
- src/core/lib/transport/promise_endpoint.cc
- test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
- test/core/transport/test_suite/call_content.cc
- test/core/transport/test_suite/call_shapes.cc
- test/core/transport/test_suite/chaotic_good_fixture.cc
- test/core/transport/test_suite/fixture.cc
- test/core/transport/test_suite/no_op.cc
- test/core/transport/test_suite/stress.cc
- test/core/transport/test_suite/test.cc
- test/core/transport/test_suite/test_main.cc
deps:
- gtest
- protobuf
- grpc_test_util
platforms:
- linux
- posix
uses_polling: false
- name: test_cpp_client_credentials_test
gtest: true
build: test
@ -18901,6 +18900,44 @@ targets:
deps:
- gtest
- grpc++_test_util
- name: test_cpp_ext_chaotic_good_test
gtest: true
build: test
language: c++
headers:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.h
- src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h
- src/core/ext/transport/chaotic_good/client_transport.h
- src/core/ext/transport/chaotic_good/frame.h
- src/core/ext/transport/chaotic_good/frame_header.h
- src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
- src/core/ext/transport/chaotic_good/server_transport.h
- src/core/ext/transport/chaotic_good/settings_metadata.h
- src/core/lib/promise/event_engine_wakeup_scheduler.h
- src/core/lib/promise/inter_activity_latch.h
- src/core/lib/promise/inter_activity_pipe.h
- src/core/lib/promise/mpsc.h
- src/core/lib/promise/switch.h
- src/core/lib/promise/wait_for_callback.h
- src/core/lib/promise/wait_set.h
- src/core/lib/transport/promise_endpoint.h
- src/cpp/ext/chaotic_good.h
src:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
- src/core/ext/transport/chaotic_good/client_transport.cc
- src/core/ext/transport/chaotic_good/frame.cc
- src/core/ext/transport/chaotic_good/frame_header.cc
- src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
- src/core/ext/transport/chaotic_good/server_transport.cc
- src/core/ext/transport/chaotic_good/settings_metadata.cc
- src/core/lib/transport/promise_endpoint.cc
- src/cpp/ext/chaotic_good.cc
- test/cpp/ext/chaotic_good_test.cc
deps:
- gtest
- grpc++
- grpc_test_util
- name: test_cpp_server_credentials_test
gtest: true
build: test

@ -13,5 +13,5 @@
# limitations under the License.
module GrpcBuildConfig
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-38.dll'
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-39.dll'
end

@ -12,11 +12,11 @@ settings:
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 38.0.0
core_version: 39.0.0
csharp_major_version: 2
g_stands_for: guardian
g_stands_for: giggle
protobuf_version: 3.25.1
version: 1.62.0-dev
version: 1.63.0-dev
configs:
asan:
CC: clang

3
config.m4 generated

@ -567,7 +567,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gpr/windows/sync.cc \
src/core/lib/gpr/windows/time.cc \
src/core/lib/gpr/windows/tmpfile.cc \
src/core/lib/gpr/wrap_memcpy.cc \
src/core/lib/gprpp/crash.cc \
src/core/lib/gprpp/examine_stack.cc \
src/core/lib/gprpp/fork.cc \
@ -1368,7 +1367,7 @@ if test "$PHP_GRPC" != "no"; then
-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0 \
-DGRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1 \
-DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.62.0dev\""')
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.63.0dev\""')
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/backend_metrics)

1
config.w32 generated

@ -532,7 +532,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gpr\\windows\\sync.cc " +
"src\\core\\lib\\gpr\\windows\\time.cc " +
"src\\core\\lib\\gpr\\windows\\tmpfile.cc " +
"src\\core\\lib\\gpr\\wrap_memcpy.cc " +
"src\\core\\lib\\gprpp\\crash.cc " +
"src\\core\\lib\\gprpp\\examine_stack.cc " +
"src\\core\\lib\\gprpp\\fork.cc " +

@ -61,4 +61,5 @@
- 1.59 'g' stands for ['generative'](https://github.com/grpc/grpc/tree/v1.59.x)
- 1.60 'g' stands for ['gjallarhorn'](https://github.com/grpc/grpc/tree/v1.60.x)
- 1.61 'g' stands for ['grand'](https://github.com/grpc/grpc/tree/v1.61.x)
- 1.62 'g' stands for ['guardian'](https://github.com/grpc/grpc/tree/master)
- 1.62 'g' stands for ['guardian'](https://github.com/grpc/grpc/tree/v1.62.x)
- 1.63 'g' stands for ['giggle'](https://github.com/grpc/grpc/tree/master)

@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: helloworld.proto
# Protobuf Python Version: 4.25.0
"""Generated protocol buffer code."""
from google.protobuf.internal import builder as _builder
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@ -13,18 +14,18 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2I\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x42\x36\n\x1bio.grpc.examples.helloworldB\x0fHelloWorldProtoP\x01\xa2\x02\x03HLWb\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2\xe4\x01\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x12K\n\x13SayHelloStreamReply\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x30\x01\x12L\n\x12SayHelloBidiStream\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00(\x01\x30\x01\x42\x36\n\x1bio.grpc.examples.helloworldB\x0fHelloWorldProtoP\x01\xa2\x02\x03HLWb\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'helloworld_pb2', globals())
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'helloworld_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
DESCRIPTOR._serialized_options = b'\n\033io.grpc.examples.helloworldB\017HelloWorldProtoP\001\242\002\003HLW'
_HELLOREQUEST._serialized_start=32
_HELLOREQUEST._serialized_end=60
_HELLOREPLY._serialized_start=62
_HELLOREPLY._serialized_end=91
_GREETER._serialized_start=93
_GREETER._serialized_end=166
_globals['DESCRIPTOR']._options = None
_globals['DESCRIPTOR']._serialized_options = b'\n\033io.grpc.examples.helloworldB\017HelloWorldProtoP\001\242\002\003HLW'
_globals['_HELLOREQUEST']._serialized_start=32
_globals['_HELLOREQUEST']._serialized_end=60
_globals['_HELLOREPLY']._serialized_start=62
_globals['_HELLOREPLY']._serialized_end=91
_globals['_GREETER']._serialized_start=94
_globals['_GREETER']._serialized_end=322
# @@protoc_insertion_point(module_scope)

@ -4,14 +4,14 @@ from typing import ClassVar as _ClassVar, Optional as _Optional
DESCRIPTOR: _descriptor.FileDescriptor
class HelloReply(_message.Message):
__slots__ = ["message"]
MESSAGE_FIELD_NUMBER: _ClassVar[int]
message: str
def __init__(self, message: _Optional[str] = ...) -> None: ...
class HelloRequest(_message.Message):
__slots__ = ["name"]
__slots__ = ("name",)
NAME_FIELD_NUMBER: _ClassVar[int]
name: str
def __init__(self, name: _Optional[str] = ...) -> None: ...
class HelloReply(_message.Message):
__slots__ = ("message",)
MESSAGE_FIELD_NUMBER: _ClassVar[int]
message: str
def __init__(self, message: _Optional[str] = ...) -> None: ...

@ -19,7 +19,17 @@ class GreeterStub(object):
'/helloworld.Greeter/SayHello',
request_serializer=helloworld__pb2.HelloRequest.SerializeToString,
response_deserializer=helloworld__pb2.HelloReply.FromString,
)
_registered_method=True)
self.SayHelloStreamReply = channel.unary_stream(
'/helloworld.Greeter/SayHelloStreamReply',
request_serializer=helloworld__pb2.HelloRequest.SerializeToString,
response_deserializer=helloworld__pb2.HelloReply.FromString,
_registered_method=True)
self.SayHelloBidiStream = channel.stream_stream(
'/helloworld.Greeter/SayHelloBidiStream',
request_serializer=helloworld__pb2.HelloRequest.SerializeToString,
response_deserializer=helloworld__pb2.HelloReply.FromString,
_registered_method=True)
class GreeterServicer(object):
@ -33,6 +43,18 @@ class GreeterServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SayHelloStreamReply(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SayHelloBidiStream(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_GreeterServicer_to_server(servicer, server):
rpc_method_handlers = {
@ -41,6 +63,16 @@ def add_GreeterServicer_to_server(servicer, server):
request_deserializer=helloworld__pb2.HelloRequest.FromString,
response_serializer=helloworld__pb2.HelloReply.SerializeToString,
),
'SayHelloStreamReply': grpc.unary_stream_rpc_method_handler(
servicer.SayHelloStreamReply,
request_deserializer=helloworld__pb2.HelloRequest.FromString,
response_serializer=helloworld__pb2.HelloReply.SerializeToString,
),
'SayHelloBidiStream': grpc.stream_stream_rpc_method_handler(
servicer.SayHelloBidiStream,
request_deserializer=helloworld__pb2.HelloRequest.FromString,
response_serializer=helloworld__pb2.HelloReply.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'helloworld.Greeter', rpc_method_handlers)
@ -63,8 +95,72 @@ class Greeter(object):
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/helloworld.Greeter/SayHello',
return grpc.experimental.unary_unary(
request,
target,
'/helloworld.Greeter/SayHello',
helloworld__pb2.HelloRequest.SerializeToString,
helloworld__pb2.HelloReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def SayHelloStreamReply(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/helloworld.Greeter/SayHelloStreamReply',
helloworld__pb2.HelloRequest.SerializeToString,
helloworld__pb2.HelloReply.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def SayHelloBidiStream(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_stream(
request_iterator,
target,
'/helloworld.Greeter/SayHelloBidiStream',
helloworld__pb2.HelloRequest.SerializeToString,
helloworld__pb2.HelloReply.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)

4
gRPC-C++.podspec generated

@ -22,7 +22,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-C++'
# TODO (mxyan): use version that match gRPC version when pod is stabilized
version = '1.62.0-dev'
version = '1.63.0-dev'
s.version = version
s.summary = 'gRPC C++ library'
s.homepage = 'https://grpc.io'
@ -225,7 +225,7 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Privacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
abseil_version = '1.20240116.0'
abseil_version = '1.20240116.1'
ss.dependency 'abseil/algorithm/container', abseil_version
ss.dependency 'abseil/base/base', abseil_version
ss.dependency 'abseil/base/config', abseil_version

5
gRPC-Core.podspec generated

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-Core'
version = '1.62.0-dev'
version = '1.63.0-dev'
s.version = version
s.summary = 'Core cross-platform gRPC library, written in C'
s.homepage = 'https://grpc.io'
@ -46,7 +46,7 @@ Pod::Spec.new do |s|
s.requires_arc = false
name = 'grpc'
abseil_version = '1.20240116.0'
abseil_version = '1.20240116.1'
# When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework.
# This lets users write their includes like `#include <grpc/grpc.h>` as opposed to `#include
@ -1446,7 +1446,6 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/windows/sync.cc',
'src/core/lib/gpr/windows/time.cc',
'src/core/lib/gpr/windows/tmpfile.cc',
'src/core/lib/gpr/wrap_memcpy.cc',
'src/core/lib/gprpp/atomic_utils.h',
'src/core/lib/gprpp/bitset.h',
'src/core/lib/gprpp/chunked_vector.h',

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-ProtoRPC'
version = '1.62.0-dev'
version = '1.63.0-dev'
s.version = version
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
s.homepage = 'https://grpc.io'

@ -21,7 +21,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC-RxLibrary'
version = '1.62.0-dev'
version = '1.63.0-dev'
s.version = version
s.summary = 'Reactive Extensions library for iOS/OSX.'
s.homepage = 'https://grpc.io'

2
gRPC.podspec generated

@ -20,7 +20,7 @@
Pod::Spec.new do |s|
s.name = 'gRPC'
version = '1.62.0-dev'
version = '1.63.0-dev'
s.version = version
s.summary = 'gRPC client library for iOS/OSX'
s.homepage = 'https://grpc.io'

1
grpc.def generated

@ -41,7 +41,6 @@ EXPORTS
grpc_completion_queue_thread_local_cache_init
grpc_completion_queue_thread_local_cache_flush
grpc_channel_check_connectivity_state
grpc_channel_num_external_connectivity_watchers
grpc_channel_watch_connectivity_state
grpc_channel_support_connectivity_watcher
grpc_channel_create_call

1
grpc.gemspec generated

@ -1339,7 +1339,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/windows/sync.cc )
s.files += %w( src/core/lib/gpr/windows/time.cc )
s.files += %w( src/core/lib/gpr/windows/tmpfile.cc )
s.files += %w( src/core/lib/gpr/wrap_memcpy.cc )
s.files += %w( src/core/lib/gprpp/atomic_utils.h )
s.files += %w( src/core/lib/gprpp/bitset.h )
s.files += %w( src/core/lib/gprpp/chunked_vector.h )

1
grpc.gyp generated

@ -227,7 +227,6 @@
'src/core/lib/gpr/windows/sync.cc',
'src/core/lib/gpr/windows/time.cc',
'src/core/lib/gpr/windows/tmpfile.cc',
'src/core/lib/gpr/wrap_memcpy.cc',
'src/core/lib/gprpp/crash.cc',
'src/core/lib/gprpp/examine_stack.cc',
'src/core/lib/gprpp/fork.cc',

@ -177,12 +177,6 @@ GRPCAPI int grpc_completion_queue_thread_local_cache_flush(
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(
grpc_channel* channel, int try_to_connect);
/** Number of active "external connectivity state watchers" attached to a
* channel.
* Useful for testing. **/
GRPCAPI int grpc_channel_num_external_connectivity_watchers(
grpc_channel* channel);
/** Watch for a change in connectivity state.
Once the channel connectivity state is different from last_observed_state,
tag will be enqueued on cq with success=1.

@ -19,9 +19,9 @@
#define GRPCPP_VERSION_INFO_H
#define GRPC_CPP_VERSION_MAJOR 1
#define GRPC_CPP_VERSION_MINOR 62
#define GRPC_CPP_VERSION_MINOR 63
#define GRPC_CPP_VERSION_PATCH 0
#define GRPC_CPP_VERSION_TAG "dev"
#define GRPC_CPP_VERSION_STRING "1.62.0-dev"
#define GRPC_CPP_VERSION_STRING "1.63.0-dev"
#endif // GRPCPP_VERSION_INFO_H

7
package.xml generated

@ -13,8 +13,8 @@
<date>2019-09-24</date>
<time>16:06:07</time>
<version>
<release>1.62.0dev</release>
<api>1.62.0dev</api>
<release>1.63.0dev</release>
<api>1.63.0dev</api>
</version>
<stability>
<release>beta</release>
@ -22,7 +22,7 @@
</stability>
<license>Apache 2.0</license>
<notes>
- gRPC Core 1.62.0 update
- gRPC Core 1.63.0 update
</notes>
<contents>
<dir baseinstalldir="/" name="/">
@ -1321,7 +1321,6 @@
<file baseinstalldir="/" name="src/core/lib/gpr/windows/sync.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/windows/time.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/windows/tmpfile.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/wrap_memcpy.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/atomic_utils.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/bitset.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/chunked_vector.h" role="src" />

@ -37,7 +37,6 @@ import sys
import sysconfig
import _metadata
import pkg_resources
from setuptools import Extension
from setuptools.command import egg_info
@ -454,22 +453,6 @@ if "linux" in sys.platform or "darwin" in sys.platform:
DEFINE_MACROS += (("PyMODINIT_FUNC", pymodinit),)
DEFINE_MACROS += (("GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK", 1),)
# By default, Python3 distutils enforces compatibility of
# c plugins (.so files) with the OSX version Python was built with.
# We need OSX 10.10, the oldest which supports C++ thread_local.
# Python 3.9: Mac OS Big Sur sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') returns int (11)
if "darwin" in sys.platform:
mac_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
if mac_target:
mac_target = pkg_resources.parse_version(str(mac_target))
if mac_target < pkg_resources.parse_version("10.10.0"):
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.10"
os.environ["_PYTHON_HOST_PLATFORM"] = re.sub(
r"macosx-[0-9]+\.[0-9]+-(.+)",
r"macosx-10.10-\1",
sysconfig.get_platform(),
)
def cython_extensions_and_necessity():
cython_module_files = [

@ -467,7 +467,7 @@ bool PrivateGenerator::PrintStub(
out->Print(
method_dict,
"response_deserializer=$ResponseModuleAndClass$.FromString,\n");
out->Print(")\n");
out->Print("_registered_method=True)\n");
}
}
}
@ -642,22 +642,27 @@ bool PrivateGenerator::PrintServiceClass(
args_dict["ArityMethodName"] = arity_method_name;
args_dict["PackageQualifiedService"] = package_qualified_service_name;
args_dict["Method"] = method->name();
out->Print(args_dict,
"return "
"grpc.experimental.$ArityMethodName$($RequestParameter$, "
"target, '/$PackageQualifiedService$/$Method$',\n");
out->Print(args_dict, "return grpc.experimental.$ArityMethodName$(\n");
{
IndentScope continuation_indent(out);
StringMap serializer_dict;
out->Print(args_dict, "$RequestParameter$,\n");
out->Print("target,\n");
out->Print(args_dict, "'/$PackageQualifiedService$/$Method$',\n");
serializer_dict["RequestModuleAndClass"] = request_module_and_class;
serializer_dict["ResponseModuleAndClass"] = response_module_and_class;
out->Print(serializer_dict,
"$RequestModuleAndClass$.SerializeToString,\n");
out->Print(serializer_dict, "$ResponseModuleAndClass$.FromString,\n");
out->Print("options, channel_credentials,\n");
out->Print(
"insecure, call_credentials, compression, wait_for_ready, "
"timeout, metadata)\n");
out->Print("options,\n");
out->Print("channel_credentials,\n");
out->Print("insecure,\n");
out->Print("call_credentials,\n");
out->Print("compression,\n");
out->Print("wait_for_ready,\n");
out->Print("timeout,\n");
out->Print("metadata,\n");
out->Print("_registered_method=True)\n");
}
}
}

@ -6562,6 +6562,7 @@ grpc_cc_library(
],
deps = [
"activity",
"cancel_callback",
"event_engine_common",
"if",
"map",

@ -81,21 +81,6 @@ grpc_connectivity_state grpc_channel_check_connectivity_state(
return client_channel->CheckConnectivityState(try_to_connect);
}
int grpc_channel_num_external_connectivity_watchers(grpc_channel* c_channel) {
grpc_core::Channel* channel = grpc_core::Channel::FromC(c_channel);
grpc_core::ClientChannelFilter* client_channel =
grpc_core::ClientChannelFilter::GetFromChannel(channel);
if (client_channel == nullptr) {
if (!grpc_core::IsLameChannel(channel)) {
gpr_log(GPR_ERROR,
"grpc_channel_num_external_connectivity_watchers called on "
"something that is not a client channel");
}
return 0;
}
return client_channel->NumExternalConnectivityWatchers();
}
int grpc_channel_support_connectivity_watcher(grpc_channel* channel) {
return grpc_core::ClientChannelFilter::GetFromChannel(
grpc_core::Channel::FromC(channel)) != nullptr;

@ -149,11 +149,6 @@ class ClientChannelFilter {
this, on_complete, /*cancel=*/true);
}
int NumExternalConnectivityWatchers() const {
MutexLock lock(&external_watchers_mu_);
return static_cast<int>(external_watchers_.size());
}
// Starts and stops a connectivity watch. The watcher will be initially
// notified as soon as the state changes from initial_state and then on
// every subsequent state change until either the watch is stopped or

@ -30,6 +30,7 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "absl/strings/match.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
@ -45,6 +46,7 @@
#include "src/core/lib/address_utils/parse_address.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/env.h"
#include "src/core/lib/gprpp/host_port.h"
@ -258,11 +260,17 @@ absl::optional<std::string> HttpProxyMapper::MapName(
MaybeAddDefaultPort(absl::StripPrefix(uri->path(), "/")));
if (user_cred.has_value()) {
// Use base64 encoding for user credentials as stated in RFC 7617
auto encoded_user_cred = UniquePtr<char>(
grpc_base64_encode(user_cred->data(), user_cred->length(), 0, 0));
std::string encoded_user_cred;
if (IsAbslBase64Enabled()) {
encoded_user_cred = absl::Base64Escape(*user_cred);
} else {
UniquePtr<char> tmp(
grpc_base64_encode(user_cred->data(), user_cred->length(), 0, 0));
encoded_user_cred = tmp.get();
}
*args = args->Set(
GRPC_ARG_HTTP_CONNECT_HEADERS,
absl::StrCat("Proxy-Authorization:Basic ", encoded_user_cred.get()));
absl::StrCat("Proxy-Authorization:Basic ", encoded_user_cred));
}
return name_to_resolve;
}

@ -20,7 +20,14 @@
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/un.h>
#endif // GPR_WINDOWS
#endif
#include <functional>

@ -105,16 +105,14 @@ auto ChaoticGoodConnector::DataEndpointReadSettingsFrame(
auto ChaoticGoodConnector::DataEndpointWriteSettingsFrame(
RefCountedPtr<ChaoticGoodConnector> self) {
return [self]() {
// Serialize setting frame.
SettingsFrame frame;
// frame.header set connectiion_type: control
frame.headers = SettingsMetadata{SettingsMetadata::ConnectionType::kData,
self->connection_id_, kDataAlignmentBytes}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->hpack_compressor_);
return self->data_endpoint_.Write(std::move(write_buffer.control));
};
// Serialize setting frame.
SettingsFrame frame;
// frame.header set connectiion_type: control
frame.headers = SettingsMetadata{SettingsMetadata::ConnectionType::kData,
self->connection_id_, kDataAlignmentBytes}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->hpack_compressor_);
return self->data_endpoint_.Write(std::move(write_buffer.control));
}
auto ChaoticGoodConnector::WaitForDataEndpointSetup(
@ -200,16 +198,14 @@ auto ChaoticGoodConnector::ControlEndpointReadSettingsFrame(
auto ChaoticGoodConnector::ControlEndpointWriteSettingsFrame(
RefCountedPtr<ChaoticGoodConnector> self) {
return [self]() {
// Serialize setting frame.
SettingsFrame frame;
// frame.header set connectiion_type: control
frame.headers = SettingsMetadata{SettingsMetadata::ConnectionType::kControl,
absl::nullopt, absl::nullopt}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->hpack_compressor_);
return self->control_endpoint_.Write(std::move(write_buffer.control));
};
// Serialize setting frame.
SettingsFrame frame;
// frame.header set connectiion_type: control
frame.headers = SettingsMetadata{SettingsMetadata::ConnectionType::kControl,
absl::nullopt, absl::nullopt}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->hpack_compressor_);
return self->control_endpoint_.Write(std::move(write_buffer.control));
}
void ChaoticGoodConnector::Connect(const Args& args, Result* result,

@ -331,37 +331,29 @@ auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
ControlEndpointWriteSettingsFrame(RefCountedPtr<HandshakingState> self) {
self->connection_->NewConnectionID();
SettingsFrame frame;
frame.headers =
SettingsMetadata{absl::nullopt, self->connection_->connection_id_,
absl::nullopt}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->connection_->hpack_compressor_);
return TrySeq(
[self]() {
self->connection_->NewConnectionID();
SettingsFrame frame;
frame.headers =
SettingsMetadata{absl::nullopt, self->connection_->connection_id_,
absl::nullopt}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer =
frame.Serialize(&self->connection_->hpack_compressor_);
return self->connection_->endpoint_.Write(
std::move(write_buffer.control));
},
self->connection_->endpoint_.Write(std::move(write_buffer.control)),
WaitForDataEndpointSetup(self));
}
auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
DataEndpointWriteSettingsFrame(RefCountedPtr<HandshakingState> self) {
// Send data endpoint setting frame
SettingsFrame frame;
frame.headers =
SettingsMetadata{absl::nullopt, self->connection_->connection_id_,
self->connection_->data_alignment_}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer = frame.Serialize(&self->connection_->hpack_compressor_);
return TrySeq(
[self]() {
// Send data endpoint setting frame
SettingsFrame frame;
frame.headers =
SettingsMetadata{absl::nullopt, self->connection_->connection_id_,
self->connection_->data_alignment_}
.ToMetadataBatch(GetContext<Arena>());
auto write_buffer =
frame.Serialize(&self->connection_->hpack_compressor_);
return self->connection_->endpoint_.Write(
std::move(write_buffer.control));
},
self->connection_->endpoint_.Write(std::move(write_buffer.control)),
[self]() mutable {
MutexLock lock(&self->connection_->listener_->mu_);
// Set endpoint to latch
@ -380,8 +372,10 @@ auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
auto ChaoticGoodServerListener::ActiveConnection::HandshakingState::
EndpointWriteSettingsFrame(RefCountedPtr<HandshakingState> self,
bool is_control_endpoint) {
return If(is_control_endpoint, ControlEndpointWriteSettingsFrame(self),
DataEndpointWriteSettingsFrame(self));
return If(
is_control_endpoint,
[&self] { return ControlEndpointWriteSettingsFrame(self); },
[&self] { return DataEndpointWriteSettingsFrame(self); });
}
void ChaoticGoodServerListener::ActiveConnection::HandshakingState::

@ -30,8 +30,15 @@
#include <stdlib.h>
#include <string.h>
#ifdef GRPC_HAVE_UNIX_SOCKET
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/un.h>
#endif
#endif // GPR_WINDOWS
#endif // GRPC_HAVE_UNIX_SOCKET
#include <string>
#include "absl/status/status.h"

@ -44,8 +44,15 @@
#include "src/core/lib/uri/uri_parser.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/un.h>
#endif
#endif // GPR_WINDOWS
#endif // GRPC_HAVE_UNIX_SOCKET
#ifdef GRPC_HAVE_UNIX_SOCKET
static absl::StatusOr<std::string> grpc_sockaddr_to_uri_unix_if_possible(

@ -58,8 +58,15 @@
#include "src/core/lib/gprpp/strerror.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/stat.h> // IWYU pragma: keep
#include <sys/un.h>
#endif // GPR_WINDOWS
#endif
namespace grpc_event_engine {

@ -32,8 +32,15 @@
#endif // GRPC_POSIX_SOCKET_UTILS_COMMON
#ifdef GRPC_HAVE_UNIX_SOCKET
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/stat.h> // IWYU pragma: keep
#include <sys/un.h>
#endif // GPR_WINDOWS
#endif
#ifdef GRPC_HAVE_VSOCK

@ -208,6 +208,10 @@ static grpc_error_handle enable_socket_low_latency(SOCKET sock) {
} // namespace
absl::Status SetSocketNonBlock(SOCKET sock) {
return grpc_tcp_set_non_block(sock);
}
absl::Status PrepareSocket(SOCKET sock) {
absl::Status err;
err = grpc_tcp_set_non_block(sock);

@ -133,6 +133,9 @@ class WinSocket {
// Attempt to configure default socket settings
absl::Status PrepareSocket(SOCKET sock);
// Set non block option for socket.
absl::Status SetSocketNonBlock(SOCKET sock);
} // namespace experimental
} // namespace grpc_event_engine

@ -49,6 +49,13 @@
namespace grpc_event_engine {
namespace experimental {
namespace {
EventEngine::OnConnectCallback CreateCrashingOnConnectCallback() {
return [](absl::StatusOr<std::unique_ptr<EventEngine::Endpoint>>) {
grpc_core::Crash("Internal Error: OnConnect callback called when unset");
};
}
} // namespace
// ---- IOCPWorkClosure ----
WindowsEventEngine::IOCPWorkClosure::IOCPWorkClosure(ThreadPool* thread_pool,
@ -250,6 +257,7 @@ void WindowsEventEngine::OnConnectCompleted(
// Connection attempt complete!
grpc_core::MutexLock lock(&state->mu);
cb = std::move(state->on_connected_user_callback);
state->on_connected_user_callback = CreateCrashingOnConnectCallback();
state->on_connected = nullptr;
{
grpc_core::MutexLock handle_lock(&connection_mu_);
@ -298,7 +306,10 @@ EventEngine::ConnectionHandle WindowsEventEngine::Connect(
if (ResolvedAddressToV4Mapped(addr, &addr6_v4mapped)) {
address = addr6_v4mapped;
}
SOCKET sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, nullptr, 0,
const int addr_family =
(address.address()->sa_family == AF_UNIX) ? AF_UNIX : AF_INET6;
const int protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
SOCKET sock = WSASocket(addr_family, SOCK_STREAM, protocol, nullptr, 0,
IOCP::GetDefaultSocketFlags());
if (sock == INVALID_SOCKET) {
Run([on_connect = std::move(on_connect),
@ -307,7 +318,11 @@ EventEngine::ConnectionHandle WindowsEventEngine::Connect(
});
return EventEngine::ConnectionHandle::kInvalid;
}
status = PrepareSocket(sock);
if (addr_family == AF_UNIX) {
status = SetSocketNonBlock(sock);
} else {
status = PrepareSocket(sock);
}
if (!status.ok()) {
Run([on_connect = std::move(on_connect), status]() mutable {
on_connect(status);
@ -332,7 +347,16 @@ EventEngine::ConnectionHandle WindowsEventEngine::Connect(
return EventEngine::ConnectionHandle::kInvalid;
}
// bind the local address
auto local_address = ResolvedAddressMakeWild6(0);
ResolvedAddress local_address;
if (addr_family == AF_UNIX) {
// For ConnectEx() to work for AF_UNIX, the sock needs to be bound to
// the local address of an unnamed socket.
sockaddr addr = {};
addr.sa_family = AF_UNIX;
local_address = ResolvedAddress(&addr, sizeof(addr));
} else {
local_address = ResolvedAddressMakeWild6(0);
}
istatus = bind(sock, local_address.address(), local_address.size());
if (istatus != 0) {
Run([on_connect = std::move(on_connect),
@ -356,10 +380,13 @@ EventEngine::ConnectionHandle WindowsEventEngine::Connect(
});
connection_state->timer_handle =
RunAfter(timeout, [this, connection_state]() {
grpc_core::MutexLock lock(&connection_state->mu);
grpc_core::ReleasableMutexLock lock(&connection_state->mu);
if (CancelConnectFromDeadlineTimer(connection_state.get())) {
connection_state->on_connected_user_callback(
absl::DeadlineExceededError("Connection timed out"));
auto cb = std::move(connection_state->on_connected_user_callback);
connection_state->on_connected_user_callback =
CreateCrashingOnConnectCallback();
lock.Release();
cb(absl::DeadlineExceededError("Connection timed out"));
}
// else: The connection attempt could not be canceled. We can assume
// the connection callback will be called.
@ -380,8 +407,14 @@ EventEngine::ConnectionHandle WindowsEventEngine::Connect(
connection_state->socket->Shutdown(DEBUG_LOCATION, "ConnectEx");
Run([connection_state = std::move(connection_state),
status = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx")]() mutable {
grpc_core::MutexLock lock(&connection_state->mu);
connection_state->on_connected_user_callback(status);
EventEngine::OnConnectCallback cb;
{
grpc_core::MutexLock lock(&connection_state->mu);
cb = std::move(connection_state->on_connected_user_callback);
connection_state->on_connected_user_callback =
CreateCrashingOnConnectCallback();
}
cb(status);
});
return EventEngine::ConnectionHandle::kInvalid;
}

@ -27,6 +27,7 @@
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/port.h"
namespace grpc_event_engine {
namespace experimental {
@ -67,11 +68,39 @@ void WindowsEventEngineListener::SinglePortSocketListener::
// ---- SinglePortSocketListener ----
// TODO(hork): This may be refactored to share with posix engine.
void UnlinkIfUnixDomainSocket(
const EventEngine::ResolvedAddress& resolved_addr) {
#ifdef GRPC_HAVE_UNIX_SOCKET
if (resolved_addr.address()->sa_family != AF_UNIX) {
return;
}
struct sockaddr_un* un = reinterpret_cast<struct sockaddr_un*>(
const_cast<sockaddr*>(resolved_addr.address()));
// There is nothing to unlink for an abstract unix socket.
if (un->sun_path[0] == '\0' && un->sun_path[1] != '\0') {
return;
}
// For windows we need to remove the file instead of unlink.
DWORD attr = ::GetFileAttributesA(un->sun_path);
if (attr == INVALID_FILE_ATTRIBUTES) {
return;
}
if (attr & FILE_ATTRIBUTE_DIRECTORY || attr & FILE_ATTRIBUTE_READONLY) {
return;
}
::DeleteFileA(un->sun_path);
#else
(void)resolved_addr;
#endif
}
WindowsEventEngineListener::SinglePortSocketListener::
~SinglePortSocketListener() {
grpc_core::MutexLock lock(&io_state_->mu);
io_state_->listener_socket->Shutdown(DEBUG_LOCATION,
"~SinglePortSocketListener");
UnlinkIfUnixDomainSocket(listener_sockname());
GRPC_EVENT_ENGINE_TRACE("~SinglePortSocketListener::%p", this);
}
@ -109,7 +138,11 @@ absl::Status WindowsEventEngineListener::SinglePortSocketListener::Start() {
absl::Status
WindowsEventEngineListener::SinglePortSocketListener::StartLocked() {
SOCKET accept_socket = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0,
const EventEngine::ResolvedAddress addr = listener_sockname();
const int addr_family =
(addr.address()->sa_family == AF_UNIX) ? AF_UNIX : AF_INET6;
const int protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
SOCKET accept_socket = WSASocket(addr_family, SOCK_STREAM, protocol, NULL, 0,
IOCP::GetDefaultSocketFlags());
if (accept_socket == INVALID_SOCKET) {
return GRPC_WSA_ERROR(WSAGetLastError(), "WSASocket");
@ -118,11 +151,17 @@ WindowsEventEngineListener::SinglePortSocketListener::StartLocked() {
if (accept_socket != INVALID_SOCKET) closesocket(accept_socket);
return error;
};
auto error = PrepareSocket(accept_socket);
absl::Status error;
if (addr_family == AF_UNIX) {
error = SetSocketNonBlock(accept_socket);
} else {
error = PrepareSocket(accept_socket);
}
if (!error.ok()) return fail(error);
// Start the "accept" asynchronously.
io_state_->listener_socket->NotifyOnRead(&io_state_->on_accept_cb);
DWORD addrlen = sizeof(sockaddr_in6) + 16;
DWORD addrlen =
sizeof(addresses_) / 2; // half of the buffer is for remote addr.
DWORD bytes_received = 0;
int success =
AcceptEx(io_state_->listener_socket->raw_socket(), accept_socket,
@ -238,8 +277,14 @@ WindowsEventEngineListener::SinglePortSocketListener::PrepareListenerSocket(
if (sock != INVALID_SOCKET) closesocket(sock);
return error;
};
auto error = PrepareSocket(sock);
absl::Status error;
if (addr.address()->sa_family == AF_UNIX) {
error = SetSocketNonBlock(sock);
} else {
error = PrepareSocket(sock);
}
if (!error.ok()) return fail(error);
UnlinkIfUnixDomainSocket(addr);
if (bind(sock, addr.address(), addr.size()) == SOCKET_ERROR) {
return fail(GRPC_WSA_ERROR(WSAGetLastError(), "bind"));
}
@ -313,7 +358,10 @@ absl::StatusOr<int> WindowsEventEngineListener::Bind(
out_addr = ResolvedAddressMakeWild6(out_port);
}
// open the socket
SOCKET sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, nullptr, 0,
const int addr_family =
(out_addr.address()->sa_family == AF_UNIX) ? AF_UNIX : AF_INET6;
const int protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
SOCKET sock = WSASocket(addr_family, SOCK_STREAM, protocol, nullptr, 0,
IOCP::GetDefaultSocketFlags());
if (sock == INVALID_SOCKET) {
auto error = GRPC_WSA_ERROR(WSAGetLastError(), "WSASocket");

@ -30,6 +30,14 @@
#include "src/core/lib/event_engine/thread_pool/thread_pool.h"
#include "src/core/lib/event_engine/windows/iocp.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/port.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#endif
namespace grpc_event_engine {
namespace experimental {
@ -120,9 +128,15 @@ class WindowsEventEngineListener : public EventEngine::Listener {
// The cached AcceptEx for that port.
LPFN_ACCEPTEX AcceptEx;
// Buffer to hold the local and remote address.
// This seemingly magic number comes from AcceptEx's documentation. each
// address buffer needs to have at least 16 more bytes at their end.
#ifdef GRPC_HAVE_UNIX_SOCKET
// unix addr is larger than ip addr.
uint8_t addresses_[(sizeof(sockaddr_un) + 16) * 2] = {};
#else
uint8_t addresses_[(sizeof(sockaddr_in6) + 16) * 2] = {};
#endif
// The parent listener
WindowsEventEngineListener* listener_;
// shared state for asynchronous cleanup of overlapped operations

@ -24,6 +24,8 @@
#if defined(GRPC_CFSTREAM)
namespace {
const char* const description_absl_base64 = "Use abseil base64 functions.";
const char* const additional_constraints_absl_base64 = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -171,6 +173,8 @@ const char* const description_work_serializer_dispatch =
"callback, instead of running things inline in the first thread that "
"successfully enqueues work.";
const char* const additional_constraints_work_serializer_dispatch = "{}";
const uint8_t required_experiments_work_serializer_dispatch[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdEventEngineClient)};
const char* const description_write_size_policy =
"Try to size writes such that they don't create too large of a backlog";
const char* const additional_constraints_write_size_policy = "{}";
@ -193,6 +197,8 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"absl_base64", description_absl_base64, additional_constraints_absl_base64,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -283,7 +289,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
true},
{"work_serializer_dispatch", description_work_serializer_dispatch,
additional_constraints_work_serializer_dispatch, nullptr, 0, false, true},
additional_constraints_work_serializer_dispatch,
required_experiments_work_serializer_dispatch, 1, false, true},
{"write_size_policy", description_write_size_policy,
additional_constraints_write_size_policy, nullptr, 0, true, true},
{"write_size_cap", description_write_size_cap,
@ -297,6 +304,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
#elif defined(GPR_WINDOWS)
namespace {
const char* const description_absl_base64 = "Use abseil base64 functions.";
const char* const additional_constraints_absl_base64 = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -444,6 +453,8 @@ const char* const description_work_serializer_dispatch =
"callback, instead of running things inline in the first thread that "
"successfully enqueues work.";
const char* const additional_constraints_work_serializer_dispatch = "{}";
const uint8_t required_experiments_work_serializer_dispatch[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdEventEngineClient)};
const char* const description_write_size_policy =
"Try to size writes such that they don't create too large of a backlog";
const char* const additional_constraints_write_size_policy = "{}";
@ -466,6 +477,8 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"absl_base64", description_absl_base64, additional_constraints_absl_base64,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -556,7 +569,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
true},
{"work_serializer_dispatch", description_work_serializer_dispatch,
additional_constraints_work_serializer_dispatch, nullptr, 0, false, true},
additional_constraints_work_serializer_dispatch,
required_experiments_work_serializer_dispatch, 1, false, true},
{"write_size_policy", description_write_size_policy,
additional_constraints_write_size_policy, nullptr, 0, true, true},
{"write_size_cap", description_write_size_cap,
@ -570,6 +584,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
#else
namespace {
const char* const description_absl_base64 = "Use abseil base64 functions.";
const char* const additional_constraints_absl_base64 = "{}";
const char* const description_call_status_override_on_cancellation =
"Avoid overriding call status of successfully finished calls if it races "
"with cancellation.";
@ -717,6 +733,8 @@ const char* const description_work_serializer_dispatch =
"callback, instead of running things inline in the first thread that "
"successfully enqueues work.";
const char* const additional_constraints_work_serializer_dispatch = "{}";
const uint8_t required_experiments_work_serializer_dispatch[] = {
static_cast<uint8_t>(grpc_core::kExperimentIdEventEngineClient)};
const char* const description_write_size_policy =
"Try to size writes such that they don't create too large of a backlog";
const char* const additional_constraints_write_size_policy = "{}";
@ -739,6 +757,8 @@ const bool kDefaultForDebugOnly = true;
namespace grpc_core {
const ExperimentMetadata g_experiment_metadata[] = {
{"absl_base64", description_absl_base64, additional_constraints_absl_base64,
nullptr, 0, true, true},
{"call_status_override_on_cancellation",
description_call_status_override_on_cancellation,
additional_constraints_call_status_override_on_cancellation, nullptr, 0,
@ -829,7 +849,8 @@ const ExperimentMetadata g_experiment_metadata[] = {
additional_constraints_work_serializer_clears_time_cache, nullptr, 0, true,
true},
{"work_serializer_dispatch", description_work_serializer_dispatch,
additional_constraints_work_serializer_dispatch, nullptr, 0, false, true},
additional_constraints_work_serializer_dispatch,
required_experiments_work_serializer_dispatch, 1, false, true},
{"write_size_policy", description_write_size_policy,
additional_constraints_write_size_policy, nullptr, 0, true, true},
{"write_size_cap", description_write_size_cap,

@ -57,6 +57,8 @@ namespace grpc_core {
#ifdef GRPC_EXPERIMENTS_ARE_FINAL
#if defined(GRPC_CFSTREAM)
#define GRPC_EXPERIMENT_IS_INCLUDED_ABSL_BASE64
inline bool IsAbslBase64Enabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -119,6 +121,8 @@ inline bool IsWriteSizeCapEnabled() { return true; }
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#elif defined(GPR_WINDOWS)
#define GRPC_EXPERIMENT_IS_INCLUDED_ABSL_BASE64
inline bool IsAbslBase64Enabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -182,6 +186,8 @@ inline bool IsWriteSizeCapEnabled() { return true; }
inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#else
#define GRPC_EXPERIMENT_IS_INCLUDED_ABSL_BASE64
inline bool IsAbslBase64Enabled() { return true; }
#ifndef NDEBUG
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
#endif
@ -247,6 +253,7 @@ inline bool IsWrrDelegateToPickFirstEnabled() { return true; }
#else
enum ExperimentIds {
kExperimentIdAbslBase64,
kExperimentIdCallStatusOverrideOnCancellation,
kExperimentIdCallV3,
kExperimentIdCanaryClientPrivacy,
@ -289,6 +296,10 @@ enum ExperimentIds {
kExperimentIdWrrDelegateToPickFirst,
kNumExperiments
};
#define GRPC_EXPERIMENT_IS_INCLUDED_ABSL_BASE64
inline bool IsAbslBase64Enabled() {
return IsExperimentEnabled(kExperimentIdAbslBase64);
}
#define GRPC_EXPERIMENT_IS_INCLUDED_CALL_STATUS_OVERRIDE_ON_CANCELLATION
inline bool IsCallStatusOverrideOnCancellationEnabled() {
return IsExperimentEnabled(kExperimentIdCallStatusOverrideOnCancellation);

@ -40,6 +40,11 @@
# This file only defines the experiments. Refer to rollouts.yaml for the rollout
# state of each experiment.
- name: absl_base64
description: Use abseil base64 functions.
expiry: 2024/06/01
owner: roth@google.com
test_tags: ["credential_token_tests"]
- name: call_status_override_on_cancellation
description:
Avoid overriding call status of successfully finished calls if it races with
@ -282,9 +287,10 @@
Have the work serializer dispatch work to event engine for every callback,
instead of running things inline in the first thread that successfully
enqueues work.
expiry: 2024/02/10
owner: ctiller@google.com
expiry: 2024/03/31
owner: ysseung@google.com
test_tags: ["core_end2end_test", "cpp_end2end_test", "xds_end2end_test", "lb_unit_test"]
requires: ["event_engine_client"]
- name: write_size_cap
description:
Limit outgoing writes proportional to the target write size

@ -40,12 +40,19 @@
#
# Supported platforms: ios, windows, posix
- name: absl_base64
default: true
- name: call_status_override_on_cancellation
default: debug
- name: call_v3
default: false
- name: canary_client_privacy
default: false
- name: chaotic_good
default:
ios: broken
posix: false
windows: broken
- name: client_idleness
default: true
- name: client_privacy

@ -1,43 +0,0 @@
//
//
// Copyright 2016 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
#include <grpc/support/port_platform.h>
#include <string.h>
// Provide a wrapped memcpy for targets that need to be backwards
// compatible with older libc's.
//
// Enable by setting LDFLAGS=-Wl,-wrap,memcpy when linking.
//
extern "C" {
#ifdef __linux__
#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) && \
!defined(__ANDROID__)
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
void* __wrap_memcpy(void* destination, const void* source, size_t num) {
return memcpy(destination, source, num);
}
#else // !__x86_64__
void* __wrap_memcpy(void* destination, const void* source, size_t num) {
return memmove(destination, source, num);
}
#endif
#endif
}

@ -30,6 +30,9 @@
#endif
#if defined(GPR_WINDOWS)
#define GRPC_WINSOCK_SOCKET 1
#ifndef __MINGW32__
#define GRPC_HAVE_UNIX_SOCKET 1
#endif // __MINGW32__
#define GRPC_WINDOWS_SOCKETUTILS 1
#define GRPC_WINDOWS_SOCKET_ARES_EV_DRIVER 1
#elif defined(GPR_ANDROID)

@ -145,6 +145,8 @@ static int64_t tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
grpc_error_handle error;
async_connect* ac = NULL;
absl::StatusOr<std::string> addr_uri;
int addr_family;
int protocol;
addr_uri = grpc_sockaddr_to_uri(addr);
if (!addr_uri.ok()) {
@ -159,14 +161,25 @@ static int64_t tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
addr = &addr6_v4mapped;
}
sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0,
// extract family
addr_family =
(grpc_sockaddr_get_family(addr) == AF_UNIX) ? AF_UNIX : AF_INET6;
protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
sock = WSASocket(addr_family, SOCK_STREAM, protocol, NULL, 0,
grpc_get_default_wsa_socket_flags());
if (sock == INVALID_SOCKET) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "WSASocket");
goto failure;
}
error = grpc_tcp_prepare_socket(sock);
if (addr_family == AF_UNIX) {
// tcp settings for af_unix are skipped.
error = grpc_tcp_set_non_block(sock);
} else {
error = grpc_tcp_prepare_socket(sock);
}
if (!error.ok()) {
goto failure;
}
@ -183,7 +196,15 @@ static int64_t tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
goto failure;
}
grpc_sockaddr_make_wildcard6(0, &local_address);
if (addr_family == AF_UNIX) {
// For ConnectEx() to work for AF_UNIX, the sock needs to be bound to
// the local address of an unnamed socket.
local_address = {};
((grpc_sockaddr*)local_address.addr)->sa_family = AF_UNIX;
local_address.len = sizeof(grpc_sockaddr);
} else {
grpc_sockaddr_make_wildcard6(0, &local_address);
}
status =
bind(sock, (grpc_sockaddr*)&local_address.addr, (int)local_address.len);
@ -196,7 +217,6 @@ static int64_t tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
info = &socket->write_info;
success = ConnectEx(sock, (grpc_sockaddr*)&addr->addr, (int)addr->len, NULL,
0, NULL, &info->overlapped);
// It wouldn't be unusual to get a success immediately. But we'll still get
// an IOCP notification, so let's ignore it.
if (!success) {
@ -206,7 +226,6 @@ static int64_t tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint,
goto failure;
}
}
ac = new async_connect();
ac->on_done = on_done;
ac->socket = socket;

@ -78,13 +78,21 @@ using ::grpc_event_engine::experimental::WindowsEventEngineListener;
// one listening port
typedef struct grpc_tcp_listener grpc_tcp_listener;
struct grpc_tcp_listener {
// Buffer to hold the local and remote address.
// This seemingly magic number comes from AcceptEx's documentation. each
// address buffer needs to have at least 16 more bytes at their end.
#ifdef GRPC_HAVE_UNIX_SOCKET
// unix addr is larger than ip addr.
uint8_t addresses[(sizeof(sockaddr_un) + 16) * 2] = {};
#else
uint8_t addresses[(sizeof(grpc_sockaddr_in6) + 16) * 2];
#endif // GRPC_HAVE_UNIX_SOCKET
// This will hold the socket for the next accept.
SOCKET new_socket;
// The listener winsocket.
grpc_winsocket* socket;
// address of listener
grpc_resolved_address resolved_addr;
// The actual TCP port number.
int port;
unsigned port_index;
@ -125,6 +133,35 @@ struct grpc_tcp_server {
WindowsEventEngineListener* ee_listener;
};
// TODO(hork): This may be refactored to share with posix engine and event
// engine.
void unlink_if_unix_domain_socket(const grpc_resolved_address* resolved_addr) {
#ifdef GRPC_HAVE_UNIX_SOCKET
const grpc_sockaddr* addr =
reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
if (addr->sa_family != AF_UNIX) {
return;
}
struct sockaddr_un* un =
reinterpret_cast<struct sockaddr_un*>(const_cast<sockaddr*>(addr));
// There is nothing to unlink for an abstract unix socket.
if (un->sun_path[0] == '\0' && un->sun_path[1] != '\0') {
return;
}
// For windows we need to remove the file instead of unlink.
DWORD attr = ::GetFileAttributesA(un->sun_path);
if (attr == INVALID_FILE_ATTRIBUTES) {
return;
}
if (attr & FILE_ATTRIBUTE_DIRECTORY || attr & FILE_ATTRIBUTE_READONLY) {
return;
}
::DeleteFileA(un->sun_path);
#else
(void)resolved_addr;
#endif
}
// Public function. Allocates the proper data structures to hold a
// grpc_tcp_server.
static grpc_error_handle tcp_server_create(grpc_closure* shutdown_complete,
@ -158,6 +195,7 @@ static void destroy_server(void* arg, grpc_error_handle /* error */) {
s->head = sp->next;
sp->next = NULL;
grpc_winsocket_destroy(sp->socket);
unlink_if_unix_domain_socket(&sp->resolved_addr);
gpr_free(sp);
}
gpr_mu_destroy(&s->mu);
@ -222,12 +260,15 @@ static grpc_error_handle prepare_socket(SOCKET sock,
grpc_resolved_address sockname_temp;
grpc_error_handle error;
int sockname_temp_len;
error = grpc_tcp_prepare_socket(sock);
if (grpc_sockaddr_get_family(addr) == AF_UNIX) {
error = grpc_tcp_set_non_block(sock);
} else {
error = grpc_tcp_prepare_socket(sock);
}
if (!error.ok()) {
goto failure;
}
unlink_if_unix_domain_socket(addr);
if (bind(sock, (const grpc_sockaddr*)addr->addr, (int)addr->len) ==
SOCKET_ERROR) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "bind");
@ -277,22 +318,28 @@ static void decrement_active_ports_and_notify_locked(grpc_tcp_listener* sp) {
static grpc_error_handle start_accept_locked(grpc_tcp_listener* port) {
SOCKET sock = INVALID_SOCKET;
BOOL success;
DWORD addrlen = sizeof(grpc_sockaddr_in6) + 16;
const DWORD addrlen = sizeof(port->addresses) / 2;
DWORD bytes_received = 0;
grpc_error_handle error;
if (port->shutting_down) {
return absl::OkStatus();
}
sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0,
const int addr_family =
grpc_sockaddr_get_family(&port->resolved_addr) == AF_UNIX ? AF_UNIX
: AF_INET6;
const int protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
sock = WSASocket(addr_family, SOCK_STREAM, protocol, NULL, 0,
grpc_get_default_wsa_socket_flags());
if (sock == INVALID_SOCKET) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "WSASocket");
goto failure;
}
error = grpc_tcp_prepare_socket(sock);
if (addr_family == AF_UNIX) {
error = grpc_tcp_set_non_block(sock);
} else {
error = grpc_tcp_prepare_socket(sock);
}
if (!error.ok()) goto failure;
// Start the "accept" asynchronously.
@ -463,6 +510,7 @@ static grpc_error_handle add_socket_to_server(grpc_tcp_server* s, SOCKET sock,
sp->outstanding_calls = 0;
sp->AcceptEx = AcceptEx;
sp->new_socket = INVALID_SOCKET;
sp->resolved_addr = *addr;
sp->port = port;
sp->port_index = port_index;
GRPC_CLOSURE_INIT(&sp->on_accept, on_accept, sp, grpc_schedule_on_exec_ctx);
@ -522,7 +570,10 @@ static grpc_error_handle tcp_server_add_port(grpc_tcp_server* s,
addr = &wildcard;
}
sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0,
const int addr_family =
grpc_sockaddr_get_family(addr) == AF_UNIX ? AF_UNIX : AF_INET6;
const int protocol = addr_family == AF_UNIX ? 0 : IPPROTO_TCP;
sock = WSASocket(addr_family, SOCK_STREAM, protocol, NULL, 0,
grpc_get_default_wsa_socket_flags());
if (sock == INVALID_SOCKET) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "WSASocket");

@ -24,7 +24,14 @@
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/un.h>
#endif // GPR_WINDOWS
#include "absl/strings/str_cat.h"
@ -39,7 +46,11 @@
#include "src/core/lib/transport/error_utils.h"
void grpc_create_socketpair_if_unix(int sv[2]) {
#ifdef GPR_WINDOWS
grpc_core::Crash("AF_UNIX socket pairs are not supported on Windows");
#else
GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
#endif
}
absl::StatusOr<std::vector<grpc_resolved_address>>
@ -86,10 +97,12 @@ void grpc_unlink_if_unix_domain_socket(
return;
}
#ifndef GPR_WINDOWS
struct stat st;
if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
unlink(un->sun_path);
}
#endif
}
#endif

@ -33,13 +33,16 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/escaping.h"
#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/json.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/json/json_reader.h"
#include "src/core/lib/json/json_writer.h"
@ -180,7 +183,10 @@ static char* encoded_jwt_header(const char* key_id, const char* algorithm) {
{"kid", Json::FromString(key_id)},
});
std::string json_str = grpc_core::JsonDump(json);
return grpc_base64_encode(json_str.c_str(), json_str.size(), 1, 0);
if (!grpc_core::IsAbslBase64Enabled()) {
return grpc_base64_encode(json_str.c_str(), json_str.size(), 1, 0);
}
return gpr_strdup(absl::WebSafeBase64Escape(json_str).c_str());
}
static char* encoded_jwt_claim(const grpc_auth_json_key* json_key,
@ -208,7 +214,10 @@ static char* encoded_jwt_claim(const grpc_auth_json_key* json_key,
std::string json_str =
grpc_core::JsonDump(Json::FromObject(std::move(object)));
return grpc_base64_encode(json_str.c_str(), json_str.size(), 1, 0);
if (!grpc_core::IsAbslBase64Enabled()) {
return grpc_base64_encode(json_str.c_str(), json_str.size(), 1, 0);
}
return gpr_strdup(absl::WebSafeBase64Escape(json_str).c_str());
}
static char* dot_concat_and_free_strings(char* str1, char* str2) {
@ -280,7 +289,14 @@ char* compute_and_encode_signature(const grpc_auth_json_key* json_key,
gpr_log(GPR_ERROR, "DigestFinal (signature compute) failed.");
goto end;
}
result = grpc_base64_encode(sig, sig_len, 1, 0);
if (!grpc_core::IsAbslBase64Enabled()) {
result = grpc_base64_encode(sig, sig_len, 1, 0);
} else {
result =
gpr_strdup(absl::WebSafeBase64Escape(
absl::string_view(reinterpret_cast<char*>(sig), sig_len))
.c_str());
}
end:
#if OPENSSL_VERSION_NUMBER < 0x30000000L

@ -43,6 +43,7 @@
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/escaping.h"
#include "absl/strings/string_view.h"
#include <grpc/slice.h>
@ -52,6 +53,7 @@
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/lib/experiments/experiments.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/gprpp/memory.h"
@ -111,14 +113,22 @@ static const EVP_MD* evp_md_from_alg(const char* alg) {
}
static Json parse_json_part_from_jwt(const char* str, size_t len) {
grpc_slice slice = grpc_base64_decode_with_len(str, len, 1);
if (GRPC_SLICE_IS_EMPTY(slice)) {
gpr_log(GPR_ERROR, "Invalid base64.");
return Json(); // JSON null
std::string string;
if (!grpc_core::IsAbslBase64Enabled()) {
grpc_slice slice = grpc_base64_decode_with_len(str, len, 1);
if (GRPC_SLICE_IS_EMPTY(slice)) {
gpr_log(GPR_ERROR, "Invalid base64.");
return Json(); // JSON null
}
string = std::string(grpc_core::StringViewFromSlice(slice));
grpc_core::CSliceUnref(slice);
} else {
if (!absl::WebSafeBase64Unescape(absl::string_view(str, len), &string)) {
gpr_log(GPR_ERROR, "Invalid base64.");
return Json(); // JSON null
}
}
absl::string_view string = grpc_core::StringViewFromSlice(slice);
auto json = grpc_core::JsonParse(string);
grpc_core::CSliceUnref(slice);
if (!json.ok()) {
gpr_log(GPR_ERROR, "JSON parse error: %s",
json.status().ToString().c_str());
@ -480,19 +490,26 @@ end:
}
static BIGNUM* bignum_from_base64(const char* b64) {
BIGNUM* result = nullptr;
grpc_slice bin;
if (b64 == nullptr) return nullptr;
bin = grpc_base64_decode(b64, 1);
if (GRPC_SLICE_IS_EMPTY(bin)) {
if (!grpc_core::IsAbslBase64Enabled()) {
grpc_slice bin = grpc_base64_decode(b64, 1);
if (GRPC_SLICE_IS_EMPTY(bin)) {
gpr_log(GPR_ERROR, "Invalid base64 for big num.");
return nullptr;
}
BIGNUM* result =
BN_bin2bn(GRPC_SLICE_START_PTR(bin),
TSI_SIZE_AS_SIZE(GRPC_SLICE_LENGTH(bin)), nullptr);
grpc_core::CSliceUnref(bin);
return result;
}
std::string string;
if (!absl::WebSafeBase64Unescape(b64, &string)) {
gpr_log(GPR_ERROR, "Invalid base64 for big num.");
return nullptr;
}
result = BN_bin2bn(GRPC_SLICE_START_PTR(bin),
TSI_SIZE_AS_SIZE(GRPC_SLICE_LENGTH(bin)), nullptr);
grpc_core::CSliceUnref(bin);
return result;
return BN_bin2bn(reinterpret_cast<const uint8_t*>(string.data()),
TSI_SIZE_AS_SIZE(string.size()), nullptr);
}
#if OPENSSL_VERSION_NUMBER < 0x10100000L
@ -951,8 +968,15 @@ void grpc_jwt_verifier_verify(grpc_jwt_verifier* verifier,
signed_jwt_len = static_cast<size_t>(dot - jwt);
cur = dot + 1;
signature = grpc_base64_decode(cur, 1);
if (GRPC_SLICE_IS_EMPTY(signature)) goto error;
if (!grpc_core::IsAbslBase64Enabled()) {
signature = grpc_base64_decode(cur, 1);
if (GRPC_SLICE_IS_EMPTY(signature)) goto error;
} else {
std::string signature_str;
if (!absl::WebSafeBase64Unescape(cur, &signature_str)) goto error;
signature = grpc_slice_from_cpp_string(std::move(signature_str));
}
retrieve_key_and_verify(
verifier_cb_ctx_create(verifier, pollset, header, claims, audience,
signature, jwt, signed_jwt_len, user_data, cb));

@ -57,7 +57,7 @@ namespace {
// and add this to it.
absl::StatusOr<std::string> IssuerFromCrl(X509_CRL* crl) {
if (crl == nullptr) {
return "";
return absl::InvalidArgumentError("crl cannot be null");
}
X509_NAME* issuer = X509_CRL_get_issuer(crl);
if (issuer == nullptr) {

@ -27,6 +27,7 @@
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "absl/base/attributes.h"
#include "absl/status/status.h"
@ -585,25 +586,25 @@ void SecurityHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
class FailHandshaker : public Handshaker {
public:
explicit FailHandshaker(absl::Status status) : status_(std::move(status)) {}
const char* name() const override { return "security_fail"; }
void Shutdown(grpc_error_handle /*why*/) override {}
void DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
grpc_closure* on_handshake_done,
HandshakerArgs* args) override {
grpc_error_handle error =
GRPC_ERROR_CREATE("Failed to create security handshaker");
grpc_endpoint_shutdown(args->endpoint, error);
grpc_endpoint_shutdown(args->endpoint, status_);
grpc_endpoint_destroy(args->endpoint);
args->endpoint = nullptr;
args->args = ChannelArgs();
grpc_slice_buffer_destroy(args->read_buffer);
gpr_free(args->read_buffer);
args->read_buffer = nullptr;
ExecCtx::Run(DEBUG_LOCATION, on_handshake_done, error);
ExecCtx::Run(DEBUG_LOCATION, on_handshake_done, status_);
}
private:
~FailHandshaker() override = default;
absl::Status status_;
};
//
@ -652,14 +653,22 @@ class ServerSecurityHandshakerFactory : public HandshakerFactory {
//
RefCountedPtr<Handshaker> SecurityHandshakerCreate(
tsi_handshaker* handshaker, grpc_security_connector* connector,
const ChannelArgs& args) {
absl::StatusOr<tsi_handshaker*> handshaker,
grpc_security_connector* connector, const ChannelArgs& args) {
// If no TSI handshaker was created, return a handshaker that always fails.
// Otherwise, return a real security handshaker.
if (handshaker == nullptr) {
return MakeRefCounted<FailHandshaker>();
if (!handshaker.ok()) {
return MakeRefCounted<FailHandshaker>(
absl::Status(handshaker.status().code(),
absl::StrCat("Failed to create security handshaker: ",
handshaker.status().message())));
} else if (*handshaker == nullptr) {
// TODO(gtcooke94) Once all TSI impls are updated to pass StatusOr<> instead
// of null, we should change this to use absl::InternalError().
return MakeRefCounted<FailHandshaker>(
absl::UnknownError("Failed to create security handshaker."));
} else {
return MakeRefCounted<SecurityHandshaker>(handshaker, connector, args);
return MakeRefCounted<SecurityHandshaker>(*handshaker, connector, args);
}
}

@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
#include "absl/status/statusor.h"
#include <grpc/grpc.h>
#include "src/core/lib/channel/channel_args.h"
@ -34,8 +36,8 @@ namespace grpc_core {
/// Creates a security handshaker using \a handshaker.
RefCountedPtr<Handshaker> SecurityHandshakerCreate(
tsi_handshaker* handshaker, grpc_security_connector* connector,
const ChannelArgs& args);
absl::StatusOr<tsi_handshaker*> handshaker,
grpc_security_connector* connector, const ChannelArgs& args);
/// Registers security handshaker factories.
void SecurityRegisterHandshakerFactories(CoreConfiguration::Builder*);

@ -23,6 +23,6 @@
#include <grpc/grpc.h>
const char* grpc_version_string(void) { return "38.0.0"; }
const char* grpc_version_string(void) { return "39.0.0"; }
const char* grpc_g_stands_for(void) { return "guardian"; }
const char* grpc_g_stands_for(void) { return "giggle"; }

@ -39,6 +39,7 @@
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/promise/activity.h"
#include "src/core/lib/promise/cancel_callback.h"
#include "src/core/lib/promise/if.h"
#include "src/core/lib/promise/map.h"
#include "src/core/lib/promise/poll.h"
@ -69,8 +70,10 @@ class PromiseEndpoint {
// `Write()` before the previous write finishes. Doing that results in
// undefined behavior.
auto Write(SliceBuffer data) {
// Assert previous write finishes.
GPR_ASSERT(!write_state_->complete.load(std::memory_order_relaxed));
// Start write and assert previous write finishes.
auto prev = write_state_->state.exchange(WriteState::kWriting,
std::memory_order_relaxed);
GPR_ASSERT(prev == WriteState::kIdle);
bool completed;
if (data.Length() == 0) {
completed = true;
@ -92,16 +95,31 @@ class PromiseEndpoint {
if (completed) write_state_->waker = Waker();
}
return If(
completed, []() { return []() { return absl::OkStatus(); }; },
completed,
[this]() {
return [write_state = write_state_]() {
auto prev = write_state->state.exchange(WriteState::kIdle,
std::memory_order_relaxed);
GPR_ASSERT(prev == WriteState::kWriting);
return absl::OkStatus();
};
},
[this]() {
return [write_state = write_state_]() -> Poll<absl::Status> {
// If current write isn't finished return `Pending()`, else return
// write result.
if (!write_state->complete.load(std::memory_order_acquire)) {
return Pending();
// If current write isn't finished return `Pending()`, else
// return write result.
WriteState::State expected = WriteState::kWritten;
if (write_state->state.compare_exchange_strong(
expected, WriteState::kIdle, std::memory_order_acquire,
std::memory_order_relaxed)) {
// State was Written, and we changed it to Idle. We can return
// the result.
return std::move(write_state->result);
}
write_state->complete.store(false, std::memory_order_relaxed);
return std::move(write_state->result);
// State was not Written; since we're polling it must be
// Writing. Assert that and return Pending.
GPR_ASSERT(expected == WriteState::kWriting);
return Pending();
};
});
}
@ -228,7 +246,13 @@ class PromiseEndpoint {
};
struct WriteState : public RefCounted<WriteState> {
std::atomic<bool> complete{false};
enum State : uint8_t {
kIdle, // Not writing.
kWriting, // Write started, but not completed.
kWritten, // Write completed.
};
std::atomic<State> state{kIdle};
// Write buffer used for `EventEngine::Endpoint::Write()` to ensure the
// memory behind the buffer is not lost.
grpc_event_engine::experimental::SliceBuffer buffer;
@ -239,7 +263,10 @@ class PromiseEndpoint {
void Complete(absl::Status status) {
result = std::move(status);
auto w = std::move(waker);
complete.store(true, 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
// the callback path twice.
GPR_ASSERT(prev == kWriting);
w.Wakeup();
}
};

@ -24,8 +24,15 @@
#ifdef GRPC_HAVE_UNIX_SOCKET
#include <string.h>
#ifdef GPR_WINDOWS
// clang-format off
#include <ws2def.h>
#include <afunix.h>
// clang-format on
#else
#include <sys/socket.h>
#include <sys/un.h>
#endif // GPR_WINDOWS
#include <memory>
#include <utility>

@ -173,7 +173,11 @@ void GoogleCloud2ProdResolver::StartLocked() {
absl::StatusOr<std::string> result) mutable {
resolver->work_serializer_->Run(
[resolver, result = std::move(result)]() {
resolver->IPv6QueryDone(result.ok());
// Check that the payload is non-empty in order to work around
// the fact that there are buggy implementations of metadata
// servers in the wild, which can in some cases return 200
// plus an empty result when they should have returned 404.
resolver->IPv6QueryDone(result.ok() && !result->empty());
},
DEBUG_LOCATION);
},

@ -283,68 +283,75 @@ bool VerifyCrlCertIssuerNamesMatch(X509_CRL* crl, X509* cert) {
}
bool HasCrlSignBit(X509* cert) {
// X509_get_key_usage is not in 1.0.2. Just make this return true.
#if OPENSSL_VERSION_NUMBER < 0x10100000
return true;
#else
if (cert == nullptr) {
return false;
}
// X509_get_key_usage was introduced in 1.1.1
// A missing key usage extension means all key usages are valid.
#if OPENSSL_VERSION_NUMBER < 0x10100000
if (!cert->ex_flags & EXFLAG_KUSAGE) {
return true;
}
return cert->ex_kusage & KU_CRL_SIGN;
#else
return (X509_get_key_usage(cert) & KU_CRL_SIGN) != 0;
#endif // OPENSSL_VERSION_NUMBEr < 0x10100000
}
#endif // OPENSSL_VERSION_NUMBER < 0x10100000
absl::StatusOr<std::string> AkidFromCertificate(X509* cert) {
ASN1_OCTET_STRING* akid = nullptr;
int j = X509_get_ext_by_NID(cert, NID_authority_key_identifier, -1);
// Can't have multiple occurrences
if (j >= 0) {
if (X509_get_ext_by_NID(cert, NID_authority_key_identifier, j) != -1) {
absl::StatusOr<std::string> AkidFromCertificate(X509 * cert) {
ASN1_OCTET_STRING* akid = nullptr;
int j = X509_get_ext_by_NID(cert, NID_authority_key_identifier, -1);
// Can't have multiple occurrences
if (j >= 0) {
if (X509_get_ext_by_NID(cert, NID_authority_key_identifier, j) != -1) {
return absl::InvalidArgumentError(
"Could not get AKID from certificate.");
}
akid = X509_EXTENSION_get_data(X509_get_ext(cert, j));
}
unsigned char* buf = nullptr;
int len = i2d_ASN1_OCTET_STRING(akid, &buf);
if (len <= 0) {
return absl::InvalidArgumentError("Could not get AKID from certificate.");
}
akid = X509_EXTENSION_get_data(X509_get_ext(cert, j));
}
unsigned char* buf = nullptr;
int len = i2d_ASN1_OCTET_STRING(akid, &buf);
if (len <= 0) {
return absl::InvalidArgumentError("Could not get AKID from certificate.");
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
absl::StatusOr<std::string> AkidFromCrl(X509_CRL* crl) {
ASN1_OCTET_STRING* akid = nullptr;
int j = X509_CRL_get_ext_by_NID(crl, NID_authority_key_identifier, -1);
// Can't have multiple occurrences
if (j >= 0) {
if (X509_CRL_get_ext_by_NID(crl, NID_authority_key_identifier, j) != -1) {
absl::StatusOr<std::string> AkidFromCrl(X509_CRL * crl) {
ASN1_OCTET_STRING* akid = nullptr;
int j = X509_CRL_get_ext_by_NID(crl, NID_authority_key_identifier, -1);
// Can't have multiple occurrences
if (j >= 0) {
if (X509_CRL_get_ext_by_NID(crl, NID_authority_key_identifier, j) != -1) {
return absl::InvalidArgumentError(
"Could not get AKID from crlificate.");
}
akid = X509_EXTENSION_get_data(X509_CRL_get_ext(crl, j));
}
unsigned char* buf = nullptr;
int len = i2d_ASN1_OCTET_STRING(akid, &buf);
if (len <= 0) {
return absl::InvalidArgumentError("Could not get AKID from crlificate.");
}
akid = X509_EXTENSION_get_data(X509_CRL_get_ext(crl, j));
}
unsigned char* buf = nullptr;
int len = i2d_ASN1_OCTET_STRING(akid, &buf);
if (len <= 0) {
return absl::InvalidArgumentError("Could not get AKID from crlificate.");
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
absl::StatusOr<std::string> IssuerFromCert(X509* cert) {
if (cert == nullptr) {
return absl::InvalidArgumentError("cert cannot be null");
absl::StatusOr<std::string> IssuerFromCert(X509 * cert) {
if (cert == nullptr) {
return absl::InvalidArgumentError("cert cannot be null");
}
X509_NAME* issuer = X509_get_issuer_name(cert);
unsigned char* buf = nullptr;
int len = i2d_X509_NAME(issuer, &buf);
if (len < 0 || buf == nullptr) {
return absl::InvalidArgumentError("could not read issuer name from cert");
}
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
X509_NAME* issuer = X509_get_issuer_name(cert);
unsigned char* buf = nullptr;
int len = i2d_X509_NAME(issuer, &buf);
if (len < 0 || buf == nullptr) return "";
std::string ret(reinterpret_cast<char const*>(buf), len);
OPENSSL_free(buf);
return ret;
}
} // namespace grpc_core

@ -153,8 +153,7 @@ bool VerifyCrlSignature(X509_CRL* crl, X509* issuer);
bool VerifyCrlCertIssuerNamesMatch(X509_CRL* crl, X509* cert);
// Verifies the certificate in question has the cRLSign bit present.
// OpenSSL >= 1.1.1 return: true if cRLSign bit is present, false otherwise.
// OpenSSL == 1.0.2 return: true always
// return: true if cRLSign bit is present, false otherwise.
bool HasCrlSignBit(X509* cert);
// Gets a stable representation of the issuer name from an X509 certificate.
@ -170,7 +169,6 @@ absl::StatusOr<std::string> AkidFromCertificate(X509* cert);
// crl.
// return: a std::string of the DER encoding of the AKID or a status on failure.
absl::StatusOr<std::string> AkidFromCrl(X509_CRL* crl);
} // namespace grpc_core
#endif // GRPC_SRC_CORE_TSI_SSL_TRANSPORT_SECURITY_UTILS_H

@ -0,0 +1,79 @@
// Copyright 2024 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "src/cpp/ext/chaotic_good.h"
#include <memory>
#include <grpc/grpc.h>
#include "src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h"
#include "src/core/ext/transport/chaotic_good/server/chaotic_good_server.h"
#include "src/core/lib/gprpp/crash.h"
namespace grpc {
namespace {
class ChaoticGoodInsecureChannelCredentialsImpl final
: public ChannelCredentials {
public:
std::shared_ptr<Channel> CreateChannelImpl(
const grpc::string& target, const grpc::ChannelArguments& args) override {
return CreateChannelWithInterceptors(target, args, {});
}
std::shared_ptr<Channel> CreateChannelWithInterceptors(
const grpc::string& target, const grpc::ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
auto channel = grpc::CreateChannelInternal(
"", grpc_chaotic_good_channel_create(target.c_str(), &channel_args),
std::move(interceptor_creators));
return channel;
}
SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
private:
bool IsInsecure() const override { return true; }
};
class ChaoticGoodInsecureServerCredentialsImpl final
: public ServerCredentials {
public:
int AddPortToServer(const std::string& addr, grpc_server* server) override {
return grpc_server_add_chaotic_good_port(server, addr.c_str());
}
void SetAuthMetadataProcessor(
const std::shared_ptr<AuthMetadataProcessor>&) override {
grpc_core::Crash("Not supported on insecure server credentials");
}
};
} // namespace
std::shared_ptr<ChannelCredentials> ChaoticGoodInsecureChannelCredentials() {
return std::make_shared<ChaoticGoodInsecureChannelCredentialsImpl>();
}
std::shared_ptr<ServerCredentials> ChaoticGoodInsecureServerCredentials() {
return std::make_shared<ChaoticGoodInsecureServerCredentialsImpl>();
}
} // namespace grpc

@ -0,0 +1,30 @@
// Copyright 2024 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef GRPC_SRC_CPP_EXT_CHAOTIC_GOOD_H
#define GRPC_SRC_CPP_EXT_CHAOTIC_GOOD_H
#include <memory>
#include <grpcpp/security/credentials.h>
#include <grpcpp/security/server_credentials.h>
namespace grpc {
std::shared_ptr<ChannelCredentials> ChaoticGoodInsecureChannelCredentials();
std::shared_ptr<ServerCredentials> ChaoticGoodInsecureServerCredentials();
} // namespace grpc
#endif // GRPC_SRC_CPP_EXT_CHAOTIC_GOOD_H

@ -1,7 +1,7 @@
<!-- This file is generated -->
<Project>
<PropertyGroup>
<GrpcCsharpVersion>2.62.0-dev</GrpcCsharpVersion>
<GrpcCsharpVersion>2.63.0-dev</GrpcCsharpVersion>
<GoogleProtobufVersion>3.25.1</GoogleProtobufVersion>
</PropertyGroup>
</Project>

@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCCppPlugin'
v = '1.62.0-dev'
v = '1.63.0-dev'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates C++ files from .proto services.'
s.description = <<-DESC

@ -42,7 +42,7 @@ Pod::Spec.new do |s|
# exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed
# before them.
s.name = '!ProtoCompiler-gRPCPlugin'
v = '1.62.0-dev'
v = '1.63.0-dev'
s.version = v
s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.'
s.description = <<-DESC

@ -22,4 +22,4 @@
// instead. This file can be regenerated from the template by running
// `tools/buildgen/generate_projects.sh`.
#define GRPC_OBJC_VERSION_STRING @"1.62.0-dev"
#define GRPC_OBJC_VERSION_STRING @"1.63.0-dev"

@ -22,5 +22,5 @@
// instead. This file can be regenerated from the template by running
// `tools/buildgen/generate_projects.sh`.
#define GRPC_OBJC_VERSION_STRING @"1.62.0-dev"
#define GRPC_C_VERSION_STRING @"38.0.0"
#define GRPC_OBJC_VERSION_STRING @"1.63.0-dev"
#define GRPC_C_VERSION_STRING @"39.0.0"

@ -2,7 +2,7 @@
"name": "grpc/grpc-dev",
"description": "gRPC library for PHP - for Development use only",
"license": "Apache-2.0",
"version": "1.62.0",
"version": "1.63.0",
"require": {
"php": ">=7.0.0",
"google/protobuf": "^v3.3.0"

@ -20,6 +20,6 @@
#ifndef VERSION_H
#define VERSION_H
#define PHP_GRPC_VERSION "1.62.0dev"
#define PHP_GRPC_VERSION "1.63.0dev"
#endif /* VERSION_H */

@ -1,4 +1,6 @@
gens/
build/
grpc_root/
third_party/
*_pb2.py
*_pb2.pyi
*_pb2_grpc.py

@ -72,32 +72,6 @@ Troubleshooting
Help, I ...
* **... see a** :code:`pkg_resources.VersionConflict` **when I try to install
grpc**
This is likely because :code:`pip` doesn't own the offending dependency,
which in turn is likely because your operating system's package manager owns
it. You'll need to force the installation of the dependency:
:code:`pip install --ignore-installed $OFFENDING_DEPENDENCY`
For example, if you get an error like the following:
::
Traceback (most recent call last):
File "<string>", line 17, in <module>
...
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 509, in find
raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (six 1.8.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.10'))
You can fix it by doing:
::
sudo pip install --ignore-installed six
* **... see the following error on some platforms**
::

@ -1004,6 +1004,7 @@ class Channel(abc.ABC):
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
"""Creates a UnaryUnaryMultiCallable for a unary-unary method.
@ -1014,6 +1015,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. A bool representing whether the method
is registered.
Returns:
A UnaryUnaryMultiCallable value for the named unary-unary method.
@ -1026,6 +1029,7 @@ class Channel(abc.ABC):
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
"""Creates a UnaryStreamMultiCallable for a unary-stream method.
@ -1036,6 +1040,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None is
passed.
_registered_method: Implementation Private. A bool representing whether the method
is registered.
Returns:
A UnaryStreamMultiCallable value for the name unary-stream method.
@ -1048,6 +1054,7 @@ class Channel(abc.ABC):
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
"""Creates a StreamUnaryMultiCallable for a stream-unary method.
@ -1058,6 +1065,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None is
passed.
_registered_method: Implementation Private. A bool representing whether the method
is registered.
Returns:
A StreamUnaryMultiCallable value for the named stream-unary method.
@ -1070,6 +1079,7 @@ class Channel(abc.ABC):
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
"""Creates a StreamStreamMultiCallable for a stream-stream method.
@ -1080,6 +1090,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. A bool representing whether the method
is registered.
Returns:
A StreamStreamMultiCallable value for the named stream-stream method.

@ -24,6 +24,7 @@ import types
from typing import (
Any,
Callable,
Dict,
Iterator,
List,
Optional,
@ -1054,6 +1055,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
_request_serializer: Optional[SerializingFunction]
_response_deserializer: Optional[DeserializingFunction]
_context: Any
_registered_call_handle: Optional[int]
__slots__ = [
"_channel",
@ -1074,6 +1076,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
target: bytes,
request_serializer: Optional[SerializingFunction],
response_deserializer: Optional[DeserializingFunction],
_registered_call_handle: Optional[int],
):
self._channel = channel
self._managed_call = managed_call
@ -1082,6 +1085,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_census_context()
self._registered_call_handle = _registered_call_handle
def _prepare(
self,
@ -1153,6 +1157,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
),
),
self._context,
self._registered_call_handle,
)
event = call.next_event()
_handle_event(event, state, self._response_deserializer)
@ -1221,6 +1226,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable):
(operations,),
event_handler,
self._context,
self._registered_call_handle,
)
return _MultiThreadedRendezvous(
state, call, self._response_deserializer, deadline
@ -1234,6 +1240,7 @@ class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
_request_serializer: Optional[SerializingFunction]
_response_deserializer: Optional[DeserializingFunction]
_context: Any
_registered_call_handle: Optional[int]
__slots__ = [
"_channel",
@ -1252,6 +1259,7 @@ class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
target: bytes,
request_serializer: SerializingFunction,
response_deserializer: DeserializingFunction,
_registered_call_handle: Optional[int],
):
self._channel = channel
self._method = method
@ -1259,6 +1267,7 @@ class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_census_context()
self._registered_call_handle = _registered_call_handle
def __call__( # pylint: disable=too-many-locals
self,
@ -1317,6 +1326,7 @@ class _SingleThreadedUnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
call_credentials,
operations_and_tags,
self._context,
self._registered_call_handle,
)
return _SingleThreadedRendezvous(
state, call, self._response_deserializer, deadline
@ -1331,6 +1341,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
_request_serializer: Optional[SerializingFunction]
_response_deserializer: Optional[DeserializingFunction]
_context: Any
_registered_call_handle: Optional[int]
__slots__ = [
"_channel",
@ -1351,6 +1362,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
target: bytes,
request_serializer: SerializingFunction,
response_deserializer: DeserializingFunction,
_registered_call_handle: Optional[int],
):
self._channel = channel
self._managed_call = managed_call
@ -1359,6 +1371,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_census_context()
self._registered_call_handle = _registered_call_handle
def __call__( # pylint: disable=too-many-locals
self,
@ -1408,6 +1421,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable):
operations,
_event_handler(state, self._response_deserializer),
self._context,
self._registered_call_handle,
)
return _MultiThreadedRendezvous(
state, call, self._response_deserializer, deadline
@ -1422,6 +1436,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
_request_serializer: Optional[SerializingFunction]
_response_deserializer: Optional[DeserializingFunction]
_context: Any
_registered_call_handle: Optional[int]
__slots__ = [
"_channel",
@ -1442,6 +1457,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
target: bytes,
request_serializer: Optional[SerializingFunction],
response_deserializer: Optional[DeserializingFunction],
_registered_call_handle: Optional[int],
):
self._channel = channel
self._managed_call = managed_call
@ -1450,6 +1466,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_census_context()
self._registered_call_handle = _registered_call_handle
def _blocking(
self,
@ -1482,6 +1499,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
augmented_metadata, initial_metadata_flags
),
self._context,
self._registered_call_handle,
)
_consume_request_iterator(
request_iterator, state, call, self._request_serializer, None
@ -1572,6 +1590,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable):
),
event_handler,
self._context,
self._registered_call_handle,
)
_consume_request_iterator(
request_iterator,
@ -1593,6 +1612,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
_request_serializer: Optional[SerializingFunction]
_response_deserializer: Optional[DeserializingFunction]
_context: Any
_registered_call_handle: Optional[int]
__slots__ = [
"_channel",
@ -1611,8 +1631,9 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
managed_call: IntegratedCallFactory,
method: bytes,
target: bytes,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
request_serializer: Optional[SerializingFunction],
response_deserializer: Optional[DeserializingFunction],
_registered_call_handle: Optional[int],
):
self._channel = channel
self._managed_call = managed_call
@ -1621,6 +1642,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
self._request_serializer = request_serializer
self._response_deserializer = response_deserializer
self._context = cygrpc.build_census_context()
self._registered_call_handle = _registered_call_handle
def __call__(
self,
@ -1662,6 +1684,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable):
operations,
event_handler,
self._context,
self._registered_call_handle,
)
_consume_request_iterator(
request_iterator,
@ -1751,7 +1774,8 @@ def _channel_managed_call_management(state: _ChannelCallState):
credentials: Optional[cygrpc.CallCredentials],
operations: Sequence[Sequence[cygrpc.Operation]],
event_handler: UserTag,
context,
context: Any,
_registered_call_handle: Optional[int],
) -> cygrpc.IntegratedCall:
"""Creates a cygrpc.IntegratedCall.
@ -1768,6 +1792,8 @@ def _channel_managed_call_management(state: _ChannelCallState):
event_handler: A behavior to call to handle the events resultant from
the operations on the call.
context: Context object for distributed tracing.
_registered_call_handle: An int representing the call handle of the
method, or None if the method is not registered.
Returns:
A cygrpc.IntegratedCall with which to conduct an RPC.
"""
@ -1788,6 +1814,7 @@ def _channel_managed_call_management(state: _ChannelCallState):
credentials,
operations_and_tags,
context,
_registered_call_handle,
)
if state.managed_calls == 0:
state.managed_calls = 1
@ -2021,6 +2048,7 @@ class Channel(grpc.Channel):
_call_state: _ChannelCallState
_connectivity_state: _ChannelConnectivityState
_target: str
_registered_call_handles: Dict[str, int]
def __init__(
self,
@ -2055,6 +2083,22 @@ class Channel(grpc.Channel):
if cygrpc.g_gevent_activated:
cygrpc.gevent_increment_channel_count()
def _get_registered_call_handle(self, method: str) -> int:
"""
Get the registered call handle for a method.
This is a semi-private method. It is intended for use only by gRPC generated code.
This method is not thread-safe.
Args:
method: Required, the method name for the RPC.
Returns:
The registered call handle pointer in the form of a Python Long.
"""
return self._channel.get_registered_call_handle(_common.encode(method))
def _process_python_options(
self, python_options: Sequence[ChannelArgumentType]
) -> None:
@ -2078,12 +2122,17 @@ class Channel(grpc.Channel):
) -> None:
_unsubscribe(self._connectivity_state, callback)
# pylint: disable=arguments-differ
def unary_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.UnaryUnaryMultiCallable:
_registered_call_handle = None
if _registered_method:
_registered_call_handle = self._get_registered_call_handle(method)
return _UnaryUnaryMultiCallable(
self._channel,
_channel_managed_call_management(self._call_state),
@ -2091,14 +2140,20 @@ class Channel(grpc.Channel):
_common.encode(self._target),
request_serializer,
response_deserializer,
_registered_call_handle,
)
# pylint: disable=arguments-differ
def unary_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.UnaryStreamMultiCallable:
_registered_call_handle = None
if _registered_method:
_registered_call_handle = self._get_registered_call_handle(method)
# NOTE(rbellevi): Benchmarks have shown that running a unary-stream RPC
# on a single Python thread results in an appreciable speed-up. However,
# due to slight differences in capability, the multi-threaded variant
@ -2110,6 +2165,7 @@ class Channel(grpc.Channel):
_common.encode(self._target),
request_serializer,
response_deserializer,
_registered_call_handle,
)
else:
return _UnaryStreamMultiCallable(
@ -2119,14 +2175,20 @@ class Channel(grpc.Channel):
_common.encode(self._target),
request_serializer,
response_deserializer,
_registered_call_handle,
)
# pylint: disable=arguments-differ
def stream_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.StreamUnaryMultiCallable:
_registered_call_handle = None
if _registered_method:
_registered_call_handle = self._get_registered_call_handle(method)
return _StreamUnaryMultiCallable(
self._channel,
_channel_managed_call_management(self._call_state),
@ -2134,14 +2196,20 @@ class Channel(grpc.Channel):
_common.encode(self._target),
request_serializer,
response_deserializer,
_registered_call_handle,
)
# pylint: disable=arguments-differ
def stream_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.StreamStreamMultiCallable:
_registered_call_handle = None
if _registered_method:
_registered_call_handle = self._get_registered_call_handle(method)
return _StreamStreamMultiCallable(
self._channel,
_channel_managed_call_management(self._call_state),
@ -2149,6 +2217,7 @@ class Channel(grpc.Channel):
_common.encode(self._target),
request_serializer,
response_deserializer,
_registered_call_handle,
)
def _unsubscribe_all(self) -> None:

@ -74,6 +74,13 @@ cdef class SegregatedCall:
cdef class Channel:
cdef _ChannelState _state
cdef dict _registered_call_handles
# TODO(https://github.com/grpc/grpc/issues/15662): Eliminate this.
cdef tuple _arguments
cdef class CallHandle:
cdef void *c_call_handle
cdef object method

@ -101,6 +101,25 @@ cdef class _ChannelState:
self.connectivity_due = set()
self.closed_reason = None
cdef class CallHandle:
def __cinit__(self, _ChannelState channel_state, object method):
self.method = method
cpython.Py_INCREF(method)
# Note that since we always pass None for host, we set the
# second-to-last parameter of grpc_channel_register_call to a fixed
# NULL value.
self.c_call_handle = grpc_channel_register_call(
channel_state.c_channel, <const char *>method, NULL, NULL)
def __dealloc__(self):
cpython.Py_DECREF(self.method)
@property
def call_handle(self):
return cpython.PyLong_FromVoidPtr(self.c_call_handle)
cdef tuple _operate(grpc_call *c_call, object operations, object user_tag):
cdef grpc_call_error c_call_error
@ -199,7 +218,7 @@ cdef void _call(
grpc_completion_queue *c_completion_queue, on_success, int flags, method,
host, object deadline, CallCredentials credentials,
object operationses_and_user_tags, object metadata,
object context) except *:
object context, object registered_call_handle) except *:
"""Invokes an RPC.
Args:
@ -226,6 +245,8 @@ cdef void _call(
must be present in the first element of this value.
metadata: The metadata for this call.
context: Context object for distributed tracing.
registered_call_handle: An int representing the call handle of the method, or
None if the method is not registered.
"""
cdef grpc_slice method_slice
cdef grpc_slice host_slice
@ -242,10 +263,16 @@ cdef void _call(
else:
host_slice = _slice_from_bytes(host)
host_slice_ptr = &host_slice
call_state.c_call = grpc_channel_create_call(
channel_state.c_channel, NULL, flags,
c_completion_queue, method_slice, host_slice_ptr,
_timespec_from_time(deadline), NULL)
if registered_call_handle:
call_state.c_call = grpc_channel_create_registered_call(
channel_state.c_channel, NULL, flags,
c_completion_queue, cpython.PyLong_AsVoidPtr(registered_call_handle),
_timespec_from_time(deadline), NULL)
else:
call_state.c_call = grpc_channel_create_call(
channel_state.c_channel, NULL, flags,
c_completion_queue, method_slice, host_slice_ptr,
_timespec_from_time(deadline), NULL)
grpc_slice_unref(method_slice)
if host_slice_ptr:
grpc_slice_unref(host_slice)
@ -309,7 +336,7 @@ cdef class IntegratedCall:
cdef IntegratedCall _integrated_call(
_ChannelState state, int flags, method, host, object deadline,
object metadata, CallCredentials credentials, operationses_and_user_tags,
object context):
object context, object registered_call_handle):
call_state = _CallState()
def on_success(started_tags):
@ -318,7 +345,8 @@ cdef IntegratedCall _integrated_call(
_call(
state, call_state, state.c_call_completion_queue, on_success, flags,
method, host, deadline, credentials, operationses_and_user_tags, metadata, context)
method, host, deadline, credentials, operationses_and_user_tags,
metadata, context, registered_call_handle)
return IntegratedCall(state, call_state)
@ -371,7 +399,7 @@ cdef class SegregatedCall:
cdef SegregatedCall _segregated_call(
_ChannelState state, int flags, method, host, object deadline,
object metadata, CallCredentials credentials, operationses_and_user_tags,
object context):
object context, object registered_call_handle):
cdef _CallState call_state = _CallState()
cdef SegregatedCall segregated_call
cdef grpc_completion_queue *c_completion_queue
@ -389,7 +417,7 @@ cdef SegregatedCall _segregated_call(
_call(
state, call_state, c_completion_queue, on_success, flags, method, host,
deadline, credentials, operationses_and_user_tags, metadata,
context)
context, registered_call_handle)
except:
_destroy_c_completion_queue(c_completion_queue)
raise
@ -486,6 +514,7 @@ cdef class Channel:
else grpc_insecure_credentials_create())
self._state.c_channel = grpc_channel_create(
<char *>target, c_channel_credentials, channel_args.c_args())
self._registered_call_handles = {}
grpc_channel_credentials_release(c_channel_credentials)
def target(self):
@ -499,10 +528,10 @@ cdef class Channel:
def integrated_call(
self, int flags, method, host, object deadline, object metadata,
CallCredentials credentials, operationses_and_tags,
object context = None):
object context = None, object registered_call_handle = None):
return _integrated_call(
self._state, flags, method, host, deadline, metadata, credentials,
operationses_and_tags, context)
operationses_and_tags, context, registered_call_handle)
def next_call_event(self):
def on_success(tag):
@ -521,10 +550,10 @@ cdef class Channel:
def segregated_call(
self, int flags, method, host, object deadline, object metadata,
CallCredentials credentials, operationses_and_tags,
object context = None):
object context = None, object registered_call_handle = None):
return _segregated_call(
self._state, flags, method, host, deadline, metadata, credentials,
operationses_and_tags, context)
operationses_and_tags, context, registered_call_handle)
def check_connectivity_state(self, bint try_to_connect):
with self._state.condition:
@ -543,3 +572,19 @@ cdef class Channel:
def close_on_fork(self, code, details):
_close(self, code, details, True)
def get_registered_call_handle(self, method):
"""
Get or registers a call handler for a method.
This method is not thread-safe.
Args:
method: Required, the method name for the RPC.
Returns:
The registered call handle pointer in the form of a Python Long.
"""
if method not in self._registered_call_handles.keys():
self._registered_call_handles[method] = CallHandle(self._state, method)
return self._registered_call_handles[method].call_handle

@ -433,6 +433,12 @@ cdef extern from "grpc/grpc.h":
grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask,
grpc_completion_queue *completion_queue, grpc_slice method,
const grpc_slice *host, gpr_timespec deadline, void *reserved) nogil
void *grpc_channel_register_call(
grpc_channel *channel, const char *method, const char *host, void *reserved) nogil
grpc_call *grpc_channel_create_registered_call(
grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask,
grpc_completion_queue *completion_queue, void* registered_call_handle,
gpr_timespec deadline, void *reserved) nogil
grpc_connectivity_state grpc_channel_check_connectivity_state(
grpc_channel *channel, int try_to_connect) nogil
void grpc_channel_watch_connectivity_state(

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!!
__version__ = """1.62.0.dev0"""
__version__ = """1.63.0.dev0"""

@ -684,57 +684,85 @@ class _Channel(grpc.Channel):
def unsubscribe(self, callback: Callable):
self._channel.unsubscribe(callback)
# pylint: disable=arguments-differ
def unary_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.UnaryUnaryMultiCallable:
# pytype: disable=wrong-arg-count
thunk = lambda m: self._channel.unary_unary(
m, request_serializer, response_deserializer
m,
request_serializer,
response_deserializer,
_registered_method,
)
# pytype: enable=wrong-arg-count
if isinstance(self._interceptor, grpc.UnaryUnaryClientInterceptor):
return _UnaryUnaryMultiCallable(thunk, method, self._interceptor)
else:
return thunk(method)
# pylint: disable=arguments-differ
def unary_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.UnaryStreamMultiCallable:
# pytype: disable=wrong-arg-count
thunk = lambda m: self._channel.unary_stream(
m, request_serializer, response_deserializer
m,
request_serializer,
response_deserializer,
_registered_method,
)
# pytype: enable=wrong-arg-count
if isinstance(self._interceptor, grpc.UnaryStreamClientInterceptor):
return _UnaryStreamMultiCallable(thunk, method, self._interceptor)
else:
return thunk(method)
# pylint: disable=arguments-differ
def stream_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.StreamUnaryMultiCallable:
# pytype: disable=wrong-arg-count
thunk = lambda m: self._channel.stream_unary(
m, request_serializer, response_deserializer
m,
request_serializer,
response_deserializer,
_registered_method,
)
# pytype: enable=wrong-arg-count
if isinstance(self._interceptor, grpc.StreamUnaryClientInterceptor):
return _StreamUnaryMultiCallable(thunk, method, self._interceptor)
else:
return thunk(method)
# pylint: disable=arguments-differ
def stream_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> grpc.StreamStreamMultiCallable:
# pytype: disable=wrong-arg-count
thunk = lambda m: self._channel.stream_stream(
m, request_serializer, response_deserializer
m,
request_serializer,
response_deserializer,
_registered_method,
)
# pytype: enable=wrong-arg-count
if isinstance(self._interceptor, grpc.StreamStreamClientInterceptor):
return _StreamStreamMultiCallable(thunk, method, self._interceptor)
else:

@ -159,7 +159,19 @@ class ChannelCache:
channel_credentials: Optional[grpc.ChannelCredentials],
insecure: bool,
compression: Optional[grpc.Compression],
) -> grpc.Channel:
method: str,
_registered_method: bool,
) -> Tuple[grpc.Channel, Optional[int]]:
"""Get a channel from cache or creates a new channel.
This method also takes care of register method for channel,
which means we'll register a new call handle if we're calling a
non-registered method for an existing channel.
Returns:
A tuple with two items. The first item is the channel, second item is
the call handle if the method is registered, None if it's not registered.
"""
if insecure and channel_credentials:
raise ValueError(
"The insecure option is mutually exclusive with "
@ -176,18 +188,25 @@ class ChannelCache:
key = (target, options, channel_credentials, compression)
with self._lock:
channel_data = self._mapping.get(key, None)
call_handle = None
if channel_data is not None:
channel = channel_data[0]
# Register a new call handle if we're calling a registered method for an
# existing channel and this method is not registered.
if _registered_method:
call_handle = channel._get_registered_call_handle(method)
self._mapping.pop(key)
self._mapping[key] = (
channel,
datetime.datetime.now() + _EVICTION_PERIOD,
)
return channel
return channel, call_handle
else:
channel = _create_channel(
target, options, channel_credentials, compression
)
if _registered_method:
call_handle = channel._get_registered_call_handle(method)
self._mapping[key] = (
channel,
datetime.datetime.now() + _EVICTION_PERIOD,
@ -197,7 +216,7 @@ class ChannelCache:
or len(self._mapping) >= _MAXIMUM_CHANNELS
):
self._condition.notify()
return channel
return channel, call_handle
def _test_only_channel_count(self) -> int:
with self._lock:
@ -205,6 +224,7 @@ class ChannelCache:
@experimental_api
# pylint: disable=too-many-locals
def unary_unary(
request: RequestType,
target: str,
@ -219,6 +239,7 @@ def unary_unary(
wait_for_ready: Optional[bool] = None,
timeout: Optional[float] = _DEFAULT_TIMEOUT,
metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None,
_registered_method: Optional[bool] = False,
) -> ResponseType:
"""Invokes a unary-unary RPC without an explicitly specified channel.
@ -272,11 +293,17 @@ def unary_unary(
Returns:
The response to the RPC.
"""
channel = ChannelCache.get().get_channel(
target, options, channel_credentials, insecure, compression
channel, method_handle = ChannelCache.get().get_channel(
target,
options,
channel_credentials,
insecure,
compression,
method,
_registered_method,
)
multicallable = channel.unary_unary(
method, request_serializer, response_deserializer
method, request_serializer, response_deserializer, method_handle
)
wait_for_ready = wait_for_ready if wait_for_ready is not None else True
return multicallable(
@ -289,6 +316,7 @@ def unary_unary(
@experimental_api
# pylint: disable=too-many-locals
def unary_stream(
request: RequestType,
target: str,
@ -303,6 +331,7 @@ def unary_stream(
wait_for_ready: Optional[bool] = None,
timeout: Optional[float] = _DEFAULT_TIMEOUT,
metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None,
_registered_method: Optional[bool] = False,
) -> Iterator[ResponseType]:
"""Invokes a unary-stream RPC without an explicitly specified channel.
@ -355,11 +384,17 @@ def unary_stream(
Returns:
An iterator of responses.
"""
channel = ChannelCache.get().get_channel(
target, options, channel_credentials, insecure, compression
channel, method_handle = ChannelCache.get().get_channel(
target,
options,
channel_credentials,
insecure,
compression,
method,
_registered_method,
)
multicallable = channel.unary_stream(
method, request_serializer, response_deserializer
method, request_serializer, response_deserializer, method_handle
)
wait_for_ready = wait_for_ready if wait_for_ready is not None else True
return multicallable(
@ -372,6 +407,7 @@ def unary_stream(
@experimental_api
# pylint: disable=too-many-locals
def stream_unary(
request_iterator: Iterator[RequestType],
target: str,
@ -386,6 +422,7 @@ def stream_unary(
wait_for_ready: Optional[bool] = None,
timeout: Optional[float] = _DEFAULT_TIMEOUT,
metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None,
_registered_method: Optional[bool] = False,
) -> ResponseType:
"""Invokes a stream-unary RPC without an explicitly specified channel.
@ -438,11 +475,17 @@ def stream_unary(
Returns:
The response to the RPC.
"""
channel = ChannelCache.get().get_channel(
target, options, channel_credentials, insecure, compression
channel, method_handle = ChannelCache.get().get_channel(
target,
options,
channel_credentials,
insecure,
compression,
method,
_registered_method,
)
multicallable = channel.stream_unary(
method, request_serializer, response_deserializer
method, request_serializer, response_deserializer, method_handle
)
wait_for_ready = wait_for_ready if wait_for_ready is not None else True
return multicallable(
@ -455,6 +498,7 @@ def stream_unary(
@experimental_api
# pylint: disable=too-many-locals
def stream_stream(
request_iterator: Iterator[RequestType],
target: str,
@ -469,6 +513,7 @@ def stream_stream(
wait_for_ready: Optional[bool] = None,
timeout: Optional[float] = _DEFAULT_TIMEOUT,
metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None,
_registered_method: Optional[bool] = False,
) -> Iterator[ResponseType]:
"""Invokes a stream-stream RPC without an explicitly specified channel.
@ -521,11 +566,17 @@ def stream_stream(
Returns:
An iterator of responses.
"""
channel = ChannelCache.get().get_channel(
target, options, channel_credentials, insecure, compression
channel, method_handle = ChannelCache.get().get_channel(
target,
options,
channel_credentials,
insecure,
compression,
method,
_registered_method,
)
multicallable = channel.stream_stream(
method, request_serializer, response_deserializer
method, request_serializer, response_deserializer, method_handle
)
wait_for_ready = wait_for_ready if wait_for_ready is not None else True
return multicallable(

@ -272,6 +272,7 @@ class Channel(abc.ABC):
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> UnaryUnaryMultiCallable:
"""Creates a UnaryUnaryMultiCallable for a unary-unary method.
@ -282,6 +283,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. Optional: A bool representing
whether the method is registered.
Returns:
A UnaryUnaryMultiCallable value for the named unary-unary method.
@ -293,6 +296,7 @@ class Channel(abc.ABC):
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> UnaryStreamMultiCallable:
"""Creates a UnaryStreamMultiCallable for a unary-stream method.
@ -303,6 +307,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. Optional: A bool representing
whether the method is registered.
Returns:
A UnarySteramMultiCallable value for the named unary-stream method.
@ -314,6 +320,7 @@ class Channel(abc.ABC):
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> StreamUnaryMultiCallable:
"""Creates a StreamUnaryMultiCallable for a stream-unary method.
@ -324,6 +331,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. Optional: A bool representing
whether the method is registered.
Returns:
A StreamUnaryMultiCallable value for the named stream-unary method.
@ -335,6 +344,7 @@ class Channel(abc.ABC):
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> StreamStreamMultiCallable:
"""Creates a StreamStreamMultiCallable for a stream-stream method.
@ -345,6 +355,8 @@ class Channel(abc.ABC):
response_deserializer: Optional :term:`deserializer` for deserializing the
response message. Response goes undeserialized in case None
is passed.
_registered_method: Implementation Private. Optional: A bool representing
whether the method is registered.
Returns:
A StreamStreamMultiCallable value for the named stream-stream method.

@ -478,11 +478,20 @@ class Channel(_base_channel.Channel):
await self.wait_for_state_change(state)
state = self.get_state(try_to_connect=True)
# TODO(xuanwn): Implement this method after we have
# observability for Asyncio.
def _get_registered_call_handle(self, method: str) -> int:
pass
# TODO(xuanwn): Implement _registered_method after we have
# observability for Asyncio.
# pylint: disable=arguments-differ,unused-argument
def unary_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> UnaryUnaryMultiCallable:
return UnaryUnaryMultiCallable(
self._channel,
@ -494,11 +503,15 @@ class Channel(_base_channel.Channel):
self._loop,
)
# TODO(xuanwn): Implement _registered_method after we have
# observability for Asyncio.
# pylint: disable=arguments-differ,unused-argument
def unary_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> UnaryStreamMultiCallable:
return UnaryStreamMultiCallable(
self._channel,
@ -510,11 +523,15 @@ class Channel(_base_channel.Channel):
self._loop,
)
# TODO(xuanwn): Implement _registered_method after we have
# observability for Asyncio.
# pylint: disable=arguments-differ,unused-argument
def stream_unary(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> StreamUnaryMultiCallable:
return StreamUnaryMultiCallable(
self._channel,
@ -526,11 +543,15 @@ class Channel(_base_channel.Channel):
self._loop,
)
# TODO(xuanwn): Implement _registered_method after we have
# observability for Asyncio.
# pylint: disable=arguments-differ,unused-argument
def stream_stream(
self,
method: str,
request_serializer: Optional[SerializingFunction] = None,
response_deserializer: Optional[DeserializingFunction] = None,
_registered_method: Optional[bool] = False,
) -> StreamStreamMultiCallable:
return StreamStreamMultiCallable(
self._channel,

@ -541,7 +541,6 @@ CORE_SOURCE_FILES = [
'src/core/lib/gpr/windows/sync.cc',
'src/core/lib/gpr/windows/time.cc',
'src/core/lib/gpr/windows/tmpfile.cc',
'src/core/lib/gpr/wrap_memcpy.cc',
'src/core/lib/gprpp/crash.cc',
'src/core/lib/gprpp/examine_stack.cc',
'src/core/lib/gprpp/fork.cc',

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_admin/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_csds/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_observability/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -46,7 +46,6 @@ CC_FILES=[
'grpc_root/src/core/lib/gpr/windows/sync.cc',
'grpc_root/src/core/lib/gpr/windows/time.cc',
'grpc_root/src/core/lib/gpr/windows/tmpfile.cc',
'grpc_root/src/core/lib/gpr/wrap_memcpy.cc',
'grpc_root/src/core/lib/gprpp/crash.cc',
'grpc_root/src/core/lib/gprpp/examine_stack.cc',
'grpc_root/src/core/lib/gprpp/fork.cc',

@ -22,7 +22,6 @@ from subprocess import PIPE
import sys
import sysconfig
import pkg_resources
import setuptools
from setuptools import Extension
from setuptools.command import build_ext
@ -206,22 +205,6 @@ if "linux" in sys.platform or "darwin" in sys.platform:
pymodinit = 'extern "C" __attribute__((visibility ("default"))) PyObject*'
DEFINE_MACROS += (("PyMODINIT_FUNC", pymodinit),)
# By default, Python3 distutils enforces compatibility of
# c plugins (.so files) with the OSX version Python was built with.
# We need OSX 10.10, the oldest which supports C++ thread_local.
if "darwin" in sys.platform:
mac_target = sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
if mac_target and (
pkg_resources.parse_version(mac_target)
< pkg_resources.parse_version("10.10.0")
):
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.10"
os.environ["_PYTHON_HOST_PLATFORM"] = re.sub(
r"macosx-[0-9]+\.[0-9]+-(.+)",
r"macosx-10.10-\1",
sysconfig.get_platform(),
)
def extension_modules():
if BUILD_WITH_CYTHON:

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/grpc_version.py.template`!!!
VERSION = '1.62.0.dev0'
VERSION = '1.63.0.dev0'

@ -31,23 +31,42 @@ class TestingChannel(grpc_testing.Channel):
def unsubscribe(self, callback):
raise NotImplementedError()
def _get_registered_call_handle(self, method: str) -> int:
pass
def unary_unary(
self, method, request_serializer=None, response_deserializer=None
self,
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
return _multi_callable.UnaryUnary(method, self._state)
def unary_stream(
self, method, request_serializer=None, response_deserializer=None
self,
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
return _multi_callable.UnaryStream(method, self._state)
def stream_unary(
self, method, request_serializer=None, response_deserializer=None
self,
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
return _multi_callable.StreamUnary(method, self._state)
def stream_stream(
self, method, request_serializer=None, response_deserializer=None
self,
method,
request_serializer=None,
response_deserializer=None,
_registered_method=False,
):
return _multi_callable.StreamStream(method, self._state)

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

Loading…
Cancel
Save