From 3c77a3887a06a8eb79ead685450e3b4127d345a0 Mon Sep 17 00:00:00 2001 From: zhoulin xie Date: Sun, 24 Feb 2019 15:16:49 +0800 Subject: [PATCH 001/120] Fix some misspells in doc Signed-off-by: zhoulin xie --- doc/interop-test-descriptions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 208af424298..141b5ccc293 100755 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -1135,7 +1135,7 @@ responses, it closes with OK. ### Echo Status [Echo Status]: #echo-status When the client sends a response_status in the request payload, the server closes -the stream with the status code and messsage contained within said response_status. +the stream with the status code and message contained within said response_status. The server will not process any further messages on the stream sent by the client. This can be used by clients to verify correct handling of different status codes and associated status messages end-to-end. @@ -1152,7 +1152,7 @@ key and the corresponding value back to the client as trailing metadata. [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us In StreamingOutputCall and FullDuplexCall, server delays sending a -StreamingOutputCallResponse by the ResponseParameters's `interval_us` for that +StreamingOutputCallResponse by the ResponseParameters' `interval_us` for that particular response, relative to the last response sent. That is, `interval_us` acts like a sleep *before* sending the response and accumulates from one response to the next. From 0273879aed4ef61f87cf65d537cfdfdc11db40b7 Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Fri, 14 Jun 2019 10:43:09 -0700 Subject: [PATCH 002/120] Fix typo --- src/proto/grpc/channelz/channelz.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto/grpc/channelz/channelz.proto b/src/proto/grpc/channelz/channelz.proto index 20de23f7fa3..f0ebda07213 100644 --- a/src/proto/grpc/channelz/channelz.proto +++ b/src/proto/grpc/channelz/channelz.proto @@ -35,7 +35,7 @@ option java_outer_classname = "ChannelzProto"; // Channel is a logical grouping of channels, subchannels, and sockets. message Channel { - // The identifier for this channel. This should bet set. + // The identifier for this channel. This should be set. ChannelRef ref = 1; // Data specific to this channel. ChannelData data = 2; From 9e65a8876290bdd782e197fe8b98c35530c90427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Sobala?= Date: Mon, 15 Jul 2019 16:11:35 +0200 Subject: [PATCH 003/120] Fixed "implicitly-declared operator=" error from gcc 9 --- include/grpcpp/impl/codegen/call_op_set.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h index 84d1407cbe2..814cf29f913 100644 --- a/include/grpcpp/impl/codegen/call_op_set.h +++ b/include/grpcpp/impl/codegen/call_op_set.h @@ -88,6 +88,9 @@ class WriteOptions { WriteOptions(const WriteOptions& other) : flags_(other.flags_), last_message_(other.last_message_) {} + /// Default assignment operator + WriteOptions& operator=(const WriteOptions& other) = default; + /// Clear all flags. inline void Clear() { flags_ = 0; } From 46dddacdf302188ae5f029b471697fcd20c9a1ac Mon Sep 17 00:00:00 2001 From: Christian Maurer Date: Thu, 18 Jul 2019 13:11:18 +0200 Subject: [PATCH 004/120] remove all unused-parameter warnings --- .../impl/codegen/async_generic_service.h | 2 +- .../grpcpp/impl/codegen/async_stream_impl.h | 6 +- .../impl/codegen/async_unary_call_impl.h | 8 +- include/grpcpp/impl/codegen/call_op_set.h | 35 ++--- include/grpcpp/impl/codegen/callback_common.h | 4 +- .../grpcpp/impl/codegen/channel_interface.h | 8 +- .../impl/codegen/client_callback_impl.h | 44 +++---- .../grpcpp/impl/codegen/interceptor_common.h | 4 +- .../grpcpp/impl/codegen/method_handler_impl.h | 8 +- .../grpcpp/impl/codegen/rpc_service_method.h | 4 +- .../impl/codegen/server_callback_impl.h | 25 ++-- .../grpcpp/impl/codegen/server_interface.h | 2 +- include/grpcpp/impl/codegen/time.h | 2 +- include/grpcpp/impl/server_builder_plugin.h | 4 +- include/grpcpp/security/credentials_impl.h | 4 +- include/grpcpp/server_impl.h | 8 +- .../grpcpp/support/channel_arguments_impl.h | 2 +- src/compiler/cpp_generator.cc | 85 +++++++------ test/cpp/codegen/compiler_test_golden | 120 +++++++++--------- 19 files changed, 191 insertions(+), 184 deletions(-) diff --git a/include/grpcpp/impl/codegen/async_generic_service.h b/include/grpcpp/impl/codegen/async_generic_service.h index 7c720ce3c23..c7dd5f7d24a 100644 --- a/include/grpcpp/impl/codegen/async_generic_service.h +++ b/include/grpcpp/impl/codegen/async_generic_service.h @@ -100,7 +100,7 @@ class ServerGenericBidiReactor /// Similar to ServerBidiReactor::OnStarted except for argument type. /// /// \param[in] context The context object associated with this RPC. - virtual void OnStarted(GenericServerContext* context) {} + virtual void OnStarted(GenericServerContext* /*context*/) {} private: void OnStarted(::grpc_impl::ServerContext* ctx) final { diff --git a/include/grpcpp/impl/codegen/async_stream_impl.h b/include/grpcpp/impl/codegen/async_stream_impl.h index 633a3d5dd00..4b94c470a52 100644 --- a/include/grpcpp/impl/codegen/async_stream_impl.h +++ b/include/grpcpp/impl/codegen/async_stream_impl.h @@ -197,7 +197,7 @@ template class ClientAsyncReader final : public ClientAsyncReaderInterface { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientAsyncReader)); } @@ -346,7 +346,7 @@ template class ClientAsyncWriter final : public ClientAsyncWriterInterface { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientAsyncWriter)); } @@ -514,7 +514,7 @@ class ClientAsyncReaderWriter final : public ClientAsyncReaderWriterInterface { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientAsyncReaderWriter)); } diff --git a/include/grpcpp/impl/codegen/async_unary_call_impl.h b/include/grpcpp/impl/codegen/async_unary_call_impl.h index ff8bf15602b..e885a077031 100644 --- a/include/grpcpp/impl/codegen/async_unary_call_impl.h +++ b/include/grpcpp/impl/codegen/async_unary_call_impl.h @@ -96,7 +96,7 @@ class ClientAsyncResponseReader final : public ClientAsyncResponseReaderInterface { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientAsyncResponseReader)); } @@ -178,7 +178,7 @@ class ClientAsyncResponseReader final // disable operator new static void* operator new(std::size_t size); - static void* operator new(std::size_t size, void* p) { return p; } + static void* operator new(std::size_t /*size*/, void* p) { return p; } ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata, ::grpc::internal::CallOpSendMessage, @@ -303,12 +303,12 @@ namespace std { template class default_delete<::grpc_impl::ClientAsyncResponseReader> { public: - void operator()(void* p) {} + void operator()(void* /*p*/) {} }; template class default_delete<::grpc_impl::ClientAsyncResponseReaderInterface> { public: - void operator()(void* p) {} + void operator()(void* /*p*/) {} }; } // namespace std diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h index 84d1407cbe2..c062963a13a 100644 --- a/include/grpcpp/impl/codegen/call_op_set.h +++ b/include/grpcpp/impl/codegen/call_op_set.h @@ -206,13 +206,14 @@ namespace internal { template class CallNoOp { protected: - void AddOp(grpc_op* ops, size_t* nops) {} - void FinishOp(bool* status) {} + void AddOp(grpc_op* /*ops*/, size_t* /*nops*/) {} + void FinishOp(bool* /*status*/) {} void SetInterceptionHookPoint( - InterceptorBatchMethodsImpl* interceptor_methods) {} + InterceptorBatchMethodsImpl* /*interceptor_methods*/) {} void SetFinishInterceptionHookPoint( - InterceptorBatchMethodsImpl* interceptor_methods) {} - void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) {} + InterceptorBatchMethodsImpl* /*interceptor_methods*/) {} + void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) { + } }; class CallOpSendInitialMetadata { @@ -252,7 +253,7 @@ class CallOpSendInitialMetadata { maybe_compression_level_.level; } } - void FinishOp(bool* status) { + void FinishOp(bool* /*status*/) { if (!send_ || hijacked_) return; g_core_codegen_interface->gpr_free(initial_metadata_); send_ = false; @@ -267,9 +268,9 @@ class CallOpSendInitialMetadata { } void SetFinishInterceptionHookPoint( - InterceptorBatchMethodsImpl* interceptor_methods) {} + InterceptorBatchMethodsImpl* /*interceptor_methods*/) {} - void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) { + void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) { hijacked_ = true; } @@ -363,7 +364,7 @@ class CallOpSendMessage { nullptr); } - void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) { + void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) { hijacked_ = true; } @@ -605,7 +606,7 @@ class CallOpClientSendClose { op->flags = 0; op->reserved = NULL; } - void FinishOp(bool* status) { send_ = false; } + void FinishOp(bool* /*status*/) { send_ = false; } void SetInterceptionHookPoint( InterceptorBatchMethodsImpl* interceptor_methods) { @@ -615,9 +616,9 @@ class CallOpClientSendClose { } void SetFinishInterceptionHookPoint( - InterceptorBatchMethodsImpl* interceptor_methods) {} + InterceptorBatchMethodsImpl* /*interceptor_methods*/) {} - void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) { + void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) { hijacked_ = true; } @@ -658,7 +659,7 @@ class CallOpServerSendStatus { op->reserved = NULL; } - void FinishOp(bool* status) { + void FinishOp(bool* /*status*/) { if (!send_status_available_ || hijacked_) return; g_core_codegen_interface->gpr_free(trailing_metadata_); send_status_available_ = false; @@ -675,9 +676,9 @@ class CallOpServerSendStatus { } void SetFinishInterceptionHookPoint( - InterceptorBatchMethodsImpl* interceptor_methods) {} + InterceptorBatchMethodsImpl* /*interceptor_methods*/) {} - void SetHijackingState(InterceptorBatchMethodsImpl* interceptor_methods) { + void SetHijackingState(InterceptorBatchMethodsImpl* /*interceptor_methods*/) { hijacked_ = true; } @@ -712,7 +713,7 @@ class CallOpRecvInitialMetadata { op->reserved = NULL; } - void FinishOp(bool* status) { + void FinishOp(bool* /*status*/) { if (metadata_map_ == nullptr || hijacked_) return; } @@ -766,7 +767,7 @@ class CallOpClientRecvStatus { op->reserved = NULL; } - void FinishOp(bool* status) { + void FinishOp(bool* /*status*/) { if (recv_status_ == nullptr || hijacked_) return; grpc::string binary_error_details = metadata_map_->GetBinaryErrorDetails(); *recv_status_ = diff --git a/include/grpcpp/impl/codegen/callback_common.h b/include/grpcpp/impl/codegen/callback_common.h index 6170170b978..5adf4596c85 100644 --- a/include/grpcpp/impl/codegen/callback_common.h +++ b/include/grpcpp/impl/codegen/callback_common.h @@ -69,7 +69,7 @@ class CallbackWithStatusTag : public grpc_experimental_completion_queue_functor { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(CallbackWithStatusTag)); } @@ -133,7 +133,7 @@ class CallbackWithSuccessTag : public grpc_experimental_completion_queue_functor { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(CallbackWithSuccessTag)); } diff --git a/include/grpcpp/impl/codegen/channel_interface.h b/include/grpcpp/impl/codegen/channel_interface.h index dd2fe8d687a..06d96abeca4 100644 --- a/include/grpcpp/impl/codegen/channel_interface.h +++ b/include/grpcpp/impl/codegen/channel_interface.h @@ -149,10 +149,10 @@ class ChannelInterface { // Returns an empty Call object (rather than being pure) since this is a new // method and adding a new pure method to an interface would be a breaking // change (even though this is private and non-API) - virtual internal::Call CreateCallInternal(const internal::RpcMethod& method, - ::grpc_impl::ClientContext* context, - ::grpc_impl::CompletionQueue* cq, - size_t interceptor_pos) { + virtual internal::Call CreateCallInternal( + const internal::RpcMethod& /*method*/, + ::grpc_impl::ClientContext* /*context*/, + ::grpc_impl::CompletionQueue* /*cq*/, size_t /*interceptor_pos*/) { return internal::Call(); } diff --git a/include/grpcpp/impl/codegen/client_callback_impl.h b/include/grpcpp/impl/codegen/client_callback_impl.h index 81847bc9e04..37746ef5ce4 100644 --- a/include/grpcpp/impl/codegen/client_callback_impl.h +++ b/include/grpcpp/impl/codegen/client_callback_impl.h @@ -272,7 +272,7 @@ class ClientBidiReactor { /// have completed and provides the RPC status outcome. /// /// \param[in] s The status outcome of this RPC - virtual void OnDone(const ::grpc::Status& s) {} + virtual void OnDone(const ::grpc::Status& /*s*/) {} /// Notifies the application that a read of initial metadata from the /// server is done. If the application chooses not to implement this method, @@ -281,19 +281,19 @@ class ClientBidiReactor { /// /// \param[in] ok Was the initial metadata read successfully? If false, no /// further read-side operation will succeed. - virtual void OnReadInitialMetadataDone(bool ok) {} + virtual void OnReadInitialMetadataDone(bool /*ok*/) {} /// Notifies the application that a StartRead operation completed. /// /// \param[in] ok Was it successful? If false, no further read-side operation /// will succeed. - virtual void OnReadDone(bool ok) {} + virtual void OnReadDone(bool /*ok*/) {} /// Notifies the application that a StartWrite operation completed. /// /// \param[in] ok Was it successful? If false, no further write-side operation /// will succeed. - virtual void OnWriteDone(bool ok) {} + virtual void OnWriteDone(bool /*ok*/) {} /// Notifies the application that a StartWritesDone operation completed. Note /// that this is only used on explicit StartWritesDone operations and not for @@ -301,7 +301,7 @@ class ClientBidiReactor { /// /// \param[in] ok Was it successful? If false, the application will later see /// the failure reflected as a bad status in OnDone. - virtual void OnWritesDoneDone(bool ok) {} + virtual void OnWritesDoneDone(bool /*ok*/) {} private: friend class ClientCallbackReaderWriter; @@ -325,9 +325,9 @@ class ClientReadReactor { void AddMultipleHolds(int holds) { reader_->AddHold(holds); } void RemoveHold() { reader_->RemoveHold(); } - virtual void OnDone(const ::grpc::Status& s) {} - virtual void OnReadInitialMetadataDone(bool ok) {} - virtual void OnReadDone(bool ok) {} + virtual void OnDone(const ::grpc::Status& /*s*/) {} + virtual void OnReadInitialMetadataDone(bool /*ok*/) {} + virtual void OnReadDone(bool /*ok*/) {} private: friend class ClientCallbackReader; @@ -358,10 +358,10 @@ class ClientWriteReactor { void AddMultipleHolds(int holds) { writer_->AddHold(holds); } void RemoveHold() { writer_->RemoveHold(); } - virtual void OnDone(const ::grpc::Status& s) {} - virtual void OnReadInitialMetadataDone(bool ok) {} - virtual void OnWriteDone(bool ok) {} - virtual void OnWritesDoneDone(bool ok) {} + virtual void OnDone(const ::grpc::Status& /*s*/) {} + virtual void OnReadInitialMetadataDone(bool /*ok*/) {} + virtual void OnWriteDone(bool /*ok*/) {} + virtual void OnWritesDoneDone(bool /*ok*/) {} private: friend class ClientCallbackWriter; @@ -385,8 +385,8 @@ class ClientUnaryReactor { virtual ~ClientUnaryReactor() {} void StartCall() { call_->StartCall(); } - virtual void OnDone(const ::grpc::Status& s) {} - virtual void OnReadInitialMetadataDone(bool ok) {} + virtual void OnDone(const ::grpc::Status& /*s*/) {} + virtual void OnReadInitialMetadataDone(bool /*ok*/) {} private: friend class ClientCallbackUnary; @@ -416,7 +416,7 @@ class ClientCallbackReaderWriterImpl : public experimental::ClientCallbackReaderWriter { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientCallbackReaderWriterImpl)); } @@ -490,7 +490,7 @@ class ClientCallbackReaderWriterImpl call_.PerformOps(&writes_done_ops_); } - finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); }, + finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); }, &finish_ops_); finish_ops_.ClientRecvStatus(context_, &finish_status_); finish_ops_.set_core_cq_tag(&finish_tag_); @@ -628,7 +628,7 @@ class ClientCallbackReaderImpl : public experimental::ClientCallbackReader { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientCallbackReaderImpl)); } @@ -682,7 +682,7 @@ class ClientCallbackReaderImpl call_.PerformOps(&read_ops_); } - finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); }, + finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); }, &finish_ops_); finish_ops_.ClientRecvStatus(context_, &finish_status_); finish_ops_.set_core_cq_tag(&finish_tag_); @@ -768,7 +768,7 @@ class ClientCallbackWriterImpl : public experimental::ClientCallbackWriter { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientCallbackWriterImpl)); } @@ -830,7 +830,7 @@ class ClientCallbackWriterImpl call_.PerformOps(&writes_done_ops_); } - finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); }, + finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); }, &finish_ops_); finish_ops_.ClientRecvStatus(context_, &finish_status_); finish_ops_.set_core_cq_tag(&finish_tag_); @@ -956,7 +956,7 @@ class ClientCallbackWriterFactory { class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary { public: // always allocated against a call arena, no memory free required - static void operator delete(void* ptr, std::size_t size) { + static void operator delete(void* /*ptr*/, std::size_t size) { assert(size == sizeof(ClientCallbackUnaryImpl)); } @@ -985,7 +985,7 @@ class ClientCallbackUnaryImpl final : public experimental::ClientCallbackUnary { start_ops_.set_core_cq_tag(&start_tag_); call_.PerformOps(&start_ops_); - finish_tag_.Set(call_.call(), [this](bool ok) { MaybeFinish(); }, + finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); }, &finish_ops_); finish_ops_.ClientRecvStatus(context_, &finish_status_); finish_ops_.set_core_cq_tag(&finish_tag_); diff --git a/include/grpcpp/impl/codegen/interceptor_common.h b/include/grpcpp/impl/codegen/interceptor_common.h index e7290aca838..01ffe19bc4a 100644 --- a/include/grpcpp/impl/codegen/interceptor_common.h +++ b/include/grpcpp/impl/codegen/interceptor_common.h @@ -465,7 +465,7 @@ class CancelInterceptorBatchMethods return nullptr; } - void ModifySendMessage(const void* message) override { + void ModifySendMessage(const void* /*message*/) override { GPR_CODEGEN_ASSERT( false && "It is illegal to call ModifySendMessage on a method which " @@ -486,7 +486,7 @@ class CancelInterceptorBatchMethods return Status(); } - void ModifySendStatus(const Status& status) override { + void ModifySendStatus(const Status& /*status*/) override { GPR_CODEGEN_ASSERT(false && "It is illegal to call ModifySendStatus on a method " "which has a Cancel notification"); diff --git a/include/grpcpp/impl/codegen/method_handler_impl.h b/include/grpcpp/impl/codegen/method_handler_impl.h index 1903f898ba8..f18a56249a5 100644 --- a/include/grpcpp/impl/codegen/method_handler_impl.h +++ b/include/grpcpp/impl/codegen/method_handler_impl.h @@ -88,7 +88,7 @@ class RpcMethodHandler : public MethodHandler { } void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status, - void** handler_data) final { + void** /*handler_data*/) final { ByteBuffer buf; buf.set_buffer(req); auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc( @@ -193,7 +193,7 @@ class ServerStreamingHandler : public MethodHandler { } void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status, - void** handler_data) final { + void** /*handler_data*/) final { ByteBuffer buf; buf.set_buffer(req); auto* request = new (g_core_codegen_interface->grpc_call_arena_alloc( @@ -328,8 +328,8 @@ class ErrorMethodHandler : public MethodHandler { param.call->cq()->Pluck(&ops); } - void* Deserialize(grpc_call* call, grpc_byte_buffer* req, Status* status, - void** handler_data) final { + void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req, + Status* /*status*/, void** /*handler_data*/) final { // We have to destroy any request payload if (req != nullptr) { g_core_codegen_interface->grpc_byte_buffer_destroy(req); diff --git a/include/grpcpp/impl/codegen/rpc_service_method.h b/include/grpcpp/impl/codegen/rpc_service_method.h index 0b16feed820..fb4c32659fc 100644 --- a/include/grpcpp/impl/codegen/rpc_service_method.h +++ b/include/grpcpp/impl/codegen/rpc_service_method.h @@ -76,8 +76,8 @@ class MethodHandler { a HandlerParameter and passed to RunHandler. It is illegal to access the pointer after calling RunHandler. Ownership of the deserialized request is retained by the handler. Returns nullptr if deserialization failed. */ - virtual void* Deserialize(grpc_call* call, grpc_byte_buffer* req, - Status* status, void** handler_data) { + virtual void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req, + Status* /*status*/, void** /*handler_data*/) { GPR_CODEGEN_ASSERT(req == nullptr); return nullptr; } diff --git a/include/grpcpp/impl/codegen/server_callback_impl.h b/include/grpcpp/impl/codegen/server_callback_impl.h index 08ecdfd6497..052548c2236 100644 --- a/include/grpcpp/impl/codegen/server_callback_impl.h +++ b/include/grpcpp/impl/codegen/server_callback_impl.h @@ -314,7 +314,7 @@ class ServerBidiReactor : public internal::ServerReactor { /// is a result of the client calling StartCall(). /// /// \param[in] context The context object now associated with this RPC - virtual void OnStarted(::grpc_impl::ServerContext* context) {} + virtual void OnStarted(::grpc_impl::ServerContext* /*context*/) {} /// Notifies the application that an explicit StartSendInitialMetadata /// operation completed. Not used when the sending of initial metadata @@ -322,20 +322,20 @@ class ServerBidiReactor : public internal::ServerReactor { /// /// \param[in] ok Was it successful? If false, no further write-side operation /// will succeed. - virtual void OnSendInitialMetadataDone(bool ok) {} + virtual void OnSendInitialMetadataDone(bool /*ok*/) {} /// Notifies the application that a StartRead operation completed. /// /// \param[in] ok Was it successful? If false, no further read-side operation /// will succeed. - virtual void OnReadDone(bool ok) {} + virtual void OnReadDone(bool /*ok*/) {} /// Notifies the application that a StartWrite (or StartWriteLast) operation /// completed. /// /// \param[in] ok Was it successful? If false, no further write-side operation /// will succeed. - virtual void OnWriteDone(bool ok) {} + virtual void OnWriteDone(bool /*ok*/) {} /// Notifies the application that all operations associated with this RPC /// have completed. This is an override (from the internal base class) but not @@ -376,11 +376,12 @@ class ServerReadReactor : public internal::ServerReactor { /// /// \param[in] context The context object now associated with this RPC /// \param[in] resp The response object to be used by this RPC - virtual void OnStarted(::grpc_impl::ServerContext* context, Response* resp) {} + virtual void OnStarted(::grpc_impl::ServerContext* /*context*/, + Response* /*resp*/) {} /// The following notifications are exactly like ServerBidiReactor. - virtual void OnSendInitialMetadataDone(bool ok) {} - virtual void OnReadDone(bool ok) {} + virtual void OnSendInitialMetadataDone(bool /*ok*/) {} + virtual void OnReadDone(bool /*ok*/) {} void OnDone() override {} void OnCancel() override {} @@ -423,12 +424,12 @@ class ServerWriteReactor : public internal::ServerReactor { /// /// \param[in] context The context object now associated with this RPC /// \param[in] req The request object sent by the client - virtual void OnStarted(::grpc_impl::ServerContext* context, - const Request* req) {} + virtual void OnStarted(::grpc_impl::ServerContext* /*context*/, + const Request* /*req*/) {} /// The following notifications are exactly like ServerBidiReactor. - virtual void OnSendInitialMetadataDone(bool ok) {} - virtual void OnWriteDone(bool ok) {} + virtual void OnSendInitialMetadataDone(bool /*ok*/) {} + virtual void OnWriteDone(bool /*ok*/) {} void OnDone() override {} void OnCancel() override {} @@ -849,7 +850,7 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler { } void* Deserialize(grpc_call* call, grpc_byte_buffer* req, - ::grpc::Status* status, void** handler_data) final { + ::grpc::Status* status, void** /*handler_data*/) final { ::grpc::ByteBuffer buf; buf.set_buffer(req); auto* request = diff --git a/include/grpcpp/impl/codegen/server_interface.h b/include/grpcpp/impl/codegen/server_interface.h index a375d3c0b4c..eb44b632ca0 100644 --- a/include/grpcpp/impl/codegen/server_interface.h +++ b/include/grpcpp/impl/codegen/server_interface.h @@ -130,7 +130,7 @@ class ServerInterface : public internal::CallHook { virtual ~experimental_registration_interface() {} /// May not be abstract since this is a post-1.0 API addition virtual void RegisterCallbackGenericService( - experimental::CallbackGenericService* service) {} + experimental::CallbackGenericService* /*service*/) {} }; /// NOTE: The function experimental_registration() is not stable public API. diff --git a/include/grpcpp/impl/codegen/time.h b/include/grpcpp/impl/codegen/time.h index c32f2544fa9..b3521722e9e 100644 --- a/include/grpcpp/impl/codegen/time.h +++ b/include/grpcpp/impl/codegen/time.h @@ -39,7 +39,7 @@ namespace grpc { template class TimePoint { public: - TimePoint(const T& time) { you_need_a_specialization_of_TimePoint(); } + TimePoint(const T& /*time*/) { you_need_a_specialization_of_TimePoint(); } gpr_timespec raw_time() { gpr_timespec t; return t; diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index 349995c8c1c..203e5465bc3 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -42,7 +42,7 @@ class ServerBuilderPlugin { /// UpdateServerBuilder will be called at an early stage in /// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have /// done their updates. - virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* builder) {} + virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* /*builder*/) {} /// InitServer will be called in ServerBuilder::BuildAndStart(), after the /// Server instance is created. @@ -57,7 +57,7 @@ class ServerBuilderPlugin { /// UpdateChannelArguments will be called in ServerBuilder::BuildAndStart(), /// before the Server instance is created. - virtual void UpdateChannelArguments(ChannelArguments* args) {} + virtual void UpdateChannelArguments(ChannelArguments* /*args*/) {} virtual bool has_sync_methods() const { return false; } virtual bool has_async_methods() const { return false; } diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index bd79f30ae12..05a74fef0e0 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -95,10 +95,10 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen { // This function should have been a pure virtual function, but it is // implemented as a virtual function so that it does not break API. virtual std::shared_ptr CreateChannelWithInterceptors( - const grpc::string& target, const ChannelArguments& args, + const grpc::string& /*target*/, const ChannelArguments& /*args*/, std::vector> - interceptor_creators) { + /*interceptor_creators*/) { return nullptr; } }; diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 52988b50288..390def53719 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -81,16 +81,16 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { public: virtual ~GlobalCallbacks() {} /// Called before server is created. - virtual void UpdateArguments(ChannelArguments* args) {} + virtual void UpdateArguments(ChannelArguments* /*args*/) {} /// Called before application callback for each synchronous server request virtual void PreSynchronousRequest(grpc_impl::ServerContext* context) = 0; /// Called after application callback for each synchronous server request virtual void PostSynchronousRequest(grpc_impl::ServerContext* context) = 0; /// Called before server is started. - virtual void PreServerStart(Server* server) {} + virtual void PreServerStart(Server* /*server*/) {} /// Called after a server port is added. - virtual void AddPort(Server* server, const grpc::string& addr, - grpc::ServerCredentials* creds, int port) {} + virtual void AddPort(Server* /*server*/, const grpc::string& /*addr*/, + grpc::ServerCredentials* /*creds*/, int /*port*/) {} }; /// Set the global callback object. Can only be called once per application. /// Does not take ownership of callbacks, and expects the pointed to object diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index ac3b6c4a7e2..ca3188a9e75 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -132,7 +132,7 @@ class ChannelArguments { /// Default pointer argument operations. struct PointerVtableMembers { static void* Copy(void* in) { return in; } - static void Destroy(void* in) {} + static void Destroy(void* /*in*/) {} static int Compare(void* a, void* b) { if (a < b) return -1; if (a > b) return 1; diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 044647d9a81..a253df8f1bb 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -794,8 +794,8 @@ void PrintHeaderServerAsyncMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -815,9 +815,9 @@ void PrintHeaderServerAsyncMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReader< $Request$>* reader, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReader< $Request$>* /*reader*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -837,8 +837,8 @@ void PrintHeaderServerAsyncMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter< $Response$>* writer) override " + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "::grpc::ServerWriter< $Response$>* /*writer*/) override " "{\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -860,8 +860,8 @@ void PrintHeaderServerAsyncMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter< $Response$, $Request$>* stream) " + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) " " override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -896,7 +896,8 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer, "class WithAsyncMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) {}\n"); + " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + "{}\n"); printer->Print(" public:\n"); printer->Indent(); printer->Print(*vars, @@ -923,16 +924,16 @@ void PrintHeaderServerCallbackMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); printer->Print( *vars, "virtual void $Method$(" - "::grpc::ServerContext* context, const $RealRequest$* request, " - "$RealResponse$* response, " + "::grpc::ServerContext* /*context*/, const $RealRequest$* /*request*/, " + "$RealResponse$* /*response*/, " "::grpc::experimental::ServerCallbackRpcController* " "controller) { controller->Finish(::grpc::Status(" "::grpc::StatusCode::UNIMPLEMENTED, \"\")); }\n"); @@ -941,9 +942,9 @@ void PrintHeaderServerCallbackMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReader< $Request$>* reader, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReader< $Request$>* /*reader*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -958,8 +959,8 @@ void PrintHeaderServerCallbackMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter< $Response$>* writer) override " + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "::grpc::ServerWriter< $Response$>* /*writer*/) override " "{\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -975,8 +976,8 @@ void PrintHeaderServerCallbackMethodsHelper( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter< $Response$, $Request$>* stream) " + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) " " override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -1006,7 +1007,8 @@ void PrintHeaderServerMethodCallback( "class ExperimentalWithCallbackMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) {}\n"); + " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + "{}\n"); printer->Print(" public:\n"); printer->Indent(); printer->Print(*vars, "ExperimentalWithCallbackMethod_$Method$() {\n"); @@ -1080,7 +1082,8 @@ void PrintHeaderServerMethodRawCallback( "BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) {}\n"); + " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + "{}\n"); printer->Print(" public:\n"); printer->Indent(); printer->Print(*vars, "ExperimentalWithRawCallbackMethod_$Method$() {\n"); @@ -1143,7 +1146,7 @@ void PrintHeaderServerMethodStreamedUnary( "public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); @@ -1164,8 +1167,8 @@ void PrintHeaderServerMethodStreamedUnary( *vars, "// disable regular version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -1194,7 +1197,7 @@ void PrintHeaderServerMethodSplitStreaming( "public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); @@ -1216,8 +1219,8 @@ void PrintHeaderServerMethodSplitStreaming( *vars, "// disable regular version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter< $Response$>* writer) override " + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "::grpc::ServerWriter< $Response$>* /*writer*/) override " "{\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -1245,7 +1248,8 @@ void PrintHeaderServerMethodGeneric( "class WithGenericMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) {}\n"); + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " + "{}\n"); printer->Print(" public:\n"); printer->Indent(); printer->Print(*vars, @@ -1261,8 +1265,8 @@ void PrintHeaderServerMethodGeneric( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -1271,9 +1275,9 @@ void PrintHeaderServerMethodGeneric( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReader< $Request$>* reader, " - "$Response$* response) override {\n" + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReader< $Request$>* /*reader*/, " + "$Response$* /*response*/) override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" "}\n"); @@ -1282,8 +1286,8 @@ void PrintHeaderServerMethodGeneric( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter< $Response$>* writer) override " + "::grpc::ServerContext* /*context*/, const $Request$* /*request*/, " + "::grpc::ServerWriter< $Response$>* /*writer*/) override " "{\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -1293,8 +1297,8 @@ void PrintHeaderServerMethodGeneric( *vars, "// disable synchronous version of this method\n" "::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter< $Response$, $Request$>* stream) " + "::grpc::ServerContext* /*context*/, " + "::grpc::ServerReaderWriter< $Response$, $Request$>* /*stream*/) " " override {\n" " abort();\n" " return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n" @@ -1318,7 +1322,8 @@ void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer, printer->Print(*vars, "class WithRawMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service *service) {}\n"); + " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + "{}\n"); printer->Print(" public:\n"); printer->Indent(); printer->Print(*vars, diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden index 34fb5bfb53f..56ee741e0b2 100644 --- a/test/cpp/codegen/compiler_test_golden +++ b/test/cpp/codegen/compiler_test_golden @@ -252,7 +252,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithAsyncMethod_MethodA1() { ::grpc::Service::MarkMethodAsync(0); @@ -261,7 +261,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -272,7 +272,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithAsyncMethod_MethodA2() { ::grpc::Service::MarkMethodAsync(1); @@ -281,7 +281,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA2(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::grpc::testing::Request>* /*reader*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -292,7 +292,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithAsyncMethod_MethodA3() { ::grpc::Service::MarkMethodAsync(2); @@ -301,7 +301,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -312,7 +312,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithAsyncMethod_MethodA4() { ::grpc::Service::MarkMethodAsync(3); @@ -321,7 +321,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override { + ::grpc::Status MethodA4(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -333,7 +333,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA1() { ::grpc::Service::experimental().MarkMethodCallback(0, @@ -355,16 +355,16 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA2() { ::grpc::Service::experimental().MarkMethodCallback(1, @@ -375,7 +375,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA2(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::grpc::testing::Request>* /*reader*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -386,7 +386,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA3() { ::grpc::Service::experimental().MarkMethodCallback(2, @@ -397,7 +397,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -408,7 +408,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA4() { ::grpc::Service::experimental().MarkMethodCallback(3, @@ -419,7 +419,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override { + ::grpc::Status MethodA4(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -431,7 +431,7 @@ class ServiceA final { template class WithGenericMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MethodA1() { ::grpc::Service::MarkMethodGeneric(0); @@ -440,7 +440,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -448,7 +448,7 @@ class ServiceA final { template class WithGenericMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MethodA2() { ::grpc::Service::MarkMethodGeneric(1); @@ -457,7 +457,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA2(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::grpc::testing::Request>* /*reader*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -465,7 +465,7 @@ class ServiceA final { template class WithGenericMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MethodA3() { ::grpc::Service::MarkMethodGeneric(2); @@ -474,7 +474,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -482,7 +482,7 @@ class ServiceA final { template class WithGenericMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MethodA4() { ::grpc::Service::MarkMethodGeneric(3); @@ -491,7 +491,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override { + ::grpc::Status MethodA4(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -499,7 +499,7 @@ class ServiceA final { template class WithRawMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithRawMethod_MethodA1() { ::grpc::Service::MarkMethodRaw(0); @@ -508,7 +508,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -519,7 +519,7 @@ class ServiceA final { template class WithRawMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithRawMethod_MethodA2() { ::grpc::Service::MarkMethodRaw(1); @@ -528,7 +528,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA2(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::grpc::testing::Request>* /*reader*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -539,7 +539,7 @@ class ServiceA final { template class WithRawMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithRawMethod_MethodA3() { ::grpc::Service::MarkMethodRaw(2); @@ -548,7 +548,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -559,7 +559,7 @@ class ServiceA final { template class WithRawMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithRawMethod_MethodA4() { ::grpc::Service::MarkMethodRaw(3); @@ -568,7 +568,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override { + ::grpc::Status MethodA4(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -579,7 +579,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA1() { ::grpc::Service::experimental().MarkMethodRawCallback(0, @@ -595,16 +595,16 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void MethodA1(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA2() { ::grpc::Service::experimental().MarkMethodRawCallback(1, @@ -615,7 +615,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA2(::grpc::ServerContext* /*context*/, ::grpc::ServerReader< ::grpc::testing::Request>* /*reader*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -626,7 +626,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA3() { ::grpc::Service::experimental().MarkMethodRawCallback(2, @@ -637,7 +637,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -648,7 +648,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA4() { ::grpc::Service::experimental().MarkMethodRawCallback(3, @@ -659,7 +659,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream) override { + ::grpc::Status MethodA4(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* /*stream*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -670,7 +670,7 @@ class ServiceA final { template class WithStreamedUnaryMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_MethodA1() { ::grpc::Service::MarkMethodStreamed(0, @@ -680,7 +680,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodA1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -691,7 +691,7 @@ class ServiceA final { template class WithSplitStreamingMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithSplitStreamingMethod_MethodA3() { ::grpc::Service::MarkMethodStreamed(2, @@ -701,7 +701,7 @@ class ServiceA final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override { + ::grpc::Status MethodA3(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::ServerWriter< ::grpc::testing::Response>* /*writer*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -790,7 +790,7 @@ class ServiceB final { template class WithAsyncMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithAsyncMethod_MethodB1() { ::grpc::Service::MarkMethodAsync(0); @@ -799,7 +799,7 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -811,7 +811,7 @@ class ServiceB final { template class ExperimentalWithCallbackMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithCallbackMethod_MethodB1() { ::grpc::Service::experimental().MarkMethodCallback(0, @@ -833,17 +833,17 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; typedef ExperimentalWithCallbackMethod_MethodB1 ExperimentalCallbackService; template class WithGenericMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_MethodB1() { ::grpc::Service::MarkMethodGeneric(0); @@ -852,7 +852,7 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -860,7 +860,7 @@ class ServiceB final { template class WithRawMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: WithRawMethod_MethodB1() { ::grpc::Service::MarkMethodRaw(0); @@ -869,7 +869,7 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -880,7 +880,7 @@ class ServiceB final { template class ExperimentalWithRawCallbackMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodB1() { ::grpc::Service::experimental().MarkMethodRawCallback(0, @@ -896,16 +896,16 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void MethodB1(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class WithStreamedUnaryMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_MethodB1() { ::grpc::Service::MarkMethodStreamed(0, @@ -915,7 +915,7 @@ class ServiceB final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override { + ::grpc::Status MethodB1(::grpc::ServerContext* /*context*/, const ::grpc::testing::Request* /*request*/, ::grpc::testing::Response* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } From 33b8b3f998a469dd38b6774399d717393c1a4841 Mon Sep 17 00:00:00 2001 From: Christian Maurer Date: Tue, 6 Aug 2019 12:48:37 +0200 Subject: [PATCH 005/120] Removed whitespace before asterisk --- src/compiler/cpp_generator.cc | 8 +++--- test/cpp/codegen/compiler_test_golden | 40 +++++++++++++-------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index a253df8f1bb..d4545ad49a8 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -896,7 +896,7 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer, "class WithAsyncMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); @@ -1007,7 +1007,7 @@ void PrintHeaderServerMethodCallback( "class ExperimentalWithCallbackMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); @@ -1082,7 +1082,7 @@ void PrintHeaderServerMethodRawCallback( "BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); @@ -1322,7 +1322,7 @@ void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer, printer->Print(*vars, "class WithRawMethod_$Method$ : public BaseClass {\n"); printer->Print( " private:\n" - " void BaseClassMustBeDerivedFromService(const Service * /*service*/) " + " void BaseClassMustBeDerivedFromService(const Service* /*service*/) " "{}\n"); printer->Print(" public:\n"); printer->Indent(); diff --git a/test/cpp/codegen/compiler_test_golden b/test/cpp/codegen/compiler_test_golden index 56ee741e0b2..4f97076e39a 100644 --- a/test/cpp/codegen/compiler_test_golden +++ b/test/cpp/codegen/compiler_test_golden @@ -252,7 +252,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MethodA1() { ::grpc::Service::MarkMethodAsync(0); @@ -272,7 +272,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MethodA2() { ::grpc::Service::MarkMethodAsync(1); @@ -292,7 +292,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MethodA3() { ::grpc::Service::MarkMethodAsync(2); @@ -312,7 +312,7 @@ class ServiceA final { template class WithAsyncMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MethodA4() { ::grpc::Service::MarkMethodAsync(3); @@ -333,7 +333,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA1() { ::grpc::Service::experimental().MarkMethodCallback(0, @@ -364,7 +364,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA2() { ::grpc::Service::experimental().MarkMethodCallback(1, @@ -386,7 +386,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA3() { ::grpc::Service::experimental().MarkMethodCallback(2, @@ -408,7 +408,7 @@ class ServiceA final { template class ExperimentalWithCallbackMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_MethodA4() { ::grpc::Service::experimental().MarkMethodCallback(3, @@ -499,7 +499,7 @@ class ServiceA final { template class WithRawMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MethodA1() { ::grpc::Service::MarkMethodRaw(0); @@ -519,7 +519,7 @@ class ServiceA final { template class WithRawMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MethodA2() { ::grpc::Service::MarkMethodRaw(1); @@ -539,7 +539,7 @@ class ServiceA final { template class WithRawMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MethodA3() { ::grpc::Service::MarkMethodRaw(2); @@ -559,7 +559,7 @@ class ServiceA final { template class WithRawMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MethodA4() { ::grpc::Service::MarkMethodRaw(3); @@ -579,7 +579,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA1() { ::grpc::Service::experimental().MarkMethodRawCallback(0, @@ -604,7 +604,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA2 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA2() { ::grpc::Service::experimental().MarkMethodRawCallback(1, @@ -626,7 +626,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA3 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA3() { ::grpc::Service::experimental().MarkMethodRawCallback(2, @@ -648,7 +648,7 @@ class ServiceA final { template class ExperimentalWithRawCallbackMethod_MethodA4 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodA4() { ::grpc::Service::experimental().MarkMethodRawCallback(3, @@ -790,7 +790,7 @@ class ServiceB final { template class WithAsyncMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_MethodB1() { ::grpc::Service::MarkMethodAsync(0); @@ -811,7 +811,7 @@ class ServiceB final { template class ExperimentalWithCallbackMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_MethodB1() { ::grpc::Service::experimental().MarkMethodCallback(0, @@ -860,7 +860,7 @@ class ServiceB final { template class WithRawMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_MethodB1() { ::grpc::Service::MarkMethodRaw(0); @@ -880,7 +880,7 @@ class ServiceB final { template class ExperimentalWithRawCallbackMethod_MethodB1 : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_MethodB1() { ::grpc::Service::experimental().MarkMethodRawCallback(0, From 988ca514b9cd87c7010bfafe329b9495603e9b7b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 29 Jul 2019 18:53:00 -0700 Subject: [PATCH 006/120] serialization to IBufferWriter attempt 1 --- .../Grpc.Core.Api/SerializationContext.cs | 18 +++++ .../Internal/DefaultSerializationContext.cs | 74 +++++++++++++++++-- .../Internal/NativeMethods.Generated.cs | 33 +++++++++ src/csharp/ext/grpc_csharp_ext.c | 61 +++++++++++++++ .../runtimes/grpc_csharp_ext_dummy_stubs.c | 12 +++ .../Grpc.Core/Internal/native_methods.include | 3 + 6 files changed, 196 insertions(+), 5 deletions(-) diff --git a/src/csharp/Grpc.Core.Api/SerializationContext.cs b/src/csharp/Grpc.Core.Api/SerializationContext.cs index 9aef2adbcd5..79107040411 100644 --- a/src/csharp/Grpc.Core.Api/SerializationContext.cs +++ b/src/csharp/Grpc.Core.Api/SerializationContext.cs @@ -17,6 +17,7 @@ #endregion using System; +using System.Buffers; namespace Grpc.Core { @@ -35,5 +36,22 @@ namespace Grpc.Core { throw new NotImplementedException(); } + + /// + /// Expose serializer as buffer writer + /// + public virtual IBufferWriter GetBufferWriter() + { + throw new NotImplementedException(); + } + + /// + /// Complete the payload written so far. + /// + public virtual void Complete() + { + throw new NotImplementedException(); + + } } } diff --git a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs index cceb194879e..9098850a52e 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs @@ -17,6 +17,8 @@ #endregion using Grpc.Core.Utils; +using System; +using System.Buffers; using System.Threading; namespace Grpc.Core.Internal @@ -27,7 +29,8 @@ namespace Grpc.Core.Internal new ThreadLocal(() => new DefaultSerializationContext(), false); bool isComplete; - byte[] payload; + //byte[] payload; + NativeBufferWriter bufferWriter; public DefaultSerializationContext() { @@ -38,18 +41,48 @@ namespace Grpc.Core.Internal { GrpcPreconditions.CheckState(!isComplete); this.isComplete = true; - this.payload = payload; + + GetBufferWriter(); + var destSpan = bufferWriter.GetSpan(payload.Length); + payload.AsSpan().CopyTo(destSpan); + bufferWriter.Advance(payload.Length); + bufferWriter.Complete(); + //this.payload = payload; + } + + /// + /// Expose serializer as buffer writer + /// + public override IBufferWriter GetBufferWriter() + { + if (bufferWriter == null) + { + // TODO: avoid allocation.. + bufferWriter = new NativeBufferWriter(); + } + return bufferWriter; + } + + /// + /// Complete the payload written so far. + /// + public override void Complete() + { + GrpcPreconditions.CheckState(!isComplete); + bufferWriter.Complete(); + this.isComplete = true; } - internal byte[] GetPayload() + internal SliceBufferSafeHandle GetPayload() { - return this.payload; + return bufferWriter.GetSliceBuffer(); } public void Reset() { this.isComplete = false; - this.payload = null; + //this.payload = null; + this.bufferWriter = null; } public static DefaultSerializationContext GetInitializedThreadLocal() @@ -58,5 +91,36 @@ namespace Grpc.Core.Internal instance.Reset(); return instance; } + + private class NativeBufferWriter : IBufferWriter + { + private SliceBufferSafeHandle sliceBuffer = SliceBufferSafeHandle.Create(); + + public void Advance(int count) + { + sliceBuffer.Advance(count); + } + + public Memory GetMemory(int sizeHint = 0) + { + // TODO: implement + throw new NotImplementedException(); + } + + public Span GetSpan(int sizeHint = 0) + { + return sliceBuffer.GetSpan(sizeHint); + } + + public void Complete() + { + sliceBuffer.Complete(); + } + + public SliceBufferSafeHandle GetSliceBuffer() + { + return sliceBuffer; + } + } } } diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs index ca3dfe97ce1..b23170376d4 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs @@ -122,6 +122,9 @@ namespace Grpc.Core.Internal public readonly Delegates.grpcsharp_auth_context_property_iterator_delegate grpcsharp_auth_context_property_iterator; public readonly Delegates.grpcsharp_auth_property_iterator_next_delegate grpcsharp_auth_property_iterator_next; public readonly Delegates.grpcsharp_auth_context_release_delegate grpcsharp_auth_context_release; + public readonly Delegates.grpcsharp_slice_buffer_create_delegate grpcsharp_slice_buffer_create; + public readonly Delegates.grpcsharp_slice_buffer_adjust_tail_space_delegate grpcsharp_slice_buffer_adjust_tail_space; + public readonly Delegates.grpcsharp_slice_buffer_destroy_delegate grpcsharp_slice_buffer_destroy; public readonly Delegates.gprsharp_now_delegate gprsharp_now; public readonly Delegates.gprsharp_inf_future_delegate gprsharp_inf_future; public readonly Delegates.gprsharp_inf_past_delegate gprsharp_inf_past; @@ -224,6 +227,9 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_property_iterator = GetMethodDelegate(library); this.grpcsharp_auth_property_iterator_next = GetMethodDelegate(library); this.grpcsharp_auth_context_release = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_create = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_adjust_tail_space = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_destroy = GetMethodDelegate(library); this.gprsharp_now = GetMethodDelegate(library); this.gprsharp_inf_future = GetMethodDelegate(library); this.gprsharp_inf_past = GetMethodDelegate(library); @@ -325,6 +331,9 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_property_iterator = DllImportsFromStaticLib.grpcsharp_auth_context_property_iterator; this.grpcsharp_auth_property_iterator_next = DllImportsFromStaticLib.grpcsharp_auth_property_iterator_next; this.grpcsharp_auth_context_release = DllImportsFromStaticLib.grpcsharp_auth_context_release; + this.grpcsharp_slice_buffer_create = DllImportsFromStaticLib.grpcsharp_slice_buffer_create; + this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromStaticLib.grpcsharp_slice_buffer_adjust_tail_space; + this.grpcsharp_slice_buffer_destroy = DllImportsFromStaticLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromStaticLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromStaticLib.gprsharp_inf_future; this.gprsharp_inf_past = DllImportsFromStaticLib.gprsharp_inf_past; @@ -426,6 +435,9 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_property_iterator = DllImportsFromSharedLib.grpcsharp_auth_context_property_iterator; this.grpcsharp_auth_property_iterator_next = DllImportsFromSharedLib.grpcsharp_auth_property_iterator_next; this.grpcsharp_auth_context_release = DllImportsFromSharedLib.grpcsharp_auth_context_release; + this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib.grpcsharp_slice_buffer_create; + this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib.grpcsharp_slice_buffer_adjust_tail_space; + this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromSharedLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromSharedLib.gprsharp_inf_future; this.gprsharp_inf_past = DllImportsFromSharedLib.gprsharp_inf_past; @@ -530,6 +542,9 @@ namespace Grpc.Core.Internal public delegate AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator_delegate(AuthContextSafeHandle authContext); public delegate IntPtr grpcsharp_auth_property_iterator_next_delegate(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator); // returns const auth_property* public delegate void grpcsharp_auth_context_release_delegate(IntPtr authContext); + public delegate SliceBufferSafeHandle grpcsharp_slice_buffer_create_delegate(); + public delegate IntPtr grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + public delegate void grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer); public delegate Timespec gprsharp_now_delegate(ClockType clockType); public delegate Timespec gprsharp_inf_future_delegate(ClockType clockType); public delegate Timespec gprsharp_inf_past_delegate(ClockType clockType); @@ -812,6 +827,15 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern void grpcsharp_auth_context_release(IntPtr authContext); + [DllImport(ImportName)] + public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); + + [DllImport(ImportName)] + public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); + [DllImport(ImportName)] public static extern Timespec gprsharp_now(ClockType clockType); @@ -1111,6 +1135,15 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern void grpcsharp_auth_context_release(IntPtr authContext); + [DllImport(ImportName)] + public static extern SliceBufferSafeHandle grpcsharp_slice_buffer_create(); + + [DllImport(ImportName)] + public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); + [DllImport(ImportName)] public static extern Timespec gprsharp_now(ClockType clockType); diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 02e219ead87..e271494c942 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -1182,6 +1182,67 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_redirect_log(grpcsharp_log_func func) { typedef void(GPR_CALLTYPE* test_callback_funcptr)(int32_t success); +/* Slice buffer functionality */ +GPR_EXPORT grpc_slice_buffer* GPR_CALLTYPE +grpcsharp_slice_buffer_create() { + grpc_slice_buffer* slice_buffer = (grpc_slice_buffer*)gpr_malloc(sizeof(grpc_slice_buffer)); + grpc_slice_buffer_init(slice_buffer); + return slice_buffer; +} + +GPR_EXPORT void GPR_CALLTYPE +grpcsharp_slice_buffer_destroy(grpc_slice_buffer* buffer) { + grpc_slice_buffer_destroy(buffer); + gpr_free(buffer); +} + +GPR_EXPORT grpc_byte_buffer* GPR_CALLTYPE +grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { + grpc_byte_buffer* bb = + (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); + memset(bb, 0, sizeof(grpc_byte_buffer)); + bb->type = GRPC_BB_RAW; + bb->data.raw.compression = GRPC_COMPRESS_NONE; + bb->data.raw.slice_buffer = *slice_buffer; + // TODO: just use move slice_buffer... + + // we transferred the ownership of members from the slice buffer to the + // the internals of byte buffer, so we just overwrite the original slice buffer with + // default values. + grpc_slice_buffer_init(slice_buffer); // TODO: need to reset available_tail_space after this.. + return bb; +} + +GPR_EXPORT void* GPR_CALLTYPE +grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, + size_t requested_tail_space) { + + // TODO: what if available_tail_space == requested_tail_space == 0 + + if (available_tail_space >= requested_tail_space) + { + // TODO: should this be allowed at all? + grpc_slice_buffer garbage; + grpc_slice_buffer_trim_end(buffer, available_tail_space - requested_tail_space, &garbage); + grpc_slice_buffer_reset_and_unref(&garbage); + } + else + { + if (available_tail_space > 0) + { + grpc_slice_buffer garbage; + grpc_slice_buffer_trim_end(buffer, available_tail_space, &garbage); + grpc_slice_buffer_reset_and_unref(&garbage); + } + + grpc_slice new_slice = grpc_slice_malloc(requested_tail_space); + grpc_slice_buffer_add(buffer, new_slice); + } + + grpc_slice* last_slice = &(buffer->slices[buffer->count - 1]); + return GRPC_SLICE_END_PTR(*last_slice) - requested_tail_space; +} + /* Version info */ GPR_EXPORT const char* GPR_CALLTYPE grpcsharp_version_string() { return grpc_version_string(); diff --git a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c index 8ff26e4ca4d..bc312bc6daf 100644 --- a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c +++ b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c @@ -374,6 +374,18 @@ void grpcsharp_auth_context_release() { fprintf(stderr, "Should never reach here"); abort(); } +void grpcsharp_slice_buffer_create() { + fprintf(stderr, "Should never reach here"); + abort(); +} +void grpcsharp_slice_buffer_adjust_tail_space() { + fprintf(stderr, "Should never reach here"); + abort(); +} +void grpcsharp_slice_buffer_destroy() { + fprintf(stderr, "Should never reach here"); + abort(); +} void gprsharp_now() { fprintf(stderr, "Should never reach here"); abort(); diff --git a/templates/src/csharp/Grpc.Core/Internal/native_methods.include b/templates/src/csharp/Grpc.Core/Internal/native_methods.include index ed7c93a7479..d8f94744723 100644 --- a/templates/src/csharp/Grpc.Core/Internal/native_methods.include +++ b/templates/src/csharp/Grpc.Core/Internal/native_methods.include @@ -88,6 +88,9 @@ native_method_signatures = [ 'AuthContextSafeHandle.NativeAuthPropertyIterator grpcsharp_auth_context_property_iterator(AuthContextSafeHandle authContext)', 'IntPtr grpcsharp_auth_property_iterator_next(ref AuthContextSafeHandle.NativeAuthPropertyIterator iterator) // returns const auth_property*', 'void grpcsharp_auth_context_release(IntPtr authContext)', + 'SliceBufferSafeHandle grpcsharp_slice_buffer_create()', + 'IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)', + 'void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)', 'Timespec gprsharp_now(ClockType clockType)', 'Timespec gprsharp_inf_future(ClockType clockType)', 'Timespec gprsharp_inf_past(ClockType clockType)', From 36e46234f72f0de72602931a546b8f8495072ddd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 29 Jul 2019 19:57:08 -0700 Subject: [PATCH 007/120] IBufferWriter: tests now passing with a hack --- .../Grpc.Core/Internal/AsyncCallBase.cs | 2 +- .../Internal/NativeMethods.Generated.cs | 22 +++++++++++++++++++ src/csharp/ext/grpc_csharp_ext.c | 17 ++++++++++++++ .../runtimes/grpc_csharp_ext_dummy_stubs.c | 8 +++++++ .../Grpc.Core/Internal/native_methods.include | 2 ++ 5 files changed, 50 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index ac1f9066516..23cb5ccffc7 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -220,7 +220,7 @@ namespace Grpc.Core.Internal { context = DefaultSerializationContext.GetInitializedThreadLocal(); serializer(msg, context); - return context.GetPayload(); + return context.GetPayload().GetPayload(); } finally { diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs index b23170376d4..dcb0f84649c 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs @@ -124,6 +124,8 @@ namespace Grpc.Core.Internal public readonly Delegates.grpcsharp_auth_context_release_delegate grpcsharp_auth_context_release; public readonly Delegates.grpcsharp_slice_buffer_create_delegate grpcsharp_slice_buffer_create; public readonly Delegates.grpcsharp_slice_buffer_adjust_tail_space_delegate grpcsharp_slice_buffer_adjust_tail_space; + public readonly Delegates.grpcsharp_slice_buffer_slice_count_delegate grpcsharp_slice_buffer_slice_count; + public readonly Delegates.grpcsharp_slice_buffer_slice_peek_delegate grpcsharp_slice_buffer_slice_peek; public readonly Delegates.grpcsharp_slice_buffer_destroy_delegate grpcsharp_slice_buffer_destroy; public readonly Delegates.gprsharp_now_delegate gprsharp_now; public readonly Delegates.gprsharp_inf_future_delegate gprsharp_inf_future; @@ -229,6 +231,8 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_release = GetMethodDelegate(library); this.grpcsharp_slice_buffer_create = GetMethodDelegate(library); this.grpcsharp_slice_buffer_adjust_tail_space = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_slice_count = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_slice_peek = GetMethodDelegate(library); this.grpcsharp_slice_buffer_destroy = GetMethodDelegate(library); this.gprsharp_now = GetMethodDelegate(library); this.gprsharp_inf_future = GetMethodDelegate(library); @@ -333,6 +337,8 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_release = DllImportsFromStaticLib.grpcsharp_auth_context_release; this.grpcsharp_slice_buffer_create = DllImportsFromStaticLib.grpcsharp_slice_buffer_create; this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromStaticLib.grpcsharp_slice_buffer_adjust_tail_space; + this.grpcsharp_slice_buffer_slice_count = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_count; + this.grpcsharp_slice_buffer_slice_peek = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_peek; this.grpcsharp_slice_buffer_destroy = DllImportsFromStaticLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromStaticLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromStaticLib.gprsharp_inf_future; @@ -437,6 +443,8 @@ namespace Grpc.Core.Internal this.grpcsharp_auth_context_release = DllImportsFromSharedLib.grpcsharp_auth_context_release; this.grpcsharp_slice_buffer_create = DllImportsFromSharedLib.grpcsharp_slice_buffer_create; this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib.grpcsharp_slice_buffer_adjust_tail_space; + this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_count; + this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_peek; this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromSharedLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromSharedLib.gprsharp_inf_future; @@ -544,6 +552,8 @@ namespace Grpc.Core.Internal public delegate void grpcsharp_auth_context_release_delegate(IntPtr authContext); public delegate SliceBufferSafeHandle grpcsharp_slice_buffer_create_delegate(); public delegate IntPtr grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + public delegate UIntPtr grpcsharp_slice_buffer_slice_count_delegate(SliceBufferSafeHandle sliceBuffer); + public delegate void grpcsharp_slice_buffer_slice_peek_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); public delegate void grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer); public delegate Timespec gprsharp_now_delegate(ClockType clockType); public delegate Timespec gprsharp_inf_future_delegate(ClockType clockType); @@ -833,6 +843,12 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + [DllImport(ImportName)] + public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); + + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); + [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); @@ -1141,6 +1157,12 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); + [DllImport(ImportName)] + public static extern UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer); + + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); + [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index e271494c942..1f115b1caf2 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -1196,6 +1196,19 @@ grpcsharp_slice_buffer_destroy(grpc_slice_buffer* buffer) { gpr_free(buffer); } +GPR_EXPORT size_t GPR_CALLTYPE +grpcsharp_slice_buffer_slice_count(grpc_slice_buffer* buffer) { + return buffer->count; +} + +GPR_EXPORT void GPR_CALLTYPE +grpcsharp_slice_buffer_slice_peek(grpc_slice_buffer* buffer, size_t index, size_t* slice_len, uint8_t** slice_data_ptr) { + GPR_ASSERT(buffer->count > index); + grpc_slice* slice_ptr = &buffer->slices[index]; + *slice_len = GRPC_SLICE_LENGTH(*slice_ptr); + *slice_data_ptr = GRPC_SLICE_START_PTR(*slice_ptr); +} + GPR_EXPORT grpc_byte_buffer* GPR_CALLTYPE grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { grpc_byte_buffer* bb = @@ -1217,6 +1230,10 @@ GPR_EXPORT void* GPR_CALLTYPE grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, size_t requested_tail_space) { + if (available_tail_space == 0 && requested_tail_space == 0) + { + return NULL; + } // TODO: what if available_tail_space == requested_tail_space == 0 if (available_tail_space >= requested_tail_space) diff --git a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c index bc312bc6daf..9007d7f3ad0 100644 --- a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c +++ b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c @@ -382,6 +382,14 @@ void grpcsharp_slice_buffer_adjust_tail_space() { fprintf(stderr, "Should never reach here"); abort(); } +void grpcsharp_slice_buffer_slice_count() { + fprintf(stderr, "Should never reach here"); + abort(); +} +void grpcsharp_slice_buffer_slice_peek() { + fprintf(stderr, "Should never reach here"); + abort(); +} void grpcsharp_slice_buffer_destroy() { fprintf(stderr, "Should never reach here"); abort(); diff --git a/templates/src/csharp/Grpc.Core/Internal/native_methods.include b/templates/src/csharp/Grpc.Core/Internal/native_methods.include index d8f94744723..055af4a7a27 100644 --- a/templates/src/csharp/Grpc.Core/Internal/native_methods.include +++ b/templates/src/csharp/Grpc.Core/Internal/native_methods.include @@ -90,6 +90,8 @@ native_method_signatures = [ 'void grpcsharp_auth_context_release(IntPtr authContext)', 'SliceBufferSafeHandle grpcsharp_slice_buffer_create()', 'IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)', + 'UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)', + 'void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)', 'void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)', 'Timespec gprsharp_now(ClockType clockType)', 'Timespec gprsharp_inf_future(ClockType clockType)', From 1154c2d17ea07d0b95dd6f4ac8776c4f3841570e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 29 Jul 2019 19:58:36 -0700 Subject: [PATCH 008/120] fixup: add SliceBufferSafeHandle --- .../Internal/SliceBufferSafeHandle.cs | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs new file mode 100644 index 00000000000..ef9e7fbce37 --- /dev/null +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -0,0 +1,122 @@ +#region Copyright notice and license + +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using System; +using System.Runtime.InteropServices; +using Grpc.Core; +using Grpc.Core.Logging; +using Grpc.Core.Utils; + +namespace Grpc.Core.Internal +{ + /// + /// grpc_slice_buffer + /// + internal class SliceBufferSafeHandle : SafeHandleZeroIsInvalid + { + static readonly NativeMethods Native = NativeMethods.Get(); + static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + + private IntPtr tailSpacePtr; + private UIntPtr tailSpaceLen; + + + private SliceBufferSafeHandle() + { + } + + public static SliceBufferSafeHandle Create() + { + return Native.grpcsharp_slice_buffer_create(); + } + + public IntPtr Handle + { + get + { + return handle; + } + } + + public void Advance(int count) + { + GrpcPreconditions.CheckArgument(count >= 0); + GrpcPreconditions.CheckArgument(tailSpacePtr != IntPtr.Zero || count == 0); + GrpcPreconditions.CheckArgument(tailSpaceLen.ToUInt64() >= (ulong)count); + tailSpaceLen = new UIntPtr(tailSpaceLen.ToUInt64() - (ulong)count); + tailSpacePtr += count; + } + + public unsafe Span GetSpan(int sizeHint) + { + GrpcPreconditions.CheckArgument(sizeHint >= 0); + if (tailSpaceLen.ToUInt64() < (ulong) sizeHint) + { + // TODO: should we ignore the hint sometimes when + // available tail space is close enough to the sizeHint? + AdjustTailSpace(sizeHint); + } + return new Span(tailSpacePtr.ToPointer(), (int) tailSpaceLen.ToUInt64()); + } + + public void Complete() + { + AdjustTailSpace(0); + } + + public byte[] GetPayload() + { + ulong sliceCount = Native.grpcsharp_slice_buffer_slice_count(this).ToUInt64(); + + Slice[] slices = new Slice[sliceCount]; + int totalLen = 0; + for (int i = 0; i < (int) sliceCount; i++) + { + Native.grpcsharp_slice_buffer_slice_peek(this, new UIntPtr((ulong) i), out UIntPtr sliceLen, out IntPtr dataPtr); + slices[i] = new Slice(dataPtr, (int) sliceLen.ToUInt64()); + totalLen += (int) sliceLen.ToUInt64(); + + } + var result = new byte[totalLen]; + int offset = 0; + for (int i = 0; i < (int) sliceCount; i++) + { + slices[i].ToSpanUnsafe().CopyTo(result.AsSpan(offset, slices[i].Length)); + offset += slices[i].Length; + } + GrpcPreconditions.CheckState(totalLen == offset); + return result; + } + // TODO: converting contents to byte[] + + // Gets data of server_rpc_new completion. + private void AdjustTailSpace(int requestedSize) + { + GrpcPreconditions.CheckArgument(requestedSize >= 0); + var requestedTailSpaceLen = new UIntPtr((ulong) requestedSize); + tailSpacePtr = Native.grpcsharp_slice_buffer_adjust_tail_space(this, tailSpaceLen, requestedTailSpaceLen); + tailSpaceLen = requestedTailSpaceLen; + } + + protected override bool ReleaseHandle() + { + Native.grpcsharp_slice_buffer_destroy(handle); + return true; + } + } +} From b9183153211d109ba57598812ee8d90a12236443 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 30 Jul 2019 16:16:56 -0700 Subject: [PATCH 009/120] a bit of refactor --- src/csharp/Grpc.Core/Internal/AsyncCallBase.cs | 2 +- src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 23cb5ccffc7..b26b7921955 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -220,7 +220,7 @@ namespace Grpc.Core.Internal { context = DefaultSerializationContext.GetInitializedThreadLocal(); serializer(msg, context); - return context.GetPayload().GetPayload(); + return context.GetPayload().ToByteArray(); } finally { diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index ef9e7fbce37..5b540c69d44 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -79,7 +79,9 @@ namespace Grpc.Core.Internal AdjustTailSpace(0); } - public byte[] GetPayload() + // copies the content of the slice buffer to a newly allocated byte array + // due to its overhead, this method should only be used for testing. + public byte[] ToByteArray() { ulong sliceCount = Native.grpcsharp_slice_buffer_slice_count(this).ToUInt64(); @@ -102,7 +104,6 @@ namespace Grpc.Core.Internal GrpcPreconditions.CheckState(totalLen == offset); return result; } - // TODO: converting contents to byte[] // Gets data of server_rpc_new completion. private void AdjustTailSpace(int requestedSize) @@ -112,7 +113,6 @@ namespace Grpc.Core.Internal tailSpacePtr = Native.grpcsharp_slice_buffer_adjust_tail_space(this, tailSpaceLen, requestedTailSpaceLen); tailSpaceLen = requestedTailSpaceLen; } - protected override bool ReleaseHandle() { Native.grpcsharp_slice_buffer_destroy(handle); From 31eff3e679f12f3db28c80527f7f376c1beb8efd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 30 Jul 2019 17:16:49 -0700 Subject: [PATCH 010/120] stuff builds but tests crash --- .../Internal/FakeNativeCall.cs | 10 +-- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 6 +- .../Grpc.Core/Internal/AsyncCallBase.cs | 6 +- .../Grpc.Core/Internal/AsyncCallServer.cs | 2 +- .../Grpc.Core/Internal/CallSafeHandle.cs | 26 +++---- src/csharp/Grpc.Core/Internal/INativeCall.cs | 10 +-- .../Internal/NativeMethods.Generated.cs | 30 ++++----- .../SendMessageBenchmark.cs | 5 +- .../UnaryCallOverheadBenchmark.cs | 4 +- src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs | 2 +- src/csharp/ext/grpc_csharp_ext.c | 67 ++++++++++--------- .../Grpc.Core/Internal/native_methods.include | 10 +-- 12 files changed, 91 insertions(+), 87 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs index ef67918dabb..c16b55ca941 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs @@ -101,13 +101,13 @@ namespace Grpc.Core.Internal.Tests return "PEER"; } - public void StartUnary(IUnaryResponseClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartUnary(IUnaryResponseClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { StartCallMaybeFail(); UnaryResponseClientCallback = callback; } - public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartUnary(BatchContextSafeHandle ctx, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { StartCallMaybeFail(); throw new NotImplementedException(); @@ -119,7 +119,7 @@ namespace Grpc.Core.Internal.Tests UnaryResponseClientCallback = callback; } - public void StartServerStreaming(IReceivedStatusOnClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartServerStreaming(IReceivedStatusOnClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { StartCallMaybeFail(); ReceivedStatusOnClientCallback = callback; @@ -146,7 +146,7 @@ namespace Grpc.Core.Internal.Tests SendCompletionCallback = callback; } - public void StartSendMessage(ISendCompletionCallback callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) + public void StartSendMessage(ISendCompletionCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) { SendCompletionCallback = callback; } @@ -157,7 +157,7 @@ namespace Grpc.Core.Internal.Tests } public void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, - byte[] optionalPayload, WriteFlags writeFlags) + SliceBufferSafeHandle payload, WriteFlags writeFlags) { SendStatusFromServerCallback = callback; } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index ce3508d398e..aefa58a0cee 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -95,7 +95,7 @@ namespace Grpc.Core.Internal readingDone = true; } - byte[] payload = UnsafeSerialize(msg); + var payload = UnsafeSerialize(msg); using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { @@ -160,7 +160,7 @@ namespace Grpc.Core.Internal halfcloseRequested = true; readingDone = true; - byte[] payload = UnsafeSerialize(msg); + var payload = UnsafeSerialize(msg); unaryResponseTcs = new TaskCompletionSource(); using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) @@ -235,7 +235,7 @@ namespace Grpc.Core.Internal halfcloseRequested = true; - byte[] payload = UnsafeSerialize(msg); + var payload = UnsafeSerialize(msg); streamingResponseCallFinishedTcs = new TaskCompletionSource(); using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index b26b7921955..07f9ecf23e9 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -115,7 +115,7 @@ namespace Grpc.Core.Internal /// protected Task SendMessageInternalAsync(TWrite msg, WriteFlags writeFlags) { - byte[] payload = UnsafeSerialize(msg); + var payload = UnsafeSerialize(msg); lock (myLock) { @@ -213,14 +213,14 @@ namespace Grpc.Core.Internal /// protected abstract Task CheckSendAllowedOrEarlyResult(); - protected byte[] UnsafeSerialize(TWrite msg) + protected SliceBufferSafeHandle UnsafeSerialize(TWrite msg) { DefaultSerializationContext context = null; try { context = DefaultSerializationContext.GetInitializedThreadLocal(); serializer(msg, context); - return context.GetPayload().ToByteArray(); + return context.GetPayload(); } finally { diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index 0bf1fb3b7dd..e1c3a215422 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -129,7 +129,7 @@ namespace Grpc.Core.Internal /// public Task SendStatusFromServerAsync(Status status, Metadata trailers, ResponseWithFlags? optionalWrite) { - byte[] payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response) : null; + var payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response) : null; var writeFlags = optionalWrite.HasValue ? optionalWrite.Value.WriteFlags : default(WriteFlags); lock (myLock) diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index 2e637c9704b..6208f45a00a 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -67,19 +67,19 @@ namespace Grpc.Core.Internal Native.grpcsharp_call_set_credentials(this, credentials).CheckOk(); } - public void StartUnary(IUnaryResponseClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartUnary(IUnaryResponseClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_IUnaryResponseClientCallback, callback); - Native.grpcsharp_call_start_unary(this, ctx, payload, new UIntPtr((ulong)payload.Length), writeFlags, metadataArray, callFlags) + Native.grpcsharp_call_start_unary(this, ctx, payload, writeFlags, metadataArray, callFlags) .CheckOk(); } } - public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartUnary(BatchContextSafeHandle ctx, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { - Native.grpcsharp_call_start_unary(this, ctx, payload, new UIntPtr((ulong)payload.Length), writeFlags, metadataArray, callFlags) + Native.grpcsharp_call_start_unary(this, ctx, payload, writeFlags, metadataArray, callFlags) .CheckOk(); } @@ -92,12 +92,12 @@ namespace Grpc.Core.Internal } } - public void StartServerStreaming(IReceivedStatusOnClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) + public void StartServerStreaming(IReceivedStatusOnClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags) { using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_IReceivedStatusOnClientCallback, callback); - Native.grpcsharp_call_start_server_streaming(this, ctx, payload, new UIntPtr((ulong)payload.Length), writeFlags, metadataArray, callFlags).CheckOk(); + Native.grpcsharp_call_start_server_streaming(this, ctx, payload, writeFlags, metadataArray, callFlags).CheckOk(); } } @@ -110,12 +110,12 @@ namespace Grpc.Core.Internal } } - public void StartSendMessage(ISendCompletionCallback callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) + public void StartSendMessage(ISendCompletionCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) { using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_ISendCompletionCallback, callback); - Native.grpcsharp_call_send_message(this, ctx, payload, new UIntPtr((ulong)payload.Length), writeFlags, sendEmptyInitialMetadata ? 1 : 0).CheckOk(); + Native.grpcsharp_call_send_message(this, ctx, payload, writeFlags, sendEmptyInitialMetadata ? 1 : 0).CheckOk(); } } @@ -129,13 +129,13 @@ namespace Grpc.Core.Internal } public void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, - byte[] optionalPayload, WriteFlags writeFlags) + SliceBufferSafeHandle optionalPayload, WriteFlags writeFlags) { + // TODO: optionalPayload == null -> pass null SliceBufferSafeHandle using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_ISendStatusFromServerCompletionCallback, callback); - var optionalPayloadLength = optionalPayload != null ? new UIntPtr((ulong)optionalPayload.Length) : UIntPtr.Zero; - + const int MaxStackAllocBytes = 256; int maxBytes = MarshalUtils.GetMaxByteCountUTF8(status.Detail); if (maxBytes > MaxStackAllocBytes) @@ -156,7 +156,7 @@ namespace Grpc.Core.Internal byte* ptr = stackalloc byte[maxBytes]; int statusBytes = MarshalUtils.GetBytesUTF8(status.Detail, ptr, maxBytes); Native.grpcsharp_call_send_status_from_server(this, ctx, status.StatusCode, new IntPtr(ptr), new UIntPtr((ulong)statusBytes), metadataArray, sendEmptyInitialMetadata ? 1 : 0, - optionalPayload, optionalPayloadLength, writeFlags).CheckOk(); + optionalPayload, writeFlags).CheckOk(); } else { // for larger status (rare), rent a buffer from the pool and @@ -168,7 +168,7 @@ namespace Grpc.Core.Internal { int statusBytes = MarshalUtils.GetBytesUTF8(status.Detail, ptr, maxBytes); Native.grpcsharp_call_send_status_from_server(this, ctx, status.StatusCode, new IntPtr(ptr), new UIntPtr((ulong)statusBytes), metadataArray, sendEmptyInitialMetadata ? 1 : 0, - optionalPayload, optionalPayloadLength, writeFlags).CheckOk(); + optionalPayload, writeFlags).CheckOk(); } } finally diff --git a/src/csharp/Grpc.Core/Internal/INativeCall.cs b/src/csharp/Grpc.Core/Internal/INativeCall.cs index 98117c6988a..70e98bfc9af 100644 --- a/src/csharp/Grpc.Core/Internal/INativeCall.cs +++ b/src/csharp/Grpc.Core/Internal/INativeCall.cs @@ -67,13 +67,13 @@ namespace Grpc.Core.Internal string GetPeer(); - void StartUnary(IUnaryResponseClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); + void StartUnary(IUnaryResponseClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); - void StartUnary(BatchContextSafeHandle ctx, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); + void StartUnary(BatchContextSafeHandle ctx, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); void StartClientStreaming(IUnaryResponseClientCallback callback, MetadataArraySafeHandle metadataArray, CallFlags callFlags); - void StartServerStreaming(IReceivedStatusOnClientCallback callback, byte[] payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); + void StartServerStreaming(IReceivedStatusOnClientCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags callFlags); void StartDuplexStreaming(IReceivedStatusOnClientCallback callback, MetadataArraySafeHandle metadataArray, CallFlags callFlags); @@ -83,11 +83,11 @@ namespace Grpc.Core.Internal void StartSendInitialMetadata(ISendCompletionCallback callback, MetadataArraySafeHandle metadataArray); - void StartSendMessage(ISendCompletionCallback callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata); + void StartSendMessage(ISendCompletionCallback callback, SliceBufferSafeHandle payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata); void StartSendCloseFromClient(ISendCompletionCallback callback); - void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, byte[] optionalPayload, WriteFlags writeFlags); + void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, SliceBufferSafeHandle optionalPayload, WriteFlags writeFlags); void StartServerSide(IReceivedCloseOnServerCallback callback); } diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs index dcb0f84649c..d492d0c9525 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs @@ -487,13 +487,13 @@ namespace Grpc.Core.Internal public delegate void grpcsharp_call_credentials_release_delegate(IntPtr credentials); public delegate CallError grpcsharp_call_cancel_delegate(CallSafeHandle call); public delegate CallError grpcsharp_call_cancel_with_status_delegate(CallSafeHandle call, StatusCode status, string description); - public delegate CallError grpcsharp_call_start_unary_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public delegate CallError grpcsharp_call_start_unary_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); public delegate CallError grpcsharp_call_start_client_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); - public delegate CallError grpcsharp_call_start_server_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public delegate CallError grpcsharp_call_start_server_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); public delegate CallError grpcsharp_call_start_duplex_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); - public delegate CallError grpcsharp_call_send_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, int sendEmptyInitialMetadata); + public delegate CallError grpcsharp_call_send_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); public delegate CallError grpcsharp_call_send_close_from_client_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); - public delegate CallError grpcsharp_call_send_status_from_server_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags); + public delegate CallError grpcsharp_call_send_status_from_server_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags); public delegate CallError grpcsharp_call_recv_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); public delegate CallError grpcsharp_call_recv_initial_metadata_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); public delegate CallError grpcsharp_call_start_serverside_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); @@ -563,7 +563,7 @@ namespace Grpc.Core.Internal public delegate CallError grpcsharp_test_callback_delegate([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback); public delegate IntPtr grpcsharp_test_nop_delegate(IntPtr ptr); public delegate void grpcsharp_test_override_method_delegate(string methodName, string variant); - public delegate CallError grpcsharp_test_call_start_unary_echo_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public delegate CallError grpcsharp_test_call_start_unary_echo_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); } /// @@ -649,25 +649,25 @@ namespace Grpc.Core.Internal public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, int sendEmptyInitialMetadata); + public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); [DllImport(ImportName)] public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags); + public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); @@ -877,7 +877,7 @@ namespace Grpc.Core.Internal public static extern void grpcsharp_test_override_method(string methodName, string variant); [DllImport(ImportName)] - public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); } /// @@ -963,25 +963,25 @@ namespace Grpc.Core.Internal public static extern CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, int sendEmptyInitialMetadata); + public static extern CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata); [DllImport(ImportName)] public static extern CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx); [DllImport(ImportName)] - public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags); + public static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags); [DllImport(ImportName)] public static extern CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx); @@ -1191,7 +1191,7 @@ namespace Grpc.Core.Internal public static extern void grpcsharp_test_override_method(string methodName, string variant); [DllImport(ImportName)] - public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); + public static extern CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags); } } } diff --git a/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs b/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs index 8496813efb0..76c59ca579c 100644 --- a/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs +++ b/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs @@ -50,11 +50,14 @@ namespace Grpc.Microbenchmarks var call = CreateFakeCall(cq); var sendCompletionCallback = new NopSendCompletionCallback(); - var payload = new byte[PayloadSize]; + var payload = SliceBufferSafeHandle.Create(); + payload.GetSpan(PayloadSize); + payload.Advance(PayloadSize); var writeFlags = default(WriteFlags); for (int i = 0; i < Iterations; i++) { + // TODO: sending for the first time actually steals the slices... call.StartSendMessage(sendCompletionCallback, payload, writeFlags, false); var callback = completionRegistry.Extract(completionRegistry.LastRegisteredKey); callback.OnComplete(true); diff --git a/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs b/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs index 8448f03dd62..177a49d9223 100644 --- a/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs +++ b/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs @@ -70,8 +70,8 @@ namespace Grpc.Microbenchmarks var native = NativeMethods.Get(); // replace the implementation of a native method with a fake - NativeMethods.Delegates.grpcsharp_call_start_unary_delegate fakeCallStartUnary = (CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags) => { - return native.grpcsharp_test_call_start_unary_echo(call, ctx, sendBuffer, sendBufferLen, writeFlags, metadataArray, metadataFlags); + NativeMethods.Delegates.grpcsharp_call_start_unary_delegate fakeCallStartUnary = (CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags) => { + return native.grpcsharp_test_call_start_unary_echo(call, ctx, sendBuffer, writeFlags, metadataArray, metadataFlags); }; native.GetType().GetField(nameof(native.grpcsharp_call_start_unary)).SetValue(native, fakeCallStartUnary); diff --git a/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs b/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs index a59afa19118..e5bac1967c9 100644 --- a/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs +++ b/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs @@ -61,7 +61,7 @@ namespace Grpc.Microbenchmarks var native = NativeMethods.Get(); // nop the native-call via reflection - NativeMethods.Delegates.grpcsharp_call_send_status_from_server_delegate nop = (CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags) => { + NativeMethods.Delegates.grpcsharp_call_send_status_from_server_delegate nop = (CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags) => { completionRegistry.Extract(ctx.Handle).OnComplete(true); // drain the dictionary as we go return CallError.OK; }; diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 1f115b1caf2..abddbc0e7a1 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -41,10 +41,26 @@ #define GPR_CALLTYPE #endif -grpc_byte_buffer* string_to_byte_buffer(const char* buffer, size_t len) { - grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len); - grpc_byte_buffer* bb = grpc_raw_byte_buffer_create(&slice, 1); - grpc_slice_unref(slice); +//grpc_byte_buffer* string_to_byte_buffer(const char* buffer, size_t len) { +// grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len); +// grpc_byte_buffer* bb = grpc_raw_byte_buffer_create(&slice, 1); +// grpc_slice_unref(slice); +// return bb; +//} + +static grpc_byte_buffer* grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { + grpc_byte_buffer* bb = + (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); + memset(bb, 0, sizeof(grpc_byte_buffer)); + bb->type = GRPC_BB_RAW; + bb->data.raw.compression = GRPC_COMPRESS_NONE; + bb->data.raw.slice_buffer = *slice_buffer; + // TODO: just use move slice_buffer... + + // we transferred the ownership of members from the slice buffer to the + // the internals of byte buffer, so we just overwrite the original slice buffer with + // default values. + grpc_slice_buffer_init(slice_buffer); // TODO: need to reset available_tail_space after this.. return bb; } @@ -582,8 +598,8 @@ static grpc_call_error grpcsharp_call_start_batch(grpc_call* call, } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( - grpc_call* call, grpcsharp_batch_context* ctx, const char* send_buffer, - size_t send_buffer_len, uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, + uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { /* TODO: don't use magic number */ grpc_op ops[6]; @@ -598,7 +614,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( ops[0].reserved = NULL; ops[1].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); + ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[1].data.send_message.send_message = ctx->send_message; ops[1].flags = write_flags; ops[1].reserved = NULL; @@ -635,12 +651,12 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( /* Only for testing. Shortcircuits the unary call logic and only echoes the message as if it was received from the server */ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_test_call_start_unary_echo( - grpc_call* call, grpcsharp_batch_context* ctx, const char* send_buffer, - size_t send_buffer_len, uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, + uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { // prepare as if we were performing a normal RPC. grpc_byte_buffer* send_message = - string_to_byte_buffer(send_buffer, send_buffer_len); + grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ctx->recv_message = send_message; // echo message sent by the client as if // received from server. @@ -693,8 +709,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_client_streaming( } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( - grpc_call* call, grpcsharp_batch_context* ctx, const char* send_buffer, - size_t send_buffer_len, uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, + uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { /* TODO: don't use magic number */ grpc_op ops[4]; @@ -709,7 +725,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( ops[0].reserved = NULL; ops[1].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); + ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[1].data.send_message.send_message = ctx->send_message; ops[1].flags = write_flags; ops[1].reserved = NULL; @@ -776,15 +792,15 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_recv_initial_metadata( } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_message( - grpc_call* call, grpcsharp_batch_context* ctx, const char* send_buffer, - size_t send_buffer_len, uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, + uint32_t write_flags, int32_t send_empty_initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[2]; memset(ops, 0, sizeof(ops)); size_t nops = send_empty_initial_metadata ? 2 : 1; ops[0].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); + ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[0].data.send_message.send_message = ctx->send_message; ops[0].flags = write_flags; ops[0].reserved = NULL; @@ -811,7 +827,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( grpc_call* call, grpcsharp_batch_context* ctx, grpc_status_code status_code, const char* status_details, size_t status_details_len, grpc_metadata_array* trailing_metadata, int32_t send_empty_initial_metadata, - const char* optional_send_buffer, size_t optional_send_buffer_len, + grpc_slice_buffer* optional_send_buffer, uint32_t write_flags) { /* TODO: don't use magic number */ grpc_op ops[3]; @@ -833,7 +849,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( if (optional_send_buffer) { ops[nops].op = GRPC_OP_SEND_MESSAGE; ctx->send_message = - string_to_byte_buffer(optional_send_buffer, optional_send_buffer_len); + grpcsharp_create_byte_buffer_from_stolen_slices(optional_send_buffer); ops[nops].data.send_message.send_message = ctx->send_message; ops[nops].flags = write_flags; ops[nops].reserved = NULL; @@ -1209,22 +1225,7 @@ grpcsharp_slice_buffer_slice_peek(grpc_slice_buffer* buffer, size_t index, size_ *slice_data_ptr = GRPC_SLICE_START_PTR(*slice_ptr); } -GPR_EXPORT grpc_byte_buffer* GPR_CALLTYPE -grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { - grpc_byte_buffer* bb = - (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); - memset(bb, 0, sizeof(grpc_byte_buffer)); - bb->type = GRPC_BB_RAW; - bb->data.raw.compression = GRPC_COMPRESS_NONE; - bb->data.raw.slice_buffer = *slice_buffer; - // TODO: just use move slice_buffer... - // we transferred the ownership of members from the slice buffer to the - // the internals of byte buffer, so we just overwrite the original slice buffer with - // default values. - grpc_slice_buffer_init(slice_buffer); // TODO: need to reset available_tail_space after this.. - return bb; -} GPR_EXPORT void* GPR_CALLTYPE grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, diff --git a/templates/src/csharp/Grpc.Core/Internal/native_methods.include b/templates/src/csharp/Grpc.Core/Internal/native_methods.include index 055af4a7a27..4f5f61d332c 100644 --- a/templates/src/csharp/Grpc.Core/Internal/native_methods.include +++ b/templates/src/csharp/Grpc.Core/Internal/native_methods.include @@ -25,13 +25,13 @@ native_method_signatures = [ 'void grpcsharp_call_credentials_release(IntPtr credentials)', 'CallError grpcsharp_call_cancel(CallSafeHandle call)', 'CallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description)', - 'CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', + 'CallError grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', 'CallError grpcsharp_call_start_client_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', - 'CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', + 'CallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', 'CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', - 'CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, int sendEmptyInitialMetadata)', + 'CallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, int sendEmptyInitialMetadata)', 'CallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx)', - 'CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags)', + 'CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, IntPtr statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, int sendEmptyInitialMetadata, SliceBufferSafeHandle optionalSendBuffer, WriteFlags writeFlags)', 'CallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx)', 'CallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx)', 'CallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx)', @@ -101,7 +101,7 @@ native_method_signatures = [ 'CallError grpcsharp_test_callback([MarshalAs(UnmanagedType.FunctionPtr)] NativeCallbackTestDelegate callback)', 'IntPtr grpcsharp_test_nop(IntPtr ptr)', 'void grpcsharp_test_override_method(string methodName, string variant)', - 'CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', + 'CallError grpcsharp_test_call_start_unary_echo(CallSafeHandle call, BatchContextSafeHandle ctx, SliceBufferSafeHandle sendBuffer, WriteFlags writeFlags, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags)', ] import re From 8ad2b146ed5caa995c89726de59c375935145cb4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 30 Jul 2019 17:38:08 -0700 Subject: [PATCH 011/120] fix grpcsharp_create_byte_buffer_from_stolen_slices --- src/csharp/ext/grpc_csharp_ext.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index abddbc0e7a1..82fa81abf7d 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -41,26 +41,15 @@ #define GPR_CALLTYPE #endif -//grpc_byte_buffer* string_to_byte_buffer(const char* buffer, size_t len) { -// grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len); -// grpc_byte_buffer* bb = grpc_raw_byte_buffer_create(&slice, 1); -// grpc_slice_unref(slice); -// return bb; -//} - static grpc_byte_buffer* grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { grpc_byte_buffer* bb = - (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); + (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); memset(bb, 0, sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; - bb->data.raw.slice_buffer = *slice_buffer; - // TODO: just use move slice_buffer... + grpc_slice_buffer_init(&bb->data.raw.slice_buffer); - // we transferred the ownership of members from the slice buffer to the - // the internals of byte buffer, so we just overwrite the original slice buffer with - // default values. - grpc_slice_buffer_init(slice_buffer); // TODO: need to reset available_tail_space after this.. + grpc_slice_buffer_swap(&bb->data.raw.slice_buffer, slice_buffer); return bb; } From 70c7aa162354188f25aa790bdc7a7443c00f2af1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 30 Jul 2019 18:07:12 -0700 Subject: [PATCH 012/120] stuff now works --- src/csharp/Grpc.Core/Internal/CallSafeHandle.cs | 6 ++++++ src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index 6208f45a00a..cfcab5dc692 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -132,6 +132,12 @@ namespace Grpc.Core.Internal SliceBufferSafeHandle optionalPayload, WriteFlags writeFlags) { // TODO: optionalPayload == null -> pass null SliceBufferSafeHandle + // do this properly + if (optionalPayload == null) + { + optionalPayload = SliceBufferSafeHandle.NullInstance; + } + using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_ISendStatusFromServerCompletionCallback, callback); diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index 5b540c69d44..5ea4432684c 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -32,6 +32,8 @@ namespace Grpc.Core.Internal static readonly NativeMethods Native = NativeMethods.Get(); static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); + public static readonly SliceBufferSafeHandle NullInstance = new SliceBufferSafeHandle(); + private IntPtr tailSpacePtr; private UIntPtr tailSpaceLen; From 1c177fff1e9cba4fc3632e12d39572a31fa2704f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 31 Jul 2019 16:22:50 -0700 Subject: [PATCH 013/120] refactoring and simplifications --- .../Internal/DefaultSerializationContext.cs | 51 ++++--------------- .../Internal/NativeMethods.Generated.cs | 11 ++++ .../Internal/SliceBufferSafeHandle.cs | 44 +++++++++++----- src/csharp/ext/grpc_csharp_ext.c | 7 ++- .../runtimes/grpc_csharp_ext_dummy_stubs.c | 4 ++ .../Grpc.Core/Internal/native_methods.include | 1 + 6 files changed, 63 insertions(+), 55 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs index 9098850a52e..db5e78a608d 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs @@ -30,7 +30,7 @@ namespace Grpc.Core.Internal bool isComplete; //byte[] payload; - NativeBufferWriter bufferWriter; + SliceBufferSafeHandle sliceBuffer; public DefaultSerializationContext() { @@ -43,10 +43,10 @@ namespace Grpc.Core.Internal this.isComplete = true; GetBufferWriter(); - var destSpan = bufferWriter.GetSpan(payload.Length); + var destSpan = sliceBuffer.GetSpan(payload.Length); payload.AsSpan().CopyTo(destSpan); - bufferWriter.Advance(payload.Length); - bufferWriter.Complete(); + sliceBuffer.Advance(payload.Length); + sliceBuffer.Complete(); //this.payload = payload; } @@ -55,12 +55,12 @@ namespace Grpc.Core.Internal /// public override IBufferWriter GetBufferWriter() { - if (bufferWriter == null) + if (sliceBuffer == null) { // TODO: avoid allocation.. - bufferWriter = new NativeBufferWriter(); + sliceBuffer = SliceBufferSafeHandle.Create(); } - return bufferWriter; + return sliceBuffer; } /// @@ -69,20 +69,20 @@ namespace Grpc.Core.Internal public override void Complete() { GrpcPreconditions.CheckState(!isComplete); - bufferWriter.Complete(); + sliceBuffer.Complete(); this.isComplete = true; } internal SliceBufferSafeHandle GetPayload() { - return bufferWriter.GetSliceBuffer(); + return sliceBuffer; } public void Reset() { this.isComplete = false; //this.payload = null; - this.bufferWriter = null; + this.sliceBuffer = null; // reset instead... } public static DefaultSerializationContext GetInitializedThreadLocal() @@ -92,35 +92,6 @@ namespace Grpc.Core.Internal return instance; } - private class NativeBufferWriter : IBufferWriter - { - private SliceBufferSafeHandle sliceBuffer = SliceBufferSafeHandle.Create(); - - public void Advance(int count) - { - sliceBuffer.Advance(count); - } - - public Memory GetMemory(int sizeHint = 0) - { - // TODO: implement - throw new NotImplementedException(); - } - - public Span GetSpan(int sizeHint = 0) - { - return sliceBuffer.GetSpan(sizeHint); - } - - public void Complete() - { - sliceBuffer.Complete(); - } - - public SliceBufferSafeHandle GetSliceBuffer() - { - return sliceBuffer; - } - } + } } diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs index d492d0c9525..c724b30ca8f 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.Generated.cs @@ -126,6 +126,7 @@ namespace Grpc.Core.Internal public readonly Delegates.grpcsharp_slice_buffer_adjust_tail_space_delegate grpcsharp_slice_buffer_adjust_tail_space; public readonly Delegates.grpcsharp_slice_buffer_slice_count_delegate grpcsharp_slice_buffer_slice_count; public readonly Delegates.grpcsharp_slice_buffer_slice_peek_delegate grpcsharp_slice_buffer_slice_peek; + public readonly Delegates.grpcsharp_slice_buffer_reset_and_unref_delegate grpcsharp_slice_buffer_reset_and_unref; public readonly Delegates.grpcsharp_slice_buffer_destroy_delegate grpcsharp_slice_buffer_destroy; public readonly Delegates.gprsharp_now_delegate gprsharp_now; public readonly Delegates.gprsharp_inf_future_delegate gprsharp_inf_future; @@ -233,6 +234,7 @@ namespace Grpc.Core.Internal this.grpcsharp_slice_buffer_adjust_tail_space = GetMethodDelegate(library); this.grpcsharp_slice_buffer_slice_count = GetMethodDelegate(library); this.grpcsharp_slice_buffer_slice_peek = GetMethodDelegate(library); + this.grpcsharp_slice_buffer_reset_and_unref = GetMethodDelegate(library); this.grpcsharp_slice_buffer_destroy = GetMethodDelegate(library); this.gprsharp_now = GetMethodDelegate(library); this.gprsharp_inf_future = GetMethodDelegate(library); @@ -339,6 +341,7 @@ namespace Grpc.Core.Internal this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromStaticLib.grpcsharp_slice_buffer_adjust_tail_space; this.grpcsharp_slice_buffer_slice_count = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_count; this.grpcsharp_slice_buffer_slice_peek = DllImportsFromStaticLib.grpcsharp_slice_buffer_slice_peek; + this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromStaticLib.grpcsharp_slice_buffer_reset_and_unref; this.grpcsharp_slice_buffer_destroy = DllImportsFromStaticLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromStaticLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromStaticLib.gprsharp_inf_future; @@ -445,6 +448,7 @@ namespace Grpc.Core.Internal this.grpcsharp_slice_buffer_adjust_tail_space = DllImportsFromSharedLib.grpcsharp_slice_buffer_adjust_tail_space; this.grpcsharp_slice_buffer_slice_count = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_count; this.grpcsharp_slice_buffer_slice_peek = DllImportsFromSharedLib.grpcsharp_slice_buffer_slice_peek; + this.grpcsharp_slice_buffer_reset_and_unref = DllImportsFromSharedLib.grpcsharp_slice_buffer_reset_and_unref; this.grpcsharp_slice_buffer_destroy = DllImportsFromSharedLib.grpcsharp_slice_buffer_destroy; this.gprsharp_now = DllImportsFromSharedLib.gprsharp_now; this.gprsharp_inf_future = DllImportsFromSharedLib.gprsharp_inf_future; @@ -554,6 +558,7 @@ namespace Grpc.Core.Internal public delegate IntPtr grpcsharp_slice_buffer_adjust_tail_space_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace); public delegate UIntPtr grpcsharp_slice_buffer_slice_count_delegate(SliceBufferSafeHandle sliceBuffer); public delegate void grpcsharp_slice_buffer_slice_peek_delegate(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); + public delegate void grpcsharp_slice_buffer_reset_and_unref_delegate(SliceBufferSafeHandle sliceBuffer); public delegate void grpcsharp_slice_buffer_destroy_delegate(IntPtr sliceBuffer); public delegate Timespec gprsharp_now_delegate(ClockType clockType); public delegate Timespec gprsharp_inf_future_delegate(ClockType clockType); @@ -849,6 +854,9 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); + [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); @@ -1163,6 +1171,9 @@ namespace Grpc.Core.Internal [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr); + [DllImport(ImportName)] + public static extern void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer); + [DllImport(ImportName)] public static extern void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer); diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index 5ea4432684c..76a97f4a0a2 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -17,6 +17,7 @@ #endregion using System; +using System.Buffers; using System.Runtime.InteropServices; using Grpc.Core; using Grpc.Core.Logging; @@ -25,9 +26,10 @@ using Grpc.Core.Utils; namespace Grpc.Core.Internal { /// - /// grpc_slice_buffer + /// Represents grpc_slice_buffer with some extra utility functions to allow + /// writing data to it using the IBufferWriter interface. /// - internal class SliceBufferSafeHandle : SafeHandleZeroIsInvalid + internal class SliceBufferSafeHandle : SafeHandleZeroIsInvalid, IBufferWriter { static readonly NativeMethods Native = NativeMethods.Get(); static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); @@ -35,8 +37,7 @@ namespace Grpc.Core.Internal public static readonly SliceBufferSafeHandle NullInstance = new SliceBufferSafeHandle(); private IntPtr tailSpacePtr; - private UIntPtr tailSpaceLen; - + private int tailSpaceLen; private SliceBufferSafeHandle() { @@ -59,21 +60,30 @@ namespace Grpc.Core.Internal { GrpcPreconditions.CheckArgument(count >= 0); GrpcPreconditions.CheckArgument(tailSpacePtr != IntPtr.Zero || count == 0); - GrpcPreconditions.CheckArgument(tailSpaceLen.ToUInt64() >= (ulong)count); - tailSpaceLen = new UIntPtr(tailSpaceLen.ToUInt64() - (ulong)count); + GrpcPreconditions.CheckArgument(tailSpaceLen >= count); + tailSpaceLen = tailSpaceLen - count; tailSpacePtr += count; } - public unsafe Span GetSpan(int sizeHint) + // provides access to the "tail space" of this buffer. + // Use GetSpan when possible for better efficiency. + public Memory GetMemory(int sizeHint = 0) + { + // TODO: implement + throw new NotImplementedException(); + } + + // provides access to the "tail space" of this buffer. + public unsafe Span GetSpan(int sizeHint = 0) { GrpcPreconditions.CheckArgument(sizeHint >= 0); - if (tailSpaceLen.ToUInt64() < (ulong) sizeHint) + if (tailSpaceLen < sizeHint) { // TODO: should we ignore the hint sometimes when // available tail space is close enough to the sizeHint? AdjustTailSpace(sizeHint); } - return new Span(tailSpacePtr.ToPointer(), (int) tailSpaceLen.ToUInt64()); + return new Span(tailSpacePtr.ToPointer(), tailSpaceLen); } public void Complete() @@ -81,8 +91,17 @@ namespace Grpc.Core.Internal AdjustTailSpace(0); } + // resets the data contained by this slice buffer + public void Reset() + { + // deletes all the data in the slice buffer + tailSpacePtr = IntPtr.Zero; + tailSpaceLen = 0; + Native.grpcsharp_slice_buffer_reset_and_unref(this); + } + // copies the content of the slice buffer to a newly allocated byte array - // due to its overhead, this method should only be used for testing. + // Note that this method has a relatively high overhead and should maily be used for testing. public byte[] ToByteArray() { ulong sliceCount = Native.grpcsharp_slice_buffer_slice_count(this).ToUInt64(); @@ -111,9 +130,8 @@ namespace Grpc.Core.Internal private void AdjustTailSpace(int requestedSize) { GrpcPreconditions.CheckArgument(requestedSize >= 0); - var requestedTailSpaceLen = new UIntPtr((ulong) requestedSize); - tailSpacePtr = Native.grpcsharp_slice_buffer_adjust_tail_space(this, tailSpaceLen, requestedTailSpaceLen); - tailSpaceLen = requestedTailSpaceLen; + tailSpacePtr = Native.grpcsharp_slice_buffer_adjust_tail_space(this, new UIntPtr((ulong) tailSpaceLen), new UIntPtr((ulong) requestedSize)); + tailSpaceLen = requestedSize; } protected override bool ReleaseHandle() { diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 82fa81abf7d..78027d270dc 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -1195,6 +1195,11 @@ grpcsharp_slice_buffer_create() { return slice_buffer; } +GPR_EXPORT void GPR_CALLTYPE +grpcsharp_slice_buffer_reset_and_unref(grpc_slice_buffer* buffer) { + grpc_slice_buffer_reset_and_unref(buffer); +} + GPR_EXPORT void GPR_CALLTYPE grpcsharp_slice_buffer_destroy(grpc_slice_buffer* buffer) { grpc_slice_buffer_destroy(buffer); @@ -1214,8 +1219,6 @@ grpcsharp_slice_buffer_slice_peek(grpc_slice_buffer* buffer, size_t index, size_ *slice_data_ptr = GRPC_SLICE_START_PTR(*slice_ptr); } - - GPR_EXPORT void* GPR_CALLTYPE grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, size_t requested_tail_space) { diff --git a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c index 9007d7f3ad0..58a7c58e91a 100644 --- a/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c +++ b/src/csharp/unitypackage/unitypackage_skeleton/Plugins/Grpc.Core/runtimes/grpc_csharp_ext_dummy_stubs.c @@ -390,6 +390,10 @@ void grpcsharp_slice_buffer_slice_peek() { fprintf(stderr, "Should never reach here"); abort(); } +void grpcsharp_slice_buffer_reset_and_unref() { + fprintf(stderr, "Should never reach here"); + abort(); +} void grpcsharp_slice_buffer_destroy() { fprintf(stderr, "Should never reach here"); abort(); diff --git a/templates/src/csharp/Grpc.Core/Internal/native_methods.include b/templates/src/csharp/Grpc.Core/Internal/native_methods.include index 4f5f61d332c..f2b3a165a3b 100644 --- a/templates/src/csharp/Grpc.Core/Internal/native_methods.include +++ b/templates/src/csharp/Grpc.Core/Internal/native_methods.include @@ -92,6 +92,7 @@ native_method_signatures = [ 'IntPtr grpcsharp_slice_buffer_adjust_tail_space(SliceBufferSafeHandle sliceBuffer, UIntPtr availableTailSpace, UIntPtr requestedTailSpace)', 'UIntPtr grpcsharp_slice_buffer_slice_count(SliceBufferSafeHandle sliceBuffer)', 'void grpcsharp_slice_buffer_slice_peek(SliceBufferSafeHandle sliceBuffer, UIntPtr index, out UIntPtr sliceLen, out IntPtr sliceDataPtr)', + 'void grpcsharp_slice_buffer_reset_and_unref(SliceBufferSafeHandle sliceBuffer)', 'void grpcsharp_slice_buffer_destroy(IntPtr sliceBuffer)', 'Timespec gprsharp_now(ClockType clockType)', 'Timespec gprsharp_inf_future(ClockType clockType)', From aaddd42c00647a0fea619d7dfda090c038f6d7fa Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 31 Jul 2019 17:29:04 -0700 Subject: [PATCH 014/120] add serializationScope and refactoring for efficiency --- .../ContextualMarshallerTest.cs | 2 + src/csharp/Grpc.Core/Internal/AsyncCall.cs | 15 +++++-- .../Grpc.Core/Internal/AsyncCallBase.cs | 44 ++++++++----------- .../Grpc.Core/Internal/AsyncCallServer.cs | 39 ++++++++-------- .../Internal/DefaultSerializationContext.cs | 40 ++++++++++------- 5 files changed, 78 insertions(+), 62 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs b/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs index c3aee726f26..99f92e12628 100644 --- a/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs @@ -52,6 +52,8 @@ namespace Grpc.Core.Tests } if (str == "SERIALIZE_TO_NULL") { + // TODO: test for not calling complete Complete() (that resulted in null payload before...) + // TODO: test for calling Complete(null byte array) return; } var bytes = System.Text.Encoding.UTF8.GetBytes(str); diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index aefa58a0cee..4111c5347ce 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -95,10 +95,10 @@ namespace Grpc.Core.Internal readingDone = true; } - var payload = UnsafeSerialize(msg); - + using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { + var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? var ctx = details.Channel.Environment.BatchContextPool.Lease(); try { @@ -160,11 +160,14 @@ namespace Grpc.Core.Internal halfcloseRequested = true; readingDone = true; - var payload = UnsafeSerialize(msg); + //var payload = UnsafeSerialize(msg); unaryResponseTcs = new TaskCompletionSource(); + using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { + var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? + call.StartUnary(UnaryResponseClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); callStartedOk = true; } @@ -235,11 +238,15 @@ namespace Grpc.Core.Internal halfcloseRequested = true; - var payload = UnsafeSerialize(msg); + //var payload = UnsafeSerialize(msg); streamingResponseCallFinishedTcs = new TaskCompletionSource(); + + using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { + var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? + call.StartServerStreaming(ReceivedStatusOnClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); callStartedOk = true; } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 07f9ecf23e9..bd4b0d81832 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -115,23 +115,25 @@ namespace Grpc.Core.Internal /// protected Task SendMessageInternalAsync(TWrite msg, WriteFlags writeFlags) { - var payload = UnsafeSerialize(msg); - - lock (myLock) + using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) { - GrpcPreconditions.CheckState(started); - var earlyResult = CheckSendAllowedOrEarlyResult(); - if (earlyResult != null) + var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? + lock (myLock) { - return earlyResult; - } + GrpcPreconditions.CheckState(started); + var earlyResult = CheckSendAllowedOrEarlyResult(); + if (earlyResult != null) + { + return earlyResult; + } - call.StartSendMessage(SendCompletionCallback, payload, writeFlags, !initialMetadataSent); + call.StartSendMessage(SendCompletionCallback, payload, writeFlags, !initialMetadataSent); - initialMetadataSent = true; - streamingWritesCounter++; - streamingWriteTcs = new TaskCompletionSource(); - return streamingWriteTcs.Task; + initialMetadataSent = true; + streamingWritesCounter++; + streamingWriteTcs = new TaskCompletionSource(); + return streamingWriteTcs.Task; + } } } @@ -213,19 +215,11 @@ namespace Grpc.Core.Internal /// protected abstract Task CheckSendAllowedOrEarlyResult(); - protected SliceBufferSafeHandle UnsafeSerialize(TWrite msg) + // runs the serializer, propagating any exceptions being thrown without modifying them + protected SliceBufferSafeHandle UnsafeSerialize(TWrite msg, DefaultSerializationContext context) { - DefaultSerializationContext context = null; - try - { - context = DefaultSerializationContext.GetInitializedThreadLocal(); - serializer(msg, context); - return context.GetPayload(); - } - finally - { - context?.Reset(); - } + serializer(msg, context); + return context.GetPayload(); } protected Exception TryDeserialize(IBufferReader reader, out TRead msg) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index e1c3a215422..e0bb41e15dc 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -129,28 +129,31 @@ namespace Grpc.Core.Internal /// public Task SendStatusFromServerAsync(Status status, Metadata trailers, ResponseWithFlags? optionalWrite) { - var payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response) : null; - var writeFlags = optionalWrite.HasValue ? optionalWrite.Value.WriteFlags : default(WriteFlags); - - lock (myLock) + using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) { - GrpcPreconditions.CheckState(started); - GrpcPreconditions.CheckState(!disposed); - GrpcPreconditions.CheckState(!halfcloseRequested, "Can only send status from server once."); + var payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response, serializationScope.Context) : null; + var writeFlags = optionalWrite.HasValue ? optionalWrite.Value.WriteFlags : default(WriteFlags); - using (var metadataArray = MetadataArraySafeHandle.Create(trailers)) - { - call.StartSendStatusFromServer(SendStatusFromServerCompletionCallback, status, metadataArray, !initialMetadataSent, - payload, writeFlags); - } - halfcloseRequested = true; - initialMetadataSent = true; - sendStatusFromServerTcs = new TaskCompletionSource(); - if (optionalWrite.HasValue) + lock (myLock) { - streamingWritesCounter++; + GrpcPreconditions.CheckState(started); + GrpcPreconditions.CheckState(!disposed); + GrpcPreconditions.CheckState(!halfcloseRequested, "Can only send status from server once."); + + using (var metadataArray = MetadataArraySafeHandle.Create(trailers)) + { + call.StartSendStatusFromServer(SendStatusFromServerCompletionCallback, status, metadataArray, !initialMetadataSent, + payload, writeFlags); + } + halfcloseRequested = true; + initialMetadataSent = true; + sendStatusFromServerTcs = new TaskCompletionSource(); + if (optionalWrite.HasValue) + { + streamingWritesCounter++; + } + return sendStatusFromServerTcs.Task; } - return sendStatusFromServerTcs.Task; } } diff --git a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs index db5e78a608d..6bf9da56264 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs @@ -29,8 +29,7 @@ namespace Grpc.Core.Internal new ThreadLocal(() => new DefaultSerializationContext(), false); bool isComplete; - //byte[] payload; - SliceBufferSafeHandle sliceBuffer; + SliceBufferSafeHandle sliceBuffer = SliceBufferSafeHandle.Create(); public DefaultSerializationContext() { @@ -42,12 +41,10 @@ namespace Grpc.Core.Internal GrpcPreconditions.CheckState(!isComplete); this.isComplete = true; - GetBufferWriter(); var destSpan = sliceBuffer.GetSpan(payload.Length); payload.AsSpan().CopyTo(destSpan); sliceBuffer.Advance(payload.Length); sliceBuffer.Complete(); - //this.payload = payload; } /// @@ -55,11 +52,6 @@ namespace Grpc.Core.Internal /// public override IBufferWriter GetBufferWriter() { - if (sliceBuffer == null) - { - // TODO: avoid allocation.. - sliceBuffer = SliceBufferSafeHandle.Create(); - } return sliceBuffer; } @@ -81,17 +73,35 @@ namespace Grpc.Core.Internal public void Reset() { this.isComplete = false; - //this.payload = null; - this.sliceBuffer = null; // reset instead... + this.sliceBuffer.Reset(); } - public static DefaultSerializationContext GetInitializedThreadLocal() + // Get a cached thread local instance of deserialization context + // and wrap it in a disposable struct that allows easy resetting + // via "using" statement. + public static UsageScope GetInitializedThreadLocalScope() { var instance = threadLocalInstance.Value; - instance.Reset(); - return instance; + return new UsageScope(instance); } - + public struct UsageScope : IDisposable + { + readonly DefaultSerializationContext context; + + public UsageScope(DefaultSerializationContext context) + { + this.context = context; + } + + public DefaultSerializationContext Context => context; + + // TODO: add Serialize method... + + public void Dispose() + { + context.Reset(); + } + } } } From 74dcdbb3c39619c1a725dc9a7e62c2cb5b62eda4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Aug 2019 12:57:38 -0700 Subject: [PATCH 015/120] fix adjust_tail_space --- src/csharp/ext/grpc_csharp_ext.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 78027d270dc..89391e67e15 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -1223,32 +1223,30 @@ GPR_EXPORT void* GPR_CALLTYPE grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, size_t requested_tail_space) { - if (available_tail_space == 0 && requested_tail_space == 0) - { - return NULL; + if (available_tail_space == requested_tail_space) { + // nothing to do } - // TODO: what if available_tail_space == requested_tail_space == 0 - - if (available_tail_space >= requested_tail_space) + else if (available_tail_space >= requested_tail_space) { - // TODO: should this be allowed at all? - grpc_slice_buffer garbage; - grpc_slice_buffer_trim_end(buffer, available_tail_space - requested_tail_space, &garbage); - grpc_slice_buffer_reset_and_unref(&garbage); + grpc_slice_buffer_trim_end(buffer, available_tail_space - requested_tail_space, NULL); } else { if (available_tail_space > 0) { - grpc_slice_buffer garbage; - grpc_slice_buffer_trim_end(buffer, available_tail_space, &garbage); - grpc_slice_buffer_reset_and_unref(&garbage); + grpc_slice_buffer_trim_end(buffer, available_tail_space, NULL); } grpc_slice new_slice = grpc_slice_malloc(requested_tail_space); - grpc_slice_buffer_add(buffer, new_slice); + // TODO: this always adds as a new slice entry into the sb, but it doesn't have the problem of + // sometimes splitting the continguous new_slice across two different slices (like grpc_slice_buffer_add would) + grpc_slice_buffer_add_indexed(buffer, new_slice); } + if (buffer->count == 0) + { + return NULL; + } grpc_slice* last_slice = &(buffer->slices[buffer->count - 1]); return GRPC_SLICE_END_PTR(*last_slice) - requested_tail_space; } From f32bd8b091669f2ce1056d2ddbae694dbb54cb18 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 7 Aug 2019 12:59:57 -0700 Subject: [PATCH 016/120] add default serialization context test --- .../DefaultSerializationContextTest.cs | 144 ++++++++++++++++++ src/csharp/tests.json | 1 + 2 files changed, 145 insertions(+) create mode 100644 src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs diff --git a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs new file mode 100644 index 00000000000..4d09d80bb72 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs @@ -0,0 +1,144 @@ +#region Copyright notice and license + +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using System; +using System.Buffers; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Internal.Tests +{ + public class DefaultSerializationContextTest + { + [TestCase] + public void CompleteAllowedOnlyOnce() + { + var context = new DefaultSerializationContext(); + var buffer = GetTestBuffer(10); + + context.Complete(buffer); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete(buffer)); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + } + + [TestCase] + public void CompleteAllowedOnlyOnce2() + { + var context = new DefaultSerializationContext(); + + context.Complete(); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete(GetTestBuffer(10))); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + } + + [TestCase(0)] + [TestCase(1)] + [TestCase(10)] + [TestCase(100)] + [TestCase(1000)] + public void ByteArrayPayload(int payloadSize) + { + var context = new DefaultSerializationContext(); + var origPayload = GetTestBuffer(payloadSize); + + context.Complete(origPayload); + + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + } + + [TestCase(0)] + [TestCase(1)] + [TestCase(10)] + [TestCase(100)] + [TestCase(1000)] + public void BufferWriter_OneSegment(int payloadSize) + { + var context = new DefaultSerializationContext(); + var origPayload = GetTestBuffer(payloadSize); + + var bufferWriter = context.GetBufferWriter(); + origPayload.AsSpan().CopyTo(bufferWriter.GetSpan(payloadSize)); + bufferWriter.Advance(payloadSize); + // TODO: test that call to Complete() is required. + + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + } + + [TestCase(1, 4)] // small slice size tests grpc_slice with inline data + [TestCase(10, 4)] + [TestCase(100, 4)] + [TestCase(1000, 4)] + [TestCase(1, 64)] // larger slice size tests allocated grpc_slices + [TestCase(10, 64)] + [TestCase(1000, 50)] + [TestCase(1000, 64)] + public void BufferWriter_MultipleSegments(int payloadSize, int maxSliceSize) + { + var context = new DefaultSerializationContext(); + var origPayload = GetTestBuffer(payloadSize); + + var bufferWriter = context.GetBufferWriter(); + for (int offset = 0; offset < payloadSize; offset += maxSliceSize) + { + var sliceSize = Math.Min(maxSliceSize, payloadSize - offset); + // we allocate last slice as too big intentionally to test that shrinking works + var dest = bufferWriter.GetSpan(maxSliceSize); + + origPayload.AsSpan(offset, sliceSize).CopyTo(dest); + bufferWriter.Advance(sliceSize); + } + context.Complete(); + + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + + context.GetPayload().Dispose(); // TODO: do it better.. (use the scope...) + } + + // AdjustTailSpace(0) if previous tail size is 0.... + + // test that context.Complete() call is required... + + // BufferWriter.GetMemory... (add refs to the original memory?) + + // TODO: set payload and then get IBufferWriter should throw? + + // TODO: test Reset()... + + // TODO: destroy SliceBufferSafeHandles... (use usagescope...) + + + + + private byte[] GetTestBuffer(int length) + { + var testBuffer = new byte[length]; + for (int i = 0; i < testBuffer.Length; i++) + { + testBuffer[i] = (byte) i; + } + return testBuffer; + } + } +} diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 2eb786e0983..75bda4c25ea 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -9,6 +9,7 @@ "Grpc.Core.Internal.Tests.CompletionQueueSafeHandleTest", "Grpc.Core.Internal.Tests.DefaultDeserializationContextTest", "Grpc.Core.Internal.Tests.DefaultObjectPoolTest", + "Grpc.Core.Internal.Tests.DefaultSerializationContextTest", "Grpc.Core.Internal.Tests.FakeBufferReaderManagerTest", "Grpc.Core.Internal.Tests.MetadataArraySafeHandleTest", "Grpc.Core.Internal.Tests.ReusableSliceBufferTest", From d57dec1c7dc19a245ddc74971781b53610bda4cc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:03:18 -0700 Subject: [PATCH 017/120] improve DefaultSerializationContextTest --- .../DefaultSerializationContextTest.cs | 151 ++++++++++++------ 1 file changed, 104 insertions(+), 47 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs index 4d09d80bb72..aa7631587be 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs @@ -17,9 +17,6 @@ #endregion using System; -using System.Buffers; -using System.Collections.Generic; -using System.Runtime.InteropServices; using Grpc.Core; using Grpc.Core.Internal; using Grpc.Core.Utils; @@ -32,22 +29,28 @@ namespace Grpc.Core.Internal.Tests [TestCase] public void CompleteAllowedOnlyOnce() { - var context = new DefaultSerializationContext(); - var buffer = GetTestBuffer(10); + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + var buffer = GetTestBuffer(10); - context.Complete(buffer); - Assert.Throws(typeof(InvalidOperationException), () => context.Complete(buffer)); - Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + context.Complete(buffer); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete(buffer)); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + } } [TestCase] public void CompleteAllowedOnlyOnce2() { - var context = new DefaultSerializationContext(); + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; - context.Complete(); - Assert.Throws(typeof(InvalidOperationException), () => context.Complete(GetTestBuffer(10))); - Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + context.Complete(); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete(GetTestBuffer(10))); + Assert.Throws(typeof(InvalidOperationException), () => context.Complete()); + } } [TestCase(0)] @@ -57,13 +60,16 @@ namespace Grpc.Core.Internal.Tests [TestCase(1000)] public void ByteArrayPayload(int payloadSize) { - var context = new DefaultSerializationContext(); - var origPayload = GetTestBuffer(payloadSize); + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + var origPayload = GetTestBuffer(payloadSize); - context.Complete(origPayload); + context.Complete(origPayload); - var nativePayload = context.GetPayload().ToByteArray(); - CollectionAssert.AreEqual(origPayload, nativePayload); + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + } } [TestCase(0)] @@ -73,16 +79,40 @@ namespace Grpc.Core.Internal.Tests [TestCase(1000)] public void BufferWriter_OneSegment(int payloadSize) { - var context = new DefaultSerializationContext(); - var origPayload = GetTestBuffer(payloadSize); + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + var origPayload = GetTestBuffer(payloadSize); - var bufferWriter = context.GetBufferWriter(); - origPayload.AsSpan().CopyTo(bufferWriter.GetSpan(payloadSize)); - bufferWriter.Advance(payloadSize); - // TODO: test that call to Complete() is required. + var bufferWriter = context.GetBufferWriter(); + origPayload.AsSpan().CopyTo(bufferWriter.GetSpan(payloadSize)); + bufferWriter.Advance(payloadSize); + // TODO: test that call to Complete() is required. - var nativePayload = context.GetPayload().ToByteArray(); - CollectionAssert.AreEqual(origPayload, nativePayload); + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + } + } + + [TestCase(0)] + [TestCase(1)] + [TestCase(10)] + [TestCase(100)] + [TestCase(1000)] + public void BufferWriter_OneSegment_GetMemory(int payloadSize) + { + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + var origPayload = GetTestBuffer(payloadSize); + + var bufferWriter = context.GetBufferWriter(); + origPayload.AsSpan().CopyTo(bufferWriter.GetMemory(payloadSize).Span); + bufferWriter.Advance(payloadSize); + + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); + } } [TestCase(1, 4)] // small slice size tests grpc_slice with inline data @@ -95,41 +125,68 @@ namespace Grpc.Core.Internal.Tests [TestCase(1000, 64)] public void BufferWriter_MultipleSegments(int payloadSize, int maxSliceSize) { - var context = new DefaultSerializationContext(); - var origPayload = GetTestBuffer(payloadSize); - - var bufferWriter = context.GetBufferWriter(); - for (int offset = 0; offset < payloadSize; offset += maxSliceSize) + using (var scope = NewDefaultSerializationContextScope()) { - var sliceSize = Math.Min(maxSliceSize, payloadSize - offset); - // we allocate last slice as too big intentionally to test that shrinking works - var dest = bufferWriter.GetSpan(maxSliceSize); + var context = scope.Context; + var origPayload = GetTestBuffer(payloadSize); + + var bufferWriter = context.GetBufferWriter(); + for (int offset = 0; offset < payloadSize; offset += maxSliceSize) + { + var sliceSize = Math.Min(maxSliceSize, payloadSize - offset); + // we allocate last slice as too big intentionally to test that shrinking works + var dest = bufferWriter.GetSpan(maxSliceSize); + + origPayload.AsSpan(offset, sliceSize).CopyTo(dest); + bufferWriter.Advance(sliceSize); + } + context.Complete(); - origPayload.AsSpan(offset, sliceSize).CopyTo(dest); - bufferWriter.Advance(sliceSize); + var nativePayload = context.GetPayload().ToByteArray(); + CollectionAssert.AreEqual(origPayload, nativePayload); } - context.Complete(); - - var nativePayload = context.GetPayload().ToByteArray(); - CollectionAssert.AreEqual(origPayload, nativePayload); - - context.GetPayload().Dispose(); // TODO: do it better.. (use the scope...) } - // AdjustTailSpace(0) if previous tail size is 0.... + [TestCase] + public void ContextIsReusable() + { + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + + var origPayload1 = GetTestBuffer(10); + context.Complete(origPayload1); + CollectionAssert.AreEqual(origPayload1, context.GetPayload().ToByteArray()); - // test that context.Complete() call is required... + context.Reset(); - // BufferWriter.GetMemory... (add refs to the original memory?) + var origPayload2 = GetTestBuffer(20); + + var bufferWriter = context.GetBufferWriter(); + origPayload2.AsSpan().CopyTo(bufferWriter.GetMemory(origPayload2.Length).Span); + bufferWriter.Advance(origPayload2.Length); + CollectionAssert.AreEqual(origPayload2, context.GetPayload().ToByteArray()); - // TODO: set payload and then get IBufferWriter should throw? + context.Reset(); + + // TODO: that's should be a null payload... + CollectionAssert.AreEqual(new byte[0], context.GetPayload().ToByteArray()); + } + } - // TODO: test Reset()... + //test ideas: - // TODO: destroy SliceBufferSafeHandles... (use usagescope...) + // test that context.Complete() call is required... + // set payload with Complete([]) and then get IBufferWriter should throw (because it's been completed already?) + // other ideas: + // AdjustTailSpace(0) if previous tail size is 0... (better for SliceBufferSafeHandle) + private DefaultSerializationContext.UsageScope NewDefaultSerializationContextScope() + { + return new DefaultSerializationContext.UsageScope(new DefaultSerializationContext()); + } private byte[] GetTestBuffer(int length) { From 389d759344a58e8ae2be85623905b11da0b8e969 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:19:33 -0700 Subject: [PATCH 018/120] improve doc comments for SerializationContext --- src/csharp/Grpc.Core.Api/SerializationContext.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core.Api/SerializationContext.cs b/src/csharp/Grpc.Core.Api/SerializationContext.cs index 79107040411..76f1951b68e 100644 --- a/src/csharp/Grpc.Core.Api/SerializationContext.cs +++ b/src/csharp/Grpc.Core.Api/SerializationContext.cs @@ -28,7 +28,7 @@ namespace Grpc.Core { /// /// Use the byte array as serialized form of current message and mark serialization process as complete. - /// Complete() can only be called once. By calling this method the caller gives up the ownership of the + /// Complete() can only be called once. By calling this method the caller gives up the ownership of the /// payload which must not be accessed afterwards. /// /// the serialized form of current message @@ -38,7 +38,8 @@ namespace Grpc.Core } /// - /// Expose serializer as buffer writer + /// Gets buffer writer that can be used to write the serialized data. Once serialization is finished, + /// Complete() needs to be called. /// public virtual IBufferWriter GetBufferWriter() { @@ -46,7 +47,7 @@ namespace Grpc.Core } /// - /// Complete the payload written so far. + /// Complete the payload written to the buffer writer. Complete() can only be called once. /// public virtual void Complete() { From 891dc61d8e238fa07e5323164bf00189bff42d3f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:28:29 -0700 Subject: [PATCH 019/120] move slice memory manager --- .../Grpc.Core/Internal/ReusableSliceBuffer.cs | 41 +-------- .../Grpc.Core/Internal/SliceMemoryManager.cs | 87 +++++++++++++++++++ 2 files changed, 88 insertions(+), 40 deletions(-) create mode 100644 src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs diff --git a/src/csharp/Grpc.Core/Internal/ReusableSliceBuffer.cs b/src/csharp/Grpc.Core/Internal/ReusableSliceBuffer.cs index 078e59e9d1b..eed6ba4ae15 100644 --- a/src/csharp/Grpc.Core/Internal/ReusableSliceBuffer.cs +++ b/src/csharp/Grpc.Core/Internal/ReusableSliceBuffer.cs @@ -101,45 +101,6 @@ namespace Grpc.Core.Internal { Next = next; } - } - - // Allow creating instances of Memory from Slice. - // Represents a chunk of native memory, but doesn't manage its lifetime. - // Instances of this class are reuseable - they can be reset to point to a different memory chunk. - // That is important to make the instances cacheable (rather then creating new instances - // the old ones will be reused to reduce GC pressure). - private class SliceMemoryManager : MemoryManager - { - private Slice slice; - - public void Reset(Slice slice) - { - this.slice = slice; - } - - public void Reset() - { - Reset(new Slice(IntPtr.Zero, 0)); - } - - public override Span GetSpan() - { - return slice.ToSpanUnsafe(); - } - - public override MemoryHandle Pin(int elementIndex = 0) - { - throw new NotSupportedException(); - } - - public override void Unpin() - { - } - - protected override void Dispose(bool disposing) - { - // NOP - } - } + } } } diff --git a/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs b/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs new file mode 100644 index 00000000000..342d90df36c --- /dev/null +++ b/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs @@ -0,0 +1,87 @@ +#region Copyright notice and license + +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using Grpc.Core.Utils; +using System; +using System.Threading; + +using System.Buffers; + +namespace Grpc.Core.Internal +{ + internal class ReusableSliceBuffer + { + public const int MaxCachedSegments = 1024; // ~4MB payload for 4K slices + + readonly SliceSegment[] cachedSegments = new SliceSegment[MaxCachedSegments]; + int populatedSegmentCount; + + public ReadOnlySequence PopulateFrom(IBufferReader bufferReader) + { + populatedSegmentCount = 0; + long offset = 0; + SliceSegment prevSegment = null; + while (bufferReader.TryGetNextSlice(out Slice slice)) + { + // Initialize cached segment if still null or just allocate a new segment if we already reached MaxCachedSegments + var current = populatedSegmentCount < cachedSegments.Length ? cachedSegments[populatedSegmentCount] : new SliceSegment(); + if (current == null) + { + current = cachedSegments[populatedSegmentCount] = new SliceSegment(); + } + + current.Reset(slice, offset); + prevSegment?.SetNext(current); + + populatedSegmentCount ++; + offset += slice.Length; + prevSegment = current; + } + + // Not necessary for ending the ReadOnlySequence, but for making sure we + // don't keep more than MaxCachedSegments alive. + prevSegment?.SetNext(null); + + if (populatedSegmentCount == 0) + { + return ReadOnlySequence.Empty; + } + + var firstSegment = cachedSegments[0]; + var lastSegment = prevSegment; + return new ReadOnlySequence(firstSegment, 0, lastSegment, lastSegment.Memory.Length); + } + + public void Invalidate() + { + if (populatedSegmentCount == 0) + { + return; + } + var segment = cachedSegments[0]; + while (segment != null) + { + segment.Reset(new Slice(IntPtr.Zero, 0), 0); + var nextSegment = (SliceSegment) segment.Next; + segment.SetNext(null); + segment = nextSegment; + } + populatedSegmentCount = 0; + } + } +} From fb5411fba9d91f73814b6c107a268c374ad58721 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:30:28 -0700 Subject: [PATCH 020/120] support GetMemory() --- .../Grpc.Core/Internal/SliceBufferSafeHandle.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index 76a97f4a0a2..0ce37317f1a 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -39,6 +39,8 @@ namespace Grpc.Core.Internal private IntPtr tailSpacePtr; private int tailSpaceLen; + private SliceMemoryManager memoryManagerLazy; + private SliceBufferSafeHandle() { } @@ -63,14 +65,20 @@ namespace Grpc.Core.Internal GrpcPreconditions.CheckArgument(tailSpaceLen >= count); tailSpaceLen = tailSpaceLen - count; tailSpacePtr += count; + memoryManagerLazy?.Reset(); } // provides access to the "tail space" of this buffer. // Use GetSpan when possible for better efficiency. public Memory GetMemory(int sizeHint = 0) { - // TODO: implement - throw new NotImplementedException(); + GetSpan(sizeHint); + if (memoryManagerLazy == null) + { + memoryManagerLazy = new SliceMemoryManager(); + } + memoryManagerLazy.Reset(new Slice(tailSpacePtr, tailSpaceLen)); + return memoryManagerLazy.Memory; } // provides access to the "tail space" of this buffer. @@ -97,6 +105,7 @@ namespace Grpc.Core.Internal // deletes all the data in the slice buffer tailSpacePtr = IntPtr.Zero; tailSpaceLen = 0; + memoryManagerLazy?.Reset(); Native.grpcsharp_slice_buffer_reset_and_unref(this); } From 66cd7cbb8fce6136ead7fd05fe79356c2cf072c9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:31:01 -0700 Subject: [PATCH 021/120] improve default serialization context tests --- .../DefaultSerializationContextTest.cs | 23 +++++++++++++------ .../Internal/DefaultSerializationContext.cs | 9 +++++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs index aa7631587be..fcb12ae6656 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs @@ -87,7 +87,7 @@ namespace Grpc.Core.Internal.Tests var bufferWriter = context.GetBufferWriter(); origPayload.AsSpan().CopyTo(bufferWriter.GetSpan(payloadSize)); bufferWriter.Advance(payloadSize); - // TODO: test that call to Complete() is required. + context.Complete(); var nativePayload = context.GetPayload().ToByteArray(); CollectionAssert.AreEqual(origPayload, nativePayload); @@ -109,6 +109,7 @@ namespace Grpc.Core.Internal.Tests var bufferWriter = context.GetBufferWriter(); origPayload.AsSpan().CopyTo(bufferWriter.GetMemory(payloadSize).Span); bufferWriter.Advance(payloadSize); + context.Complete(); var nativePayload = context.GetPayload().ToByteArray(); CollectionAssert.AreEqual(origPayload, nativePayload); @@ -154,6 +155,8 @@ namespace Grpc.Core.Internal.Tests { var context = scope.Context; + Assert.Throws(typeof(NullReferenceException), () => context.GetPayload()); + var origPayload1 = GetTestBuffer(10); context.Complete(origPayload1); CollectionAssert.AreEqual(origPayload1, context.GetPayload().ToByteArray()); @@ -165,20 +168,26 @@ namespace Grpc.Core.Internal.Tests var bufferWriter = context.GetBufferWriter(); origPayload2.AsSpan().CopyTo(bufferWriter.GetMemory(origPayload2.Length).Span); bufferWriter.Advance(origPayload2.Length); + context.Complete(); CollectionAssert.AreEqual(origPayload2, context.GetPayload().ToByteArray()); context.Reset(); - // TODO: that's should be a null payload... - CollectionAssert.AreEqual(new byte[0], context.GetPayload().ToByteArray()); + Assert.Throws(typeof(NullReferenceException), () => context.GetPayload()); } } - //test ideas: - - // test that context.Complete() call is required... + [TestCase] + public void GetBufferWriterThrowsForCompletedContext() + { + using (var scope = NewDefaultSerializationContextScope()) + { + var context = scope.Context; + context.Complete(GetTestBuffer(10)); - // set payload with Complete([]) and then get IBufferWriter should throw (because it's been completed already?) + Assert.Throws(typeof(InvalidOperationException), () => context.GetBufferWriter()); + } + } // other ideas: // AdjustTailSpace(0) if previous tail size is 0... (better for SliceBufferSafeHandle) diff --git a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs index 6bf9da56264..4d45b5c684f 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSerializationContext.cs @@ -52,6 +52,7 @@ namespace Grpc.Core.Internal /// public override IBufferWriter GetBufferWriter() { + GrpcPreconditions.CheckState(!isComplete); return sliceBuffer; } @@ -67,6 +68,11 @@ namespace Grpc.Core.Internal internal SliceBufferSafeHandle GetPayload() { + if (!isComplete) + { + // mimic the legacy behavior when byte[] was used to represent the payload. + throw new NullReferenceException("No payload was set. Complete() needs to be called before payload can be used."); + } return sliceBuffer; } @@ -95,9 +101,6 @@ namespace Grpc.Core.Internal } public DefaultSerializationContext Context => context; - - // TODO: add Serialize method... - public void Dispose() { context.Reset(); From 532bdf7cd29f613fdfe2184b4c7035398def5353 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:35:00 -0700 Subject: [PATCH 022/120] fixup SliceMemoryManager --- .../Grpc.Core/Internal/SliceMemoryManager.cs | 74 +++++++------------ 1 file changed, 26 insertions(+), 48 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs b/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs index 342d90df36c..dad2d96bd75 100644 --- a/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs +++ b/src/csharp/Grpc.Core/Internal/SliceMemoryManager.cs @@ -24,64 +24,42 @@ using System.Buffers; namespace Grpc.Core.Internal { - internal class ReusableSliceBuffer + // Allow creating instances of Memory from Slice. + // Represents a chunk of native memory, but doesn't manage its lifetime. + // Instances of this class are reuseable - they can be reset to point to a different memory chunk. + // That is important to make the instances cacheable (rather then creating new instances + // the old ones will be reused to reduce GC pressure). + internal class SliceMemoryManager : MemoryManager { - public const int MaxCachedSegments = 1024; // ~4MB payload for 4K slices + private Slice slice; - readonly SliceSegment[] cachedSegments = new SliceSegment[MaxCachedSegments]; - int populatedSegmentCount; - - public ReadOnlySequence PopulateFrom(IBufferReader bufferReader) + public void Reset(Slice slice) { - populatedSegmentCount = 0; - long offset = 0; - SliceSegment prevSegment = null; - while (bufferReader.TryGetNextSlice(out Slice slice)) - { - // Initialize cached segment if still null or just allocate a new segment if we already reached MaxCachedSegments - var current = populatedSegmentCount < cachedSegments.Length ? cachedSegments[populatedSegmentCount] : new SliceSegment(); - if (current == null) - { - current = cachedSegments[populatedSegmentCount] = new SliceSegment(); - } - - current.Reset(slice, offset); - prevSegment?.SetNext(current); + this.slice = slice; + } - populatedSegmentCount ++; - offset += slice.Length; - prevSegment = current; - } + public void Reset() + { + Reset(new Slice(IntPtr.Zero, 0)); + } - // Not necessary for ending the ReadOnlySequence, but for making sure we - // don't keep more than MaxCachedSegments alive. - prevSegment?.SetNext(null); + public override Span GetSpan() + { + return slice.ToSpanUnsafe(); + } - if (populatedSegmentCount == 0) - { - return ReadOnlySequence.Empty; - } + public override MemoryHandle Pin(int elementIndex = 0) + { + throw new NotSupportedException(); + } - var firstSegment = cachedSegments[0]; - var lastSegment = prevSegment; - return new ReadOnlySequence(firstSegment, 0, lastSegment, lastSegment.Memory.Length); + public override void Unpin() + { } - public void Invalidate() + protected override void Dispose(bool disposing) { - if (populatedSegmentCount == 0) - { - return; - } - var segment = cachedSegments[0]; - while (segment != null) - { - segment.Reset(new Slice(IntPtr.Zero, 0), 0); - var nextSegment = (SliceSegment) segment.Next; - segment.SetNext(null); - segment = nextSegment; - } - populatedSegmentCount = 0; + // NOP } } } From 79c9aa081d7ee9cc6368edc66be8428fe54f0dc6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:38:45 -0700 Subject: [PATCH 023/120] add slice buffer safe handle tests --- .../Internal/SliceBufferSafeHandleTest.cs | 38 +++++++++++++++++++ src/csharp/tests.json | 1 + 2 files changed, 39 insertions(+) create mode 100644 src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs diff --git a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs new file mode 100644 index 00000000000..563187948d2 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs @@ -0,0 +1,38 @@ +#region Copyright notice and license + +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using System; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Internal.Tests +{ + public class SliceBufferSafeHandleTest + { + [TestCase] + public void BasicTest() + { + + } + + // other ideas: + // AdjustTailSpace(0) if previous tail size is 0... (better for SliceBufferSafeHandle) + } +} diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 75bda4c25ea..e18266ab9d7 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -13,6 +13,7 @@ "Grpc.Core.Internal.Tests.FakeBufferReaderManagerTest", "Grpc.Core.Internal.Tests.MetadataArraySafeHandleTest", "Grpc.Core.Internal.Tests.ReusableSliceBufferTest", + "Grpc.Core.Internal.Tests.SliceBufferSafeHandleTest", "Grpc.Core.Internal.Tests.SliceTest", "Grpc.Core.Internal.Tests.TimespecTest", "Grpc.Core.Internal.Tests.WellKnownStringsTest", From ec14872fc283ac36b6898ab1f9d0fad758d6329e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 14:48:36 -0700 Subject: [PATCH 024/120] address TODO" --- src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs b/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs index 99f92e12628..dbceb27baf9 100644 --- a/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ContextualMarshallerTest.cs @@ -52,8 +52,8 @@ namespace Grpc.Core.Tests } if (str == "SERIALIZE_TO_NULL") { - // TODO: test for not calling complete Complete() (that resulted in null payload before...) - // TODO: test for calling Complete(null byte array) + // for contextual marshaller, serializing to null payload corresponds + // to not calling the Complete() method in the serializer. return; } var bytes = System.Text.Encoding.UTF8.GetBytes(str); From ded29be883e888081174a9be88de4ce2618303af Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 15:43:57 -0700 Subject: [PATCH 025/120] slice buffer improvements --- .../Internal/SliceBufferSafeHandleTest.cs | 95 ++++++++++++++++++- .../Internal/SliceBufferSafeHandle.cs | 33 +++++-- 2 files changed, 115 insertions(+), 13 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs index 563187948d2..61c817dafc9 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs @@ -27,12 +27,99 @@ namespace Grpc.Core.Internal.Tests public class SliceBufferSafeHandleTest { [TestCase] - public void BasicTest() + public void Complete_EmptyBuffer() { - + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + sliceBuffer.Complete(); + CollectionAssert.AreEqual(new byte[0], sliceBuffer.ToByteArray()); + } } - // other ideas: - // AdjustTailSpace(0) if previous tail size is 0... (better for SliceBufferSafeHandle) + [TestCase] + public void Complete_TailSizeZero() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + var origPayload = GetTestBuffer(10); + origPayload.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload.Length)); + sliceBuffer.Advance(origPayload.Length); + // call complete where tail space size == 0 + sliceBuffer.Complete(); + CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray()); + } + } + + [TestCase] + public void Complete_TruncateTailSpace() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + var origPayload = GetTestBuffer(10); + var dest = sliceBuffer.GetSpan(origPayload.Length + 10); + origPayload.AsSpan().CopyTo(dest); + sliceBuffer.Advance(origPayload.Length); + // call complete where tail space needs to be truncated + sliceBuffer.Complete(); + CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray()); + } + } + + [TestCase] + public void SliceBufferIsReusable() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + var origPayload = GetTestBuffer(10); + origPayload.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload.Length)); + sliceBuffer.Advance(origPayload.Length); + sliceBuffer.Complete(); + CollectionAssert.AreEqual(origPayload, sliceBuffer.ToByteArray()); + + sliceBuffer.Reset(); + + var origPayload2 = GetTestBuffer(20); + origPayload2.AsSpan().CopyTo(sliceBuffer.GetSpan(origPayload2.Length)); + sliceBuffer.Advance(origPayload2.Length); + sliceBuffer.Complete(); + CollectionAssert.AreEqual(origPayload2, sliceBuffer.ToByteArray()); + + sliceBuffer.Reset(); + + CollectionAssert.AreEqual(new byte[0], sliceBuffer.ToByteArray()); + } + } + + [TestCase] + public void SliceBuffer_SizeHintZero() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + var destSpan = sliceBuffer.GetSpan(0); + Assert.IsTrue(destSpan.Length > 0); // some non-zero size memory is made available + + sliceBuffer.Reset(); + + var destMemory = sliceBuffer.GetMemory(0); + Assert.IsTrue(destMemory.Length > 0); + } + } + + // Advance() - multiple chunks... + + // other TODOS: + + // -- provide a null instance of SliceBufferSafeHandle + //-- order of UnsafeSerialize in AsyncCall methods... + + private byte[] GetTestBuffer(int length) + { + var testBuffer = new byte[length]; + for (int i = 0; i < testBuffer.Length; i++) + { + testBuffer[i] = (byte) i; + } + return testBuffer; + } } } diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index 0ce37317f1a..77c14f1d9fb 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -31,6 +31,7 @@ namespace Grpc.Core.Internal /// internal class SliceBufferSafeHandle : SafeHandleZeroIsInvalid, IBufferWriter { + const int DefaultTailSpaceSize = 4096; // default buffer to allocate if no size hint is provided static readonly NativeMethods Native = NativeMethods.Get(); static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); @@ -72,7 +73,7 @@ namespace Grpc.Core.Internal // Use GetSpan when possible for better efficiency. public Memory GetMemory(int sizeHint = 0) { - GetSpan(sizeHint); + EnsureBufferSpace(sizeHint); if (memoryManagerLazy == null) { memoryManagerLazy = new SliceMemoryManager(); @@ -84,13 +85,7 @@ namespace Grpc.Core.Internal // provides access to the "tail space" of this buffer. public unsafe Span GetSpan(int sizeHint = 0) { - GrpcPreconditions.CheckArgument(sizeHint >= 0); - if (tailSpaceLen < sizeHint) - { - // TODO: should we ignore the hint sometimes when - // available tail space is close enough to the sizeHint? - AdjustTailSpace(sizeHint); - } + EnsureBufferSpace(sizeHint); return new Span(tailSpacePtr.ToPointer(), tailSpaceLen); } @@ -135,7 +130,27 @@ namespace Grpc.Core.Internal return result; } - // Gets data of server_rpc_new completion. + private void EnsureBufferSpace(int sizeHint) + { + GrpcPreconditions.CheckArgument(sizeHint >= 0); + if (sizeHint == 0) + { + // if no hint is provided, keep the available space within some "reasonable" boundaries. + // This is quite a naive approach which could use some fine-tuning, but currently in most case we know + // the required buffer size in advance anyway, so this approach seems good enough for now. + if (tailSpaceLen < DefaultTailSpaceSize /2 ) + { + AdjustTailSpace(DefaultTailSpaceSize); + } + } + else if (tailSpaceLen < sizeHint) + { + // if hint is provided, always make sure we provide at least that much space + AdjustTailSpace(sizeHint); + } + } + + // make sure there's exactly requestedSize bytes of continguous buffer space at the end of this slice buffer private void AdjustTailSpace(int requestedSize) { GrpcPreconditions.CheckArgument(requestedSize >= 0); From 127d69383abc0c442625038be6d57522b35f20c6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 9 Aug 2019 16:00:41 -0700 Subject: [PATCH 026/120] better tests --- .../Internal/SliceBufferSafeHandleTest.cs | 46 ++++++++++++++++++- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs index 61c817dafc9..5feb9a711da 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs @@ -105,10 +105,52 @@ namespace Grpc.Core.Internal.Tests } } - // Advance() - multiple chunks... + [TestCase(0)] + [TestCase(1000)] + public void SliceBuffer_BigPayload(int sizeHint) + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + var bigPayload = GetTestBuffer(4 * 1024 * 1024); + + int offset = 0; + while (offset < bigPayload.Length) + { + var destSpan = sliceBuffer.GetSpan(sizeHint); + int copySize = Math.Min(destSpan.Length, bigPayload.Length - offset); + bigPayload.AsSpan(offset, copySize).CopyTo(destSpan); + sliceBuffer.Advance(copySize); + offset += copySize; + } + + sliceBuffer.Complete(); + CollectionAssert.AreEqual(bigPayload, sliceBuffer.ToByteArray()); + } + } - // other TODOS: + [TestCase] + public void SliceBuffer_NegativeSizeHint() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + Assert.Throws(typeof(ArgumentException), () => sliceBuffer.GetSpan(-1)); + Assert.Throws(typeof(ArgumentException), () => sliceBuffer.GetMemory(-1)); + } + } + + [TestCase] + public void SliceBuffer_AdvanceBadArg() + { + using (var sliceBuffer = SliceBufferSafeHandle.Create()) + { + int size = 10; + var destSpan = sliceBuffer.GetSpan(size); + Assert.Throws(typeof(ArgumentException), () => sliceBuffer.Advance(size + 1)); + Assert.Throws(typeof(ArgumentException), () => sliceBuffer.Advance(-1)); + } + } + // TODO: other TODOs // -- provide a null instance of SliceBufferSafeHandle //-- order of UnsafeSerialize in AsyncCall methods... From ec351c1ac2329be334adb93a46f04c2a80a1ec39 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 12 Aug 2019 17:00:12 -0700 Subject: [PATCH 027/120] reorder UnsafeSerialize --- .../Internal/SliceBufferSafeHandleTest.cs | 1 - src/csharp/Grpc.Core/Internal/AsyncCall.cs | 31 +++++++++---------- .../Grpc.Core/Internal/AsyncCallBase.cs | 2 +- 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs index 5feb9a711da..89d5f187a22 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs @@ -152,7 +152,6 @@ namespace Grpc.Core.Internal.Tests // TODO: other TODOs // -- provide a null instance of SliceBufferSafeHandle - //-- order of UnsafeSerialize in AsyncCall methods... private byte[] GetTestBuffer(int length) { diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 4111c5347ce..830a1f4edc6 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -160,16 +160,15 @@ namespace Grpc.Core.Internal halfcloseRequested = true; readingDone = true; - //var payload = UnsafeSerialize(msg); - - unaryResponseTcs = new TaskCompletionSource(); using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) - using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { - var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? - - call.StartUnary(UnaryResponseClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); - callStartedOk = true; + var payload = UnsafeSerialize(msg, serializationScope.Context); + unaryResponseTcs = new TaskCompletionSource(); + using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) + { + call.StartUnary(UnaryResponseClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); + callStartedOk = true; + } } return unaryResponseTcs.Task; @@ -238,17 +237,15 @@ namespace Grpc.Core.Internal halfcloseRequested = true; - //var payload = UnsafeSerialize(msg); - - streamingResponseCallFinishedTcs = new TaskCompletionSource(); - using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) - using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) { - var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? - - call.StartServerStreaming(ReceivedStatusOnClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); - callStartedOk = true; + var payload = UnsafeSerialize(msg, serializationScope.Context); + streamingResponseCallFinishedTcs = new TaskCompletionSource(); + using (var metadataArray = MetadataArraySafeHandle.Create(details.Options.Headers)) + { + call.StartServerStreaming(ReceivedStatusOnClientCallback, payload, GetWriteFlagsForCall(), metadataArray, details.Options.Flags); + callStartedOk = true; + } } call.StartReceiveInitialMetadata(ReceivedResponseHeadersCallback); } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index bd4b0d81832..252fe114506 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -117,7 +117,7 @@ namespace Grpc.Core.Internal { using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) { - var payload = UnsafeSerialize(msg, serializationScope.Context); // do before metadata array? + var payload = UnsafeSerialize(msg, serializationScope.Context); lock (myLock) { GrpcPreconditions.CheckState(started); From 36dcea650dc333ca0ba19942f01742f4bec602f9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 12 Aug 2019 17:03:33 -0700 Subject: [PATCH 028/120] address a TODO --- src/csharp/ext/grpc_csharp_ext.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 89391e67e15..9ffc5591d8b 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -1238,8 +1238,9 @@ grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t avail } grpc_slice new_slice = grpc_slice_malloc(requested_tail_space); - // TODO: this always adds as a new slice entry into the sb, but it doesn't have the problem of - // sometimes splitting the continguous new_slice across two different slices (like grpc_slice_buffer_add would) + // grpc_slice_buffer_add_indexed always adds as a new slice entry into the sb (which is suboptimal in some cases) + // but it doesn't have the problem of sometimes splitting the continguous new_slice across two different slices + // (like grpc_slice_buffer_add would) grpc_slice_buffer_add_indexed(buffer, new_slice); } From dd5515870747ecdc5cfd92398aa02fd47b667132 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 12 Aug 2019 17:20:27 -0700 Subject: [PATCH 029/120] address TODO in SendMessageBenchmark --- .../Grpc.Microbenchmarks/SendMessageBenchmark.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs b/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs index 76c59ca579c..f850a0a006f 100644 --- a/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs +++ b/src/csharp/Grpc.Microbenchmarks/SendMessageBenchmark.cs @@ -50,18 +50,21 @@ namespace Grpc.Microbenchmarks var call = CreateFakeCall(cq); var sendCompletionCallback = new NopSendCompletionCallback(); - var payload = SliceBufferSafeHandle.Create(); - payload.GetSpan(PayloadSize); - payload.Advance(PayloadSize); + var sliceBuffer = SliceBufferSafeHandle.Create(); var writeFlags = default(WriteFlags); for (int i = 0; i < Iterations; i++) { - // TODO: sending for the first time actually steals the slices... - call.StartSendMessage(sendCompletionCallback, payload, writeFlags, false); + // SendMessage steals the slices from the slice buffer, so we need to repopulate in each iteration. + sliceBuffer.Reset(); + sliceBuffer.GetSpan(PayloadSize); + sliceBuffer.Advance(PayloadSize); + + call.StartSendMessage(sendCompletionCallback, sliceBuffer, writeFlags, false); var callback = completionRegistry.Extract(completionRegistry.LastRegisteredKey); callback.OnComplete(true); } + sliceBuffer.Dispose(); cq.Dispose(); } From 9ae5c5df245a2ed683de6028e3aa55bb88723269 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 12 Aug 2019 17:35:00 -0700 Subject: [PATCH 030/120] address a TODO --- .../Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs | 3 --- src/csharp/Grpc.Core/Internal/AsyncCallServer.cs | 2 +- src/csharp/Grpc.Core/Internal/CallSafeHandle.cs | 7 ------- src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs index 89d5f187a22..76387478312 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/SliceBufferSafeHandleTest.cs @@ -150,9 +150,6 @@ namespace Grpc.Core.Internal.Tests } } - // TODO: other TODOs - // -- provide a null instance of SliceBufferSafeHandle - private byte[] GetTestBuffer(int length) { var testBuffer = new byte[length]; diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index e0bb41e15dc..58bc40b0ace 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -131,7 +131,7 @@ namespace Grpc.Core.Internal { using (var serializationScope = DefaultSerializationContext.GetInitializedThreadLocalScope()) { - var payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response, serializationScope.Context) : null; + var payload = optionalWrite.HasValue ? UnsafeSerialize(optionalWrite.Value.Response, serializationScope.Context) : SliceBufferSafeHandle.NullInstance; var writeFlags = optionalWrite.HasValue ? optionalWrite.Value.WriteFlags : default(WriteFlags); lock (myLock) diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index cfcab5dc692..7fadc1d8b47 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -131,13 +131,6 @@ namespace Grpc.Core.Internal public void StartSendStatusFromServer(ISendStatusFromServerCompletionCallback callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, SliceBufferSafeHandle optionalPayload, WriteFlags writeFlags) { - // TODO: optionalPayload == null -> pass null SliceBufferSafeHandle - // do this properly - if (optionalPayload == null) - { - optionalPayload = SliceBufferSafeHandle.NullInstance; - } - using (completionQueue.NewScope()) { var ctx = completionQueue.CompletionRegistry.RegisterBatchCompletion(CompletionHandler_ISendStatusFromServerCompletionCallback, callback); diff --git a/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs b/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs index e5bac1967c9..8aa2e96832a 100644 --- a/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs +++ b/src/csharp/Grpc.Microbenchmarks/Utf8Encode.cs @@ -117,7 +117,7 @@ namespace Grpc.Microbenchmarks { for (int i = 0; i < Iterations; i++) { - call.StartSendStatusFromServer(this, status, metadata, false, null, WriteFlags.NoCompress); + call.StartSendStatusFromServer(this, status, metadata, false, SliceBufferSafeHandle.NullInstance, WriteFlags.NoCompress); } } From 2f5464754516f2922e1a1d2711b0a90f3dc25070 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 12 Aug 2019 20:38:49 -0400 Subject: [PATCH 031/120] clang format --- src/csharp/ext/grpc_csharp_ext.c | 93 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 9ffc5591d8b..2360c9e1d5f 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -41,9 +41,10 @@ #define GPR_CALLTYPE #endif -static grpc_byte_buffer* grpcsharp_create_byte_buffer_from_stolen_slices(grpc_slice_buffer* slice_buffer) { +static grpc_byte_buffer* grpcsharp_create_byte_buffer_from_stolen_slices( + grpc_slice_buffer* slice_buffer) { grpc_byte_buffer* bb = - (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); + (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); memset(bb, 0, sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; @@ -587,8 +588,8 @@ static grpc_call_error grpcsharp_call_start_batch(grpc_call* call, } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( - grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, - uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, + grpc_slice_buffer* send_buffer, uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { /* TODO: don't use magic number */ grpc_op ops[6]; @@ -603,7 +604,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( ops[0].reserved = NULL; ops[1].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); + ctx->send_message = + grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[1].data.send_message.send_message = ctx->send_message; ops[1].flags = write_flags; ops[1].reserved = NULL; @@ -640,8 +642,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_unary( /* Only for testing. Shortcircuits the unary call logic and only echoes the message as if it was received from the server */ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_test_call_start_unary_echo( - grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, - uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, + grpc_slice_buffer* send_buffer, uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { // prepare as if we were performing a normal RPC. grpc_byte_buffer* send_message = @@ -698,8 +700,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_client_streaming( } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( - grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, - uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, + grpc_slice_buffer* send_buffer, uint32_t write_flags, grpc_metadata_array* initial_metadata, uint32_t initial_metadata_flags) { /* TODO: don't use magic number */ grpc_op ops[4]; @@ -714,7 +716,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( ops[0].reserved = NULL; ops[1].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); + ctx->send_message = + grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[1].data.send_message.send_message = ctx->send_message; ops[1].flags = write_flags; ops[1].reserved = NULL; @@ -781,15 +784,16 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_recv_initial_metadata( } GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_message( - grpc_call* call, grpcsharp_batch_context* ctx, grpc_slice_buffer* send_buffer, - uint32_t write_flags, + grpc_call* call, grpcsharp_batch_context* ctx, + grpc_slice_buffer* send_buffer, uint32_t write_flags, int32_t send_empty_initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[2]; memset(ops, 0, sizeof(ops)); size_t nops = send_empty_initial_metadata ? 2 : 1; ops[0].op = GRPC_OP_SEND_MESSAGE; - ctx->send_message = grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); + ctx->send_message = + grpcsharp_create_byte_buffer_from_stolen_slices(send_buffer); ops[0].data.send_message.send_message = ctx->send_message; ops[0].flags = write_flags; ops[0].reserved = NULL; @@ -816,8 +820,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( grpc_call* call, grpcsharp_batch_context* ctx, grpc_status_code status_code, const char* status_details, size_t status_details_len, grpc_metadata_array* trailing_metadata, int32_t send_empty_initial_metadata, - grpc_slice_buffer* optional_send_buffer, - uint32_t write_flags) { + grpc_slice_buffer* optional_send_buffer, uint32_t write_flags) { /* TODO: don't use magic number */ grpc_op ops[3]; memset(ops, 0, sizeof(ops)); @@ -1188,9 +1191,9 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_redirect_log(grpcsharp_log_func func) { typedef void(GPR_CALLTYPE* test_callback_funcptr)(int32_t success); /* Slice buffer functionality */ -GPR_EXPORT grpc_slice_buffer* GPR_CALLTYPE -grpcsharp_slice_buffer_create() { - grpc_slice_buffer* slice_buffer = (grpc_slice_buffer*)gpr_malloc(sizeof(grpc_slice_buffer)); +GPR_EXPORT grpc_slice_buffer* GPR_CALLTYPE grpcsharp_slice_buffer_create() { + grpc_slice_buffer* slice_buffer = + (grpc_slice_buffer*)gpr_malloc(sizeof(grpc_slice_buffer)); grpc_slice_buffer_init(slice_buffer); return slice_buffer; } @@ -1212,44 +1215,40 @@ grpcsharp_slice_buffer_slice_count(grpc_slice_buffer* buffer) { } GPR_EXPORT void GPR_CALLTYPE -grpcsharp_slice_buffer_slice_peek(grpc_slice_buffer* buffer, size_t index, size_t* slice_len, uint8_t** slice_data_ptr) { +grpcsharp_slice_buffer_slice_peek(grpc_slice_buffer* buffer, size_t index, + size_t* slice_len, uint8_t** slice_data_ptr) { GPR_ASSERT(buffer->count > index); grpc_slice* slice_ptr = &buffer->slices[index]; *slice_len = GRPC_SLICE_LENGTH(*slice_ptr); *slice_data_ptr = GRPC_SLICE_START_PTR(*slice_ptr); } -GPR_EXPORT void* GPR_CALLTYPE -grpcsharp_slice_buffer_adjust_tail_space(grpc_slice_buffer* buffer, size_t available_tail_space, +GPR_EXPORT void* GPR_CALLTYPE grpcsharp_slice_buffer_adjust_tail_space( + grpc_slice_buffer* buffer, size_t available_tail_space, size_t requested_tail_space) { - - if (available_tail_space == requested_tail_space) { - // nothing to do - } - else if (available_tail_space >= requested_tail_space) - { - grpc_slice_buffer_trim_end(buffer, available_tail_space - requested_tail_space, NULL); + if (available_tail_space == requested_tail_space) { + // nothing to do + } else if (available_tail_space >= requested_tail_space) { + grpc_slice_buffer_trim_end( + buffer, available_tail_space - requested_tail_space, NULL); + } else { + if (available_tail_space > 0) { + grpc_slice_buffer_trim_end(buffer, available_tail_space, NULL); } - else - { - if (available_tail_space > 0) - { - grpc_slice_buffer_trim_end(buffer, available_tail_space, NULL); - } - grpc_slice new_slice = grpc_slice_malloc(requested_tail_space); - // grpc_slice_buffer_add_indexed always adds as a new slice entry into the sb (which is suboptimal in some cases) - // but it doesn't have the problem of sometimes splitting the continguous new_slice across two different slices - // (like grpc_slice_buffer_add would) - grpc_slice_buffer_add_indexed(buffer, new_slice); - } - - if (buffer->count == 0) - { - return NULL; - } - grpc_slice* last_slice = &(buffer->slices[buffer->count - 1]); - return GRPC_SLICE_END_PTR(*last_slice) - requested_tail_space; + grpc_slice new_slice = grpc_slice_malloc(requested_tail_space); + // grpc_slice_buffer_add_indexed always adds as a new slice entry into the + // sb (which is suboptimal in some cases) but it doesn't have the problem of + // sometimes splitting the continguous new_slice across two different slices + // (like grpc_slice_buffer_add would) + grpc_slice_buffer_add_indexed(buffer, new_slice); + } + + if (buffer->count == 0) { + return NULL; + } + grpc_slice* last_slice = &(buffer->slices[buffer->count - 1]); + return GRPC_SLICE_END_PTR(*last_slice) - requested_tail_space; } /* Version info */ From 09c55da6c2a2de682fa31acd0d2d313109cdb353 Mon Sep 17 00:00:00 2001 From: Christopher Warrington Date: Tue, 7 May 2019 12:14:40 -0700 Subject: [PATCH 032/120] Update Google Benchmark v1.5.0 to get CMake < 3.6 fix Google Benchmark v1.4.1 uses a CMake feature that is only in version >= 3.6. This was an inadvertent change in Google Benchmark (too high of a version) that has been [fixed upstream][1] in v1.5.0. Google Benchmark v1.5.0 now requires CMake >= 3.5.1. [Another PR][2] will bump gRPC's minimum version as well. [1]: https://github.com/google/benchmark/commit/505be96ab23056580a3a2315abba048f4428b04e [2]: https://github.com/grpc/grpc/pull/19467 --- third_party/benchmark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/benchmark b/third_party/benchmark index e776aa0275e..090faecb454 160000 --- a/third_party/benchmark +++ b/third_party/benchmark @@ -1 +1 @@ -Subproject commit e776aa0275e293707b6a0901e0e8d8a8a3679508 +Subproject commit 090faecb454fbd6e6e17a75ef8146acb037118d4 From 5294f49d11d27773904728614a78ee27ee0f10d7 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 23 Aug 2019 15:33:52 -0700 Subject: [PATCH 033/120] Init needs to be called in case of bad creds --- src/cpp/client/create_channel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index ca7038b8893..c6041edcb36 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -38,7 +38,7 @@ std::shared_ptr CreateCustomChannelImpl( const std::shared_ptr& creds, const grpc::ChannelArguments& args) { grpc::GrpcLibraryCodegen - init_lib; // We need to call init in case of a bad creds. + init_lib; // We need to call init in case of bad creds. return creds ? creds->CreateChannelImpl(target, args) : grpc::CreateChannelInternal( "", @@ -69,6 +69,8 @@ std::shared_ptr CreateCustomChannelWithInterceptors( std::vector< std::unique_ptr> interceptor_creators) { + grpc::GrpcLibraryCodegen + init_lib; // We need to call init in case of bad creds. return creds ? creds->CreateChannelWithInterceptors( target, args, std::move(interceptor_creators)) : grpc::CreateChannelInternal( From 64b8ce5ef2e8987e6a4901bf8f152f3b62532a74 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 26 Aug 2019 10:46:47 -0400 Subject: [PATCH 034/120] enable grpc-dotnet client compression interop tests --- tools/run_tests/run_interop_tests.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index d35723c917e..0ec4478fcc8 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -207,14 +207,13 @@ class AspNetCoreLanguage: return {} def unimplemented_test_cases(self): - return _SKIP_COMPRESSION + \ - ['compute_engine_creds'] + \ + return ['compute_engine_creds'] + \ ['jwt_token_creds'] + \ _SKIP_GOOGLE_DEFAULT_CREDS + \ _SKIP_COMPUTE_ENGINE_CHANNEL_CREDS def unimplemented_test_cases_server(self): - return _SKIP_COMPRESSION + return _SKIP_SERVER_COMPRESSION def __str__(self): return 'aspnetcore' From 426450cd82b9cc0edc7983049791904e327d49e8 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 2 Aug 2019 11:04:28 -0700 Subject: [PATCH 035/120] Implement dual testing --- BUILD | 2 +- bazel/grpc_python_deps.bzl | 9 ++ bazel/python_rules.bzl | 26 ++++++ .../grpcio_tests/tests/unit/BUILD.bazel | 4 +- third_party/py/BUILD.tpl | 49 +++++----- third_party/py/python_configure.bzl | 92 +++++++++++-------- third_party/py/remote.BUILD.tpl | 10 -- third_party/py/variety.tpl | 26 ++++++ tools/bazel.rc | 4 - 9 files changed, 142 insertions(+), 80 deletions(-) delete mode 100644 third_party/py/remote.BUILD.tpl create mode 100644 third_party/py/variety.tpl diff --git a/BUILD b/BUILD index f2a6f67f69f..74e1849629d 100644 --- a/BUILD +++ b/BUILD @@ -65,7 +65,7 @@ config_setting( config_setting( name = "python3", - values = {"python_path": "python3"}, + flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, ) config_setting( diff --git a/bazel/grpc_python_deps.bzl b/bazel/grpc_python_deps.bzl index 4e7cc1537fa..2a439bdf226 100644 --- a/bazel/grpc_python_deps.bzl +++ b/bazel/grpc_python_deps.bzl @@ -47,6 +47,15 @@ def grpc_python_deps(): remote = "https://github.com/bazelbuild/rules_python.git", ) + + if "rules_python" not in native.existing_rules(): + http_archive( + name = "rules_python", + url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip", + sha256 = "f7402f11691d657161f871e11968a984e5b48b023321935f5a55d7e56cf4758a", + strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552", + ) + python_configure(name = "local_config_python") native.bind( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 12f51f8b172..e7e9e597b05 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -178,3 +178,29 @@ def py_grpc_library( deps = [Label("//src/python/grpcio/grpc:grpcio")] + deps, **kwargs ) + + +def py2and3_test(name, + py_test = native.py_test, + **kwargs): + if "python_version" in kwargs: + fail("Cannot specify 'python_version' in py2and3_test.") + + names = [name + suffix for suffix in (".python2", ".python3")] + python_versions = ["PY2", "PY3"] + for case_name, python_version in zip(names, python_versions): + py_test( + name = case_name, + python_version = python_version, + **kwargs + ) + + suite_kwargs = {} + if "visibility" in kwargs: + suite_kwargs["visibility"] = kwargs["visibility"] + + native.test_suite( + name = name, + tests = names, + **suite_kwargs + ) diff --git a/src/python/grpcio_tests/tests/unit/BUILD.bazel b/src/python/grpcio_tests/tests/unit/BUILD.bazel index 49203b7fa16..587d8cb246f 100644 --- a/src/python/grpcio_tests/tests/unit/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/BUILD.bazel @@ -1,3 +1,5 @@ +load("//bazel:python_rules.bzl", "py2and3_test") + package(default_visibility = ["//visibility:public"]) GRPCIO_TESTS_UNIT = [ @@ -80,7 +82,7 @@ py_library( ) [ - py_test( + py2and3_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/third_party/py/BUILD.tpl b/third_party/py/BUILD.tpl index 2283c573bc3..8f010f85a03 100644 --- a/third_party/py/BUILD.tpl +++ b/third_party/py/BUILD.tpl @@ -2,35 +2,36 @@ package(default_visibility=["//visibility:public"]) -# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib -# See https://docs.python.org/3/extending/windows.html -cc_import( - name="python_lib", - interface_library=select({ - ":windows": ":python_import_lib", - # A placeholder for Unix platforms which makes --no_build happy. - "//conditions:default": "not-existing.lib", - }), - system_provided=1, -) - -cc_library( - name="python_headers", - hdrs=[":python_include"], - deps=select({ - ":windows": [":python_lib"], - "//conditions:default": [], - }), - includes=["python_include"], -) - config_setting( name="windows", values={"cpu": "x64_windows"}, visibility=["//visibility:public"], ) -%{PYTHON_INCLUDE_GENRULE} -%{PYTHON_IMPORT_LIB_GENRULE} +config_setting( + name="python2", + flag_values = {"@rules_python//python:python_version": "PY2"} +) + +config_setting( + name="python3", + flag_values = {"@rules_python//python:python_version": "PY3"} +) +cc_library( + name = "python_lib", + deps = select({ + ":python2": ["//_python2:_python2_lib"], + ":python3": ["//_python3:_python3_lib"], + "//conditions:default": ["not-existing.lib"], + }) +) +cc_library( + name = "python_headers", + deps = select({ + ":python2": ["//_python2:_python2_headers"], + ":python3": ["//_python3:_python3_headers"], + "//conditions:default": ["not-existing.headers"], + }) +) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index e6fa5ed10e9..a2f0c7918d2 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -3,14 +3,15 @@ `python_configure` depends on the following environment variables: - * `PYTHON_BIN_PATH`: location of python binary. - * `PYTHON_LIB_PATH`: Location of python libraries. + * `PYTHON2_BIN_PATH`: location of python binary. + * `PYTHON2_LIB_PATH`: Location of python libraries. """ _BAZEL_SH = "BAZEL_SH" -_PYTHON_BIN_PATH = "PYTHON_BIN_PATH" -_PYTHON_LIB_PATH = "PYTHON_LIB_PATH" -_PYTHON_CONFIG_REPO = "PYTHON_CONFIG_REPO" +_PYTHON2_BIN_PATH = "PYTHON2_BIN_PATH" +_PYTHON2_LIB_PATH = "PYTHON2_LIB_PATH" +_PYTHON3_BIN_PATH = "PYTHON3_BIN_PATH" +_PYTHON3_LIB_PATH = "PYTHON3_LIB_PATH" def _tpl(repository_ctx, tpl, substitutions={}, out=None): @@ -136,9 +137,9 @@ def _symlink_genrule_for_dir(repository_ctx, "\n".join(outs)) -def _get_python_bin(repository_ctx): +def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): """Gets the python bin path.""" - python_bin = repository_ctx.os.environ.get(_PYTHON_BIN_PATH, 'python') + python_bin = repository_ctx.os.environ.get(bin_path_key, default_bin_path) if not repository_ctx.path(python_bin).exists: # It's a command, use 'which' to find its path. python_bin_path = repository_ctx.which(python_bin) @@ -150,7 +151,7 @@ def _get_python_bin(repository_ctx): _fail("Cannot find python in PATH, please make sure " + "python is installed and add its directory in PATH, or --define " + "%s='/something/else'.\nPATH=%s" % - (_PYTHON_BIN_PATH, repository_ctx.os.environ.get("PATH", ""))) + (bin_path_key, repository_ctx.os.environ.get("PATH", ""))) def _get_bash_bin(repository_ctx): @@ -170,9 +171,9 @@ def _get_bash_bin(repository_ctx): (_BAZEL_SH, repository_ctx.os.environ.get("PATH", ""))) -def _get_python_lib(repository_ctx, python_bin): +def _get_python_lib(repository_ctx, python_bin, lib_path_key): """Gets the python lib path.""" - python_lib = repository_ctx.os.environ.get(_PYTHON_LIB_PATH) + python_lib = repository_ctx.os.environ.get(lib_path_key) if python_lib != None: return python_lib print_lib = ( @@ -202,13 +203,13 @@ def _check_python_lib(repository_ctx, python_lib): _fail("Invalid python library path: %s" % python_lib) -def _check_python_bin(repository_ctx, python_bin): +def _check_python_bin(repository_ctx, python_bin, bin_path_key): """Checks the python bin path.""" cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin) result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) if result.return_code == 1: _fail("--define %s='%s' is not executable. Is it the python binary?" % - (_PYTHON_BIN_PATH, python_bin)) + (bin_path_key, python_bin)) def _get_python_include(repository_ctx, python_bin): @@ -222,11 +223,11 @@ def _get_python_include(repository_ctx, python_bin): error_msg="Problem getting python include path.", error_details=( "Is the Python binary path set up right? " + "(See ./configure or " - + _PYTHON_BIN_PATH + ".) " + "Is distutils installed?")) + + _PYTHON2_BIN_PATH + ".) " + "Is distutils installed?")) return result.stdout.splitlines()[0] -def _get_python_import_lib_name(repository_ctx, python_bin): +def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key): """Get Python import library name (pythonXY.lib) on Windows.""" result = _execute( repository_ctx, [ @@ -236,66 +237,77 @@ def _get_python_import_lib_name(repository_ctx, python_bin): ], error_msg="Problem getting python import library.", error_details=("Is the Python binary path set up right? " + - "(See ./configure or " + _PYTHON_BIN_PATH + ".) ")) + "(See ./configure or " + bin_path_key + ".) ")) return result.stdout.splitlines()[0] -def _create_local_python_repository(repository_ctx): +# TODO(rbellevi): Rename. +def _create_local_python_repository(repository_ctx, + variety_name, + bin_path_key, + default_bin_path, + lib_path_key): """Creates the repository containing files set up to build with Python.""" - python_bin = _get_python_bin(repository_ctx) - _check_python_bin(repository_ctx, python_bin) - python_lib = _get_python_lib(repository_ctx, python_bin) + python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path) + _check_python_bin(repository_ctx, python_bin, bin_path_key) + python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) _check_python_lib(repository_ctx, python_lib) python_include = _get_python_include(repository_ctx, python_bin) python_include_rule = _symlink_genrule_for_dir( - repository_ctx, python_include, 'python_include', 'python_include') + repository_ctx, python_include, '{}_include'.format(variety_name), + '{}_include'.format(variety_name)) python_import_lib_genrule = "" # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib # See https://docs.python.org/3/extending/windows.html if _is_windows(repository_ctx): python_include = _normalize_path(python_include) - python_import_lib_name = _get_python_import_lib_name( + python_import_lib_name = _get_python_import_lib_name, bin_path_key( repository_ctx, python_bin) python_import_lib_src = python_include.rsplit( '/', 1)[0] + "/libs/" + python_import_lib_name python_import_lib_genrule = _symlink_genrule_for_dir( - repository_ctx, None, '', 'python_import_lib', + repository_ctx, None, '', '{}_import_lib'.format(variety_name), [python_import_lib_src], [python_import_lib_name]) _tpl( - repository_ctx, "BUILD", { + repository_ctx, "variety", { "%{PYTHON_INCLUDE_GENRULE}": python_include_rule, "%{PYTHON_IMPORT_LIB_GENRULE}": python_import_lib_genrule, - }) - - -def _create_remote_python_repository(repository_ctx, remote_config_repo): - """Creates pointers to a remotely configured repo set up to build with Python. - """ - _tpl(repository_ctx, "remote.BUILD", { - "%{REMOTE_PYTHON_REPO}": remote_config_repo, - }, "BUILD") + "%{VARIETY_NAME}": variety_name, + }, + out="{}/BUILD".format(variety_name)) +# TODO(rbellevi): Remove def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" - if _PYTHON_CONFIG_REPO in repository_ctx.os.environ: - _create_remote_python_repository( - repository_ctx, repository_ctx.os.environ[_PYTHON_CONFIG_REPO]) - else: - _create_local_python_repository(repository_ctx) + _create_local_python_repository(repository_ctx, + "_python2", + _PYTHON2_BIN_PATH, + "python", + _PYTHON2_LIB_PATH) + _create_local_python_repository(repository_ctx, + "_python3", + _PYTHON3_BIN_PATH, + "python3", + _PYTHON3_LIB_PATH) + _tpl(repository_ctx, "BUILD") python_configure = repository_rule( implementation=_python_autoconf_impl, environ=[ _BAZEL_SH, - _PYTHON_BIN_PATH, - _PYTHON_LIB_PATH, - _PYTHON_CONFIG_REPO, + _PYTHON2_BIN_PATH, + _PYTHON2_LIB_PATH, + _PYTHON3_BIN_PATH, + _PYTHON3_LIB_PATH, ], ) """Detects and configures the local Python. +It is expected that the system have both a working Python 2 and python 3 +installation + Add the following to your WORKSPACE FILE: ```python diff --git a/third_party/py/remote.BUILD.tpl b/third_party/py/remote.BUILD.tpl deleted file mode 100644 index 1bfe1f0bf65..00000000000 --- a/third_party/py/remote.BUILD.tpl +++ /dev/null @@ -1,10 +0,0 @@ -# Adapted with modifications from tensorflow/third_party/py/ - -package(default_visibility=["//visibility:public"]) - -alias( - name="python_headers", - actual="%{REMOTE_PYTHON_REPO}:python_headers", -) - - diff --git a/third_party/py/variety.tpl b/third_party/py/variety.tpl new file mode 100644 index 00000000000..0c466d6d8f0 --- /dev/null +++ b/third_party/py/variety.tpl @@ -0,0 +1,26 @@ +package(default_visibility=["//visibility:public"]) + +# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib +# See https://docs.python.org/3/extending/windows.html +cc_import( + name="%{VARIETY_NAME}_lib", + interface_library=select({ + "//:windows": ":%{VARIETY_NAME}_import_lib", + # A placeholder for Unix platforms which makes --no_build happy. + "//conditions:default": "not-existing.lib", + }), + system_provided=1, +) + +cc_library( + name="%{VARIETY_NAME}_headers", + hdrs=[":%{VARIETY_NAME}_include"], + deps=select({ + "//:windows": [":%{VARIETY_NAME}_lib"], + "//conditions:default": [], + }), + includes=["%{VARIETY_NAME}_include"], +) + +%{PYTHON_INCLUDE_GENRULE} +%{PYTHON_IMPORT_LIB_GENRULE} diff --git a/tools/bazel.rc b/tools/bazel.rc index b24f603ddda..fcbe9337b9f 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -82,7 +82,3 @@ build:basicprof --copt=-DNDEBUG build:basicprof --copt=-O2 build:basicprof --copt=-DGRPC_BASIC_PROFILER build:basicprof --copt=-DGRPC_TIMERS_RDTSC - -build:python3 --python_path=python3 -build:python3 --python_version=PY3 -build:python3 --action_env=PYTHON_BIN_PATH=python3 From b7667478cf18cfbfb907f71b31aa12e8c7f97371 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 25 Jun 2019 10:13:21 -0400 Subject: [PATCH 036/120] bump bazel version to 0.27 --- bazel/grpc_deps.bzl | 8 ++++---- templates/tools/dockerfile/bazel.include | 2 +- tools/bazel | 2 +- tools/dockerfile/test/bazel/Dockerfile | 2 +- tools/dockerfile/test/sanity/Dockerfile | 2 +- tools/remote_build/kokoro.bazelrc | 7 +++---- tools/remote_build/manual.bazelrc | 7 +++---- tools/remote_build/rbe_common.bazelrc | 2 +- 8 files changed, 15 insertions(+), 17 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 06323ff3f24..57021924725 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -176,11 +176,11 @@ def grpc_deps(): if "bazel_toolchains" not in native.existing_rules(): http_archive( name = "bazel_toolchains", - sha256 = "d968b414b32aa99c86977e1171645d31da2b52ac88060de3ac1e49932d5dcbf1", - strip_prefix = "bazel-toolchains-4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47", + sha256 = "872955b658113924eb1a3594b04d43238da47f4f90c17b76e8785709490dc041", + strip_prefix = "bazel-toolchains-1083686fde6032378d52b4c98044922cebde364e", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", ], ) diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index adde6ed4787..12a22785623 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -2,7 +2,7 @@ # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/bazel b/tools/bazel index 4f08d18c656..4d1d57f60d9 100755 --- a/tools/bazel +++ b/tools/bazel @@ -32,7 +32,7 @@ then exec -a "$0" "${BAZEL_REAL}" "$@" fi -VERSION=0.26.0 +VERSION=0.28.1 echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index 7e7903359e7..7141fb9c5f1 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -52,7 +52,7 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index ca786e264ed..e9c1b4bee12 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -98,7 +98,7 @@ ENV CLANG_TIDY=clang-tidy # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/remote_build/kokoro.bazelrc b/tools/remote_build/kokoro.bazelrc index 064e94b2e15..5c1b061bce3 100644 --- a/tools/remote_build/kokoro.bazelrc +++ b/tools/remote_build/kokoro.bazelrc @@ -16,13 +16,12 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=remotebuildexecution.googleapis.com -build --remote_executor=remotebuildexecution.googleapis.com -build --tls_enabled=true +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_executor=grpcs://remotebuildexecution.googleapis.com build --auth_enabled=true -build --bes_backend=buildeventservice.googleapis.com +build --bes_backend=grpcs://buildeventservice.googleapis.com build --bes_timeout=600s build --project_id=grpc-testing diff --git a/tools/remote_build/manual.bazelrc b/tools/remote_build/manual.bazelrc index fcd41f57521..c3c6af42877 100644 --- a/tools/remote_build/manual.bazelrc +++ b/tools/remote_build/manual.bazelrc @@ -17,9 +17,8 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=remotebuildexecution.googleapis.com -build --remote_executor=remotebuildexecution.googleapis.com -build --tls_enabled=true +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_executor=grpcs://remotebuildexecution.googleapis.com # Enable authentication. This will pick up application default credentials by # default. You can use --auth_credentials=some_file.json to use a service @@ -30,7 +29,7 @@ build --auth_enabled=true # Set flags for uploading to BES in order to view results in the Bazel Build # Results UI. -build --bes_backend="buildeventservice.googleapis.com" +build --bes_backend=grpcs://buildeventservice.googleapis.com build --bes_timeout=60s build --bes_results_url="https://source.cloud.google.com/results/invocations/" build --project_id=grpc-testing diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index 6baaf24732c..6236003fe17 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -87,4 +87,4 @@ build:ubsan --test_timeout=3600 # how to update the bazel toolchain for ubsan: # - check for the latest released version in https://github.com/bazelbuild/bazel-toolchains/tree/master/configs/experimental/ubuntu16_04_clang # - you might need to update the bazel_toolchains dependency in grpc_deps.bzl -build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.23.0/ubsan:toolchain +build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.28.0/ubsan:toolchain From 27990a5541db08d8cf63c433119b9744d8007b80 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 27 Aug 2019 17:47:52 -0700 Subject: [PATCH 037/120] Explicitly add python versions to examples. --- examples/python/auth/BUILD.bazel | 3 +++ examples/python/cancellation/BUILD.bazel | 3 +++ examples/python/compression/BUILD.bazel | 3 +++ examples/python/debug/BUILD.bazel | 3 +++ examples/python/errors/BUILD.bazel | 1 + examples/python/multiprocessing/BUILD | 3 +++ examples/python/wait_for_ready/BUILD.bazel | 1 + 7 files changed, 17 insertions(+) diff --git a/examples/python/auth/BUILD.bazel b/examples/python/auth/BUILD.bazel index cc454fdfdfe..72620ee46c5 100644 --- a/examples/python/auth/BUILD.bazel +++ b/examples/python/auth/BUILD.bazel @@ -39,6 +39,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_binary( @@ -51,6 +52,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_test( @@ -63,4 +65,5 @@ py_test( ":customized_auth_server", ":_credentials", ], + python_version = "PY3", ) diff --git a/examples/python/cancellation/BUILD.bazel b/examples/python/cancellation/BUILD.bazel index 17b1b20168e..b4451f60711 100644 --- a/examples/python/cancellation/BUILD.bazel +++ b/examples/python/cancellation/BUILD.bazel @@ -45,6 +45,7 @@ py_binary( "//external:six" ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_library( @@ -68,6 +69,7 @@ py_binary( "//:python3": [], }), srcs_version = "PY2AND3", + python_version = "PY3", ) py_test( @@ -78,4 +80,5 @@ py_test( ":server" ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/compression/BUILD.bazel b/examples/python/compression/BUILD.bazel index 9d5f6bb83ed..4141eda2ffd 100644 --- a/examples/python/compression/BUILD.bazel +++ b/examples/python/compression/BUILD.bazel @@ -21,6 +21,7 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_binary( @@ -32,6 +33,7 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_test( @@ -43,4 +45,5 @@ py_test( ":server", ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/debug/BUILD.bazel b/examples/python/debug/BUILD.bazel index 657ae860ae3..332991332f8 100644 --- a/examples/python/debug/BUILD.bazel +++ b/examples/python/debug/BUILD.bazel @@ -35,6 +35,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_binary( @@ -45,6 +46,7 @@ py_binary( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz", ], + python_version = "PY3", ) py_test( @@ -59,4 +61,5 @@ py_test( ":send_message", ":get_stats", ], + python_version = "PY3", ) diff --git a/examples/python/errors/BUILD.bazel b/examples/python/errors/BUILD.bazel index 4b779ddfcf1..367bd81925f 100644 --- a/examples/python/errors/BUILD.bazel +++ b/examples/python/errors/BUILD.bazel @@ -55,4 +55,5 @@ py_test( "../../../src/python/grpcio_status", "../../../src/python/grpcio_tests", ], + python_version = "PY3", ) diff --git a/examples/python/multiprocessing/BUILD b/examples/python/multiprocessing/BUILD index 490aea0c1e6..2503970bc80 100644 --- a/examples/python/multiprocessing/BUILD +++ b/examples/python/multiprocessing/BUILD @@ -42,6 +42,7 @@ py_binary( ":prime_proto_pb2_grpc", ], srcs_version = "PY3", + python_version = "PY3", ) py_binary( @@ -57,6 +58,7 @@ py_binary( "//:python3": [], }), srcs_version = "PY3", + python_version = "PY3", ) py_test( @@ -67,4 +69,5 @@ py_test( ":server" ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/wait_for_ready/BUILD.bazel b/examples/python/wait_for_ready/BUILD.bazel index f074ae7bb7f..9cbddd1a6e3 100644 --- a/examples/python/wait_for_ready/BUILD.bazel +++ b/examples/python/wait_for_ready/BUILD.bazel @@ -30,4 +30,5 @@ py_test( srcs = ["test/_wait_for_ready_example_test.py"], deps = [":wait_for_ready_example",], size = "small", + python_version = "PY3", ) From 1b69538d58f037732a4a359b878b8ae8e8d296f1 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 27 Aug 2019 17:51:45 -0700 Subject: [PATCH 038/120] Switch all tests to py2and3_test --- src/python/grpcio_tests/tests/channelz/BUILD.bazel | 4 +++- src/python/grpcio_tests/tests/health_check/BUILD.bazel | 3 ++- src/python/grpcio_tests/tests/interop/BUILD.bazel | 5 +++-- src/python/grpcio_tests/tests/reflection/BUILD.bazel | 3 ++- src/python/grpcio_tests/tests/status/BUILD.bazel | 3 ++- src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel | 3 ++- .../grpcio_tests/tests/unit/framework/foundation/BUILD.bazel | 3 ++- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/python/grpcio_tests/tests/channelz/BUILD.bazel b/src/python/grpcio_tests/tests/channelz/BUILD.bazel index 63513616e77..f4d246847f7 100644 --- a/src/python/grpcio_tests/tests/channelz/BUILD.bazel +++ b/src/python/grpcio_tests/tests/channelz/BUILD.bazel @@ -1,6 +1,8 @@ package(default_visibility = ["//visibility:public"]) -py_test( +load("//bazel:python_rules.bzl", "py2and3_test") + +py2and3_test( name = "channelz_servicer_test", srcs = ["_channelz_servicer_test.py"], main = "_channelz_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/health_check/BUILD.bazel b/src/python/grpcio_tests/tests/health_check/BUILD.bazel index 49f076be9a1..797b6a48e91 100644 --- a/src/python/grpcio_tests/tests/health_check/BUILD.bazel +++ b/src/python/grpcio_tests/tests/health_check/BUILD.bazel @@ -1,6 +1,7 @@ package(default_visibility = ["//visibility:public"]) +load("//bazel:python_rules.bzl", "py2and3_test") -py_test( +py2and3_test( name = "health_servicer_test", srcs = ["_health_servicer_test.py"], main = "_health_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/interop/BUILD.bazel b/src/python/grpcio_tests/tests/interop/BUILD.bazel index 8ac3f7d52d5..4685852162b 100644 --- a/src/python/grpcio_tests/tests/interop/BUILD.bazel +++ b/src/python/grpcio_tests/tests/interop/BUILD.bazel @@ -1,4 +1,5 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -80,7 +81,7 @@ py_library( ], ) -py_test( +py2and3_test( name = "_insecure_intraop_test", size = "small", srcs = ["_insecure_intraop_test.py"], @@ -99,7 +100,7 @@ py_test( ], ) -py_test( +py2and3_test( name = "_secure_intraop_test", size = "small", srcs = ["_secure_intraop_test.py"], diff --git a/src/python/grpcio_tests/tests/reflection/BUILD.bazel b/src/python/grpcio_tests/tests/reflection/BUILD.bazel index e9b56191df8..65a08c2a435 100644 --- a/src/python/grpcio_tests/tests/reflection/BUILD.bazel +++ b/src/python/grpcio_tests/tests/reflection/BUILD.bazel @@ -1,8 +1,9 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py_test( +py2and3_test( name="_reflection_servicer_test", size="small", timeout="moderate", diff --git a/src/python/grpcio_tests/tests/status/BUILD.bazel b/src/python/grpcio_tests/tests/status/BUILD.bazel index b163fe3975e..0868de01acf 100644 --- a/src/python/grpcio_tests/tests/status/BUILD.bazel +++ b/src/python/grpcio_tests/tests/status/BUILD.bazel @@ -1,8 +1,9 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py_test( +py2and3_test( name = "grpc_status_test", srcs = ["_grpc_status_test.py"], main = "_grpc_status_test.py", diff --git a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel index 458a6b1fb8a..867649a6a50 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel @@ -1,4 +1,5 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -23,7 +24,7 @@ py_library( ) [ - py_test( + py2and3_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel index d69186e1fde..a93249301c4 100644 --- a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel @@ -1,11 +1,12 @@ package(default_visibility = ["//visibility:public"]) +load("//bazel:python_rules.bzl", "py2and3_test") py_library( name = "stream_testing", srcs = ["stream_testing.py"], ) -py_test( +py2and3_test( name = "logging_pool_test", srcs = ["_logging_pool_test.py"], main = "_logging_pool_test.py", From 6dfa96524df73c5dd00ad2bf1aef1279aeb8944d Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 27 Aug 2019 17:59:39 -0700 Subject: [PATCH 039/120] Fix failing CPP test --- bazel/grpc_build_system.bzl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 23f90d0dc80..54398b66d82 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -262,13 +262,22 @@ def grpc_sh_binary(name, srcs, data = []): data = data, ) -def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False): +def grpc_py_binary(name, + srcs, + data = [], + deps = [], + external_deps = [], + testonly = False, + python_version = "PY2", + **kwargs): native.py_binary( name = name, srcs = srcs, testonly = testonly, data = data, deps = deps + _get_external_deps(external_deps), + python_version = python_version, + **kwargs, ) def grpc_package(name, visibility = "private", features = []): From 544ead769ddb7f2a579719953e310d088c92a376 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 27 Aug 2019 18:02:02 -0700 Subject: [PATCH 040/120] Remove explicit Python 3 testing --- tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh index f725eb7a3d7..4a48760aab1 100755 --- a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh @@ -26,9 +26,6 @@ ${name}') cd /var/local/git/grpc/test bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... -bazel clean --expunge -bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... -bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... # TODO(https://github.com/grpc/grpc/issues/19854): Move this to a new Kokoro # job. From 3207e623282b07c70ad07d1c9b3fbc46d2d4c394 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 27 Aug 2019 18:07:13 -0700 Subject: [PATCH 041/120] Finish todo --- third_party/py/python_configure.bzl | 1 - 1 file changed, 1 deletion(-) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index a2f0c7918d2..123f0b11865 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -277,7 +277,6 @@ def _create_local_python_repository(repository_ctx, out="{}/BUILD".format(variety_name)) -# TODO(rbellevi): Remove def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" _create_local_python_repository(repository_ctx, From abc384164ae9414dbd35507b0d06c62b83c798b1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 28 Aug 2019 05:52:38 -0400 Subject: [PATCH 042/120] fix kwargs syntax error --- bazel/grpc_build_system.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 54398b66d82..c123a2e627d 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -277,7 +277,7 @@ def grpc_py_binary(name, data = data, deps = deps + _get_external_deps(external_deps), python_version = python_version, - **kwargs, + **kwargs ) def grpc_package(name, visibility = "private", features = []): From c8430023a5c137289905e66191897ed88d7ea3e0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 28 Aug 2019 09:05:59 -0700 Subject: [PATCH 043/120] Apply health check service name changes to existing subchannels. --- .../filters/client_channel/client_channel.cc | 90 ++++++++++++++++--- test/cpp/end2end/client_lb_end2end_test.cc | 43 ++++++++- 2 files changed, 119 insertions(+), 14 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index db5ddcb46b9..00d21987777 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -273,6 +273,12 @@ class ChannelData { bool received_first_resolver_result_ = false; // The number of SubchannelWrapper instances referencing a given Subchannel. Map subchannel_refcount_map_; + // The set of SubchannelWrappers that currently exist. + // No need to hold a ref, since the map is updated in the control-plane + // combiner when the SubchannelWrappers are created and destroyed. + // TODO(roth): We really want to use a set here, not a map. Since we don't + // currently have a set implementation, we use a map and ignore the value. + Map subchannel_wrappers_; // Pending ConnectedSubchannel updates for each SubchannelWrapper. // Updates are queued here in the control plane combiner and then applied // in the data plane combiner when the picker is updated. @@ -799,14 +805,14 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "SubchannelWrapper"); auto* subchannel_node = subchannel_->channelz_node(); if (subchannel_node != nullptr) { - intptr_t subchannel_uuid = subchannel_node->uuid(); auto it = chand_->subchannel_refcount_map_.find(subchannel_); if (it == chand_->subchannel_refcount_map_.end()) { - chand_->channelz_node_->AddChildSubchannel(subchannel_uuid); + chand_->channelz_node_->AddChildSubchannel(subchannel_node->uuid()); it = chand_->subchannel_refcount_map_.emplace(subchannel_, 0).first; } ++it->second; } + chand_->subchannel_wrappers_[this] = true; } ~SubchannelWrapper() { @@ -815,14 +821,14 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { "chand=%p: destroying subchannel wrapper %p for subchannel %p", chand_, this, subchannel_); } + chand_->subchannel_wrappers_.erase(this); auto* subchannel_node = subchannel_->channelz_node(); if (subchannel_node != nullptr) { - intptr_t subchannel_uuid = subchannel_node->uuid(); auto it = chand_->subchannel_refcount_map_.find(subchannel_); GPR_ASSERT(it != chand_->subchannel_refcount_map_.end()); --it->second; if (it->second == 0) { - chand_->channelz_node_->RemoveChildSubchannel(subchannel_uuid); + chand_->channelz_node_->RemoveChildSubchannel(subchannel_node->uuid()); chand_->subchannel_refcount_map_.erase(it); } } @@ -844,8 +850,9 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { UniquePtr watcher) override { auto& watcher_wrapper = watcher_map_[watcher.get()]; GPR_ASSERT(watcher_wrapper == nullptr); - watcher_wrapper = New( - std::move(watcher), Ref(DEBUG_LOCATION, "WatcherWrapper")); + watcher_wrapper = New(std::move(watcher), + Ref(DEBUG_LOCATION, "WatcherWrapper"), + initial_state); subchannel_->WatchConnectivityState( initial_state, UniquePtr(gpr_strdup(health_check_service_name_.get())), @@ -870,6 +877,40 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { return subchannel_->channel_args(); } + void UpdateHealthCheckServiceName(UniquePtr health_check_service_name) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: subchannel wrapper %p: updating health check service " + "name from \"%s\" to \"%s\"", + chand_, this, health_check_service_name_.get(), + health_check_service_name.get()); + } + for (auto& p : watcher_map_) { + WatcherWrapper*& watcher_wrapper = p.second; + // Cancel the current watcher and create a new one using the new + // health check service name. + // TODO(roth): If there is not already an existing health watch + // call for the new name, then the watcher will initially report + // state CONNECTING. If the LB policy is currently reporting + // state READY, this may cause it to switch to CONNECTING before + // switching back to READY. This could cause a small delay for + // RPCs being started on the channel. If/when this becomes a + // problem, we may be able to handle it by waiting for the new + // watcher to report READY before we use it to replace the old one. + WatcherWrapper* replacement = watcher_wrapper->MakeReplacement(); + subchannel_->CancelConnectivityStateWatch( + health_check_service_name_.get(), watcher_wrapper); + watcher_wrapper = replacement; + subchannel_->WatchConnectivityState( + replacement->last_seen_state(), + UniquePtr(gpr_strdup(health_check_service_name.get())), + OrphanablePtr( + replacement)); + } + // Save the new health check service name. + health_check_service_name_ = std::move(health_check_service_name); + } + // Caller must be holding the control-plane combiner. ConnectedSubchannel* connected_subchannel() const { return connected_subchannel_.get(); @@ -904,8 +945,11 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { WatcherWrapper( UniquePtr watcher, - RefCountedPtr parent) - : watcher_(std::move(watcher)), parent_(std::move(parent)) {} + RefCountedPtr parent, + grpc_connectivity_state initial_state) + : watcher_(std::move(watcher)), + parent_(std::move(parent)), + last_seen_state_(initial_state) {} ~WatcherWrapper() { parent_.reset(DEBUG_LOCATION, "WatcherWrapper"); } @@ -928,9 +972,21 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { } grpc_pollset_set* interested_parties() override { - return watcher_->interested_parties(); + SubchannelInterface::ConnectivityStateWatcherInterface* watcher = + watcher_.get(); + if (watcher_ == nullptr) watcher = replacement_->watcher_.get(); + return watcher->interested_parties(); } + WatcherWrapper* MakeReplacement() { + auto* replacement = + New(std::move(watcher_), parent_, last_seen_state_); + replacement_ = replacement; + return replacement; + } + + grpc_connectivity_state last_seen_state() const { return last_seen_state_; } + private: class Updater { public: @@ -954,12 +1010,17 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { gpr_log(GPR_INFO, "chand=%p: processing connectivity change in combiner " "for subchannel wrapper %p subchannel %p " - "(connected_subchannel=%p state=%s)", + "(connected_subchannel=%p state=%s): watcher=%p", self->parent_->parent_->chand_, self->parent_->parent_.get(), self->parent_->parent_->subchannel_, self->connected_subchannel_.get(), - grpc_connectivity_state_name(self->state_)); + grpc_connectivity_state_name(self->state_), + self->parent_->watcher_.get()); } + // Ignore update if the parent WatcherWrapper has been replaced + // since this callback was scheduled. + if (self->parent_->watcher_ == nullptr) return; + self->parent_->last_seen_state_ = self->state_; self->parent_->parent_->MaybeUpdateConnectedSubchannel( std::move(self->connected_subchannel_)); self->parent_->watcher_->OnConnectivityStateChange(self->state_); @@ -974,6 +1035,8 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { UniquePtr watcher_; RefCountedPtr parent_; + grpc_connectivity_state last_seen_state_; + WatcherWrapper* replacement_ = nullptr; }; void MaybeUpdateConnectedSubchannel( @@ -1655,6 +1718,11 @@ bool ChannelData::ProcessResolverResultLocked( } else { chand->health_check_service_name_.reset(); } + // Update health check service name used by existing subchannel wrappers. + for (const auto& p : chand->subchannel_wrappers_) { + p.first->UpdateHealthCheckServiceName( + UniquePtr(gpr_strdup(chand->health_check_service_name_.get()))); + } // Save service config. chand->saved_service_config_ = std::move(service_config); } diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index ceab7506729..a0af46570d4 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -42,6 +42,7 @@ #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/server_address.h" +#include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gprpp/debug_location.h" @@ -144,9 +145,11 @@ class FakeResolverResponseGeneratorWrapper { response_generator_ = std::move(other.response_generator_); } - void SetNextResolution(const std::vector& ports) { + void SetNextResolution(const std::vector& ports, + const char* service_config_json = nullptr) { grpc_core::ExecCtx exec_ctx; - response_generator_->SetResponse(BuildFakeResults(ports)); + response_generator_->SetResponse( + BuildFakeResults(ports, service_config_json)); } void SetNextResolutionUponError(const std::vector& ports) { @@ -165,7 +168,8 @@ class FakeResolverResponseGeneratorWrapper { private: static grpc_core::Resolver::Result BuildFakeResults( - const std::vector& ports) { + const std::vector& ports, + const char* service_config_json = nullptr) { grpc_core::Resolver::Result result; for (const int& port : ports) { char* lb_uri_str; @@ -179,6 +183,11 @@ class FakeResolverResponseGeneratorWrapper { grpc_uri_destroy(lb_uri); gpr_free(lb_uri_str); } + if (service_config_json != nullptr) { + result.service_config = grpc_core::ServiceConfig::Create( + service_config_json, &result.service_config_error); + GPR_ASSERT(result.service_config != nullptr); + } return result; } @@ -1465,6 +1474,34 @@ TEST_F(ClientLbEnd2endTest, RoundRobinWithHealthCheckingServiceNamePerChannel) { EnableDefaultHealthCheckService(false); } +TEST_F(ClientLbEnd2endTest, + RoundRobinWithHealthCheckingServiceNameChangesAfterSubchannelsCreated) { + EnableDefaultHealthCheckService(true); + // Start server. + const int kNumServers = 1; + StartServers(kNumServers); + // Create a channel with health-checking enabled. + const char* kServiceConfigJson = + "{\"healthCheckConfig\": " + "{\"serviceName\": \"health_check_service_name\"}}"; + auto response_generator = BuildResolverResponseGenerator(); + auto channel = BuildChannel("round_robin", response_generator); + auto stub = BuildStub(channel); + std::vector ports = GetServersPorts(); + response_generator.SetNextResolution(ports, kServiceConfigJson); + servers_[0]->SetServingStatus("health_check_service_name", true); + EXPECT_TRUE(WaitForChannelReady(channel.get(), 1 /* timeout_seconds */)); + // Send an update on the channel to change it to use a health checking + // service name that is not being reported as healthy. + const char* kServiceConfigJson2 = + "{\"healthCheckConfig\": " + "{\"serviceName\": \"health_check_service_name2\"}}"; + response_generator.SetNextResolution(ports, kServiceConfigJson2); + EXPECT_TRUE(WaitForChannelNotReady(channel.get())); + // Clean up. + EnableDefaultHealthCheckService(false); +} + TEST_F(ClientLbEnd2endTest, ChannelIdleness) { // Start server. const int kNumServers = 1; From 6dfe27ab0823a1dcac2953afdbf404095d7a3320 Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Tue, 27 Aug 2019 15:09:17 -0700 Subject: [PATCH 044/120] Fix race in bm_chttp2_transport --- test/cpp/microbenchmarks/BUILD | 8 ++++ .../microbenchmarks/bm_chttp2_transport.cc | 40 +++++++++++++++++-- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index b8e9b14d4b4..fdae8246c31 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -27,6 +27,14 @@ grpc_cc_test( deps = ["//test/core/util:grpc_test_util"], ) +grpc_cc_binary( + name = "bm_chttp2_transport", + testonly = 1, + srcs = ["bm_chttp2_transport.cc"], + tags = ["no_windows"], + deps = [":helpers"], +) + grpc_cc_library( name = "helpers", testonly = 1, diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index da3357304ba..dc3d76ee38e 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -239,7 +239,7 @@ class Stream { grpc_transport_destroy_stream(stream->f_->transport(), static_cast(stream->stream_), stream->destroy_closure_); - gpr_event_set(&stream->done_, (void*)1); + gpr_event_set(&stream->done_, (void*)(1)); } Fixture* f_; @@ -254,6 +254,7 @@ class Stream { //////////////////////////////////////////////////////////////////////////////// // Benchmarks // +std::vector> done_events; static void BM_StreamCreateDestroy(benchmark::State& state) { TrackCounters track_counters; @@ -380,15 +381,24 @@ static void BM_TransportEmptyOp(benchmark::State& state) { reset_op(); op.cancel_stream = true; op_payload.cancel_stream.cancel_error = GRPC_ERROR_CANCELLED; + gpr_event* stream_cancel_done = new gpr_event; + gpr_event_init(stream_cancel_done); + std::unique_ptr stream_cancel_closure = + MakeClosure([&](grpc_error* error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); + gpr_event_set(stream_cancel_done, (void*)(1)); + }); + op.on_complete = stream_cancel_closure.get(); s->Op(&op); + f.FlushExecCtx(); + gpr_event_wait(stream_cancel_done, gpr_inf_future(GPR_CLOCK_REALTIME)); + done_events.emplace_back(stream_cancel_done); s->DestroyThen(MakeOnceClosure([s](grpc_error* error) { delete s; })); f.FlushExecCtx(); track_counters.Finish(state); } BENCHMARK(BM_TransportEmptyOp); -std::vector> done_events; - static void BM_TransportStreamSend(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; @@ -424,7 +434,7 @@ static void BM_TransportStreamSend(benchmark::State& state) { std::unique_ptr c = MakeClosure([&](grpc_error* error) { if (!state.KeepRunning()) { - gpr_event_set(bm_done, (void*)1); + gpr_event_set(bm_done, (void*)(1)); return; } grpc_slice_buffer send_buffer; @@ -455,7 +465,18 @@ static void BM_TransportStreamSend(benchmark::State& state) { reset_op(); op.cancel_stream = true; op.payload->cancel_stream.cancel_error = GRPC_ERROR_CANCELLED; + gpr_event* stream_cancel_done = new gpr_event; + gpr_event_init(stream_cancel_done); + std::unique_ptr stream_cancel_closure = + MakeClosure([&](grpc_error* error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); + gpr_event_set(stream_cancel_done, (void*)(1)); + }); + op.on_complete = stream_cancel_closure.get(); s->Op(&op); + f.FlushExecCtx(); + gpr_event_wait(stream_cancel_done, gpr_inf_future(GPR_CLOCK_REALTIME)); + done_events.emplace_back(stream_cancel_done); s->DestroyThen(MakeOnceClosure([s](grpc_error* error) { delete s; })); f.FlushExecCtx(); track_counters.Finish(state); @@ -629,7 +650,18 @@ static void BM_TransportStreamRecv(benchmark::State& state) { reset_op(); op.cancel_stream = true; op.payload->cancel_stream.cancel_error = GRPC_ERROR_CANCELLED; + gpr_event* stream_cancel_done = new gpr_event; + gpr_event_init(stream_cancel_done); + std::unique_ptr stream_cancel_closure = + MakeClosure([&](grpc_error* error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); + gpr_event_set(stream_cancel_done, (void*)(1)); + }); + op.on_complete = stream_cancel_closure.get(); s->Op(&op); + f.FlushExecCtx(); + gpr_event_wait(stream_cancel_done, gpr_inf_future(GPR_CLOCK_REALTIME)); + done_events.emplace_back(stream_cancel_done); s->DestroyThen(MakeOnceClosure([s](grpc_error* error) { delete s; })); grpc_metadata_batch_destroy(&b); grpc_metadata_batch_destroy(&b_recv); From a451a3a94b09a78d4511dd13500bd9da96696d50 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 28 Aug 2019 10:18:14 -0700 Subject: [PATCH 045/120] Rename function --- third_party/py/python_configure.bzl | 31 ++++++++++++++--------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index 123f0b11865..70380e9dde9 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -241,12 +241,11 @@ def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key): return result.stdout.splitlines()[0] -# TODO(rbellevi): Rename. -def _create_local_python_repository(repository_ctx, - variety_name, - bin_path_key, - default_bin_path, - lib_path_key): +def _create_single_version_package(repository_ctx, + variety_name, + bin_path_key, + default_bin_path, + lib_path_key): """Creates the repository containing files set up to build with Python.""" python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path) _check_python_bin(repository_ctx, python_bin, bin_path_key) @@ -279,16 +278,16 @@ def _create_local_python_repository(repository_ctx, def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" - _create_local_python_repository(repository_ctx, - "_python2", - _PYTHON2_BIN_PATH, - "python", - _PYTHON2_LIB_PATH) - _create_local_python_repository(repository_ctx, - "_python3", - _PYTHON3_BIN_PATH, - "python3", - _PYTHON3_LIB_PATH) + _create_single_version_package(repository_ctx, + "_python2", + _PYTHON2_BIN_PATH, + "python", + _PYTHON2_LIB_PATH) + _create_single_version_package(repository_ctx, + "_python3", + _PYTHON3_BIN_PATH, + "python3", + _PYTHON3_LIB_PATH) _tpl(repository_ctx, "BUILD") From d3cd387e03e3cbf99f71c144e371aeade4ad7357 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 28 Aug 2019 10:43:01 -0700 Subject: [PATCH 046/120] Bump rules_apple --- bazel/grpc_deps.bzl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 57021924725..6bbb960b6c3 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -221,10 +221,11 @@ def grpc_deps(): ) if "build_bazel_rules_apple" not in native.existing_rules(): - git_repository( + http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - tag = "0.17.2", + url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz", + strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3", + sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e", ) grpc_python_deps() From a1ca6a099d90aa0ff8002b75eeee00119d69f4f0 Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Wed, 28 Aug 2019 10:07:18 -0700 Subject: [PATCH 047/120] Refactor response building in xds test --- test/cpp/end2end/xds_end2end_test.cc | 390 ++++++++++++++------------- 1 file changed, 203 insertions(+), 187 deletions(-) diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 480680c9a32..1c073de1b12 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -96,7 +96,6 @@ constexpr char kEdsTypeUrl[] = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment"; constexpr char kDefaultLocalityRegion[] = "xds_default_locality_region"; constexpr char kDefaultLocalityZone[] = "xds_default_locality_zone"; -constexpr char kDefaultLocalitySubzone[] = "xds_default_locality_subzone"; constexpr char kLbDropType[] = "lb"; constexpr char kThrottleDropType[] = "throttle"; constexpr int kDefaultLocalityWeight = 3; @@ -260,6 +259,31 @@ class ClientStats { class EdsServiceImpl : public EdsService { public: + struct ResponseArgs { + struct Locality { + Locality(const grpc::string& sub_zone, std::vector ports, + int lb_weight = kDefaultLocalityWeight, int priority = 0) + : sub_zone(std::move(sub_zone)), + ports(std::move(ports)), + lb_weight(lb_weight), + priority(priority) {} + + const grpc::string sub_zone; + std::vector ports; + int lb_weight; + int priority; + }; + + ResponseArgs() = default; + explicit ResponseArgs(std::vector locality_list) + : locality_list(std::move(locality_list)) {} + + std::vector locality_list; + std::map drop_categories; + FractionalPercent::DenominatorType drop_denominator = + FractionalPercent::MILLION; + }; + using Stream = ServerReaderWriter; using ResponseDelayPair = std::pair; @@ -317,47 +341,35 @@ class EdsServiceImpl : public EdsService { gpr_log(GPR_INFO, "LB[%p]: shut down", this); } - // TODO(juanlishen): Put the args into a struct. - static DiscoveryResponse BuildResponse( - const std::vector>& backend_ports, - const std::vector& lb_weights = {}, - size_t first_locality_name_index = 0, - const std::map& drop_categories = {}, - const FractionalPercent::DenominatorType denominator = - FractionalPercent::MILLION) { + static DiscoveryResponse BuildResponse(const ResponseArgs& args) { ClusterLoadAssignment assignment; assignment.set_cluster_name("service name"); - for (size_t i = 0; i < backend_ports.size(); ++i) { + for (const auto& locality : args.locality_list) { auto* endpoints = assignment.add_endpoints(); - const int lb_weight = - lb_weights.empty() ? kDefaultLocalityWeight : lb_weights[i]; - endpoints->mutable_load_balancing_weight()->set_value(lb_weight); - endpoints->set_priority(0); + endpoints->mutable_load_balancing_weight()->set_value(locality.lb_weight); + endpoints->set_priority(locality.priority); endpoints->mutable_locality()->set_region(kDefaultLocalityRegion); endpoints->mutable_locality()->set_zone(kDefaultLocalityZone); - std::ostringstream sub_zone; - sub_zone << kDefaultLocalitySubzone << '_' - << first_locality_name_index + i; - endpoints->mutable_locality()->set_sub_zone(sub_zone.str()); - for (const int& backend_port : backend_ports[i]) { + endpoints->mutable_locality()->set_sub_zone(locality.sub_zone); + for (const int& port : locality.ports) { auto* lb_endpoints = endpoints->add_lb_endpoints(); auto* endpoint = lb_endpoints->mutable_endpoint(); auto* address = endpoint->mutable_address(); auto* socket_address = address->mutable_socket_address(); socket_address->set_address("127.0.0.1"); - socket_address->set_port_value(backend_port); + socket_address->set_port_value(port); } } - if (!drop_categories.empty()) { + if (!args.drop_categories.empty()) { auto* policy = assignment.mutable_policy(); - for (const auto& p : drop_categories) { + for (const auto& p : args.drop_categories) { const grpc::string& name = p.first; const uint32_t parts_per_million = p.second; auto* drop_overload = policy->add_drop_overloads(); drop_overload->set_category(name); auto* drop_percentage = drop_overload->mutable_drop_percentage(); drop_percentage->set_numerator(parts_per_million); - drop_percentage->set_denominator(denominator); + drop_percentage->set_denominator(args.drop_denominator); } } DiscoveryResponse response; @@ -729,24 +741,6 @@ class XdsEnd2endTest : public ::testing::Test { return backend_ports; } - const std::vector> GetBackendPortsInGroups( - size_t start_index = 0, size_t stop_index = 0, - size_t num_group = 1) const { - if (stop_index == 0) stop_index = backends_.size(); - size_t group_size = (stop_index - start_index) / num_group; - std::vector> backend_ports; - for (size_t i = 0; i < num_group; ++i) { - backend_ports.emplace_back(); - size_t group_start = group_size * i + start_index; - size_t group_stop = - i == num_group - 1 ? stop_index : group_start + group_size; - for (size_t j = group_start; j < group_stop; ++j) { - backend_ports[i].push_back(backends_[j]->port()); - } - } - return backend_ports; - } - void ScheduleResponseForBalancer(size_t i, const DiscoveryResponse& response, int delay_ms) { balancers_[i]->eds_service()->add_response(response, delay_ms); @@ -938,8 +932,10 @@ TEST_F(SingleBalancerTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcsPerAddress = 100; - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse(GetBackendPortsInGroups()), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. @@ -962,17 +958,18 @@ TEST_F(SingleBalancerTest, SameBackendListedMultipleTimes) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Same backend listed twice. - std::vector ports; - ports.push_back(backends_[0]->port()); - ports.push_back(backends_[0]->port()); + std::vector ports(2, backends_[0]->port()); + EdsServiceImpl::ResponseArgs args({ + {"locality0", ports}, + }); const size_t kNumRpcsPerAddress = 10; - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse({ports}), 0); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // We need to wait for the backend to come online. WaitForBackend(0); // Send kNumRpcsPerAddress RPCs per server. CheckRpcSendOk(kNumRpcsPerAddress * ports.size()); // Backend should have gotten 20 requests. - EXPECT_EQ(kNumRpcsPerAddress * 2, + EXPECT_EQ(kNumRpcsPerAddress * ports.size(), backends_[0]->backend_service()->request_count()); // And they should have come from a single client port, because of // subchannel sharing. @@ -985,8 +982,10 @@ TEST_F(SingleBalancerTest, SecureNaming) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); const size_t kNumRpcsPerAddress = 100; - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse(GetBackendPortsInGroups()), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. @@ -1031,11 +1030,17 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) { const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor(); const int kCallDeadlineMs = kServerlistDelayMs * 2; // First response is an empty serverlist, sent right away. - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse({{}}), 0); - // Send non-empty serverlist only after kServerlistDelayMs - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse(GetBackendPortsInGroups()), - kServerlistDelayMs); + EdsServiceImpl::ResponseArgs::Locality empty_locality("locality0", {}); + EdsServiceImpl::ResponseArgs args({ + empty_locality, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + // Send non-empty serverlist only after kServerlistDelayMs. + args = EdsServiceImpl::ResponseArgs({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + kServerlistDelayMs); const auto t0 = system_clock::now(); // Client will block: LB will initially send empty serverlist. CheckRpcSendOk(1, kCallDeadlineMs, true /* wait_for_ready */); @@ -1061,7 +1066,10 @@ TEST_F(SingleBalancerTest, AllServersUnreachableFailFast) { for (size_t i = 0; i < kNumUnreachableServers; ++i) { ports.push_back(grpc_pick_unused_port_or_die()); } - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse({ports}), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", ports}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); const Status status = SendRpc(); // The error shouldn't be DEADLINE_EXCEEDED. EXPECT_EQ(StatusCode::UNAVAILABLE, status.error_code()); @@ -1082,11 +1090,11 @@ TEST_F(SingleBalancerTest, LocalityMapWeightedRoundRobin) { const double kLocalityWeightRate1 = static_cast(kLocalityWeight1) / kTotalLocalityWeight; // EDS response contains 2 localities, each of which contains 1 backend. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups(0, 2, 2), - {kLocalityWeight0, kLocalityWeight1}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts(0, 1), kLocalityWeight0}, + {"locality1", GetBackendPorts(1, 2), kLocalityWeight1}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Wait for both backends to be ready. WaitForAllBackends(1, 0, 2); // Send kNumRpcs RPCs. @@ -1118,14 +1126,19 @@ TEST_F(SingleBalancerTest, LocalityMapStressTest) { const size_t kNumLocalities = 100; // The first EDS response contains kNumLocalities localities, each of which // contains backend 0. - const std::vector> locality_list_0(kNumLocalities, - {backends_[0]->port()}); + EdsServiceImpl::ResponseArgs args; + for (size_t i = 0; i < kNumLocalities; ++i) { + grpc::string name = "locality" + std::to_string(i); + EdsServiceImpl::ResponseArgs::Locality locality(name, + {backends_[0]->port()}); + args.locality_list.emplace_back(std::move(locality)); + } + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // The second EDS response contains 1 locality, which contains backend 1. - const std::vector> locality_list_1 = - GetBackendPortsInGroups(1, 2); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(locality_list_0), - 0); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(locality_list_1), + args = EdsServiceImpl::ResponseArgs({ + {"locality0", GetBackendPorts(1, 2)}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 60 * 1000); // Wait until backend 0 is ready, before which kNumLocalities localities are // received and handled by the xds policy. @@ -1162,20 +1175,18 @@ TEST_F(SingleBalancerTest, LocalityMapUpdate) { for (int weight : kLocalityWeights1) { locality_weight_rate_1.push_back(weight / kTotalLocalityWeight1); } - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(0 /*start_index*/, 3 /*stop_index*/, - 3 /*num_group*/), - kLocalityWeights0), - 0); - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(1 /*start_index*/, 4 /*stop_index*/, - 3 /*num_group*/), - kLocalityWeights1, 1 /*first_locality_name_index*/), - 5000); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts(0, 1), 2}, + {"locality1", GetBackendPorts(1, 2), 3}, + {"locality2", GetBackendPorts(2, 3), 4}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality1", GetBackendPorts(1, 2), 3}, + {"locality2", GetBackendPorts(2, 3), 2}, + {"locality3", GetBackendPorts(3, 4), 6}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 5000); // Wait for the first 3 backends to be ready. WaitForAllBackends(1, 0, 3); gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -1244,13 +1255,12 @@ TEST_F(SingleBalancerTest, Drop) { const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; // The EDS response contains two drop categories. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerMillionForLb}, - {kThrottleDropType, kDropPerMillionForThrottle}}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, + {kThrottleDropType, kDropPerMillionForThrottle}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1286,12 +1296,12 @@ TEST_F(SingleBalancerTest, DropPerHundred) { const uint32_t kDropPerHundredForLb = 10; const double kDropRateForLb = kDropPerHundredForLb / 100.0; // The EDS response contains one drop category. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerHundredForLb}}, - FractionalPercent::HUNDRED), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerHundredForLb}}; + args.drop_denominator = FractionalPercent::HUNDRED; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1326,12 +1336,12 @@ TEST_F(SingleBalancerTest, DropPerTenThousand) { const uint32_t kDropPerTenThousandForLb = 1000; const double kDropRateForLb = kDropPerTenThousandForLb / 10000.0; // The EDS response contains one drop category. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerTenThousandForLb}}, - FractionalPercent::TEN_THOUSAND), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerTenThousandForLb}}; + args.drop_denominator = FractionalPercent::TEN_THOUSAND; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1370,22 +1380,18 @@ TEST_F(SingleBalancerTest, DropUpdate) { const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; // The first EDS response contains one drop category. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerMillionForLb}}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerMillionForLb}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // The second EDS response contains two drop categories. // TODO(juanlishen): Change the EDS response sending to deterministic style // (e.g., by using condition variable) so that we can shorten the test // duration. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerMillionForLb}, - {kThrottleDropType, kDropPerMillionForThrottle}}), - 10000); + args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, + {kThrottleDropType, kDropPerMillionForThrottle}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 10000); WaitForAllBackends(); // Send kNumRpcs RPCs and count the drops. size_t num_drops = 0; @@ -1465,13 +1471,12 @@ TEST_F(SingleBalancerTest, DropAll) { const uint32_t kDropPerMillionForLb = 100000; const uint32_t kDropPerMillionForThrottle = 1000000; // The EDS response contains two drop categories. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerMillionForLb}, - {kThrottleDropType, kDropPerMillionForThrottle}}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, + {kThrottleDropType, kDropPerMillionForThrottle}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Send kNumRpcs RPCs and all of them are dropped. for (size_t i = 0; i < kNumRpcs; ++i) { EchoResponse response; @@ -1493,11 +1498,11 @@ TEST_F(SingleBalancerTest, Fallback) { kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Send non-empty serverlist only after kServerlistDelayMs. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(kNumBackendsInResolution /* start_index */)), - kServerlistDelayMs); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts(kNumBackendsInResolution)}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + kServerlistDelayMs); // Wait until all the fallback backends are reachable. WaitForAllBackends(1 /* num_requests_multiple_of */, 0 /* start_index */, kNumBackendsInResolution /* stop_index */); @@ -1542,12 +1547,12 @@ TEST_F(SingleBalancerTest, FallbackUpdate) { kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Send non-empty serverlist only after kServerlistDelayMs. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups( - kNumBackendsInResolution + - kNumBackendsInResolutionUpdate /* start_index */)), - kServerlistDelayMs); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts(kNumBackendsInResolution + + kNumBackendsInResolutionUpdate)}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), + kServerlistDelayMs); // Wait until all the fallback backends are reachable. WaitForAllBackends(1 /* num_requests_multiple_of */, 0 /* start_index */, kNumBackendsInResolution /* stop_index */); @@ -1645,8 +1650,10 @@ TEST_F(SingleBalancerTest, FallbackIfResponseReceivedButChildNotReady) { SetNextResolutionForLbChannelAllBalancers(); // Send a serverlist that only contains an unreachable backend before fallback // timeout. - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse({{grpc_pick_unused_port_or_die()}}), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {grpc_pick_unused_port_or_die()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Because no child policy is ready before fallback timeout, we enter fallback // mode. WaitForBackend(0); @@ -1659,11 +1666,11 @@ TEST_F(SingleBalancerTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) { // Enter fallback mode because the LB channel fails to connect. WaitForBackend(0); // Return a new balancer that sends a response to drop all calls. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse(GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, 1000000}}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, 1000000}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); SetNextResolutionForLbChannelAllBalancers(); // Send RPCs until failure. gpr_timespec deadline = gpr_time_add( @@ -1683,8 +1690,10 @@ TEST_F(SingleBalancerTest, FallbackModeIsExitedAfterChildRready) { WaitForBackend(0); // Return a new balancer that sends a dead backend. ShutdownBackend(1); - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse({{backends_[1]->port()}}), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {backends_[1]->port()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); SetNextResolutionForLbChannelAllBalancers(); // The state (TRANSIENT_FAILURE) update from the child policy will be ignored // because we are still in fallback mode. @@ -1708,8 +1717,10 @@ TEST_F(SingleBalancerTest, FallbackModeIsExitedAfterChildRready) { TEST_F(SingleBalancerTest, BackendsRestart) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - ScheduleResponseForBalancer( - 0, EdsServiceImpl::BuildResponse(GetBackendPortsInGroups()), 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); WaitForAllBackends(); // Stop backends. RPCs should fail. ShutdownAllBackends(); @@ -1728,12 +1739,14 @@ class UpdatesTest : public XdsEnd2endTest { TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - auto first_backend = GetBackendPortsInGroups(0, 1); - auto second_backend = GetBackendPortsInGroups(1, 2); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(first_backend), - 0); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(second_backend), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {backends_[0]->port()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality0", {backends_[1]->port()}}, + }); + ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); // Wait until the first backend is ready. WaitForBackend(0); @@ -1781,12 +1794,14 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { TEST_F(UpdatesTest, UpdateBalancerName) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - auto first_backend = GetBackendPortsInGroups(0, 1); - auto second_backend = GetBackendPortsInGroups(1, 2); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(first_backend), - 0); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(second_backend), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {backends_[0]->port()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality0", {backends_[1]->port()}}, + }); + ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); // Wait until the first backend is ready. WaitForBackend(0); @@ -1852,12 +1867,14 @@ TEST_F(UpdatesTest, UpdateBalancerName) { TEST_F(UpdatesTest, UpdateBalancersRepeated) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); - auto first_backend = GetBackendPortsInGroups(0, 1); - auto second_backend = GetBackendPortsInGroups(1, 2); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(first_backend), - 0); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(second_backend), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {backends_[0]->port()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality0", {backends_[1]->port()}}, + }); + ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); // Wait until the first backend is ready. WaitForBackend(0); @@ -1920,12 +1937,14 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) { TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); - auto first_backend = GetBackendPortsInGroups(0, 1); - auto second_backend = GetBackendPortsInGroups(1, 2); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(first_backend), - 0); - ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(second_backend), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", {backends_[0]->port()}}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality0", {backends_[1]->port()}}, + }); + ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); @@ -2007,10 +2026,10 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) { const size_t kNumRpcsPerAddress = 100; // TODO(juanlishen): Partition the backends after multiple localities is // tested. - ScheduleResponseForBalancer(0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(0, backends_.size())), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Wait until all backends are ready. int num_ok = 0; int num_failure = 0; @@ -2046,11 +2065,10 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) { const size_t kNumBackendsFirstPass = backends_.size() / 2; const size_t kNumBackendsSecondPass = backends_.size() - kNumBackendsFirstPass; - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(0, kNumBackendsFirstPass)), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts(0, kNumBackendsFirstPass)}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Wait until all backends returned by the balancer are ready. int num_ok = 0; int num_failure = 0; @@ -2077,11 +2095,10 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) { } // Now restart the balancer, this time pointing to the new backends. balancers_[0]->Start(server_host_); - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(kNumBackendsFirstPass)), - 0); + args = EdsServiceImpl::ResponseArgs({ + {"locality0", GetBackendPorts(kNumBackendsFirstPass)}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); // Wait for queries to start going to one of the new backends. // This tells us that we're now using the new serverlist. std::tie(num_ok, num_failure, num_drops) = @@ -2116,13 +2133,12 @@ TEST_F(SingleBalancerWithClientLoadReportingAndDropTest, Vanilla) { const double KDropRateForLbAndThrottle = kDropRateForLb + (1 - kDropRateForLb) * kDropRateForThrottle; // The EDS response contains two drop categories. - ScheduleResponseForBalancer( - 0, - EdsServiceImpl::BuildResponse( - GetBackendPortsInGroups(), {}, 0, - {{kLbDropType, kDropPerMillionForLb}, - {kThrottleDropType, kDropPerMillionForThrottle}}), - 0); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + args.drop_categories = {{kLbDropType, kDropPerMillionForLb}, + {kThrottleDropType, kDropPerMillionForThrottle}}; + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); int num_ok = 0; int num_failure = 0; int num_drops = 0; From 21c542447784e698ae388ce12087c27fea70535d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 28 Aug 2019 12:48:06 -0700 Subject: [PATCH 048/120] Add API for accessing per-call backend metric data in LB policies. --- .gitmodules | 3 + BUILD | 30 + BUILD.gn | 8 + CMakeLists.txt | 105 ++- Makefile | 118 ++- build.yaml | 15 + config.m4 | 29 +- config.w32 | 32 +- gRPC-Core.podspec | 84 +- grpc.gemspec | 56 +- grpc.gyp | 84 +- package.xml | 56 +- .../filters/client_channel/backend_metric.cc | 78 ++ .../filters/client_channel/backend_metric.h | 36 + .../filters/client_channel/client_channel.cc | 19 + .../ext/filters/client_channel/lb_policy.h | 26 + .../envoy/api/v2/auth/cert.upb.c | 37 +- .../envoy/api/v2/auth/cert.upb.h | 83 +- .../ext/upb-generated/envoy/api/v2/cds.upb.c | 67 +- .../ext/upb-generated/envoy/api/v2/cds.upb.h | 81 +- .../envoy/api/v2/cluster/filter.upb.c | 34 + .../envoy/api/v2/cluster/filter.upb.h | 69 ++ .../api/v2/cluster/outlier_detection.upb.c | 32 +- .../api/v2/cluster/outlier_detection.upb.h | 87 ++- .../envoy/api/v2/core/base.upb.c | 32 + .../envoy/api/v2/core/base.upb.h | 98 +++ .../envoy/api/v2/core/config_source.upb.c | 15 +- .../envoy/api/v2/core/config_source.upb.h | 32 +- .../envoy/api/v2/core/http_uri.upb.c | 35 + .../envoy/api/v2/core/http_uri.upb.h | 80 ++ .../envoy/api/v2/core/protocol.upb.c | 12 +- .../envoy/api/v2/core/protocol.upb.h | 69 ++ .../udpa/data/orca/v1/orca_load_report.upb.c | 58 ++ .../udpa/data/orca/v1/orca_load_report.upb.h | 144 ++++ src/core/lib/gprpp/map.h | 11 +- src/core/lib/transport/static_metadata.cc | 734 +++++++++--------- src/core/lib/transport/static_metadata.h | 176 +++-- src/proto/grpc/lb/v2/BUILD | 7 + src/proto/grpc/lb/v2/eds_for_test.proto | 8 +- src/proto/grpc/lb/v2/lrs_for_test.proto | 9 +- .../lb/v2/orca_load_report_for_test.proto | 58 ++ src/python/grpcio/grpc_core_dependencies.py | 28 +- test/core/end2end/fuzzers/hpack.dictionary | 1 + test/core/util/test_lb_policies.cc | 2 +- test/core/util/test_lb_policies.h | 5 +- test/cpp/end2end/BUILD | 1 + test/cpp/end2end/client_lb_end2end_test.cc | 97 ++- third_party/envoy-api | 2 +- third_party/udpa | 1 + tools/codegen/core/gen_static_metadata.py | 2 + tools/codegen/core/gen_upb_api.sh | 6 +- tools/doxygen/Doxyfile.core.internal | 8 + tools/run_tests/sanity/check_submodules.sh | 3 +- 53 files changed, 2224 insertions(+), 779 deletions(-) create mode 100644 src/core/ext/filters/client_channel/backend_metric.cc create mode 100644 src/core/ext/filters/client_channel/backend_metric.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h create mode 100644 src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c create mode 100644 src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h create mode 100644 src/proto/grpc/lb/v2/orca_load_report_for_test.proto create mode 160000 third_party/udpa diff --git a/.gitmodules b/.gitmodules index 6443f8362aa..2b085e15059 100644 --- a/.gitmodules +++ b/.gitmodules @@ -54,3 +54,6 @@ [submodule "third_party/upb"] path = third_party/upb url = https://github.com/protocolbuffers/upb.git +[submodule "third_party/udpa"] + path = third_party/udpa + url = https://github.com/cncf/udpa.git diff --git a/BUILD b/BUILD index f2a6f67f69f..9198dd61282 100644 --- a/BUILD +++ b/BUILD @@ -1009,6 +1009,7 @@ grpc_cc_library( name = "grpc_client_channel", srcs = [ "src/core/ext/filters/client_channel/backup_poller.cc", + "src/core/ext/filters/client_channel/backend_metric.cc", "src/core/ext/filters/client_channel/channel_connectivity.cc", "src/core/ext/filters/client_channel/client_channel.cc", "src/core/ext/filters/client_channel/client_channel_channelz.cc", @@ -1037,6 +1038,7 @@ grpc_cc_library( ], hdrs = [ "src/core/ext/filters/client_channel/backup_poller.h", + "src/core/ext/filters/client_channel/backend_metric.h", "src/core/ext/filters/client_channel/client_channel.h", "src/core/ext/filters/client_channel/client_channel_channelz.h", "src/core/ext/filters/client_channel/client_channel_factory.h", @@ -1066,6 +1068,7 @@ grpc_cc_library( ], language = "c++", deps = [ + "envoy_orca_upb", "gpr_base", "grpc_base", "grpc_client_authority_filter", @@ -2278,6 +2281,7 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.c", @@ -2290,6 +2294,7 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.h", @@ -2318,6 +2323,7 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c", ], hdrs = [ @@ -2326,6 +2332,7 @@ grpc_cc_library( "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h", ], external_deps = [ @@ -2378,6 +2385,29 @@ grpc_cc_library( ], ) +# Once upb code-gen issue is resolved, replace envoy_orca_upb with this. +# grpc_upb_proto_library( +# name = "envoy_orca_upb", +# deps = ["@envoy_api//udpa/data/orca/v1:orca_load_report"] +# ) + +grpc_cc_library( + name = "envoy_orca_upb", + srcs = [ + "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c", + ], + hdrs = [ + "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h", + ], + external_deps = [ + "upb_lib", + ], + language = "c++", + deps = [ + ":proto_gen_validate_upb", + ], +) + # Once upb code-gen issue is resolved, replace grpc_health_upb with this. # grpc_upb_proto_library( # name = "grpc_health_upb", diff --git a/BUILD.gn b/BUILD.gn index eea022eac51..771e968f366 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -208,6 +208,8 @@ config("grpc_config") { "include/grpc/status.h", "include/grpc/support/workaround_list.h", "src/core/ext/filters/census/grpc_context.cc", + "src/core/ext/filters/client_channel/backend_metric.cc", + "src/core/ext/filters/client_channel/backend_metric.h", "src/core/ext/filters/client_channel/backup_poller.cc", "src/core/ext/filters/client_channel/backup_poller.h", "src/core/ext/filters/client_channel/channel_connectivity.cc", @@ -388,6 +390,8 @@ config("grpc_config") { "src/core/ext/upb-generated/envoy/api/v2/cds.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c", @@ -400,6 +404,8 @@ config("grpc_config") { "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c", @@ -450,6 +456,8 @@ config("grpc_config") { "src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h", "src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c", "src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h", + "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c", + "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h", "src/core/ext/upb-generated/validate/validate.upb.c", "src/core/ext/upb-generated/validate/validate.upb.h", "src/core/lib/avl/avl.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index f1552a56c1f..c5cdfff7f56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1266,6 +1266,7 @@ add_library(grpc src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc src/core/ext/transport/chttp2/client/authority.cc src/core/ext/transport/chttp2/client/chttp2_connector.cc + src/core/ext/filters/client_channel/backend_metric.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -1294,6 +1295,19 @@ add_library(grpc src/core/ext/filters/client_channel/subchannel_pool_interface.cc src/core/ext/filters/deadline/deadline_filter.cc src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/rpc/status.upb.c src/core/tsi/fake_transport_security.cc src/core/tsi/local_transport_security.cc src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc @@ -1313,16 +1327,6 @@ add_library(grpc src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c - src/core/ext/upb-generated/google/api/annotations.upb.c - src/core/ext/upb-generated/google/api/http.upb.c - src/core/ext/upb-generated/google/protobuf/any.upb.c - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c - src/core/ext/upb-generated/google/protobuf/duration.upb.c - src/core/ext/upb-generated/google/protobuf/empty.upb.c - src/core/ext/upb-generated/google/protobuf/struct.upb.c - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c - src/core/ext/upb-generated/google/rpc/status.upb.c src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc src/core/ext/filters/client_channel/lb_policy/xds/xds.cc src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc @@ -1331,6 +1335,7 @@ add_library(grpc src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c @@ -1343,11 +1348,10 @@ add_library(grpc src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c src/core/ext/upb-generated/envoy/type/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c - src/core/ext/upb-generated/gogoproto/gogo.upb.c - src/core/ext/upb-generated/validate/validate.upb.c src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -1667,6 +1671,7 @@ add_library(grpc_cronet src/core/ext/filters/http/http_filters_plugin.cc src/core/ext/filters/http/message_compress/message_compress_filter.cc src/core/ext/filters/http/server/http_server_filter.cc + src/core/ext/filters/client_channel/backend_metric.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -1701,6 +1706,19 @@ add_library(grpc_cronet third_party/upb/upb/port.c third_party/upb/upb/table.c third_party/upb/upb/upb.c + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/rpc/status.upb.c src/core/lib/http/httpcli_security_connector.cc src/core/lib/security/context/security_context.cc src/core/lib/security/credentials/alts/alts_credentials.cc @@ -2059,6 +2077,7 @@ add_library(grpc_test_util src/core/lib/transport/transport_op_string.cc src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc + src/core/ext/filters/client_channel/backend_metric.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -2093,6 +2112,19 @@ add_library(grpc_test_util third_party/upb/upb/port.c third_party/upb/upb/table.c third_party/upb/upb/upb.c + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/rpc/status.upb.c src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2399,6 +2431,7 @@ add_library(grpc_test_util_unsecure src/core/lib/transport/transport_op_string.cc src/core/lib/uri/uri_parser.cc src/core/lib/debug/trace.cc + src/core/ext/filters/client_channel/backend_metric.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -2433,6 +2466,19 @@ add_library(grpc_test_util_unsecure third_party/upb/upb/port.c third_party/upb/upb/table.c third_party/upb/upb/upb.c + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/rpc/status.upb.c src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_plugin.cc @@ -2750,6 +2796,7 @@ add_library(grpc_unsecure src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc src/core/ext/transport/chttp2/client/authority.cc src/core/ext/transport/chttp2/client/chttp2_connector.cc + src/core/ext/filters/client_channel/backend_metric.cc src/core/ext/filters/client_channel/backup_poller.cc src/core/ext/filters/client_channel/channel_connectivity.cc src/core/ext/filters/client_channel/client_channel.cc @@ -2784,6 +2831,19 @@ add_library(grpc_unsecure third_party/upb/upb/port.c third_party/upb/upb/table.c third_party/upb/upb/upb.c + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/rpc/status.upb.c src/core/ext/transport/inproc/inproc_plugin.cc src/core/ext/transport/inproc/inproc_transport.cc src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc @@ -2807,16 +2867,6 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c - src/core/ext/upb-generated/google/api/annotations.upb.c - src/core/ext/upb-generated/google/api/http.upb.c - src/core/ext/upb-generated/google/protobuf/any.upb.c - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c - src/core/ext/upb-generated/google/protobuf/duration.upb.c - src/core/ext/upb-generated/google/protobuf/empty.upb.c - src/core/ext/upb-generated/google/protobuf/struct.upb.c - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c - src/core/ext/upb-generated/google/rpc/status.upb.c src/core/ext/filters/client_channel/lb_policy/xds/xds.cc src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc @@ -2824,6 +2874,7 @@ add_library(grpc_unsecure src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c @@ -2836,11 +2887,10 @@ add_library(grpc_unsecure src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c src/core/ext/upb-generated/envoy/type/percent.upb.c src/core/ext/upb-generated/envoy/type/range.upb.c - src/core/ext/upb-generated/gogoproto/gogo.upb.c - src/core/ext/upb-generated/validate/validate.upb.c src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc src/core/ext/filters/census/grpc_context.cc @@ -13128,11 +13178,18 @@ endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) add_executable(client_lb_end2end_test + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.cc + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.h + ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.h test/cpp/end2end/client_lb_end2end_test.cc third_party/googletest/googletest/src/gtest-all.cc third_party/googletest/googlemock/src/gmock-all.cc ) +protobuf_generate_grpc_cpp( + src/proto/grpc/lb/v2/orca_load_report_for_test.proto +) target_include_directories(client_lb_end2end_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/Makefile b/Makefile index 5189f704297..4ebf5b36cf8 100644 --- a/Makefile +++ b/Makefile @@ -2745,6 +2745,22 @@ $(GENDIR)/src/proto/grpc/lb/v2/lrs_for_test.grpc.pb.cc: src/proto/grpc/lb/v2/lrs $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.cc: protoc_dep_error +else + +$(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc: src/proto/grpc/lb/v2/orca_load_report_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< + +$(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.cc: src/proto/grpc/lb/v2/orca_load_report_for_test.proto $(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.pb.cc: protoc_dep_error $(GENDIR)/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc: protoc_dep_error @@ -3803,6 +3819,7 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -3831,6 +3848,19 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/tsi/fake_transport_security.cc \ src/core/tsi/local_transport_security.cc \ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \ @@ -3850,16 +3880,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ - src/core/ext/upb-generated/google/api/annotations.upb.c \ - src/core/ext/upb-generated/google/api/http.upb.c \ - src/core/ext/upb-generated/google/protobuf/any.upb.c \ - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ - src/core/ext/upb-generated/google/protobuf/duration.upb.c \ - src/core/ext/upb-generated/google/protobuf/empty.upb.c \ - src/core/ext/upb-generated/google/protobuf/struct.upb.c \ - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ - src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc \ @@ -3868,6 +3888,7 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ @@ -3880,11 +3901,10 @@ LIBGRPC_SRC = \ src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ - src/core/ext/upb-generated/gogoproto/gogo.upb.c \ - src/core/ext/upb-generated/validate/validate.upb.c \ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -4193,6 +4213,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/filters/http/http_filters_plugin.cc \ src/core/ext/filters/http/message_compress/message_compress_filter.cc \ src/core/ext/filters/http/server/http_server_filter.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4227,6 +4248,19 @@ LIBGRPC_CRONET_SRC = \ third_party/upb/upb/port.c \ third_party/upb/upb/table.c \ third_party/upb/upb/upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/lib/http/httpcli_security_connector.cc \ src/core/lib/security/context/security_context.cc \ src/core/lib/security/credentials/alts/alts_credentials.cc \ @@ -4573,6 +4607,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/transport_op_string.cc \ src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4607,6 +4642,19 @@ LIBGRPC_TEST_UTIL_SRC = \ third_party/upb/upb/port.c \ third_party/upb/upb/table.c \ third_party/upb/upb/upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -4895,6 +4943,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/transport/transport_op_string.cc \ src/core/lib/uri/uri_parser.cc \ src/core/lib/debug/trace.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -4929,6 +4978,19 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ third_party/upb/upb/port.c \ third_party/upb/upb/table.c \ third_party/upb/upb/upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_plugin.cc \ @@ -5215,6 +5277,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -5249,6 +5312,19 @@ LIBGRPC_UNSECURE_SRC = \ third_party/upb/upb/port.c \ third_party/upb/upb/table.c \ third_party/upb/upb/upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -5272,16 +5348,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ - src/core/ext/upb-generated/google/api/annotations.upb.c \ - src/core/ext/upb-generated/google/api/http.upb.c \ - src/core/ext/upb-generated/google/protobuf/any.upb.c \ - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ - src/core/ext/upb-generated/google/protobuf/duration.upb.c \ - src/core/ext/upb-generated/google/protobuf/empty.upb.c \ - src/core/ext/upb-generated/google/protobuf/struct.upb.c \ - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ - src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc \ @@ -5289,6 +5355,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ @@ -5301,11 +5368,10 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ - src/core/ext/upb-generated/gogoproto/gogo.upb.c \ - src/core/ext/upb-generated/validate/validate.upb.c \ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ src/core/ext/filters/census/grpc_context.cc \ @@ -15696,6 +15762,7 @@ endif CLIENT_LB_END2END_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc $(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.cc \ test/cpp/end2end/client_lb_end2end_test.cc \ CLIENT_LB_END2END_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CLIENT_LB_END2END_TEST_SRC)))) @@ -15727,6 +15794,8 @@ endif endif +$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v2/orca_load_report_for_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(OBJDIR)/$(CONFIG)/test/cpp/end2end/client_lb_end2end_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_client_lb_end2end_test: $(CLIENT_LB_END2END_TEST_OBJS:.o=.dep) @@ -15736,6 +15805,7 @@ ifneq ($(NO_DEPS),true) -include $(CLIENT_LB_END2END_TEST_OBJS:.o=.dep) endif endif +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/client_lb_end2end_test.o: $(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.pb.cc $(GENDIR)/src/proto/grpc/lb/v2/orca_load_report_for_test.grpc.pb.cc CODEGEN_TEST_FULL_SRC = \ diff --git a/build.yaml b/build.yaml index cbdbf8a60bc..9c546246ab0 100644 --- a/build.yaml +++ b/build.yaml @@ -113,6 +113,7 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h - src/core/ext/upb-generated/envoy/api/v2/cds.upb.h - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h - src/core/ext/upb-generated/envoy/api/v2/eds.upb.h @@ -124,6 +125,7 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c - src/core/ext/upb-generated/envoy/api/v2/cds.upb.c - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c - src/core/ext/upb-generated/envoy/api/v2/eds.upb.c @@ -143,6 +145,7 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h src: - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c @@ -150,11 +153,19 @@ filegroups: - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c uses: - envoy_type_upb - google_api_upb - proto_gen_validate_upb +- name: envoy_orca_upb + headers: + - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h + src: + - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c + uses: + - proto_gen_validate_upb - name: envoy_type_upb headers: - src/core/ext/upb-generated/envoy/type/percent.upb.h @@ -945,6 +956,7 @@ filegroups: - grpc_base - name: grpc_client_channel headers: + - src/core/ext/filters/client_channel/backend_metric.h - src/core/ext/filters/client_channel/backup_poller.h - src/core/ext/filters/client_channel/client_channel.h - src/core/ext/filters/client_channel/client_channel_channelz.h @@ -973,6 +985,7 @@ filegroups: - src/core/ext/filters/client_channel/subchannel_interface.h - src/core/ext/filters/client_channel/subchannel_pool_interface.h src: + - src/core/ext/filters/client_channel/backend_metric.cc - src/core/ext/filters/client_channel/backup_poller.cc - src/core/ext/filters/client_channel/channel_connectivity.cc - src/core/ext/filters/client_channel/client_channel.cc @@ -1004,6 +1017,7 @@ filegroups: - grpc_base - grpc_deadline_filter - grpc_health_upb + - envoy_orca_upb - name: grpc_client_idle_filter src: - src/core/ext/filters/client_idle/client_idle_filter.cc @@ -4741,6 +4755,7 @@ targets: build: test language: c++ src: + - src/proto/grpc/lb/v2/orca_load_report_for_test.proto - test/cpp/end2end/client_lb_end2end_test.cc deps: - grpc++_test_util diff --git a/config.m4 b/config.m4 index 79f69aa36e4..effefa9b561 100644 --- a/config.m4 +++ b/config.m4 @@ -349,6 +349,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc \ src/core/ext/transport/chttp2/client/authority.cc \ src/core/ext/transport/chttp2/client/chttp2_connector.cc \ + src/core/ext/filters/client_channel/backend_metric.cc \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/channel_connectivity.cc \ src/core/ext/filters/client_channel/client_channel.cc \ @@ -377,6 +378,19 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ src/core/ext/filters/deadline/deadline_filter.cc \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ + src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/tsi/fake_transport_security.cc \ src/core/tsi/local_transport_security.cc \ src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc \ @@ -396,16 +410,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc \ src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ - src/core/ext/upb-generated/google/api/annotations.upb.c \ - src/core/ext/upb-generated/google/api/http.upb.c \ - src/core/ext/upb-generated/google/protobuf/any.upb.c \ - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ - src/core/ext/upb-generated/google/protobuf/duration.upb.c \ - src/core/ext/upb-generated/google/protobuf/empty.upb.c \ - src/core/ext/upb-generated/google/protobuf/struct.upb.c \ - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ - src/core/ext/upb-generated/google/rpc/status.upb.c \ src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds.cc \ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc \ @@ -414,6 +418,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ @@ -426,11 +431,10 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ - src/core/ext/upb-generated/gogoproto/gogo.upb.c \ - src/core/ext/upb-generated/validate/validate.upb.c \ src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc \ src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc \ src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc \ @@ -766,6 +770,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/gcp) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/health/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/src/proto/grpc/lb/v1) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/udpa/data/orca/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/upb-generated/validate) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/avl) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/backoff) diff --git a/config.w32 b/config.w32 index 994363a0f1f..13b5f1350f0 100644 --- a/config.w32 +++ b/config.w32 @@ -323,6 +323,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.cc " + "src\\core\\ext\\transport\\chttp2\\client\\authority.cc " + "src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.cc " + + "src\\core\\ext\\filters\\client_channel\\backend_metric.cc " + "src\\core\\ext\\filters\\client_channel\\backup_poller.cc " + "src\\core\\ext\\filters\\client_channel\\channel_connectivity.cc " + "src\\core\\ext\\filters\\client_channel\\client_channel.cc " + @@ -351,6 +352,19 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " + "src\\core\\ext\\filters\\deadline\\deadline_filter.cc " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1\\health.upb.c " + + "src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1\\orca_load_report.upb.c " + + "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " + + "src\\core\\ext\\upb-generated\\validate\\validate.upb.c " + + "src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " + + "src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\any.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upb.c " + + "src\\core\\ext\\upb-generated\\google\\rpc\\status.upb.c " + "src\\core\\tsi\\fake_transport_security.cc " + "src\\core\\tsi\\local_transport_security.cc " + "src\\core\\tsi\\ssl\\session_cache\\ssl_session_boringssl.cc " + @@ -370,16 +384,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.cc " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1\\load_balancer.upb.c " + - "src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " + - "src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\any.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upb.c " + - "src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upb.c " + - "src\\core\\ext\\upb-generated\\google\\rpc\\status.upb.c " + "src\\core\\ext\\filters\\client_channel\\resolver\\fake\\fake_resolver.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy\\xds\\xds_channel_secure.cc " + @@ -388,6 +392,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\filter.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\outlier_detection.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\discovery.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upb.c " + @@ -400,11 +405,10 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\config_source.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\grpc_service.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\health_check.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\http_uri.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\protocol.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\percent.upb.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\range.upb.c " + - "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " + - "src\\core\\ext\\upb-generated\\validate\\validate.upb.c " + "src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.cc " + "src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.cc " + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.cc " + @@ -785,6 +789,10 @@ if (PHP_GRPC != "no") { FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\upb-generated\\validate"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib"); FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\avl"); diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index e6f926ca166..658a3ad6158 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -352,6 +352,7 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_interface.h', 'src/core/ext/transport/chttp2/client/authority.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', + 'src/core/ext/filters/client_channel/backend_metric.h', 'src/core/ext/filters/client_channel/backup_poller.h', 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', @@ -381,6 +382,19 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upb.h', 'src/core/tsi/fake_transport_security.h', 'src/core/tsi/local_transport_security.h', 'src/core/tsi/ssl/session_cache/ssl_session.h', @@ -540,16 +554,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', - 'src/core/ext/upb-generated/google/api/annotations.upb.h', - 'src/core/ext/upb-generated/google/api/http.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/rpc/status.upb.h', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h', @@ -557,6 +561,7 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', @@ -569,11 +574,10 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', - 'src/core/ext/upb-generated/validate/validate.upb.h', 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h', @@ -847,6 +851,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -875,6 +880,19 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/tsi/fake_transport_security.cc', 'src/core/tsi/local_transport_security.cc', 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc', @@ -894,16 +912,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', - 'src/core/ext/upb-generated/google/api/annotations.upb.c', - 'src/core/ext/upb-generated/google/api/http.upb.c', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', - 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc', @@ -912,6 +920,7 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', @@ -924,11 +933,10 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', - 'src/core/ext/upb-generated/validate/validate.upb.c', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -1078,6 +1086,7 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_interface.h', 'src/core/ext/transport/chttp2/client/authority.h', 'src/core/ext/transport/chttp2/client/chttp2_connector.h', + 'src/core/ext/filters/client_channel/backend_metric.h', 'src/core/ext/filters/client_channel/backup_poller.h', 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', @@ -1107,6 +1116,19 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/subchannel_pool_interface.h', 'src/core/ext/filters/deadline/deadline_filter.h', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upb.h', 'src/core/tsi/fake_transport_security.h', 'src/core/tsi/local_transport_security.h', 'src/core/tsi/ssl/session_cache/ssl_session.h', @@ -1266,16 +1288,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', - 'src/core/ext/upb-generated/google/api/annotations.upb.h', - 'src/core/ext/upb-generated/google/api/http.upb.h', - 'src/core/ext/upb-generated/google/protobuf/any.upb.h', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', - 'src/core/ext/upb-generated/google/rpc/status.upb.h', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h', @@ -1283,6 +1295,7 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', @@ -1295,11 +1308,10 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', - 'src/core/ext/upb-generated/validate/validate.upb.h', 'src/core/ext/filters/client_channel/lb_policy/subchannel_list.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h', diff --git a/grpc.gemspec b/grpc.gemspec index 5a29165c92d..1b705016cee 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -282,6 +282,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/tsi/transport_security_interface.h ) s.files += %w( src/core/ext/transport/chttp2/client/authority.h ) s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.h ) + s.files += %w( src/core/ext/filters/client_channel/backend_metric.h ) s.files += %w( src/core/ext/filters/client_channel/backup_poller.h ) s.files += %w( src/core/ext/filters/client_channel/client_channel.h ) s.files += %w( src/core/ext/filters/client_channel/client_channel_channelz.h ) @@ -311,6 +312,19 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/subchannel_pool_interface.h ) s.files += %w( src/core/ext/filters/deadline/deadline_filter.h ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h ) + s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h ) + s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.h ) + s.files += %w( src/core/ext/upb-generated/validate/validate.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/api/http.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.h ) + s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.h ) s.files += %w( src/core/tsi/fake_transport_security.h ) s.files += %w( src/core/tsi/local_transport_security.h ) s.files += %w( src/core/tsi/ssl/session_cache/ssl_session.h ) @@ -470,16 +484,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/api/http.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.h ) - s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h ) @@ -487,6 +491,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.h ) @@ -499,11 +504,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.h ) s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.h ) - s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.h ) - s.files += %w( src/core/ext/upb-generated/validate/validate.upb.h ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/subchannel_list.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h ) @@ -777,6 +781,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc ) s.files += %w( src/core/ext/transport/chttp2/client/authority.cc ) s.files += %w( src/core/ext/transport/chttp2/client/chttp2_connector.cc ) + s.files += %w( src/core/ext/filters/client_channel/backend_metric.cc ) s.files += %w( src/core/ext/filters/client_channel/backup_poller.cc ) s.files += %w( src/core/ext/filters/client_channel/channel_connectivity.cc ) s.files += %w( src/core/ext/filters/client_channel/client_channel.cc ) @@ -805,6 +810,19 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/subchannel_pool_interface.cc ) s.files += %w( src/core/ext/filters/deadline/deadline_filter.cc ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c ) + s.files += %w( src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c ) + s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.c ) + s.files += %w( src/core/ext/upb-generated/validate/validate.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/api/http.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.c ) + s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.c ) s.files += %w( src/core/tsi/fake_transport_security.cc ) s.files += %w( src/core/tsi/local_transport_security.cc ) s.files += %w( src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc ) @@ -824,16 +842,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc ) s.files += %w( src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/api/annotations.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/api/http.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/any.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/descriptor.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/duration.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/empty.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/struct.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/timestamp.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/protobuf/wrappers.upb.c ) - s.files += %w( src/core/ext/upb-generated/google/rpc/status.upb.c ) s.files += %w( src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc ) @@ -842,6 +850,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cds.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/eds.upb.c ) @@ -854,11 +863,10 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c ) + s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/percent.upb.c ) s.files += %w( src/core/ext/upb-generated/envoy/type/range.upb.c ) - s.files += %w( src/core/ext/upb-generated/gogoproto/gogo.upb.c ) - s.files += %w( src/core/ext/upb-generated/validate/validate.upb.c ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc ) s.files += %w( src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc ) s.files += %w( src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc ) diff --git a/grpc.gyp b/grpc.gyp index 3b86e613131..64481e22df3 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -553,6 +553,7 @@ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -581,6 +582,19 @@ 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/tsi/fake_transport_security.cc', 'src/core/tsi/local_transport_security.cc', 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc', @@ -600,16 +614,6 @@ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', - 'src/core/ext/upb-generated/google/api/annotations.upb.c', - 'src/core/ext/upb-generated/google/api/http.upb.c', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', - 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc', @@ -618,6 +622,7 @@ 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', @@ -630,11 +635,10 @@ 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', - 'src/core/ext/upb-generated/validate/validate.upb.c', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -857,6 +861,7 @@ 'src/core/lib/transport/transport_op_string.cc', 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -891,6 +896,19 @@ 'third_party/upb/upb/port.c', 'third_party/upb/upb/table.c', 'third_party/upb/upb/upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1112,6 +1130,7 @@ 'src/core/lib/transport/transport_op_string.cc', 'src/core/lib/uri/uri_parser.cc', 'src/core/lib/debug/trace.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -1146,6 +1165,19 @@ 'third_party/upb/upb/port.c', 'third_party/upb/upb/table.c', 'third_party/upb/upb/upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.cc', @@ -1378,6 +1410,7 @@ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -1412,6 +1445,19 @@ 'third_party/upb/upb/port.c', 'third_party/upb/upb/table.c', 'third_party/upb/upb/upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/transport/inproc/inproc_plugin.cc', 'src/core/ext/transport/inproc/inproc_transport.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', @@ -1435,16 +1481,6 @@ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', - 'src/core/ext/upb-generated/google/api/annotations.upb.c', - 'src/core/ext/upb-generated/google/api/http.upb.c', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', - 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc', @@ -1452,6 +1488,7 @@ 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', @@ -1464,11 +1501,10 @@ 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', - 'src/core/ext/upb-generated/validate/validate.upb.c', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/filters/census/grpc_context.cc', diff --git a/package.xml b/package.xml index 196c6a6d7db..385a57c77ea 100644 --- a/package.xml +++ b/package.xml @@ -287,6 +287,7 @@ + @@ -316,6 +317,19 @@ + + + + + + + + + + + + + @@ -475,16 +489,6 @@ - - - - - - - - - - @@ -492,6 +496,7 @@ + @@ -504,11 +509,10 @@ + - - @@ -782,6 +786,7 @@ + @@ -810,6 +815,19 @@ + + + + + + + + + + + + + @@ -829,16 +847,6 @@ - - - - - - - - - - @@ -847,6 +855,7 @@ + @@ -859,11 +868,10 @@ + - - diff --git a/src/core/ext/filters/client_channel/backend_metric.cc b/src/core/ext/filters/client_channel/backend_metric.cc new file mode 100644 index 00000000000..0d6aa2f6e2c --- /dev/null +++ b/src/core/ext/filters/client_channel/backend_metric.cc @@ -0,0 +1,78 @@ +// +// Copyright 2019 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "src/core/ext/filters/client_channel/backend_metric.h" + +#include "src/core/lib/gprpp/string_view.h" +#include "udpa/data/orca/v1/orca_load_report.upb.h" + +namespace grpc_core { + +namespace { + +template +Map ParseMap( + udpa_data_orca_v1_OrcaLoadReport* msg, + EntryType** (*entry_func)(udpa_data_orca_v1_OrcaLoadReport*, size_t*), + upb_strview (*key_func)(const EntryType*), + double (*value_func)(const EntryType*), Arena* arena) { + Map result; + size_t size; + const auto* const* entries = entry_func(msg, &size); + for (size_t i = 0; i < size; ++i) { + upb_strview key_view = key_func(entries[i]); + char* key = static_cast(arena->Alloc(key_view.size + 1)); + memcpy(key, key_view.data, key_view.size); + result[StringView(key, key_view.size)] = value_func(entries[i]); + } + return result; +} + +} // namespace + +const LoadBalancingPolicy::BackendMetricData* ParseBackendMetricData( + const grpc_slice& serialized_load_report, Arena* arena) { + upb::Arena upb_arena; + udpa_data_orca_v1_OrcaLoadReport* msg = + udpa_data_orca_v1_OrcaLoadReport_parse( + reinterpret_cast( + GRPC_SLICE_START_PTR(serialized_load_report)), + GRPC_SLICE_LENGTH(serialized_load_report), upb_arena.ptr()); + if (msg == nullptr) return nullptr; + LoadBalancingPolicy::BackendMetricData* backend_metric_data = + arena->New(); + backend_metric_data->cpu_utilization = + udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(msg); + backend_metric_data->mem_utilization = + udpa_data_orca_v1_OrcaLoadReport_mem_utilization(msg); + backend_metric_data->requests_per_second = + udpa_data_orca_v1_OrcaLoadReport_rps(msg); + backend_metric_data->request_cost = + ParseMap( + msg, udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost, + udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key, + udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value, arena); + backend_metric_data->utilization = + ParseMap( + msg, udpa_data_orca_v1_OrcaLoadReport_mutable_utilization, + udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key, + udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value, arena); + return backend_metric_data; +} + +} // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/backend_metric.h b/src/core/ext/filters/client_channel/backend_metric.h new file mode 100644 index 00000000000..d92b76c8d32 --- /dev/null +++ b/src/core/ext/filters/client_channel/backend_metric.h @@ -0,0 +1,36 @@ +// +// Copyright 2019 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H +#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H + +#include + +#include + +#include "src/core/ext/filters/client_channel/lb_policy.h" +#include "src/core/lib/gprpp/arena.h" + +namespace grpc_core { + +// Parses the serialized load report and allocates a BackendMetricData +// object on the arena. +const LoadBalancingPolicy::BackendMetricData* ParseBackendMetricData( + const grpc_slice& serialized_load_report, Arena* arena); + +} // namespace grpc_core + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_BACKEND_METRIC_H */ diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index db5ddcb46b9..2482614e8c9 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -31,6 +31,7 @@ #include #include +#include "src/core/ext/filters/client_channel/backend_metric.h" #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" @@ -374,6 +375,19 @@ class CallData { void* Alloc(size_t size) override { return calld_->arena_->Alloc(size); } + const LoadBalancingPolicy::BackendMetricData* GetBackendMetricData() + override { + if (calld_->backend_metric_data_ == nullptr) { + grpc_linked_mdelem* md = calld_->recv_trailing_metadata_->idx.named + .x_endpoint_load_metrics_bin; + if (md != nullptr) { + calld_->backend_metric_data_ = + ParseBackendMetricData(GRPC_MDVALUE(md->md), calld_->arena_); + } + } + return calld_->backend_metric_data_; + } + private: CallData* calld_; }; @@ -706,6 +720,7 @@ class CallData { bool service_config_applied_ = false; QueuedPickCanceller* pick_canceller_ = nullptr; LbCallState lb_call_state_; + const LoadBalancingPolicy::BackendMetricData* backend_metric_data_ = nullptr; RefCountedPtr connected_subchannel_; void (*lb_recv_trailing_metadata_ready_)( void* user_data, grpc_error* error, @@ -1927,6 +1942,10 @@ CallData::CallData(grpc_call_element* elem, const ChannelData& chand, CallData::~CallData() { grpc_slice_unref_internal(path_); GRPC_ERROR_UNREF(cancel_error_); + if (backend_metric_data_ != nullptr) { + backend_metric_data_ + ->LoadBalancingPolicy::BackendMetricData::~BackendMetricData(); + } // Make sure there are no remaining pending batches. for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) { GPR_ASSERT(pending_batches_[i].batch == nullptr); diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 7df581288cc..093d5fc30b8 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -25,6 +25,7 @@ #include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/ext/filters/client_channel/subchannel_interface.h" #include "src/core/lib/gprpp/abstract.h" +#include "src/core/lib/gprpp/map.h" #include "src/core/lib/gprpp/orphanable.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/gprpp/string_view.h" @@ -77,6 +78,26 @@ extern DebugOnlyTraceFlag grpc_trace_lb_policy_refcount; // interested_parties() hooks from the API. class LoadBalancingPolicy : public InternallyRefCounted { public: + // Represents backend metrics reported by the backend to the client. + struct BackendMetricData { + /// CPU utilization expressed as a fraction of available CPU resources. + double cpu_utilization; + /// Memory utilization expressed as a fraction of available memory + /// resources. + double mem_utilization; + /// Total requests per second being served by the backend. This + /// should include all services that a backend is responsible for. + uint64_t requests_per_second; + /// Application-specific requests cost metrics. Metric names are + /// determined by the application. Each value is an absolute cost + /// (e.g. 3487 bytes of storage) associated with the request. + Map request_cost; + /// Application-specific resource utilization metrics. Metric names + /// are determined by the application. Each value is expressed as a + /// fraction of total resources available. + Map utilization; + }; + /// Interface for accessing per-call state. /// Implemented by the client channel and used by the SubchannelPicker. class CallState { @@ -90,6 +111,10 @@ class LoadBalancingPolicy : public InternallyRefCounted { /// for allocations that need to be made on a per-call basis. virtual void* Alloc(size_t size) GRPC_ABSTRACT; + /// Returns the backend metric data returned by the server for the call, + /// or null if no backend metric data was returned. + virtual const BackendMetricData* GetBackendMetricData() GRPC_ABSTRACT; + GRPC_ABSTRACT_BASE_CLASS }; @@ -175,6 +200,7 @@ class LoadBalancingPolicy : public InternallyRefCounted { /// modified by the callback. The callback does not take ownership, /// however, so any data that needs to be used after returning must /// be copied. + /// call_state can be used to obtain backend metric data. // TODO(roth): Replace grpc_error with something better before we allow // people outside of gRPC team to use this API. void (*recv_trailing_metadata_ready)( diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c index 844ad3d147f..f1deb309a60 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c @@ -11,6 +11,8 @@ #include "envoy/api/v2/auth/cert.upb.h" #include "envoy/api/v2/core/base.upb.h" #include "envoy/api/v2/core/config_source.upb.h" +#include "google/protobuf/any.upb.h" +#include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" #include "validate/validate.upb.h" #include "gogoproto/gogo.upb.h" @@ -30,22 +32,41 @@ const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit = { UPB_SIZE(24, 32), 4, false, }; -static const upb_msglayout *const envoy_api_v2_auth_TlsCertificate_submsgs[5] = { +static const upb_msglayout *const envoy_api_v2_auth_PrivateKeyProvider_submsgs[2] = { + &google_protobuf_Any_msginit, + &google_protobuf_Struct_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_auth_PrivateKeyProvider__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit = { + &envoy_api_v2_auth_PrivateKeyProvider_submsgs[0], + &envoy_api_v2_auth_PrivateKeyProvider__fields[0], + UPB_SIZE(16, 32), 3, false, +}; + +static const upb_msglayout *const envoy_api_v2_auth_TlsCertificate_submsgs[6] = { + &envoy_api_v2_auth_PrivateKeyProvider_msginit, &envoy_api_v2_core_DataSource_msginit, }; -static const upb_msglayout_field envoy_api_v2_auth_TlsCertificate__fields[5] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {4, UPB_SIZE(12, 24), 0, 0, 11, 1}, - {5, UPB_SIZE(16, 32), 0, 0, 11, 3}, +static const upb_msglayout_field envoy_api_v2_auth_TlsCertificate__fields[6] = { + {1, UPB_SIZE(0, 0), 0, 1, 11, 1}, + {2, UPB_SIZE(4, 8), 0, 1, 11, 1}, + {3, UPB_SIZE(8, 16), 0, 1, 11, 1}, + {4, UPB_SIZE(12, 24), 0, 1, 11, 1}, + {5, UPB_SIZE(20, 40), 0, 1, 11, 3}, + {6, UPB_SIZE(16, 32), 0, 0, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_TlsCertificate_msginit = { &envoy_api_v2_auth_TlsCertificate_submsgs[0], &envoy_api_v2_auth_TlsCertificate__fields[0], - UPB_SIZE(20, 40), 5, false, + UPB_SIZE(24, 48), 6, false, }; static const upb_msglayout *const envoy_api_v2_auth_TlsSessionTicketKeys_submsgs[1] = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h index 89aeaee2fd7..252d9d76e9e 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h @@ -21,6 +21,7 @@ extern "C" { #endif struct envoy_api_v2_auth_TlsParameters; +struct envoy_api_v2_auth_PrivateKeyProvider; struct envoy_api_v2_auth_TlsCertificate; struct envoy_api_v2_auth_TlsSessionTicketKeys; struct envoy_api_v2_auth_CertificateValidationContext; @@ -31,6 +32,7 @@ struct envoy_api_v2_auth_DownstreamTlsContext; struct envoy_api_v2_auth_SdsSecretConfig; struct envoy_api_v2_auth_Secret; typedef struct envoy_api_v2_auth_TlsParameters envoy_api_v2_auth_TlsParameters; +typedef struct envoy_api_v2_auth_PrivateKeyProvider envoy_api_v2_auth_PrivateKeyProvider; typedef struct envoy_api_v2_auth_TlsCertificate envoy_api_v2_auth_TlsCertificate; typedef struct envoy_api_v2_auth_TlsSessionTicketKeys envoy_api_v2_auth_TlsSessionTicketKeys; typedef struct envoy_api_v2_auth_CertificateValidationContext envoy_api_v2_auth_CertificateValidationContext; @@ -41,6 +43,7 @@ typedef struct envoy_api_v2_auth_DownstreamTlsContext envoy_api_v2_auth_Downstre typedef struct envoy_api_v2_auth_SdsSecretConfig envoy_api_v2_auth_SdsSecretConfig; typedef struct envoy_api_v2_auth_Secret envoy_api_v2_auth_Secret; extern const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit; +extern const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit; extern const upb_msglayout envoy_api_v2_auth_TlsCertificate_msginit; extern const upb_msglayout envoy_api_v2_auth_TlsSessionTicketKeys_msginit; extern const upb_msglayout envoy_api_v2_auth_CertificateValidationContext_msginit; @@ -52,11 +55,15 @@ extern const upb_msglayout envoy_api_v2_auth_SdsSecretConfig_msginit; extern const upb_msglayout envoy_api_v2_auth_Secret_msginit; struct envoy_api_v2_core_ConfigSource; struct envoy_api_v2_core_DataSource; +struct google_protobuf_Any; struct google_protobuf_BoolValue; +struct google_protobuf_Struct; struct google_protobuf_UInt32Value; extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_Struct_msginit; extern const upb_msglayout google_protobuf_UInt32Value_msginit; typedef enum { @@ -114,6 +121,61 @@ UPB_INLINE bool envoy_api_v2_auth_TlsParameters_add_ecdh_curves(envoy_api_v2_aut msg, UPB_SIZE(20, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); } +/* envoy.api.v2.auth.PrivateKeyProvider */ + +UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_new(upb_arena *arena) { + return (envoy_api_v2_auth_PrivateKeyProvider *)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); +} +UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_auth_PrivateKeyProvider *ret = envoy_api_v2_auth_PrivateKeyProvider_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_auth_PrivateKeyProvider_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_auth_PrivateKeyProvider_serialize(const envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_auth_PrivateKeyProvider_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_auth_PrivateKeyProvider_config_type_config = 2, + envoy_api_v2_auth_PrivateKeyProvider_config_type_typed_config = 3, + envoy_api_v2_auth_PrivateKeyProvider_config_type_NOT_SET = 0 +} envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases; +UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases envoy_api_v2_auth_PrivateKeyProvider_config_type_case(const envoy_api_v2_auth_PrivateKeyProvider* msg) { return (envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } + +UPB_INLINE upb_strview envoy_api_v2_auth_PrivateKeyProvider_provider_name(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } +UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } + +UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_provider_name(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_config(envoy_api_v2_auth_PrivateKeyProvider *msg, struct google_protobuf_Struct* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); +} +UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_mutable_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) { + struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_auth_PrivateKeyProvider_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_auth_PrivateKeyProvider_set_config(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(envoy_api_v2_auth_PrivateKeyProvider *msg, struct google_protobuf_Any* value) { + UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3); +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_mutable_typed_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_auth_PrivateKeyProvider_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(msg, sub); + } + return sub; +} + /* envoy.api.v2.auth.TlsCertificate */ UPB_INLINE envoy_api_v2_auth_TlsCertificate *envoy_api_v2_auth_TlsCertificate_new(upb_arena *arena) { @@ -132,7 +194,8 @@ UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCerti UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_private_key(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_password(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)); } UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_ocsp_staple(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 24)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsCertificate_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsCertificate_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } +UPB_INLINE const envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_private_key_provider(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)); } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_certificate_chain(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) { UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)) = value; @@ -183,18 +246,30 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate return sub; } UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificate_mutable_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { - return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); + return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificate_resize_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_add_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; return sub; } +UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, envoy_api_v2_auth_PrivateKeyProvider* value) { + UPB_FIELD_AT(msg, envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)) = value; +} +UPB_INLINE struct envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_mutable_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { + struct envoy_api_v2_auth_PrivateKeyProvider* sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)envoy_api_v2_auth_TlsCertificate_private_key_provider(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_auth_TlsCertificate_set_private_key_provider(msg, sub); + } + return sub; +} /* envoy.api.v2.auth.TlsSessionTicketKeys */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c index f5a7b9195e1..9a0b48a99cc 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c @@ -17,6 +17,7 @@ #include "envoy/api/v2/core/health_check.upb.h" #include "envoy/api/v2/core/protocol.upb.h" #include "envoy/api/v2/cluster/circuit_breaker.upb.h" +#include "envoy/api/v2/cluster/filter.upb.h" #include "envoy/api/v2/cluster/outlier_detection.upb.h" #include "envoy/api/v2/eds.upb.h" #include "envoy/type/percent.upb.h" @@ -30,7 +31,7 @@ #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = { +static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[29] = { &envoy_api_v2_Cluster_CommonLbConfig_msginit, &envoy_api_v2_Cluster_CustomClusterType_msginit, &envoy_api_v2_Cluster_EdsClusterConfig_msginit, @@ -44,6 +45,7 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = { &envoy_api_v2_UpstreamConnectionOptions_msginit, &envoy_api_v2_auth_UpstreamTlsContext_msginit, &envoy_api_v2_cluster_CircuitBreakers_msginit, + &envoy_api_v2_cluster_Filter_msginit, &envoy_api_v2_cluster_OutlierDetection_msginit, &envoy_api_v2_core_Address_msginit, &envoy_api_v2_core_BindConfig_msginit, @@ -57,49 +59,51 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[28] = { &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_Cluster__fields[36] = { +static const upb_msglayout_field envoy_api_v2_Cluster__fields[38] = { {1, UPB_SIZE(28, 32), 0, 0, 9, 1}, - {2, UPB_SIZE(144, 256), UPB_SIZE(-153, -265), 0, 14, 1}, + {2, UPB_SIZE(144, 264), UPB_SIZE(-153, -273), 0, 14, 1}, {3, UPB_SIZE(44, 64), 0, 2, 11, 1}, - {4, UPB_SIZE(48, 72), 0, 22, 11, 1}, - {5, UPB_SIZE(52, 80), 0, 23, 11, 1}, + {4, UPB_SIZE(48, 72), 0, 23, 11, 1}, + {5, UPB_SIZE(52, 80), 0, 24, 11, 1}, {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {7, UPB_SIZE(120, 216), 0, 14, 11, 3}, - {8, UPB_SIZE(124, 224), 0, 16, 11, 3}, - {9, UPB_SIZE(56, 88), 0, 23, 11, 1}, + {7, UPB_SIZE(120, 216), 0, 15, 11, 3}, + {8, UPB_SIZE(124, 224), 0, 17, 11, 3}, + {9, UPB_SIZE(56, 88), 0, 24, 11, 1}, {10, UPB_SIZE(60, 96), 0, 12, 11, 1}, {11, UPB_SIZE(64, 104), 0, 11, 11, 1}, - {13, UPB_SIZE(68, 112), 0, 17, 11, 1}, - {14, UPB_SIZE(72, 120), 0, 18, 11, 1}, - {16, UPB_SIZE(76, 128), 0, 22, 11, 1}, + {13, UPB_SIZE(68, 112), 0, 18, 11, 1}, + {14, UPB_SIZE(72, 120), 0, 19, 11, 1}, + {16, UPB_SIZE(76, 128), 0, 23, 11, 1}, {17, UPB_SIZE(8, 8), 0, 0, 14, 1}, - {18, UPB_SIZE(128, 232), 0, 14, 11, 3}, - {19, UPB_SIZE(80, 136), 0, 13, 11, 1}, - {20, UPB_SIZE(84, 144), 0, 22, 11, 1}, - {21, UPB_SIZE(88, 152), 0, 15, 11, 1}, + {18, UPB_SIZE(128, 232), 0, 15, 11, 3}, + {19, UPB_SIZE(80, 136), 0, 14, 11, 1}, + {20, UPB_SIZE(84, 144), 0, 23, 11, 1}, + {21, UPB_SIZE(88, 152), 0, 16, 11, 1}, {22, UPB_SIZE(92, 160), 0, 4, 11, 1}, - {23, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 7, 11, 1}, - {24, UPB_SIZE(96, 168), 0, 21, 11, 1}, - {25, UPB_SIZE(100, 176), 0, 20, 11, 1}, + {23, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 7, 11, 1}, + {24, UPB_SIZE(96, 168), 0, 22, 11, 1}, + {25, UPB_SIZE(100, 176), 0, 21, 11, 1}, {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, {27, UPB_SIZE(104, 184), 0, 0, 11, 1}, {28, UPB_SIZE(36, 48), 0, 0, 9, 1}, - {29, UPB_SIZE(108, 192), 0, 19, 11, 1}, + {29, UPB_SIZE(108, 192), 0, 20, 11, 1}, {30, UPB_SIZE(112, 200), 0, 10, 11, 1}, {31, UPB_SIZE(24, 24), 0, 0, 8, 1}, {32, UPB_SIZE(25, 25), 0, 0, 8, 1}, {33, UPB_SIZE(116, 208), 0, 9, 11, 1}, - {34, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 6, 11, 1}, + {34, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 6, 11, 1}, {35, UPB_SIZE(132, 240), 0, 3, 11, 3}, {36, UPB_SIZE(136, 248), 0, 8, 11, 3}, - {37, UPB_SIZE(156, 272), UPB_SIZE(-161, -281), 5, 11, 1}, - {38, UPB_SIZE(144, 256), UPB_SIZE(-153, -265), 1, 11, 1}, + {37, UPB_SIZE(156, 280), UPB_SIZE(-161, -289), 5, 11, 1}, + {38, UPB_SIZE(144, 264), UPB_SIZE(-153, -273), 1, 11, 1}, + {39, UPB_SIZE(26, 26), 0, 0, 8, 1}, + {40, UPB_SIZE(140, 256), 0, 13, 11, 3}, }; const upb_msglayout envoy_api_v2_Cluster_msginit = { &envoy_api_v2_Cluster_submsgs[0], &envoy_api_v2_Cluster__fields[0], - UPB_SIZE(168, 288), 36, false, + UPB_SIZE(168, 304), 38, false, }; static const upb_msglayout *const envoy_api_v2_Cluster_CustomClusterType_submsgs[1] = { @@ -167,29 +171,31 @@ static const upb_msglayout *const envoy_api_v2_Cluster_LbSubsetConfig_submsgs[2] &google_protobuf_Struct_msginit, }; -static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[6] = { +static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig__fields[7] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(12, 16), 0, 1, 11, 1}, {3, UPB_SIZE(16, 24), 0, 0, 11, 3}, {4, UPB_SIZE(8, 8), 0, 0, 8, 1}, {5, UPB_SIZE(9, 9), 0, 0, 8, 1}, {6, UPB_SIZE(10, 10), 0, 0, 8, 1}, + {7, UPB_SIZE(11, 11), 0, 0, 8, 1}, }; const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_msginit = { &envoy_api_v2_Cluster_LbSubsetConfig_submsgs[0], &envoy_api_v2_Cluster_LbSubsetConfig__fields[0], - UPB_SIZE(24, 32), 6, false, + UPB_SIZE(24, 32), 7, false, }; -static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 9, 3}, +static const upb_msglayout_field envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[2] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 3}, + {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, }; const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit = { NULL, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector__fields[0], - UPB_SIZE(4, 8), 1, false, + UPB_SIZE(16, 16), 2, false, }; static const upb_msglayout *const envoy_api_v2_Cluster_LeastRequestLbConfig_submsgs[1] = { @@ -239,18 +245,19 @@ static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[4] &google_protobuf_Duration_msginit, }; -static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[5] = { +static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[6] = { {1, UPB_SIZE(4, 8), 0, 2, 11, 1}, {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1}, {4, UPB_SIZE(8, 16), 0, 3, 11, 1}, {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, }; const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_msginit = { &envoy_api_v2_Cluster_CommonLbConfig_submsgs[0], &envoy_api_v2_Cluster_CommonLbConfig__fields[0], - UPB_SIZE(20, 40), 5, false, + UPB_SIZE(20, 40), 6, false, }; static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[2] = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h index 2fecf727bcb..5bc331902ee 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h @@ -68,6 +68,7 @@ extern const upb_msglayout envoy_api_v2_UpstreamConnectionOptions_msginit; struct envoy_api_v2_ClusterLoadAssignment; struct envoy_api_v2_auth_UpstreamTlsContext; struct envoy_api_v2_cluster_CircuitBreakers; +struct envoy_api_v2_cluster_Filter; struct envoy_api_v2_cluster_OutlierDetection; struct envoy_api_v2_core_Address; struct envoy_api_v2_core_BindConfig; @@ -88,6 +89,7 @@ struct google_protobuf_UInt64Value; extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit; extern const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit; extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit; +extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit; extern const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit; extern const upb_msglayout envoy_api_v2_core_Address_msginit; extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit; @@ -141,6 +143,13 @@ typedef enum { envoy_api_v2_Cluster_LbSubsetConfig_DEFAULT_SUBSET = 2 } envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetFallbackPolicy; +typedef enum { + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NOT_DEFINED = 0, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_NO_FALLBACK = 1, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_ANY_ENDPOINT = 2, + envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_DEFAULT_SUBSET = 3 +} envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_LbSubsetSelectorFallbackPolicy; + typedef enum { envoy_api_v2_Cluster_RingHashLbConfig_XX_HASH = 0, envoy_api_v2_Cluster_RingHashLbConfig_MURMUR_HASH_2 = 1 @@ -166,7 +175,7 @@ typedef enum { envoy_api_v2_Cluster_cluster_discovery_type_cluster_type = 38, envoy_api_v2_Cluster_cluster_discovery_type_NOT_SET = 0 } envoy_api_v2_Cluster_cluster_discovery_type_oneofcases; -UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(152, 264)); } +UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(152, 272)); } typedef enum { envoy_api_v2_Cluster_lb_config_ring_hash_lb_config = 23, @@ -174,11 +183,11 @@ typedef enum { envoy_api_v2_Cluster_lb_config_least_request_lb_config = 37, envoy_api_v2_Cluster_lb_config_NOT_SET = 0 } envoy_api_v2_Cluster_lb_config_oneofcases; -UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(160, 280)); } +UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(160, 288)); } UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); } -UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 264), 2); } -UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(144, 256), UPB_SIZE(152, 264), 2, envoy_api_v2_Cluster_STATIC); } +UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 272), 2); } +UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(144, 264), UPB_SIZE(152, 272), 2, envoy_api_v2_Cluster_STATIC); } UPB_INLINE const envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(44, 64)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_connect_timeout(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(48, 72)); } UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(52, 80)); } @@ -197,8 +206,8 @@ UPB_INLINE const struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Clus UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_cleanup_interval(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(84, 144)); } UPB_INLINE const struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_BindConfig*, UPB_SIZE(88, 152)); } UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_lb_subset_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_LbSubsetConfig*, UPB_SIZE(92, 160)); } -UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 23); } -UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 23, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 23); } +UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 23, NULL); } UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_transport_socket(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(96, 168)); } UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_metadata(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(100, 176)); } UPB_INLINE int32_t envoy_api_v2_Cluster_protocol_selection(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } @@ -209,20 +218,22 @@ UPB_INLINE const envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_up UPB_INLINE bool envoy_api_v2_Cluster_close_connections_on_host_health_failure(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); } UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_ClusterLoadAssignment*, UPB_SIZE(116, 208)); } -UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 34); } -UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 34, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 34); } +UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 34, NULL); } UPB_INLINE const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(132, 240), len); } UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_typed_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(136, 248), len); } -UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 280), 37); } -UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 272), UPB_SIZE(160, 280), 37, NULL); } -UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 264), 38); } -UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 256), UPB_SIZE(152, 264), 38, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(160, 288), 37); } +UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 280), UPB_SIZE(160, 288), 37, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(152, 272), 38); } +UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 264), UPB_SIZE(152, 272), 38, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_respect_dns_ttl(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); } +UPB_INLINE const struct envoy_api_v2_cluster_Filter* const* envoy_api_v2_Cluster_filters(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_cluster_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(140, 256), len); } UPB_INLINE void envoy_api_v2_Cluster_set_name(envoy_api_v2_Cluster *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_type(envoy_api_v2_Cluster *msg, int32_t value) { - UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(144, 256), value, UPB_SIZE(152, 264), 2); + UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(144, 264), value, UPB_SIZE(152, 272), 2); } UPB_INLINE void envoy_api_v2_Cluster_set_eds_cluster_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_EdsClusterConfig* value) { UPB_FIELD_AT(msg, envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(44, 64)) = value; @@ -426,7 +437,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_muta return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_ring_hash_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_RingHashLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 23); + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 23); } UPB_INLINE struct envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_mutable_ring_hash_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_RingHashLbConfig* sub = (struct envoy_api_v2_Cluster_RingHashLbConfig*)envoy_api_v2_Cluster_ring_hash_lb_config(msg); @@ -522,7 +533,7 @@ UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_mutab return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_original_dst_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_OriginalDstLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 34); + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 34); } UPB_INLINE struct envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_mutable_original_dst_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_OriginalDstLbConfig* sub = (struct envoy_api_v2_Cluster_OriginalDstLbConfig*)envoy_api_v2_Cluster_original_dst_lb_config(msg); @@ -560,7 +571,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_least_request_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_LeastRequestLbConfig* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 272), value, UPB_SIZE(160, 280), 37); + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(156, 280), value, UPB_SIZE(160, 288), 37); } UPB_INLINE struct envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_mutable_least_request_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_LeastRequestLbConfig* sub = (struct envoy_api_v2_Cluster_LeastRequestLbConfig*)envoy_api_v2_Cluster_least_request_lb_config(msg); @@ -572,7 +583,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluste return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_cluster_type(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_CustomClusterType* value) { - UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 256), value, UPB_SIZE(152, 264), 38); + UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(144, 264), value, UPB_SIZE(152, 272), 38); } UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_mutable_cluster_type(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CustomClusterType* sub = (struct envoy_api_v2_Cluster_CustomClusterType*)envoy_api_v2_Cluster_cluster_type(msg); @@ -583,6 +594,22 @@ UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_m } return sub; } +UPB_INLINE void envoy_api_v2_Cluster_set_respect_dns_ttl(envoy_api_v2_Cluster *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; +} +UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_mutable_filters(envoy_api_v2_Cluster *msg, size_t *len) { + return (struct envoy_api_v2_cluster_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 256), len); +} +UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_resize_filters(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { + return (struct envoy_api_v2_cluster_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(140, 256), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct envoy_api_v2_cluster_Filter* envoy_api_v2_Cluster_add_filters(envoy_api_v2_Cluster *msg, upb_arena *arena) { + struct envoy_api_v2_cluster_Filter* sub = (struct envoy_api_v2_cluster_Filter*)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(140, 256), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} /* envoy.api.v2.Cluster.CustomClusterType */ @@ -736,6 +763,7 @@ UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* const* en UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_locality_weight_aware(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_scale_locality_weight(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)); } UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_panic_mode_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_list_as_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)); } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; @@ -774,6 +802,9 @@ UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_scale_locality_weight(en UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_panic_mode_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)) = value; } +UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_list_as_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)) = value; +} /* envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector */ @@ -789,17 +820,21 @@ UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_serialize( return upb_encode(msg, &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, len); } -UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } +UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } +UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { - return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_resize_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_add_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) { return _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + msg, UPB_SIZE(8, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); +} +UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, int32_t value) { + UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; } /* envoy.api.v2.Cluster.LeastRequestLbConfig */ @@ -925,6 +960,7 @@ UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_locality_weighted_lb_con UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_api_v2_Cluster_CommonLbConfig_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(envoy_api_v2_Cluster_CommonLbConfig *msg, struct envoy_type_Percent* value) { UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(4, 8)) = value; @@ -977,6 +1013,9 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_ignore_new_hosts_until_first_hc(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; } +UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_close_connections_on_host_set_change(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; +} /* envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c new file mode 100644 index 00000000000..7cd040e39cc --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c @@ -0,0 +1,34 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/filter.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/cluster/filter.upb.h" +#include "google/protobuf/any.upb.h" +#include "validate/validate.upb.h" +#include "gogoproto/gogo.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_cluster_Filter_submsgs[1] = { + &google_protobuf_Any_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_cluster_Filter__fields[2] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_cluster_Filter_msginit = { + &envoy_api_v2_cluster_Filter_submsgs[0], + &envoy_api_v2_cluster_Filter__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h new file mode 100644 index 00000000000..bd8746cc428 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h @@ -0,0 +1,69 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/filter.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ +#define ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_cluster_Filter; +typedef struct envoy_api_v2_cluster_Filter envoy_api_v2_cluster_Filter; +extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit; +struct google_protobuf_Any; +extern const upb_msglayout google_protobuf_Any_msginit; + + +/* envoy.api.v2.cluster.Filter */ + +UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_new(upb_arena *arena) { + return (envoy_api_v2_cluster_Filter *)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); +} +UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_cluster_Filter *ret = envoy_api_v2_cluster_Filter_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_cluster_Filter_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_cluster_Filter_serialize(const envoy_api_v2_cluster_Filter *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_cluster_Filter_msginit, arena, len); +} + +UPB_INLINE upb_strview envoy_api_v2_cluster_Filter_name(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_cluster_Filter_typed_config(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_cluster_Filter_set_name(envoy_api_v2_cluster_Filter *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_cluster_Filter_set_typed_config(envoy_api_v2_cluster_Filter *msg, struct google_protobuf_Any* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_Any* envoy_api_v2_cluster_Filter_mutable_typed_config(envoy_api_v2_cluster_Filter *msg, upb_arena *arena) { + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_cluster_Filter_typed_config(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_Filter_set_typed_config(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c index 7158a8b8809..cc3a226529f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c @@ -16,29 +16,33 @@ #include "upb/port_def.inc" -static const upb_msglayout *const envoy_api_v2_cluster_OutlierDetection_submsgs[11] = { +static const upb_msglayout *const envoy_api_v2_cluster_OutlierDetection_submsgs[14] = { &google_protobuf_Duration_msginit, &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_cluster_OutlierDetection__fields[11] = { - {1, UPB_SIZE(0, 0), 0, 1, 11, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, - {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {4, UPB_SIZE(12, 24), 0, 1, 11, 1}, - {5, UPB_SIZE(16, 32), 0, 1, 11, 1}, - {6, UPB_SIZE(20, 40), 0, 1, 11, 1}, - {7, UPB_SIZE(24, 48), 0, 1, 11, 1}, - {8, UPB_SIZE(28, 56), 0, 1, 11, 1}, - {9, UPB_SIZE(32, 64), 0, 1, 11, 1}, - {10, UPB_SIZE(36, 72), 0, 1, 11, 1}, - {11, UPB_SIZE(40, 80), 0, 1, 11, 1}, +static const upb_msglayout_field envoy_api_v2_cluster_OutlierDetection__fields[15] = { + {1, UPB_SIZE(4, 8), 0, 1, 11, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, + {4, UPB_SIZE(16, 32), 0, 1, 11, 1}, + {5, UPB_SIZE(20, 40), 0, 1, 11, 1}, + {6, UPB_SIZE(24, 48), 0, 1, 11, 1}, + {7, UPB_SIZE(28, 56), 0, 1, 11, 1}, + {8, UPB_SIZE(32, 64), 0, 1, 11, 1}, + {9, UPB_SIZE(36, 72), 0, 1, 11, 1}, + {10, UPB_SIZE(40, 80), 0, 1, 11, 1}, + {11, UPB_SIZE(44, 88), 0, 1, 11, 1}, + {12, UPB_SIZE(0, 0), 0, 0, 8, 1}, + {13, UPB_SIZE(48, 96), 0, 1, 11, 1}, + {14, UPB_SIZE(52, 104), 0, 1, 11, 1}, + {15, UPB_SIZE(56, 112), 0, 1, 11, 1}, }; const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit = { &envoy_api_v2_cluster_OutlierDetection_submsgs[0], &envoy_api_v2_cluster_OutlierDetection__fields[0], - UPB_SIZE(44, 88), 11, false, + UPB_SIZE(60, 120), 15, false, }; #include "upb/port_undef.inc" diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h index cb290de1c0e..ef5592b53fd 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h @@ -43,20 +43,24 @@ UPB_INLINE char *envoy_api_v2_cluster_OutlierDetection_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_cluster_OutlierDetection_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_split_external_local_origin_errors(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)); } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(msg); @@ -68,7 +72,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_interval(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_interval(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_interval(msg); @@ -80,7 +84,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_base_ejection_time(msg); @@ -92,7 +96,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(msg); @@ -104,7 +108,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(msg); @@ -116,7 +120,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(msg); @@ -128,7 +132,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(msg); @@ -140,7 +144,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(msg); @@ -152,7 +156,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(msg); @@ -164,7 +168,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(msg); @@ -176,7 +180,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(msg); @@ -187,6 +191,45 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec } return sub; } +UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_split_external_local_origin_errors(envoy_api_v2_cluster_OutlierDetection *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(msg, sub); + } + return sub; +} #ifdef __cplusplus } /* extern "C" */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c index 725b17d7e31..9ecfe106a87 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c @@ -9,6 +9,7 @@ #include #include "upb/msg.h" #include "envoy/api/v2/core/base.upb.h" +#include "envoy/api/v2/core/http_uri.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" @@ -142,6 +143,37 @@ const upb_msglayout envoy_api_v2_core_DataSource_msginit = { UPB_SIZE(16, 32), 3, false, }; +static const upb_msglayout *const envoy_api_v2_core_RemoteDataSource_submsgs[1] = { + &envoy_api_v2_core_HttpUri_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_RemoteDataSource__fields[2] = { + {1, UPB_SIZE(8, 16), 0, 0, 11, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, +}; + +const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit = { + &envoy_api_v2_core_RemoteDataSource_submsgs[0], + &envoy_api_v2_core_RemoteDataSource__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout *const envoy_api_v2_core_AsyncDataSource_submsgs[2] = { + &envoy_api_v2_core_DataSource_msginit, + &envoy_api_v2_core_RemoteDataSource_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_AsyncDataSource__fields[2] = { + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit = { + &envoy_api_v2_core_AsyncDataSource_submsgs[0], + &envoy_api_v2_core_AsyncDataSource__fields[0], + UPB_SIZE(8, 16), 2, false, +}; + static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = { &google_protobuf_Any_msginit, &google_protobuf_Struct_msginit, diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h index 58e6e5e3f7b..d4c14b1511f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h @@ -29,6 +29,8 @@ struct envoy_api_v2_core_HeaderValue; struct envoy_api_v2_core_HeaderValueOption; struct envoy_api_v2_core_HeaderMap; struct envoy_api_v2_core_DataSource; +struct envoy_api_v2_core_RemoteDataSource; +struct envoy_api_v2_core_AsyncDataSource; struct envoy_api_v2_core_TransportSocket; struct envoy_api_v2_core_SocketOption; struct envoy_api_v2_core_RuntimeFractionalPercent; @@ -42,6 +44,8 @@ typedef struct envoy_api_v2_core_HeaderValue envoy_api_v2_core_HeaderValue; typedef struct envoy_api_v2_core_HeaderValueOption envoy_api_v2_core_HeaderValueOption; typedef struct envoy_api_v2_core_HeaderMap envoy_api_v2_core_HeaderMap; typedef struct envoy_api_v2_core_DataSource envoy_api_v2_core_DataSource; +typedef struct envoy_api_v2_core_RemoteDataSource envoy_api_v2_core_RemoteDataSource; +typedef struct envoy_api_v2_core_AsyncDataSource envoy_api_v2_core_AsyncDataSource; typedef struct envoy_api_v2_core_TransportSocket envoy_api_v2_core_TransportSocket; typedef struct envoy_api_v2_core_SocketOption envoy_api_v2_core_SocketOption; typedef struct envoy_api_v2_core_RuntimeFractionalPercent envoy_api_v2_core_RuntimeFractionalPercent; @@ -55,14 +59,18 @@ extern const upb_msglayout envoy_api_v2_core_HeaderValue_msginit; extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; extern const upb_msglayout envoy_api_v2_core_HeaderMap_msginit; extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit; extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; extern const upb_msglayout envoy_api_v2_core_ControlPlane_msginit; +struct envoy_api_v2_core_HttpUri; struct envoy_type_FractionalPercent; struct google_protobuf_Any; struct google_protobuf_BoolValue; struct google_protobuf_Struct; +extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit; extern const upb_msglayout envoy_type_FractionalPercent_msginit; extern const upb_msglayout google_protobuf_Any_msginit; extern const upb_msglayout google_protobuf_BoolValue_msginit; @@ -92,6 +100,12 @@ typedef enum { envoy_api_v2_core_SocketOption_STATE_LISTENING = 2 } envoy_api_v2_core_SocketOption_SocketState; +typedef enum { + envoy_api_v2_core_UNSPECIFIED = 0, + envoy_api_v2_core_INBOUND = 1, + envoy_api_v2_core_OUTBOUND = 2 +} envoy_api_v2_core_TrafficDirection; + /* envoy.api.v2.core.Locality */ @@ -397,6 +411,90 @@ UPB_INLINE void envoy_api_v2_core_DataSource_set_inline_string(envoy_api_v2_core UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 3); } +/* envoy.api.v2.core.RemoteDataSource */ + +UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_new(upb_arena *arena) { + return (envoy_api_v2_core_RemoteDataSource *)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_RemoteDataSource *ret = envoy_api_v2_core_RemoteDataSource_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_RemoteDataSource_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_RemoteDataSource_serialize(const envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_RemoteDataSource_msginit, arena, len); +} + +UPB_INLINE const struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_http_uri(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_RemoteDataSource_sha256(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } + +UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_http_uri(envoy_api_v2_core_RemoteDataSource *msg, struct envoy_api_v2_core_HttpUri* value) { + UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_mutable_http_uri(envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena) { + struct envoy_api_v2_core_HttpUri* sub = (struct envoy_api_v2_core_HttpUri*)envoy_api_v2_core_RemoteDataSource_http_uri(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_HttpUri*)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_RemoteDataSource_set_http_uri(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_sha256(envoy_api_v2_core_RemoteDataSource *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} + +/* envoy.api.v2.core.AsyncDataSource */ + +UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_new(upb_arena *arena) { + return (envoy_api_v2_core_AsyncDataSource *)upb_msg_new(&envoy_api_v2_core_AsyncDataSource_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_AsyncDataSource *ret = envoy_api_v2_core_AsyncDataSource_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_AsyncDataSource_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_AsyncDataSource_serialize(const envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_AsyncDataSource_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_AsyncDataSource_specifier_local = 1, + envoy_api_v2_core_AsyncDataSource_specifier_remote = 2, + envoy_api_v2_core_AsyncDataSource_specifier_NOT_SET = 0 +} envoy_api_v2_core_AsyncDataSource_specifier_oneofcases; +UPB_INLINE envoy_api_v2_core_AsyncDataSource_specifier_oneofcases envoy_api_v2_core_AsyncDataSource_specifier_case(const envoy_api_v2_core_AsyncDataSource* msg) { return (envoy_api_v2_core_AsyncDataSource_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } + +UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_local(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE const envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_local(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } +UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE const envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_RemoteDataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } + +UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_local(envoy_api_v2_core_AsyncDataSource *msg, envoy_api_v2_core_DataSource* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1); +} +UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_mutable_local(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) { + struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_AsyncDataSource_local(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_AsyncDataSource_set_local(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_remote(envoy_api_v2_core_AsyncDataSource *msg, envoy_api_v2_core_RemoteDataSource* value) { + UPB_WRITE_ONEOF(msg, envoy_api_v2_core_RemoteDataSource*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2); +} +UPB_INLINE struct envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_mutable_remote(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) { + struct envoy_api_v2_core_RemoteDataSource* sub = (struct envoy_api_v2_core_RemoteDataSource*)envoy_api_v2_core_AsyncDataSource_remote(msg); + if (sub == NULL) { + sub = (struct envoy_api_v2_core_RemoteDataSource*)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_AsyncDataSource_set_remote(msg, sub); + } + return sub; +} + /* envoy.api.v2.core.TransportSocket */ UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_new(upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c index 5fe2a189ce0..afe940435c6 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c @@ -23,19 +23,20 @@ static const upb_msglayout *const envoy_api_v2_core_ApiConfigSource_submsgs[4] = &google_protobuf_Duration_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[6] = { +static const upb_msglayout_field envoy_api_v2_core_ApiConfigSource__fields[7] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {2, UPB_SIZE(20, 32), 0, 0, 9, 3}, - {3, UPB_SIZE(8, 8), 0, 2, 11, 1}, - {4, UPB_SIZE(24, 40), 0, 0, 11, 3}, - {5, UPB_SIZE(12, 16), 0, 2, 11, 1}, - {6, UPB_SIZE(16, 24), 0, 1, 11, 1}, + {2, UPB_SIZE(24, 40), 0, 0, 9, 3}, + {3, UPB_SIZE(12, 16), 0, 2, 11, 1}, + {4, UPB_SIZE(28, 48), 0, 0, 11, 3}, + {5, UPB_SIZE(16, 24), 0, 2, 11, 1}, + {6, UPB_SIZE(20, 32), 0, 1, 11, 1}, + {7, UPB_SIZE(8, 8), 0, 0, 8, 1}, }; const upb_msglayout envoy_api_v2_core_ApiConfigSource_msginit = { &envoy_api_v2_core_ApiConfigSource_submsgs[0], &envoy_api_v2_core_ApiConfigSource__fields[0], - UPB_SIZE(32, 48), 6, false, + UPB_SIZE(32, 56), 7, false, }; const upb_msglayout envoy_api_v2_core_AggregatedConfigSource_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h index 27f4779c17f..4c2e832e698 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h @@ -64,27 +64,28 @@ UPB_INLINE char *envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_ } UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 8)); } -UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 16)); } -UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(16, 24)); } +UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 16)); } +UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 24)); } +UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(20, 32)); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_api_type(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; } UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_mutable_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { - return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len); + return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len); } UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_resize_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, upb_strview val, upb_arena *arena) { return _upb_array_append_accessor( - msg, UPB_SIZE(20, 32), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 16)) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_refresh_delay(msg); @@ -96,20 +97,20 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu return sub; } UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_mutable_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { - return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len); + return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); } UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_resize_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_ApiConfigSource_add_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena); bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(24, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 16)) = value; + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 24)) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_request_timeout(msg); @@ -121,7 +122,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu return sub; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, envoy_api_v2_core_RateLimitSettings* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(16, 24)) = value; + UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(20, 32)) = value; } UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_RateLimitSettings* sub = (struct envoy_api_v2_core_RateLimitSettings*)envoy_api_v2_core_ApiConfigSource_rate_limit_settings(msg); @@ -132,6 +133,9 @@ UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConf } return sub; } +UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_only(envoy_api_v2_core_ApiConfigSource *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; +} /* envoy.api.v2.core.AggregatedConfigSource */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c new file mode 100644 index 00000000000..f7999c7cd0d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/http_uri.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "envoy/api/v2/core/http_uri.upb.h" +#include "google/protobuf/duration.upb.h" +#include "gogoproto/gogo.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const envoy_api_v2_core_HttpUri_submsgs[1] = { + &google_protobuf_Duration_msginit, +}; + +static const upb_msglayout_field envoy_api_v2_core_HttpUri__fields[3] = { + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, +}; + +const upb_msglayout envoy_api_v2_core_HttpUri_msginit = { + &envoy_api_v2_core_HttpUri_submsgs[0], + &envoy_api_v2_core_HttpUri__fields[0], + UPB_SIZE(24, 48), 3, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h new file mode 100644 index 00000000000..f0dc22b7a20 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h @@ -0,0 +1,80 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/http_uri.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ +#define ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct envoy_api_v2_core_HttpUri; +typedef struct envoy_api_v2_core_HttpUri envoy_api_v2_core_HttpUri; +extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit; +struct google_protobuf_Duration; +extern const upb_msglayout google_protobuf_Duration_msginit; + + +/* envoy.api.v2.core.HttpUri */ + +UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_new(upb_arena *arena) { + return (envoy_api_v2_core_HttpUri *)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); +} +UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_parse(const char *buf, size_t size, + upb_arena *arena) { + envoy_api_v2_core_HttpUri *ret = envoy_api_v2_core_HttpUri_new(arena); + return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_HttpUri_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *envoy_api_v2_core_HttpUri_serialize(const envoy_api_v2_core_HttpUri *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &envoy_api_v2_core_HttpUri_msginit, arena, len); +} + +typedef enum { + envoy_api_v2_core_HttpUri_http_upstream_type_cluster = 2, + envoy_api_v2_core_HttpUri_http_upstream_type_NOT_SET = 0 +} envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases; +UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri* msg) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } + +UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); } +UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } + +UPB_INLINE void envoy_api_v2_core_HttpUri_set_uri(envoy_api_v2_core_HttpUri *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void envoy_api_v2_core_HttpUri_set_cluster(envoy_api_v2_core_HttpUri *msg, upb_strview value) { + UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2); +} +UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri *msg, struct google_protobuf_Duration* value) { + UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; +} +UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena) { + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpUri_timeout(msg); + if (sub == NULL) { + sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_HttpUri_set_timeout(msg, sub); + } + return sub; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c index 896cfe25638..48878df6a69 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c @@ -52,23 +52,29 @@ const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit = { UPB_SIZE(16, 32), 3, false, }; -static const upb_msglayout *const envoy_api_v2_core_Http2ProtocolOptions_submsgs[4] = { +static const upb_msglayout *const envoy_api_v2_core_Http2ProtocolOptions_submsgs[9] = { &google_protobuf_UInt32Value_msginit, }; -static const upb_msglayout_field envoy_api_v2_core_Http2ProtocolOptions__fields[6] = { +static const upb_msglayout_field envoy_api_v2_core_Http2ProtocolOptions__fields[12] = { {1, UPB_SIZE(4, 8), 0, 0, 11, 1}, {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, {4, UPB_SIZE(16, 32), 0, 0, 11, 1}, {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, + {7, UPB_SIZE(20, 40), 0, 0, 11, 1}, + {8, UPB_SIZE(24, 48), 0, 0, 11, 1}, + {9, UPB_SIZE(28, 56), 0, 0, 11, 1}, + {10, UPB_SIZE(32, 64), 0, 0, 11, 1}, + {11, UPB_SIZE(36, 72), 0, 0, 11, 1}, + {12, UPB_SIZE(2, 2), 0, 0, 8, 1}, }; const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit = { &envoy_api_v2_core_Http2ProtocolOptions_submsgs[0], &envoy_api_v2_core_Http2ProtocolOptions__fields[0], - UPB_SIZE(20, 40), 6, false, + UPB_SIZE(40, 80), 12, false, }; static const upb_msglayout *const envoy_api_v2_core_GrpcProtocolOptions_submsgs[1] = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h index 039b221ef2a..a82cfc16f2f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h @@ -145,6 +145,12 @@ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2Prot UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_connect(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_metadata(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_hpack_table_size(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; @@ -200,6 +206,69 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_connect(envoy_a UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_metadata(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; } +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { + UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value; +} +UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { + struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(msg); + if (sub == NULL) { + sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + if (!sub) return NULL; + envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(msg, sub); + } + return sub; +} +UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_stream_error_on_invalid_http_messaging(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) { + UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; +} /* envoy.api.v2.core.GrpcProtocolOptions */ diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c new file mode 100644 index 00000000000..05a1c8098a6 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c @@ -0,0 +1,58 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/data/orca/v1/orca_load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include +#include "upb/msg.h" +#include "udpa/data/orca/v1/orca_load_report.upb.h" +#include "validate/validate.upb.h" + +#include "upb/port_def.inc" + +static const upb_msglayout *const udpa_data_orca_v1_OrcaLoadReport_submsgs[2] = { + &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, + &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, +}; + +static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport__fields[5] = { + {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, + {2, UPB_SIZE(8, 8), 0, 0, 1, 1}, + {3, UPB_SIZE(16, 16), 0, 0, 4, 1}, + {4, UPB_SIZE(24, 24), 0, 0, 11, 3}, + {5, UPB_SIZE(28, 32), 0, 1, 11, 3}, +}; + +const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = { + &udpa_data_orca_v1_OrcaLoadReport_submsgs[0], + &udpa_data_orca_v1_OrcaLoadReport__fields[0], + UPB_SIZE(32, 40), 5, false, +}; + +static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[2] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, +}; + +const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = { + NULL, + &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[2] = { + {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, +}; + +const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit = { + NULL, + &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[0], + UPB_SIZE(16, 32), 2, false, +}; + +#include "upb/port_undef.inc" + diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h new file mode 100644 index 00000000000..279578b5ae4 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h @@ -0,0 +1,144 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/data/orca/v1/orca_load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ +#define UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ + +#include "upb/generated_util.h" +#include "upb/msg.h" +#include "upb/decode.h" +#include "upb/encode.h" + +#include "upb/port_def.inc" + +#ifdef __cplusplus +extern "C" { +#endif + +struct udpa_data_orca_v1_OrcaLoadReport; +struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry; +struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry; +typedef struct udpa_data_orca_v1_OrcaLoadReport udpa_data_orca_v1_OrcaLoadReport; +typedef struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry; +typedef struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit; + + +/* udpa.data.orca.v1.OrcaLoadReport */ + +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_new(upb_arena *arena) { + return (udpa_data_orca_v1_OrcaLoadReport *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_msginit, arena); +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_data_orca_v1_OrcaLoadReport *ret = udpa_data_orca_v1_OrcaLoadReport_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_serialize(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena, len); +} + +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_mem_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t udpa_data_orca_v1_OrcaLoadReport_rps(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const* udpa_data_orca_v1_OrcaLoadReport_request_cost(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } +UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const* udpa_data_orca_v1_OrcaLoadReport_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } + +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_cpu_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; +} +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_mem_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_rps(udpa_data_orca_v1_OrcaLoadReport *msg, uint64_t value) { + UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { + return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_resize_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) { + return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_add_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) { + struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(24, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { + return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_resize_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) { + return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); +} +UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_add_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) { + struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena); + bool ok = _upb_array_append_accessor( + msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); + if (!ok) return NULL; + return sub; +} + +/* udpa.data.orca.v1.OrcaLoadReport.RequestCostEntry */ + +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(upb_arena *arena) { + return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena); +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *ret = udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena, len); +} + +UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } + +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; +} + +/* udpa.data.orca.v1.OrcaLoadReport.UtilizationEntry */ + +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(upb_arena *arena) { + return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena); +} +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_parse(const char *buf, size_t size, + upb_arena *arena) { + udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *ret = udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(arena); + return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena)) ? ret : NULL; +} +UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_arena *arena, size_t *len) { + return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena, len); +} + +UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } + +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_strview value) { + UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; +} +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, double value) { + UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ */ diff --git a/src/core/lib/gprpp/map.h b/src/core/lib/gprpp/map.h index 134625775cf..6a41a97bec2 100644 --- a/src/core/lib/gprpp/map.h +++ b/src/core/lib/gprpp/map.h @@ -35,6 +35,7 @@ #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/pair.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/gprpp/string_view.h" namespace grpc_core { @@ -42,8 +43,14 @@ struct StringLess { bool operator()(const char* a, const char* b) const { return strcmp(a, b) < 0; } - bool operator()(const UniquePtr& k1, const UniquePtr& k2) const { - return strcmp(k1.get(), k2.get()) < 0; + bool operator()(const UniquePtr& a, const UniquePtr& b) const { + return strcmp(a.get(), b.get()) < 0; + } + bool operator()(const StringView& a, const StringView& b) const { + const size_t min_size = std::min(a.size(), b.size()); + int c = strncmp(a.data(), b.data(), min_size); + if (c != 0) return c < 0; + return a.size() < b.size(); } }; diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index e43c17f1ca5..bd6ff09c80d 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -53,76 +53,77 @@ static constexpr uint8_t g_bytes[] = { 99, 45, 112, 114, 101, 118, 105, 111, 117, 115, 45, 114, 112, 99, 45, 97, 116, 116, 101, 109, 112, 116, 115, 103, 114, 112, 99, 45, 114, 101, 116, 114, 121, 45, 112, 117, 115, 104, 98, 97, 99, 107, 45, 109, 115, - 103, 114, 112, 99, 45, 116, 105, 109, 101, 111, 117, 116, 49, 50, 51, - 52, 103, 114, 112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, 95, - 114, 101, 97, 100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, 111, - 117, 116, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, 117, - 101, 115, 116, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, - 101, 115, 103, 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, 112, - 111, 110, 115, 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, - 116, 101, 115, 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, 46, - 76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, 97, - 108, 97, 110, 99, 101, 76, 111, 97, 100, 47, 101, 110, 118, 111, 121, - 46, 115, 101, 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, - 116, 97, 116, 115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, - 111, 114, 116, 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, - 116, 114, 101, 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, - 101, 110, 118, 111, 121, 46, 97, 112, 105, 46, 118, 50, 46, 69, 110, - 100, 112, 111, 105, 110, 116, 68, 105, 115, 99, 111, 118, 101, 114, 121, - 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 69, - 110, 100, 112, 111, 105, 110, 116, 115, 47, 103, 114, 112, 99, 46, 104, - 101, 97, 108, 116, 104, 46, 118, 49, 46, 72, 101, 97, 108, 116, 104, - 47, 87, 97, 116, 99, 104, 47, 101, 110, 118, 111, 121, 46, 115, 101, - 114, 118, 105, 99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, - 46, 118, 50, 46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, - 105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, - 47, 83, 116, 114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, - 101, 100, 82, 101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, - 97, 116, 101, 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, - 122, 105, 112, 71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100, - 101, 120, 46, 104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112, - 115, 50, 48, 48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, - 48, 52, 48, 52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, - 104, 97, 114, 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, - 108, 97, 116, 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, - 117, 97, 103, 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, - 101, 115, 97, 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, - 99, 111, 110, 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, - 114, 105, 103, 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, - 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, - 101, 45, 99, 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, - 116, 45, 100, 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, - 110, 116, 101, 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, - 111, 110, 116, 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, - 110, 116, 101, 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, - 111, 110, 116, 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, - 107, 105, 101, 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, - 99, 116, 101, 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, - 45, 109, 97, 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, - 101, 100, 45, 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, - 45, 109, 97, 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, - 102, 45, 117, 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, - 110, 99, 101, 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, - 100, 108, 105, 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, - 120, 45, 102, 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, - 45, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, - 111, 120, 121, 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, - 111, 110, 114, 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, - 101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, - 101, 114, 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, - 107, 105, 101, 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, - 112, 111, 114, 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, - 97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, - 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, - 101, 110, 116, 105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105, - 116, 121, 116, 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, - 99, 97, 116, 105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99, - 80, 85, 84, 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105, - 100, 101, 110, 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, - 105, 100, 101, 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, - 102, 108, 97, 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, - 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, - 112}; + 120, 45, 101, 110, 100, 112, 111, 105, 110, 116, 45, 108, 111, 97, 100, + 45, 109, 101, 116, 114, 105, 99, 115, 45, 98, 105, 110, 103, 114, 112, + 99, 45, 116, 105, 109, 101, 111, 117, 116, 49, 50, 51, 52, 103, 114, + 112, 99, 46, 119, 97, 105, 116, 95, 102, 111, 114, 95, 114, 101, 97, + 100, 121, 103, 114, 112, 99, 46, 116, 105, 109, 101, 111, 117, 116, 103, + 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 113, 117, 101, 115, 116, + 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, 103, + 114, 112, 99, 46, 109, 97, 120, 95, 114, 101, 115, 112, 111, 110, 115, + 101, 95, 109, 101, 115, 115, 97, 103, 101, 95, 98, 121, 116, 101, 115, + 47, 103, 114, 112, 99, 46, 108, 98, 46, 118, 49, 46, 76, 111, 97, + 100, 66, 97, 108, 97, 110, 99, 101, 114, 47, 66, 97, 108, 97, 110, + 99, 101, 76, 111, 97, 100, 47, 101, 110, 118, 111, 121, 46, 115, 101, + 114, 118, 105, 99, 101, 46, 108, 111, 97, 100, 95, 115, 116, 97, 116, + 115, 46, 118, 50, 46, 76, 111, 97, 100, 82, 101, 112, 111, 114, 116, + 105, 110, 103, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, 114, 101, + 97, 109, 76, 111, 97, 100, 83, 116, 97, 116, 115, 47, 101, 110, 118, + 111, 121, 46, 97, 112, 105, 46, 118, 50, 46, 69, 110, 100, 112, 111, + 105, 110, 116, 68, 105, 115, 99, 111, 118, 101, 114, 121, 83, 101, 114, + 118, 105, 99, 101, 47, 83, 116, 114, 101, 97, 109, 69, 110, 100, 112, + 111, 105, 110, 116, 115, 47, 103, 114, 112, 99, 46, 104, 101, 97, 108, + 116, 104, 46, 118, 49, 46, 72, 101, 97, 108, 116, 104, 47, 87, 97, + 116, 99, 104, 47, 101, 110, 118, 111, 121, 46, 115, 101, 114, 118, 105, + 99, 101, 46, 100, 105, 115, 99, 111, 118, 101, 114, 121, 46, 118, 50, + 46, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 68, 105, 115, 99, + 111, 118, 101, 114, 121, 83, 101, 114, 118, 105, 99, 101, 47, 83, 116, + 114, 101, 97, 109, 65, 103, 103, 114, 101, 103, 97, 116, 101, 100, 82, + 101, 115, 111, 117, 114, 99, 101, 115, 100, 101, 102, 108, 97, 116, 101, + 103, 122, 105, 112, 115, 116, 114, 101, 97, 109, 47, 103, 122, 105, 112, + 71, 69, 84, 80, 79, 83, 84, 47, 47, 105, 110, 100, 101, 120, 46, + 104, 116, 109, 108, 104, 116, 116, 112, 104, 116, 116, 112, 115, 50, 48, + 48, 50, 48, 52, 50, 48, 54, 51, 48, 52, 52, 48, 48, 52, 48, + 52, 53, 48, 48, 97, 99, 99, 101, 112, 116, 45, 99, 104, 97, 114, + 115, 101, 116, 103, 122, 105, 112, 44, 32, 100, 101, 102, 108, 97, 116, + 101, 97, 99, 99, 101, 112, 116, 45, 108, 97, 110, 103, 117, 97, 103, + 101, 97, 99, 99, 101, 112, 116, 45, 114, 97, 110, 103, 101, 115, 97, + 99, 99, 101, 112, 116, 97, 99, 99, 101, 115, 115, 45, 99, 111, 110, + 116, 114, 111, 108, 45, 97, 108, 108, 111, 119, 45, 111, 114, 105, 103, + 105, 110, 97, 103, 101, 97, 108, 108, 111, 119, 97, 117, 116, 104, 111, + 114, 105, 122, 97, 116, 105, 111, 110, 99, 97, 99, 104, 101, 45, 99, + 111, 110, 116, 114, 111, 108, 99, 111, 110, 116, 101, 110, 116, 45, 100, + 105, 115, 112, 111, 115, 105, 116, 105, 111, 110, 99, 111, 110, 116, 101, + 110, 116, 45, 108, 97, 110, 103, 117, 97, 103, 101, 99, 111, 110, 116, + 101, 110, 116, 45, 108, 101, 110, 103, 116, 104, 99, 111, 110, 116, 101, + 110, 116, 45, 108, 111, 99, 97, 116, 105, 111, 110, 99, 111, 110, 116, + 101, 110, 116, 45, 114, 97, 110, 103, 101, 99, 111, 111, 107, 105, 101, + 100, 97, 116, 101, 101, 116, 97, 103, 101, 120, 112, 101, 99, 116, 101, + 120, 112, 105, 114, 101, 115, 102, 114, 111, 109, 105, 102, 45, 109, 97, + 116, 99, 104, 105, 102, 45, 109, 111, 100, 105, 102, 105, 101, 100, 45, + 115, 105, 110, 99, 101, 105, 102, 45, 110, 111, 110, 101, 45, 109, 97, + 116, 99, 104, 105, 102, 45, 114, 97, 110, 103, 101, 105, 102, 45, 117, + 110, 109, 111, 100, 105, 102, 105, 101, 100, 45, 115, 105, 110, 99, 101, + 108, 97, 115, 116, 45, 109, 111, 100, 105, 102, 105, 101, 100, 108, 105, + 110, 107, 108, 111, 99, 97, 116, 105, 111, 110, 109, 97, 120, 45, 102, + 111, 114, 119, 97, 114, 100, 115, 112, 114, 111, 120, 121, 45, 97, 117, + 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 112, 114, 111, 120, 121, + 45, 97, 117, 116, 104, 111, 114, 105, 122, 97, 116, 105, 111, 110, 114, + 97, 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, + 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 115, + 101, 114, 118, 101, 114, 115, 101, 116, 45, 99, 111, 111, 107, 105, 101, + 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, + 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 114, 97, 110, 115, + 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, 110, 103, 118, 97, 114, + 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, + 105, 99, 97, 116, 101, 48, 105, 100, 101, 110, 116, 105, 116, 121, 116, + 114, 97, 105, 108, 101, 114, 115, 97, 112, 112, 108, 105, 99, 97, 116, + 105, 111, 110, 47, 103, 114, 112, 99, 103, 114, 112, 99, 80, 85, 84, + 108, 98, 45, 99, 111, 115, 116, 45, 98, 105, 110, 105, 100, 101, 110, + 116, 105, 116, 121, 44, 100, 101, 102, 108, 97, 116, 101, 105, 100, 101, + 110, 116, 105, 116, 121, 44, 103, 122, 105, 112, 100, 101, 102, 108, 97, + 116, 101, 44, 103, 122, 105, 112, 105, 100, 101, 110, 116, 105, 116, 121, + 44, 100, 101, 102, 108, 97, 116, 101, 44, 103, 122, 105, 112}; grpc_slice_refcount grpc_core::StaticSliceRefcount::kStaticSubRefcount; @@ -187,6 +188,7 @@ struct StaticMetadataCtx { StaticSliceRefcount(102), StaticSliceRefcount(103), StaticSliceRefcount(104), StaticSliceRefcount(105), StaticSliceRefcount(106), StaticSliceRefcount(107), + StaticSliceRefcount(108), }; const StaticMetadataSlice slices[GRPC_STATIC_MDSTR_COUNT] = { @@ -214,488 +216,494 @@ struct StaticMetadataCtx { grpc_core::StaticMetadataSlice(&refcounts[20].base, 4, g_bytes + 278), grpc_core::StaticMetadataSlice(&refcounts[21].base, 26, g_bytes + 282), grpc_core::StaticMetadataSlice(&refcounts[22].base, 22, g_bytes + 308), - grpc_core::StaticMetadataSlice(&refcounts[23].base, 12, g_bytes + 330), - grpc_core::StaticMetadataSlice(&refcounts[24].base, 1, g_bytes + 342), - grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 343), - grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 344), - grpc_core::StaticMetadataSlice(&refcounts[27].base, 1, g_bytes + 345), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), - grpc_core::StaticMetadataSlice(&refcounts[29].base, 19, g_bytes + 346), - grpc_core::StaticMetadataSlice(&refcounts[30].base, 12, g_bytes + 365), - grpc_core::StaticMetadataSlice(&refcounts[31].base, 30, g_bytes + 377), - grpc_core::StaticMetadataSlice(&refcounts[32].base, 31, g_bytes + 407), - grpc_core::StaticMetadataSlice(&refcounts[33].base, 36, g_bytes + 438), - grpc_core::StaticMetadataSlice(&refcounts[34].base, 65, g_bytes + 474), - grpc_core::StaticMetadataSlice(&refcounts[35].base, 54, g_bytes + 539), - grpc_core::StaticMetadataSlice(&refcounts[36].base, 28, g_bytes + 593), - grpc_core::StaticMetadataSlice(&refcounts[37].base, 80, g_bytes + 621), - grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708), - grpc_core::StaticMetadataSlice(&refcounts[40].base, 11, g_bytes + 712), - grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 723), - grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 726), - grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 730), - grpc_core::StaticMetadataSlice(&refcounts[44].base, 11, g_bytes + 731), - grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 742), - grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 746), - grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 751), - grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 754), - grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 757), - grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 760), - grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 763), - grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 766), - grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 769), - grpc_core::StaticMetadataSlice(&refcounts[54].base, 14, g_bytes + 772), - grpc_core::StaticMetadataSlice(&refcounts[55].base, 13, g_bytes + 786), - grpc_core::StaticMetadataSlice(&refcounts[56].base, 15, g_bytes + 799), - grpc_core::StaticMetadataSlice(&refcounts[57].base, 13, g_bytes + 814), - grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 827), - grpc_core::StaticMetadataSlice(&refcounts[59].base, 27, g_bytes + 833), - grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 860), - grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 863), - grpc_core::StaticMetadataSlice(&refcounts[62].base, 13, g_bytes + 868), - grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 881), - grpc_core::StaticMetadataSlice(&refcounts[64].base, 19, g_bytes + 894), - grpc_core::StaticMetadataSlice(&refcounts[65].base, 16, g_bytes + 913), - grpc_core::StaticMetadataSlice(&refcounts[66].base, 14, g_bytes + 929), - grpc_core::StaticMetadataSlice(&refcounts[67].base, 16, g_bytes + 943), - grpc_core::StaticMetadataSlice(&refcounts[68].base, 13, g_bytes + 959), - grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 972), - grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 978), - grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 982), - grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 986), - grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 992), - grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 999), - grpc_core::StaticMetadataSlice(&refcounts[75].base, 8, g_bytes + 1003), - grpc_core::StaticMetadataSlice(&refcounts[76].base, 17, g_bytes + 1011), - grpc_core::StaticMetadataSlice(&refcounts[77].base, 13, g_bytes + 1028), - grpc_core::StaticMetadataSlice(&refcounts[78].base, 8, g_bytes + 1041), - grpc_core::StaticMetadataSlice(&refcounts[79].base, 19, g_bytes + 1049), - grpc_core::StaticMetadataSlice(&refcounts[80].base, 13, g_bytes + 1068), - grpc_core::StaticMetadataSlice(&refcounts[81].base, 4, g_bytes + 1081), - grpc_core::StaticMetadataSlice(&refcounts[82].base, 8, g_bytes + 1085), - grpc_core::StaticMetadataSlice(&refcounts[83].base, 12, g_bytes + 1093), - grpc_core::StaticMetadataSlice(&refcounts[84].base, 18, g_bytes + 1105), - grpc_core::StaticMetadataSlice(&refcounts[85].base, 19, g_bytes + 1123), - grpc_core::StaticMetadataSlice(&refcounts[86].base, 5, g_bytes + 1142), - grpc_core::StaticMetadataSlice(&refcounts[87].base, 7, g_bytes + 1147), - grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1154), - grpc_core::StaticMetadataSlice(&refcounts[89].base, 11, g_bytes + 1161), - grpc_core::StaticMetadataSlice(&refcounts[90].base, 6, g_bytes + 1172), - grpc_core::StaticMetadataSlice(&refcounts[91].base, 10, g_bytes + 1178), - grpc_core::StaticMetadataSlice(&refcounts[92].base, 25, g_bytes + 1188), - grpc_core::StaticMetadataSlice(&refcounts[93].base, 17, g_bytes + 1213), - grpc_core::StaticMetadataSlice(&refcounts[94].base, 4, g_bytes + 1230), - grpc_core::StaticMetadataSlice(&refcounts[95].base, 3, g_bytes + 1234), - grpc_core::StaticMetadataSlice(&refcounts[96].base, 16, g_bytes + 1237), - grpc_core::StaticMetadataSlice(&refcounts[97].base, 1, g_bytes + 1253), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, g_bytes + 1254), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1262), - grpc_core::StaticMetadataSlice(&refcounts[100].base, 16, g_bytes + 1270), - grpc_core::StaticMetadataSlice(&refcounts[101].base, 4, g_bytes + 1286), - grpc_core::StaticMetadataSlice(&refcounts[102].base, 3, g_bytes + 1290), - grpc_core::StaticMetadataSlice(&refcounts[103].base, 11, g_bytes + 1293), - grpc_core::StaticMetadataSlice(&refcounts[104].base, 16, g_bytes + 1304), - grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, g_bytes + 1320), - grpc_core::StaticMetadataSlice(&refcounts[106].base, 12, g_bytes + 1333), - grpc_core::StaticMetadataSlice(&refcounts[107].base, 21, g_bytes + 1345), + grpc_core::StaticMetadataSlice(&refcounts[23].base, 27, g_bytes + 330), + grpc_core::StaticMetadataSlice(&refcounts[24].base, 12, g_bytes + 357), + grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 369), + grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 370), + grpc_core::StaticMetadataSlice(&refcounts[27].base, 1, g_bytes + 371), + grpc_core::StaticMetadataSlice(&refcounts[28].base, 1, g_bytes + 372), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), + grpc_core::StaticMetadataSlice(&refcounts[30].base, 19, g_bytes + 373), + grpc_core::StaticMetadataSlice(&refcounts[31].base, 12, g_bytes + 392), + grpc_core::StaticMetadataSlice(&refcounts[32].base, 30, g_bytes + 404), + grpc_core::StaticMetadataSlice(&refcounts[33].base, 31, g_bytes + 434), + grpc_core::StaticMetadataSlice(&refcounts[34].base, 36, g_bytes + 465), + grpc_core::StaticMetadataSlice(&refcounts[35].base, 65, g_bytes + 501), + grpc_core::StaticMetadataSlice(&refcounts[36].base, 54, g_bytes + 566), + grpc_core::StaticMetadataSlice(&refcounts[37].base, 28, g_bytes + 620), + grpc_core::StaticMetadataSlice(&refcounts[38].base, 80, g_bytes + 648), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), + grpc_core::StaticMetadataSlice(&refcounts[41].base, 11, g_bytes + 739), + grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750), + grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753), + grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757), + grpc_core::StaticMetadataSlice(&refcounts[45].base, 11, g_bytes + 758), + grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769), + grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773), + grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778), + grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781), + grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784), + grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787), + grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790), + grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793), + grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796), + grpc_core::StaticMetadataSlice(&refcounts[55].base, 14, g_bytes + 799), + grpc_core::StaticMetadataSlice(&refcounts[56].base, 13, g_bytes + 813), + grpc_core::StaticMetadataSlice(&refcounts[57].base, 15, g_bytes + 826), + grpc_core::StaticMetadataSlice(&refcounts[58].base, 13, g_bytes + 841), + grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854), + grpc_core::StaticMetadataSlice(&refcounts[60].base, 27, g_bytes + 860), + grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887), + grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890), + grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, g_bytes + 895), + grpc_core::StaticMetadataSlice(&refcounts[64].base, 13, g_bytes + 908), + grpc_core::StaticMetadataSlice(&refcounts[65].base, 19, g_bytes + 921), + grpc_core::StaticMetadataSlice(&refcounts[66].base, 16, g_bytes + 940), + grpc_core::StaticMetadataSlice(&refcounts[67].base, 14, g_bytes + 956), + grpc_core::StaticMetadataSlice(&refcounts[68].base, 16, g_bytes + 970), + grpc_core::StaticMetadataSlice(&refcounts[69].base, 13, g_bytes + 986), + grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999), + grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 1005), + grpc_core::StaticMetadataSlice(&refcounts[72].base, 4, g_bytes + 1009), + grpc_core::StaticMetadataSlice(&refcounts[73].base, 6, g_bytes + 1013), + grpc_core::StaticMetadataSlice(&refcounts[74].base, 7, g_bytes + 1019), + grpc_core::StaticMetadataSlice(&refcounts[75].base, 4, g_bytes + 1026), + grpc_core::StaticMetadataSlice(&refcounts[76].base, 8, g_bytes + 1030), + grpc_core::StaticMetadataSlice(&refcounts[77].base, 17, g_bytes + 1038), + grpc_core::StaticMetadataSlice(&refcounts[78].base, 13, g_bytes + 1055), + grpc_core::StaticMetadataSlice(&refcounts[79].base, 8, g_bytes + 1068), + grpc_core::StaticMetadataSlice(&refcounts[80].base, 19, g_bytes + 1076), + grpc_core::StaticMetadataSlice(&refcounts[81].base, 13, g_bytes + 1095), + grpc_core::StaticMetadataSlice(&refcounts[82].base, 4, g_bytes + 1108), + grpc_core::StaticMetadataSlice(&refcounts[83].base, 8, g_bytes + 1112), + grpc_core::StaticMetadataSlice(&refcounts[84].base, 12, g_bytes + 1120), + grpc_core::StaticMetadataSlice(&refcounts[85].base, 18, g_bytes + 1132), + grpc_core::StaticMetadataSlice(&refcounts[86].base, 19, g_bytes + 1150), + grpc_core::StaticMetadataSlice(&refcounts[87].base, 5, g_bytes + 1169), + grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, g_bytes + 1174), + grpc_core::StaticMetadataSlice(&refcounts[89].base, 7, g_bytes + 1181), + grpc_core::StaticMetadataSlice(&refcounts[90].base, 11, g_bytes + 1188), + grpc_core::StaticMetadataSlice(&refcounts[91].base, 6, g_bytes + 1199), + grpc_core::StaticMetadataSlice(&refcounts[92].base, 10, g_bytes + 1205), + grpc_core::StaticMetadataSlice(&refcounts[93].base, 25, g_bytes + 1215), + grpc_core::StaticMetadataSlice(&refcounts[94].base, 17, g_bytes + 1240), + grpc_core::StaticMetadataSlice(&refcounts[95].base, 4, g_bytes + 1257), + grpc_core::StaticMetadataSlice(&refcounts[96].base, 3, g_bytes + 1261), + grpc_core::StaticMetadataSlice(&refcounts[97].base, 16, g_bytes + 1264), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 1, g_bytes + 1280), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, g_bytes + 1281), + grpc_core::StaticMetadataSlice(&refcounts[100].base, 8, g_bytes + 1289), + grpc_core::StaticMetadataSlice(&refcounts[101].base, 16, g_bytes + 1297), + grpc_core::StaticMetadataSlice(&refcounts[102].base, 4, g_bytes + 1313), + grpc_core::StaticMetadataSlice(&refcounts[103].base, 3, g_bytes + 1317), + grpc_core::StaticMetadataSlice(&refcounts[104].base, 11, g_bytes + 1320), + grpc_core::StaticMetadataSlice(&refcounts[105].base, 16, g_bytes + 1331), + grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, g_bytes + 1347), + grpc_core::StaticMetadataSlice(&refcounts[107].base, 12, g_bytes + 1360), + grpc_core::StaticMetadataSlice(&refcounts[108].base, 21, g_bytes + 1372), }; StaticMetadata static_mdelem_table[GRPC_STATIC_MDELEM_COUNT] = { StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[3].base, 10, g_bytes + 19), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 0), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[41].base, 3, g_bytes + 723), + grpc_core::StaticMetadataSlice(&refcounts[42].base, 3, g_bytes + 750), 1), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[42].base, 4, g_bytes + 726), + grpc_core::StaticMetadataSlice(&refcounts[43].base, 4, g_bytes + 753), 2), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0), - grpc_core::StaticMetadataSlice(&refcounts[43].base, 1, g_bytes + 730), + grpc_core::StaticMetadataSlice(&refcounts[44].base, 1, g_bytes + 757), 3), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[0].base, 5, g_bytes + 0), - grpc_core::StaticMetadataSlice(&refcounts[44].base, 11, - g_bytes + 731), + grpc_core::StaticMetadataSlice(&refcounts[45].base, 11, + g_bytes + 758), 4), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[45].base, 4, g_bytes + 742), + grpc_core::StaticMetadataSlice(&refcounts[46].base, 4, g_bytes + 769), 5), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[46].base, 5, g_bytes + 746), + grpc_core::StaticMetadataSlice(&refcounts[47].base, 5, g_bytes + 773), 6), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[47].base, 3, g_bytes + 751), + grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 778), 7), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[48].base, 3, g_bytes + 754), + grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 781), 8), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[49].base, 3, g_bytes + 757), + grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 784), 9), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[50].base, 3, g_bytes + 760), + grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 787), 10), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[51].base, 3, g_bytes + 763), + grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 790), 11), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[52].base, 3, g_bytes + 766), + grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 793), 12), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[2].base, 7, g_bytes + 12), - grpc_core::StaticMetadataSlice(&refcounts[53].base, 3, g_bytes + 769), + grpc_core::StaticMetadataSlice(&refcounts[54].base, 3, g_bytes + 796), 13), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[54].base, 14, - g_bytes + 772), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[55].base, 14, + g_bytes + 799), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 14), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[55].base, 13, - g_bytes + 786), + grpc_core::StaticMetadataSlice(&refcounts[56].base, 13, + g_bytes + 813), 15), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[56].base, 15, - g_bytes + 799), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[57].base, 15, + g_bytes + 826), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 16), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[57].base, 13, - g_bytes + 814), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[58].base, 13, + g_bytes + 841), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 17), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[58].base, 6, g_bytes + 827), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[59].base, 6, g_bytes + 854), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 18), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[59].base, 27, - g_bytes + 833), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[60].base, 27, + g_bytes + 860), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 19), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[60].base, 3, g_bytes + 860), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[61].base, 3, g_bytes + 887), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 20), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[61].base, 5, g_bytes + 863), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[62].base, 5, g_bytes + 890), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 21), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[62].base, 13, - g_bytes + 868), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, + g_bytes + 895), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 22), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[63].base, 13, - g_bytes + 881), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[64].base, 13, + g_bytes + 908), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 23), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[64].base, 19, - g_bytes + 894), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[65].base, 19, + g_bytes + 921), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 24), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[15].base, 16, g_bytes + 170), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 25), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[65].base, 16, - g_bytes + 913), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[66].base, 16, + g_bytes + 940), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 26), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[66].base, 14, - g_bytes + 929), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[67].base, 14, + g_bytes + 956), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 27), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[67].base, 16, - g_bytes + 943), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[68].base, 16, + g_bytes + 970), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 28), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[68].base, 13, - g_bytes + 959), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[69].base, 13, + g_bytes + 986), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 29), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[14].base, 12, g_bytes + 158), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 30), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[69].base, 6, g_bytes + 972), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[70].base, 6, g_bytes + 999), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 31), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[70].base, 4, g_bytes + 978), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, + g_bytes + 1005), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 32), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[71].base, 4, g_bytes + 982), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[72].base, 4, + g_bytes + 1009), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 33), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[72].base, 6, g_bytes + 986), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[73].base, 6, + g_bytes + 1013), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 34), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[73].base, 7, g_bytes + 992), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[74].base, 7, + g_bytes + 1019), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 35), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[74].base, 4, g_bytes + 999), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[75].base, 4, + g_bytes + 1026), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 36), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[20].base, 4, g_bytes + 278), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 37), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[75].base, 8, - g_bytes + 1003), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[76].base, 8, + g_bytes + 1030), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 38), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[76].base, 17, - g_bytes + 1011), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[77].base, 17, + g_bytes + 1038), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 39), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[77].base, 13, - g_bytes + 1028), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[78].base, 13, + g_bytes + 1055), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 40), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[78].base, 8, - g_bytes + 1041), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[79].base, 8, + g_bytes + 1068), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 41), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[79].base, 19, - g_bytes + 1049), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[80].base, 19, + g_bytes + 1076), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 42), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[80].base, 13, - g_bytes + 1068), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[81].base, 13, + g_bytes + 1095), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 43), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[81].base, 4, - g_bytes + 1081), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[82].base, 4, + g_bytes + 1108), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 44), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[82].base, 8, - g_bytes + 1085), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[83].base, 8, + g_bytes + 1112), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 45), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[83].base, 12, - g_bytes + 1093), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[84].base, 12, + g_bytes + 1120), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 46), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[84].base, 18, - g_bytes + 1105), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[85].base, 18, + g_bytes + 1132), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 47), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[85].base, 19, - g_bytes + 1123), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[86].base, 19, + g_bytes + 1150), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 48), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[86].base, 5, - g_bytes + 1142), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[87].base, 5, + g_bytes + 1169), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 49), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[87].base, 7, - g_bytes + 1147), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, + g_bytes + 1174), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 50), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[88].base, 7, - g_bytes + 1154), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[89].base, 7, + g_bytes + 1181), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 51), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[89].base, 11, - g_bytes + 1161), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[90].base, 11, + g_bytes + 1188), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 52), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[90].base, 6, - g_bytes + 1172), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[91].base, 6, + g_bytes + 1199), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 53), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[91].base, 10, - g_bytes + 1178), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[92].base, 10, + g_bytes + 1205), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 54), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[92].base, 25, - g_bytes + 1188), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[93].base, 25, + g_bytes + 1215), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 55), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[93].base, 17, - g_bytes + 1213), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[94].base, 17, + g_bytes + 1240), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 56), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[19].base, 10, g_bytes + 268), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 57), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[94].base, 4, - g_bytes + 1230), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[95].base, 4, + g_bytes + 1257), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 58), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[95].base, 3, - g_bytes + 1234), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[96].base, 3, + g_bytes + 1261), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 59), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[96].base, 16, - g_bytes + 1237), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[97].base, 16, + g_bytes + 1264), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 60), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50), - grpc_core::StaticMetadataSlice(&refcounts[97].base, 1, - g_bytes + 1253), + grpc_core::StaticMetadataSlice(&refcounts[98].base, 1, + g_bytes + 1280), 61), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50), - grpc_core::StaticMetadataSlice(&refcounts[24].base, 1, g_bytes + 342), + grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 369), 62), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[7].base, 11, g_bytes + 50), - grpc_core::StaticMetadataSlice(&refcounts[25].base, 1, g_bytes + 343), + grpc_core::StaticMetadataSlice(&refcounts[26].base, 1, g_bytes + 370), 63), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, - g_bytes + 1254), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, + g_bytes + 1281), 64), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), 65), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[9].base, 13, g_bytes + 77), - grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), 66), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[5].base, 2, g_bytes + 36), - grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, - g_bytes + 1262), + grpc_core::StaticMetadataSlice(&refcounts[100].base, 8, + g_bytes + 1289), 67), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[14].base, 12, g_bytes + 158), - grpc_core::StaticMetadataSlice(&refcounts[100].base, 16, - g_bytes + 1270), + grpc_core::StaticMetadataSlice(&refcounts[101].base, 16, + g_bytes + 1297), 68), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[4].base, 7, g_bytes + 29), - grpc_core::StaticMetadataSlice(&refcounts[101].base, 4, - g_bytes + 1286), + grpc_core::StaticMetadataSlice(&refcounts[102].base, 4, + g_bytes + 1313), 69), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[1].base, 7, g_bytes + 5), - grpc_core::StaticMetadataSlice(&refcounts[102].base, 3, - g_bytes + 1290), + grpc_core::StaticMetadataSlice(&refcounts[103].base, 3, + g_bytes + 1317), 70), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 71), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[15].base, 16, g_bytes + 170), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, - g_bytes + 1254), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, + g_bytes + 1281), 72), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[15].base, 16, g_bytes + 170), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), 73), StaticMetadata( - grpc_core::StaticMetadataSlice(&refcounts[103].base, 11, - g_bytes + 1293), - grpc_core::StaticMetadataSlice(&refcounts[28].base, 0, g_bytes + 346), + grpc_core::StaticMetadataSlice(&refcounts[104].base, 11, + g_bytes + 1320), + grpc_core::StaticMetadataSlice(&refcounts[29].base, 0, g_bytes + 373), 74), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, - g_bytes + 1254), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, + g_bytes + 1281), 75), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[38].base, 7, g_bytes + 701), + grpc_core::StaticMetadataSlice(&refcounts[39].base, 7, g_bytes + 728), 76), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[104].base, 16, - g_bytes + 1304), + grpc_core::StaticMetadataSlice(&refcounts[105].base, 16, + g_bytes + 1331), 77), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), 78), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, - g_bytes + 1320), + grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, + g_bytes + 1347), 79), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[106].base, 12, - g_bytes + 1333), + grpc_core::StaticMetadataSlice(&refcounts[107].base, 12, + g_bytes + 1360), 80), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[10].base, 20, g_bytes + 90), - grpc_core::StaticMetadataSlice(&refcounts[107].base, 21, - g_bytes + 1345), + grpc_core::StaticMetadataSlice(&refcounts[108].base, 21, + g_bytes + 1372), 81), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[98].base, 8, - g_bytes + 1254), + grpc_core::StaticMetadataSlice(&refcounts[99].base, 8, + g_bytes + 1281), 82), StaticMetadata( grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[39].base, 4, g_bytes + 708), + grpc_core::StaticMetadataSlice(&refcounts[40].base, 4, g_bytes + 735), 83), StaticMetadata(grpc_core::StaticMetadataSlice(&refcounts[16].base, 15, g_bytes + 186), - grpc_core::StaticMetadataSlice(&refcounts[105].base, 13, - g_bytes + 1320), + grpc_core::StaticMetadataSlice(&refcounts[106].base, 13, + g_bytes + 1347), 84), }; @@ -1181,17 +1189,17 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 6, 6, 8, 8, 2, 4, 4}; static const int8_t elems_r[] = { - 15, 10, -8, 0, 2, -43, -80, -44, 0, 4, -8, 0, 0, 0, 6, -1, - -8, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -65, 0, -68, -69, -50, -72, -73, 0, 32, 31, - 30, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 17, - 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 4, 3, - 3, 7, 0, 0, 0, 0, 0, 0, -5, 0}; + 15, 10, -8, 0, 2, -43, -81, -44, 0, 4, -8, 0, 0, 0, 6, -1, + -8, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, -67, 0, -38, -50, -56, -76, 0, 46, 28, + 27, 26, 25, 24, 23, 23, 22, 21, 20, 19, 24, 16, 15, 14, 13, 15, + 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 6, 5, 4, 3, 2, 3, + 2, 2, 6, 0, 0, 0, 0, 0, 0, -6, 0}; static uint32_t elems_phash(uint32_t i) { - i -= 43; - uint32_t x = i % 106; - uint32_t y = i / 106; + i -= 44; + uint32_t x = i % 107; + uint32_t y = i / 107; uint32_t h = x; if (y < GPR_ARRAY_SIZE(elems_r)) { uint32_t delta = (uint32_t)elems_r[y]; @@ -1201,29 +1209,31 @@ static uint32_t elems_phash(uint32_t i) { } static const uint16_t elem_keys[] = { - 263, 264, 265, 266, 267, 268, 269, 1118, 1119, 1756, 149, 150, - 477, 478, 1648, 43, 44, 1010, 1011, 1540, 1767, 780, 781, 639, - 853, 1659, 2080, 2188, 5860, 6076, 6184, 6400, 6508, 6616, 6724, 6832, - 1783, 6940, 7048, 7156, 7264, 7372, 7480, 7588, 7696, 7804, 7912, 8020, - 8128, 8236, 8344, 6292, 8452, 8560, 8668, 8776, 8884, 8992, 9100, 9208, - 9316, 9424, 9532, 9640, 9748, 9856, 9964, 1178, 533, 10072, 10180, 210, - 10288, 1184, 1185, 1186, 1187, 1070, 10396, 1826, 11152, 0, 0, 0, - 1718, 0, 1833, 0, 0, 352, 0, 1612, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0}; + 266, 267, 268, 269, 270, 271, 272, 1129, 1130, 1773, 151, + 152, 482, 483, 1664, 44, 45, 1020, 1021, 1555, 1784, 788, + 789, 645, 861, 1675, 2100, 2209, 6024, 6569, 6787, 6896, 7005, + 7114, 7223, 7332, 1800, 7441, 7550, 7659, 7768, 7877, 8095, 8204, + 8313, 8422, 6678, 6460, 7986, 8531, 8640, 6351, 8749, 8858, 8967, + 9076, 9185, 9294, 9403, 9512, 9621, 6242, 9730, 9839, 9948, 10057, + 10166, 1189, 538, 10275, 10384, 212, 10493, 1195, 1196, 1197, 1198, + 1080, 10602, 1843, 11365, 0, 0, 0, 1734, 0, 1850, 0, + 0, 0, 356, 1627, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0}; static const uint8_t elem_idxs[] = { - 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, - 4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 16, 17, 19, - 20, 21, 22, 23, 15, 24, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, - 38, 39, 40, 18, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 82, - 74, 255, 255, 255, 72, 255, 84, 255, 255, 0, 255, 68}; + 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, + 4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 19, 21, 22, + 23, 24, 26, 27, 15, 28, 29, 31, 32, 33, 35, 36, 38, 39, 20, 18, + 34, 40, 41, 17, 42, 43, 44, 45, 46, 47, 48, 49, 50, 16, 51, 52, + 53, 54, 55, 75, 69, 56, 58, 70, 59, 77, 79, 80, 81, 64, 60, 82, + 74, 255, 255, 255, 72, 255, 84, 255, 255, 255, 0, 68}; grpc_mdelem grpc_static_mdelem_for_static_strings(intptr_t a, intptr_t b) { if (a == -1 || b == -1) return GRPC_MDNULL; - uint32_t k = static_cast(a * 108 + b); + uint32_t k = static_cast(a * 109 + b); uint32_t h = elems_phash(k); return h < GPR_ARRAY_SIZE(elem_keys) && elem_keys[h] == k && elem_idxs[h] != 255 diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index c465a2f37b7..391c6a7c4ab 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -36,7 +36,7 @@ static_assert( std::is_trivially_destructible::value, "grpc_core::StaticMetadataSlice must be trivially destructible."); -#define GRPC_STATIC_MDSTR_COUNT 108 +#define GRPC_STATIC_MDSTR_COUNT 109 void grpc_init_static_metadata_ctx(void); void grpc_destroy_static_metadata_ctx(void); @@ -102,185 +102,187 @@ inline const grpc_core::StaticMetadataSlice* grpc_static_slice_table() { #define GRPC_MDSTR_GRPC_PREVIOUS_RPC_ATTEMPTS (grpc_static_slice_table()[21]) /* "grpc-retry-pushback-ms" */ #define GRPC_MDSTR_GRPC_RETRY_PUSHBACK_MS (grpc_static_slice_table()[22]) +/* "x-endpoint-load-metrics-bin" */ +#define GRPC_MDSTR_X_ENDPOINT_LOAD_METRICS_BIN (grpc_static_slice_table()[23]) /* "grpc-timeout" */ -#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table()[23]) +#define GRPC_MDSTR_GRPC_TIMEOUT (grpc_static_slice_table()[24]) /* "1" */ -#define GRPC_MDSTR_1 (grpc_static_slice_table()[24]) +#define GRPC_MDSTR_1 (grpc_static_slice_table()[25]) /* "2" */ -#define GRPC_MDSTR_2 (grpc_static_slice_table()[25]) +#define GRPC_MDSTR_2 (grpc_static_slice_table()[26]) /* "3" */ -#define GRPC_MDSTR_3 (grpc_static_slice_table()[26]) +#define GRPC_MDSTR_3 (grpc_static_slice_table()[27]) /* "4" */ -#define GRPC_MDSTR_4 (grpc_static_slice_table()[27]) +#define GRPC_MDSTR_4 (grpc_static_slice_table()[28]) /* "" */ -#define GRPC_MDSTR_EMPTY (grpc_static_slice_table()[28]) +#define GRPC_MDSTR_EMPTY (grpc_static_slice_table()[29]) /* "grpc.wait_for_ready" */ -#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table()[29]) +#define GRPC_MDSTR_GRPC_DOT_WAIT_FOR_READY (grpc_static_slice_table()[30]) /* "grpc.timeout" */ -#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table()[30]) +#define GRPC_MDSTR_GRPC_DOT_TIMEOUT (grpc_static_slice_table()[31]) /* "grpc.max_request_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_REQUEST_MESSAGE_BYTES \ - (grpc_static_slice_table()[31]) + (grpc_static_slice_table()[32]) /* "grpc.max_response_message_bytes" */ #define GRPC_MDSTR_GRPC_DOT_MAX_RESPONSE_MESSAGE_BYTES \ - (grpc_static_slice_table()[32]) + (grpc_static_slice_table()[33]) /* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ - (grpc_static_slice_table()[33]) + (grpc_static_slice_table()[34]) /* "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V2_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS \ - (grpc_static_slice_table()[34]) + (grpc_static_slice_table()[35]) /* "/envoy.api.v2.EndpointDiscoveryService/StreamEndpoints" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_API_DOT_V2_DOT_ENDPOINTDISCOVERYSERVICE_SLASH_STREAMENDPOINTS \ - (grpc_static_slice_table()[35]) + (grpc_static_slice_table()[36]) /* "/grpc.health.v1.Health/Watch" */ #define GRPC_MDSTR_SLASH_GRPC_DOT_HEALTH_DOT_V1_DOT_HEALTH_SLASH_WATCH \ - (grpc_static_slice_table()[36]) + (grpc_static_slice_table()[37]) /* "/envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources" */ #define GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES \ - (grpc_static_slice_table()[37]) + (grpc_static_slice_table()[38]) /* "deflate" */ -#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[38]) +#define GRPC_MDSTR_DEFLATE (grpc_static_slice_table()[39]) /* "gzip" */ -#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[39]) +#define GRPC_MDSTR_GZIP (grpc_static_slice_table()[40]) /* "stream/gzip" */ -#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[40]) +#define GRPC_MDSTR_STREAM_SLASH_GZIP (grpc_static_slice_table()[41]) /* "GET" */ -#define GRPC_MDSTR_GET (grpc_static_slice_table()[41]) +#define GRPC_MDSTR_GET (grpc_static_slice_table()[42]) /* "POST" */ -#define GRPC_MDSTR_POST (grpc_static_slice_table()[42]) +#define GRPC_MDSTR_POST (grpc_static_slice_table()[43]) /* "/" */ -#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[43]) +#define GRPC_MDSTR_SLASH (grpc_static_slice_table()[44]) /* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[44]) +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table()[45]) /* "http" */ -#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[45]) +#define GRPC_MDSTR_HTTP (grpc_static_slice_table()[46]) /* "https" */ -#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[46]) +#define GRPC_MDSTR_HTTPS (grpc_static_slice_table()[47]) /* "200" */ -#define GRPC_MDSTR_200 (grpc_static_slice_table()[47]) +#define GRPC_MDSTR_200 (grpc_static_slice_table()[48]) /* "204" */ -#define GRPC_MDSTR_204 (grpc_static_slice_table()[48]) +#define GRPC_MDSTR_204 (grpc_static_slice_table()[49]) /* "206" */ -#define GRPC_MDSTR_206 (grpc_static_slice_table()[49]) +#define GRPC_MDSTR_206 (grpc_static_slice_table()[50]) /* "304" */ -#define GRPC_MDSTR_304 (grpc_static_slice_table()[50]) +#define GRPC_MDSTR_304 (grpc_static_slice_table()[51]) /* "400" */ -#define GRPC_MDSTR_400 (grpc_static_slice_table()[51]) +#define GRPC_MDSTR_400 (grpc_static_slice_table()[52]) /* "404" */ -#define GRPC_MDSTR_404 (grpc_static_slice_table()[52]) +#define GRPC_MDSTR_404 (grpc_static_slice_table()[53]) /* "500" */ -#define GRPC_MDSTR_500 (grpc_static_slice_table()[53]) +#define GRPC_MDSTR_500 (grpc_static_slice_table()[54]) /* "accept-charset" */ -#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[54]) +#define GRPC_MDSTR_ACCEPT_CHARSET (grpc_static_slice_table()[55]) /* "gzip, deflate" */ -#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[55]) +#define GRPC_MDSTR_GZIP_COMMA_DEFLATE (grpc_static_slice_table()[56]) /* "accept-language" */ -#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[56]) +#define GRPC_MDSTR_ACCEPT_LANGUAGE (grpc_static_slice_table()[57]) /* "accept-ranges" */ -#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[57]) +#define GRPC_MDSTR_ACCEPT_RANGES (grpc_static_slice_table()[58]) /* "accept" */ -#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[58]) +#define GRPC_MDSTR_ACCEPT (grpc_static_slice_table()[59]) /* "access-control-allow-origin" */ -#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[59]) +#define GRPC_MDSTR_ACCESS_CONTROL_ALLOW_ORIGIN (grpc_static_slice_table()[60]) /* "age" */ -#define GRPC_MDSTR_AGE (grpc_static_slice_table()[60]) +#define GRPC_MDSTR_AGE (grpc_static_slice_table()[61]) /* "allow" */ -#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[61]) +#define GRPC_MDSTR_ALLOW (grpc_static_slice_table()[62]) /* "authorization" */ -#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[62]) +#define GRPC_MDSTR_AUTHORIZATION (grpc_static_slice_table()[63]) /* "cache-control" */ -#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[63]) +#define GRPC_MDSTR_CACHE_CONTROL (grpc_static_slice_table()[64]) /* "content-disposition" */ -#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[64]) +#define GRPC_MDSTR_CONTENT_DISPOSITION (grpc_static_slice_table()[65]) /* "content-language" */ -#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[65]) +#define GRPC_MDSTR_CONTENT_LANGUAGE (grpc_static_slice_table()[66]) /* "content-length" */ -#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[66]) +#define GRPC_MDSTR_CONTENT_LENGTH (grpc_static_slice_table()[67]) /* "content-location" */ -#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[67]) +#define GRPC_MDSTR_CONTENT_LOCATION (grpc_static_slice_table()[68]) /* "content-range" */ -#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[68]) +#define GRPC_MDSTR_CONTENT_RANGE (grpc_static_slice_table()[69]) /* "cookie" */ -#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[69]) +#define GRPC_MDSTR_COOKIE (grpc_static_slice_table()[70]) /* "date" */ -#define GRPC_MDSTR_DATE (grpc_static_slice_table()[70]) +#define GRPC_MDSTR_DATE (grpc_static_slice_table()[71]) /* "etag" */ -#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[71]) +#define GRPC_MDSTR_ETAG (grpc_static_slice_table()[72]) /* "expect" */ -#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[72]) +#define GRPC_MDSTR_EXPECT (grpc_static_slice_table()[73]) /* "expires" */ -#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[73]) +#define GRPC_MDSTR_EXPIRES (grpc_static_slice_table()[74]) /* "from" */ -#define GRPC_MDSTR_FROM (grpc_static_slice_table()[74]) +#define GRPC_MDSTR_FROM (grpc_static_slice_table()[75]) /* "if-match" */ -#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[75]) +#define GRPC_MDSTR_IF_MATCH (grpc_static_slice_table()[76]) /* "if-modified-since" */ -#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[76]) +#define GRPC_MDSTR_IF_MODIFIED_SINCE (grpc_static_slice_table()[77]) /* "if-none-match" */ -#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[77]) +#define GRPC_MDSTR_IF_NONE_MATCH (grpc_static_slice_table()[78]) /* "if-range" */ -#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[78]) +#define GRPC_MDSTR_IF_RANGE (grpc_static_slice_table()[79]) /* "if-unmodified-since" */ -#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[79]) +#define GRPC_MDSTR_IF_UNMODIFIED_SINCE (grpc_static_slice_table()[80]) /* "last-modified" */ -#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[80]) +#define GRPC_MDSTR_LAST_MODIFIED (grpc_static_slice_table()[81]) /* "link" */ -#define GRPC_MDSTR_LINK (grpc_static_slice_table()[81]) +#define GRPC_MDSTR_LINK (grpc_static_slice_table()[82]) /* "location" */ -#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[82]) +#define GRPC_MDSTR_LOCATION (grpc_static_slice_table()[83]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[83]) +#define GRPC_MDSTR_MAX_FORWARDS (grpc_static_slice_table()[84]) /* "proxy-authenticate" */ -#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[84]) +#define GRPC_MDSTR_PROXY_AUTHENTICATE (grpc_static_slice_table()[85]) /* "proxy-authorization" */ -#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[85]) +#define GRPC_MDSTR_PROXY_AUTHORIZATION (grpc_static_slice_table()[86]) /* "range" */ -#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[86]) +#define GRPC_MDSTR_RANGE (grpc_static_slice_table()[87]) /* "referer" */ -#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[87]) +#define GRPC_MDSTR_REFERER (grpc_static_slice_table()[88]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[88]) +#define GRPC_MDSTR_REFRESH (grpc_static_slice_table()[89]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[89]) +#define GRPC_MDSTR_RETRY_AFTER (grpc_static_slice_table()[90]) /* "server" */ -#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[90]) +#define GRPC_MDSTR_SERVER (grpc_static_slice_table()[91]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[91]) +#define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table()[92]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[92]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table()[93]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[93]) +#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table()[94]) /* "vary" */ -#define GRPC_MDSTR_VARY (grpc_static_slice_table()[94]) +#define GRPC_MDSTR_VARY (grpc_static_slice_table()[95]) /* "via" */ -#define GRPC_MDSTR_VIA (grpc_static_slice_table()[95]) +#define GRPC_MDSTR_VIA (grpc_static_slice_table()[96]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[96]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table()[97]) /* "0" */ -#define GRPC_MDSTR_0 (grpc_static_slice_table()[97]) +#define GRPC_MDSTR_0 (grpc_static_slice_table()[98]) /* "identity" */ -#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[98]) +#define GRPC_MDSTR_IDENTITY (grpc_static_slice_table()[99]) /* "trailers" */ -#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[99]) +#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table()[100]) /* "application/grpc" */ -#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[100]) +#define GRPC_MDSTR_APPLICATION_SLASH_GRPC (grpc_static_slice_table()[101]) /* "grpc" */ -#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[101]) +#define GRPC_MDSTR_GRPC (grpc_static_slice_table()[102]) /* "PUT" */ -#define GRPC_MDSTR_PUT (grpc_static_slice_table()[102]) +#define GRPC_MDSTR_PUT (grpc_static_slice_table()[103]) /* "lb-cost-bin" */ -#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[103]) +#define GRPC_MDSTR_LB_COST_BIN (grpc_static_slice_table()[104]) /* "identity,deflate" */ -#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[104]) +#define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE (grpc_static_slice_table()[105]) /* "identity,gzip" */ -#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[105]) +#define GRPC_MDSTR_IDENTITY_COMMA_GZIP (grpc_static_slice_table()[106]) /* "deflate,gzip" */ -#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[106]) +#define GRPC_MDSTR_DEFLATE_COMMA_GZIP (grpc_static_slice_table()[107]) /* "identity,deflate,gzip" */ #define GRPC_MDSTR_IDENTITY_COMMA_DEFLATE_COMMA_GZIP \ - (grpc_static_slice_table()[107]) + (grpc_static_slice_table()[108]) namespace grpc_core { struct StaticSliceRefcount; @@ -538,6 +540,7 @@ typedef enum { GRPC_BATCH_HOST, GRPC_BATCH_GRPC_PREVIOUS_RPC_ATTEMPTS, GRPC_BATCH_GRPC_RETRY_PUSHBACK_MS, + GRPC_BATCH_X_ENDPOINT_LOAD_METRICS_BIN, GRPC_BATCH_CALLOUTS_COUNT } grpc_metadata_batch_callouts_index; @@ -567,6 +570,7 @@ typedef union { struct grpc_linked_mdelem* host; struct grpc_linked_mdelem* grpc_previous_rpc_attempts; struct grpc_linked_mdelem* grpc_retry_pushback_ms; + struct grpc_linked_mdelem* x_endpoint_load_metrics_bin; } named; } grpc_metadata_batch_callouts; diff --git a/src/proto/grpc/lb/v2/BUILD b/src/proto/grpc/lb/v2/BUILD index e47f170e14b..25b3dd3644a 100644 --- a/src/proto/grpc/lb/v2/BUILD +++ b/src/proto/grpc/lb/v2/BUILD @@ -39,3 +39,10 @@ grpc_proto_library( well_known_protos = True, deps = ["eds_for_test_proto"], ) + +grpc_proto_library( + name = "orca_load_report_for_test_proto", + srcs = [ + "orca_load_report_for_test.proto", + ], +) diff --git a/src/proto/grpc/lb/v2/eds_for_test.proto b/src/proto/grpc/lb/v2/eds_for_test.proto index 3126095c92d..e5c4f606407 100644 --- a/src/proto/grpc/lb/v2/eds_for_test.proto +++ b/src/proto/grpc/lb/v2/eds_for_test.proto @@ -16,8 +16,12 @@ // the gRPC library; otherwise there can be duplicate definition problems if // users depend on both gRPC and Envoy. It can only be used by gRPC tests. // -// TODO(juanlishen): It's a workaround and should be removed once we have a -// clean solution to use protobuf and external proto files. +// TODO(juanlishen): This file is a hack to avoid a problem we're +// currently having where we can't depend on a proto file in an external +// repo due to bazel limitations. Once that's fixed, this should be +// removed. Until this, it should be used in the gRPC tests only, or else it +// will cause a conflict due to the same proto messages being defined in +// multiple files in the same binary. syntax = "proto3"; diff --git a/src/proto/grpc/lb/v2/lrs_for_test.proto b/src/proto/grpc/lb/v2/lrs_for_test.proto index 76c560a99cf..504b6e752ce 100644 --- a/src/proto/grpc/lb/v2/lrs_for_test.proto +++ b/src/proto/grpc/lb/v2/lrs_for_test.proto @@ -14,9 +14,12 @@ // This file contains the eds protocol and its dependency. // -// TODO(juanlishen): It's a workaround and should be removed once we have a -// clean solution to the circular dependency between the envoy data plane APIs -// and gRPC. We can't check in this file due to conflict with internal code. +// TODO(juanlishen): This file is a hack to avoid a problem we're +// currently having where we can't depend on a proto file in an external +// repo due to bazel limitations. Once that's fixed, this should be +// removed. Until this, it should be used in the gRPC tests only, or else it +// will cause a conflict due to the same proto messages being defined in +// multiple files in the same binary. syntax = "proto3"; diff --git a/src/proto/grpc/lb/v2/orca_load_report_for_test.proto b/src/proto/grpc/lb/v2/orca_load_report_for_test.proto new file mode 100644 index 00000000000..1feaedd6a40 --- /dev/null +++ b/src/proto/grpc/lb/v2/orca_load_report_for_test.proto @@ -0,0 +1,58 @@ +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file contains a copy of the ORCA load reporting protos, with the +// validation options stripped out to avoid the extra dependency on +// protoc-gen-validate. +// +// TODO(juanlishen): This file is a hack to avoid a problem we're +// currently having where we can't depend on a proto file in an external +// repo due to bazel limitations. Once that's fixed, this should be +// removed. Until this, it should be used in the gRPC tests only, or else it +// will cause a conflict due to the same proto messages being defined in +// multiple files in the same binary. + +syntax = "proto3"; + +package udpa.data.orca.v1; + +option java_outer_classname = "OrcaLoadReportProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.udpa.data.orca.v1"; +option go_package = "v1"; + +// See section `ORCA load report format` of the design document in +// :ref:`https://github.com/envoyproxy/envoy/issues/6614`. + +message OrcaLoadReport { + // CPU utilization expressed as a fraction of available CPU resources. This + // should be derived from the latest sample or measurement. + double cpu_utilization = 1; + + // Memory utilization expressed as a fraction of available memory + // resources. This should be derived from the latest sample or measurement. + double mem_utilization = 2; + + // Total RPS being served by an endpoint. This should cover all services that an endpoint is + // responsible for. + uint64 rps = 3; + + // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of + // storage) associated with the request. + map request_cost = 4; + + // Resource utilization values. Each value is expressed as a fraction of total resources + // available, derived from the latest sample or measurement. + map utilization = 5; +} diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 607235556e3..6eb8bc8c9c1 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -322,6 +322,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc', 'src/core/ext/transport/chttp2/client/authority.cc', 'src/core/ext/transport/chttp2/client/chttp2_connector.cc', + 'src/core/ext/filters/client_channel/backend_metric.cc', 'src/core/ext/filters/client_channel/backup_poller.cc', 'src/core/ext/filters/client_channel/channel_connectivity.cc', 'src/core/ext/filters/client_channel/client_channel.cc', @@ -350,6 +351,19 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', 'src/core/ext/filters/deadline/deadline_filter.cc', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', + 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/tsi/fake_transport_security.cc', 'src/core/tsi/local_transport_security.cc', 'src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc', @@ -369,16 +383,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc', 'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', - 'src/core/ext/upb-generated/google/api/annotations.upb.c', - 'src/core/ext/upb-generated/google/api/http.upb.c', - 'src/core/ext/upb-generated/google/protobuf/any.upb.c', - 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', - 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', - 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', - 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', - 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', - 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', - 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds.cc', 'src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc', @@ -387,6 +391,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', @@ -399,11 +404,10 @@ CORE_SOURCE_FILES = [ 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', - 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', - 'src/core/ext/upb-generated/validate/validate.upb.c', 'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc', 'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc', 'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc', diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 921018db7f8..bc621ca2a11 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -22,6 +22,7 @@ "\x04host" "\x1Agrpc-previous-rpc-attempts" "\x16grpc-retry-pushback-ms" +"\x1Bx-endpoint-load-metrics-bin" "\x0Cgrpc-timeout" "\x011" "\x012" diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc index 6225740cde7..d4ce3a27e50 100644 --- a/test/core/util/test_lb_policies.cc +++ b/test/core/util/test_lb_policies.cc @@ -191,7 +191,7 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy gpr_log(GPR_INFO, "trailing metadata:"); InterceptRecvTrailingMetadataLoadBalancingPolicy::LogMetadata( recv_trailing_metadata); - self->cb_(self->user_data_); + self->cb_(self->user_data_, call_state->GetBackendMetricData()); self->~TrailingMetadataHandler(); } diff --git a/test/core/util/test_lb_policies.h b/test/core/util/test_lb_policies.h index 6d2693a0d59..3652515e57e 100644 --- a/test/core/util/test_lb_policies.h +++ b/test/core/util/test_lb_policies.h @@ -19,9 +19,12 @@ #ifndef GRPC_TEST_CORE_UTIL_TEST_LB_POLICIES_H #define GRPC_TEST_CORE_UTIL_TEST_LB_POLICIES_H +#include "src/core/ext/filters/client_channel/lb_policy.h" + namespace grpc_core { -typedef void (*InterceptRecvTrailingMetadataCallback)(void*); +typedef void (*InterceptRecvTrailingMetadataCallback)( + void*, const LoadBalancingPolicy::BackendMetricData*); // Registers an LB policy called "intercept_trailing_metadata_lb" that // invokes cb with argument user_data when trailing metadata is received diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 5567170d371..1b487602a7a 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -433,6 +433,7 @@ grpc_cc_test( "//:gpr", "//:grpc", "//:grpc++", + "//src/proto/grpc/lb/v2:orca_load_report_for_test_proto", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index ceab7506729..69feb4a5d51 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -51,6 +51,7 @@ #include "src/cpp/client/secure_credentials.h" #include "src/cpp/server/secure_server_credentials.h" +#include "src/proto/grpc/lb/v2/orca_load_report_for_test.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -94,15 +95,21 @@ grpc_tcp_client_vtable delayed_connect = {tcp_client_connect_with_delay}; // every call to the Echo RPC. class MyTestServiceImpl : public TestServiceImpl { public: - MyTestServiceImpl() : request_count_(0) {} - Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) override { + const udpa::data::orca::v1::OrcaLoadReport* load_report = nullptr; { grpc::internal::MutexLock lock(&mu_); ++request_count_; + load_report = load_report_; } AddClient(context->peer()); + if (load_report != nullptr) { + // TODO(roth): Once we provide a more standard server-side API for + // populating this data, use that API here. + context->AddTrailingMetadata("x-endpoint-load-metrics-bin", + load_report->SerializeAsString()); + } return TestServiceImpl::Echo(context, request, response); } @@ -121,6 +128,11 @@ class MyTestServiceImpl : public TestServiceImpl { return clients_; } + void set_load_report(udpa::data::orca::v1::OrcaLoadReport* load_report) { + grpc::internal::MutexLock lock(&mu_); + load_report_ = load_report; + } + private: void AddClient(const grpc::string& client) { grpc::internal::MutexLock lock(&clients_mu_); @@ -128,7 +140,8 @@ class MyTestServiceImpl : public TestServiceImpl { } grpc::internal::Mutex mu_; - int request_count_; + int request_count_ = 0; + const udpa::data::orca::v1::OrcaLoadReport* load_report_ = nullptr; grpc::internal::Mutex clients_mu_; std::set clients_; }; @@ -1506,16 +1519,40 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { return trailers_intercepted_; } + const udpa::data::orca::v1::OrcaLoadReport* backend_load_report() { + grpc::internal::MutexLock lock(&mu_); + return load_report_.get(); + } + private: - static void ReportTrailerIntercepted(void* arg) { + static void ReportTrailerIntercepted( + void* arg, const grpc_core::LoadBalancingPolicy::BackendMetricData* + backend_metric_data) { ClientLbInterceptTrailingMetadataTest* self = static_cast(arg); grpc::internal::MutexLock lock(&self->mu_); self->trailers_intercepted_++; + if (backend_metric_data != nullptr) { + self->load_report_.reset(new udpa::data::orca::v1::OrcaLoadReport); + self->load_report_->set_cpu_utilization( + backend_metric_data->cpu_utilization); + self->load_report_->set_mem_utilization( + backend_metric_data->mem_utilization); + self->load_report_->set_rps(backend_metric_data->requests_per_second); + for (const auto& p : backend_metric_data->request_cost) { + grpc_core::UniquePtr name = p.first.dup(); + (*self->load_report_->mutable_request_cost())[name.get()] = p.second; + } + for (const auto& p : backend_metric_data->utilization) { + grpc_core::UniquePtr name = p.first.dup(); + (*self->load_report_->mutable_utilization())[name.get()] = p.second; + } + } } grpc::internal::Mutex mu_; int trailers_intercepted_ = 0; + std::unique_ptr load_report_; }; TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesDisabled) { @@ -1534,6 +1571,7 @@ TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesDisabled) { EXPECT_EQ("intercept_trailing_metadata_lb", channel->GetLoadBalancingPolicyName()); EXPECT_EQ(kNumRpcs, trailers_intercepted()); + EXPECT_EQ(nullptr, backend_load_report()); } TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesEnabled) { @@ -1568,6 +1606,57 @@ TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesEnabled) { EXPECT_EQ("intercept_trailing_metadata_lb", channel->GetLoadBalancingPolicyName()); EXPECT_EQ(kNumRpcs, trailers_intercepted()); + EXPECT_EQ(nullptr, backend_load_report()); +} + +TEST_F(ClientLbInterceptTrailingMetadataTest, BackendMetricData) { + const int kNumServers = 1; + const int kNumRpcs = 10; + StartServers(kNumServers); + udpa::data::orca::v1::OrcaLoadReport load_report; + load_report.set_cpu_utilization(0.5); + load_report.set_mem_utilization(0.75); + load_report.set_rps(25); + auto* request_cost = load_report.mutable_request_cost(); + (*request_cost)["foo"] = 0.8; + (*request_cost)["bar"] = 1.4; + auto* utilization = load_report.mutable_utilization(); + (*utilization)["baz"] = 1.1; + (*utilization)["quux"] = 0.9; + for (const auto& server : servers_) { + server->service_.set_load_report(&load_report); + } + auto response_generator = BuildResolverResponseGenerator(); + auto channel = + BuildChannel("intercept_trailing_metadata_lb", response_generator); + auto stub = BuildStub(channel); + response_generator.SetNextResolution(GetServersPorts()); + for (size_t i = 0; i < kNumRpcs; ++i) { + CheckRpcSendOk(stub, DEBUG_LOCATION); + auto* actual = backend_load_report(); + ASSERT_NE(actual, nullptr); + // TODO(roth): Change this to use EqualsProto() once that becomes + // available in OSS. + EXPECT_EQ(actual->cpu_utilization(), load_report.cpu_utilization()); + EXPECT_EQ(actual->mem_utilization(), load_report.mem_utilization()); + EXPECT_EQ(actual->rps(), load_report.rps()); + EXPECT_EQ(actual->request_cost().size(), load_report.request_cost().size()); + for (const auto& p : actual->request_cost()) { + auto it = load_report.request_cost().find(p.first); + ASSERT_NE(it, load_report.request_cost().end()); + EXPECT_EQ(it->second, p.second); + } + EXPECT_EQ(actual->utilization().size(), load_report.utilization().size()); + for (const auto& p : actual->utilization()) { + auto it = load_report.utilization().find(p.first); + ASSERT_NE(it, load_report.utilization().end()); + EXPECT_EQ(it->second, p.second); + } + } + // Check LB policy name for the channel. + EXPECT_EQ("intercept_trailing_metadata_lb", + channel->GetLoadBalancingPolicyName()); + EXPECT_EQ(kNumRpcs, trailers_intercepted()); } } // namespace diff --git a/third_party/envoy-api b/third_party/envoy-api index a83394157ad..c181f78882e 160000 --- a/third_party/envoy-api +++ b/third_party/envoy-api @@ -1 +1 @@ -Subproject commit a83394157ad97f4dadbc8ed81f56ad5b3a72e542 +Subproject commit c181f78882e54c0e5c63f332562ef6954ee7932f diff --git a/third_party/udpa b/third_party/udpa new file mode 160000 index 00000000000..94324803a49 --- /dev/null +++ b/third_party/udpa @@ -0,0 +1 @@ +Subproject commit 94324803a497c8f76dbc78df393ef629d3a9f3c3 diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index d79759f541c..4ac8f9dada7 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -56,6 +56,7 @@ CONFIG = [ '3', '4', '', + 'x-endpoint-load-metrics-bin', # channel arg keys 'grpc.wait_for_ready', 'grpc.timeout', @@ -177,6 +178,7 @@ METADATA_BATCH_CALLOUTS = [ 'host', 'grpc-previous-rpc-attempts', 'grpc-retry-pushback-ms', + 'x-endpoint-load-metrics-bin', ] COMPRESSION_ALGORITHMS = [ diff --git a/tools/codegen/core/gen_upb_api.sh b/tools/codegen/core/gen_upb_api.sh index 4a9239a2828..89e664e6134 100755 --- a/tools/codegen/core/gen_upb_api.sh +++ b/tools/codegen/core/gen_upb_api.sh @@ -41,12 +41,14 @@ proto_files=( \ "envoy/api/v2/auth/cert.proto" \ "envoy/api/v2/cds.proto" \ "envoy/api/v2/cluster/circuit_breaker.proto" \ + "envoy/api/v2/cluster/filter.proto" \ "envoy/api/v2/cluster/outlier_detection.proto" \ "envoy/api/v2/core/address.proto" \ "envoy/api/v2/core/base.proto" \ "envoy/api/v2/core/config_source.proto" \ "envoy/api/v2/core/grpc_service.proto" \ "envoy/api/v2/core/health_check.proto" \ + "envoy/api/v2/core/http_uri.proto" \ "envoy/api/v2/core/protocol.proto" \ "envoy/api/v2/discovery.proto" \ "envoy/api/v2/eds.proto" \ @@ -71,13 +73,15 @@ proto_files=( \ "src/proto/grpc/gcp/handshaker.proto" \ "src/proto/grpc/gcp/transport_security_common.proto" \ "src/proto/grpc/health/v1/health.proto" \ - "src/proto/grpc/health/v1/health.proto" \ "src/proto/grpc/lb/v1/load_balancer.proto" \ + "udpa/data/orca/v1/orca_load_report.proto" \ "validate/validate.proto") for i in "${proto_files[@]}" do + echo "Compiling: ${i}" $PROTOC \ + -I=$PWD/third_party/udpa \ -I=$PWD/third_party/envoy-api \ -I=$PWD/third_party/googleapis \ -I=$PWD/third_party/protobuf/src \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e2900b2e701..ed6f88dde3c 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -875,6 +875,8 @@ src/core/README.md \ src/core/ext/README.md \ src/core/ext/filters/census/grpc_context.cc \ src/core/ext/filters/client_channel/README.md \ +src/core/ext/filters/client_channel/backend_metric.cc \ +src/core/ext/filters/client_channel/backend_metric.h \ src/core/ext/filters/client_channel/backup_poller.cc \ src/core/ext/filters/client_channel/backup_poller.h \ src/core/ext/filters/client_channel/channel_connectivity.cc \ @@ -1065,6 +1067,8 @@ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.h \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h \ +src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ +src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h \ src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \ @@ -1077,6 +1081,8 @@ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h \ +src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ +src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ @@ -1127,6 +1133,8 @@ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h \ +src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ +src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h \ src/core/ext/upb-generated/validate/validate.upb.c \ src/core/ext/upb-generated/validate/validate.upb.h \ src/core/lib/README.md \ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 39f3e26266c..8ad552cd399 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -32,7 +32,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" b29b21a81b32ec273f118f589f46d56ad3332420 third_party/boringssl (remotes/origin/chromium-stable) afc30d43eef92979b05776ec0963c9cede5fb80f third_party/boringssl-with-bazel (fips-20180716-116-gafc30d43e) e982924acee7f7313b4baa4ee5ec000c5e373c30 third_party/cares/cares (cares-1_15_0) - a83394157ad97f4dadbc8ed81f56ad5b3a72e542 third_party/envoy-api (heads/master) + c181f78882e54c0e5c63f332562ef6954ee7932f third_party/envoy-api (heads/master) 28f50e0fed19872e0fd50dd23ce2ee8cd759338e third_party/gflags (v2.2.0-5-g30dbc81) 80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb) c9ccac7cb7345901884aabf5d1a786cfa6e2f397 third_party/googletest (6e2f397) @@ -40,6 +40,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 9245d481eb3e890f708ff2d7dadf2a10c04748ba third_party/libcxxabi (heads/release_60) 09745575a923640154bcf307fba8aedff47f240a third_party/protobuf (v3.7.0-rc.2-247-g09745575) e143189bf6f37b3957fb31743df6a1bcf4a8c685 third_party/protoc-gen-validate (v0.0.10) + 94324803a497c8f76dbc78df393ef629d3a9f3c3 third_party/udpa (heads/master) 931bbecbd3230ae7f22efa5d203639facc47f719 third_party/upb (heads/master) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11) EOF From b46e3668d31a014c8ab72fbae63f52990051127a Mon Sep 17 00:00:00 2001 From: Arjun Roy Date: Tue, 20 Aug 2019 14:14:16 -0700 Subject: [PATCH 049/120] s/branch/tail_call/ for CH2 on_hdr(). on_hdr() checks if a void-return function pointer is null before jumping to it. If it is null, it returns an error; else it executes that function and returns success. This change converts the void-returning function to one that returns a grpc_error* and thus saves a branch in on_hdr() (since we're branching once by following the function pointer anyways, we're effectively coalescing these two branches). --- .../chttp2/transport/hpack_parser.cc | 49 +++++++++---------- .../transport/chttp2/transport/hpack_parser.h | 2 +- .../transport/chttp2/transport/hpack_table.cc | 21 ++++++-- .../transport/chttp2/transport/hpack_table.h | 15 ++++-- .../ext/transport/chttp2/transport/parsing.cc | 13 +++-- .../chttp2/hpack_parser_fuzzer_test.cc | 5 +- .../transport/chttp2/hpack_parser_test.cc | 3 +- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 11 +++-- 8 files changed, 77 insertions(+), 42 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index 7414fd7fff8..a5142ffd96f 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -655,12 +655,7 @@ static grpc_error* on_hdr(grpc_chttp2_hpack_parser* p, grpc_mdelem md) { grpc_error* err = grpc_chttp2_hptbl_add(&p->table, md); if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) return err; } - if (GPR_UNLIKELY(p->on_header == nullptr)) { - GRPC_MDELEM_UNREF(md); - return GRPC_ERROR_CREATE_FROM_STATIC_STRING("on_header callback not set"); - } - p->on_header(p->on_header_user_data, md); - return GRPC_ERROR_NONE; + return p->on_header(p->on_header_user_data, md); } static grpc_core::UnmanagedMemorySlice take_string_extern( @@ -765,23 +760,26 @@ static grpc_error* parse_stream_dep0(grpc_chttp2_hpack_parser* p, return parse_stream_dep1(p, cur + 1, end); } +static grpc_error* GPR_ATTRIBUTE_NOINLINE +on_invalid_hpack_idx(grpc_chttp2_hpack_parser* p) { + return grpc_error_set_int( + grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid HPACK index received"), + GRPC_ERROR_INT_INDEX, static_cast(p->index)), + GRPC_ERROR_INT_SIZE, static_cast(p->table.num_ents)); +} + /* emit an indexed field; jumps to begin the next field on completion */ static grpc_error* finish_indexed_field(grpc_chttp2_hpack_parser* p, const uint8_t* cur, const uint8_t* end) { - grpc_mdelem md = grpc_chttp2_hptbl_lookup(&p->table, p->index); - if (GRPC_MDISNULL(md)) { - return grpc_error_set_int( - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Invalid HPACK index received"), - GRPC_ERROR_INT_INDEX, - static_cast(p->index)), - GRPC_ERROR_INT_SIZE, static_cast(p->table.num_ents)); + grpc_mdelem md = grpc_chttp2_hptbl_lookup(&p->table, p->index); + if (GPR_UNLIKELY(GRPC_MDISNULL(md))) { + return on_invalid_hpack_idx(p); } - GRPC_MDELEM_REF(md); GRPC_STATS_INC_HPACK_RECV_INDEXED(); grpc_error* err = on_hdr(p, md); - if (err != GRPC_ERROR_NONE) return err; + if (GPR_UNLIKELY(err != GRPC_ERROR_NONE)) return err; return parse_begin(p, cur, end); } @@ -1557,13 +1555,8 @@ static void set_precomputed_md_idx(grpc_chttp2_hpack_parser* p, static grpc_error* is_binary_indexed_header(grpc_chttp2_hpack_parser* p, bool* is) { grpc_mdelem elem = grpc_chttp2_hptbl_lookup(&p->table, p->index); - if (GRPC_MDISNULL(elem)) { - return grpc_error_set_int( - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Invalid HPACK index received"), - GRPC_ERROR_INT_INDEX, - static_cast(p->index)), - GRPC_ERROR_INT_SIZE, static_cast(p->table.num_ents)); + if (GPR_UNLIKELY(GRPC_MDISNULL(elem))) { + return on_invalid_hpack_idx(p); } /* We know that GRPC_MDKEY(elem) points to a reference counted slice since: * 1. elem was a result of grpc_chttp2_hptbl_lookup @@ -1599,10 +1592,16 @@ static grpc_error* parse_value_string_with_literal_key( return parse_value_string(p, cur, end, is_binary_literal_header(p)); } +/* "Uninitialized" header parser to save us a branch in on_hdr(). */ +static grpc_error* on_header_uninitialized(void* user_data, grpc_mdelem md) { + GRPC_MDELEM_UNREF(md); + return GRPC_ERROR_CREATE_FROM_STATIC_STRING("on_header callback not set"); +} + /* PUBLIC INTERFACE */ void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser* p) { - p->on_header = nullptr; + p->on_header = on_header_uninitialized; p->on_header_user_data = nullptr; p->state = parse_begin; p->key.data.referenced = grpc_empty_slice(); @@ -1750,7 +1749,7 @@ grpc_error* grpc_chttp2_header_parser_parse(void* hpack_parser, grpc_chttp2_mark_stream_closed(t, s, true, false, GRPC_ERROR_NONE); } } - parser->on_header = nullptr; + parser->on_header = on_header_uninitialized; parser->on_header_user_data = nullptr; parser->is_boundary = 0xde; parser->is_eof = 0xde; diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index c5691244028..eb90568920c 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -46,7 +46,7 @@ typedef struct { struct grpc_chttp2_hpack_parser { /* user specified callback for each header output */ - void (*on_header)(void* user_data, grpc_mdelem md); + grpc_error* (*on_header)(void* user_data, grpc_mdelem md); void* on_header_user_data; grpc_error* last_error; diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.cc b/src/core/ext/transport/chttp2/transport/hpack_table.cc index 68d3ec49fda..be03110edcf 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc @@ -44,19 +44,34 @@ void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl* tbl) { tbl->ents = nullptr; } -grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl, - uint32_t tbl_index) { +template +static grpc_mdelem lookup_dynamic_index(const grpc_chttp2_hptbl* tbl, + uint32_t tbl_index) { /* Not static - find the value in the list of valid entries */ tbl_index -= (GRPC_CHTTP2_LAST_STATIC_ENTRY + 1); if (tbl_index < tbl->num_ents) { uint32_t offset = (tbl->num_ents - 1u - tbl_index + tbl->first_ent) % tbl->cap_entries; - return tbl->ents[offset]; + grpc_mdelem md = tbl->ents[offset]; + if (take_ref) { + GRPC_MDELEM_REF(md); + } + return md; } /* Invalid entry: return error */ return GRPC_MDNULL; } +grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl, + uint32_t tbl_index) { + return lookup_dynamic_index(tbl, tbl_index); +} + +grpc_mdelem grpc_chttp2_hptbl_lookup_ref_dynamic_index( + const grpc_chttp2_hptbl* tbl, uint32_t tbl_index) { + return lookup_dynamic_index(tbl, tbl_index); +} + /* Evict one element from the table */ static void evict1(grpc_chttp2_hptbl* tbl) { grpc_mdelem first_ent = tbl->ents[tbl->first_ent]; diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index a1aa77f5446..5a6c739f07b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -95,6 +95,9 @@ grpc_error* grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl* tbl, /* lookup a table entry based on its hpack index */ grpc_mdelem grpc_chttp2_hptbl_lookup_dynamic_index(const grpc_chttp2_hptbl* tbl, uint32_t tbl_index); +grpc_mdelem grpc_chttp2_hptbl_lookup_ref_dynamic_index( + const grpc_chttp2_hptbl* tbl, uint32_t tbl_index); +template inline grpc_mdelem grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl* tbl, uint32_t index) { /* Static table comes first, just return an entry from it. @@ -103,9 +106,15 @@ inline grpc_mdelem grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl* tbl, must follow the hpack standard. If that changes, we *must* not rely on reading the core static metadata table here; at that point we'd need our own singleton static metadata in the correct order. */ - return index <= GRPC_CHTTP2_LAST_STATIC_ENTRY - ? grpc_static_mdelem_manifested()[index - 1] - : grpc_chttp2_hptbl_lookup_dynamic_index(tbl, index); + if (index <= GRPC_CHTTP2_LAST_STATIC_ENTRY) { + return grpc_static_mdelem_manifested()[index - 1]; + } else { + if (take_ref) { + return grpc_chttp2_hptbl_lookup_ref_dynamic_index(tbl, index); + } else { + return grpc_chttp2_hptbl_lookup_dynamic_index(tbl, index); + } + } } /* add a table entry to the index */ grpc_error* grpc_chttp2_hptbl_add(grpc_chttp2_hptbl* tbl, diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index 2a2a8206cb6..a39f6e83db7 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -318,7 +318,10 @@ static grpc_error* skip_parser(void* parser, grpc_chttp2_transport* t, return GRPC_ERROR_NONE; } -static void skip_header(void* tp, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); } +static grpc_error* skip_header(void* tp, grpc_mdelem md) { + GRPC_MDELEM_UNREF(md); + return GRPC_ERROR_NONE; +} static grpc_error* init_skip_frame_parser(grpc_chttp2_transport* t, int is_header) { @@ -419,7 +422,7 @@ static bool is_nonzero_status(grpc_mdelem md) { !md_cmp(md, GRPC_MDELEM_GRPC_STATUS_0, GRPC_MDSTR_GRPC_STATUS); } -static void on_initial_header(void* tp, grpc_mdelem md) { +static grpc_error* on_initial_header(void* tp, grpc_mdelem md) { GPR_TIMER_SCOPE("on_initial_header", 0); grpc_chttp2_transport* t = static_cast(tp); @@ -465,7 +468,7 @@ static void on_initial_header(void* tp, grpc_mdelem md) { &s->metadata_buffer[0], grpc_core::ExecCtx::Get()->Now() + timeout); } GRPC_MDELEM_UNREF(md); - return; + return GRPC_ERROR_NONE; } const size_t new_size = s->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md); @@ -496,9 +499,10 @@ static void on_initial_header(void* tp, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); } } + return GRPC_ERROR_NONE; } -static void on_trailing_header(void* tp, grpc_mdelem md) { +static grpc_error* on_trailing_header(void* tp, grpc_mdelem md) { GPR_TIMER_SCOPE("on_trailing_header", 0); grpc_chttp2_transport* t = static_cast(tp); @@ -547,6 +551,7 @@ static void on_trailing_header(void* tp, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); } } + return GRPC_ERROR_NONE; } static grpc_error* init_header_frame_parser(grpc_chttp2_transport* t, diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc index a8eec1eefd6..9c6ae5da7bb 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.cc @@ -30,7 +30,10 @@ bool squelch = true; bool leak_check = true; -static void onhdr(void* ud, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); } +static grpc_error* onhdr(void* ud, grpc_mdelem md) { + GRPC_MDELEM_UNREF(md); + return GRPC_ERROR_NONE; +} static void dont_log(gpr_log_func_args* args) {} extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index 8be7dc17ed1..4782d484d1b 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -34,7 +34,7 @@ typedef struct { va_list args; } test_checker; -static void onhdr(void* ud, grpc_mdelem md) { +static grpc_error* onhdr(void* ud, grpc_mdelem md) { const char *ekey, *evalue; test_checker* chk = static_cast(ud); ekey = va_arg(chk->args, char*); @@ -44,6 +44,7 @@ static void onhdr(void* ud, grpc_mdelem md) { GPR_ASSERT(grpc_slice_str_cmp(GRPC_MDKEY(md), ekey) == 0); GPR_ASSERT(grpc_slice_str_cmp(GRPC_MDVALUE(md), evalue) == 0); GRPC_MDELEM_UNREF(md); + return GRPC_ERROR_NONE; } static void test_vector(grpc_chttp2_hpack_parser* parser, diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 4950e7f7768..86d5d2de14c 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -450,11 +450,12 @@ static void BM_HpackParserInitDestroy(benchmark::State& state) { } BENCHMARK(BM_HpackParserInitDestroy); -static void UnrefHeader(void* user_data, grpc_mdelem md) { +static grpc_error* UnrefHeader(void* user_data, grpc_mdelem md) { GRPC_MDELEM_UNREF(md); + return GRPC_ERROR_NONE; } -template +template static void BM_HpackParserParseHeader(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; @@ -781,7 +782,7 @@ class RepresentativeServerTrailingMetadata { static void free_timeout(void* p) { gpr_free(p); } // Benchmark the current on_initial_header implementation -static void OnInitialHeader(void* user_data, grpc_mdelem md) { +static grpc_error* OnInitialHeader(void* user_data, grpc_mdelem md) { // Setup for benchmark. This will bloat the absolute values of this benchmark grpc_chttp2_incoming_metadata_buffer buffer( static_cast(user_data)); @@ -827,10 +828,11 @@ static void OnInitialHeader(void* user_data, grpc_mdelem md) { GPR_ASSERT(0); } } + return GRPC_ERROR_NONE; } // Benchmark timeout handling -static void OnHeaderTimeout(void* user_data, grpc_mdelem md) { +static grpc_error* OnHeaderTimeout(void* user_data, grpc_mdelem md) { if (grpc_slice_eq(GRPC_MDKEY(md), GRPC_MDSTR_GRPC_TIMEOUT)) { grpc_millis* cached_timeout = static_cast(grpc_mdelem_get_user_data(md, free_timeout)); @@ -858,6 +860,7 @@ static void OnHeaderTimeout(void* user_data, grpc_mdelem md) { } else { GPR_ASSERT(0); } + return GRPC_ERROR_NONE; } // Send the same deadline repeatedly From e70788364bf38947e9d3afb820800b14e44829b9 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 28 Aug 2019 13:50:37 -0700 Subject: [PATCH 050/120] Make dependency on template files explicit --- third_party/py/python_configure.bzl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index 70380e9dde9..6f9a178a057 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -292,14 +292,24 @@ def _python_autoconf_impl(repository_ctx): python_configure = repository_rule( - implementation=_python_autoconf_impl, - environ=[ + implementation = _python_autoconf_impl, + environ = [ _BAZEL_SH, _PYTHON2_BIN_PATH, _PYTHON2_LIB_PATH, _PYTHON3_BIN_PATH, _PYTHON3_LIB_PATH, ], + attrs={ + "_build_tpl": attr.label( + default = Label("//third_party/py:BUILD.tpl"), + allow_single_file = True, + ), + "_variety_tpl": attr.label( + default = Label("//third_party/py:variety.tpl"), + allow_single_file = True, + ), + }, ) """Detects and configures the local Python. From 4dfa808e75fbf0fd94a9787c596bedaabb684215 Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Fri, 23 Aug 2019 17:12:41 -0700 Subject: [PATCH 051/120] Add test for timer expiry racing with cancelation --- test/cpp/common/timer_test.cc | 71 +++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/test/cpp/common/timer_test.cc b/test/cpp/common/timer_test.cc index 9b23be2885a..1abed1660e8 100644 --- a/test/cpp/common/timer_test.cc +++ b/test/cpp/common/timer_test.cc @@ -77,7 +77,7 @@ TEST_F(TimerTest, OneTimerExpires) { grpc_core::ExecCtx exec_ctx; grpc_timer timer; int timer_fired = 0; - grpc_timer_init(&timer, 500, + grpc_timer_init(&timer, grpc_core::ExecCtx::Get()->Now() + 500, GRPC_CLOSURE_CREATE( [](void* arg, grpc_error*) { int* timer_fired = static_cast(arg); @@ -102,7 +102,7 @@ TEST_F(TimerTest, MultipleTimersExpire) { grpc_timer timers[kNumTimers]; int timer_fired = 0; for (int i = 0; i < kNumTimers; ++i) { - grpc_timer_init(&timers[i], 500 + i, + grpc_timer_init(&timers[i], grpc_core::ExecCtx::Get()->Now() + 500 + i, GRPC_CLOSURE_CREATE( [](void* arg, grpc_error*) { int* timer_fired = static_cast(arg); @@ -129,7 +129,7 @@ TEST_F(TimerTest, CancelSomeTimers) { grpc_timer timers[kNumTimers]; int timer_fired = 0; for (int i = 0; i < kNumTimers; ++i) { - grpc_timer_init(&timers[i], 500 + i, + grpc_timer_init(&timers[i], grpc_core::ExecCtx::Get()->Now() + 500 + i, GRPC_CLOSURE_CREATE( [](void* arg, grpc_error* error) { if (error == GRPC_ERROR_CANCELLED) { @@ -157,17 +157,66 @@ TEST_F(TimerTest, CancelSomeTimers) { // Enable the following test after // https://github.com/grpc/grpc/issues/20049 has been fixed. -#if 0 -TEST_F(TimerTest, TimerNotCanceled) { +TEST_F(TimerTest, DISABLED_TimerNotCanceled) { grpc_core::ExecCtx exec_ctx; grpc_timer timer; - grpc_timer_init(&timer, 10000, - GRPC_CLOSURE_CREATE( - [](void*, grpc_error*) { - }, - nullptr, grpc_schedule_on_exec_ctx)); + grpc_timer_init(&timer, grpc_core::ExecCtx::Get()->Now() + 10000, + GRPC_CLOSURE_CREATE([](void*, grpc_error*) {}, nullptr, + grpc_schedule_on_exec_ctx)); +} + +// Enable the following test after +// https://github.com/grpc/grpc/issues/20064 has been fixed. +TEST_F(TimerTest, DISABLED_CancelRace) { + MAYBE_SKIP_TEST; + grpc_core::ExecCtx exec_ctx; + const int kNumTimers = 10; + grpc_timer timers[kNumTimers]; + for (int i = 0; i < kNumTimers; ++i) { + grpc_timer* arg = (i != 0) ? &timers[i - 1] : nullptr; + grpc_timer_init(&timers[i], grpc_core::ExecCtx::Get()->Now() + 100, + GRPC_CLOSURE_CREATE( + [](void* arg, grpc_error* error) { + grpc_timer* timer = static_cast(arg); + if (timer) { + grpc_timer_cancel(timer); + } + }, + arg, grpc_schedule_on_exec_ctx)); + } + gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100)); +} + +// Enable the following test after +// https://github.com/grpc/grpc/issues/20066 has been fixed. +TEST_F(TimerTest, DISABLED_CancelNextTimer) { + MAYBE_SKIP_TEST; + grpc_core::ExecCtx exec_ctx; + const int kNumTimers = 10; + grpc_timer timers[kNumTimers]; + + for (int i = 0; i < kNumTimers; ++i) { + grpc_timer_init_unset(&timers[i]); + } + + for (int i = 0; i < kNumTimers; ++i) { + grpc_timer* arg = nullptr; + if (i < kNumTimers - 1) { + arg = &timers[i + 1]; + } + grpc_timer_init(&timers[i], grpc_core::ExecCtx::Get()->Now() + 100, + GRPC_CLOSURE_CREATE( + [](void* arg, grpc_error* error) { + grpc_timer* timer = static_cast(arg); + if (timer) { + grpc_timer_cancel(timer); + } + }, + arg, grpc_schedule_on_exec_ctx)); + } + grpc_timer_cancel(&timers[0]); + gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100)); } -#endif int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); From d34f3663379f7e010e985860b27d9f12ba702f32 Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Wed, 28 Aug 2019 21:46:53 -0700 Subject: [PATCH 052/120] Test message size of 100MB --- test/core/util/test_config.cc | 4 +++ test/core/util/test_config.h | 3 ++ test/cpp/end2end/async_end2end_test.cc | 38 ++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index 5b248a01daa..5033dc7b66a 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -342,6 +342,10 @@ bool BuiltUnderUbsan() { #endif } +bool grpc_test_built_under_tsan_or_msan() { + return BuiltUnderTsan() || BuiltUnderMsan(); +}; + int64_t grpc_test_sanitizer_slowdown_factor() { int64_t sanitizer_multiplier = 1; if (BuiltUnderValgrind()) { diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 112af3176f9..905d61f1dd6 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -24,6 +24,9 @@ extern int64_t g_fixture_slowdown_factor; extern int64_t g_poller_slowdown_factor; +/* Returns if the test is built under TSAN or MSAN. */ +bool grpc_test_built_under_tsan_or_msan(); + /* Returns an appropriate scaling factor for timeouts. */ int64_t grpc_test_slowdown_factor(); diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 6ca0edf123e..879f16815ee 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -34,6 +34,7 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/lib/gpr/tls.h" +#include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/port.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" @@ -59,6 +60,18 @@ namespace testing { namespace { +const size_t MAX_TEST_MESSAGE_SIZE = +#if defined(GPR_APPLE) + // The test will time out with macos build. + GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH; +#else + // Don't test extreme size under tsan or msan, because it uses too much + // memory. + grpc_test_built_under_tsan_or_msan() + ? GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH + : GPR_MAX(100 * 1024 * 1024, GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH); +#endif + void* tag(int i) { return (void*)static_cast(i); } int detag(void* p) { return static_cast(reinterpret_cast(p)); } @@ -218,6 +231,17 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { } }; +class ServerBuilderMaxRecvMessageSizeOption + : public ::grpc::ServerBuilderOption { + public: + void UpdateArguments(ChannelArguments* arg) override { + arg->SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, -1); + } + + void UpdatePlugins( + std::vector>* plugins) override {} +}; + class TestScenario { public: TestScenario(bool inproc_stub, const grpc::string& creds_type, bool hcs, @@ -290,6 +314,9 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { std::unique_ptr sync_plugin_disabler( new ServerBuilderSyncPluginDisabler()); builder.SetOption(move(sync_plugin_disabler)); + std::unique_ptr max_recv_option( + new ServerBuilderMaxRecvMessageSizeOption()); + builder.SetOption(move(max_recv_option)); server_ = builder.BuildAndStart(); } @@ -297,6 +324,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { ChannelArguments args; auto channel_creds = GetCredentialsProvider()->GetChannelCredentials( GetParam().credentials_type, &args); + args.SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, -1); std::shared_ptr channel = !(GetParam().inproc) ? ::grpc::CreateCustomChannel( server_address_.str(), channel_creds, args) @@ -1822,7 +1850,7 @@ TEST_P(AsyncEnd2endServerTryCancelTest, ServerBidiStreamingTryCancelAfter) { } std::vector CreateTestScenarios(bool test_secure, - bool test_message_size_limit) { + bool test_big_message) { std::vector scenarios; std::vector credentials_types; std::vector messages; @@ -1844,9 +1872,8 @@ std::vector CreateTestScenarios(bool test_secure, GPR_ASSERT(!credentials_types.empty()); messages.push_back("Hello"); - if (test_message_size_limit) { - for (size_t k = 1; k < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH / 1024; - k *= 32) { + if (test_big_message) { + for (size_t k = 1; k < MAX_TEST_MESSAGE_SIZE / 1024; k *= 32) { grpc::string big_msg; for (size_t i = 0; i < k * 1024; ++i) { char c = 'a' + (i % 26); @@ -1854,8 +1881,7 @@ std::vector CreateTestScenarios(bool test_secure, } messages.push_back(big_msg); } - messages.push_back( - grpc::string(GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH - 10, 'a')); + messages.push_back(grpc::string(MAX_TEST_MESSAGE_SIZE - 10, 'a')); } // TODO (sreek) Renable tests with health check service after the issue From f113001d14410814777a7475867132107c7c77d6 Mon Sep 17 00:00:00 2001 From: Pavel Koshelev Date: Thu, 29 Aug 2019 11:49:47 +0300 Subject: [PATCH 053/120] Enable bitcode for ios native libraries --- src/csharp/experimental/build_native_ext_for_ios.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/experimental/build_native_ext_for_ios.sh b/src/csharp/experimental/build_native_ext_for_ios.sh index 130f4c51e96..876588daa06 100755 --- a/src/csharp/experimental/build_native_ext_for_ios.sh +++ b/src/csharp/experimental/build_native_ext_for_ios.sh @@ -28,7 +28,7 @@ function build { PATH_CC="$(xcrun --sdk $SDK --find clang)" PATH_CXX="$(xcrun --sdk $SDK --find clang++)" - CPPFLAGS="-O2 -Wframe-larger-than=16384 -arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -mios-version-min=6.0 -DPB_NO_PACKED_STRUCTS=1" + CPPFLAGS="-O2 -Wframe-larger-than=16384 -arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -fembed-bitcode -mios-version-min=6.0 -DPB_NO_PACKED_STRUCTS=1" LDFLAGS="-arch $ARCH -isysroot $(xcrun --sdk $SDK --show-sdk-path) -Wl,ios_version_min=6.0" # TODO(jtattermusch): revisit the build arguments From cb6d3a0623bd19510610c07f7d114b33dc603793 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 29 Aug 2019 14:52:19 +0200 Subject: [PATCH 054/120] address review feedback --- src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs | 2 +- src/csharp/ext/grpc_csharp_ext.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs index 77c14f1d9fb..9cbdce1cfe3 100644 --- a/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/SliceBufferSafeHandle.cs @@ -138,7 +138,7 @@ namespace Grpc.Core.Internal // if no hint is provided, keep the available space within some "reasonable" boundaries. // This is quite a naive approach which could use some fine-tuning, but currently in most case we know // the required buffer size in advance anyway, so this approach seems good enough for now. - if (tailSpaceLen < DefaultTailSpaceSize /2 ) + if (tailSpaceLen < DefaultTailSpaceSize / 2) { AdjustTailSpace(DefaultTailSpaceSize); } diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 2360c9e1d5f..d9bf85e02c7 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -44,8 +44,7 @@ static grpc_byte_buffer* grpcsharp_create_byte_buffer_from_stolen_slices( grpc_slice_buffer* slice_buffer) { grpc_byte_buffer* bb = - (grpc_byte_buffer*)gpr_malloc(sizeof(grpc_byte_buffer)); - memset(bb, 0, sizeof(grpc_byte_buffer)); + (grpc_byte_buffer*)gpr_zalloc(sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; grpc_slice_buffer_init(&bb->data.raw.slice_buffer); From 7357f63c09096f4dcff953ff87a5cc59e2a726c9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 29 Aug 2019 10:39:04 -0400 Subject: [PATCH 055/120] update check_submodules.sh and grpc_deps.bzl --- bazel/grpc_deps.bzl | 6 +++--- tools/run_tests/sanity/check_submodules.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index b226f15aa2a..7bee7547b61 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -157,9 +157,9 @@ def grpc_deps(): if "com_github_google_benchmark" not in native.existing_rules(): http_archive( name = "com_github_google_benchmark", - sha256 = "c7682e9007ddfd94072647abab3e89ffd9084089460ae47d67060974467b58bf", - strip_prefix = "benchmark-e776aa0275e293707b6a0901e0e8d8a8a3679508", - url = "https://github.com/google/benchmark/archive/e776aa0275e293707b6a0901e0e8d8a8a3679508.tar.gz", + sha256 = "f68aec93154d010324c05bcd8c5cc53468b87af88d87acb5ddcfaa1bba044837", + strip_prefix = "benchmark-090faecb454fbd6e6e17a75ef8146acb037118d4", + url = "https://github.com/google/benchmark/archive/090faecb454fbd6e6e17a75ef8146acb037118d4.tar.gz", ) if "com_github_cares_cares" not in native.existing_rules(): diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index d5eb6677796..98c1a1ecb5c 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -27,7 +27,7 @@ want_submodules=$(mktemp /tmp/submXXXXXX) git submodule | awk '{ print $1 }' | sort > "$submodules" cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 74d91756c11bc22f9b0108b94da9326f7f9e376f third_party/abseil-cpp (74d9175) - e776aa0275e293707b6a0901e0e8d8a8a3679508 third_party/benchmark (v1.2.0) + 090faecb454fbd6e6e17a75ef8146acb037118d4 third_party/benchmark (v1.5.0) 73594cde8c9a52a102c4341c244c833aa61b9c06 third_party/bloaty (remotes/origin/wide-14-g73594cd) b29b21a81b32ec273f118f589f46d56ad3332420 third_party/boringssl (remotes/origin/chromium-stable) afc30d43eef92979b05776ec0963c9cede5fb80f third_party/boringssl-with-bazel (fips-20180716-116-gafc30d43e) From 0ee7a3ae9321a7af2151070feef6bf11be2a9890 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 29 Aug 2019 10:40:22 -0400 Subject: [PATCH 056/120] regenerate projects --- Makefile | 3 +++ grpc.gyp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index a0692f38d20..afeda543c40 100644 --- a/Makefile +++ b/Makefile @@ -7954,8 +7954,11 @@ endif LIBBENCHMARK_SRC = \ third_party/benchmark/src/benchmark.cc \ + third_party/benchmark/src/benchmark_api_internal.cc \ third_party/benchmark/src/benchmark_main.cc \ + third_party/benchmark/src/benchmark_name.cc \ third_party/benchmark/src/benchmark_register.cc \ + third_party/benchmark/src/benchmark_runner.cc \ third_party/benchmark/src/colorprint.cc \ third_party/benchmark/src/commandlineflags.cc \ third_party/benchmark/src/complexity.cc \ diff --git a/grpc.gyp b/grpc.gyp index ba847d99548..aef5f61fb2a 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -2241,8 +2241,11 @@ ], 'sources': [ 'third_party/benchmark/src/benchmark.cc', + 'third_party/benchmark/src/benchmark_api_internal.cc', 'third_party/benchmark/src/benchmark_main.cc', + 'third_party/benchmark/src/benchmark_name.cc', 'third_party/benchmark/src/benchmark_register.cc', + 'third_party/benchmark/src/benchmark_runner.cc', 'third_party/benchmark/src/colorprint.cc', 'third_party/benchmark/src/commandlineflags.cc', 'third_party/benchmark/src/complexity.cc', From 24c562dbaa95539031c45ab4bdce5070ca6c2af5 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 29 Aug 2019 10:47:44 -0700 Subject: [PATCH 057/120] Revert "Merge pull request #20097 from gnossen/dual_version_python_tests" This reverts commit c9c847f334d9310f01456c5f69ec983cfcb99496, reversing changes made to 07ba4de3927dbb2c71b92b4ca38b2fcd1b52e306. --- BUILD | 2 +- bazel/grpc_build_system.bzl | 11 +- bazel/grpc_deps.bzl | 15 ++- bazel/grpc_python_deps.bzl | 9 -- bazel/python_rules.bzl | 26 ----- examples/python/auth/BUILD.bazel | 3 - examples/python/cancellation/BUILD.bazel | 3 - examples/python/compression/BUILD.bazel | 3 - examples/python/debug/BUILD.bazel | 3 - examples/python/errors/BUILD.bazel | 1 - examples/python/multiprocessing/BUILD | 3 - examples/python/wait_for_ready/BUILD.bazel | 1 - .../grpcio_tests/tests/channelz/BUILD.bazel | 4 +- .../tests/health_check/BUILD.bazel | 3 +- .../grpcio_tests/tests/interop/BUILD.bazel | 5 +- .../grpcio_tests/tests/reflection/BUILD.bazel | 3 +- .../grpcio_tests/tests/status/BUILD.bazel | 3 +- .../grpcio_tests/tests/unit/BUILD.bazel | 4 +- .../tests/unit/_cython/BUILD.bazel | 3 +- .../unit/framework/foundation/BUILD.bazel | 3 +- templates/tools/dockerfile/bazel.include | 2 +- third_party/py/BUILD.tpl | 49 ++++----- third_party/py/python_configure.bzl | 104 +++++++----------- third_party/py/remote.BUILD.tpl | 10 ++ third_party/py/variety.tpl | 26 ----- tools/bazel | 2 +- tools/bazel.rc | 4 + tools/dockerfile/test/bazel/Dockerfile | 2 +- tools/dockerfile/test/sanity/Dockerfile | 2 +- .../linux/grpc_python_bazel_test_in_docker.sh | 3 + tools/remote_build/kokoro.bazelrc | 7 +- tools/remote_build/manual.bazelrc | 7 +- tools/remote_build/rbe_common.bazelrc | 2 +- 33 files changed, 114 insertions(+), 214 deletions(-) create mode 100644 third_party/py/remote.BUILD.tpl delete mode 100644 third_party/py/variety.tpl diff --git a/BUILD b/BUILD index e489bc2584a..9198dd61282 100644 --- a/BUILD +++ b/BUILD @@ -65,7 +65,7 @@ config_setting( config_setting( name = "python3", - flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, + values = {"python_path": "python3"}, ) config_setting( diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f4777e50bc1..f386b87b583 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -269,22 +269,13 @@ def grpc_sh_binary(name, srcs, data = []): data = data, ) -def grpc_py_binary(name, - srcs, - data = [], - deps = [], - external_deps = [], - testonly = False, - python_version = "PY2", - **kwargs): +def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False): native.py_binary( name = name, srcs = srcs, testonly = testonly, data = data, deps = deps + _get_external_deps(external_deps), - python_version = python_version, - **kwargs ) def grpc_package(name, visibility = "private", features = []): diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 6bbb960b6c3..06323ff3f24 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -176,11 +176,11 @@ def grpc_deps(): if "bazel_toolchains" not in native.existing_rules(): http_archive( name = "bazel_toolchains", - sha256 = "872955b658113924eb1a3594b04d43238da47f4f90c17b76e8785709490dc041", - strip_prefix = "bazel-toolchains-1083686fde6032378d52b4c98044922cebde364e", + sha256 = "d968b414b32aa99c86977e1171645d31da2b52ac88060de3ac1e49932d5dcbf1", + strip_prefix = "bazel-toolchains-4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", ], ) @@ -221,11 +221,10 @@ def grpc_deps(): ) if "build_bazel_rules_apple" not in native.existing_rules(): - http_archive( + git_repository( name = "build_bazel_rules_apple", - url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz", - strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3", - sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e", + remote = "https://github.com/bazelbuild/rules_apple.git", + tag = "0.17.2", ) grpc_python_deps() diff --git a/bazel/grpc_python_deps.bzl b/bazel/grpc_python_deps.bzl index 2a439bdf226..4e7cc1537fa 100644 --- a/bazel/grpc_python_deps.bzl +++ b/bazel/grpc_python_deps.bzl @@ -47,15 +47,6 @@ def grpc_python_deps(): remote = "https://github.com/bazelbuild/rules_python.git", ) - - if "rules_python" not in native.existing_rules(): - http_archive( - name = "rules_python", - url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip", - sha256 = "f7402f11691d657161f871e11968a984e5b48b023321935f5a55d7e56cf4758a", - strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552", - ) - python_configure(name = "local_config_python") native.bind( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index e7e9e597b05..12f51f8b172 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -178,29 +178,3 @@ def py_grpc_library( deps = [Label("//src/python/grpcio/grpc:grpcio")] + deps, **kwargs ) - - -def py2and3_test(name, - py_test = native.py_test, - **kwargs): - if "python_version" in kwargs: - fail("Cannot specify 'python_version' in py2and3_test.") - - names = [name + suffix for suffix in (".python2", ".python3")] - python_versions = ["PY2", "PY3"] - for case_name, python_version in zip(names, python_versions): - py_test( - name = case_name, - python_version = python_version, - **kwargs - ) - - suite_kwargs = {} - if "visibility" in kwargs: - suite_kwargs["visibility"] = kwargs["visibility"] - - native.test_suite( - name = name, - tests = names, - **suite_kwargs - ) diff --git a/examples/python/auth/BUILD.bazel b/examples/python/auth/BUILD.bazel index 72620ee46c5..cc454fdfdfe 100644 --- a/examples/python/auth/BUILD.bazel +++ b/examples/python/auth/BUILD.bazel @@ -39,7 +39,6 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], - python_version = "PY3", ) py_binary( @@ -52,7 +51,6 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], - python_version = "PY3", ) py_test( @@ -65,5 +63,4 @@ py_test( ":customized_auth_server", ":_credentials", ], - python_version = "PY3", ) diff --git a/examples/python/cancellation/BUILD.bazel b/examples/python/cancellation/BUILD.bazel index b4451f60711..17b1b20168e 100644 --- a/examples/python/cancellation/BUILD.bazel +++ b/examples/python/cancellation/BUILD.bazel @@ -45,7 +45,6 @@ py_binary( "//external:six" ], srcs_version = "PY2AND3", - python_version = "PY3", ) py_library( @@ -69,7 +68,6 @@ py_binary( "//:python3": [], }), srcs_version = "PY2AND3", - python_version = "PY3", ) py_test( @@ -80,5 +78,4 @@ py_test( ":server" ], size = "small", - python_version = "PY3", ) diff --git a/examples/python/compression/BUILD.bazel b/examples/python/compression/BUILD.bazel index 4141eda2ffd..9d5f6bb83ed 100644 --- a/examples/python/compression/BUILD.bazel +++ b/examples/python/compression/BUILD.bazel @@ -21,7 +21,6 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", - python_version = "PY3", ) py_binary( @@ -33,7 +32,6 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", - python_version = "PY3", ) py_test( @@ -45,5 +43,4 @@ py_test( ":server", ], size = "small", - python_version = "PY3", ) diff --git a/examples/python/debug/BUILD.bazel b/examples/python/debug/BUILD.bazel index 332991332f8..657ae860ae3 100644 --- a/examples/python/debug/BUILD.bazel +++ b/examples/python/debug/BUILD.bazel @@ -35,7 +35,6 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], - python_version = "PY3", ) py_binary( @@ -46,7 +45,6 @@ py_binary( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz", ], - python_version = "PY3", ) py_test( @@ -61,5 +59,4 @@ py_test( ":send_message", ":get_stats", ], - python_version = "PY3", ) diff --git a/examples/python/errors/BUILD.bazel b/examples/python/errors/BUILD.bazel index 367bd81925f..4b779ddfcf1 100644 --- a/examples/python/errors/BUILD.bazel +++ b/examples/python/errors/BUILD.bazel @@ -55,5 +55,4 @@ py_test( "../../../src/python/grpcio_status", "../../../src/python/grpcio_tests", ], - python_version = "PY3", ) diff --git a/examples/python/multiprocessing/BUILD b/examples/python/multiprocessing/BUILD index 2503970bc80..490aea0c1e6 100644 --- a/examples/python/multiprocessing/BUILD +++ b/examples/python/multiprocessing/BUILD @@ -42,7 +42,6 @@ py_binary( ":prime_proto_pb2_grpc", ], srcs_version = "PY3", - python_version = "PY3", ) py_binary( @@ -58,7 +57,6 @@ py_binary( "//:python3": [], }), srcs_version = "PY3", - python_version = "PY3", ) py_test( @@ -69,5 +67,4 @@ py_test( ":server" ], size = "small", - python_version = "PY3", ) diff --git a/examples/python/wait_for_ready/BUILD.bazel b/examples/python/wait_for_ready/BUILD.bazel index 9cbddd1a6e3..f074ae7bb7f 100644 --- a/examples/python/wait_for_ready/BUILD.bazel +++ b/examples/python/wait_for_ready/BUILD.bazel @@ -30,5 +30,4 @@ py_test( srcs = ["test/_wait_for_ready_example_test.py"], deps = [":wait_for_ready_example",], size = "small", - python_version = "PY3", ) diff --git a/src/python/grpcio_tests/tests/channelz/BUILD.bazel b/src/python/grpcio_tests/tests/channelz/BUILD.bazel index f4d246847f7..63513616e77 100644 --- a/src/python/grpcio_tests/tests/channelz/BUILD.bazel +++ b/src/python/grpcio_tests/tests/channelz/BUILD.bazel @@ -1,8 +1,6 @@ package(default_visibility = ["//visibility:public"]) -load("//bazel:python_rules.bzl", "py2and3_test") - -py2and3_test( +py_test( name = "channelz_servicer_test", srcs = ["_channelz_servicer_test.py"], main = "_channelz_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/health_check/BUILD.bazel b/src/python/grpcio_tests/tests/health_check/BUILD.bazel index 797b6a48e91..49f076be9a1 100644 --- a/src/python/grpcio_tests/tests/health_check/BUILD.bazel +++ b/src/python/grpcio_tests/tests/health_check/BUILD.bazel @@ -1,7 +1,6 @@ package(default_visibility = ["//visibility:public"]) -load("//bazel:python_rules.bzl", "py2and3_test") -py2and3_test( +py_test( name = "health_servicer_test", srcs = ["_health_servicer_test.py"], main = "_health_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/interop/BUILD.bazel b/src/python/grpcio_tests/tests/interop/BUILD.bazel index 4685852162b..8ac3f7d52d5 100644 --- a/src/python/grpcio_tests/tests/interop/BUILD.bazel +++ b/src/python/grpcio_tests/tests/interop/BUILD.bazel @@ -1,5 +1,4 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") -load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -81,7 +80,7 @@ py_library( ], ) -py2and3_test( +py_test( name = "_insecure_intraop_test", size = "small", srcs = ["_insecure_intraop_test.py"], @@ -100,7 +99,7 @@ py2and3_test( ], ) -py2and3_test( +py_test( name = "_secure_intraop_test", size = "small", srcs = ["_secure_intraop_test.py"], diff --git a/src/python/grpcio_tests/tests/reflection/BUILD.bazel b/src/python/grpcio_tests/tests/reflection/BUILD.bazel index 65a08c2a435..e9b56191df8 100644 --- a/src/python/grpcio_tests/tests/reflection/BUILD.bazel +++ b/src/python/grpcio_tests/tests/reflection/BUILD.bazel @@ -1,9 +1,8 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") -load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py2and3_test( +py_test( name="_reflection_servicer_test", size="small", timeout="moderate", diff --git a/src/python/grpcio_tests/tests/status/BUILD.bazel b/src/python/grpcio_tests/tests/status/BUILD.bazel index 0868de01acf..b163fe3975e 100644 --- a/src/python/grpcio_tests/tests/status/BUILD.bazel +++ b/src/python/grpcio_tests/tests/status/BUILD.bazel @@ -1,9 +1,8 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") -load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py2and3_test( +py_test( name = "grpc_status_test", srcs = ["_grpc_status_test.py"], main = "_grpc_status_test.py", diff --git a/src/python/grpcio_tests/tests/unit/BUILD.bazel b/src/python/grpcio_tests/tests/unit/BUILD.bazel index 587d8cb246f..49203b7fa16 100644 --- a/src/python/grpcio_tests/tests/unit/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/BUILD.bazel @@ -1,5 +1,3 @@ -load("//bazel:python_rules.bzl", "py2and3_test") - package(default_visibility = ["//visibility:public"]) GRPCIO_TESTS_UNIT = [ @@ -82,7 +80,7 @@ py_library( ) [ - py2and3_test( + py_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel index 867649a6a50..458a6b1fb8a 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel @@ -1,5 +1,4 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") -load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -24,7 +23,7 @@ py_library( ) [ - py2and3_test( + py_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel index a93249301c4..d69186e1fde 100644 --- a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel @@ -1,12 +1,11 @@ package(default_visibility = ["//visibility:public"]) -load("//bazel:python_rules.bzl", "py2and3_test") py_library( name = "stream_testing", srcs = ["stream_testing.py"], ) -py2and3_test( +py_test( name = "logging_pool_test", srcs = ["_logging_pool_test.py"], main = "_logging_pool_test.py", diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index 12a22785623..adde6ed4787 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -2,7 +2,7 @@ # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.26.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/third_party/py/BUILD.tpl b/third_party/py/BUILD.tpl index 8f010f85a03..2283c573bc3 100644 --- a/third_party/py/BUILD.tpl +++ b/third_party/py/BUILD.tpl @@ -2,36 +2,35 @@ package(default_visibility=["//visibility:public"]) -config_setting( - name="windows", - values={"cpu": "x64_windows"}, - visibility=["//visibility:public"], +# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib +# See https://docs.python.org/3/extending/windows.html +cc_import( + name="python_lib", + interface_library=select({ + ":windows": ":python_import_lib", + # A placeholder for Unix platforms which makes --no_build happy. + "//conditions:default": "not-existing.lib", + }), + system_provided=1, ) -config_setting( - name="python2", - flag_values = {"@rules_python//python:python_version": "PY2"} +cc_library( + name="python_headers", + hdrs=[":python_include"], + deps=select({ + ":windows": [":python_lib"], + "//conditions:default": [], + }), + includes=["python_include"], ) config_setting( - name="python3", - flag_values = {"@rules_python//python:python_version": "PY3"} + name="windows", + values={"cpu": "x64_windows"}, + visibility=["//visibility:public"], ) -cc_library( - name = "python_lib", - deps = select({ - ":python2": ["//_python2:_python2_lib"], - ":python3": ["//_python3:_python3_lib"], - "//conditions:default": ["not-existing.lib"], - }) -) +%{PYTHON_INCLUDE_GENRULE} +%{PYTHON_IMPORT_LIB_GENRULE} + -cc_library( - name = "python_headers", - deps = select({ - ":python2": ["//_python2:_python2_headers"], - ":python3": ["//_python3:_python3_headers"], - "//conditions:default": ["not-existing.headers"], - }) -) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index 6f9a178a057..e6fa5ed10e9 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -3,15 +3,14 @@ `python_configure` depends on the following environment variables: - * `PYTHON2_BIN_PATH`: location of python binary. - * `PYTHON2_LIB_PATH`: Location of python libraries. + * `PYTHON_BIN_PATH`: location of python binary. + * `PYTHON_LIB_PATH`: Location of python libraries. """ _BAZEL_SH = "BAZEL_SH" -_PYTHON2_BIN_PATH = "PYTHON2_BIN_PATH" -_PYTHON2_LIB_PATH = "PYTHON2_LIB_PATH" -_PYTHON3_BIN_PATH = "PYTHON3_BIN_PATH" -_PYTHON3_LIB_PATH = "PYTHON3_LIB_PATH" +_PYTHON_BIN_PATH = "PYTHON_BIN_PATH" +_PYTHON_LIB_PATH = "PYTHON_LIB_PATH" +_PYTHON_CONFIG_REPO = "PYTHON_CONFIG_REPO" def _tpl(repository_ctx, tpl, substitutions={}, out=None): @@ -137,9 +136,9 @@ def _symlink_genrule_for_dir(repository_ctx, "\n".join(outs)) -def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): +def _get_python_bin(repository_ctx): """Gets the python bin path.""" - python_bin = repository_ctx.os.environ.get(bin_path_key, default_bin_path) + python_bin = repository_ctx.os.environ.get(_PYTHON_BIN_PATH, 'python') if not repository_ctx.path(python_bin).exists: # It's a command, use 'which' to find its path. python_bin_path = repository_ctx.which(python_bin) @@ -151,7 +150,7 @@ def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): _fail("Cannot find python in PATH, please make sure " + "python is installed and add its directory in PATH, or --define " + "%s='/something/else'.\nPATH=%s" % - (bin_path_key, repository_ctx.os.environ.get("PATH", ""))) + (_PYTHON_BIN_PATH, repository_ctx.os.environ.get("PATH", ""))) def _get_bash_bin(repository_ctx): @@ -171,9 +170,9 @@ def _get_bash_bin(repository_ctx): (_BAZEL_SH, repository_ctx.os.environ.get("PATH", ""))) -def _get_python_lib(repository_ctx, python_bin, lib_path_key): +def _get_python_lib(repository_ctx, python_bin): """Gets the python lib path.""" - python_lib = repository_ctx.os.environ.get(lib_path_key) + python_lib = repository_ctx.os.environ.get(_PYTHON_LIB_PATH) if python_lib != None: return python_lib print_lib = ( @@ -203,13 +202,13 @@ def _check_python_lib(repository_ctx, python_lib): _fail("Invalid python library path: %s" % python_lib) -def _check_python_bin(repository_ctx, python_bin, bin_path_key): +def _check_python_bin(repository_ctx, python_bin): """Checks the python bin path.""" cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin) result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) if result.return_code == 1: _fail("--define %s='%s' is not executable. Is it the python binary?" % - (bin_path_key, python_bin)) + (_PYTHON_BIN_PATH, python_bin)) def _get_python_include(repository_ctx, python_bin): @@ -223,11 +222,11 @@ def _get_python_include(repository_ctx, python_bin): error_msg="Problem getting python include path.", error_details=( "Is the Python binary path set up right? " + "(See ./configure or " - + _PYTHON2_BIN_PATH + ".) " + "Is distutils installed?")) + + _PYTHON_BIN_PATH + ".) " + "Is distutils installed?")) return result.stdout.splitlines()[0] -def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key): +def _get_python_import_lib_name(repository_ctx, python_bin): """Get Python import library name (pythonXY.lib) on Windows.""" result = _execute( repository_ctx, [ @@ -237,85 +236,66 @@ def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key): ], error_msg="Problem getting python import library.", error_details=("Is the Python binary path set up right? " + - "(See ./configure or " + bin_path_key + ".) ")) + "(See ./configure or " + _PYTHON_BIN_PATH + ".) ")) return result.stdout.splitlines()[0] -def _create_single_version_package(repository_ctx, - variety_name, - bin_path_key, - default_bin_path, - lib_path_key): +def _create_local_python_repository(repository_ctx): """Creates the repository containing files set up to build with Python.""" - python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path) - _check_python_bin(repository_ctx, python_bin, bin_path_key) - python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) + python_bin = _get_python_bin(repository_ctx) + _check_python_bin(repository_ctx, python_bin) + python_lib = _get_python_lib(repository_ctx, python_bin) _check_python_lib(repository_ctx, python_lib) python_include = _get_python_include(repository_ctx, python_bin) python_include_rule = _symlink_genrule_for_dir( - repository_ctx, python_include, '{}_include'.format(variety_name), - '{}_include'.format(variety_name)) + repository_ctx, python_include, 'python_include', 'python_include') python_import_lib_genrule = "" # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib # See https://docs.python.org/3/extending/windows.html if _is_windows(repository_ctx): python_include = _normalize_path(python_include) - python_import_lib_name = _get_python_import_lib_name, bin_path_key( + python_import_lib_name = _get_python_import_lib_name( repository_ctx, python_bin) python_import_lib_src = python_include.rsplit( '/', 1)[0] + "/libs/" + python_import_lib_name python_import_lib_genrule = _symlink_genrule_for_dir( - repository_ctx, None, '', '{}_import_lib'.format(variety_name), + repository_ctx, None, '', 'python_import_lib', [python_import_lib_src], [python_import_lib_name]) _tpl( - repository_ctx, "variety", { + repository_ctx, "BUILD", { "%{PYTHON_INCLUDE_GENRULE}": python_include_rule, "%{PYTHON_IMPORT_LIB_GENRULE}": python_import_lib_genrule, - "%{VARIETY_NAME}": variety_name, - }, - out="{}/BUILD".format(variety_name)) + }) + + +def _create_remote_python_repository(repository_ctx, remote_config_repo): + """Creates pointers to a remotely configured repo set up to build with Python. + """ + _tpl(repository_ctx, "remote.BUILD", { + "%{REMOTE_PYTHON_REPO}": remote_config_repo, + }, "BUILD") def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" - _create_single_version_package(repository_ctx, - "_python2", - _PYTHON2_BIN_PATH, - "python", - _PYTHON2_LIB_PATH) - _create_single_version_package(repository_ctx, - "_python3", - _PYTHON3_BIN_PATH, - "python3", - _PYTHON3_LIB_PATH) - _tpl(repository_ctx, "BUILD") + if _PYTHON_CONFIG_REPO in repository_ctx.os.environ: + _create_remote_python_repository( + repository_ctx, repository_ctx.os.environ[_PYTHON_CONFIG_REPO]) + else: + _create_local_python_repository(repository_ctx) python_configure = repository_rule( - implementation = _python_autoconf_impl, - environ = [ + implementation=_python_autoconf_impl, + environ=[ _BAZEL_SH, - _PYTHON2_BIN_PATH, - _PYTHON2_LIB_PATH, - _PYTHON3_BIN_PATH, - _PYTHON3_LIB_PATH, + _PYTHON_BIN_PATH, + _PYTHON_LIB_PATH, + _PYTHON_CONFIG_REPO, ], - attrs={ - "_build_tpl": attr.label( - default = Label("//third_party/py:BUILD.tpl"), - allow_single_file = True, - ), - "_variety_tpl": attr.label( - default = Label("//third_party/py:variety.tpl"), - allow_single_file = True, - ), - }, ) """Detects and configures the local Python. -It is expected that the system have both a working Python 2 and python 3 -installation - Add the following to your WORKSPACE FILE: ```python diff --git a/third_party/py/remote.BUILD.tpl b/third_party/py/remote.BUILD.tpl new file mode 100644 index 00000000000..1bfe1f0bf65 --- /dev/null +++ b/third_party/py/remote.BUILD.tpl @@ -0,0 +1,10 @@ +# Adapted with modifications from tensorflow/third_party/py/ + +package(default_visibility=["//visibility:public"]) + +alias( + name="python_headers", + actual="%{REMOTE_PYTHON_REPO}:python_headers", +) + + diff --git a/third_party/py/variety.tpl b/third_party/py/variety.tpl deleted file mode 100644 index 0c466d6d8f0..00000000000 --- a/third_party/py/variety.tpl +++ /dev/null @@ -1,26 +0,0 @@ -package(default_visibility=["//visibility:public"]) - -# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib -# See https://docs.python.org/3/extending/windows.html -cc_import( - name="%{VARIETY_NAME}_lib", - interface_library=select({ - "//:windows": ":%{VARIETY_NAME}_import_lib", - # A placeholder for Unix platforms which makes --no_build happy. - "//conditions:default": "not-existing.lib", - }), - system_provided=1, -) - -cc_library( - name="%{VARIETY_NAME}_headers", - hdrs=[":%{VARIETY_NAME}_include"], - deps=select({ - "//:windows": [":%{VARIETY_NAME}_lib"], - "//conditions:default": [], - }), - includes=["%{VARIETY_NAME}_include"], -) - -%{PYTHON_INCLUDE_GENRULE} -%{PYTHON_IMPORT_LIB_GENRULE} diff --git a/tools/bazel b/tools/bazel index 4d1d57f60d9..4f08d18c656 100755 --- a/tools/bazel +++ b/tools/bazel @@ -32,7 +32,7 @@ then exec -a "$0" "${BAZEL_REAL}" "$@" fi -VERSION=0.28.1 +VERSION=0.26.0 echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." diff --git a/tools/bazel.rc b/tools/bazel.rc index fcbe9337b9f..b24f603ddda 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -82,3 +82,7 @@ build:basicprof --copt=-DNDEBUG build:basicprof --copt=-O2 build:basicprof --copt=-DGRPC_BASIC_PROFILER build:basicprof --copt=-DGRPC_TIMERS_RDTSC + +build:python3 --python_path=python3 +build:python3 --python_version=PY3 +build:python3 --action_env=PYTHON_BIN_PATH=python3 diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index 7141fb9c5f1..7e7903359e7 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -52,7 +52,7 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.26.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index badff52de34..675378b305b 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,7 +97,7 @@ ENV CLANG_TIDY=clang-tidy # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.26.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh index 4a48760aab1..f725eb7a3d7 100755 --- a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh @@ -26,6 +26,9 @@ ${name}') cd /var/local/git/grpc/test bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... +bazel clean --expunge +bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... +bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... # TODO(https://github.com/grpc/grpc/issues/19854): Move this to a new Kokoro # job. diff --git a/tools/remote_build/kokoro.bazelrc b/tools/remote_build/kokoro.bazelrc index 5c1b061bce3..064e94b2e15 100644 --- a/tools/remote_build/kokoro.bazelrc +++ b/tools/remote_build/kokoro.bazelrc @@ -16,12 +16,13 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=grpcs://remotebuildexecution.googleapis.com -build --remote_executor=grpcs://remotebuildexecution.googleapis.com +build --remote_cache=remotebuildexecution.googleapis.com +build --remote_executor=remotebuildexecution.googleapis.com +build --tls_enabled=true build --auth_enabled=true -build --bes_backend=grpcs://buildeventservice.googleapis.com +build --bes_backend=buildeventservice.googleapis.com build --bes_timeout=600s build --project_id=grpc-testing diff --git a/tools/remote_build/manual.bazelrc b/tools/remote_build/manual.bazelrc index c3c6af42877..fcd41f57521 100644 --- a/tools/remote_build/manual.bazelrc +++ b/tools/remote_build/manual.bazelrc @@ -17,8 +17,9 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=grpcs://remotebuildexecution.googleapis.com -build --remote_executor=grpcs://remotebuildexecution.googleapis.com +build --remote_cache=remotebuildexecution.googleapis.com +build --remote_executor=remotebuildexecution.googleapis.com +build --tls_enabled=true # Enable authentication. This will pick up application default credentials by # default. You can use --auth_credentials=some_file.json to use a service @@ -29,7 +30,7 @@ build --auth_enabled=true # Set flags for uploading to BES in order to view results in the Bazel Build # Results UI. -build --bes_backend=grpcs://buildeventservice.googleapis.com +build --bes_backend="buildeventservice.googleapis.com" build --bes_timeout=60s build --bes_results_url="https://source.cloud.google.com/results/invocations/" build --project_id=grpc-testing diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index 6236003fe17..6baaf24732c 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -87,4 +87,4 @@ build:ubsan --test_timeout=3600 # how to update the bazel toolchain for ubsan: # - check for the latest released version in https://github.com/bazelbuild/bazel-toolchains/tree/master/configs/experimental/ubuntu16_04_clang # - you might need to update the bazel_toolchains dependency in grpc_deps.bzl -build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.28.0/ubsan:toolchain +build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.23.0/ubsan:toolchain From 1444cd1dd31c81daa63477be445a941722a42f5d Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 29 Aug 2019 10:51:36 -0700 Subject: [PATCH 058/120] Revert "Revert "Merge pull request #20097 from gnossen/dual_version_python_tests"" This reverts commit 24c562dbaa95539031c45ab4bdce5070ca6c2af5. --- BUILD | 2 +- bazel/grpc_build_system.bzl | 11 +- bazel/grpc_deps.bzl | 15 +-- bazel/grpc_python_deps.bzl | 9 ++ bazel/python_rules.bzl | 26 +++++ examples/python/auth/BUILD.bazel | 3 + examples/python/cancellation/BUILD.bazel | 3 + examples/python/compression/BUILD.bazel | 3 + examples/python/debug/BUILD.bazel | 3 + examples/python/errors/BUILD.bazel | 1 + examples/python/multiprocessing/BUILD | 3 + examples/python/wait_for_ready/BUILD.bazel | 1 + .../grpcio_tests/tests/channelz/BUILD.bazel | 4 +- .../tests/health_check/BUILD.bazel | 3 +- .../grpcio_tests/tests/interop/BUILD.bazel | 5 +- .../grpcio_tests/tests/reflection/BUILD.bazel | 3 +- .../grpcio_tests/tests/status/BUILD.bazel | 3 +- .../grpcio_tests/tests/unit/BUILD.bazel | 4 +- .../tests/unit/_cython/BUILD.bazel | 3 +- .../unit/framework/foundation/BUILD.bazel | 3 +- templates/tools/dockerfile/bazel.include | 2 +- third_party/py/BUILD.tpl | 49 +++++---- third_party/py/python_configure.bzl | 104 +++++++++++------- third_party/py/remote.BUILD.tpl | 10 -- third_party/py/variety.tpl | 26 +++++ tools/bazel | 2 +- tools/bazel.rc | 4 - tools/dockerfile/test/bazel/Dockerfile | 2 +- tools/dockerfile/test/sanity/Dockerfile | 2 +- .../linux/grpc_python_bazel_test_in_docker.sh | 3 - tools/remote_build/kokoro.bazelrc | 7 +- tools/remote_build/manual.bazelrc | 7 +- tools/remote_build/rbe_common.bazelrc | 2 +- 33 files changed, 214 insertions(+), 114 deletions(-) delete mode 100644 third_party/py/remote.BUILD.tpl create mode 100644 third_party/py/variety.tpl diff --git a/BUILD b/BUILD index 9198dd61282..e489bc2584a 100644 --- a/BUILD +++ b/BUILD @@ -65,7 +65,7 @@ config_setting( config_setting( name = "python3", - values = {"python_path": "python3"}, + flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, ) config_setting( diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f386b87b583..f4777e50bc1 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -269,13 +269,22 @@ def grpc_sh_binary(name, srcs, data = []): data = data, ) -def grpc_py_binary(name, srcs, data = [], deps = [], external_deps = [], testonly = False): +def grpc_py_binary(name, + srcs, + data = [], + deps = [], + external_deps = [], + testonly = False, + python_version = "PY2", + **kwargs): native.py_binary( name = name, srcs = srcs, testonly = testonly, data = data, deps = deps + _get_external_deps(external_deps), + python_version = python_version, + **kwargs ) def grpc_package(name, visibility = "private", features = []): diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 06323ff3f24..6bbb960b6c3 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -176,11 +176,11 @@ def grpc_deps(): if "bazel_toolchains" not in native.existing_rules(): http_archive( name = "bazel_toolchains", - sha256 = "d968b414b32aa99c86977e1171645d31da2b52ac88060de3ac1e49932d5dcbf1", - strip_prefix = "bazel-toolchains-4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47", + sha256 = "872955b658113924eb1a3594b04d43238da47f4f90c17b76e8785709490dc041", + strip_prefix = "bazel-toolchains-1083686fde6032378d52b4c98044922cebde364e", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", - "https://github.com/bazelbuild/bazel-toolchains/archive/4bd5df80d77aa7f4fb943dfdfad5c9056a62fb47.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", + "https://github.com/bazelbuild/bazel-toolchains/archive/1083686fde6032378d52b4c98044922cebde364e.tar.gz", ], ) @@ -221,10 +221,11 @@ def grpc_deps(): ) if "build_bazel_rules_apple" not in native.existing_rules(): - git_repository( + http_archive( name = "build_bazel_rules_apple", - remote = "https://github.com/bazelbuild/rules_apple.git", - tag = "0.17.2", + url = "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz", + strip_prefix = "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3", + sha256 = "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e", ) grpc_python_deps() diff --git a/bazel/grpc_python_deps.bzl b/bazel/grpc_python_deps.bzl index 4e7cc1537fa..2a439bdf226 100644 --- a/bazel/grpc_python_deps.bzl +++ b/bazel/grpc_python_deps.bzl @@ -47,6 +47,15 @@ def grpc_python_deps(): remote = "https://github.com/bazelbuild/rules_python.git", ) + + if "rules_python" not in native.existing_rules(): + http_archive( + name = "rules_python", + url = "https://github.com/bazelbuild/rules_python/archive/9d68f24659e8ce8b736590ba1e4418af06ec2552.zip", + sha256 = "f7402f11691d657161f871e11968a984e5b48b023321935f5a55d7e56cf4758a", + strip_prefix = "rules_python-9d68f24659e8ce8b736590ba1e4418af06ec2552", + ) + python_configure(name = "local_config_python") native.bind( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 12f51f8b172..e7e9e597b05 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -178,3 +178,29 @@ def py_grpc_library( deps = [Label("//src/python/grpcio/grpc:grpcio")] + deps, **kwargs ) + + +def py2and3_test(name, + py_test = native.py_test, + **kwargs): + if "python_version" in kwargs: + fail("Cannot specify 'python_version' in py2and3_test.") + + names = [name + suffix for suffix in (".python2", ".python3")] + python_versions = ["PY2", "PY3"] + for case_name, python_version in zip(names, python_versions): + py_test( + name = case_name, + python_version = python_version, + **kwargs + ) + + suite_kwargs = {} + if "visibility" in kwargs: + suite_kwargs["visibility"] = kwargs["visibility"] + + native.test_suite( + name = name, + tests = names, + **suite_kwargs + ) diff --git a/examples/python/auth/BUILD.bazel b/examples/python/auth/BUILD.bazel index cc454fdfdfe..72620ee46c5 100644 --- a/examples/python/auth/BUILD.bazel +++ b/examples/python/auth/BUILD.bazel @@ -39,6 +39,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_binary( @@ -51,6 +52,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_test( @@ -63,4 +65,5 @@ py_test( ":customized_auth_server", ":_credentials", ], + python_version = "PY3", ) diff --git a/examples/python/cancellation/BUILD.bazel b/examples/python/cancellation/BUILD.bazel index 17b1b20168e..b4451f60711 100644 --- a/examples/python/cancellation/BUILD.bazel +++ b/examples/python/cancellation/BUILD.bazel @@ -45,6 +45,7 @@ py_binary( "//external:six" ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_library( @@ -68,6 +69,7 @@ py_binary( "//:python3": [], }), srcs_version = "PY2AND3", + python_version = "PY3", ) py_test( @@ -78,4 +80,5 @@ py_test( ":server" ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/compression/BUILD.bazel b/examples/python/compression/BUILD.bazel index 9d5f6bb83ed..4141eda2ffd 100644 --- a/examples/python/compression/BUILD.bazel +++ b/examples/python/compression/BUILD.bazel @@ -21,6 +21,7 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_binary( @@ -32,6 +33,7 @@ py_binary( "//examples:helloworld_py_pb2_grpc", ], srcs_version = "PY2AND3", + python_version = "PY3", ) py_test( @@ -43,4 +45,5 @@ py_test( ":server", ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/debug/BUILD.bazel b/examples/python/debug/BUILD.bazel index 657ae860ae3..332991332f8 100644 --- a/examples/python/debug/BUILD.bazel +++ b/examples/python/debug/BUILD.bazel @@ -35,6 +35,7 @@ py_binary( "//examples:helloworld_py_pb2", "//examples:helloworld_py_pb2_grpc", ], + python_version = "PY3", ) py_binary( @@ -45,6 +46,7 @@ py_binary( "//src/python/grpcio/grpc:grpcio", "//src/python/grpcio_channelz/grpc_channelz/v1:grpc_channelz", ], + python_version = "PY3", ) py_test( @@ -59,4 +61,5 @@ py_test( ":send_message", ":get_stats", ], + python_version = "PY3", ) diff --git a/examples/python/errors/BUILD.bazel b/examples/python/errors/BUILD.bazel index 4b779ddfcf1..367bd81925f 100644 --- a/examples/python/errors/BUILD.bazel +++ b/examples/python/errors/BUILD.bazel @@ -55,4 +55,5 @@ py_test( "../../../src/python/grpcio_status", "../../../src/python/grpcio_tests", ], + python_version = "PY3", ) diff --git a/examples/python/multiprocessing/BUILD b/examples/python/multiprocessing/BUILD index 490aea0c1e6..2503970bc80 100644 --- a/examples/python/multiprocessing/BUILD +++ b/examples/python/multiprocessing/BUILD @@ -42,6 +42,7 @@ py_binary( ":prime_proto_pb2_grpc", ], srcs_version = "PY3", + python_version = "PY3", ) py_binary( @@ -57,6 +58,7 @@ py_binary( "//:python3": [], }), srcs_version = "PY3", + python_version = "PY3", ) py_test( @@ -67,4 +69,5 @@ py_test( ":server" ], size = "small", + python_version = "PY3", ) diff --git a/examples/python/wait_for_ready/BUILD.bazel b/examples/python/wait_for_ready/BUILD.bazel index f074ae7bb7f..9cbddd1a6e3 100644 --- a/examples/python/wait_for_ready/BUILD.bazel +++ b/examples/python/wait_for_ready/BUILD.bazel @@ -30,4 +30,5 @@ py_test( srcs = ["test/_wait_for_ready_example_test.py"], deps = [":wait_for_ready_example",], size = "small", + python_version = "PY3", ) diff --git a/src/python/grpcio_tests/tests/channelz/BUILD.bazel b/src/python/grpcio_tests/tests/channelz/BUILD.bazel index 63513616e77..f4d246847f7 100644 --- a/src/python/grpcio_tests/tests/channelz/BUILD.bazel +++ b/src/python/grpcio_tests/tests/channelz/BUILD.bazel @@ -1,6 +1,8 @@ package(default_visibility = ["//visibility:public"]) -py_test( +load("//bazel:python_rules.bzl", "py2and3_test") + +py2and3_test( name = "channelz_servicer_test", srcs = ["_channelz_servicer_test.py"], main = "_channelz_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/health_check/BUILD.bazel b/src/python/grpcio_tests/tests/health_check/BUILD.bazel index 49f076be9a1..797b6a48e91 100644 --- a/src/python/grpcio_tests/tests/health_check/BUILD.bazel +++ b/src/python/grpcio_tests/tests/health_check/BUILD.bazel @@ -1,6 +1,7 @@ package(default_visibility = ["//visibility:public"]) +load("//bazel:python_rules.bzl", "py2and3_test") -py_test( +py2and3_test( name = "health_servicer_test", srcs = ["_health_servicer_test.py"], main = "_health_servicer_test.py", diff --git a/src/python/grpcio_tests/tests/interop/BUILD.bazel b/src/python/grpcio_tests/tests/interop/BUILD.bazel index 8ac3f7d52d5..4685852162b 100644 --- a/src/python/grpcio_tests/tests/interop/BUILD.bazel +++ b/src/python/grpcio_tests/tests/interop/BUILD.bazel @@ -1,4 +1,5 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -80,7 +81,7 @@ py_library( ], ) -py_test( +py2and3_test( name = "_insecure_intraop_test", size = "small", srcs = ["_insecure_intraop_test.py"], @@ -99,7 +100,7 @@ py_test( ], ) -py_test( +py2and3_test( name = "_secure_intraop_test", size = "small", srcs = ["_secure_intraop_test.py"], diff --git a/src/python/grpcio_tests/tests/reflection/BUILD.bazel b/src/python/grpcio_tests/tests/reflection/BUILD.bazel index e9b56191df8..65a08c2a435 100644 --- a/src/python/grpcio_tests/tests/reflection/BUILD.bazel +++ b/src/python/grpcio_tests/tests/reflection/BUILD.bazel @@ -1,8 +1,9 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py_test( +py2and3_test( name="_reflection_servicer_test", size="small", timeout="moderate", diff --git a/src/python/grpcio_tests/tests/status/BUILD.bazel b/src/python/grpcio_tests/tests/status/BUILD.bazel index b163fe3975e..0868de01acf 100644 --- a/src/python/grpcio_tests/tests/status/BUILD.bazel +++ b/src/python/grpcio_tests/tests/status/BUILD.bazel @@ -1,8 +1,9 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) -py_test( +py2and3_test( name = "grpc_status_test", srcs = ["_grpc_status_test.py"], main = "_grpc_status_test.py", diff --git a/src/python/grpcio_tests/tests/unit/BUILD.bazel b/src/python/grpcio_tests/tests/unit/BUILD.bazel index 49203b7fa16..587d8cb246f 100644 --- a/src/python/grpcio_tests/tests/unit/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/BUILD.bazel @@ -1,3 +1,5 @@ +load("//bazel:python_rules.bzl", "py2and3_test") + package(default_visibility = ["//visibility:public"]) GRPCIO_TESTS_UNIT = [ @@ -80,7 +82,7 @@ py_library( ) [ - py_test( + py2and3_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel index 458a6b1fb8a..867649a6a50 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/_cython/BUILD.bazel @@ -1,4 +1,5 @@ load("@grpc_python_dependencies//:requirements.bzl", "requirement") +load("//bazel:python_rules.bzl", "py2and3_test") package(default_visibility = ["//visibility:public"]) @@ -23,7 +24,7 @@ py_library( ) [ - py_test( + py2and3_test( name=test_file_name[:-3], size="small", srcs=[test_file_name], diff --git a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel index d69186e1fde..a93249301c4 100644 --- a/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel +++ b/src/python/grpcio_tests/tests/unit/framework/foundation/BUILD.bazel @@ -1,11 +1,12 @@ package(default_visibility = ["//visibility:public"]) +load("//bazel:python_rules.bzl", "py2and3_test") py_library( name = "stream_testing", srcs = ["stream_testing.py"], ) -py_test( +py2and3_test( name = "logging_pool_test", srcs = ["_logging_pool_test.py"], main = "_logging_pool_test.py", diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index adde6ed4787..12a22785623 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -2,7 +2,7 @@ # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/third_party/py/BUILD.tpl b/third_party/py/BUILD.tpl index 2283c573bc3..8f010f85a03 100644 --- a/third_party/py/BUILD.tpl +++ b/third_party/py/BUILD.tpl @@ -2,35 +2,36 @@ package(default_visibility=["//visibility:public"]) -# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib -# See https://docs.python.org/3/extending/windows.html -cc_import( - name="python_lib", - interface_library=select({ - ":windows": ":python_import_lib", - # A placeholder for Unix platforms which makes --no_build happy. - "//conditions:default": "not-existing.lib", - }), - system_provided=1, -) - -cc_library( - name="python_headers", - hdrs=[":python_include"], - deps=select({ - ":windows": [":python_lib"], - "//conditions:default": [], - }), - includes=["python_include"], -) - config_setting( name="windows", values={"cpu": "x64_windows"}, visibility=["//visibility:public"], ) -%{PYTHON_INCLUDE_GENRULE} -%{PYTHON_IMPORT_LIB_GENRULE} +config_setting( + name="python2", + flag_values = {"@rules_python//python:python_version": "PY2"} +) + +config_setting( + name="python3", + flag_values = {"@rules_python//python:python_version": "PY3"} +) +cc_library( + name = "python_lib", + deps = select({ + ":python2": ["//_python2:_python2_lib"], + ":python3": ["//_python3:_python3_lib"], + "//conditions:default": ["not-existing.lib"], + }) +) +cc_library( + name = "python_headers", + deps = select({ + ":python2": ["//_python2:_python2_headers"], + ":python3": ["//_python3:_python3_headers"], + "//conditions:default": ["not-existing.headers"], + }) +) diff --git a/third_party/py/python_configure.bzl b/third_party/py/python_configure.bzl index e6fa5ed10e9..6f9a178a057 100644 --- a/third_party/py/python_configure.bzl +++ b/third_party/py/python_configure.bzl @@ -3,14 +3,15 @@ `python_configure` depends on the following environment variables: - * `PYTHON_BIN_PATH`: location of python binary. - * `PYTHON_LIB_PATH`: Location of python libraries. + * `PYTHON2_BIN_PATH`: location of python binary. + * `PYTHON2_LIB_PATH`: Location of python libraries. """ _BAZEL_SH = "BAZEL_SH" -_PYTHON_BIN_PATH = "PYTHON_BIN_PATH" -_PYTHON_LIB_PATH = "PYTHON_LIB_PATH" -_PYTHON_CONFIG_REPO = "PYTHON_CONFIG_REPO" +_PYTHON2_BIN_PATH = "PYTHON2_BIN_PATH" +_PYTHON2_LIB_PATH = "PYTHON2_LIB_PATH" +_PYTHON3_BIN_PATH = "PYTHON3_BIN_PATH" +_PYTHON3_LIB_PATH = "PYTHON3_LIB_PATH" def _tpl(repository_ctx, tpl, substitutions={}, out=None): @@ -136,9 +137,9 @@ def _symlink_genrule_for_dir(repository_ctx, "\n".join(outs)) -def _get_python_bin(repository_ctx): +def _get_python_bin(repository_ctx, bin_path_key, default_bin_path): """Gets the python bin path.""" - python_bin = repository_ctx.os.environ.get(_PYTHON_BIN_PATH, 'python') + python_bin = repository_ctx.os.environ.get(bin_path_key, default_bin_path) if not repository_ctx.path(python_bin).exists: # It's a command, use 'which' to find its path. python_bin_path = repository_ctx.which(python_bin) @@ -150,7 +151,7 @@ def _get_python_bin(repository_ctx): _fail("Cannot find python in PATH, please make sure " + "python is installed and add its directory in PATH, or --define " + "%s='/something/else'.\nPATH=%s" % - (_PYTHON_BIN_PATH, repository_ctx.os.environ.get("PATH", ""))) + (bin_path_key, repository_ctx.os.environ.get("PATH", ""))) def _get_bash_bin(repository_ctx): @@ -170,9 +171,9 @@ def _get_bash_bin(repository_ctx): (_BAZEL_SH, repository_ctx.os.environ.get("PATH", ""))) -def _get_python_lib(repository_ctx, python_bin): +def _get_python_lib(repository_ctx, python_bin, lib_path_key): """Gets the python lib path.""" - python_lib = repository_ctx.os.environ.get(_PYTHON_LIB_PATH) + python_lib = repository_ctx.os.environ.get(lib_path_key) if python_lib != None: return python_lib print_lib = ( @@ -202,13 +203,13 @@ def _check_python_lib(repository_ctx, python_lib): _fail("Invalid python library path: %s" % python_lib) -def _check_python_bin(repository_ctx, python_bin): +def _check_python_bin(repository_ctx, python_bin, bin_path_key): """Checks the python bin path.""" cmd = '[[ -x "%s" ]] && [[ ! -d "%s" ]]' % (python_bin, python_bin) result = repository_ctx.execute([_get_bash_bin(repository_ctx), "-c", cmd]) if result.return_code == 1: _fail("--define %s='%s' is not executable. Is it the python binary?" % - (_PYTHON_BIN_PATH, python_bin)) + (bin_path_key, python_bin)) def _get_python_include(repository_ctx, python_bin): @@ -222,11 +223,11 @@ def _get_python_include(repository_ctx, python_bin): error_msg="Problem getting python include path.", error_details=( "Is the Python binary path set up right? " + "(See ./configure or " - + _PYTHON_BIN_PATH + ".) " + "Is distutils installed?")) + + _PYTHON2_BIN_PATH + ".) " + "Is distutils installed?")) return result.stdout.splitlines()[0] -def _get_python_import_lib_name(repository_ctx, python_bin): +def _get_python_import_lib_name(repository_ctx, python_bin, bin_path_key): """Get Python import library name (pythonXY.lib) on Windows.""" result = _execute( repository_ctx, [ @@ -236,66 +237,85 @@ def _get_python_import_lib_name(repository_ctx, python_bin): ], error_msg="Problem getting python import library.", error_details=("Is the Python binary path set up right? " + - "(See ./configure or " + _PYTHON_BIN_PATH + ".) ")) + "(See ./configure or " + bin_path_key + ".) ")) return result.stdout.splitlines()[0] -def _create_local_python_repository(repository_ctx): +def _create_single_version_package(repository_ctx, + variety_name, + bin_path_key, + default_bin_path, + lib_path_key): """Creates the repository containing files set up to build with Python.""" - python_bin = _get_python_bin(repository_ctx) - _check_python_bin(repository_ctx, python_bin) - python_lib = _get_python_lib(repository_ctx, python_bin) + python_bin = _get_python_bin(repository_ctx, bin_path_key, default_bin_path) + _check_python_bin(repository_ctx, python_bin, bin_path_key) + python_lib = _get_python_lib(repository_ctx, python_bin, lib_path_key) _check_python_lib(repository_ctx, python_lib) python_include = _get_python_include(repository_ctx, python_bin) python_include_rule = _symlink_genrule_for_dir( - repository_ctx, python_include, 'python_include', 'python_include') + repository_ctx, python_include, '{}_include'.format(variety_name), + '{}_include'.format(variety_name)) python_import_lib_genrule = "" # To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib # See https://docs.python.org/3/extending/windows.html if _is_windows(repository_ctx): python_include = _normalize_path(python_include) - python_import_lib_name = _get_python_import_lib_name( + python_import_lib_name = _get_python_import_lib_name, bin_path_key( repository_ctx, python_bin) python_import_lib_src = python_include.rsplit( '/', 1)[0] + "/libs/" + python_import_lib_name python_import_lib_genrule = _symlink_genrule_for_dir( - repository_ctx, None, '', 'python_import_lib', + repository_ctx, None, '', '{}_import_lib'.format(variety_name), [python_import_lib_src], [python_import_lib_name]) _tpl( - repository_ctx, "BUILD", { + repository_ctx, "variety", { "%{PYTHON_INCLUDE_GENRULE}": python_include_rule, "%{PYTHON_IMPORT_LIB_GENRULE}": python_import_lib_genrule, - }) - - -def _create_remote_python_repository(repository_ctx, remote_config_repo): - """Creates pointers to a remotely configured repo set up to build with Python. - """ - _tpl(repository_ctx, "remote.BUILD", { - "%{REMOTE_PYTHON_REPO}": remote_config_repo, - }, "BUILD") + "%{VARIETY_NAME}": variety_name, + }, + out="{}/BUILD".format(variety_name)) def _python_autoconf_impl(repository_ctx): """Implementation of the python_autoconf repository rule.""" - if _PYTHON_CONFIG_REPO in repository_ctx.os.environ: - _create_remote_python_repository( - repository_ctx, repository_ctx.os.environ[_PYTHON_CONFIG_REPO]) - else: - _create_local_python_repository(repository_ctx) + _create_single_version_package(repository_ctx, + "_python2", + _PYTHON2_BIN_PATH, + "python", + _PYTHON2_LIB_PATH) + _create_single_version_package(repository_ctx, + "_python3", + _PYTHON3_BIN_PATH, + "python3", + _PYTHON3_LIB_PATH) + _tpl(repository_ctx, "BUILD") python_configure = repository_rule( - implementation=_python_autoconf_impl, - environ=[ + implementation = _python_autoconf_impl, + environ = [ _BAZEL_SH, - _PYTHON_BIN_PATH, - _PYTHON_LIB_PATH, - _PYTHON_CONFIG_REPO, + _PYTHON2_BIN_PATH, + _PYTHON2_LIB_PATH, + _PYTHON3_BIN_PATH, + _PYTHON3_LIB_PATH, ], + attrs={ + "_build_tpl": attr.label( + default = Label("//third_party/py:BUILD.tpl"), + allow_single_file = True, + ), + "_variety_tpl": attr.label( + default = Label("//third_party/py:variety.tpl"), + allow_single_file = True, + ), + }, ) """Detects and configures the local Python. +It is expected that the system have both a working Python 2 and python 3 +installation + Add the following to your WORKSPACE FILE: ```python diff --git a/third_party/py/remote.BUILD.tpl b/third_party/py/remote.BUILD.tpl deleted file mode 100644 index 1bfe1f0bf65..00000000000 --- a/third_party/py/remote.BUILD.tpl +++ /dev/null @@ -1,10 +0,0 @@ -# Adapted with modifications from tensorflow/third_party/py/ - -package(default_visibility=["//visibility:public"]) - -alias( - name="python_headers", - actual="%{REMOTE_PYTHON_REPO}:python_headers", -) - - diff --git a/third_party/py/variety.tpl b/third_party/py/variety.tpl new file mode 100644 index 00000000000..0c466d6d8f0 --- /dev/null +++ b/third_party/py/variety.tpl @@ -0,0 +1,26 @@ +package(default_visibility=["//visibility:public"]) + +# To build Python C/C++ extension on Windows, we need to link to python import library pythonXY.lib +# See https://docs.python.org/3/extending/windows.html +cc_import( + name="%{VARIETY_NAME}_lib", + interface_library=select({ + "//:windows": ":%{VARIETY_NAME}_import_lib", + # A placeholder for Unix platforms which makes --no_build happy. + "//conditions:default": "not-existing.lib", + }), + system_provided=1, +) + +cc_library( + name="%{VARIETY_NAME}_headers", + hdrs=[":%{VARIETY_NAME}_include"], + deps=select({ + "//:windows": [":%{VARIETY_NAME}_lib"], + "//conditions:default": [], + }), + includes=["%{VARIETY_NAME}_include"], +) + +%{PYTHON_INCLUDE_GENRULE} +%{PYTHON_IMPORT_LIB_GENRULE} diff --git a/tools/bazel b/tools/bazel index 4f08d18c656..4d1d57f60d9 100755 --- a/tools/bazel +++ b/tools/bazel @@ -32,7 +32,7 @@ then exec -a "$0" "${BAZEL_REAL}" "$@" fi -VERSION=0.26.0 +VERSION=0.28.1 echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." diff --git a/tools/bazel.rc b/tools/bazel.rc index b24f603ddda..fcbe9337b9f 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -82,7 +82,3 @@ build:basicprof --copt=-DNDEBUG build:basicprof --copt=-O2 build:basicprof --copt=-DGRPC_BASIC_PROFILER build:basicprof --copt=-DGRPC_TIMERS_RDTSC - -build:python3 --python_path=python3 -build:python3 --python_version=PY3 -build:python3 --action_env=PYTHON_BIN_PATH=python3 diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index 7e7903359e7..7141fb9c5f1 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -52,7 +52,7 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 675378b305b..badff52de34 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,7 +97,7 @@ ENV CLANG_TIDY=clang-tidy # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.26.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh index f725eb7a3d7..4a48760aab1 100755 --- a/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_python_bazel_test_in_docker.sh @@ -26,9 +26,6 @@ ${name}') cd /var/local/git/grpc/test bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... -bazel clean --expunge -bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //src/python/... -bazel test --config=python3 --spawn_strategy=standalone --genrule_strategy=standalone --test_output=errors //examples/python/... # TODO(https://github.com/grpc/grpc/issues/19854): Move this to a new Kokoro # job. diff --git a/tools/remote_build/kokoro.bazelrc b/tools/remote_build/kokoro.bazelrc index 064e94b2e15..5c1b061bce3 100644 --- a/tools/remote_build/kokoro.bazelrc +++ b/tools/remote_build/kokoro.bazelrc @@ -16,13 +16,12 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=remotebuildexecution.googleapis.com -build --remote_executor=remotebuildexecution.googleapis.com -build --tls_enabled=true +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_executor=grpcs://remotebuildexecution.googleapis.com build --auth_enabled=true -build --bes_backend=buildeventservice.googleapis.com +build --bes_backend=grpcs://buildeventservice.googleapis.com build --bes_timeout=600s build --project_id=grpc-testing diff --git a/tools/remote_build/manual.bazelrc b/tools/remote_build/manual.bazelrc index fcd41f57521..c3c6af42877 100644 --- a/tools/remote_build/manual.bazelrc +++ b/tools/remote_build/manual.bazelrc @@ -17,9 +17,8 @@ import %workspace%/tools/remote_build/rbe_common.bazelrc -build --remote_cache=remotebuildexecution.googleapis.com -build --remote_executor=remotebuildexecution.googleapis.com -build --tls_enabled=true +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_executor=grpcs://remotebuildexecution.googleapis.com # Enable authentication. This will pick up application default credentials by # default. You can use --auth_credentials=some_file.json to use a service @@ -30,7 +29,7 @@ build --auth_enabled=true # Set flags for uploading to BES in order to view results in the Bazel Build # Results UI. -build --bes_backend="buildeventservice.googleapis.com" +build --bes_backend=grpcs://buildeventservice.googleapis.com build --bes_timeout=60s build --bes_results_url="https://source.cloud.google.com/results/invocations/" build --project_id=grpc-testing diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index 6baaf24732c..6236003fe17 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -87,4 +87,4 @@ build:ubsan --test_timeout=3600 # how to update the bazel toolchain for ubsan: # - check for the latest released version in https://github.com/bazelbuild/bazel-toolchains/tree/master/configs/experimental/ubuntu16_04_clang # - you might need to update the bazel_toolchains dependency in grpc_deps.bzl -build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.23.0/ubsan:toolchain +build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.2/bazel_0.28.0/ubsan:toolchain From 1077b3435c3bf6699e118800a9c0681c900d240b Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 29 Aug 2019 11:27:00 -0700 Subject: [PATCH 059/120] Use range-based for on state rather than state.KeepRunning when possible --- test/cpp/microbenchmarks/bm_alarm.cc | 2 +- test/cpp/microbenchmarks/bm_arena.cc | 4 +- test/cpp/microbenchmarks/bm_byte_buffer.cc | 6 +-- test/cpp/microbenchmarks/bm_call_create.cc | 16 ++++---- test/cpp/microbenchmarks/bm_channel.cc | 2 +- test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 4 +- test/cpp/microbenchmarks/bm_closure.cc | 38 +++++++++---------- test/cpp/microbenchmarks/bm_cq.cc | 16 ++++---- .../microbenchmarks/bm_cq_multiple_threads.cc | 2 +- test/cpp/microbenchmarks/bm_error.cc | 34 ++++++++--------- test/cpp/microbenchmarks/bm_metadata.cc | 38 +++++++++---------- test/cpp/microbenchmarks/bm_pollset.cc | 10 ++--- test/cpp/microbenchmarks/bm_timer.cc | 4 +- .../fullstack_streaming_ping_pong.h | 6 +-- .../fullstack_streaming_pump.h | 4 +- .../fullstack_unary_ping_pong.h | 2 +- test/cpp/microbenchmarks/noop-benchmark.cc | 2 +- 17 files changed, 95 insertions(+), 95 deletions(-) diff --git a/test/cpp/microbenchmarks/bm_alarm.cc b/test/cpp/microbenchmarks/bm_alarm.cc index d95771a57c6..5411b222eab 100644 --- a/test/cpp/microbenchmarks/bm_alarm.cc +++ b/test/cpp/microbenchmarks/bm_alarm.cc @@ -37,7 +37,7 @@ static void BM_Alarm_Tag_Immediate(benchmark::State& state) { void* output_tag; bool ok; auto deadline = grpc_timeout_seconds_to_deadline(0); - while (state.KeepRunning()) { + for (auto _ : state) { alarm.Set(&cq, deadline, nullptr); cq.Next(&output_tag, &ok); } diff --git a/test/cpp/microbenchmarks/bm_arena.cc b/test/cpp/microbenchmarks/bm_arena.cc index c3ded0d76f7..c0d76fa3d7d 100644 --- a/test/cpp/microbenchmarks/bm_arena.cc +++ b/test/cpp/microbenchmarks/bm_arena.cc @@ -26,7 +26,7 @@ using grpc_core::Arena; static void BM_Arena_NoOp(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { Arena::Create(state.range(0))->Destroy(); } } @@ -49,7 +49,7 @@ static void BM_Arena_ManyAlloc(benchmark::State& state) { BENCHMARK(BM_Arena_ManyAlloc)->Ranges({{1, 1024 * 1024}, {1, 32 * 1024}}); static void BM_Arena_Batch(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { Arena* a = Arena::Create(state.range(0)); for (int i = 0; i < state.range(1); i++) { a->Alloc(state.range(2)); diff --git a/test/cpp/microbenchmarks/bm_byte_buffer.cc b/test/cpp/microbenchmarks/bm_byte_buffer.cc index 595cc734b69..4dfa1326de9 100644 --- a/test/cpp/microbenchmarks/bm_byte_buffer.cc +++ b/test/cpp/microbenchmarks/bm_byte_buffer.cc @@ -40,7 +40,7 @@ static void BM_ByteBuffer_Copy(benchmark::State& state) { slices.emplace_back(buf.get(), slice_size); } grpc::ByteBuffer bb(slices.data(), num_slices); - while (state.KeepRunning()) { + for (auto _ : state) { grpc::ByteBuffer cc(bb); } } @@ -60,7 +60,7 @@ static void BM_ByteBufferReader_Next(benchmark::State& state) { grpc_byte_buffer_reader reader; GPR_ASSERT( g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader, bb)); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_slice* slice; if (GPR_UNLIKELY(!g_core_codegen_interface->grpc_byte_buffer_reader_peek( &reader, &slice))) { @@ -93,7 +93,7 @@ static void BM_ByteBufferReader_Peek(benchmark::State& state) { grpc_byte_buffer_reader reader; GPR_ASSERT( g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader, bb)); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_slice* slice; if (GPR_UNLIKELY(!g_core_codegen_interface->grpc_byte_buffer_reader_peek( &reader, &slice))) { diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index 4eb717d82b5..99ea1e053e9 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -52,7 +52,7 @@ void BM_Zalloc(benchmark::State& state) { // sizes TrackCounters track_counters; size_t sz = state.range(0); - while (state.KeepRunning()) { + for (auto _ : state) { gpr_free(gpr_zalloc(sz)); } track_counters.Finish(state); @@ -107,7 +107,7 @@ static void BM_CallCreateDestroy(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_call_unref(grpc_channel_create_registered_call( fixture.channel(), nullptr, GRPC_PROPAGATE_DEFAULTS, cq, method_hdl, deadline, nullptr)); @@ -139,7 +139,7 @@ static void BM_LameChannelCallCreateCpp(benchmark::State& state) { grpc::testing::EchoRequest send_request; grpc::testing::EchoResponse recv_response; grpc::Status recv_status; - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc::ClientContext cli_ctx; auto reader = stub->AsyncEcho(&cli_ctx, send_request, &cq); @@ -174,7 +174,7 @@ static void BM_LameChannelCallCreateCore(benchmark::State& state) { cq = grpc_completion_queue_create_for_next(nullptr); void* rc = grpc_channel_register_call( channel, "/grpc.testing.EchoTestService/Echo", nullptr, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc_call* call = grpc_channel_create_registered_call( channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, rc, @@ -248,7 +248,7 @@ static void BM_LameChannelCallCreateCoreSeparateBatch(benchmark::State& state) { cq = grpc_completion_queue_create_for_next(nullptr); void* rc = grpc_channel_register_call( channel, "/grpc.testing.EchoTestService/Echo", nullptr, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc_call* call = grpc_channel_create_registered_call( channel, nullptr, GRPC_PROPAGATE_DEFAULTS, cq, rc, @@ -720,7 +720,7 @@ static void BM_IsolatedCall_NoOp(benchmark::State& state) { gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); void* method_hdl = grpc_channel_register_call(fixture.channel(), "/foo/bar", nullptr, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc_call_unref(grpc_channel_create_registered_call( fixture.channel(), nullptr, GRPC_PROPAGATE_DEFAULTS, fixture.cq(), @@ -759,7 +759,7 @@ static void BM_IsolatedCall_Unary(benchmark::State& state) { ops[5].data.recv_status_on_client.status = &status_code; ops[5].data.recv_status_on_client.status_details = &status_details; ops[5].data.recv_status_on_client.trailing_metadata = &recv_trailing_metadata; - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc_call* call = grpc_channel_create_registered_call( fixture.channel(), nullptr, GRPC_PROPAGATE_DEFAULTS, fixture.cq(), @@ -802,7 +802,7 @@ static void BM_IsolatedCall_StreamingSend(benchmark::State& state) { memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_MESSAGE; ops[0].data.send_message.send_message = send_message; - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); grpc_call_start_batch(call, ops, 1, tag(2), nullptr); grpc_completion_queue_next(fixture.cq(), diff --git a/test/cpp/microbenchmarks/bm_channel.cc b/test/cpp/microbenchmarks/bm_channel.cc index 88856c3439b..224170b32e9 100644 --- a/test/cpp/microbenchmarks/bm_channel.cc +++ b/test/cpp/microbenchmarks/bm_channel.cc @@ -62,7 +62,7 @@ static void BM_InsecureChannelCreateDestroy(benchmark::State& state) { for (int i = 0; i < state.range(0); i++) { initial_channels[i].Init(); } - while (state.KeepRunning()) { + for (auto _ : state) { Fixture channel; channel.Init(); } diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 4950e7f7768..5d5be763d55 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -54,7 +54,7 @@ static void BM_HpackEncoderInitDestroy(benchmark::State& state) { grpc_core::ExecCtx exec_ctx; std::unique_ptr c( new grpc_chttp2_hpack_compressor); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_chttp2_hpack_compressor_init(c.get()); grpc_chttp2_hpack_compressor_destroy(c.get()); grpc_core::ExecCtx::Get()->Flush(); @@ -435,7 +435,7 @@ static void BM_HpackParserInitDestroy(benchmark::State& state) { grpc_chttp2_hpack_parser p; // Initial destruction so we don't leak memory in the loop. grpc_chttp2_hptbl_destroy(&p.table); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_chttp2_hpack_parser_init(&p); // Note that grpc_chttp2_hpack_parser_destroy frees the table dynamic // elements so we need to recreate it here. In actual operation, diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index 84b1c536bf0..5133c2a0f43 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -32,7 +32,7 @@ static void BM_NoOpExecCtx(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_core::ExecCtx exec_ctx; } track_counters.Finish(state); @@ -42,7 +42,7 @@ BENCHMARK(BM_NoOpExecCtx); static void BM_WellFlushed(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_core::ExecCtx::Get()->Flush(); } @@ -55,7 +55,7 @@ static void DoNothing(void* arg, grpc_error* error) {} static void BM_ClosureInitAgainstExecCtx(benchmark::State& state) { TrackCounters track_counters; grpc_closure c; - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize( GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx)); } @@ -68,7 +68,7 @@ static void BM_ClosureInitAgainstCombiner(benchmark::State& state) { grpc_combiner* combiner = grpc_combiner_create(); grpc_closure c; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize(GRPC_CLOSURE_INIT( &c, DoNothing, nullptr, grpc_combiner_scheduler(combiner))); } @@ -83,7 +83,7 @@ static void BM_ClosureRunOnExecCtx(benchmark::State& state) { grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_RUN(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); } @@ -95,7 +95,7 @@ BENCHMARK(BM_ClosureRunOnExecCtx); static void BM_ClosureCreateAndRun(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_RUN( GRPC_CLOSURE_CREATE(DoNothing, nullptr, grpc_schedule_on_exec_ctx), GRPC_ERROR_NONE); @@ -109,7 +109,7 @@ static void BM_ClosureInitAndRun(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; grpc_closure c; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_RUN( GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx), GRPC_ERROR_NONE); @@ -124,7 +124,7 @@ static void BM_ClosureSchedOnExecCtx(benchmark::State& state) { grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_schedule_on_exec_ctx); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); } @@ -140,7 +140,7 @@ static void BM_ClosureSched2OnExecCtx(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -159,7 +159,7 @@ static void BM_ClosureSched3OnExecCtx(benchmark::State& state) { GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_schedule_on_exec_ctx); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_schedule_on_exec_ctx); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c3, GRPC_ERROR_NONE); @@ -176,7 +176,7 @@ static void BM_AcquireMutex(benchmark::State& state) { gpr_mu mu; gpr_mu_init(&mu); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { gpr_mu_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); gpr_mu_unlock(&mu); @@ -193,7 +193,7 @@ static void BM_TryAcquireMutex(benchmark::State& state) { gpr_mu mu; gpr_mu_init(&mu); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { if (gpr_mu_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); gpr_mu_unlock(&mu); @@ -212,7 +212,7 @@ static void BM_AcquireSpinlock(benchmark::State& state) { // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { gpr_spinlock_lock(&mu); DoNothing(nullptr, GRPC_ERROR_NONE); gpr_spinlock_unlock(&mu); @@ -227,7 +227,7 @@ static void BM_TryAcquireSpinlock(benchmark::State& state) { // for comparison with the combiner stuff below gpr_spinlock mu = GPR_SPINLOCK_INITIALIZER; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { if (gpr_spinlock_trylock(&mu)) { DoNothing(nullptr, GRPC_ERROR_NONE); gpr_spinlock_unlock(&mu); @@ -246,7 +246,7 @@ static void BM_ClosureSchedOnCombiner(benchmark::State& state) { grpc_closure c; GRPC_CLOSURE_INIT(&c, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); } @@ -264,7 +264,7 @@ static void BM_ClosureSched2OnCombiner(benchmark::State& state) { GRPC_CLOSURE_INIT(&c1, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -285,7 +285,7 @@ static void BM_ClosureSched3OnCombiner(benchmark::State& state) { GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); GRPC_CLOSURE_INIT(&c3, DoNothing, nullptr, grpc_combiner_scheduler(combiner)); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c3, GRPC_ERROR_NONE); @@ -308,7 +308,7 @@ static void BM_ClosureSched2OnTwoCombiners(benchmark::State& state) { GRPC_CLOSURE_INIT(&c2, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); grpc_core::ExecCtx::Get()->Flush(); @@ -337,7 +337,7 @@ static void BM_ClosureSched4OnTwoCombiners(benchmark::State& state) { GRPC_CLOSURE_INIT(&c4, DoNothing, nullptr, grpc_combiner_scheduler(combiner2)); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_CLOSURE_SCHED(&c1, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c2, GRPC_ERROR_NONE); GRPC_CLOSURE_SCHED(&c3, GRPC_ERROR_NONE); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index edbff9c2be3..e72de05537c 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -34,7 +34,7 @@ namespace testing { static void BM_CreateDestroyCpp(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { CompletionQueue cq; } track_counters.Finish(state); @@ -44,7 +44,7 @@ BENCHMARK(BM_CreateDestroyCpp); /* Create cq using a different constructor */ static void BM_CreateDestroyCpp2(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_completion_queue* core_cq = grpc_completion_queue_create_for_next(nullptr); CompletionQueue cq(core_cq); @@ -55,7 +55,7 @@ BENCHMARK(BM_CreateDestroyCpp2); static void BM_CreateDestroyCore(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { // TODO: sreek Templatize this benchmark and pass completion type and // polling type as parameters grpc_completion_queue_destroy( @@ -77,7 +77,7 @@ static void BM_Pass1Cpp(benchmark::State& state) { TrackCounters track_counters; CompletionQueue cq; grpc_completion_queue* c_cq = cq.cq(); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_cq_completion completion; DummyTag dummy_tag; grpc_core::ExecCtx exec_ctx; @@ -98,7 +98,7 @@ static void BM_Pass1Core(benchmark::State& state) { // TODO: sreek Templatize this benchmark and pass polling_type as a param grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_cq_completion completion; grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); @@ -117,7 +117,7 @@ static void BM_Pluck1Core(benchmark::State& state) { // TODO: sreek Templatize this benchmark and pass polling_type as a param grpc_completion_queue* cq = grpc_completion_queue_create_for_pluck(nullptr); gpr_timespec deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_cq_completion completion; grpc_core::ExecCtx exec_ctx; GPR_ASSERT(grpc_cq_begin_op(cq, nullptr)); @@ -136,7 +136,7 @@ static void BM_EmptyCore(benchmark::State& state) { // TODO: sreek Templatize this benchmark and pass polling_type as a param grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); gpr_timespec deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_completion_queue_next(cq, deadline, nullptr); } grpc_completion_queue_destroy(cq); @@ -202,7 +202,7 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { ShutdownCallback shutdown_cb(&got_shutdown); grpc_completion_queue* cc = grpc_completion_queue_create_for_callback(&shutdown_cb, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; grpc_cq_completion completion; diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index 329eaf2434e..4dc471b1bc5 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -174,7 +174,7 @@ static void BM_Cq_Throughput(benchmark::State& state) { // (optionally including low-level counters) before and after the test TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GPR_ASSERT(grpc_completion_queue_next(g_cq, deadline, nullptr).type == GRPC_OP_COMPLETE); } diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index a71817f7e54..c58453be4f5 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -35,7 +35,7 @@ typedef std::unique_ptr ErrorPtr; static void BM_ErrorCreateFromStatic(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error")); } track_counters.Finish(state); @@ -44,7 +44,7 @@ BENCHMARK(BM_ErrorCreateFromStatic); static void BM_ErrorCreateFromCopied(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(GRPC_ERROR_CREATE_FROM_COPIED_STRING("Error not inline")); } track_counters.Finish(state); @@ -53,7 +53,7 @@ BENCHMARK(BM_ErrorCreateFromCopied); static void BM_ErrorCreateAndSetStatus(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF( grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_ABORTED)); @@ -64,7 +64,7 @@ BENCHMARK(BM_ErrorCreateAndSetStatus); static void BM_ErrorCreateAndSetIntAndStr(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(grpc_error_set_str( grpc_error_set_int( GRPC_ERROR_CREATE_FROM_STATIC_STRING("GOAWAY received"), @@ -79,7 +79,7 @@ static void BM_ErrorCreateAndSetIntLoop(benchmark::State& state) { TrackCounters track_counters; grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"); int n = 0; - while (state.KeepRunning()) { + for (auto _ : state) { error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, n++); } GRPC_ERROR_UNREF(error); @@ -91,7 +91,7 @@ static void BM_ErrorCreateAndSetStrLoop(benchmark::State& state) { TrackCounters track_counters; grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"); const char* str = "hello"; - while (state.KeepRunning()) { + for (auto _ : state) { error = grpc_error_set_str(error, GRPC_ERROR_STR_GRPC_MESSAGE, grpc_slice_from_static_string(str)); } @@ -103,7 +103,7 @@ BENCHMARK(BM_ErrorCreateAndSetStrLoop); static void BM_ErrorRefUnref(benchmark::State& state) { TrackCounters track_counters; grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); @@ -113,7 +113,7 @@ BENCHMARK(BM_ErrorRefUnref); static void BM_ErrorUnrefNone(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(GRPC_ERROR_NONE); } } @@ -121,7 +121,7 @@ BENCHMARK(BM_ErrorUnrefNone); static void BM_ErrorGetIntFromNoError(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { intptr_t value; grpc_error_get_int(GRPC_ERROR_NONE, GRPC_ERROR_INT_GRPC_STATUS, &value); } @@ -133,7 +133,7 @@ static void BM_ErrorGetMissingInt(benchmark::State& state) { TrackCounters track_counters; ErrorPtr error(grpc_error_set_int( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_INDEX, 1)); - while (state.KeepRunning()) { + for (auto _ : state) { intptr_t value; grpc_error_get_int(error.get(), GRPC_ERROR_INT_OFFSET, &value); } @@ -145,7 +145,7 @@ static void BM_ErrorGetPresentInt(benchmark::State& state) { TrackCounters track_counters; ErrorPtr error(grpc_error_set_int( GRPC_ERROR_CREATE_FROM_STATIC_STRING("Error"), GRPC_ERROR_INT_OFFSET, 1)); - while (state.KeepRunning()) { + for (auto _ : state) { intptr_t value; grpc_error_get_int(error.get(), GRPC_ERROR_INT_OFFSET, &value); } @@ -224,7 +224,7 @@ class ErrorWithNestedGrpcStatus { template static void BM_ErrorStringOnNewError(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { Fixture fixture; grpc_error_string(fixture.error()); } @@ -235,7 +235,7 @@ template static void BM_ErrorStringRepeatedly(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_error_string(fixture.error()); } track_counters.Finish(state); @@ -246,7 +246,7 @@ static void BM_ErrorGetStatus(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_status_code status; grpc_slice slice; grpc_error_get_status(fixture.error(), fixture.deadline(), &status, &slice, @@ -261,7 +261,7 @@ static void BM_ErrorGetStatusCode(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_status_code status; grpc_error_get_status(fixture.error(), fixture.deadline(), &status, nullptr, nullptr, nullptr); @@ -275,7 +275,7 @@ static void BM_ErrorHttpError(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_http2_error_code error; grpc_error_get_status(fixture.error(), fixture.deadline(), nullptr, nullptr, &error, nullptr); @@ -288,7 +288,7 @@ template static void BM_HasClearGrpcStatus(benchmark::State& state) { TrackCounters track_counters; Fixture fixture; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_error_has_clear_grpc_status(fixture.error()); } track_counters.Finish(state); diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index d472363eb87..d6ccee5ceef 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -30,7 +30,7 @@ static void BM_SliceFromStatic(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize(grpc_core::ExternallyManagedSlice("abc")); } track_counters.Finish(state); @@ -39,7 +39,7 @@ BENCHMARK(BM_SliceFromStatic); static void BM_SliceFromCopied(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { grpc_slice_unref(grpc_core::UnmanagedMemorySlice("abc")); } track_counters.Finish(state); @@ -49,7 +49,7 @@ BENCHMARK(BM_SliceFromCopied); static void BM_SliceIntern(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExternallyManagedSlice slice("abc"); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_slice_unref(grpc_core::ManagedMemorySlice(&slice)); } track_counters.Finish(state); @@ -60,7 +60,7 @@ static void BM_SliceReIntern(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExternallyManagedSlice static_slice("abc"); grpc_core::ManagedMemorySlice slice(&static_slice); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_slice_unref(grpc_core::ManagedMemorySlice(&slice)); } track_counters.Finish(state); @@ -69,7 +69,7 @@ BENCHMARK(BM_SliceReIntern); static void BM_SliceInternStaticMetadata(benchmark::State& state) { TrackCounters track_counters; - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize(grpc_core::ManagedMemorySlice(&GRPC_MDSTR_GZIP)); } track_counters.Finish(state); @@ -79,7 +79,7 @@ BENCHMARK(BM_SliceInternStaticMetadata); static void BM_SliceInternEqualToStaticMetadata(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExternallyManagedSlice slice("gzip"); - while (state.KeepRunning()) { + for (auto _ : state) { benchmark::DoNotOptimize(grpc_core::ManagedMemorySlice(&slice)); } track_counters.Finish(state); @@ -91,7 +91,7 @@ static void BM_MetadataFromNonInternedSlices(benchmark::State& state) { grpc_core::ExternallyManagedSlice k("key"); grpc_core::ExternallyManagedSlice v("value"); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -104,7 +104,7 @@ static void BM_MetadataFromInternedSlices(benchmark::State& state) { grpc_core::ManagedMemorySlice k("key"); grpc_core::ManagedMemorySlice v("value"); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -121,7 +121,7 @@ static void BM_MetadataFromInternedSlicesAlreadyInIndex( grpc_core::ManagedMemorySlice v("value"); grpc_core::ExecCtx exec_ctx; grpc_mdelem seed = grpc_mdelem_create(k, v, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } GRPC_MDELEM_UNREF(seed); @@ -137,7 +137,7 @@ static void BM_MetadataFromInternedKey(benchmark::State& state) { grpc_core::ManagedMemorySlice k("key"); grpc_core::ExternallyManagedSlice v("value"); grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create(k, v, nullptr)); } @@ -153,7 +153,7 @@ static void BM_MetadataFromNonInternedSlicesWithBackingStore( grpc_core::ExternallyManagedSlice v("value"); char backing_store[sizeof(grpc_mdelem_data)]; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast(backing_store))); } @@ -169,7 +169,7 @@ static void BM_MetadataFromInternedSlicesWithBackingStore( grpc_core::ManagedMemorySlice v("value"); char backing_store[sizeof(grpc_mdelem_data)]; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast(backing_store))); } @@ -187,7 +187,7 @@ static void BM_MetadataFromInternedKeyWithBackingStore( grpc_core::ExternallyManagedSlice v("value"); char backing_store[sizeof(grpc_mdelem_data)]; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(grpc_mdelem_create( k, v, reinterpret_cast(backing_store))); } @@ -200,7 +200,7 @@ BENCHMARK(BM_MetadataFromInternedKeyWithBackingStore); static void BM_MetadataFromStaticMetadataStrings(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF( grpc_mdelem_create(GRPC_MDSTR_STATUS, GRPC_MDSTR_200, nullptr)); } @@ -213,7 +213,7 @@ static void BM_MetadataFromStaticMetadataStringsNotIndexed( benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF( grpc_mdelem_create(GRPC_MDSTR_STATUS, GRPC_MDSTR_GZIP, nullptr)); } @@ -230,7 +230,7 @@ static void BM_MetadataRefUnrefExternal(benchmark::State& state) { grpc_mdelem_create(grpc_core::ExternallyManagedSlice("a"), grpc_core::ExternallyManagedSlice("b"), reinterpret_cast(backing_store)); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(GRPC_MDELEM_REF(el)); } GRPC_MDELEM_UNREF(el); @@ -249,7 +249,7 @@ static void BM_MetadataRefUnrefInterned(benchmark::State& state) { k, v, reinterpret_cast(backing_store)); grpc_slice_unref(k); grpc_slice_unref(v); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(GRPC_MDELEM_REF(el)); } GRPC_MDELEM_UNREF(el); @@ -264,7 +264,7 @@ static void BM_MetadataRefUnrefAllocated(benchmark::State& state) { grpc_mdelem el = grpc_mdelem_create(grpc_core::ExternallyManagedSlice("a"), grpc_core::ExternallyManagedSlice("b"), nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(GRPC_MDELEM_REF(el)); } GRPC_MDELEM_UNREF(el); @@ -278,7 +278,7 @@ static void BM_MetadataRefUnrefStatic(benchmark::State& state) { grpc_core::ExecCtx exec_ctx; grpc_mdelem el = grpc_mdelem_create(GRPC_MDSTR_STATUS, GRPC_MDSTR_200, nullptr); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_MDELEM_UNREF(GRPC_MDELEM_REF(el)); } GRPC_MDELEM_UNREF(el); diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index f8e36f178e4..c360f02d466 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -53,7 +53,7 @@ static void BM_CreateDestroyPollset(benchmark::State& state) { grpc_closure shutdown_ps_closure; GRPC_CLOSURE_INIT(&shutdown_ps_closure, shutdown_ps, ps, grpc_schedule_on_exec_ctx); - while (state.KeepRunning()) { + for (auto _ : state) { memset(ps, 0, ps_sz); grpc_pollset_init(ps, &mu); gpr_mu_lock(mu); @@ -84,7 +84,7 @@ static void BM_PollEmptyPollset_SpeedOfLight(benchmark::State& state) { ev.events = EPOLLIN; epoll_ctl(epfd, EPOLL_CTL_ADD, fds.back(), &ev); } - while (state.KeepRunning()) { + for (auto _ : state) { epoll_wait(epfd, ev, nev, 0); } for (auto fd : fds) { @@ -115,7 +115,7 @@ static void BM_PollEmptyPollset(benchmark::State& state) { grpc_pollset_init(ps, &mu); grpc_core::ExecCtx exec_ctx; gpr_mu_lock(mu); - while (state.KeepRunning()) { + for (auto _ : state) { GRPC_ERROR_UNREF(grpc_pollset_work(ps, nullptr, 0)); } grpc_closure shutdown_ps_closure; @@ -140,7 +140,7 @@ static void BM_PollAddFd(benchmark::State& state) { GPR_ASSERT( GRPC_LOG_IF_ERROR("wakeup_fd_init", grpc_wakeup_fd_init(&wakeup_fd))); grpc_fd* fd = grpc_fd_create(wakeup_fd.read_fd, "xxx", false); - while (state.KeepRunning()) { + for (auto _ : state) { grpc_pollset_add_fd(ps, fd); grpc_core::ExecCtx::Get()->Flush(); } @@ -188,7 +188,7 @@ static void BM_SingleThreadPollOneFd_SpeedOfLight(benchmark::State& state) { int fd = eventfd(0, EFD_NONBLOCK); ev[0].events = EPOLLIN; epoll_ctl(epfd, EPOLL_CTL_ADD, fd, &ev[0]); - while (state.KeepRunning()) { + for (auto _ : state) { int err; do { err = eventfd_write(fd, 1); diff --git a/test/cpp/microbenchmarks/bm_timer.cc b/test/cpp/microbenchmarks/bm_timer.cc index 53aaead992d..7a493df5826 100644 --- a/test/cpp/microbenchmarks/bm_timer.cc +++ b/test/cpp/microbenchmarks/bm_timer.cc @@ -43,7 +43,7 @@ static void BM_InitCancelTimer(benchmark::State& state) { grpc_core::ExecCtx exec_ctx; std::vector timer_closures(kTimerCount); int i = 0; - while (state.KeepRunning()) { + for (auto _ : state) { TimerClosure* timer_closure = &timer_closures[i++ % kTimerCount]; GRPC_CLOSURE_INIT(&timer_closure->closure, [](void* /*args*/, grpc_error* /*err*/) {}, nullptr, @@ -71,7 +71,7 @@ static void BM_TimerBatch(benchmark::State& state) { TrackCounters track_counters; grpc_core::ExecCtx exec_ctx; std::vector timer_closures(kTimerCount); - while (state.KeepRunning()) { + for (auto _ : state) { for (grpc_millis deadline = start; deadline != end; deadline += increment) { TimerClosure* timer_closure = &timer_closures[deadline % kTimerCount]; GRPC_CLOSURE_INIT(&timer_closure->closure, diff --git a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h index f399949a32f..db9be84fefb 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h @@ -65,7 +65,7 @@ static void BM_StreamingPingPong(benchmark::State& state) { std::unique_ptr stub( EchoTestService::NewStub(fixture->channel())); - while (state.KeepRunning()) { + for (auto _ : state) { ServerContext svr_ctx; ServerContextMutator svr_ctx_mut(&svr_ctx); ServerAsyncReaderWriter response_rw(&svr_ctx); @@ -180,7 +180,7 @@ static void BM_StreamingPingPongMsgs(benchmark::State& state) { need_tags &= ~(1 << i); } - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); request_rw->Write(send_request, tag(0)); // Start client send response_rw.Read(&recv_request, tag(1)); // Start server recv @@ -262,7 +262,7 @@ static void BM_StreamingPingPongWithCoalescingApi(benchmark::State& state) { std::unique_ptr stub( EchoTestService::NewStub(fixture->channel())); - while (state.KeepRunning()) { + for (auto _ : state) { ServerContext svr_ctx; ServerContextMutator svr_ctx_mut(&svr_ctx); ServerAsyncReaderWriter response_rw(&svr_ctx); diff --git a/test/cpp/microbenchmarks/fullstack_streaming_pump.h b/test/cpp/microbenchmarks/fullstack_streaming_pump.h index 3623e373f6f..cf72710ccb9 100644 --- a/test/cpp/microbenchmarks/fullstack_streaming_pump.h +++ b/test/cpp/microbenchmarks/fullstack_streaming_pump.h @@ -67,7 +67,7 @@ static void BM_PumpStreamClientToServer(benchmark::State& state) { need_tags &= ~(1 << i); } response_rw.Read(&recv_request, tag(0)); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); request_rw->Write(send_request, tag(1)); while (true) { @@ -136,7 +136,7 @@ static void BM_PumpStreamServerToClient(benchmark::State& state) { need_tags &= ~(1 << i); } request_rw->Read(&recv_response, tag(0)); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); response_rw.Write(send_response, tag(1)); while (true) { diff --git a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h index 843c8e14862..604e0ed511e 100644 --- a/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/fullstack_unary_ping_pong.h @@ -71,7 +71,7 @@ static void BM_UnaryPingPong(benchmark::State& state) { fixture->cq(), tag(1)); std::unique_ptr stub( EchoTestService::NewStub(fixture->channel())); - while (state.KeepRunning()) { + for (auto _ : state) { GPR_TIMER_SCOPE("BenchmarkCycle", 0); recv_response.Clear(); ClientContext cli_ctx; diff --git a/test/cpp/microbenchmarks/noop-benchmark.cc b/test/cpp/microbenchmarks/noop-benchmark.cc index 96605215dc6..49ffbf84bef 100644 --- a/test/cpp/microbenchmarks/noop-benchmark.cc +++ b/test/cpp/microbenchmarks/noop-benchmark.cc @@ -22,7 +22,7 @@ #include static void BM_NoOp(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } } BENCHMARK(BM_NoOp); From 88f5f130dd78bb18f683e7d410f427211500934a Mon Sep 17 00:00:00 2001 From: Steven E Wright Date: Thu, 29 Aug 2019 12:00:02 -0700 Subject: [PATCH 060/120] Fix `shorten-64-to-32` warning in `GRPCChannel` Per: https://github.com/grpc/grpc/issues/20122 this change avoids the `shorten-64-to-32` warning by calling the correct `NSNumber` factory method for an `NSUInteger` (the base type for the `GRPCCompressionAlgorithm` enum) --- src/objective-c/GRPCClient/private/GRPCChannel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 1a79fb04a0d..2081d0534fa 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -103,7 +103,7 @@ if (_callOptions.compressionAlgorithm != GRPC_COMPRESS_NONE) { args[@GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM] = - [NSNumber numberWithInt:_callOptions.compressionAlgorithm]; + [NSNumber numberWithInteger:_callOptions.compressionAlgorithm]; } if (_callOptions.keepaliveInterval != 0) { From 9c4de3a983f54a23cbf574356c55be3704ce19f6 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 29 Aug 2019 12:16:36 -0700 Subject: [PATCH 061/120] Move reference to external workspace to OSS-specific file --- BUILD | 8 +++----- bazel/grpc_build_system.bzl | 7 +++++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index e489bc2584a..d911050b1be 100644 --- a/BUILD +++ b/BUILD @@ -31,6 +31,7 @@ load( "grpc_cc_library", "grpc_generate_one_off_targets", "grpc_upb_proto_library", + "python_config_settings", ) config_setting( @@ -63,11 +64,6 @@ config_setting( values = {"cpu": "x64_windows_msvc"}, ) -config_setting( - name = "python3", - flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, -) - config_setting( name = "mac_x86_64", values = {"cpu": "darwin"}, @@ -78,6 +74,8 @@ config_setting( values = {"define": "GRPC_USE_CPP_STD_LIB=1"}, ) +python_config_settings() + # This should be updated along with build.yaml g_stands_for = "ganges" diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f4777e50bc1..74a9c66ff67 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -342,3 +342,10 @@ def grpc_objc_library( def grpc_upb_proto_library(name, deps): upb_proto_library(name = name, deps = deps) + +def python_config_settings(): + native.config_setting( + name = "python3", + flag_values = {"@bazel_tools//tools/python:python_version": "PY3"}, + ) + From aa2a65faedd62be2024e270a88f1001b3f5b2f80 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 29 Aug 2019 14:08:52 -0700 Subject: [PATCH 062/120] Remove call from queued picks when failing it due to channel destruction --- src/core/ext/filters/client_channel/client_channel.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 3272bc3ffed..8a0fabfa6fd 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -3881,6 +3881,7 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { GRPC_ERROR_UNREF(result.error); GRPC_CLOSURE_SCHED(&calld->pick_closure_, GRPC_ERROR_REF(disconnect_error)); + if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); break; } // If wait_for_ready is false, then the error indicates the RPC From 32801fb5eb1b5f50e9282a563eb6226ce602b855 Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Thu, 29 Aug 2019 14:11:05 -0700 Subject: [PATCH 063/120] Remove build target for microbenchmark --- test/cpp/microbenchmarks/BUILD | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index fdae8246c31..b8e9b14d4b4 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -27,14 +27,6 @@ grpc_cc_test( deps = ["//test/core/util:grpc_test_util"], ) -grpc_cc_binary( - name = "bm_chttp2_transport", - testonly = 1, - srcs = ["bm_chttp2_transport.cc"], - tags = ["no_windows"], - deps = [":helpers"], -) - grpc_cc_library( name = "helpers", testonly = 1, From d1dae7d9d8cac4366766ca625d902060fa17cd9e Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 29 Aug 2019 16:50:42 -0700 Subject: [PATCH 064/120] Log errors in ALTS handshaker message op completion cb --- src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc index 917d375fd82..c5383b3a0ba 100644 --- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc @@ -251,7 +251,14 @@ static void on_handshaker_service_resp_recv(void* arg, grpc_error* error) { gpr_log(GPR_ERROR, "ALTS handshaker client is nullptr"); return; } - alts_handshaker_client_handle_response(client, true); + bool success = true; + if (error != GRPC_ERROR_NONE) { + gpr_log(GPR_ERROR, + "ALTS handshaker on_handshaker_service_resp_recv error: %s", + grpc_error_string(error)); + success = false; + } + alts_handshaker_client_handle_response(client, success); } /* gRPC provided callback used when dedicatd CQ and thread are used. From d2b5fd75f05eb4cc391c39888fb1a15c73ac040b Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Tue, 27 Aug 2019 17:35:49 -0700 Subject: [PATCH 065/120] Added test for time jumps --- test/cpp/common/BUILD | 13 ++ test/cpp/common/time_jump_test.cc | 128 ++++++++++++++++++ .../internal_ci/macos/grpc_run_bazel_tests.sh | 13 +- 3 files changed, 145 insertions(+), 9 deletions(-) create mode 100644 test/cpp/common/time_jump_test.cc diff --git a/test/cpp/common/BUILD b/test/cpp/common/BUILD index f0d0e9a6223..c31eb10344e 100644 --- a/test/cpp/common/BUILD +++ b/test/cpp/common/BUILD @@ -42,6 +42,19 @@ grpc_cc_test( ], ) +grpc_cc_test( + name = "time_jump_test", + srcs = ["time_jump_test.cc"], + external_deps = [ + "gtest", + ], + tags = ["manual"], + deps = [ + "//:grpc++", + "//test/core/util:grpc_test_util", + ], +) + grpc_cc_test( name = "auth_property_iterator_test", srcs = ["auth_property_iterator_test.cc"], diff --git a/test/cpp/common/time_jump_test.cc b/test/cpp/common/time_jump_test.cc new file mode 100644 index 00000000000..86bf012f7c0 --- /dev/null +++ b/test/cpp/common/time_jump_test.cc @@ -0,0 +1,128 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "src/core/lib/gprpp/sync.h" +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/iomgr/timer_manager.h" +#include "test/core/util/test_config.h" + +extern char** environ; + +void run_cmd(const char* cmd) { + pid_t pid; + const char* argv[] = {const_cast("sh"), + const_cast("-c"), cmd, nullptr}; + int status; + + status = posix_spawn(&pid, const_cast("/bin/sh"), nullptr, + nullptr, const_cast(argv), environ); + if (status == 0) { + if (waitpid(pid, &status, 0) == -1) { + perror("waitpid"); + } + } +} + +class TimeJumpTest : public ::testing::TestWithParam { + protected: + void SetUp() override { grpc_init(); } + void TearDown() override { + run_cmd("sudo sntp -sS pool.ntp.org"); + grpc_shutdown_blocking(); + } + + const int kWaitTimeMs = 1500; +}; + +std::vector CreateTestScenarios() { + return {"-1M", "+1M", "-1H", "+1H", "-1d", "+1d", "-1y", "+1y"}; +} +INSTANTIATE_TEST_CASE_P(TimeJump, TimeJumpTest, + ::testing::ValuesIn(CreateTestScenarios())); + +TEST_P(TimeJumpTest, TimerRunning) { + grpc_core::ExecCtx exec_ctx; + grpc_timer timer; + grpc_timer_init(&timer, grpc_core::ExecCtx::Get()->Now() + 3000, + GRPC_CLOSURE_CREATE( + [](void*, grpc_error* error) { + GPR_ASSERT(error == GRPC_ERROR_CANCELLED); + }, + nullptr, grpc_schedule_on_exec_ctx)); + gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100)); + std::ostringstream cmd; + cmd << "sudo date `date -v" << GetParam() << " \"+%m%d%H%M%y\"`"; + run_cmd(cmd.str().c_str()); + gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(kWaitTimeMs)); + // We expect 1 wakeup/sec when there are not timer expiries + int64_t wakeups = grpc_timer_manager_get_wakeups_testonly(); + gpr_log(GPR_DEBUG, "wakeups: %" PRId64 "", wakeups); + GPR_ASSERT(wakeups <= 3); + grpc_timer_cancel(&timer); +} + +TEST_P(TimeJumpTest, TimedWait) { + grpc_core::CondVar cond; + grpc_core::Mutex mu; + { + grpc_core::MutexLock lock(&mu); + std::thread thd = std::thread([]() { + gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100)); + std::ostringstream cmd; + cmd << "sudo date `date -v" << GetParam() << " \"+%m%d%H%M%y\"`"; + run_cmd(cmd.str().c_str()); + }); + gpr_timespec before = gpr_now(GPR_CLOCK_MONOTONIC); + int timedout = cond.Wait( + &mu, grpc_millis_to_timespec(kWaitTimeMs, GPR_CLOCK_REALTIME)); + gpr_timespec after = gpr_now(GPR_CLOCK_MONOTONIC); + int32_t elapsed_ms = gpr_time_to_millis(gpr_time_sub(after, before)); + gpr_log(GPR_DEBUG, "After wait, timedout = %d elapsed_ms = %d", timedout, + elapsed_ms); + GPR_ASSERT(1 == timedout); + GPR_ASSERT(1 == + gpr_time_similar(gpr_time_sub(after, before), + gpr_time_from_millis(kWaitTimeMs, GPR_TIMESPAN), + gpr_time_from_millis(10, GPR_TIMESPAN))); + + thd.join(); + } + // We expect 1 wakeup/sec when there are not timer expiries + int64_t wakeups = grpc_timer_manager_get_wakeups_testonly(); + gpr_log(GPR_DEBUG, "wakeups: %" PRId64 "", wakeups); + GPR_ASSERT(wakeups <= 3); +} + +int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/tools/internal_ci/macos/grpc_run_bazel_tests.sh b/tools/internal_ci/macos/grpc_run_bazel_tests.sh index d3db59e9379..aaa2dc3f63c 100644 --- a/tools/internal_ci/macos/grpc_run_bazel_tests.sh +++ b/tools/internal_ci/macos/grpc_run_bazel_tests.sh @@ -18,18 +18,13 @@ set -ex # change to grpc repo root cd $(dirname $0)/../../.. -# Download bazel -temp_dir="$(mktemp -d)" -wget -q https://github.com/bazelbuild/bazel/releases/download/0.26.0/bazel-0.26.0-darwin-x86_64 -O "${temp_dir}/bazel" -chmod 755 "${temp_dir}/bazel" -export PATH="${temp_dir}:${PATH}" -# This should show ${temp_dir}/bazel -which bazel - ./tools/run_tests/start_port_server.py # run cfstream_test separately because it messes with the network -bazel test $RUN_TESTS_FLAGS --spawn_strategy=standalone --genrule_strategy=standalone --test_output=all //test/cpp/end2end:cfstream_test +tools/bazel test $RUN_TESTS_FLAGS --spawn_strategy=standalone --genrule_strategy=standalone --test_output=all //test/cpp/end2end:cfstream_test + +# run time_jump_test separately because it changes system time +tools/bazel test $RUN_TESTS_FLAGS --spawn_strategy=standalone --genrule_strategy=standalone --test_output=all //test/cpp/common:time_jump_test # kill port_server.py to prevent the build from hanging ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 From 65eb9c9ddb188bddaf5b2a1fa2f04812903b7337 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 30 Aug 2019 08:14:44 -0700 Subject: [PATCH 066/120] Revert "Test message size of 100MB" --- test/core/util/test_config.cc | 4 --- test/core/util/test_config.h | 3 -- test/cpp/end2end/async_end2end_test.cc | 38 ++++---------------------- 3 files changed, 6 insertions(+), 39 deletions(-) diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index 5033dc7b66a..5b248a01daa 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -342,10 +342,6 @@ bool BuiltUnderUbsan() { #endif } -bool grpc_test_built_under_tsan_or_msan() { - return BuiltUnderTsan() || BuiltUnderMsan(); -}; - int64_t grpc_test_sanitizer_slowdown_factor() { int64_t sanitizer_multiplier = 1; if (BuiltUnderValgrind()) { diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 905d61f1dd6..112af3176f9 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -24,9 +24,6 @@ extern int64_t g_fixture_slowdown_factor; extern int64_t g_poller_slowdown_factor; -/* Returns if the test is built under TSAN or MSAN. */ -bool grpc_test_built_under_tsan_or_msan(); - /* Returns an appropriate scaling factor for timeouts. */ int64_t grpc_test_slowdown_factor(); diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 879f16815ee..6ca0edf123e 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -34,7 +34,6 @@ #include "src/core/ext/filters/client_channel/backup_poller.h" #include "src/core/lib/gpr/tls.h" -#include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/port.h" #include "src/proto/grpc/health/v1/health.grpc.pb.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" @@ -60,18 +59,6 @@ namespace testing { namespace { -const size_t MAX_TEST_MESSAGE_SIZE = -#if defined(GPR_APPLE) - // The test will time out with macos build. - GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH; -#else - // Don't test extreme size under tsan or msan, because it uses too much - // memory. - grpc_test_built_under_tsan_or_msan() - ? GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH - : GPR_MAX(100 * 1024 * 1024, GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH); -#endif - void* tag(int i) { return (void*)static_cast(i); } int detag(void* p) { return static_cast(reinterpret_cast(p)); } @@ -231,17 +218,6 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { } }; -class ServerBuilderMaxRecvMessageSizeOption - : public ::grpc::ServerBuilderOption { - public: - void UpdateArguments(ChannelArguments* arg) override { - arg->SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, -1); - } - - void UpdatePlugins( - std::vector>* plugins) override {} -}; - class TestScenario { public: TestScenario(bool inproc_stub, const grpc::string& creds_type, bool hcs, @@ -314,9 +290,6 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { std::unique_ptr sync_plugin_disabler( new ServerBuilderSyncPluginDisabler()); builder.SetOption(move(sync_plugin_disabler)); - std::unique_ptr max_recv_option( - new ServerBuilderMaxRecvMessageSizeOption()); - builder.SetOption(move(max_recv_option)); server_ = builder.BuildAndStart(); } @@ -324,7 +297,6 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { ChannelArguments args; auto channel_creds = GetCredentialsProvider()->GetChannelCredentials( GetParam().credentials_type, &args); - args.SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, -1); std::shared_ptr channel = !(GetParam().inproc) ? ::grpc::CreateCustomChannel( server_address_.str(), channel_creds, args) @@ -1850,7 +1822,7 @@ TEST_P(AsyncEnd2endServerTryCancelTest, ServerBidiStreamingTryCancelAfter) { } std::vector CreateTestScenarios(bool test_secure, - bool test_big_message) { + bool test_message_size_limit) { std::vector scenarios; std::vector credentials_types; std::vector messages; @@ -1872,8 +1844,9 @@ std::vector CreateTestScenarios(bool test_secure, GPR_ASSERT(!credentials_types.empty()); messages.push_back("Hello"); - if (test_big_message) { - for (size_t k = 1; k < MAX_TEST_MESSAGE_SIZE / 1024; k *= 32) { + if (test_message_size_limit) { + for (size_t k = 1; k < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH / 1024; + k *= 32) { grpc::string big_msg; for (size_t i = 0; i < k * 1024; ++i) { char c = 'a' + (i % 26); @@ -1881,7 +1854,8 @@ std::vector CreateTestScenarios(bool test_secure, } messages.push_back(big_msg); } - messages.push_back(grpc::string(MAX_TEST_MESSAGE_SIZE - 10, 'a')); + messages.push_back( + grpc::string(GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH - 10, 'a')); } // TODO (sreek) Renable tests with health check service after the issue From fa7bdff69f6de851e5b34f9bb112cee7618baa84 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 28 Aug 2019 16:32:00 -0700 Subject: [PATCH 067/120] Fix buffer-overflow in grpc_static_mdelem_for_static_strings --- src/core/lib/transport/static_metadata.cc | 7 +------ tools/codegen/core/gen_static_metadata.py | 3 +-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/lib/transport/static_metadata.cc b/src/core/lib/transport/static_metadata.cc index bd6ff09c80d..f412edb1efe 100644 --- a/src/core/lib/transport/static_metadata.cc +++ b/src/core/lib/transport/static_metadata.cc @@ -1217,12 +1217,7 @@ static const uint16_t elem_keys[] = { 9076, 9185, 9294, 9403, 9512, 9621, 6242, 9730, 9839, 9948, 10057, 10166, 1189, 538, 10275, 10384, 212, 10493, 1195, 1196, 1197, 1198, 1080, 10602, 1843, 11365, 0, 0, 0, 1734, 0, 1850, 0, - 0, 0, 356, 1627, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 356, 1627}; static const uint8_t elem_idxs[] = { 7, 8, 9, 10, 11, 12, 13, 76, 78, 71, 1, 2, 5, 6, 25, 3, 4, 66, 65, 30, 83, 62, 63, 67, 61, 73, 57, 37, 14, 19, 21, 22, diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 4ac8f9dada7..8560fa47657 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -627,7 +627,6 @@ def perfect_hash(keys, name): return x + p.r[y] return { - 'PHASHRANGE': p.t - 1 + max(p.r), 'PHASHNKEYS': len(p.slots), 'pyfunc': f, 'code': """ @@ -659,7 +658,7 @@ elem_keys = [ elem_hash = perfect_hash(elem_keys, 'elems') print >> C, elem_hash['code'] -keys = [0] * int(elem_hash['PHASHRANGE']) +keys = [0] * int(elem_hash['PHASHNKEYS']) idxs = [255] * int(elem_hash['PHASHNKEYS']) for i, k in enumerate(elem_keys): h = elem_hash['pyfunc'](k) From 2e1cb0d91a3c8c2d2e818d5ea0dfd806cb5f7440 Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Fri, 30 Aug 2019 11:36:46 -0700 Subject: [PATCH 068/120] Don't run time_jump_test under sanitizers --- test/cpp/common/time_jump_test.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/cpp/common/time_jump_test.cc b/test/cpp/common/time_jump_test.cc index 86bf012f7c0..ea6711dfce3 100644 --- a/test/cpp/common/time_jump_test.cc +++ b/test/cpp/common/time_jump_test.cc @@ -53,10 +53,20 @@ void run_cmd(const char* cmd) { class TimeJumpTest : public ::testing::TestWithParam { protected: - void SetUp() override { grpc_init(); } + void SetUp() override { + // Skip test if slowdown factor > 1 + if (grpc_test_slowdown_factor() != 1) { + GTEST_SKIP(); + } else { + grpc_init(); + } + } void TearDown() override { - run_cmd("sudo sntp -sS pool.ntp.org"); - grpc_shutdown_blocking(); + // Skip test if slowdown factor > 1 + if (grpc_test_slowdown_factor() == 1) { + run_cmd("sudo sntp -sS pool.ntp.org"); + grpc_shutdown_blocking(); + } } const int kWaitTimeMs = 1500; From b436758b14fa15200089ca42216f4a41fd0902ca Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Fri, 28 Jun 2019 17:11:02 -0700 Subject: [PATCH 069/120] Added documentation for C++ tests on iOS --- test/cpp/README-iOS.md | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/cpp/README-iOS.md diff --git a/test/cpp/README-iOS.md b/test/cpp/README-iOS.md new file mode 100644 index 00000000000..898931085b3 --- /dev/null +++ b/test/cpp/README-iOS.md @@ -0,0 +1,52 @@ +## C++ tests on iOS + +[GTMGoogleTestRunner](https://github.com/google/google-toolbox-for-mac/blob/master/UnitTesting/GTMGoogleTestRunner.mm) is used to convert googletest cases to XCTest that can be run on iOS. GTMGoogleTestRunner doesn't execute the `main` function, so we can't have any test logic in `main`. +However, it's ok to call `::testing::InitGoogleTest` in `main`, as `GTMGoogleTestRunner` [calls InitGoogleTest](https://github.com/google/google-toolbox-for-mac/blob/master/UnitTesting/GTMGoogleTestRunner.mm#L151). +`grpc::testing::TestEnvironment` can also be called from `main`, as it does some test initialization (install crash handler, seed RNG) that's not strictly required to run testcases on iOS. + + +## Porting exising C++ tests to run on iOS + +Please follow these guidelines when porting tests to run on iOS: + +- Tests need to use the googletest framework +- Any setup/teardown code in `main` needs to be moved to `SetUpTestCase`/`TearDownTestCase`, and `TEST` needs to be changed to `TEST_F`. +- [Death tests](https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-tests) are not supported on iOS, so use the `*_IF_SUPPORTED()` macros to ensure that your code compiles on iOS. + +For example, the following test +```c++ +TEST(MyTest, TestOne) { + ASSERT_DEATH(ThisShouldDie(), ""); +} + +int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + grpc_init(); + return RUN_ALL_TESTS(); + grpc_shutdown(); +} +``` + +should be changed to +```c++ +class MyTest : public ::testing::Test { + protected: + static void SetUpTestCase() { grpc_init(); } + static void TearDownTestCase() { grpc_shutdown(); } +}; + +TEST_F(MyTest, TestOne) { + ASSERT_DEATH_IF_SUPPORTED(ThisShouldDie(), ""); +} + +int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} +``` + +## Limitations + +Due to a [limitation](https://github.com/google/google-toolbox-for-mac/blob/master/UnitTesting/GTMGoogleTestRunner.mm#L48-L56) in GTMGoogleTestRunner, `SetUpTestCase`/`TeardownTestCase` will be called before/after *every* individual test case, similar to `SetUp`/`TearDown`. From 3c6bb96a1fbc07a59e4def4600e5e0249e98ab53 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 30 Aug 2019 12:12:26 -0700 Subject: [PATCH 070/120] Add test for static elements --- test/core/transport/BUILD | 14 ++++++ test/core/transport/static_metadata_test.cc | 51 +++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 test/core/transport/static_metadata_test.cc diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index f38ecf2f66b..44e4fcb978e 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -82,6 +82,20 @@ grpc_cc_test( ], ) +grpc_cc_test( + name = "static_metadata_test", + srcs = ["static_metadata_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], +) + grpc_cc_test( name = "status_conversion_test", srcs = ["status_conversion_test.cc"], diff --git a/test/core/transport/static_metadata_test.cc b/test/core/transport/static_metadata_test.cc new file mode 100644 index 00000000000..6d3d5ef5c37 --- /dev/null +++ b/test/core/transport/static_metadata_test.cc @@ -0,0 +1,51 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +#include + +#include "src/core/lib/transport/metadata.h" +#include "src/core/lib/transport/static_metadata.h" +#include "test/core/util/test_config.h" + +namespace grpc_core { +namespace { + +TEST(StaticMetadataTest, ReadAllStaticElements) { + // This makes sure that all static elements are returned when + // grpc_mdelem_from_slices is called with key pairs pregenerated. + for (int i = 0; i < GRPC_STATIC_MDELEM_COUNT; i++) { + const grpc_mdelem mdelem = grpc_static_mdelem_manifested()[i]; + const grpc_mdelem mdelem2 = + grpc_mdelem_from_slices(GRPC_MDKEY(mdelem), GRPC_MDVALUE(mdelem)); + EXPECT_EQ(mdelem.payload, mdelem2.payload); + } +} + +} // namespace +} // namespace grpc_core + +int main(int argc, char** argv) { + grpc_init(); + grpc::testing::TestEnvironment env(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + int retval = RUN_ALL_TESTS(); + grpc_shutdown(); + return retval; +} From a96cbbd592af2f705402b28e3f0337cff54d7d27 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 28 Aug 2019 16:39:08 -0700 Subject: [PATCH 071/120] Fix ubsan on InternNewStringLocked --- src/core/lib/slice/slice_intern.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/lib/slice/slice_intern.cc b/src/core/lib/slice/slice_intern.cc index d813e5195ad..369135c9eac 100644 --- a/src/core/lib/slice/slice_intern.cc +++ b/src/core/lib/slice/slice_intern.cc @@ -208,7 +208,11 @@ static InternedSliceRefcount* InternNewStringLocked(slice_shard* shard, InternedSliceRefcount* s = static_cast(gpr_malloc(sizeof(*s) + len)); new (s) grpc_core::InternedSliceRefcount(len, hash, shard->strs[shard_idx]); - memcpy(reinterpret_cast(s + 1), buffer, len); + // TODO(arjunroy): Investigate why hpack tried to intern the nullptr string. + // https://github.com/grpc/grpc/pull/20110#issuecomment-526729282 + if (len > 0) { + memcpy(reinterpret_cast(s + 1), buffer, len); + } shard->strs[shard_idx] = s; shard->count++; if (shard->count > shard->capacity * 2) { From e6ffb2c3bb97046605de54d4a74516d728aa6ae4 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 30 Aug 2019 14:36:35 -0700 Subject: [PATCH 072/120] Replace direct closure callback calls with GRPC_CLOSURE_SCHED --- src/core/ext/transport/chttp2/server/chttp2_server.cc | 2 +- src/core/lib/iomgr/tcp_posix.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 5e9cd77d18a..c0ae64eb2cc 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -266,7 +266,7 @@ static void tcp_server_shutdown_complete(void* arg, grpc_error* error) { // may do a synchronous unref. grpc_core::ExecCtx::Get()->Flush(); if (destroy_done != nullptr) { - destroy_done->cb(destroy_done->cb_arg, GRPC_ERROR_REF(error)); + GRPC_CLOSURE_SCHED(destroy_done, GRPC_ERROR_REF(error)); grpc_core::ExecCtx::Get()->Flush(); } grpc_channel_args_destroy(state->args); diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 498aecc069b..f0c591d1c6d 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -1020,7 +1020,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) { if (error != GRPC_ERROR_NONE) { cb = tcp->write_cb; tcp->write_cb = nullptr; - cb->cb(cb->cb_arg, error); + GRPC_CLOSURE_SCHED(cb, error); TCP_UNREF(tcp, "write"); return; } From 3476df0b5021b7517d8c756ffdffc771349e8964 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 30 Aug 2019 15:04:06 -0700 Subject: [PATCH 073/120] Add in ref to error --- src/core/lib/iomgr/tcp_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index f0c591d1c6d..571c7d229f2 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -1020,7 +1020,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) { if (error != GRPC_ERROR_NONE) { cb = tcp->write_cb; tcp->write_cb = nullptr; - GRPC_CLOSURE_SCHED(cb, error); + GRPC_CLOSURE_SCHED(cb, GRPC_ERROR_REF(error)); TCP_UNREF(tcp, "write"); return; } From 7315e75ce6c8cea17196f9c0f907187caa851437 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 30 Aug 2019 15:25:50 -0700 Subject: [PATCH 074/120] Add comments --- src/core/lib/iomgr/tcp_posix.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc index 571c7d229f2..b6d1381298a 100644 --- a/src/core/lib/iomgr/tcp_posix.cc +++ b/src/core/lib/iomgr/tcp_posix.cc @@ -1030,6 +1030,8 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) { gpr_log(GPR_INFO, "write: delayed"); } notify_on_write(tcp); + // tcp_flush does not populate error if it has returned false. + GPR_DEBUG_ASSERT(error == GRPC_ERROR_NONE); } else { cb = tcp->write_cb; tcp->write_cb = nullptr; @@ -1037,6 +1039,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) { const char* str = grpc_error_string(error); gpr_log(GPR_INFO, "write: %s", str); } + // No need to take a ref on error since tcp_flush provides a ref. GRPC_CLOSURE_SCHED(cb, error); TCP_UNREF(tcp, "write"); } From d6498800441e68e22854ee7daf94cadb709ffac9 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 30 Aug 2019 16:39:02 -0700 Subject: [PATCH 075/120] Add strip_prefix to python protoc plugin and py_grpc_library --- bazel/python_rules.bzl | 11 +++++- examples/python/debug/get_stats.py | 9 ++--- src/compiler/generator_helpers.h | 9 ++--- src/compiler/python_generator.cc | 35 ++++++++++++++++--- .../grpc_channelz/v1/BUILD.bazel | 1 + .../grpc_channelz/v1/channelz.py | 9 ++--- .../grpc_health/v1/BUILD.bazel | 1 + .../grpc_health/v1/health.py | 9 ++--- .../grpc_reflection/v1alpha/BUILD.bazel | 1 + .../grpc_reflection/v1alpha/reflection.py | 11 ++---- .../tests/channelz/_channelz_servicer_test.py | 12 ++----- .../health_check/_health_servicer_test.py | 12 ++----- .../reflection/_reflection_servicer_test.py | 12 ++----- 13 files changed, 66 insertions(+), 66 deletions(-) diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 12f51f8b172..0cdd2b9739c 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -93,11 +93,13 @@ def _generate_pb2_grpc_src_impl(context): proto_root = get_proto_root(context.label.workspace_root) out_files = declare_out_files(protos, context, _GENERATED_GRPC_PROTO_FORMAT) + plugin_flags = ["grpc_2_0"] + context.attr.strip_prefixes + arguments = [] tools = [context.executable._protoc, context.executable._plugin] arguments += get_plugin_args( context.executable._plugin, - [], + plugin_flags, context.genfiles_dir.path, False, ) @@ -127,6 +129,7 @@ _generate_pb2_grpc_src = rule( allow_empty = False, providers = [ProtoInfo], ), + "strip_prefixes": attr.string_list(), "_plugin": attr.label( executable = True, providers = ["files_to_run"], @@ -147,6 +150,7 @@ def py_grpc_library( name, srcs, deps, + strip_prefixes = [], **kwargs): """Generate python code for gRPC services defined in a protobuf. @@ -156,6 +160,10 @@ def py_grpc_library( schema of the service. deps: (List of `labels`) a single py_proto_library target for the proto_library in `srcs`. + strip_prefixes: (List of `strings`) If provided, this prefix will be + 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. """ codegen_grpc_target = "_{}_grpc_codegen".format(name) if len(srcs) != 1: @@ -167,6 +175,7 @@ def py_grpc_library( _generate_pb2_grpc_src( name = codegen_grpc_target, deps = srcs, + strip_prefixes = strip_prefixes, **kwargs ) diff --git a/examples/python/debug/get_stats.py b/examples/python/debug/get_stats.py index 2da51d0efcf..d8cb08df55e 100644 --- a/examples/python/debug/get_stats.py +++ b/examples/python/debug/get_stats.py @@ -21,13 +21,8 @@ import logging import argparse import grpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2 - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2_grpc -except ImportError: - from grpc_channelz.v1 import channelz_pb2 - from grpc_channelz.v1 import channelz_pb2_grpc +from grpc_channelz.v1 import channelz_pb2 +from grpc_channelz.v1 import channelz_pb2_grpc def run(addr): diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 747096f0657..0f261fb5a83 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -168,10 +168,11 @@ inline MethodType GetMethodType( inline void Split(const grpc::string& s, char delim, std::vector* append_to) { - std::istringstream iss(s); - grpc::string piece; - while (std::getline(iss, piece)) { - append_to->push_back(piece); + auto current = s.begin(); + while (current <= s.end()) { + auto next = std::find(current, s.end(), delim); + append_to->emplace_back(current, next); + current = next + 1; } } diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 705aef1c884..7afb2c532e0 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -756,6 +756,28 @@ static bool GenerateGrpc(GeneratorContext* context, PrivateGenerator& generator, } } +static bool ParseParameters(const grpc::string& parameter, + grpc::string* grpc_version, + std::vector* strip_prefixes, + grpc::string* error) { + std::vector comma_delimited_parameters; + grpc_generator::Split(parameter, ',', &comma_delimited_parameters); + if (comma_delimited_parameters.empty()) { + *grpc_version = "grpc_2_0"; + } else if (comma_delimited_parameters.size() == 1) { + *grpc_version = comma_delimited_parameters[0]; + } else if (comma_delimited_parameters.size() == 2) { + *grpc_version = comma_delimited_parameters[0]; + std::copy(comma_delimited_parameters.begin() + 1, + comma_delimited_parameters.end(), + std::back_inserter(*strip_prefixes)); + } else { + *error = "--grpc_python_out received too many comma-delimited parameters."; + return false; + } + return true; +} + bool PythonGrpcGenerator::Generate(const FileDescriptor* file, const grpc::string& parameter, GeneratorContext* context, @@ -778,14 +800,19 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file, generator_file_name = file->name(); ProtoBufFile pbfile(file); - PrivateGenerator generator(config_, &pbfile); - if (parameter == "" || parameter == "grpc_2_0") { + grpc::string grpc_version; + GeneratorConfiguration extended_config(config_); + bool success = ParseParameters(parameter, &grpc_version, + &(extended_config.prefixes_to_filter), error); + PrivateGenerator generator(extended_config, &pbfile); + if (!success) return false; + if (grpc_version == "grpc_2_0") { return GenerateGrpc(context, generator, pb2_grpc_file_name, true); - } else if (parameter == "grpc_1_0") { + } else if (grpc_version == "grpc_1_0") { return GenerateGrpc(context, generator, pb2_grpc_file_name, true) && GenerateGrpc(context, generator, pb2_file_name, false); } else { - *error = "Invalid parameter '" + parameter + "'."; + *error = "Invalid grpc version '" + grpc_version + "'."; return false; } } diff --git a/src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel b/src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel index 5f4e512e9f4..c034297ff2d 100644 --- a/src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel +++ b/src/python/grpcio_channelz/grpc_channelz/v1/BUILD.bazel @@ -10,6 +10,7 @@ py_grpc_library( name = "channelz_py_pb2_grpc", srcs = ["//src/proto/grpc/channelz:channelz_proto_descriptors"], deps = [":channelz_py_pb2"], + strip_prefixes = ["src.python.grpcio_channelz."], ) py_library( diff --git a/src/python/grpcio_channelz/grpc_channelz/v1/channelz.py b/src/python/grpcio_channelz/grpc_channelz/v1/channelz.py index 965797f89ec..00eca311dc1 100644 --- a/src/python/grpcio_channelz/grpc_channelz/v1/channelz.py +++ b/src/python/grpcio_channelz/grpc_channelz/v1/channelz.py @@ -16,13 +16,8 @@ import grpc from grpc._cython import cygrpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2 as _channelz_pb2 - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2_grpc as _channelz_pb2_grpc -except ImportError: - import grpc_channelz.v1.channelz_pb2 as _channelz_pb2 - import grpc_channelz.v1.channelz_pb2_grpc as _channelz_pb2_grpc +import grpc_channelz.v1.channelz_pb2 as _channelz_pb2 +import grpc_channelz.v1.channelz_pb2_grpc as _channelz_pb2_grpc from google.protobuf import json_format diff --git a/src/python/grpcio_health_checking/grpc_health/v1/BUILD.bazel b/src/python/grpcio_health_checking/grpc_health/v1/BUILD.bazel index 62a44df7707..a3e2c7dfe3d 100644 --- a/src/python/grpcio_health_checking/grpc_health/v1/BUILD.bazel +++ b/src/python/grpcio_health_checking/grpc_health/v1/BUILD.bazel @@ -10,6 +10,7 @@ py_grpc_library( name = "health_py_pb2_grpc", srcs = ["//src/proto/grpc/health/v1:health_proto_descriptor",], deps = [":health_py_pb2"], + strip_prefixes = ["src.python.grpcio_health_checking."], ) py_library( diff --git a/src/python/grpcio_health_checking/grpc_health/v1/health.py b/src/python/grpcio_health_checking/grpc_health/v1/health.py index a0d55570990..15494fafdbc 100644 --- a/src/python/grpcio_health_checking/grpc_health/v1/health.py +++ b/src/python/grpcio_health_checking/grpc_health/v1/health.py @@ -18,13 +18,8 @@ import threading import grpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_health_checking.grpc_health.v1 import health_pb2 as _health_pb2 - from src.python.grpcio_health_checking.grpc_health.v1 import health_pb2_grpc as _health_pb2_grpc -except ImportError: - from grpc_health.v1 import health_pb2 as _health_pb2 - from grpc_health.v1 import health_pb2_grpc as _health_pb2_grpc +from grpc_health.v1 import health_pb2 as _health_pb2 +from grpc_health.v1 import health_pb2_grpc as _health_pb2_grpc SERVICE_NAME = _health_pb2.DESCRIPTOR.services_by_name['Health'].full_name diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel index 10077fd9568..bad54d06c63 100644 --- a/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel +++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/BUILD.bazel @@ -12,6 +12,7 @@ py_grpc_library( name = "reflection_py_pb2_grpc", srcs = ["//src/proto/grpc/reflection/v1alpha:reflection_proto_descriptor",], deps = ["reflection_py_pb2"], + strip_prefixes = ["src.python.grpcio_reflection."], ) py_library( diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py index 61153d9d625..6df1a364269 100644 --- a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py +++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py @@ -17,15 +17,8 @@ import grpc from google.protobuf import descriptor_pb2 from google.protobuf import descriptor_pool -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_reflection.grpc_reflection.v1alpha \ - import reflection_pb2 as _reflection_pb2 - from src.python.grpcio_reflection.grpc_reflection.v1alpha \ - import reflection_pb2_grpc as _reflection_pb2_grpc -except ImportError: - from grpc_reflection.v1alpha import reflection_pb2 as _reflection_pb2 - from grpc_reflection.v1alpha import reflection_pb2_grpc as _reflection_pb2_grpc +from grpc_reflection.v1alpha import reflection_pb2 as _reflection_pb2 +from grpc_reflection.v1alpha import reflection_pb2_grpc as _reflection_pb2_grpc _POOL = descriptor_pool.Default() SERVICE_NAME = _reflection_pb2.DESCRIPTOR.services_by_name[ diff --git a/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py b/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py index f2357a4e4a3..48d25e99e35 100644 --- a/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py +++ b/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py @@ -19,15 +19,9 @@ from concurrent import futures import grpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2 - from src.python.grpcio_channelz.grpc_channelz.v1 import channelz_pb2_grpc -except ImportError: - from grpc_channelz.v1 import channelz - from grpc_channelz.v1 import channelz_pb2 - from grpc_channelz.v1 import channelz_pb2_grpc +from grpc_channelz.v1 import channelz +from grpc_channelz.v1 import channelz_pb2 +from grpc_channelz.v1 import channelz_pb2_grpc from tests.unit import test_common from tests.unit.framework.common import test_constants diff --git a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py index 428806c71b0..8faffb448c3 100644 --- a/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py +++ b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py @@ -20,15 +20,9 @@ import unittest import grpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_health_checking.grpc_health.v1 import health - from src.python.grpcio_health_checking.grpc_health.v1 import health_pb2 - from src.python.grpcio_health_checking.grpc_health.v1 import health_pb2_grpc -except ImportError: - from grpc_health.v1 import health - from grpc_health.v1 import health_pb2 - from grpc_health.v1 import health_pb2_grpc +from grpc_health.v1 import health +from grpc_health.v1 import health_pb2 +from grpc_health.v1 import health_pb2_grpc from tests.unit import test_common from tests.unit import thread_pool diff --git a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py index e45f98abec6..169e55022da 100644 --- a/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py +++ b/src/python/grpcio_tests/tests/reflection/_reflection_servicer_test.py @@ -17,15 +17,9 @@ import unittest import grpc -# TODO(https://github.com/grpc/grpc/issues/19863): Remove. -try: - from src.python.grpcio_reflection.grpc_reflection.v1alpha import reflection - from src.python.grpcio_reflection.grpc_reflection.v1alpha import reflection_pb2 - from src.python.grpcio_reflection.grpc_reflection.v1alpha import reflection_pb2_grpc -except ImportError: - from grpc_reflection.v1alpha import reflection - from grpc_reflection.v1alpha import reflection_pb2 - from grpc_reflection.v1alpha import reflection_pb2_grpc +from grpc_reflection.v1alpha import reflection +from grpc_reflection.v1alpha import reflection_pb2 +from grpc_reflection.v1alpha import reflection_pb2_grpc from google.protobuf import descriptor_pool from google.protobuf import descriptor_pb2 From 358676db444d84db7412c695101c6b2f0e9774fd Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 30 Aug 2019 17:53:41 -0700 Subject: [PATCH 076/120] Alright. We'll do our own thing then --- src/compiler/generator_helpers.h | 9 ++++----- src/compiler/python_generator.cc | 2 +- src/compiler/python_generator_helpers.h | 10 ++++++++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 0f261fb5a83..747096f0657 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -168,11 +168,10 @@ inline MethodType GetMethodType( inline void Split(const grpc::string& s, char delim, std::vector* append_to) { - auto current = s.begin(); - while (current <= s.end()) { - auto next = std::find(current, s.end(), delim); - append_to->emplace_back(current, next); - current = next + 1; + std::istringstream iss(s); + grpc::string piece; + while (std::getline(iss, piece)) { + append_to->push_back(piece); } } diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 7afb2c532e0..0e76c95aed4 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -761,7 +761,7 @@ static bool ParseParameters(const grpc::string& parameter, std::vector* strip_prefixes, grpc::string* error) { std::vector comma_delimited_parameters; - grpc_generator::Split(parameter, ',', &comma_delimited_parameters); + grpc_python_generator::Split(parameter, ',', &comma_delimited_parameters); if (comma_delimited_parameters.empty()) { *grpc_version = "grpc_2_0"; } else if (comma_delimited_parameters.size() == 1) { diff --git a/src/compiler/python_generator_helpers.h b/src/compiler/python_generator_helpers.h index 171dd730a24..862292db475 100644 --- a/src/compiler/python_generator_helpers.h +++ b/src/compiler/python_generator_helpers.h @@ -136,6 +136,16 @@ StringVector get_all_comments(const DescriptorType* descriptor) { return comments; } +inline void Split(const grpc::string& s, char delim, + std::vector* append_to) { + auto current = s.begin(); + while (current <= s.end()) { + auto next = std::find(current, s.end(), delim); + append_to->emplace_back(current, next); + current = next + 1; + } +} + } // namespace } // namespace grpc_python_generator From e6fe85bc2ddb12bf2960fd27dc6f90a0e29d3ec5 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 30 Aug 2019 18:20:49 -0700 Subject: [PATCH 077/120] Properly handle default case --- src/compiler/python_generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 0e76c95aed4..f553d9e7a3c 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -762,7 +762,8 @@ static bool ParseParameters(const grpc::string& parameter, grpc::string* error) { std::vector comma_delimited_parameters; grpc_python_generator::Split(parameter, ',', &comma_delimited_parameters); - if (comma_delimited_parameters.empty()) { + if (comma_delimited_parameters.size() == 1 && + comma_delimited_parameters.empty()) { *grpc_version = "grpc_2_0"; } else if (comma_delimited_parameters.size() == 1) { *grpc_version = comma_delimited_parameters[0]; From 8274502af8142a4581a199d94f451e1efe8c1c91 Mon Sep 17 00:00:00 2001 From: Brian Zhao Date: Sun, 1 Sep 2019 23:01:30 -0700 Subject: [PATCH 078/120] Windows's STACKFRAME Frame Addr should be RBP, the base pointer, not RSP, the stack pointer. This is documented here: https://docs.microsoft.com/en-us/windows/win32/api/dbghelp/ns-dbghelp-stackframe with the comment "AddrFrame x64: The frame pointer is RBP or RDI." Note that this is also what StackWalker uses: https://github.com/JochenKalmbach/StackWalker#initializing-the-stackframe64 and what Chromium uses: https://codesearch.chromium.org/chromium/src/v8/src/base/debug/stack_trace_win.cc?l=200&rcl=69d20d247f62a3378d15ce0956ed8bf9665e6a44 release notes: no --- test/core/util/test_config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index 5033dc7b66a..2216328dc08 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -114,7 +114,7 @@ static void print_stack_from_context(CONTEXT c) { imageType = IMAGE_FILE_MACHINE_AMD64; s.AddrPC.Offset = c.Rip; s.AddrPC.Mode = AddrModeFlat; - s.AddrFrame.Offset = c.Rsp; + s.AddrFrame.Offset = c.Rbp; s.AddrFrame.Mode = AddrModeFlat; s.AddrStack.Offset = c.Rsp; s.AddrStack.Mode = AddrModeFlat; From 7b2c253530c9675148e552d2761a0a8f28daed60 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 10:57:36 -0400 Subject: [PATCH 079/120] Revert "only generate full or lite client, never both" This reverts commit 1b8418b5460a63c331288cd475db7198cb2c494a. --- src/compiler/csharp_generator.cc | 56 +++++++++++++++++--------------- src/compiler/csharp_generator.h | 4 +-- src/compiler/csharp_plugin.cc | 12 +++---- 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index d7ba4f2636a..7f178f63bb0 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -176,8 +176,9 @@ std::string GetServiceClassName(const ServiceDescriptor* service) { return service->name(); } -std::string GetClientClassName(const ServiceDescriptor* service) { - return service->name() + "Client"; +std::string GetClientClassName(const ServiceDescriptor* service, + bool lite_client) { + return service->name() + (lite_client ? "LiteClient" : "Client"); } std::string GetServerClassName(const ServiceDescriptor* service) { @@ -420,28 +421,26 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, out->Print("/// Client for $servicename$\n", "servicename", GetServiceClassName(service)); out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n", - "name", GetClientClassName(service)); + "name", GetClientClassName(service, lite_client)); } else { out->Print("/// Lite client for $servicename$\n", "servicename", GetServiceClassName(service)); out->Print("public partial class $name$ : grpc::LiteClientBase\n", "name", - GetClientClassName(service)); + GetClientClassName(service, lite_client)); } out->Print("{\n"); out->Indent(); // constructors - if (!lite_client) { - out->Print( - "/// Creates a new client for $servicename$\n" - "/// The channel to use to make remote " - "calls.\n", - "servicename", GetServiceClassName(service)); - out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n", - "name", GetClientClassName(service)); - out->Print("{\n"); - out->Print("}\n"); - } + out->Print( + "/// Creates a new client for $servicename$\n" + "/// The channel to use to make remote " + "calls.\n", + "servicename", GetServiceClassName(service)); + out->Print("public $name$(grpc::ChannelBase channel) : base(channel)\n", + "name", GetClientClassName(service)); + out->Print("{\n"); + out->Print("}\n"); out->Print( "/// Creates a new client for $servicename$ that uses a custom " "CallInvoker.\n" @@ -450,14 +449,14 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, "servicename", GetServiceClassName(service)); out->Print( "public $name$(grpc::CallInvoker callInvoker) : base(callInvoker)\n", - "name", GetClientClassName(service)); + "name", GetClientClassName(service, lite_client)); out->Print("{\n"); out->Print("}\n"); out->Print( "/// Protected parameterless constructor to allow creation" " of test doubles.\n"); out->Print("protected $name$() : base()\n", "name", - GetClientClassName(service)); + GetClientClassName(service, lite_client)); out->Print("{\n"); out->Print("}\n"); if (!lite_client) { @@ -469,7 +468,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, out->Print( "protected $name$(ClientBaseConfiguration configuration)" " : base(configuration)\n", - "name", GetClientClassName(service)); + "name", GetClientClassName(service, lite_client)); out->Print("{\n"); out->Print("}\n"); } @@ -598,11 +597,11 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, out->Print( "protected override $name$ NewInstance(ClientBaseConfiguration " "configuration)\n", - "name", GetClientClassName(service)); + "name", GetClientClassName(service, lite_client)); out->Print("{\n"); out->Indent(); out->Print("return new $name$(configuration);\n", "name", - GetClientClassName(service)); + GetClientClassName(service, lite_client)); out->Outdent(); out->Print("}\n"); } @@ -686,8 +685,8 @@ void GenerateBindServiceWithBinderMethod(Printer* out, } void GenerateService(Printer* out, const ServiceDescriptor* service, - bool generate_client, bool generate_server, - bool internal_access, bool lite_client) { + bool generate_client, bool generate_lite_client, + bool generate_server, bool internal_access) { GenerateDocCommentBody(out, service); out->Print("$access_level$ static partial class $classname$\n", "access_level", GetAccessLevel(internal_access), "classname", @@ -709,7 +708,10 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, GenerateServerClass(out, service); } if (generate_client) { - GenerateClientStub(out, service, lite_client); + GenerateClientStub(out, service, false); + } + if (generate_lite_client) { + GenerateClientStub(out, service, true); } if (generate_server) { @@ -724,8 +726,8 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, } // anonymous namespace grpc::string GetServices(const FileDescriptor* file, bool generate_client, - bool generate_server, bool internal_access, - bool lite_client) { + bool generate_lite_client, bool generate_server, + bool internal_access) { grpc::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -766,8 +768,8 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client, out.Indent(); } for (int i = 0; i < file->service_count(); i++) { - GenerateService(&out, file->service(i), generate_client, generate_server, - internal_access, lite_client); + GenerateService(&out, file->service(i), generate_client, + generate_lite_client, generate_server, internal_access); } if (file_namespace != "") { out.Outdent(); diff --git a/src/compiler/csharp_generator.h b/src/compiler/csharp_generator.h index d4c13c67363..842d136494c 100644 --- a/src/compiler/csharp_generator.h +++ b/src/compiler/csharp_generator.h @@ -26,8 +26,8 @@ namespace grpc_csharp_generator { grpc::string GetServices(const grpc::protobuf::FileDescriptor* file, - bool generate_client, bool generate_server, - bool internal_access, bool lite_client); + bool generate_client, bool generate_lite_client, + bool generate_server, bool internal_access); } // namespace grpc_csharp_generator diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index c503fd61ded..a495f876792 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -38,19 +38,18 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { bool generate_client = true; bool generate_server = true; + bool generate_lite_client = true; bool internal_access = false; - bool lite_client = false; for (size_t i = 0; i < options.size(); i++) { if (options[i].first == "no_client") { generate_client = false; + } else if (options[i].first == "no_lite_client") { + // TODO: better option + generate_lite_client = false; } else if (options[i].first == "no_server") { generate_server = false; } else if (options[i].first == "internal_access") { internal_access = true; - } else if (options[i].first == "lite_client") { - // will only be used if generate_client is true. - // NOTE: experimental option, can be removed in future release - lite_client = true; } else { *error = "Unknown generator option: " + options[i].first; return false; @@ -58,7 +57,8 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } grpc::string code = grpc_csharp_generator::GetServices( - file, generate_client, generate_server, internal_access, lite_client); + file, generate_client, generate_lite_client, generate_server, + internal_access); if (code.size() == 0) { return true; // don't generate a file if there are no services } From f73c03f47c29b0ef2bfe0f1fb0975ce210bce59a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 10:58:00 -0400 Subject: [PATCH 080/120] Revert "C# lite client codegen" This reverts commit 25e3d26e8cb361692101555cdb199933079cd90f. --- src/compiler/csharp_generator.cc | 96 +++++++++++++------------------- src/compiler/csharp_generator.h | 4 +- src/compiler/csharp_plugin.cc | 7 +-- 3 files changed, 41 insertions(+), 66 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 7f178f63bb0..f630da7c58e 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -176,9 +176,8 @@ std::string GetServiceClassName(const ServiceDescriptor* service) { return service->name(); } -std::string GetClientClassName(const ServiceDescriptor* service, - bool lite_client) { - return service->name() + (lite_client ? "LiteClient" : "Client"); +std::string GetClientClassName(const ServiceDescriptor* service) { + return service->name() + "Client"; } std::string GetServerClassName(const ServiceDescriptor* service) { @@ -415,19 +414,11 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor* service) { out->Print("\n"); } -void GenerateClientStub(Printer* out, const ServiceDescriptor* service, - bool lite_client) { - if (!lite_client) { - out->Print("/// Client for $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n", - "name", GetClientClassName(service, lite_client)); - } else { - out->Print("/// Lite client for $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("public partial class $name$ : grpc::LiteClientBase\n", "name", - GetClientClassName(service, lite_client)); - } +void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { + out->Print("/// Client for $servicename$\n", "servicename", + GetServiceClassName(service)); + out->Print("public partial class $name$ : grpc::ClientBase<$name$>\n", "name", + GetClientClassName(service)); out->Print("{\n"); out->Indent(); @@ -449,30 +440,26 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, "servicename", GetServiceClassName(service)); out->Print( "public $name$(grpc::CallInvoker callInvoker) : base(callInvoker)\n", - "name", GetClientClassName(service, lite_client)); + "name", GetClientClassName(service)); out->Print("{\n"); out->Print("}\n"); out->Print( "/// Protected parameterless constructor to allow creation" " of test doubles.\n"); out->Print("protected $name$() : base()\n", "name", - GetClientClassName(service, lite_client)); + GetClientClassName(service)); out->Print("{\n"); out->Print("}\n"); - if (!lite_client) { - out->Print( - "/// Protected constructor to allow creation of configured " - "clients.\n" - "/// The client " - "configuration.\n"); - out->Print( - "protected $name$(ClientBaseConfiguration configuration)" - " : base(configuration)\n", - "name", GetClientClassName(service, lite_client)); - out->Print("{\n"); - out->Print("}\n"); - } - out->Print("\n"); + out->Print( + "/// Protected constructor to allow creation of configured " + "clients.\n" + "/// The client configuration.\n"); + out->Print( + "protected $name$(ClientBaseConfiguration configuration)" + " : base(configuration)\n", + "name", GetClientClassName(service)); + out->Print("{\n"); + out->Print("}\n\n"); for (int i = 0; i < service->method_count(); i++) { const MethodDescriptor* method = service->method(i); @@ -590,21 +577,19 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service, } // override NewInstance method - if (!lite_client) { - out->Print( - "/// Creates a new instance of client from given " - "ClientBaseConfiguration.\n"); - out->Print( - "protected override $name$ NewInstance(ClientBaseConfiguration " - "configuration)\n", - "name", GetClientClassName(service, lite_client)); - out->Print("{\n"); - out->Indent(); - out->Print("return new $name$(configuration);\n", "name", - GetClientClassName(service, lite_client)); - out->Outdent(); - out->Print("}\n"); - } + out->Print( + "/// Creates a new instance of client from given " + "ClientBaseConfiguration.\n"); + out->Print( + "protected override $name$ NewInstance(ClientBaseConfiguration " + "configuration)\n", + "name", GetClientClassName(service)); + out->Print("{\n"); + out->Indent(); + out->Print("return new $name$(configuration);\n", "name", + GetClientClassName(service)); + out->Outdent(); + out->Print("}\n"); out->Outdent(); out->Print("}\n"); @@ -685,8 +670,8 @@ void GenerateBindServiceWithBinderMethod(Printer* out, } void GenerateService(Printer* out, const ServiceDescriptor* service, - bool generate_client, bool generate_lite_client, - bool generate_server, bool internal_access) { + bool generate_client, bool generate_server, + bool internal_access) { GenerateDocCommentBody(out, service); out->Print("$access_level$ static partial class $classname$\n", "access_level", GetAccessLevel(internal_access), "classname", @@ -708,12 +693,8 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, GenerateServerClass(out, service); } if (generate_client) { - GenerateClientStub(out, service, false); - } - if (generate_lite_client) { - GenerateClientStub(out, service, true); + GenerateClientStub(out, service); } - if (generate_server) { GenerateBindServiceMethod(out, service); GenerateBindServiceWithBinderMethod(out, service); @@ -726,8 +707,7 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, } // anonymous namespace grpc::string GetServices(const FileDescriptor* file, bool generate_client, - bool generate_lite_client, bool generate_server, - bool internal_access) { + bool generate_server, bool internal_access) { grpc::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -768,8 +748,8 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client, out.Indent(); } for (int i = 0; i < file->service_count(); i++) { - GenerateService(&out, file->service(i), generate_client, - generate_lite_client, generate_server, internal_access); + GenerateService(&out, file->service(i), generate_client, generate_server, + internal_access); } if (file_namespace != "") { out.Outdent(); diff --git a/src/compiler/csharp_generator.h b/src/compiler/csharp_generator.h index 842d136494c..fd36e11851b 100644 --- a/src/compiler/csharp_generator.h +++ b/src/compiler/csharp_generator.h @@ -26,8 +26,8 @@ namespace grpc_csharp_generator { grpc::string GetServices(const grpc::protobuf::FileDescriptor* file, - bool generate_client, bool generate_lite_client, - bool generate_server, bool internal_access); + bool generate_client, bool generate_server, + bool internal_access); } // namespace grpc_csharp_generator diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index a495f876792..5f13aa6749e 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -38,14 +38,10 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { bool generate_client = true; bool generate_server = true; - bool generate_lite_client = true; bool internal_access = false; for (size_t i = 0; i < options.size(); i++) { if (options[i].first == "no_client") { generate_client = false; - } else if (options[i].first == "no_lite_client") { - // TODO: better option - generate_lite_client = false; } else if (options[i].first == "no_server") { generate_server = false; } else if (options[i].first == "internal_access") { @@ -57,8 +53,7 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } grpc::string code = grpc_csharp_generator::GetServices( - file, generate_client, generate_lite_client, generate_server, - internal_access); + file, generate_client, generate_server, internal_access); if (code.size() == 0) { return true; // don't generate a file if there are no services } From 28f031f915e0a7b326f4845b868bd2b35f7f3ed3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 11:12:11 -0400 Subject: [PATCH 081/120] Revert "also generate code with "lite_client" option set" This reverts commit 4a4cf280a1d5f8690ee063a22a6b4b1d1d49f27f. --- .../math_with_protoc_options.proto | 65 ------------------- src/csharp/generate_proto_csharp.sh | 2 - 2 files changed, 67 deletions(-) delete mode 100644 src/csharp/Grpc.Examples/math_with_protoc_options.proto diff --git a/src/csharp/Grpc.Examples/math_with_protoc_options.proto b/src/csharp/Grpc.Examples/math_with_protoc_options.proto deleted file mode 100644 index ca13c6d4466..00000000000 --- a/src/csharp/Grpc.Examples/math_with_protoc_options.proto +++ /dev/null @@ -1,65 +0,0 @@ - -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package math_with_protoc_options; - -message DivArgs { - int64 dividend = 1; - int64 divisor = 2; -} - -message DivReply { - int64 quotient = 1; - int64 remainder = 2; -} - -message FibArgs { - int64 limit = 1; -} - -message Num { - int64 num = 1; -} - -message FibReply { - int64 count = 1; -} - -service Math { - // Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - // and remainder. - rpc Div (DivArgs) returns (DivReply) { - } - - // DivMany accepts an arbitrary number of division args from the client stream - // and sends back the results in the reply stream. The stream continues until - // the client closes its end; the server does the same after sending all the - // replies. The stream ends immediately if either end aborts. - rpc DivMany (stream DivArgs) returns (stream DivReply) { - } - - // Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib - // generates up to limit numbers; otherwise it continues until the call is - // canceled. Unlike Fib above, Fib has no final FibReply. - rpc Fib (FibArgs) returns (stream Num) { - } - - // Sum sums a stream of numbers, returning the final result once the stream - // is closed. - rpc Sum (stream Num) returns (Num) { - } -} diff --git a/src/csharp/generate_proto_csharp.sh b/src/csharp/generate_proto_csharp.sh index 81463ace6ad..e79728ff959 100755 --- a/src/csharp/generate_proto_csharp.sh +++ b/src/csharp/generate_proto_csharp.sh @@ -26,8 +26,6 @@ TESTING_DIR=src/csharp/Grpc.IntegrationTesting $PROTOC --plugin=$PLUGIN --csharp_out=$EXAMPLES_DIR --grpc_out=$EXAMPLES_DIR \ -I src/proto src/proto/math/math.proto -$PROTOC --plugin=$PLUGIN --csharp_out=$EXAMPLES_DIR --grpc_out=$EXAMPLES_DIR --grpc_opt=lite_client,no_server \ - -I src/csharp/Grpc.Examples src/csharp/Grpc.Examples/math_with_protoc_options.proto $PROTOC --plugin=$PLUGIN --csharp_out=$HEALTHCHECK_DIR --grpc_out=$HEALTHCHECK_DIR \ -I src/proto src/proto/grpc/health/v1/health.proto From e84d0a2875b4e10b217fcf140a2cec8475b0a0e6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 11:15:32 -0400 Subject: [PATCH 082/120] remove LiteClientBase --- src/csharp/Grpc.Core.Api/LiteClientBase.cs | 63 ---------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/csharp/Grpc.Core.Api/LiteClientBase.cs diff --git a/src/csharp/Grpc.Core.Api/LiteClientBase.cs b/src/csharp/Grpc.Core.Api/LiteClientBase.cs deleted file mode 100644 index 132f10a912f..00000000000 --- a/src/csharp/Grpc.Core.Api/LiteClientBase.cs +++ /dev/null @@ -1,63 +0,0 @@ -#region Copyright notice and license - -// Copyright 2019 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#endregion - -using System; -using Grpc.Core.Internal; -using Grpc.Core.Utils; - -namespace Grpc.Core -{ - /// - /// Base class for lightweight client-side stubs. - /// All calls are invoked via a CallInvoker. - /// Lite client stubs have no configuration knobs, all configuration - /// is provided by decorating the call invoker. - /// Note: experimental API that can change or be removed without any prior notice. - /// - public abstract class LiteClientBase - { - readonly CallInvoker callInvoker; - - /// - /// Initializes a new instance of LiteClientBase class that - /// throws NotImplementedException upon invocation of any RPC. - /// This constructor is only provided to allow creation of test doubles - /// for client classes (e.g. mocking requires a parameterless constructor). - /// - protected LiteClientBase() : this(new UnimplementedCallInvoker()) - { - } - - /// - /// Initializes a new instance of ClientBase class. - /// - /// The CallInvoker for remote call invocation. - public LiteClientBase(CallInvoker callInvoker) - { - this.callInvoker = GrpcPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); - } - - /// - /// Gets the call invoker. - /// - protected CallInvoker CallInvoker - { - get { return this.callInvoker; } - } - } -} From 3a6042b824170fbca329aa07a8137b9359a7432a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 11:22:08 -0400 Subject: [PATCH 083/120] regenerate C# protos --- .../Grpc.IntegrationTesting/Messages.cs | 137 +++++++++++++++--- 1 file changed, 113 insertions(+), 24 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/Messages.cs b/src/csharp/Grpc.IntegrationTesting/Messages.cs index 5c5042b75b6..dab90d8ae46 100644 --- a/src/csharp/Grpc.IntegrationTesting/Messages.cs +++ b/src/csharp/Grpc.IntegrationTesting/Messages.cs @@ -28,7 +28,7 @@ namespace Grpc.Testing { "LnRlc3RpbmciGgoJQm9vbFZhbHVlEg0KBXZhbHVlGAEgASgIIkAKB1BheWxv", "YWQSJwoEdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXlsb2FkVHlwZRIM", "CgRib2R5GAIgASgMIisKCkVjaG9TdGF0dXMSDAoEY29kZRgBIAEoBRIPCgdt", - "ZXNzYWdlGAIgASgJIuYCCg1TaW1wbGVSZXF1ZXN0EjAKDXJlc3BvbnNlX3R5", + "ZXNzYWdlGAIgASgJIoYDCg1TaW1wbGVSZXF1ZXN0EjAKDXJlc3BvbnNlX3R5", "cGUYASABKA4yGS5ncnBjLnRlc3RpbmcuUGF5bG9hZFR5cGUSFQoNcmVzcG9u", "c2Vfc2l6ZRgCIAEoBRImCgdwYXlsb2FkGAMgASgLMhUuZ3JwYy50ZXN0aW5n", "LlBheWxvYWQSFQoNZmlsbF91c2VybmFtZRgEIAEoCBIYChBmaWxsX29hdXRo", @@ -36,34 +36,38 @@ namespace Grpc.Testing { "cnBjLnRlc3RpbmcuQm9vbFZhbHVlEjEKD3Jlc3BvbnNlX3N0YXR1cxgHIAEo", "CzIYLmdycGMudGVzdGluZy5FY2hvU3RhdHVzEjIKEWV4cGVjdF9jb21wcmVz", "c2VkGAggASgLMhcuZ3JwYy50ZXN0aW5nLkJvb2xWYWx1ZRIWCg5maWxsX3Nl", - "cnZlcl9pZBgJIAEoCCJyCg5TaW1wbGVSZXNwb25zZRImCgdwYXlsb2FkGAEg", - "ASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQSEAoIdXNlcm5hbWUYAiABKAkS", - "EwoLb2F1dGhfc2NvcGUYAyABKAkSEQoJc2VydmVyX2lkGAQgASgJIncKGVN0", - "cmVhbWluZ0lucHV0Q2FsbFJlcXVlc3QSJgoHcGF5bG9hZBgBIAEoCzIVLmdy", - "cGMudGVzdGluZy5QYXlsb2FkEjIKEWV4cGVjdF9jb21wcmVzc2VkGAIgASgL", - "MhcuZ3JwYy50ZXN0aW5nLkJvb2xWYWx1ZSI9ChpTdHJlYW1pbmdJbnB1dENh", - "bGxSZXNwb25zZRIfChdhZ2dyZWdhdGVkX3BheWxvYWRfc2l6ZRgBIAEoBSJk", - "ChJSZXNwb25zZVBhcmFtZXRlcnMSDAoEc2l6ZRgBIAEoBRITCgtpbnRlcnZh", - "bF91cxgCIAEoBRIrCgpjb21wcmVzc2VkGAMgASgLMhcuZ3JwYy50ZXN0aW5n", - "LkJvb2xWYWx1ZSLoAQoaU3RyZWFtaW5nT3V0cHV0Q2FsbFJlcXVlc3QSMAoN", - "cmVzcG9uc2VfdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXlsb2FkVHlw", - "ZRI9ChNyZXNwb25zZV9wYXJhbWV0ZXJzGAIgAygLMiAuZ3JwYy50ZXN0aW5n", - "LlJlc3BvbnNlUGFyYW1ldGVycxImCgdwYXlsb2FkGAMgASgLMhUuZ3JwYy50", - "ZXN0aW5nLlBheWxvYWQSMQoPcmVzcG9uc2Vfc3RhdHVzGAcgASgLMhguZ3Jw", - "Yy50ZXN0aW5nLkVjaG9TdGF0dXMiRQobU3RyZWFtaW5nT3V0cHV0Q2FsbFJl", - "c3BvbnNlEiYKB3BheWxvYWQYASABKAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9h", - "ZCIzCg9SZWNvbm5lY3RQYXJhbXMSIAoYbWF4X3JlY29ubmVjdF9iYWNrb2Zm", - "X21zGAEgASgFIjMKDVJlY29ubmVjdEluZm8SDgoGcGFzc2VkGAEgASgIEhIK", - "CmJhY2tvZmZfbXMYAiADKAUqHwoLUGF5bG9hZFR5cGUSEAoMQ09NUFJFU1NB", - "QkxFEABiBnByb3RvMw==")); + "cnZlcl9pZBgJIAEoCBIeChZmaWxsX2dycGNsYl9yb3V0ZV90eXBlGAogASgI", + "IqwBCg5TaW1wbGVSZXNwb25zZRImCgdwYXlsb2FkGAEgASgLMhUuZ3JwYy50", + "ZXN0aW5nLlBheWxvYWQSEAoIdXNlcm5hbWUYAiABKAkSEwoLb2F1dGhfc2Nv", + "cGUYAyABKAkSEQoJc2VydmVyX2lkGAQgASgJEjgKEWdycGNsYl9yb3V0ZV90", + "eXBlGAUgASgOMh0uZ3JwYy50ZXN0aW5nLkdycGNsYlJvdXRlVHlwZSJ3ChlT", + "dHJlYW1pbmdJbnB1dENhbGxSZXF1ZXN0EiYKB3BheWxvYWQYASABKAsyFS5n", + "cnBjLnRlc3RpbmcuUGF5bG9hZBIyChFleHBlY3RfY29tcHJlc3NlZBgCIAEo", + "CzIXLmdycGMudGVzdGluZy5Cb29sVmFsdWUiPQoaU3RyZWFtaW5nSW5wdXRD", + "YWxsUmVzcG9uc2USHwoXYWdncmVnYXRlZF9wYXlsb2FkX3NpemUYASABKAUi", + "ZAoSUmVzcG9uc2VQYXJhbWV0ZXJzEgwKBHNpemUYASABKAUSEwoLaW50ZXJ2", + "YWxfdXMYAiABKAUSKwoKY29tcHJlc3NlZBgDIAEoCzIXLmdycGMudGVzdGlu", + "Zy5Cb29sVmFsdWUi6AEKGlN0cmVhbWluZ091dHB1dENhbGxSZXF1ZXN0EjAK", + "DXJlc3BvbnNlX3R5cGUYASABKA4yGS5ncnBjLnRlc3RpbmcuUGF5bG9hZFR5", + "cGUSPQoTcmVzcG9uc2VfcGFyYW1ldGVycxgCIAMoCzIgLmdycGMudGVzdGlu", + "Zy5SZXNwb25zZVBhcmFtZXRlcnMSJgoHcGF5bG9hZBgDIAEoCzIVLmdycGMu", + "dGVzdGluZy5QYXlsb2FkEjEKD3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdy", + "cGMudGVzdGluZy5FY2hvU3RhdHVzIkUKG1N0cmVhbWluZ091dHB1dENhbGxS", + "ZXNwb25zZRImCgdwYXlsb2FkGAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxv", + "YWQiMwoPUmVjb25uZWN0UGFyYW1zEiAKGG1heF9yZWNvbm5lY3RfYmFja29m", + "Zl9tcxgBIAEoBSIzCg1SZWNvbm5lY3RJbmZvEg4KBnBhc3NlZBgBIAEoCBIS", + "CgpiYWNrb2ZmX21zGAIgAygFKh8KC1BheWxvYWRUeXBlEhAKDENPTVBSRVNT", + "QUJMRRAAKm8KD0dycGNsYlJvdXRlVHlwZRIdChlHUlBDTEJfUk9VVEVfVFlQ", + "RV9VTktOT1dOEAASHgoaR1JQQ0xCX1JPVVRFX1RZUEVfRkFMTEJBQ0sQARId", + "ChlHUlBDTEJfUk9VVEVfVFlQRV9CQUNLRU5EEAJiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.GrpclbRouteType), }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.BoolValue), global::Grpc.Testing.BoolValue.Parser, new[]{ "Value" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompressed", "ResponseStatus", "ExpectCompressed", "FillServerId" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope", "ServerId" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompressed", "ResponseStatus", "ExpectCompressed", "FillServerId", "FillGrpclbRouteType" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope", "ServerId", "GrpclbRouteType" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload", "ExpectCompressed" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs", "Compressed" }, null, null, null), @@ -87,6 +91,29 @@ namespace Grpc.Testing { [pbr::OriginalName("COMPRESSABLE")] Compressable = 0, } + /// + /// The type of route that a client took to reach a server w.r.t. gRPCLB. + /// The server must fill in "fallback" if it detects that the RPC reached + /// the server via the "gRPCLB fallback" path, and "backend" if it detects + /// that the RPC reached the server via "gRPCLB backend" path (i.e. if it got + /// the address of this server from the gRPCLB server BalanceLoad RPC). Exactly + /// how this detection is done is context and server dependant. + /// + public enum GrpclbRouteType { + /// + /// Server didn't detect the route that a client took to reach it. + /// + [pbr::OriginalName("GRPCLB_ROUTE_TYPE_UNKNOWN")] Unknown = 0, + /// + /// Indicates that a client reached a server via gRPCLB fallback. + /// + [pbr::OriginalName("GRPCLB_ROUTE_TYPE_FALLBACK")] Fallback = 1, + /// + /// Indicates that a client reached a server as a gRPCLB-given backend. + /// + [pbr::OriginalName("GRPCLB_ROUTE_TYPE_BACKEND")] Backend = 2, + } + #endregion #region Messages @@ -591,6 +618,7 @@ namespace Grpc.Testing { responseStatus_ = other.responseStatus_ != null ? other.responseStatus_.Clone() : null; expectCompressed_ = other.expectCompressed_ != null ? other.expectCompressed_.Clone() : null; fillServerId_ = other.fillServerId_; + fillGrpclbRouteType_ = other.fillGrpclbRouteType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -729,6 +757,20 @@ namespace Grpc.Testing { } } + /// Field number for the "fill_grpclb_route_type" field. + public const int FillGrpclbRouteTypeFieldNumber = 10; + private bool fillGrpclbRouteType_; + /// + /// Whether SimpleResponse should include grpclb_route_type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool FillGrpclbRouteType { + get { return fillGrpclbRouteType_; } + set { + fillGrpclbRouteType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as SimpleRequest); @@ -751,6 +793,7 @@ namespace Grpc.Testing { if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false; if (!object.Equals(ExpectCompressed, other.ExpectCompressed)) return false; if (FillServerId != other.FillServerId) return false; + if (FillGrpclbRouteType != other.FillGrpclbRouteType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -766,6 +809,7 @@ namespace Grpc.Testing { if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); if (expectCompressed_ != null) hash ^= ExpectCompressed.GetHashCode(); if (FillServerId != false) hash ^= FillServerId.GetHashCode(); + if (FillGrpclbRouteType != false) hash ^= FillGrpclbRouteType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -815,6 +859,10 @@ namespace Grpc.Testing { output.WriteRawTag(72); output.WriteBool(FillServerId); } + if (FillGrpclbRouteType != false) { + output.WriteRawTag(80); + output.WriteBool(FillGrpclbRouteType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -850,6 +898,9 @@ namespace Grpc.Testing { if (FillServerId != false) { size += 1 + 1; } + if (FillGrpclbRouteType != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -900,6 +951,9 @@ namespace Grpc.Testing { if (other.FillServerId != false) { FillServerId = other.FillServerId; } + if (other.FillGrpclbRouteType != false) { + FillGrpclbRouteType = other.FillGrpclbRouteType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -959,6 +1013,10 @@ namespace Grpc.Testing { FillServerId = input.ReadBool(); break; } + case 80: { + FillGrpclbRouteType = input.ReadBool(); + break; + } } } } @@ -997,6 +1055,7 @@ namespace Grpc.Testing { username_ = other.username_; oauthScope_ = other.oauthScope_; serverId_ = other.serverId_; + grpclbRouteType_ = other.grpclbRouteType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1063,6 +1122,20 @@ namespace Grpc.Testing { } } + /// Field number for the "grpclb_route_type" field. + public const int GrpclbRouteTypeFieldNumber = 5; + private global::Grpc.Testing.GrpclbRouteType grpclbRouteType_ = 0; + /// + /// gRPCLB Path. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Grpc.Testing.GrpclbRouteType GrpclbRouteType { + get { return grpclbRouteType_; } + set { + grpclbRouteType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as SimpleResponse); @@ -1080,6 +1153,7 @@ namespace Grpc.Testing { if (Username != other.Username) return false; if (OauthScope != other.OauthScope) return false; if (ServerId != other.ServerId) return false; + if (GrpclbRouteType != other.GrpclbRouteType) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1090,6 +1164,7 @@ namespace Grpc.Testing { if (Username.Length != 0) hash ^= Username.GetHashCode(); if (OauthScope.Length != 0) hash ^= OauthScope.GetHashCode(); if (ServerId.Length != 0) hash ^= ServerId.GetHashCode(); + if (GrpclbRouteType != 0) hash ^= GrpclbRouteType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1119,6 +1194,10 @@ namespace Grpc.Testing { output.WriteRawTag(34); output.WriteString(ServerId); } + if (GrpclbRouteType != 0) { + output.WriteRawTag(40); + output.WriteEnum((int) GrpclbRouteType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1139,6 +1218,9 @@ namespace Grpc.Testing { if (ServerId.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerId); } + if (GrpclbRouteType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GrpclbRouteType); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1165,6 +1247,9 @@ namespace Grpc.Testing { if (other.ServerId.Length != 0) { ServerId = other.ServerId; } + if (other.GrpclbRouteType != 0) { + GrpclbRouteType = other.GrpclbRouteType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1195,6 +1280,10 @@ namespace Grpc.Testing { ServerId = input.ReadString(); break; } + case 40: { + GrpclbRouteType = (global::Grpc.Testing.GrpclbRouteType) input.ReadEnum(); + break; + } } } } From 2ea334a60b6cb9f2a6d750cd7e033441d86c33d1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 11:27:38 -0400 Subject: [PATCH 084/120] remove no-longer-needed generated files --- .../Grpc.Examples/MathWithProtocOptions.cs | 759 ------------------ .../MathWithProtocOptionsGrpc.cs | 208 ----- 2 files changed, 967 deletions(-) delete mode 100644 src/csharp/Grpc.Examples/MathWithProtocOptions.cs delete mode 100644 src/csharp/Grpc.Examples/MathWithProtocOptionsGrpc.cs diff --git a/src/csharp/Grpc.Examples/MathWithProtocOptions.cs b/src/csharp/Grpc.Examples/MathWithProtocOptions.cs deleted file mode 100644 index ef9a5a4ff5c..00000000000 --- a/src/csharp/Grpc.Examples/MathWithProtocOptions.cs +++ /dev/null @@ -1,759 +0,0 @@ -// -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: math_with_protoc_options.proto -// -#pragma warning disable 1591, 0612, 3021 -#region Designer generated code - -using pb = global::Google.Protobuf; -using pbc = global::Google.Protobuf.Collections; -using pbr = global::Google.Protobuf.Reflection; -using scg = global::System.Collections.Generic; -namespace MathWithProtocOptions { - - /// Holder for reflection information generated from math_with_protoc_options.proto - public static partial class MathWithProtocOptionsReflection { - - #region Descriptor - /// File descriptor for math_with_protoc_options.proto - public static pbr::FileDescriptor Descriptor { - get { return descriptor; } - } - private static pbr::FileDescriptor descriptor; - - static MathWithProtocOptionsReflection() { - byte[] descriptorData = global::System.Convert.FromBase64String( - string.Concat( - "Ch5tYXRoX3dpdGhfcHJvdG9jX29wdGlvbnMucHJvdG8SGG1hdGhfd2l0aF9w", - "cm90b2Nfb3B0aW9ucyIsCgdEaXZBcmdzEhAKCGRpdmlkZW5kGAEgASgDEg8K", - "B2Rpdmlzb3IYAiABKAMiLwoIRGl2UmVwbHkSEAoIcXVvdGllbnQYASABKAMS", - "EQoJcmVtYWluZGVyGAIgASgDIhgKB0ZpYkFyZ3MSDQoFbGltaXQYASABKAMi", - "EgoDTnVtEgsKA251bRgBIAEoAyIZCghGaWJSZXBseRINCgVjb3VudBgBIAEo", - "AzLEAgoETWF0aBJOCgNEaXYSIS5tYXRoX3dpdGhfcHJvdG9jX29wdGlvbnMu", - "RGl2QXJncxoiLm1hdGhfd2l0aF9wcm90b2Nfb3B0aW9ucy5EaXZSZXBseSIA", - "ElYKB0Rpdk1hbnkSIS5tYXRoX3dpdGhfcHJvdG9jX29wdGlvbnMuRGl2QXJn", - "cxoiLm1hdGhfd2l0aF9wcm90b2Nfb3B0aW9ucy5EaXZSZXBseSIAKAEwARJL", - "CgNGaWISIS5tYXRoX3dpdGhfcHJvdG9jX29wdGlvbnMuRmliQXJncxodLm1h", - "dGhfd2l0aF9wcm90b2Nfb3B0aW9ucy5OdW0iADABEkcKA1N1bRIdLm1hdGhf", - "d2l0aF9wcm90b2Nfb3B0aW9ucy5OdW0aHS5tYXRoX3dpdGhfcHJvdG9jX29w", - "dGlvbnMuTnVtIgAoAWIGcHJvdG8z")); - descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::MathWithProtocOptions.DivArgs), global::MathWithProtocOptions.DivArgs.Parser, new[]{ "Dividend", "Divisor" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::MathWithProtocOptions.DivReply), global::MathWithProtocOptions.DivReply.Parser, new[]{ "Quotient", "Remainder" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::MathWithProtocOptions.FibArgs), global::MathWithProtocOptions.FibArgs.Parser, new[]{ "Limit" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::MathWithProtocOptions.Num), global::MathWithProtocOptions.Num.Parser, new[]{ "Num_" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::MathWithProtocOptions.FibReply), global::MathWithProtocOptions.FibReply.Parser, new[]{ "Count" }, null, null, null) - })); - } - #endregion - - } - #region Messages - public sealed partial class DivArgs : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DivArgs()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.MessageTypes[0]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivArgs() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivArgs(DivArgs other) : this() { - dividend_ = other.dividend_; - divisor_ = other.divisor_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivArgs Clone() { - return new DivArgs(this); - } - - /// Field number for the "dividend" field. - public const int DividendFieldNumber = 1; - private long dividend_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Dividend { - get { return dividend_; } - set { - dividend_ = value; - } - } - - /// Field number for the "divisor" field. - public const int DivisorFieldNumber = 2; - private long divisor_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Divisor { - get { return divisor_; } - set { - divisor_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as DivArgs); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DivArgs other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Dividend != other.Dividend) return false; - if (Divisor != other.Divisor) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Dividend != 0L) hash ^= Dividend.GetHashCode(); - if (Divisor != 0L) hash ^= Divisor.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Dividend != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Dividend); - } - if (Divisor != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Divisor); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Dividend != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Dividend); - } - if (Divisor != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Divisor); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DivArgs other) { - if (other == null) { - return; - } - if (other.Dividend != 0L) { - Dividend = other.Dividend; - } - if (other.Divisor != 0L) { - Divisor = other.Divisor; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Dividend = input.ReadInt64(); - break; - } - case 16: { - Divisor = input.ReadInt64(); - break; - } - } - } - } - - } - - public sealed partial class DivReply : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DivReply()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.MessageTypes[1]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivReply() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivReply(DivReply other) : this() { - quotient_ = other.quotient_; - remainder_ = other.remainder_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DivReply Clone() { - return new DivReply(this); - } - - /// Field number for the "quotient" field. - public const int QuotientFieldNumber = 1; - private long quotient_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Quotient { - get { return quotient_; } - set { - quotient_ = value; - } - } - - /// Field number for the "remainder" field. - public const int RemainderFieldNumber = 2; - private long remainder_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Remainder { - get { return remainder_; } - set { - remainder_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as DivReply); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DivReply other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Quotient != other.Quotient) return false; - if (Remainder != other.Remainder) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Quotient != 0L) hash ^= Quotient.GetHashCode(); - if (Remainder != 0L) hash ^= Remainder.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Quotient != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Quotient); - } - if (Remainder != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Remainder); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Quotient != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Quotient); - } - if (Remainder != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Remainder); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DivReply other) { - if (other == null) { - return; - } - if (other.Quotient != 0L) { - Quotient = other.Quotient; - } - if (other.Remainder != 0L) { - Remainder = other.Remainder; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Quotient = input.ReadInt64(); - break; - } - case 16: { - Remainder = input.ReadInt64(); - break; - } - } - } - } - - } - - public sealed partial class FibArgs : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FibArgs()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.MessageTypes[2]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibArgs() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibArgs(FibArgs other) : this() { - limit_ = other.limit_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibArgs Clone() { - return new FibArgs(this); - } - - /// Field number for the "limit" field. - public const int LimitFieldNumber = 1; - private long limit_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Limit { - get { return limit_; } - set { - limit_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as FibArgs); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(FibArgs other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Limit != other.Limit) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Limit != 0L) hash ^= Limit.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Limit != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Limit); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Limit != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Limit); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(FibArgs other) { - if (other == null) { - return; - } - if (other.Limit != 0L) { - Limit = other.Limit; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Limit = input.ReadInt64(); - break; - } - } - } - } - - } - - public sealed partial class Num : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Num()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.MessageTypes[3]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Num() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Num(Num other) : this() { - num_ = other.num_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Num Clone() { - return new Num(this); - } - - /// Field number for the "num" field. - public const int Num_FieldNumber = 1; - private long num_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Num_ { - get { return num_; } - set { - num_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as Num); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Num other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Num_ != other.Num_) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Num_ != 0L) hash ^= Num_.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Num_ != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Num_); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Num_ != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Num_); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Num other) { - if (other == null) { - return; - } - if (other.Num_ != 0L) { - Num_ = other.Num_; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Num_ = input.ReadInt64(); - break; - } - } - } - } - - } - - public sealed partial class FibReply : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FibReply()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.MessageTypes[4]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibReply() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibReply(FibReply other) : this() { - count_ = other.count_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public FibReply Clone() { - return new FibReply(this); - } - - /// Field number for the "count" field. - public const int CountFieldNumber = 1; - private long count_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Count { - get { return count_; } - set { - count_ = value; - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as FibReply); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(FibReply other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Count != other.Count) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Count != 0L) hash ^= Count.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Count != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Count); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Count != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Count); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(FibReply other) { - if (other == null) { - return; - } - if (other.Count != 0L) { - Count = other.Count; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - Count = input.ReadInt64(); - break; - } - } - } - } - - } - - #endregion - -} - -#endregion Designer generated code diff --git a/src/csharp/Grpc.Examples/MathWithProtocOptionsGrpc.cs b/src/csharp/Grpc.Examples/MathWithProtocOptionsGrpc.cs deleted file mode 100644 index dd61b72163f..00000000000 --- a/src/csharp/Grpc.Examples/MathWithProtocOptionsGrpc.cs +++ /dev/null @@ -1,208 +0,0 @@ -// -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: math_with_protoc_options.proto -// -// Original file comments: -// Copyright 2015 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#pragma warning disable 0414, 1591 -#region Designer generated code - -using grpc = global::Grpc.Core; - -namespace MathWithProtocOptions { - public static partial class Math - { - static readonly string __ServiceName = "math_with_protoc_options.Math"; - - static readonly grpc::Marshaller __Marshaller_math_with_protoc_options_DivArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.DivArgs.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_math_with_protoc_options_DivReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.DivReply.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_math_with_protoc_options_FibArgs = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.FibArgs.Parser.ParseFrom); - static readonly grpc::Marshaller __Marshaller_math_with_protoc_options_Num = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::MathWithProtocOptions.Num.Parser.ParseFrom); - - static readonly grpc::Method __Method_Div = new grpc::Method( - grpc::MethodType.Unary, - __ServiceName, - "Div", - __Marshaller_math_with_protoc_options_DivArgs, - __Marshaller_math_with_protoc_options_DivReply); - - static readonly grpc::Method __Method_DivMany = new grpc::Method( - grpc::MethodType.DuplexStreaming, - __ServiceName, - "DivMany", - __Marshaller_math_with_protoc_options_DivArgs, - __Marshaller_math_with_protoc_options_DivReply); - - static readonly grpc::Method __Method_Fib = new grpc::Method( - grpc::MethodType.ServerStreaming, - __ServiceName, - "Fib", - __Marshaller_math_with_protoc_options_FibArgs, - __Marshaller_math_with_protoc_options_Num); - - static readonly grpc::Method __Method_Sum = new grpc::Method( - grpc::MethodType.ClientStreaming, - __ServiceName, - "Sum", - __Marshaller_math_with_protoc_options_Num, - __Marshaller_math_with_protoc_options_Num); - - /// Service descriptor - public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor - { - get { return global::MathWithProtocOptions.MathWithProtocOptionsReflection.Descriptor.Services[0]; } - } - - /// Lite client for Math - public partial class MathClient : grpc::LiteClientBase - { - /// Creates a new client for Math that uses a custom CallInvoker. - /// The callInvoker to use to make remote calls. - public MathClient(grpc::CallInvoker callInvoker) : base(callInvoker) - { - } - /// Protected parameterless constructor to allow creation of test doubles. - protected MathClient() : base() - { - } - - /// - /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - /// and remainder. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The response received from the server. - public virtual global::MathWithProtocOptions.DivReply Div(global::MathWithProtocOptions.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return Div(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - /// and remainder. - /// - /// The request to send to the server. - /// The options for the call. - /// The response received from the server. - public virtual global::MathWithProtocOptions.DivReply Div(global::MathWithProtocOptions.DivArgs request, grpc::CallOptions options) - { - return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request); - } - /// - /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - /// and remainder. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncUnaryCall DivAsync(global::MathWithProtocOptions.DivArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return DivAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient - /// and remainder. - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncUnaryCall DivAsync(global::MathWithProtocOptions.DivArgs request, grpc::CallOptions options) - { - return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request); - } - /// - /// DivMany accepts an arbitrary number of division args from the client stream - /// and sends back the results in the reply stream. The stream continues until - /// the client closes its end; the server does the same after sending all the - /// replies. The stream ends immediately if either end aborts. - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall DivMany(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return DivMany(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// DivMany accepts an arbitrary number of division args from the client stream - /// and sends back the results in the reply stream. The stream continues until - /// the client closes its end; the server does the same after sending all the - /// replies. The stream ends immediately if either end aborts. - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncDuplexStreamingCall DivMany(grpc::CallOptions options) - { - return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options); - } - /// - /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib - /// generates up to limit numbers; otherwise it continues until the call is - /// canceled. Unlike Fib above, Fib has no final FibReply. - /// - /// The request to send to the server. - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncServerStreamingCall Fib(global::MathWithProtocOptions.FibArgs request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return Fib(request, new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib - /// generates up to limit numbers; otherwise it continues until the call is - /// canceled. Unlike Fib above, Fib has no final FibReply. - /// - /// The request to send to the server. - /// The options for the call. - /// The call object. - public virtual grpc::AsyncServerStreamingCall Fib(global::MathWithProtocOptions.FibArgs request, grpc::CallOptions options) - { - return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request); - } - /// - /// Sum sums a stream of numbers, returning the final result once the stream - /// is closed. - /// - /// The initial metadata to send with the call. This parameter is optional. - /// An optional deadline for the call. The call will be cancelled if deadline is hit. - /// An optional token for canceling the call. - /// The call object. - public virtual grpc::AsyncClientStreamingCall Sum(grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - return Sum(new grpc::CallOptions(headers, deadline, cancellationToken)); - } - /// - /// Sum sums a stream of numbers, returning the final result once the stream - /// is closed. - /// - /// The options for the call. - /// The call object. - public virtual grpc::AsyncClientStreamingCall Sum(grpc::CallOptions options) - { - return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options); - } - } - - } -} -#endregion From 7b54e095cbed9cbec7da473e56012578eaa938e8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 Sep 2019 12:30:22 -0400 Subject: [PATCH 085/120] fix microbenchmarks --- src/csharp/Grpc.Microbenchmarks/PingBenchmark.cs | 2 +- src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Microbenchmarks/PingBenchmark.cs b/src/csharp/Grpc.Microbenchmarks/PingBenchmark.cs index 3949040aac0..cbcf5d361ca 100644 --- a/src/csharp/Grpc.Microbenchmarks/PingBenchmark.cs +++ b/src/csharp/Grpc.Microbenchmarks/PingBenchmark.cs @@ -86,7 +86,7 @@ namespace Grpc.Microbenchmarks await server.ShutdownAsync(); } - class PingClient : LiteClientBase + class PingClient : ClientBase { public PingClient(CallInvoker callInvoker) : base(callInvoker) { } public AsyncUnaryCall PingAsync(string request, CallOptions options) diff --git a/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs b/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs index 8448f03dd62..1f87b41169c 100644 --- a/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs +++ b/src/csharp/Grpc.Microbenchmarks/UnaryCallOverheadBenchmark.cs @@ -91,7 +91,7 @@ namespace Grpc.Microbenchmarks await channel.ShutdownAsync(); } - class PingClient : LiteClientBase + class PingClient : ClientBase { public PingClient(CallInvoker callInvoker) : base(callInvoker) { } From 406a2473a60a3ef78f73344724fabd20024775f2 Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Mon, 2 Sep 2019 19:36:11 -0700 Subject: [PATCH 086/120] Enable stale bot --- .github/stale.yml | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000000..ff9049ddb96 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,59 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 180 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 1 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - "disposition/never stale" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: false + +# Label to use when marking as stale +staleLabel: "disposition/stale" + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue/PR has been automatically marked as stale because it has not had any update (including + commits, comments, labels, milestones, etc) for 180 days. It will be closed automatically if no + further update occurs in 1 day. Thank you for your contributions! + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed \ No newline at end of file From 903d30080d99b1601093b7af5a6db4c154bd7f27 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Sep 2019 01:36:24 -0400 Subject: [PATCH 087/120] Revert "Mark as experiemental" This reverts commit 4275312e5174149357283c263e10c45c5552dd4b. --- src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml b/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml index 2728c8bfdc2..dd220bf564d 100644 --- a/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml +++ b/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml @@ -28,7 +28,7 @@ + Description="The base type to use for the client."> From bac5b38c3641582684da353094fa6d1d6dfbf5ae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Sep 2019 01:38:32 -0400 Subject: [PATCH 088/120] Revert "Feedbackg" This reverts commit a0adb5003ce6066b795009cc9f2d3abaca9180b7. --- src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml | 11 ----------- src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets | 4 +--- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml b/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml index dd220bf564d..66862582dad 100644 --- a/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml +++ b/src/csharp/Grpc.Tools/build/_grpc/Grpc.CSharp.xml @@ -26,16 +26,5 @@ - - - - - - - - diff --git a/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets b/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets index bc78e340e33..493212fe7e5 100644 --- a/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets @@ -38,13 +38,11 @@ <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_server + <_GrpcOutputOptions Condition=" '%(Protobuf_Compile.ClientType)' == 'LiteClient' ">%(Protobuf_Compile._GrpcOutputOptions);lite_client <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_client - - <_GrpcOutputOptions Condition=" '%(Protobuf_Compile.ClientBaseType)' == 'LiteClientBase' ">%(Protobuf_Compile._GrpcOutputOptions);lite_client - From 0afe3dba92921230ab87b88ad3d62895e40375cb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Sep 2019 01:39:01 -0400 Subject: [PATCH 089/120] Revert "Add MSBuild metadata to set LiteClient for client generation." This reverts commit 9b3c9e3635a360bfe2b7bd8b09e787b5d8f73d11. --- src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets | 1 - 1 file changed, 1 deletion(-) diff --git a/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets b/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets index 493212fe7e5..dd01b8183db 100644 --- a/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_grpc/_Grpc.Tools.targets @@ -38,7 +38,6 @@ <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_server - <_GrpcOutputOptions Condition=" '%(Protobuf_Compile.ClientType)' == 'LiteClient' ">%(Protobuf_Compile._GrpcOutputOptions);lite_client <_GrpcOutputOptions>%(Protobuf_Compile._GrpcOutputOptions);no_client From 3c5715466fb95a83186277f9e68e818316f9f32f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 Sep 2019 17:03:11 +0200 Subject: [PATCH 090/120] remove C# workaround for DeadlineExceeded status #2685 --- src/csharp/Grpc.Core.Tests/TimeoutsTest.cs | 10 +++------- .../Grpc.Examples.Tests/MathClientServerTests.cs | 4 +--- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 3 +-- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/TimeoutsTest.cs b/src/csharp/Grpc.Core.Tests/TimeoutsTest.cs index 55e69a01813..d92a2b9ff72 100644 --- a/src/csharp/Grpc.Core.Tests/TimeoutsTest.cs +++ b/src/csharp/Grpc.Core.Tests/TimeoutsTest.cs @@ -96,8 +96,7 @@ namespace Grpc.Core.Tests }); var ex = Assert.Throws(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.MinValue)), "abc")); - // We can't guarantee the status code always DeadlineExceeded. See issue #2685. - Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); + Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); } [Test] @@ -110,8 +109,7 @@ namespace Grpc.Core.Tests }); var ex = Assert.Throws(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSpan.FromSeconds(5)))), "abc")); - // We can't guarantee the status code always DeadlineExceeded. See issue #2685. - Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); + Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); } [Test] @@ -130,9 +128,7 @@ namespace Grpc.Core.Tests }); var ex = Assert.Throws(() => Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(deadline: DateTime.UtcNow.Add(TimeSpan.FromSeconds(5)))), "abc")); - // We can't guarantee the status code always DeadlineExceeded. See issue #2685. - Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); - + Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); Assert.IsTrue(await serverReceivedCancellationTcs.Task); } } diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index ded80ffba5f..6fa27a6b9af 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -136,9 +136,7 @@ namespace Math.Tests deadline: DateTime.UtcNow.AddMilliseconds(500))) { var ex = Assert.ThrowsAsync(async () => await call.ResponseStream.ToListAsync()); - - // We can't guarantee the status code always DeadlineExceeded. See issue #2685. - Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); + Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); } } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 83b0095f7f0..53cd4562ead 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -476,8 +476,7 @@ namespace Grpc.IntegrationTesting } catch (RpcException ex) { - // We can't guarantee the status code always DeadlineExceeded. See issue #2685. - Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); + Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); } } Console.WriteLine("Passed!"); From b28b483628e28b1438652896e705c1164b08b5a0 Mon Sep 17 00:00:00 2001 From: Moiz Haidry Date: Tue, 3 Sep 2019 09:05:56 -0700 Subject: [PATCH 091/120] Assing Nana to next Github rotation --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/cleanup_request.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/pull_request_template.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index e44c8966012..4709997666e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Report a bug about: Create a report to help us improve labels: kind/bug, priority/P2 -assignees: mhaidrygoog +assignees: nanahpang --- diff --git a/.github/ISSUE_TEMPLATE/cleanup_request.md b/.github/ISSUE_TEMPLATE/cleanup_request.md index 4fe128984b9..4ec33fafb58 100644 --- a/.github/ISSUE_TEMPLATE/cleanup_request.md +++ b/.github/ISSUE_TEMPLATE/cleanup_request.md @@ -2,7 +2,7 @@ name: Request a cleanup about: Suggest a cleanup in our repository labels: kind/internal cleanup -assignees: mhaidrygoog +assignees: nanahpang --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 499de024dd4..efa5b1611bb 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Request a feature about: Suggest an idea for this project labels: kind/enhancement -assignees: mhaidrygoog +assignees: nanahpang --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ac8c41a9f26..55d8d600541 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,4 +8,4 @@ If you know who should review your pull request, please remove the mentioning be --> -@mhaidrygoog \ No newline at end of file +@nanahpang From 647a9701f715a805da2bcefce49f8757c9dbcc9e Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 3 Sep 2019 09:23:56 -0700 Subject: [PATCH 092/120] Update debian:jessie docker to pin bundler version --- tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile index 57d6771f9db..077aa16a057 100644 --- a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile @@ -16,4 +16,4 @@ FROM debian:jessie RUN apt-get update && apt-get install -y ruby-full -RUN gem install bundler +RUN gem install bundler -v 1.17.3 --no-document diff --git a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile index 04cfa51069c..48fba1fc2a2 100644 --- a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile @@ -16,4 +16,4 @@ FROM i386/debian:jessie RUN apt-get update && apt-get install -y ruby-full -RUN gem install bundler +RUN gem install bundler -v 1.17.3 --no-document From 49b9fb2b3ca8cc048db476b4b7aedb703dbb1734 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 12 Aug 2019 16:43:24 -0700 Subject: [PATCH 093/120] Enable C++ standard library --- CMakeLists.txt | 1034 --------------------- Makefile | 418 ++++----- config.m4 | 2 + include/grpc/impl/codegen/port_platform.h | 3 +- src/php/ext/grpc/config.m4 | 3 +- src/ruby/ext/grpc/rb_enable_cpp.cc | 22 + templates/CMakeLists.txt.template | 20 - templates/Makefile.template | 4 +- templates/config.m4.template | 2 + 9 files changed, 240 insertions(+), 1268 deletions(-) create mode 100644 src/ruby/ext/grpc/rb_enable_cpp.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index c5cdfff7f56..599f1441583 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,11 +125,6 @@ if(gRPC_BACKWARDS_COMPATIBILITY_MODE) endif() if (_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_IOS) - # C core has C++ source code, but should not depend on libstc++ (for better portability). - # We need to use a few tricks to convince cmake to do that. - # https://stackoverflow.com/questions/15058403/how-to-stop-cmake-from-linking-against-libstdc - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") - # Exceptions and RTTI must be off to avoid dependency on libstdc++ set(_gRPC_CORE_NOSTDCXX_FLAGS -fno-exceptions -fno-rtti) else() set(_gRPC_CORE_NOSTDCXX_FLAGS "") @@ -797,12 +792,6 @@ target_include_directories(address_sorting PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(address_sorting PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(address_sorting PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(address_sorting ${_gRPC_BASELIB_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} @@ -851,12 +840,6 @@ target_include_directories(alts_test_util PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(alts_test_util PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(alts_test_util PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(alts_test_util ${_gRPC_SSL_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} @@ -935,12 +918,6 @@ target_include_directories(gpr PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(gpr PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(gpr ${_gRPC_ALLTARGETS_LIBRARIES} ) @@ -1404,12 +1381,6 @@ target_include_directories(grpc PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc ${_gRPC_BASELIB_LIBRARIES} ${_gRPC_SSL_LIBRARIES} @@ -1824,12 +1795,6 @@ target_include_directories(grpc_cronet PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_cronet PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc_cronet PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc_cronet ${_gRPC_BASELIB_LIBRARIES} ${_gRPC_SSL_LIBRARIES} @@ -2181,12 +2146,6 @@ target_include_directories(grpc_test_util PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_test_util PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc_test_util PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc_test_util ${_gRPC_ALLTARGETS_LIBRARIES} gpr @@ -2535,12 +2494,6 @@ target_include_directories(grpc_test_util_unsecure PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_test_util_unsecure PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc_test_util_unsecure PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc_test_util_unsecure ${_gRPC_ALLTARGETS_LIBRARIES} gpr @@ -2929,12 +2882,6 @@ target_include_directories(grpc_unsecure PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_unsecure PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc_unsecure PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc_unsecure ${_gRPC_BASELIB_LIBRARIES} ${_gRPC_ZLIB_LIBRARIES} @@ -3032,12 +2979,6 @@ target_include_directories(reconnect_server PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(reconnect_server PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(reconnect_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(reconnect_server ${_gRPC_ALLTARGETS_LIBRARIES} test_tcp_server @@ -3080,12 +3021,6 @@ target_include_directories(test_tcp_server PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(test_tcp_server PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(test_tcp_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(test_tcp_server ${_gRPC_ALLTARGETS_LIBRARIES} grpc_test_util @@ -5445,12 +5380,6 @@ target_include_directories(grpc_csharp_ext PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_csharp_ext PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(grpc_csharp_ext PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(grpc_csharp_ext ${_gRPC_ALLTARGETS_LIBRARIES} grpc @@ -5548,12 +5477,6 @@ target_include_directories(bad_ssl_test_server PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bad_ssl_test_server PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(bad_ssl_test_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(bad_ssl_test_server ${_gRPC_ALLTARGETS_LIBRARIES} grpc_test_util @@ -5674,12 +5597,6 @@ target_include_directories(end2end_tests PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(end2end_tests PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(end2end_tests PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(end2end_tests ${_gRPC_SSL_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} @@ -5800,12 +5717,6 @@ target_include_directories(end2end_nosec_tests PRIVATE ${_gRPC_UPB_INCLUDE_DIR} PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR} ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(end2end_nosec_tests PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(end2end_nosec_tests PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() target_link_libraries(end2end_nosec_tests ${_gRPC_ALLTARGETS_LIBRARIES} grpc_test_util_unsecure @@ -5845,11 +5756,6 @@ target_link_libraries(algorithm_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(algorithm_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(algorithm_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -5881,11 +5787,6 @@ target_link_libraries(alloc_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(alloc_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(alloc_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -5917,11 +5818,6 @@ target_link_libraries(alpn_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(alpn_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(alpn_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -5953,11 +5849,6 @@ target_link_libraries(arena_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(arena_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(arena_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -5989,11 +5880,6 @@ target_link_libraries(avl_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(avl_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(avl_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6026,11 +5912,6 @@ target_link_libraries(bad_server_response_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bad_server_response_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(bad_server_response_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6061,11 +5942,6 @@ target_link_libraries(bin_decoder_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bin_decoder_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(bin_decoder_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6096,11 +5972,6 @@ target_link_libraries(bin_encoder_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bin_encoder_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(bin_encoder_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6133,11 +6004,6 @@ target_link_libraries(buffer_list_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(buffer_list_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(buffer_list_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6170,11 +6036,6 @@ target_link_libraries(channel_create_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(channel_create_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(channel_create_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) @@ -6204,11 +6065,6 @@ target_link_libraries(check_epollexclusive gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(check_epollexclusive PROPERTIES LINKER_LANGUAGE C) - target_compile_options(check_epollexclusive PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() if (gRPC_BUILD_TESTS) @@ -6239,11 +6095,6 @@ target_link_libraries(chttp2_hpack_encoder_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(chttp2_hpack_encoder_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(chttp2_hpack_encoder_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6275,11 +6126,6 @@ target_link_libraries(chttp2_stream_map_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(chttp2_stream_map_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(chttp2_stream_map_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6311,11 +6157,6 @@ target_link_libraries(chttp2_varint_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(chttp2_varint_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(chttp2_varint_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6348,11 +6189,6 @@ target_link_libraries(close_fd_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(close_fd_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(close_fd_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6385,11 +6221,6 @@ target_link_libraries(cmdline_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(cmdline_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(cmdline_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6421,11 +6252,6 @@ target_link_libraries(combiner_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(combiner_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(combiner_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6457,11 +6283,6 @@ target_link_libraries(compression_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(compression_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(compression_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6493,11 +6314,6 @@ target_link_libraries(concurrent_connectivity_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(concurrent_connectivity_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(concurrent_connectivity_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6529,11 +6345,6 @@ target_link_libraries(connection_refused_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(connection_refused_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(connection_refused_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6565,11 +6376,6 @@ target_link_libraries(dns_resolver_connectivity_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(dns_resolver_connectivity_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(dns_resolver_connectivity_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6601,11 +6407,6 @@ target_link_libraries(dns_resolver_cooldown_using_ares_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(dns_resolver_cooldown_using_ares_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(dns_resolver_cooldown_using_ares_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6637,11 +6438,6 @@ target_link_libraries(dns_resolver_cooldown_using_native_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(dns_resolver_cooldown_using_native_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(dns_resolver_cooldown_using_native_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6673,11 +6469,6 @@ target_link_libraries(dns_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(dns_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(dns_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6710,11 +6501,6 @@ target_link_libraries(dualstack_socket_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(dualstack_socket_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(dualstack_socket_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6747,11 +6533,6 @@ target_link_libraries(endpoint_pair_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(endpoint_pair_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(endpoint_pair_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6783,11 +6564,6 @@ target_link_libraries(error_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(error_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(error_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6820,11 +6596,6 @@ target_link_libraries(ev_epollex_linux_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(ev_epollex_linux_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(ev_epollex_linux_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6857,11 +6628,6 @@ target_link_libraries(fake_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fake_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fake_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -6895,11 +6661,6 @@ target_link_libraries(fake_transport_security_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fake_transport_security_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fake_transport_security_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6933,11 +6694,6 @@ target_link_libraries(fd_conservation_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fd_conservation_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fd_conservation_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -6971,11 +6727,6 @@ target_link_libraries(fd_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fd_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fd_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -7008,11 +6759,6 @@ target_link_libraries(fling_client gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fling_client PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fling_client PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7044,11 +6790,6 @@ target_link_libraries(fling_server gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fling_server PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fling_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7081,11 +6822,6 @@ target_link_libraries(fling_stream_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fling_stream_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fling_stream_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -7119,11 +6855,6 @@ target_link_libraries(fling_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fling_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fling_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -7157,11 +6888,6 @@ target_link_libraries(fork_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(fork_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(fork_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -7195,11 +6921,6 @@ target_link_libraries(goaway_server_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(goaway_server_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(goaway_server_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -7232,11 +6953,6 @@ target_link_libraries(gpr_cpu_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_cpu_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_cpu_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7268,11 +6984,6 @@ target_link_libraries(gpr_env_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_env_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_env_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7304,11 +7015,6 @@ target_link_libraries(gpr_host_port_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_host_port_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_host_port_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7340,11 +7046,6 @@ target_link_libraries(gpr_log_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_log_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_log_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7376,11 +7077,6 @@ target_link_libraries(gpr_manual_constructor_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_manual_constructor_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_manual_constructor_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7412,11 +7108,6 @@ target_link_libraries(gpr_mpscq_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_mpscq_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_mpscq_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7448,11 +7139,6 @@ target_link_libraries(gpr_spinlock_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_spinlock_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_spinlock_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7484,11 +7170,6 @@ target_link_libraries(gpr_string_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_string_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_string_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7520,11 +7201,6 @@ target_link_libraries(gpr_sync_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_sync_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_sync_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7556,11 +7232,6 @@ target_link_libraries(gpr_thd_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_thd_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_thd_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7592,11 +7263,6 @@ target_link_libraries(gpr_time_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_time_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_time_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7628,11 +7294,6 @@ target_link_libraries(gpr_tls_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_tls_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_tls_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7664,11 +7325,6 @@ target_link_libraries(gpr_useful_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(gpr_useful_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(gpr_useful_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7700,11 +7356,6 @@ target_link_libraries(grpc_auth_context_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_auth_context_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_auth_context_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7736,11 +7387,6 @@ target_link_libraries(grpc_b64_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_b64_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_b64_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7772,11 +7418,6 @@ target_link_libraries(grpc_byte_buffer_reader_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_byte_buffer_reader_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_byte_buffer_reader_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7808,11 +7449,6 @@ target_link_libraries(grpc_channel_args_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_channel_args_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_channel_args_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7844,11 +7480,6 @@ target_link_libraries(grpc_channel_stack_builder_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_channel_stack_builder_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_channel_stack_builder_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7880,11 +7511,6 @@ target_link_libraries(grpc_channel_stack_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_channel_stack_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_channel_stack_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7916,11 +7542,6 @@ target_link_libraries(grpc_completion_queue_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_completion_queue_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_completion_queue_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7952,11 +7573,6 @@ target_link_libraries(grpc_completion_queue_threading_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_completion_queue_threading_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_completion_queue_threading_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -7988,11 +7604,6 @@ target_link_libraries(grpc_control_plane_credentials_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_control_plane_credentials_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_control_plane_credentials_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) @@ -8024,11 +7635,6 @@ target_link_libraries(grpc_create_jwt gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_create_jwt PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_create_jwt PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() if (gRPC_BUILD_TESTS) @@ -8059,11 +7665,6 @@ target_link_libraries(grpc_credentials_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_credentials_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_credentials_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8095,11 +7696,6 @@ target_link_libraries(grpc_ipv6_loopback_available_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_ipv6_loopback_available_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_ipv6_loopback_available_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8132,11 +7728,6 @@ target_link_libraries(grpc_json_token_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_json_token_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_json_token_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8169,11 +7760,6 @@ target_link_libraries(grpc_jwt_verifier_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_jwt_verifier_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_jwt_verifier_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) @@ -8204,11 +7790,6 @@ target_link_libraries(grpc_print_google_default_creds_token gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_print_google_default_creds_token PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_print_google_default_creds_token PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() if (gRPC_BUILD_TESTS) @@ -8239,11 +7820,6 @@ target_link_libraries(grpc_security_connector_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_security_connector_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_security_connector_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8275,11 +7851,6 @@ target_link_libraries(grpc_ssl_credentials_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_ssl_credentials_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_ssl_credentials_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) @@ -8310,11 +7881,6 @@ target_link_libraries(grpc_verify_jwt gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(grpc_verify_jwt PROPERTIES LINKER_LANGUAGE C) - target_compile_options(grpc_verify_jwt PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() if (gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX) @@ -8347,11 +7913,6 @@ target_link_libraries(handshake_client_ssl gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(handshake_client_ssl PROPERTIES LINKER_LANGUAGE C) - target_compile_options(handshake_client_ssl PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8387,11 +7948,6 @@ target_link_libraries(handshake_server_ssl gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(handshake_server_ssl PROPERTIES LINKER_LANGUAGE C) - target_compile_options(handshake_server_ssl PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8427,11 +7983,6 @@ target_link_libraries(handshake_server_with_readahead_handshaker gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(handshake_server_with_readahead_handshaker PROPERTIES LINKER_LANGUAGE C) - target_compile_options(handshake_server_with_readahead_handshaker PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8466,11 +8017,6 @@ target_link_libraries(handshake_verify_peer_options gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(handshake_verify_peer_options PROPERTIES LINKER_LANGUAGE C) - target_compile_options(handshake_verify_peer_options PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8502,11 +8048,6 @@ target_link_libraries(histogram_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(histogram_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(histogram_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8538,11 +8079,6 @@ target_link_libraries(hpack_parser_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(hpack_parser_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(hpack_parser_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8574,11 +8110,6 @@ target_link_libraries(hpack_table_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(hpack_table_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(hpack_table_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8610,11 +8141,6 @@ target_link_libraries(http_parser_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(http_parser_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(http_parser_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8646,11 +8172,6 @@ target_link_libraries(httpcli_format_request_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(httpcli_format_request_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(httpcli_format_request_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8683,11 +8204,6 @@ target_link_libraries(httpcli_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(httpcli_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(httpcli_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8721,11 +8237,6 @@ target_link_libraries(httpscli_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(httpscli_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(httpscli_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -8758,11 +8269,6 @@ target_link_libraries(init_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(init_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(init_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8794,11 +8300,6 @@ target_link_libraries(inproc_callback_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(inproc_callback_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(inproc_callback_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8830,11 +8331,6 @@ target_link_libraries(invalid_call_argument_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(invalid_call_argument_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(invalid_call_argument_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8866,11 +8362,6 @@ target_link_libraries(json_rewrite gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(json_rewrite PROPERTIES LINKER_LANGUAGE C) - target_compile_options(json_rewrite PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8902,11 +8393,6 @@ target_link_libraries(json_rewrite_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(json_rewrite_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(json_rewrite_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8938,11 +8424,6 @@ target_link_libraries(json_stream_error_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(json_stream_error_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(json_stream_error_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -8974,11 +8455,6 @@ target_link_libraries(json_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(json_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(json_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9010,11 +8486,6 @@ target_link_libraries(lame_client_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(lame_client_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(lame_client_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9046,11 +8517,6 @@ target_link_libraries(load_file_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(load_file_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(load_file_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9082,11 +8548,6 @@ target_link_libraries(memory_usage_client gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(memory_usage_client PROPERTIES LINKER_LANGUAGE C) - target_compile_options(memory_usage_client PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9118,11 +8579,6 @@ target_link_libraries(memory_usage_server gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(memory_usage_server PROPERTIES LINKER_LANGUAGE C) - target_compile_options(memory_usage_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9155,11 +8611,6 @@ target_link_libraries(memory_usage_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(memory_usage_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(memory_usage_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -9192,11 +8643,6 @@ target_link_libraries(message_compress_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(message_compress_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(message_compress_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9228,11 +8674,6 @@ target_link_libraries(minimal_stack_is_minimal_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(minimal_stack_is_minimal_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(minimal_stack_is_minimal_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9264,11 +8705,6 @@ target_link_libraries(mpmcqueue_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(mpmcqueue_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(mpmcqueue_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9300,11 +8736,6 @@ target_link_libraries(multiple_server_queues_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(multiple_server_queues_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(multiple_server_queues_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9336,11 +8767,6 @@ target_link_libraries(murmur_hash_test grpc_unsecure ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(murmur_hash_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(murmur_hash_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9372,11 +8798,6 @@ target_link_libraries(no_server_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(no_server_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(no_server_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9408,11 +8829,6 @@ target_link_libraries(num_external_connectivity_watchers_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(num_external_connectivity_watchers_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(num_external_connectivity_watchers_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9444,11 +8860,6 @@ target_link_libraries(parse_address_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(parse_address_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(parse_address_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9481,11 +8892,6 @@ target_link_libraries(parse_address_with_named_scope_id_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(parse_address_with_named_scope_id_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(parse_address_with_named_scope_id_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -9518,11 +8924,6 @@ target_link_libraries(percent_encoding_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(percent_encoding_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(percent_encoding_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9555,11 +8956,6 @@ target_link_libraries(resolve_address_using_ares_resolver_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(resolve_address_using_ares_resolver_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(resolve_address_using_ares_resolver_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -9592,11 +8988,6 @@ target_link_libraries(resolve_address_using_ares_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(resolve_address_using_ares_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(resolve_address_using_ares_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9629,11 +9020,6 @@ target_link_libraries(resolve_address_using_native_resolver_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(resolve_address_using_native_resolver_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(resolve_address_using_native_resolver_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -9666,11 +9052,6 @@ target_link_libraries(resolve_address_using_native_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(resolve_address_using_native_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(resolve_address_using_native_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9702,11 +9083,6 @@ target_link_libraries(resource_quota_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(resource_quota_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(resource_quota_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9738,11 +9114,6 @@ target_link_libraries(secure_channel_create_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(secure_channel_create_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(secure_channel_create_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9774,11 +9145,6 @@ target_link_libraries(secure_endpoint_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(secure_endpoint_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(secure_endpoint_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9810,11 +9176,6 @@ target_link_libraries(sequential_connectivity_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(sequential_connectivity_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(sequential_connectivity_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9846,11 +9207,6 @@ target_link_libraries(server_chttp2_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(server_chttp2_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(server_chttp2_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9882,11 +9238,6 @@ target_link_libraries(server_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(server_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(server_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9918,11 +9269,6 @@ target_link_libraries(slice_buffer_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(slice_buffer_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(slice_buffer_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9954,11 +9300,6 @@ target_link_libraries(slice_string_helpers_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(slice_string_helpers_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(slice_string_helpers_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -9990,11 +9331,6 @@ target_link_libraries(slice_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(slice_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(slice_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10026,11 +9362,6 @@ target_link_libraries(sockaddr_resolver_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(sockaddr_resolver_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(sockaddr_resolver_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10062,11 +9393,6 @@ target_link_libraries(sockaddr_utils_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(sockaddr_utils_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(sockaddr_utils_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10099,11 +9425,6 @@ target_link_libraries(socket_utils_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(socket_utils_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(socket_utils_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10138,11 +9459,6 @@ target_link_libraries(ssl_transport_security_test grpc ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(ssl_transport_security_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(ssl_transport_security_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10175,11 +9491,6 @@ target_link_libraries(status_conversion_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(status_conversion_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(status_conversion_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10211,11 +9522,6 @@ target_link_libraries(stream_compression_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(stream_compression_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(stream_compression_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10247,11 +9553,6 @@ target_link_libraries(stream_owned_slice_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(stream_owned_slice_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(stream_owned_slice_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10284,11 +9585,6 @@ target_link_libraries(tcp_client_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(tcp_client_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(tcp_client_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10321,11 +9617,6 @@ target_link_libraries(tcp_client_uv_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(tcp_client_uv_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(tcp_client_uv_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10358,11 +9649,6 @@ target_link_libraries(tcp_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(tcp_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(tcp_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10396,11 +9682,6 @@ target_link_libraries(tcp_server_posix_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(tcp_server_posix_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(tcp_server_posix_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10433,11 +9714,6 @@ target_link_libraries(tcp_server_uv_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(tcp_server_uv_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(tcp_server_uv_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10469,11 +9745,6 @@ target_link_libraries(threadpool_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(threadpool_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(threadpool_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10505,11 +9776,6 @@ target_link_libraries(time_averaged_stats_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(time_averaged_stats_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(time_averaged_stats_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10541,11 +9807,6 @@ target_link_libraries(timeout_encoding_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(timeout_encoding_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(timeout_encoding_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10577,11 +9838,6 @@ target_link_libraries(timer_heap_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(timer_heap_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(timer_heap_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10613,11 +9869,6 @@ target_link_libraries(timer_list_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(timer_list_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(timer_list_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10649,11 +9900,6 @@ target_link_libraries(transport_connectivity_state_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(transport_connectivity_state_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(transport_connectivity_state_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10685,11 +9931,6 @@ target_link_libraries(transport_metadata_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(transport_metadata_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(transport_metadata_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -10722,11 +9963,6 @@ target_link_libraries(transport_security_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(transport_security_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(transport_security_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10760,11 +9996,6 @@ target_link_libraries(udp_server_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(udp_server_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(udp_server_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -10797,11 +10028,6 @@ target_link_libraries(uri_parser_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(uri_parser_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(uri_parser_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18226,11 +17452,6 @@ target_link_libraries(bad_ssl_cert_server gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bad_ssl_cert_server PROPERTIES LINKER_LANGUAGE C) - target_compile_options(bad_ssl_cert_server PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18264,11 +17485,6 @@ target_link_libraries(bad_ssl_cert_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(bad_ssl_cert_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(bad_ssl_cert_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18302,11 +17518,6 @@ target_link_libraries(h2_census_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_census_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_census_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18339,11 +17550,6 @@ target_link_libraries(h2_compress_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_compress_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_compress_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18376,11 +17582,6 @@ target_link_libraries(h2_fakesec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_fakesec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_fakesec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18414,11 +17615,6 @@ target_link_libraries(h2_fd_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_fd_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_fd_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18452,11 +17648,6 @@ target_link_libraries(h2_full_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18490,11 +17681,6 @@ target_link_libraries(h2_full+pipe_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+pipe_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+pipe_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18528,11 +17714,6 @@ target_link_libraries(h2_full+trace_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+trace_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+trace_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18565,11 +17746,6 @@ target_link_libraries(h2_full+workarounds_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+workarounds_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+workarounds_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18602,11 +17778,6 @@ target_link_libraries(h2_http_proxy_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_http_proxy_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_http_proxy_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18640,11 +17811,6 @@ target_link_libraries(h2_local_ipv4_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_local_ipv4_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_local_ipv4_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18679,11 +17845,6 @@ target_link_libraries(h2_local_ipv6_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_local_ipv6_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_local_ipv6_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18718,11 +17879,6 @@ target_link_libraries(h2_local_uds_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_local_uds_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_local_uds_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -18756,11 +17912,6 @@ target_link_libraries(h2_oauth2_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_oauth2_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_oauth2_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18793,11 +17944,6 @@ target_link_libraries(h2_proxy_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_proxy_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_proxy_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18830,11 +17976,6 @@ target_link_libraries(h2_sockpair_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18867,11 +18008,6 @@ target_link_libraries(h2_sockpair+trace_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair+trace_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair+trace_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18904,11 +18040,6 @@ target_link_libraries(h2_sockpair_1byte_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair_1byte_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair_1byte_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18941,11 +18072,6 @@ target_link_libraries(h2_spiffe_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_spiffe_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_spiffe_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -18978,11 +18104,6 @@ target_link_libraries(h2_ssl_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_ssl_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_ssl_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19015,11 +18136,6 @@ target_link_libraries(h2_ssl_cred_reload_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_ssl_cred_reload_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_ssl_cred_reload_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19052,11 +18168,6 @@ target_link_libraries(h2_ssl_proxy_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_ssl_proxy_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_ssl_proxy_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19090,11 +18201,6 @@ target_link_libraries(h2_uds_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_uds_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_uds_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -19128,11 +18234,6 @@ target_link_libraries(inproc_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(inproc_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(inproc_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19165,11 +18266,6 @@ target_link_libraries(h2_census_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_census_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_census_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19202,11 +18298,6 @@ target_link_libraries(h2_compress_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_compress_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_compress_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19240,11 +18331,6 @@ target_link_libraries(h2_fd_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_fd_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_fd_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -19278,11 +18364,6 @@ target_link_libraries(h2_full_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19316,11 +18397,6 @@ target_link_libraries(h2_full+pipe_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+pipe_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+pipe_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -19354,11 +18430,6 @@ target_link_libraries(h2_full+trace_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+trace_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+trace_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19391,11 +18462,6 @@ target_link_libraries(h2_full+workarounds_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_full+workarounds_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_full+workarounds_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19428,11 +18494,6 @@ target_link_libraries(h2_http_proxy_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_http_proxy_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_http_proxy_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19465,11 +18526,6 @@ target_link_libraries(h2_proxy_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_proxy_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_proxy_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19502,11 +18558,6 @@ target_link_libraries(h2_sockpair_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19539,11 +18590,6 @@ target_link_libraries(h2_sockpair+trace_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair+trace_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair+trace_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19576,11 +18622,6 @@ target_link_libraries(h2_sockpair_1byte_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_sockpair_1byte_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_sockpair_1byte_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19614,11 +18655,6 @@ target_link_libraries(h2_uds_nosec_test gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(h2_uds_nosec_test PROPERTIES LINKER_LANGUAGE C) - target_compile_options(h2_uds_nosec_test PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif() endif (gRPC_BUILD_TESTS) @@ -19960,11 +18996,6 @@ target_link_libraries(alts_credentials_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(alts_credentials_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(alts_credentials_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -19997,11 +19028,6 @@ target_link_libraries(api_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(api_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(api_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20034,11 +19060,6 @@ target_link_libraries(client_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(client_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(client_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20071,11 +19092,6 @@ target_link_libraries(hpack_parser_fuzzer_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(hpack_parser_fuzzer_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(hpack_parser_fuzzer_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20108,11 +19124,6 @@ target_link_libraries(http_request_fuzzer_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(http_request_fuzzer_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(http_request_fuzzer_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20145,11 +19156,6 @@ target_link_libraries(http_response_fuzzer_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(http_response_fuzzer_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(http_response_fuzzer_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20182,11 +19188,6 @@ target_link_libraries(json_fuzzer_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(json_fuzzer_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(json_fuzzer_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20219,11 +19220,6 @@ target_link_libraries(nanopb_fuzzer_response_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(nanopb_fuzzer_response_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(nanopb_fuzzer_response_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20256,11 +19252,6 @@ target_link_libraries(nanopb_fuzzer_serverlist_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(nanopb_fuzzer_serverlist_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(nanopb_fuzzer_serverlist_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20293,11 +19284,6 @@ target_link_libraries(percent_decode_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(percent_decode_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(percent_decode_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20330,11 +19316,6 @@ target_link_libraries(percent_encode_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(percent_encode_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(percent_encode_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20367,11 +19348,6 @@ target_link_libraries(server_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(server_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(server_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20404,11 +19380,6 @@ target_link_libraries(ssl_server_fuzzer_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(ssl_server_fuzzer_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(ssl_server_fuzzer_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) if (gRPC_BUILD_TESTS) @@ -20441,11 +19412,6 @@ target_link_libraries(uri_fuzzer_test_one_entry gpr ) - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(uri_fuzzer_test_one_entry PROPERTIES LINKER_LANGUAGE C) - target_compile_options(uri_fuzzer_test_one_entry PRIVATE $<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() endif (gRPC_BUILD_TESTS) diff --git a/Makefile b/Makefile index 4ebf5b36cf8..9ac8955d33c 100644 --- a/Makefile +++ b/Makefile @@ -3339,15 +3339,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(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) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(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) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.8 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.8 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.8 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so endif @@ -3535,15 +3535,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(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) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(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) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.8 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.8 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.8 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so endif @@ -3997,15 +3997,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(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)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(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)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.8 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif @@ -4395,15 +4395,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CRONET_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so.8 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION_CORE).so endif @@ -5438,15 +5438,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(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)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(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)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.8 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.8 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif @@ -7679,15 +7679,15 @@ ifeq ($(SYSTEM),MINGW32) $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CSHARP).$(SHARED_EXT_CSHARP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CSHARP).so endif @@ -8525,7 +8525,7 @@ else $(BINDIR)/$(CONFIG)/algorithm_test: $(ALGORITHM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALGORITHM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/algorithm_test + $(Q) $(LDXX) $(LDFLAGS) $(ALGORITHM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/algorithm_test endif @@ -8557,7 +8557,7 @@ else $(BINDIR)/$(CONFIG)/alloc_test: $(ALLOC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALLOC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alloc_test + $(Q) $(LDXX) $(LDFLAGS) $(ALLOC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alloc_test endif @@ -8589,7 +8589,7 @@ else $(BINDIR)/$(CONFIG)/alpn_test: $(ALPN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALPN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alpn_test + $(Q) $(LDXX) $(LDFLAGS) $(ALPN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alpn_test endif @@ -8685,7 +8685,7 @@ else $(BINDIR)/$(CONFIG)/arena_test: $(ARENA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ARENA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/arena_test + $(Q) $(LDXX) $(LDFLAGS) $(ARENA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/arena_test endif @@ -8717,7 +8717,7 @@ else $(BINDIR)/$(CONFIG)/avl_test: $(AVL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(AVL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/avl_test + $(Q) $(LDXX) $(LDFLAGS) $(AVL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/avl_test endif @@ -8749,7 +8749,7 @@ else $(BINDIR)/$(CONFIG)/bad_server_response_test: $(BAD_SERVER_RESPONSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BAD_SERVER_RESPONSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_server_response_test + $(Q) $(LDXX) $(LDFLAGS) $(BAD_SERVER_RESPONSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_server_response_test endif @@ -8781,7 +8781,7 @@ else $(BINDIR)/$(CONFIG)/bin_decoder_test: $(BIN_DECODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BIN_DECODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bin_decoder_test + $(Q) $(LDXX) $(LDFLAGS) $(BIN_DECODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bin_decoder_test endif @@ -8813,7 +8813,7 @@ else $(BINDIR)/$(CONFIG)/bin_encoder_test: $(BIN_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BIN_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bin_encoder_test + $(Q) $(LDXX) $(LDFLAGS) $(BIN_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bin_encoder_test endif @@ -8845,7 +8845,7 @@ else $(BINDIR)/$(CONFIG)/buffer_list_test: $(BUFFER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BUFFER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/buffer_list_test + $(Q) $(LDXX) $(LDFLAGS) $(BUFFER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/buffer_list_test endif @@ -8877,7 +8877,7 @@ else $(BINDIR)/$(CONFIG)/channel_create_test: $(CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/channel_create_test + $(Q) $(LDXX) $(LDFLAGS) $(CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/channel_create_test endif @@ -8909,7 +8909,7 @@ else $(BINDIR)/$(CONFIG)/check_epollexclusive: $(CHECK_EPOLLEXCLUSIVE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHECK_EPOLLEXCLUSIVE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/check_epollexclusive + $(Q) $(LDXX) $(LDFLAGS) $(CHECK_EPOLLEXCLUSIVE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/check_epollexclusive endif @@ -8941,7 +8941,7 @@ else $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test: $(CHTTP2_HPACK_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_HPACK_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test + $(Q) $(LDXX) $(LDFLAGS) $(CHTTP2_HPACK_ENCODER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test endif @@ -8973,7 +8973,7 @@ else $(BINDIR)/$(CONFIG)/chttp2_stream_map_test: $(CHTTP2_STREAM_MAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_STREAM_MAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_stream_map_test + $(Q) $(LDXX) $(LDFLAGS) $(CHTTP2_STREAM_MAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_stream_map_test endif @@ -9005,7 +9005,7 @@ else $(BINDIR)/$(CONFIG)/chttp2_varint_test: $(CHTTP2_VARINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CHTTP2_VARINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_varint_test + $(Q) $(LDXX) $(LDFLAGS) $(CHTTP2_VARINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/chttp2_varint_test endif @@ -9069,7 +9069,7 @@ else $(BINDIR)/$(CONFIG)/close_fd_test: $(CLOSE_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CLOSE_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/close_fd_test + $(Q) $(LDXX) $(LDFLAGS) $(CLOSE_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/close_fd_test endif @@ -9101,7 +9101,7 @@ else $(BINDIR)/$(CONFIG)/cmdline_test: $(CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/cmdline_test + $(Q) $(LDXX) $(LDFLAGS) $(CMDLINE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/cmdline_test endif @@ -9133,7 +9133,7 @@ else $(BINDIR)/$(CONFIG)/combiner_test: $(COMBINER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(COMBINER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/combiner_test + $(Q) $(LDXX) $(LDFLAGS) $(COMBINER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/combiner_test endif @@ -9165,7 +9165,7 @@ else $(BINDIR)/$(CONFIG)/compression_test: $(COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/compression_test + $(Q) $(LDXX) $(LDFLAGS) $(COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/compression_test endif @@ -9197,7 +9197,7 @@ else $(BINDIR)/$(CONFIG)/concurrent_connectivity_test: $(CONCURRENT_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CONCURRENT_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/concurrent_connectivity_test + $(Q) $(LDXX) $(LDFLAGS) $(CONCURRENT_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/concurrent_connectivity_test endif @@ -9229,7 +9229,7 @@ else $(BINDIR)/$(CONFIG)/connection_refused_test: $(CONNECTION_REFUSED_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CONNECTION_REFUSED_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/connection_refused_test + $(Q) $(LDXX) $(LDFLAGS) $(CONNECTION_REFUSED_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/connection_refused_test endif @@ -9261,7 +9261,7 @@ else $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test: $(DNS_RESOLVER_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DNS_RESOLVER_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test + $(Q) $(LDXX) $(LDFLAGS) $(DNS_RESOLVER_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_test endif @@ -9293,7 +9293,7 @@ else $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_ares_resolver_test: $(DNS_RESOLVER_COOLDOWN_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DNS_RESOLVER_COOLDOWN_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_ares_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(DNS_RESOLVER_COOLDOWN_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_ares_resolver_test endif @@ -9325,7 +9325,7 @@ else $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_native_resolver_test: $(DNS_RESOLVER_COOLDOWN_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DNS_RESOLVER_COOLDOWN_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_native_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(DNS_RESOLVER_COOLDOWN_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_cooldown_using_native_resolver_test endif @@ -9357,7 +9357,7 @@ else $(BINDIR)/$(CONFIG)/dns_resolver_test: $(DNS_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DNS_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(DNS_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dns_resolver_test endif @@ -9389,7 +9389,7 @@ else $(BINDIR)/$(CONFIG)/dualstack_socket_test: $(DUALSTACK_SOCKET_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(DUALSTACK_SOCKET_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dualstack_socket_test + $(Q) $(LDXX) $(LDFLAGS) $(DUALSTACK_SOCKET_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/dualstack_socket_test endif @@ -9421,7 +9421,7 @@ else $(BINDIR)/$(CONFIG)/endpoint_pair_test: $(ENDPOINT_PAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ENDPOINT_PAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/endpoint_pair_test + $(Q) $(LDXX) $(LDFLAGS) $(ENDPOINT_PAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/endpoint_pair_test endif @@ -9453,7 +9453,7 @@ else $(BINDIR)/$(CONFIG)/error_test: $(ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/error_test + $(Q) $(LDXX) $(LDFLAGS) $(ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/error_test endif @@ -9485,7 +9485,7 @@ else $(BINDIR)/$(CONFIG)/ev_epollex_linux_test: $(EV_EPOLLEX_LINUX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(EV_EPOLLEX_LINUX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ev_epollex_linux_test + $(Q) $(LDXX) $(LDFLAGS) $(EV_EPOLLEX_LINUX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ev_epollex_linux_test endif @@ -9517,7 +9517,7 @@ else $(BINDIR)/$(CONFIG)/fake_resolver_test: $(FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fake_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fake_resolver_test endif @@ -9550,7 +9550,7 @@ else $(BINDIR)/$(CONFIG)/fake_transport_security_test: $(FAKE_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FAKE_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fake_transport_security_test + $(Q) $(LDXX) $(LDFLAGS) $(FAKE_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fake_transport_security_test endif @@ -9584,7 +9584,7 @@ else $(BINDIR)/$(CONFIG)/fd_conservation_posix_test: $(FD_CONSERVATION_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FD_CONSERVATION_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fd_conservation_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(FD_CONSERVATION_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fd_conservation_posix_test endif @@ -9616,7 +9616,7 @@ else $(BINDIR)/$(CONFIG)/fd_posix_test: $(FD_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FD_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fd_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(FD_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fd_posix_test endif @@ -9648,7 +9648,7 @@ else $(BINDIR)/$(CONFIG)/fling_client: $(FLING_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_client + $(Q) $(LDXX) $(LDFLAGS) $(FLING_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_client endif @@ -9680,7 +9680,7 @@ else $(BINDIR)/$(CONFIG)/fling_server: $(FLING_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_server + $(Q) $(LDXX) $(LDFLAGS) $(FLING_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_server endif @@ -9712,7 +9712,7 @@ else $(BINDIR)/$(CONFIG)/fling_stream_test: $(FLING_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_stream_test + $(Q) $(LDXX) $(LDFLAGS) $(FLING_STREAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_stream_test endif @@ -9744,7 +9744,7 @@ else $(BINDIR)/$(CONFIG)/fling_test: $(FLING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FLING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_test + $(Q) $(LDXX) $(LDFLAGS) $(FLING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fling_test endif @@ -9776,7 +9776,7 @@ else $(BINDIR)/$(CONFIG)/fork_test: $(FORK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(FORK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fork_test + $(Q) $(LDXX) $(LDFLAGS) $(FORK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/fork_test endif @@ -9808,7 +9808,7 @@ else $(BINDIR)/$(CONFIG)/goaway_server_test: $(GOAWAY_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GOAWAY_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/goaway_server_test + $(Q) $(LDXX) $(LDFLAGS) $(GOAWAY_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/goaway_server_test endif @@ -9840,7 +9840,7 @@ else $(BINDIR)/$(CONFIG)/gpr_cpu_test: $(GPR_CPU_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_CPU_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_cpu_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_CPU_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_cpu_test endif @@ -9872,7 +9872,7 @@ else $(BINDIR)/$(CONFIG)/gpr_env_test: $(GPR_ENV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_ENV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_env_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_ENV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_env_test endif @@ -9904,7 +9904,7 @@ else $(BINDIR)/$(CONFIG)/gpr_host_port_test: $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_host_port_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_HOST_PORT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_host_port_test endif @@ -9936,7 +9936,7 @@ else $(BINDIR)/$(CONFIG)/gpr_log_test: $(GPR_LOG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_log_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_log_test endif @@ -9968,7 +9968,7 @@ else $(BINDIR)/$(CONFIG)/gpr_manual_constructor_test: $(GPR_MANUAL_CONSTRUCTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_MANUAL_CONSTRUCTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_manual_constructor_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_MANUAL_CONSTRUCTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_manual_constructor_test endif @@ -10000,7 +10000,7 @@ else $(BINDIR)/$(CONFIG)/gpr_mpscq_test: $(GPR_MPSCQ_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_MPSCQ_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_mpscq_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_MPSCQ_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_mpscq_test endif @@ -10032,7 +10032,7 @@ else $(BINDIR)/$(CONFIG)/gpr_spinlock_test: $(GPR_SPINLOCK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SPINLOCK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_spinlock_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_SPINLOCK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_spinlock_test endif @@ -10064,7 +10064,7 @@ else $(BINDIR)/$(CONFIG)/gpr_string_test: $(GPR_STRING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_STRING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_string_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_STRING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_string_test endif @@ -10096,7 +10096,7 @@ else $(BINDIR)/$(CONFIG)/gpr_sync_test: $(GPR_SYNC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SYNC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_sync_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_SYNC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_sync_test endif @@ -10128,7 +10128,7 @@ else $(BINDIR)/$(CONFIG)/gpr_thd_test: $(GPR_THD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_THD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_thd_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_THD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_thd_test endif @@ -10160,7 +10160,7 @@ else $(BINDIR)/$(CONFIG)/gpr_time_test: $(GPR_TIME_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_TIME_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_time_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_TIME_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_time_test endif @@ -10192,7 +10192,7 @@ else $(BINDIR)/$(CONFIG)/gpr_tls_test: $(GPR_TLS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_TLS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_tls_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_TLS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_tls_test endif @@ -10224,7 +10224,7 @@ else $(BINDIR)/$(CONFIG)/gpr_useful_test: $(GPR_USEFUL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_USEFUL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_useful_test + $(Q) $(LDXX) $(LDFLAGS) $(GPR_USEFUL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_useful_test endif @@ -10256,7 +10256,7 @@ else $(BINDIR)/$(CONFIG)/grpc_auth_context_test: $(GRPC_AUTH_CONTEXT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_AUTH_CONTEXT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_auth_context_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_AUTH_CONTEXT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_auth_context_test endif @@ -10288,7 +10288,7 @@ else $(BINDIR)/$(CONFIG)/grpc_b64_test: $(GRPC_B64_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_B64_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_b64_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_B64_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_b64_test endif @@ -10320,7 +10320,7 @@ else $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test: $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_BYTE_BUFFER_READER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_byte_buffer_reader_test endif @@ -10352,7 +10352,7 @@ else $(BINDIR)/$(CONFIG)/grpc_channel_args_test: $(GRPC_CHANNEL_ARGS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CHANNEL_ARGS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_args_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CHANNEL_ARGS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_args_test endif @@ -10384,7 +10384,7 @@ else $(BINDIR)/$(CONFIG)/grpc_channel_stack_builder_test: $(GRPC_CHANNEL_STACK_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CHANNEL_STACK_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_stack_builder_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CHANNEL_STACK_BUILDER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_stack_builder_test endif @@ -10416,7 +10416,7 @@ else $(BINDIR)/$(CONFIG)/grpc_channel_stack_test: $(GRPC_CHANNEL_STACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CHANNEL_STACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_stack_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CHANNEL_STACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_channel_stack_test endif @@ -10448,7 +10448,7 @@ else $(BINDIR)/$(CONFIG)/grpc_completion_queue_test: $(GRPC_COMPLETION_QUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_completion_queue_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_completion_queue_test endif @@ -10480,7 +10480,7 @@ else $(BINDIR)/$(CONFIG)/grpc_completion_queue_threading_test: $(GRPC_COMPLETION_QUEUE_THREADING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_THREADING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_completion_queue_threading_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_COMPLETION_QUEUE_THREADING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_completion_queue_threading_test endif @@ -10512,7 +10512,7 @@ else $(BINDIR)/$(CONFIG)/grpc_control_plane_credentials_test: $(GRPC_CONTROL_PLANE_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CONTROL_PLANE_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_control_plane_credentials_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CONTROL_PLANE_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_control_plane_credentials_test endif @@ -10545,7 +10545,7 @@ else $(BINDIR)/$(CONFIG)/grpc_create_jwt: $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_create_jwt + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_create_jwt endif @@ -10579,7 +10579,7 @@ else $(BINDIR)/$(CONFIG)/grpc_credentials_test: $(GRPC_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_credentials_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_credentials_test endif @@ -10611,7 +10611,7 @@ else $(BINDIR)/$(CONFIG)/grpc_ipv6_loopback_available_test: $(GRPC_IPV6_LOOPBACK_AVAILABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_IPV6_LOOPBACK_AVAILABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_ipv6_loopback_available_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_IPV6_LOOPBACK_AVAILABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_ipv6_loopback_available_test endif @@ -10643,7 +10643,7 @@ else $(BINDIR)/$(CONFIG)/grpc_json_token_test: $(GRPC_JSON_TOKEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_JSON_TOKEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_json_token_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_JSON_TOKEN_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_json_token_test endif @@ -10675,7 +10675,7 @@ else $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test: $(GRPC_JWT_VERIFIER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_JWT_VERIFIER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_JWT_VERIFIER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test endif @@ -10708,7 +10708,7 @@ else $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token: $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token endif @@ -10742,7 +10742,7 @@ else $(BINDIR)/$(CONFIG)/grpc_security_connector_test: $(GRPC_SECURITY_CONNECTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_SECURITY_CONNECTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_security_connector_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_SECURITY_CONNECTOR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_security_connector_test endif @@ -10774,7 +10774,7 @@ else $(BINDIR)/$(CONFIG)/grpc_ssl_credentials_test: $(GRPC_SSL_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_SSL_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_ssl_credentials_test + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_SSL_CREDENTIALS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_ssl_credentials_test endif @@ -10807,7 +10807,7 @@ else $(BINDIR)/$(CONFIG)/grpc_verify_jwt: $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_verify_jwt + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_verify_jwt endif @@ -10841,7 +10841,7 @@ else $(BINDIR)/$(CONFIG)/handshake_client_ssl: $(HANDSHAKE_CLIENT_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_CLIENT_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_client_ssl + $(Q) $(LDXX) $(LDFLAGS) $(HANDSHAKE_CLIENT_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_client_ssl endif @@ -10874,7 +10874,7 @@ else $(BINDIR)/$(CONFIG)/handshake_server_ssl: $(HANDSHAKE_SERVER_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_SERVER_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_server_ssl + $(Q) $(LDXX) $(LDFLAGS) $(HANDSHAKE_SERVER_SSL_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_server_ssl endif @@ -10909,7 +10909,7 @@ else $(BINDIR)/$(CONFIG)/handshake_server_with_readahead_handshaker: $(HANDSHAKE_SERVER_WITH_READAHEAD_HANDSHAKER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_SERVER_WITH_READAHEAD_HANDSHAKER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_server_with_readahead_handshaker + $(Q) $(LDXX) $(LDFLAGS) $(HANDSHAKE_SERVER_WITH_READAHEAD_HANDSHAKER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_server_with_readahead_handshaker endif @@ -10943,7 +10943,7 @@ else $(BINDIR)/$(CONFIG)/handshake_verify_peer_options: $(HANDSHAKE_VERIFY_PEER_OPTIONS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HANDSHAKE_VERIFY_PEER_OPTIONS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_verify_peer_options + $(Q) $(LDXX) $(LDFLAGS) $(HANDSHAKE_VERIFY_PEER_OPTIONS_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/handshake_verify_peer_options endif @@ -10975,7 +10975,7 @@ else $(BINDIR)/$(CONFIG)/histogram_test: $(HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/histogram_test + $(Q) $(LDXX) $(LDFLAGS) $(HISTOGRAM_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/histogram_test endif @@ -11039,7 +11039,7 @@ else $(BINDIR)/$(CONFIG)/hpack_parser_test: $(HPACK_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HPACK_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_parser_test + $(Q) $(LDXX) $(LDFLAGS) $(HPACK_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_parser_test endif @@ -11071,7 +11071,7 @@ else $(BINDIR)/$(CONFIG)/hpack_table_test: $(HPACK_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HPACK_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_table_test + $(Q) $(LDXX) $(LDFLAGS) $(HPACK_TABLE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_table_test endif @@ -11103,7 +11103,7 @@ else $(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_parser_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_parser_test endif @@ -11199,7 +11199,7 @@ else $(BINDIR)/$(CONFIG)/httpcli_format_request_test: $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_format_request_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTPCLI_FORMAT_REQUEST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_format_request_test endif @@ -11231,7 +11231,7 @@ else $(BINDIR)/$(CONFIG)/httpcli_test: $(HTTPCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTPCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpcli_test endif @@ -11263,7 +11263,7 @@ else $(BINDIR)/$(CONFIG)/httpscli_test: $(HTTPSCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTPSCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpscli_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTPSCLI_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/httpscli_test endif @@ -11295,7 +11295,7 @@ else $(BINDIR)/$(CONFIG)/init_test: $(INIT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(INIT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/init_test + $(Q) $(LDXX) $(LDFLAGS) $(INIT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/init_test endif @@ -11327,7 +11327,7 @@ else $(BINDIR)/$(CONFIG)/inproc_callback_test: $(INPROC_CALLBACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(INPROC_CALLBACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/inproc_callback_test + $(Q) $(LDXX) $(LDFLAGS) $(INPROC_CALLBACK_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/inproc_callback_test endif @@ -11359,7 +11359,7 @@ else $(BINDIR)/$(CONFIG)/invalid_call_argument_test: $(INVALID_CALL_ARGUMENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(INVALID_CALL_ARGUMENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/invalid_call_argument_test + $(Q) $(LDXX) $(LDFLAGS) $(INVALID_CALL_ARGUMENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/invalid_call_argument_test endif @@ -11423,7 +11423,7 @@ else $(BINDIR)/$(CONFIG)/json_rewrite: $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite + $(Q) $(LDXX) $(LDFLAGS) $(JSON_REWRITE_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite endif @@ -11455,7 +11455,7 @@ else $(BINDIR)/$(CONFIG)/json_rewrite_test: $(JSON_REWRITE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_REWRITE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite_test + $(Q) $(LDXX) $(LDFLAGS) $(JSON_REWRITE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_rewrite_test endif @@ -11487,7 +11487,7 @@ else $(BINDIR)/$(CONFIG)/json_stream_error_test: $(JSON_STREAM_ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_STREAM_ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_stream_error_test + $(Q) $(LDXX) $(LDFLAGS) $(JSON_STREAM_ERROR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_stream_error_test endif @@ -11519,7 +11519,7 @@ else $(BINDIR)/$(CONFIG)/json_test: $(JSON_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_test + $(Q) $(LDXX) $(LDFLAGS) $(JSON_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_test endif @@ -11551,7 +11551,7 @@ else $(BINDIR)/$(CONFIG)/lame_client_test: $(LAME_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(LAME_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/lame_client_test + $(Q) $(LDXX) $(LDFLAGS) $(LAME_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/lame_client_test endif @@ -11583,7 +11583,7 @@ else $(BINDIR)/$(CONFIG)/load_file_test: $(LOAD_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(LOAD_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/load_file_test + $(Q) $(LDXX) $(LDFLAGS) $(LOAD_FILE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/load_file_test endif @@ -11615,7 +11615,7 @@ else $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark: $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark + $(Q) $(LDXX) $(LDFLAGS) $(LOW_LEVEL_PING_PONG_BENCHMARK_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark endif @@ -11647,7 +11647,7 @@ else $(BINDIR)/$(CONFIG)/memory_usage_client: $(MEMORY_USAGE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MEMORY_USAGE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_client + $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_CLIENT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_client endif @@ -11679,7 +11679,7 @@ else $(BINDIR)/$(CONFIG)/memory_usage_server: $(MEMORY_USAGE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MEMORY_USAGE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_server + $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_server endif @@ -11711,7 +11711,7 @@ else $(BINDIR)/$(CONFIG)/memory_usage_test: $(MEMORY_USAGE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MEMORY_USAGE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_test + $(Q) $(LDXX) $(LDFLAGS) $(MEMORY_USAGE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/memory_usage_test endif @@ -11743,7 +11743,7 @@ else $(BINDIR)/$(CONFIG)/message_compress_test: $(MESSAGE_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MESSAGE_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/message_compress_test + $(Q) $(LDXX) $(LDFLAGS) $(MESSAGE_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/message_compress_test endif @@ -11775,7 +11775,7 @@ else $(BINDIR)/$(CONFIG)/minimal_stack_is_minimal_test: $(MINIMAL_STACK_IS_MINIMAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MINIMAL_STACK_IS_MINIMAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/minimal_stack_is_minimal_test + $(Q) $(LDXX) $(LDFLAGS) $(MINIMAL_STACK_IS_MINIMAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/minimal_stack_is_minimal_test endif @@ -11807,7 +11807,7 @@ else $(BINDIR)/$(CONFIG)/mpmcqueue_test: $(MPMCQUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MPMCQUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/mpmcqueue_test + $(Q) $(LDXX) $(LDFLAGS) $(MPMCQUEUE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/mpmcqueue_test endif @@ -11839,7 +11839,7 @@ else $(BINDIR)/$(CONFIG)/multiple_server_queues_test: $(MULTIPLE_SERVER_QUEUES_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MULTIPLE_SERVER_QUEUES_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/multiple_server_queues_test + $(Q) $(LDXX) $(LDFLAGS) $(MULTIPLE_SERVER_QUEUES_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/multiple_server_queues_test endif @@ -11871,7 +11871,7 @@ else $(BINDIR)/$(CONFIG)/murmur_hash_test: $(MURMUR_HASH_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(MURMUR_HASH_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/murmur_hash_test + $(Q) $(LDXX) $(LDFLAGS) $(MURMUR_HASH_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/murmur_hash_test endif @@ -11967,7 +11967,7 @@ else $(BINDIR)/$(CONFIG)/no_server_test: $(NO_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(NO_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/no_server_test + $(Q) $(LDXX) $(LDFLAGS) $(NO_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/no_server_test endif @@ -11999,7 +11999,7 @@ else $(BINDIR)/$(CONFIG)/num_external_connectivity_watchers_test: $(NUM_EXTERNAL_CONNECTIVITY_WATCHERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(NUM_EXTERNAL_CONNECTIVITY_WATCHERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/num_external_connectivity_watchers_test + $(Q) $(LDXX) $(LDFLAGS) $(NUM_EXTERNAL_CONNECTIVITY_WATCHERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/num_external_connectivity_watchers_test endif @@ -12031,7 +12031,7 @@ else $(BINDIR)/$(CONFIG)/parse_address_test: $(PARSE_ADDRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PARSE_ADDRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/parse_address_test + $(Q) $(LDXX) $(LDFLAGS) $(PARSE_ADDRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/parse_address_test endif @@ -12063,7 +12063,7 @@ else $(BINDIR)/$(CONFIG)/parse_address_with_named_scope_id_test: $(PARSE_ADDRESS_WITH_NAMED_SCOPE_ID_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PARSE_ADDRESS_WITH_NAMED_SCOPE_ID_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/parse_address_with_named_scope_id_test + $(Q) $(LDXX) $(LDFLAGS) $(PARSE_ADDRESS_WITH_NAMED_SCOPE_ID_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/parse_address_with_named_scope_id_test endif @@ -12159,7 +12159,7 @@ else $(BINDIR)/$(CONFIG)/percent_encoding_test: $(PERCENT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PERCENT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_encoding_test + $(Q) $(LDXX) $(LDFLAGS) $(PERCENT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_encoding_test endif @@ -12191,7 +12191,7 @@ else $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_posix_test: $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_posix_test endif @@ -12223,7 +12223,7 @@ else $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_test: $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_ARES_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_ares_resolver_test endif @@ -12255,7 +12255,7 @@ else $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_posix_test: $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_posix_test endif @@ -12287,7 +12287,7 @@ else $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_test: $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(RESOLVE_ADDRESS_USING_NATIVE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resolve_address_using_native_resolver_test endif @@ -12319,7 +12319,7 @@ else $(BINDIR)/$(CONFIG)/resource_quota_test: $(RESOURCE_QUOTA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(RESOURCE_QUOTA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resource_quota_test + $(Q) $(LDXX) $(LDFLAGS) $(RESOURCE_QUOTA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resource_quota_test endif @@ -12351,7 +12351,7 @@ else $(BINDIR)/$(CONFIG)/secure_channel_create_test: $(SECURE_CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SECURE_CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/secure_channel_create_test + $(Q) $(LDXX) $(LDFLAGS) $(SECURE_CHANNEL_CREATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/secure_channel_create_test endif @@ -12383,7 +12383,7 @@ else $(BINDIR)/$(CONFIG)/secure_endpoint_test: $(SECURE_ENDPOINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SECURE_ENDPOINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/secure_endpoint_test + $(Q) $(LDXX) $(LDFLAGS) $(SECURE_ENDPOINT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/secure_endpoint_test endif @@ -12415,7 +12415,7 @@ else $(BINDIR)/$(CONFIG)/sequential_connectivity_test: $(SEQUENTIAL_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SEQUENTIAL_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sequential_connectivity_test + $(Q) $(LDXX) $(LDFLAGS) $(SEQUENTIAL_CONNECTIVITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sequential_connectivity_test endif @@ -12447,7 +12447,7 @@ else $(BINDIR)/$(CONFIG)/server_chttp2_test: $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_chttp2_test + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_chttp2_test endif @@ -12511,7 +12511,7 @@ else $(BINDIR)/$(CONFIG)/server_test: $(SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_test + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_test endif @@ -12543,7 +12543,7 @@ else $(BINDIR)/$(CONFIG)/slice_buffer_test: $(SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_buffer_test + $(Q) $(LDXX) $(LDFLAGS) $(SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_buffer_test endif @@ -12575,7 +12575,7 @@ else $(BINDIR)/$(CONFIG)/slice_string_helpers_test: $(SLICE_STRING_HELPERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SLICE_STRING_HELPERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_string_helpers_test + $(Q) $(LDXX) $(LDFLAGS) $(SLICE_STRING_HELPERS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_string_helpers_test endif @@ -12607,7 +12607,7 @@ else $(BINDIR)/$(CONFIG)/slice_test: $(SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_test + $(Q) $(LDXX) $(LDFLAGS) $(SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/slice_test endif @@ -12639,7 +12639,7 @@ else $(BINDIR)/$(CONFIG)/sockaddr_resolver_test: $(SOCKADDR_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SOCKADDR_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sockaddr_resolver_test + $(Q) $(LDXX) $(LDFLAGS) $(SOCKADDR_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sockaddr_resolver_test endif @@ -12671,7 +12671,7 @@ else $(BINDIR)/$(CONFIG)/sockaddr_utils_test: $(SOCKADDR_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SOCKADDR_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sockaddr_utils_test + $(Q) $(LDXX) $(LDFLAGS) $(SOCKADDR_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/sockaddr_utils_test endif @@ -12703,7 +12703,7 @@ else $(BINDIR)/$(CONFIG)/socket_utils_test: $(SOCKET_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SOCKET_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/socket_utils_test + $(Q) $(LDXX) $(LDFLAGS) $(SOCKET_UTILS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/socket_utils_test endif @@ -12768,7 +12768,7 @@ else $(BINDIR)/$(CONFIG)/ssl_transport_security_test: $(SSL_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SSL_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ssl_transport_security_test + $(Q) $(LDXX) $(LDFLAGS) $(SSL_TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ssl_transport_security_test endif @@ -12802,7 +12802,7 @@ else $(BINDIR)/$(CONFIG)/status_conversion_test: $(STATUS_CONVERSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(STATUS_CONVERSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/status_conversion_test + $(Q) $(LDXX) $(LDFLAGS) $(STATUS_CONVERSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/status_conversion_test endif @@ -12834,7 +12834,7 @@ else $(BINDIR)/$(CONFIG)/stream_compression_test: $(STREAM_COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(STREAM_COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/stream_compression_test + $(Q) $(LDXX) $(LDFLAGS) $(STREAM_COMPRESSION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/stream_compression_test endif @@ -12866,7 +12866,7 @@ else $(BINDIR)/$(CONFIG)/stream_owned_slice_test: $(STREAM_OWNED_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(STREAM_OWNED_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/stream_owned_slice_test + $(Q) $(LDXX) $(LDFLAGS) $(STREAM_OWNED_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/stream_owned_slice_test endif @@ -12898,7 +12898,7 @@ else $(BINDIR)/$(CONFIG)/tcp_client_posix_test: $(TCP_CLIENT_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_CLIENT_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_client_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(TCP_CLIENT_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_client_posix_test endif @@ -12930,7 +12930,7 @@ else $(BINDIR)/$(CONFIG)/tcp_client_uv_test: $(TCP_CLIENT_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_CLIENT_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_client_uv_test + $(Q) $(LDXX) $(LDFLAGS) $(TCP_CLIENT_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_client_uv_test endif @@ -12962,7 +12962,7 @@ else $(BINDIR)/$(CONFIG)/tcp_posix_test: $(TCP_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(TCP_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_posix_test endif @@ -12994,7 +12994,7 @@ else $(BINDIR)/$(CONFIG)/tcp_server_posix_test: $(TCP_SERVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_SERVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_server_posix_test + $(Q) $(LDXX) $(LDFLAGS) $(TCP_SERVER_POSIX_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_server_posix_test endif @@ -13026,7 +13026,7 @@ else $(BINDIR)/$(CONFIG)/tcp_server_uv_test: $(TCP_SERVER_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TCP_SERVER_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_server_uv_test + $(Q) $(LDXX) $(LDFLAGS) $(TCP_SERVER_UV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tcp_server_uv_test endif @@ -13058,7 +13058,7 @@ else $(BINDIR)/$(CONFIG)/threadpool_test: $(THREADPOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(THREADPOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/threadpool_test + $(Q) $(LDXX) $(LDFLAGS) $(THREADPOOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/threadpool_test endif @@ -13090,7 +13090,7 @@ else $(BINDIR)/$(CONFIG)/time_averaged_stats_test: $(TIME_AVERAGED_STATS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIME_AVERAGED_STATS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/time_averaged_stats_test + $(Q) $(LDXX) $(LDFLAGS) $(TIME_AVERAGED_STATS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/time_averaged_stats_test endif @@ -13122,7 +13122,7 @@ else $(BINDIR)/$(CONFIG)/timeout_encoding_test: $(TIMEOUT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIMEOUT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timeout_encoding_test + $(Q) $(LDXX) $(LDFLAGS) $(TIMEOUT_ENCODING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timeout_encoding_test endif @@ -13154,7 +13154,7 @@ else $(BINDIR)/$(CONFIG)/timer_heap_test: $(TIMER_HEAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIMER_HEAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timer_heap_test + $(Q) $(LDXX) $(LDFLAGS) $(TIMER_HEAP_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timer_heap_test endif @@ -13186,7 +13186,7 @@ else $(BINDIR)/$(CONFIG)/timer_list_test: $(TIMER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TIMER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timer_list_test + $(Q) $(LDXX) $(LDFLAGS) $(TIMER_LIST_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/timer_list_test endif @@ -13218,7 +13218,7 @@ else $(BINDIR)/$(CONFIG)/transport_connectivity_state_test: $(TRANSPORT_CONNECTIVITY_STATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_CONNECTIVITY_STATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_connectivity_state_test + $(Q) $(LDXX) $(LDFLAGS) $(TRANSPORT_CONNECTIVITY_STATE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_connectivity_state_test endif @@ -13250,7 +13250,7 @@ else $(BINDIR)/$(CONFIG)/transport_metadata_test: $(TRANSPORT_METADATA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_METADATA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_metadata_test + $(Q) $(LDXX) $(LDFLAGS) $(TRANSPORT_METADATA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_metadata_test endif @@ -13282,7 +13282,7 @@ else $(BINDIR)/$(CONFIG)/transport_security_test: $(TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_security_test + $(Q) $(LDXX) $(LDFLAGS) $(TRANSPORT_SECURITY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_security_test endif @@ -13314,7 +13314,7 @@ else $(BINDIR)/$(CONFIG)/udp_server_test: $(UDP_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(UDP_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/udp_server_test + $(Q) $(LDXX) $(LDFLAGS) $(UDP_SERVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/udp_server_test endif @@ -13378,7 +13378,7 @@ else $(BINDIR)/$(CONFIG)/uri_parser_test: $(URI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(URI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/uri_parser_test + $(Q) $(LDXX) $(LDFLAGS) $(URI_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/uri_parser_test endif @@ -20127,7 +20127,7 @@ else $(BINDIR)/$(CONFIG)/public_headers_must_be_c89: $(PUBLIC_HEADERS_MUST_BE_C89_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PUBLIC_HEADERS_MUST_BE_C89_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 + $(Q) $(LDXX) $(LDFLAGS) $(PUBLIC_HEADERS_MUST_BE_C89_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 endif @@ -20796,7 +20796,7 @@ else $(BINDIR)/$(CONFIG)/bad_ssl_cert_server: $(BAD_SSL_CERT_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BAD_SSL_CERT_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_cert_server + $(Q) $(LDXX) $(LDFLAGS) $(BAD_SSL_CERT_SERVER_OBJS) $(LIBDIR)/$(CONFIG)/libbad_ssl_test_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_cert_server endif @@ -20828,7 +20828,7 @@ else $(BINDIR)/$(CONFIG)/bad_ssl_cert_test: $(BAD_SSL_CERT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BAD_SSL_CERT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_cert_test + $(Q) $(LDXX) $(LDFLAGS) $(BAD_SSL_CERT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_ssl_cert_test endif @@ -20860,7 +20860,7 @@ else $(BINDIR)/$(CONFIG)/h2_census_test: $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_CENSUS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_census_test endif @@ -20892,7 +20892,7 @@ else $(BINDIR)/$(CONFIG)/h2_compress_test: $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_COMPRESS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_compress_test endif @@ -20924,7 +20924,7 @@ else $(BINDIR)/$(CONFIG)/h2_fakesec_test: $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FAKESEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fakesec_test endif @@ -20956,7 +20956,7 @@ else $(BINDIR)/$(CONFIG)/h2_fd_test: $(H2_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fd_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fd_test endif @@ -20988,7 +20988,7 @@ else $(BINDIR)/$(CONFIG)/h2_full_test: $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full_test endif @@ -21020,7 +21020,7 @@ else $(BINDIR)/$(CONFIG)/h2_full+pipe_test: $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+PIPE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_test endif @@ -21052,7 +21052,7 @@ else $(BINDIR)/$(CONFIG)/h2_full+trace_test: $(H2_FULL+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+trace_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+trace_test endif @@ -21084,7 +21084,7 @@ else $(BINDIR)/$(CONFIG)/h2_full+workarounds_test: $(H2_FULL+WORKAROUNDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+WORKAROUNDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+workarounds_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+WORKAROUNDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_full+workarounds_test endif @@ -21116,7 +21116,7 @@ else $(BINDIR)/$(CONFIG)/h2_http_proxy_test: $(H2_HTTP_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_HTTP_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_http_proxy_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_HTTP_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_http_proxy_test endif @@ -21148,7 +21148,7 @@ else $(BINDIR)/$(CONFIG)/h2_local_ipv4_test: $(H2_LOCAL_IPV4_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_LOCAL_IPV4_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_ipv4_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_LOCAL_IPV4_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_ipv4_test endif @@ -21180,7 +21180,7 @@ else $(BINDIR)/$(CONFIG)/h2_local_ipv6_test: $(H2_LOCAL_IPV6_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_LOCAL_IPV6_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_ipv6_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_LOCAL_IPV6_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_ipv6_test endif @@ -21212,7 +21212,7 @@ else $(BINDIR)/$(CONFIG)/h2_local_uds_test: $(H2_LOCAL_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_LOCAL_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_uds_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_LOCAL_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_local_uds_test endif @@ -21244,7 +21244,7 @@ else $(BINDIR)/$(CONFIG)/h2_oauth2_test: $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_OAUTH2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_oauth2_test endif @@ -21276,7 +21276,7 @@ else $(BINDIR)/$(CONFIG)/h2_proxy_test: $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_proxy_test endif @@ -21308,7 +21308,7 @@ else $(BINDIR)/$(CONFIG)/h2_sockpair_test: $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_test endif @@ -21340,7 +21340,7 @@ else $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test: $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_test endif @@ -21372,7 +21372,7 @@ else $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test: $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_test endif @@ -21404,7 +21404,7 @@ else $(BINDIR)/$(CONFIG)/h2_spiffe_test: $(H2_SPIFFE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SPIFFE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_spiffe_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SPIFFE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_spiffe_test endif @@ -21436,7 +21436,7 @@ else $(BINDIR)/$(CONFIG)/h2_ssl_test: $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_test endif @@ -21468,7 +21468,7 @@ else $(BINDIR)/$(CONFIG)/h2_ssl_cred_reload_test: $(H2_SSL_CRED_RELOAD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_CRED_RELOAD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_cred_reload_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SSL_CRED_RELOAD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_cred_reload_test endif @@ -21500,7 +21500,7 @@ else $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test: $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SSL_PROXY_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test endif @@ -21532,7 +21532,7 @@ else $(BINDIR)/$(CONFIG)/h2_uds_test: $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_UDS_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_uds_test endif @@ -21564,7 +21564,7 @@ else $(BINDIR)/$(CONFIG)/inproc_test: $(INPROC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(INPROC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/inproc_test + $(Q) $(LDXX) $(LDFLAGS) $(INPROC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/inproc_test endif @@ -21588,7 +21588,7 @@ H2_CENSUS_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $( $(BINDIR)/$(CONFIG)/h2_census_nosec_test: $(H2_CENSUS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_CENSUS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_census_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_CENSUS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_census_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_census.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21608,7 +21608,7 @@ H2_COMPRESS_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(BINDIR)/$(CONFIG)/h2_compress_nosec_test: $(H2_COMPRESS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_COMPRESS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_compress_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_COMPRESS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_compress_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_compress.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21628,7 +21628,7 @@ H2_FD_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(base $(BINDIR)/$(CONFIG)/h2_fd_nosec_test: $(H2_FD_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FD_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_fd_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FD_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_fd_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fd.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21648,7 +21648,7 @@ H2_FULL_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(ba $(BINDIR)/$(CONFIG)/h2_full_nosec_test: $(H2_FULL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21668,7 +21668,7 @@ H2_FULL+PIPE_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test: $(H2_FULL+PIPE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+PIPE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+PIPE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+pipe.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21688,7 +21688,7 @@ H2_FULL+TRACE_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test: $(H2_FULL+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21708,7 +21708,7 @@ H2_FULL+WORKAROUNDS_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuf $(BINDIR)/$(CONFIG)/h2_full+workarounds_nosec_test: $(H2_FULL+WORKAROUNDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_FULL+WORKAROUNDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+workarounds_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_FULL+WORKAROUNDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_full+workarounds_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_full+workarounds.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21728,7 +21728,7 @@ H2_HTTP_PROXY_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o $(BINDIR)/$(CONFIG)/h2_http_proxy_nosec_test: $(H2_HTTP_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_HTTP_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_http_proxy_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_HTTP_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_http_proxy_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_http_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21748,7 +21748,7 @@ H2_PROXY_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(b $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test: $(H2_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_PROXY_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_proxy.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21768,7 +21768,7 @@ H2_SOCKPAIR_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test: $(H2_SOCKPAIR_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21788,7 +21788,7 @@ H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test: $(H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR+TRACE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair+trace.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21808,7 +21808,7 @@ H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffi $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test: $(H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_SOCKPAIR_1BYTE_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_sockpair_1byte_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_sockpair_1byte.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -21828,7 +21828,7 @@ H2_UDS_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(bas $(BINDIR)/$(CONFIG)/h2_uds_nosec_test: $(H2_UDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(H2_UDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uds_nosec_test + $(Q) $(LDXX) $(LDFLAGS) $(H2_UDS_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_uds_nosec_test $(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_uds.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr.a @@ -22158,7 +22158,7 @@ else $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry: $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry endif @@ -22193,7 +22193,7 @@ else $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry: $(API_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(API_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(API_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry endif @@ -22228,7 +22228,7 @@ else $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(CLIENT_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry endif @@ -22263,7 +22263,7 @@ else $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry: $(HPACK_PARSER_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HPACK_PARSER_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(HPACK_PARSER_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry endif @@ -22298,7 +22298,7 @@ else $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry: $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry endif @@ -22333,7 +22333,7 @@ else $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry: $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry endif @@ -22368,7 +22368,7 @@ else $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry: $(JSON_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(JSON_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(JSON_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry endif @@ -22403,7 +22403,7 @@ else $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry: $(NANOPB_FUZZER_RESPONSE_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(NANOPB_FUZZER_RESPONSE_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(NANOPB_FUZZER_RESPONSE_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry endif @@ -22438,7 +22438,7 @@ else $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry: $(NANOPB_FUZZER_SERVERLIST_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(NANOPB_FUZZER_SERVERLIST_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(NANOPB_FUZZER_SERVERLIST_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry endif @@ -22473,7 +22473,7 @@ else $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry: $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(PERCENT_DECODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry endif @@ -22508,7 +22508,7 @@ else $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry: $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(PERCENT_ENCODE_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry endif @@ -22543,7 +22543,7 @@ else $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry: $(SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry endif @@ -22578,7 +22578,7 @@ else $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry: $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(SSL_SERVER_FUZZER_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry endif @@ -22613,7 +22613,7 @@ else $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry: $(URI_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(URI_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry + $(Q) $(LDXX) $(LDFLAGS) $(URI_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry endif diff --git a/config.m4 b/config.m4 index effefa9b561..4a8651dae38 100644 --- a/config.m4 +++ b/config.m4 @@ -24,8 +24,10 @@ if test "$PHP_GRPC" != "no"; then case $host in *darwin*) + PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD) ;; *) + PHP_ADD_LIBRARY(stdc++,1,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt) ;; diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index bab57657a00..ca1d0aeef72 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -32,8 +32,7 @@ * in-house library if possible. (e.g. std::map) */ #ifndef GRPC_USE_CPP_STD_LIB -/* Default value will be 1 once all tests become green. */ -#define GRPC_USE_CPP_STD_LIB 0 +#define GRPC_USE_CPP_STD_LIB 1 #endif /* Get windows.h included everywhere (we need it) */ diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index 9ec2c7cf04c..1af93ceecad 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -42,7 +42,8 @@ if test "$PHP_GRPC" != "no"; then dnl PHP_ADD_LIBRARY(pthread,,GRPC_SHARED_LIBADD) GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_ADD_LIBRARY(pthread) - + PHP_ADD_LIBRARY(stdc++,,GRPC_SHARED_LIBADD) + PHP_ADD_LIBRARY(stdc++) PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(dl) diff --git a/src/ruby/ext/grpc/rb_enable_cpp.cc b/src/ruby/ext/grpc/rb_enable_cpp.cc new file mode 100644 index 00000000000..f44e4f515a7 --- /dev/null +++ b/src/ruby/ext/grpc/rb_enable_cpp.cc @@ -0,0 +1,22 @@ +/* + * + * Copyright 2019 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include + +// This is a dummy C++ source file to trigger ruby extension builder to +// pick C++ rather than C linker to link with c++ library properly. diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index b6a0e83056f..16fc78d99ae 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -174,11 +174,6 @@ endif() if (_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_IOS) - # C core has C++ source code, but should not depend on libstc++ (for better portability). - # We need to use a few tricks to convince cmake to do that. - # https://stackoverflow.com/questions/15058403/how-to-stop-cmake-from-linking-against-libstdc - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") - # Exceptions and RTTI must be off to avoid dependency on libstdc++ set(_gRPC_CORE_NOSTDCXX_FLAGS -fno-exceptions -fno-rtti) else() set(_gRPC_CORE_NOSTDCXX_FLAGS "") @@ -444,14 +439,6 @@ PRIVATE <%text>${_gRPC_PROTO_GENS_DIR} % endif ) - % if lib.language in ['c', 'csharp']: - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(${lib.name} PROPERTIES LINKER_LANGUAGE C) - # only use the flags for C++ source files - target_compile_options(${lib.name} PRIVATE <%text>$<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() - % endif % if len(get_deps(lib)) > 0: target_link_libraries(${lib.name} % for dep in get_deps(lib): @@ -550,13 +537,6 @@ % endfor ) - % if tgt.language in ['c', 'csharp']: - # avoid dependency on libstdc++ - if (_gRPC_CORE_NOSTDCXX_FLAGS) - set_target_properties(${tgt.name} PROPERTIES LINKER_LANGUAGE C) - target_compile_options(${tgt.name} PRIVATE <%text>$<$:${_gRPC_CORE_NOSTDCXX_FLAGS}>) - endif() - % endif % endif diff --git a/templates/Makefile.template b/templates/Makefile.template index b17423cc4aa..bd8874c8154 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1588,7 +1588,7 @@ if lib.language == 'c++': ld = '$(LDXX)' else: - ld = '$(LD)' + ld = '$(LDXX)' out_mingbase = '$(LIBDIR)/$(CONFIG)/' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')' out_libbase = '$(LIBDIR)/$(CONFIG)/lib' + lib.name + '$(SHARED_VERSION_' + lang_to_var[lib.language] + ')' @@ -1781,7 +1781,7 @@ ## C-only targets specificities. $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) \ + $(Q) $(LDXX) $(LDFLAGS) \ % if not has_no_sources: $(${tgt.name.upper()}_OBJS)\ % endif diff --git a/templates/config.m4.template b/templates/config.m4.template index 4dbeeafb86a..f13ac75914f 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -26,8 +26,10 @@ case $host in *darwin*) + PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD) ;; *) + PHP_ADD_LIBRARY(stdc++,1,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt) ;; From c831a28dbd694f929fbbc0a4ac88fc4656d0caf3 Mon Sep 17 00:00:00 2001 From: Juanli Shen Date: Mon, 2 Sep 2019 20:44:32 -0700 Subject: [PATCH 094/120] Organize test cases for xds test --- test/cpp/end2end/xds_end2end_test.cc | 413 ++++++++++++++------------- 1 file changed, 218 insertions(+), 195 deletions(-) diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 1c073de1b12..17436bbc13a 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -914,6 +914,8 @@ class XdsResolverTest : public XdsEnd2endTest { XdsResolverTest() : XdsEnd2endTest(0, 0, 0) {} }; +// Tests that if the "xds-experimental" scheme is used, xDS resolver will be +// used. TEST_F(XdsResolverTest, XdsResolverIsUsed) { // Use xds-experimental scheme in URI. ResetStub(0, "", "xds-experimental"); @@ -923,12 +925,14 @@ TEST_F(XdsResolverTest, XdsResolverIsUsed) { EXPECT_EQ("xds_experimental", channel_->GetLoadBalancingPolicyName()); } -class SingleBalancerTest : public XdsEnd2endTest { +class BasicTest : public XdsEnd2endTest { public: - SingleBalancerTest() : XdsEnd2endTest(4, 1, 0) {} + BasicTest() : XdsEnd2endTest(4, 1, 0) {} }; -TEST_F(SingleBalancerTest, Vanilla) { +// Tests that the balancer sends the correct response to the client, and the +// client sends RPCs to the backends using the default child policy. +TEST_F(BasicTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcsPerAddress = 100; @@ -954,7 +958,9 @@ TEST_F(SingleBalancerTest, Vanilla) { EXPECT_EQ("xds_experimental", channel_->GetLoadBalancingPolicyName()); } -TEST_F(SingleBalancerTest, SameBackendListedMultipleTimes) { +// Tests that subchannel sharing works when the same backend is listed multiple +// times. +TEST_F(BasicTest, SameBackendListedMultipleTimes) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); // Same backend listed twice. @@ -976,55 +982,8 @@ TEST_F(SingleBalancerTest, SameBackendListedMultipleTimes) { EXPECT_EQ(1UL, backends_[0]->backend_service()->clients().size()); } -TEST_F(SingleBalancerTest, SecureNaming) { - // TODO(juanlishen): Use separate fake creds for the balancer channel. - ResetStub(0, kApplicationTargetName_ + ";lb"); - SetNextResolution({}, kDefaultServiceConfig_.c_str()); - SetNextResolutionForLbChannel({balancers_[0]->port()}); - const size_t kNumRpcsPerAddress = 100; - EdsServiceImpl::ResponseArgs args({ - {"locality0", GetBackendPorts()}, - }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - // Make sure that trying to connect works without a call. - channel_->GetState(true /* try_to_connect */); - // We need to wait for all backends to come online. - WaitForAllBackends(); - // Send kNumRpcsPerAddress RPCs per server. - CheckRpcSendOk(kNumRpcsPerAddress * num_backends_); - - // Each backend should have gotten 100 requests. - for (size_t i = 0; i < backends_.size(); ++i) { - EXPECT_EQ(kNumRpcsPerAddress, - backends_[i]->backend_service()->request_count()); - } - // The EDS service got a single request, and sent a single response. - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); -} - -TEST_F(SingleBalancerTest, SecureNamingDeathTest) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - // Make sure that we blow up (via abort() from the security connector) when - // the name from the balancer doesn't match expectations. - ASSERT_DEATH_IF_SUPPORTED( - { - ResetStub(0, kApplicationTargetName_ + ";lb"); - SetNextResolution({}, - "{\n" - " \"loadBalancingConfig\":[\n" - " { \"does_not_exist\":{} },\n" - " { \"xds_experimental\":{ \"balancerName\": " - "\"fake:///wrong_lb\" } }\n" - " ]\n" - "}"); - SetNextResolutionForLbChannel({balancers_[0]->port()}); - channel_->WaitForConnected(grpc_timeout_seconds_to_deadline(1)); - }, - ""); -} - -TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) { +// Tests that RPCs will be blocked until a non-empty serverlist is received. +TEST_F(BasicTest, InitiallyEmptyServerlist) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor(); @@ -1058,7 +1017,9 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) { EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, AllServersUnreachableFailFast) { +// Tests that RPCs will fail with UNAVAILABLE instead of DEADLINE_EXCEEDED if +// all the servers are unreachable. +TEST_F(BasicTest, AllServersUnreachableFailFast) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumUnreachableServers = 5; @@ -1078,7 +1039,81 @@ TEST_F(SingleBalancerTest, AllServersUnreachableFailFast) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, LocalityMapWeightedRoundRobin) { +// Tests that RPCs fail when the backends are down, and will succeed again after +// the backends are restarted. +TEST_F(BasicTest, BackendsRestart) { + SetNextResolution({}, kDefaultServiceConfig_.c_str()); + SetNextResolutionForLbChannelAllBalancers(); + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + WaitForAllBackends(); + // Stop backends. RPCs should fail. + ShutdownAllBackends(); + CheckRpcSendFailure(); + // Restart all backends. RPCs should start succeeding again. + StartAllBackends(); + CheckRpcSendOk(1 /* times */, 2000 /* timeout_ms */, + true /* wait_for_ready */); +} + +using SecureNamingTest = BasicTest; + +// Tests that secure naming check passes if target name is expected. +TEST_F(SecureNamingTest, TargetNameIsExpected) { + // TODO(juanlishen): Use separate fake creds for the balancer channel. + ResetStub(0, kApplicationTargetName_ + ";lb"); + SetNextResolution({}, kDefaultServiceConfig_.c_str()); + SetNextResolutionForLbChannel({balancers_[0]->port()}); + const size_t kNumRpcsPerAddress = 100; + EdsServiceImpl::ResponseArgs args({ + {"locality0", GetBackendPorts()}, + }); + ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); + // Make sure that trying to connect works without a call. + channel_->GetState(true /* try_to_connect */); + // We need to wait for all backends to come online. + WaitForAllBackends(); + // Send kNumRpcsPerAddress RPCs per server. + CheckRpcSendOk(kNumRpcsPerAddress * num_backends_); + // Each backend should have gotten 100 requests. + for (size_t i = 0; i < backends_.size(); ++i) { + EXPECT_EQ(kNumRpcsPerAddress, + backends_[i]->backend_service()->request_count()); + } + // The EDS service got a single request, and sent a single response. + EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); +} + +// Tests that secure naming check fails if target name is unexpected. +TEST_F(SecureNamingTest, TargetNameIsUnexpected) { + ::testing::FLAGS_gtest_death_test_style = "threadsafe"; + // Make sure that we blow up (via abort() from the security connector) when + // the name from the balancer doesn't match expectations. + ASSERT_DEATH_IF_SUPPORTED( + { + ResetStub(0, kApplicationTargetName_ + ";lb"); + SetNextResolution({}, + "{\n" + " \"loadBalancingConfig\":[\n" + " { \"does_not_exist\":{} },\n" + " { \"xds_experimental\":{ \"balancerName\": " + "\"fake:///wrong_lb\" } }\n" + " ]\n" + "}"); + SetNextResolutionForLbChannel({balancers_[0]->port()}); + channel_->WaitForConnected(grpc_timeout_seconds_to_deadline(1)); + }, + ""); +} + +using LocalityMapTest = BasicTest; + +// Tests that the localities in a locality map are picked according to their +// weights. +TEST_F(LocalityMapTest, WeightedRoundRobin) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 5000; @@ -1120,7 +1155,9 @@ TEST_F(SingleBalancerTest, LocalityMapWeightedRoundRobin) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, LocalityMapStressTest) { +// Tests that the locality map can work properly even when it contains a large +// number of localities. +TEST_F(LocalityMapTest, StressTest) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumLocalities = 100; @@ -1153,7 +1190,9 @@ TEST_F(SingleBalancerTest, LocalityMapStressTest) { EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, LocalityMapUpdate) { +// Tests that the localities in a locality map are picked correctly after update +// (addition, modification, deletion). +TEST_F(LocalityMapTest, UpdateMap) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 1000; @@ -1244,7 +1283,10 @@ TEST_F(SingleBalancerTest, LocalityMapUpdate) { EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, Drop) { +using DropTest = BasicTest; + +// Tests that RPCs are dropped according to the drop config. +TEST_F(DropTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 5000; @@ -1289,7 +1331,8 @@ TEST_F(SingleBalancerTest, Drop) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, DropPerHundred) { +// Tests that drop config is converted correctly from per hundred. +TEST_F(DropTest, DropPerHundred) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 5000; @@ -1329,7 +1372,8 @@ TEST_F(SingleBalancerTest, DropPerHundred) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, DropPerTenThousand) { +// Tests that drop config is converted correctly from per ten thousand. +TEST_F(DropTest, DropPerTenThousand) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 5000; @@ -1369,7 +1413,8 @@ TEST_F(SingleBalancerTest, DropPerTenThousand) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, DropUpdate) { +// Tests that drop is working correctly after update. +TEST_F(DropTest, Update) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 5000; @@ -1464,7 +1509,8 @@ TEST_F(SingleBalancerTest, DropUpdate) { EXPECT_EQ(2U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, DropAll) { +// Tests that all the RPCs are dropped if any drop category drops 100%. +TEST_F(DropTest, DropAll) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 1000; @@ -1489,7 +1535,11 @@ TEST_F(SingleBalancerTest, DropAll) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, Fallback) { +using FallbackTest = BasicTest; + +// Tests that RPCs are handled by the fallback backends before the serverlist is +// received, but will be handled by the serverlist after it's received. +TEST_F(FallbackTest, Vanilla) { const int kFallbackTimeoutMs = 200 * grpc_test_slowdown_factor(); const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor(); const size_t kNumBackendsInResolution = backends_.size() / 2; @@ -1537,7 +1587,9 @@ TEST_F(SingleBalancerTest, Fallback) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, FallbackUpdate) { +// Tests that RPCs are handled by the updated fallback backends before +// serverlist is received, +TEST_F(FallbackTest, Update) { const int kFallbackTimeoutMs = 200 * grpc_test_slowdown_factor(); const int kServerlistDelayMs = 500 * grpc_test_slowdown_factor(); const size_t kNumBackendsInResolution = backends_.size() / 3; @@ -1617,7 +1669,8 @@ TEST_F(SingleBalancerTest, FallbackUpdate) { EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); } -TEST_F(SingleBalancerTest, FallbackEarlyWhenBalancerChannelFails) { +// Tests that fallback will kick in immediately if the balancer channel fails. +TEST_F(FallbackTest, FallbackEarlyWhenBalancerChannelFails) { const int kFallbackTimeoutMs = 10000 * grpc_test_slowdown_factor(); ResetStub(kFallbackTimeoutMs); // Return an unreachable balancer and one fallback backend. @@ -1629,7 +1682,8 @@ TEST_F(SingleBalancerTest, FallbackEarlyWhenBalancerChannelFails) { /* wait_for_ready */ false); } -TEST_F(SingleBalancerTest, FallbackEarlyWhenBalancerCallFails) { +// Tests that fallback will kick in immediately if the balancer call fails. +TEST_F(FallbackTest, FallbackEarlyWhenBalancerCallFails) { const int kFallbackTimeoutMs = 10000 * grpc_test_slowdown_factor(); ResetStub(kFallbackTimeoutMs); // Return one balancer and one fallback backend. @@ -1643,7 +1697,9 @@ TEST_F(SingleBalancerTest, FallbackEarlyWhenBalancerCallFails) { /* wait_for_ready */ false); } -TEST_F(SingleBalancerTest, FallbackIfResponseReceivedButChildNotReady) { +// Tests that fallback mode is entered if balancer response is received but the +// backends can't be reached. +TEST_F(FallbackTest, FallbackIfResponseReceivedButChildNotReady) { const int kFallbackTimeoutMs = 500 * grpc_test_slowdown_factor(); ResetStub(kFallbackTimeoutMs); SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str()); @@ -1659,7 +1715,9 @@ TEST_F(SingleBalancerTest, FallbackIfResponseReceivedButChildNotReady) { WaitForBackend(0); } -TEST_F(SingleBalancerTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) { +// Tests that fallback mode is exited if the balancer tells the client to drop +// all the calls. +TEST_F(FallbackTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) { // Return an unreachable balancer and one fallback backend. SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({grpc_pick_unused_port_or_die()}); @@ -1682,7 +1740,8 @@ TEST_F(SingleBalancerTest, FallbackModeIsExitedWhenBalancerSaysToDropAllCalls) { CheckRpcSendFailure(); } -TEST_F(SingleBalancerTest, FallbackModeIsExitedAfterChildRready) { +// Tests that fallback mode is exited if the child policy becomes ready. +TEST_F(FallbackTest, FallbackModeIsExitedAfterChildRready) { // Return an unreachable balancer and one fallback backend. SetNextResolution({backends_[0]->port()}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({grpc_pick_unused_port_or_die()}); @@ -1714,29 +1773,14 @@ TEST_F(SingleBalancerTest, FallbackModeIsExitedAfterChildRready) { EXPECT_EQ(100U, backends_[1]->backend_service()->request_count()); } -TEST_F(SingleBalancerTest, BackendsRestart) { - SetNextResolution({}, kDefaultServiceConfig_.c_str()); - SetNextResolutionForLbChannelAllBalancers(); - EdsServiceImpl::ResponseArgs args({ - {"locality0", GetBackendPorts()}, - }); - ScheduleResponseForBalancer(0, EdsServiceImpl::BuildResponse(args), 0); - WaitForAllBackends(); - // Stop backends. RPCs should fail. - ShutdownAllBackends(); - CheckRpcSendFailure(); - // Restart all backends. RPCs should start succeeding again. - StartAllBackends(); - CheckRpcSendOk(1 /* times */, 2000 /* timeout_ms */, - true /* wait_for_ready */); -} - -class UpdatesTest : public XdsEnd2endTest { +class BalancerUpdateTest : public XdsEnd2endTest { public: - UpdatesTest() : XdsEnd2endTest(4, 3, 0) {} + BalancerUpdateTest() : XdsEnd2endTest(4, 3, 0) {} }; -TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { +// Tests that the old LB call is still used after the balancer address update as +// long as that call is still alive. +TEST_F(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); EdsServiceImpl::ResponseArgs args({ @@ -1747,18 +1791,14 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { {"locality0", {backends_[1]->port()}}, }); ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); - // Wait until the first backend is ready. WaitForBackend(0); - // Send 10 requests. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); CheckRpcSendOk(10); gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); - // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single // response. EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); @@ -1767,11 +1807,9 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); - gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); SetNextResolutionForLbChannel({balancers_[1]->port()}); gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); - EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); gpr_timespec deadline = gpr_time_add( gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(10000, GPR_TIMESPAN)); @@ -1782,7 +1820,6 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { // The current LB call is still working, so xds continued using it to the // first balancer, which doesn't assign the second backend. EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); EXPECT_EQ(0U, balancers_[1]->eds_service()->request_count()); @@ -1791,7 +1828,12 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) { EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); } -TEST_F(UpdatesTest, UpdateBalancerName) { +// Tests that the old LB call is still used after multiple balancer address +// updates as long as that call is still alive. Send an update with the same set +// of LBs as the one in SetUp() in order to verify that the LB channel inside +// xds keeps the initial connection (which by definition is also present in the +// update). +TEST_F(BalancerUpdateTest, Repeated) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); EdsServiceImpl::ResponseArgs args({ @@ -1802,18 +1844,14 @@ TEST_F(UpdatesTest, UpdateBalancerName) { {"locality0", {backends_[1]->port()}}, }); ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); - // Wait until the first backend is ready. WaitForBackend(0); - // Send 10 requests. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); CheckRpcSendOk(10); gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); - // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single // response. EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); @@ -1822,49 +1860,44 @@ TEST_F(UpdatesTest, UpdateBalancerName) { EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); - std::vector ports; + ports.emplace_back(balancers_[0]->port()); ports.emplace_back(balancers_[1]->port()); - auto new_lb_channel_response_generator = - grpc_core::MakeRefCounted(); - SetNextResolutionForLbChannel(ports, nullptr, - new_lb_channel_response_generator.get()); - gpr_log(GPR_INFO, "========= ABOUT TO UPDATE BALANCER NAME =========="); - SetNextResolution({}, - "{\n" - " \"loadBalancingConfig\":[\n" - " { \"does_not_exist\":{} },\n" - " { \"xds_experimental\":{ \"balancerName\": " - "\"fake:///updated_lb\" } }\n" - " ]\n" - "}", - new_lb_channel_response_generator.get()); - gpr_log(GPR_INFO, "========= UPDATED BALANCER NAME =========="); - - // Wait until update has been processed, as signaled by the second backend - // receiving a request. + ports.emplace_back(balancers_[2]->port()); + gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); + SetNextResolutionForLbChannel(ports); + gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); + EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); + gpr_timespec deadline = gpr_time_add( + gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(10000, GPR_TIMESPAN)); + // Send 10 seconds worth of RPCs + do { + CheckRpcSendOk(); + } while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0); + // xds continued using the original LB call to the first balancer, which + // doesn't assign the second backend. + EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); + ports.clear(); + ports.emplace_back(balancers_[0]->port()); + ports.emplace_back(balancers_[1]->port()); + gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 2 =========="); + SetNextResolutionForLbChannel(ports); + gpr_log(GPR_INFO, "========= UPDATE 2 DONE =========="); + EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); + deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(10000, GPR_TIMESPAN)); + // Send 10 seconds worth of RPCs + do { + CheckRpcSendOk(); + } while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0); + // xds continued using the original LB call to the first balancer, which + // doesn't assign the second backend. EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - WaitForBackend(1); - - backends_[1]->backend_service()->ResetCounters(); - gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH =========="); - CheckRpcSendOk(10); - gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH =========="); - // All 10 requests should have gone to the second backend. - EXPECT_EQ(10U, backends_[1]->backend_service()->request_count()); - - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); - EXPECT_EQ(1U, balancers_[1]->eds_service()->request_count()); - EXPECT_EQ(1U, balancers_[1]->eds_service()->response_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); - EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); } -// Send an update with the same set of LBs as the one in SetUp() in order to -// verify that the LB channel inside xds keeps the initial connection (which -// by definition is also present in the update). -TEST_F(UpdatesTest, UpdateBalancersRepeated) { +// Tests that if the balancer name changes, a new LB channel will be created to +// replace the old one. +TEST_F(BalancerUpdateTest, UpdateBalancerName) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); EdsServiceImpl::ResponseArgs args({ @@ -1875,18 +1908,14 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) { {"locality0", {backends_[1]->port()}}, }); ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); - // Wait until the first backend is ready. WaitForBackend(0); - // Send 10 requests. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); CheckRpcSendOk(10); gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); - // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single // response. EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); @@ -1895,46 +1924,45 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) { EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); - std::vector ports; - ports.emplace_back(balancers_[0]->port()); ports.emplace_back(balancers_[1]->port()); - ports.emplace_back(balancers_[2]->port()); - gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); - SetNextResolutionForLbChannel(ports); - gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); - - EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - gpr_timespec deadline = gpr_time_add( - gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(10000, GPR_TIMESPAN)); - // Send 10 seconds worth of RPCs - do { - CheckRpcSendOk(); - } while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0); - // xds continued using the original LB call to the first balancer, which - // doesn't assign the second backend. - EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - - ports.clear(); - ports.emplace_back(balancers_[0]->port()); - ports.emplace_back(balancers_[1]->port()); - gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 2 =========="); - SetNextResolutionForLbChannel(ports); - gpr_log(GPR_INFO, "========= UPDATE 2 DONE =========="); - - EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_millis(10000, GPR_TIMESPAN)); - // Send 10 seconds worth of RPCs - do { - CheckRpcSendOk(); - } while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0); - // xds continued using the original LB call to the first balancer, which - // doesn't assign the second backend. + auto new_lb_channel_response_generator = + grpc_core::MakeRefCounted(); + SetNextResolutionForLbChannel(ports, nullptr, + new_lb_channel_response_generator.get()); + gpr_log(GPR_INFO, "========= ABOUT TO UPDATE BALANCER NAME =========="); + SetNextResolution({}, + "{\n" + " \"loadBalancingConfig\":[\n" + " { \"does_not_exist\":{} },\n" + " { \"xds_experimental\":{ \"balancerName\": " + "\"fake:///updated_lb\" } }\n" + " ]\n" + "}", + new_lb_channel_response_generator.get()); + gpr_log(GPR_INFO, "========= UPDATED BALANCER NAME =========="); + // Wait until update has been processed, as signaled by the second backend + // receiving a request. EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); + WaitForBackend(1); + backends_[1]->backend_service()->ResetCounters(); + gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH =========="); + CheckRpcSendOk(10); + gpr_log(GPR_INFO, "========= DONE WITH SECOND BATCH =========="); + // All 10 requests should have gone to the second backend. + EXPECT_EQ(10U, backends_[1]->backend_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); + EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); + EXPECT_EQ(1U, balancers_[1]->eds_service()->request_count()); + EXPECT_EQ(1U, balancers_[1]->eds_service()->response_count()); + EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); + EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); } -TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { +// Tests that if the balancer is down, the RPCs will still be sent to the +// backends according to the last balancer response, until a new balancer is +// reachable. +TEST_F(BalancerUpdateTest, DeadUpdate) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); EdsServiceImpl::ResponseArgs args({ @@ -1945,19 +1973,16 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { {"locality0", {backends_[1]->port()}}, }); ScheduleResponseForBalancer(1, EdsServiceImpl::BuildResponse(args), 0); - // Start servers and send 10 RPCs per server. gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH =========="); CheckRpcSendOk(10); gpr_log(GPR_INFO, "========= DONE WITH FIRST BATCH =========="); // All 10 requests should have gone to the first backend. EXPECT_EQ(10U, backends_[0]->backend_service()->request_count()); - // Kill balancer 0 gpr_log(GPR_INFO, "********** ABOUT TO KILL BALANCER 0 *************"); balancers_[0]->Shutdown(); gpr_log(GPR_INFO, "********** KILLED BALANCER 0 *************"); - // This is serviced by the existing child policy. gpr_log(GPR_INFO, "========= BEFORE SECOND BATCH =========="); CheckRpcSendOk(10); @@ -1965,7 +1990,6 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { // All 10 requests should again have gone to the first backend. EXPECT_EQ(20U, backends_[0]->backend_service()->request_count()); EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); - // The EDS service of balancer 0 got a single request, and sent a single // response. EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); @@ -1974,17 +1998,14 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { EXPECT_EQ(0U, balancers_[1]->eds_service()->response_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->request_count()); EXPECT_EQ(0U, balancers_[2]->eds_service()->response_count()); - gpr_log(GPR_INFO, "========= ABOUT TO UPDATE 1 =========="); SetNextResolutionForLbChannel({balancers_[1]->port()}); gpr_log(GPR_INFO, "========= UPDATE 1 DONE =========="); - // Wait until update has been processed, as signaled by the second backend // receiving a request. In the meantime, the client continues to be serviced // (by the first backend) without interruption. EXPECT_EQ(0U, backends_[1]->backend_service()->request_count()); WaitForBackend(1); - // This is serviced by the updated RR policy backends_[1]->backend_service()->ResetCounters(); gpr_log(GPR_INFO, "========= BEFORE THIRD BATCH =========="); @@ -1992,7 +2013,6 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { gpr_log(GPR_INFO, "========= DONE WITH THIRD BATCH =========="); // All 10 requests should have gone to the second backend. EXPECT_EQ(10U, backends_[1]->backend_service()->request_count()); - EXPECT_EQ(1U, balancers_[0]->eds_service()->request_count()); EXPECT_EQ(1U, balancers_[0]->eds_service()->response_count()); // The second balancer, published as part of the first update, may end up @@ -2010,17 +2030,18 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) { // The re-resolution tests are deferred because they rely on the fallback mode, // which hasn't been supported. -// TODO(juanlishen): Add TEST_F(UpdatesTest, ReresolveDeadBackend). +// TODO(juanlishen): Add TEST_F(BalancerUpdateTest, ReresolveDeadBackend). // TODO(juanlishen): Add TEST_F(UpdatesWithClientLoadReportingTest, // ReresolveDeadBalancer) -class SingleBalancerWithClientLoadReportingTest : public XdsEnd2endTest { +class ClientLoadReportingTest : public XdsEnd2endTest { public: - SingleBalancerWithClientLoadReportingTest() : XdsEnd2endTest(4, 1, 3) {} + ClientLoadReportingTest() : XdsEnd2endTest(4, 1, 3) {} }; -TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) { +// Tests that the load report received at the balancer is correct. +TEST_F(ClientLoadReportingTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); const size_t kNumRpcsPerAddress = 100; @@ -2059,7 +2080,9 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) { EXPECT_EQ(0U, client_stats->total_dropped_requests()); } -TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) { +// Tests that if the balancer restarts, the client load report contains the +// stats before and after the restart correctly. +TEST_F(ClientLoadReportingTest, BalancerRestart) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannel({balancers_[0]->port()}); const size_t kNumBackendsFirstPass = backends_.size() / 2; @@ -2116,13 +2139,13 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) { EXPECT_EQ(0U, client_stats->total_dropped_requests()); } -class SingleBalancerWithClientLoadReportingAndDropTest : public XdsEnd2endTest { +class ClientLoadReportingWithDropTest : public XdsEnd2endTest { public: - SingleBalancerWithClientLoadReportingAndDropTest() - : XdsEnd2endTest(4, 1, 20) {} + ClientLoadReportingWithDropTest() : XdsEnd2endTest(4, 1, 20) {} }; -TEST_F(SingleBalancerWithClientLoadReportingAndDropTest, Vanilla) { +// Tests that the drop stats are correctly reported by client load reporting. +TEST_F(ClientLoadReportingWithDropTest, Vanilla) { SetNextResolution({}, kDefaultServiceConfig_.c_str()); SetNextResolutionForLbChannelAllBalancers(); const size_t kNumRpcs = 3000; From 88aef7cd75bcdb703d041317a5b719619fc71da8 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 3 Sep 2019 17:12:28 -0700 Subject: [PATCH 095/120] Fix default case --- src/compiler/python_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index f553d9e7a3c..8935a516f8a 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -763,7 +763,7 @@ static bool ParseParameters(const grpc::string& parameter, std::vector comma_delimited_parameters; grpc_python_generator::Split(parameter, ',', &comma_delimited_parameters); if (comma_delimited_parameters.size() == 1 && - comma_delimited_parameters.empty()) { + comma_delimited_parameters[0].empty()) { *grpc_version = "grpc_2_0"; } else if (comma_delimited_parameters.size() == 1) { *grpc_version = comma_delimited_parameters[0]; From ce9e6376149a82840645e8b7cef152033f71c741 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 29 Aug 2019 13:53:37 +0200 Subject: [PATCH 096/120] enable server compression tests for grpc.aspnetcore.server --- tools/run_tests/run_interop_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 0847d8426b8..099b8c7b1a5 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -211,7 +211,7 @@ class AspNetCoreLanguage: _SKIP_COMPUTE_ENGINE_CHANNEL_CREDS def unimplemented_test_cases_server(self): - return _SKIP_SERVER_COMPRESSION + return [] def __str__(self): return 'aspnetcore' From 36574888be8cabfb66345be8ffd1c152d80e0183 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 29 Aug 2019 09:53:41 -0400 Subject: [PATCH 097/120] upgrade bazel to 0.29 --- templates/tools/dockerfile/bazel.include | 2 +- tools/bazel | 2 +- tools/dockerfile/test/bazel/Dockerfile | 2 +- tools/dockerfile/test/sanity/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index 12a22785623..9762bdcb85f 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -2,7 +2,7 @@ # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.29.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/bazel b/tools/bazel index 4d1d57f60d9..cfa875b0e63 100755 --- a/tools/bazel +++ b/tools/bazel @@ -32,7 +32,7 @@ then exec -a "$0" "${BAZEL_REAL}" "$@" fi -VERSION=0.28.1 +VERSION=0.29.0 echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index 7141fb9c5f1..fde54bae877 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -52,7 +52,7 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.29.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index badff52de34..4d3691f32bd 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,7 +97,7 @@ ENV CLANG_TIDY=clang-tidy # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.29.0 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 From 0c3a5990b1c3117f5808eed8933607772ef37e69 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 03:48:40 -0400 Subject: [PATCH 098/120] upgrade windows RBE to bazel 0.29 --- tools/internal_ci/windows/bazel_rbe.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/internal_ci/windows/bazel_rbe.bat b/tools/internal_ci/windows/bazel_rbe.bat index 153b2d59687..e55534e2e84 100644 --- a/tools/internal_ci/windows/bazel_rbe.bat +++ b/tools/internal_ci/windows/bazel_rbe.bat @@ -14,7 +14,7 @@ @rem TODO(jtattermusch): make this generate less output @rem TODO(jtattermusch): use tools/bazel script to keep the versions in sync -choco install bazel -y --version 0.26.0 --limit-output +choco install bazel -y --version 0.29.0 --limit-output cd github/grpc set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% From 08dc3310191031cf6eccb98c49216a407d4d0c0f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 04:09:21 -0400 Subject: [PATCH 099/120] try fix win RBE build --- tools/internal_ci/windows/bazel_rbe.bat | 2 +- tools/remote_build/windows.bazelrc | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/internal_ci/windows/bazel_rbe.bat b/tools/internal_ci/windows/bazel_rbe.bat index e55534e2e84..8d8ea118ebd 100644 --- a/tools/internal_ci/windows/bazel_rbe.bat +++ b/tools/internal_ci/windows/bazel_rbe.bat @@ -24,7 +24,7 @@ powershell -Command "[guid]::NewGuid().ToString()" >%KOKORO_ARTIFACTS_DIR%/bazel set /p BAZEL_INVOCATION_ID=<%KOKORO_ARTIFACTS_DIR%/bazel_invocation_ids @rem TODO(jtattermusch): windows RBE should be able to use the same credentials as Linux RBE. -bazel --bazelrc=tools/remote_build/windows.bazelrc build --invocation_id="%BAZEL_INVOCATION_ID%" --workspace_status_command=tools/remote_build/workspace_status_kokoro.sh :all --incompatible_disallow_filetype=false --google_credentials=%KOKORO_GFILE_DIR%/rbe-windows-credentials.json +bazel --bazelrc=tools/remote_build/windows.bazelrc build --invocation_id="%BAZEL_INVOCATION_ID%" --workspace_status_command=tools/remote_build/workspace_status_kokoro.sh :all --google_credentials=%KOKORO_GFILE_DIR%/rbe-windows-credentials.json set BAZEL_EXITCODE=%errorlevel% @rem TODO(jtattermusch): upload results to bigquery diff --git a/tools/remote_build/windows.bazelrc b/tools/remote_build/windows.bazelrc index 9fd3071e79f..825d6765de9 100644 --- a/tools/remote_build/windows.bazelrc +++ b/tools/remote_build/windows.bazelrc @@ -1,8 +1,7 @@ startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 -build --remote_cache=remotebuildexecution.googleapis.com -build --remote_executor=remotebuildexecution.googleapis.com -build --tls_enabled=true +build --remote_cache=grpcs://remotebuildexecution.googleapis.com +build --remote_executor=grpcs://remotebuildexecution.googleapis.com build --host_crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain build --crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain @@ -38,7 +37,7 @@ test --test_env=GRPC_VERBOSITY=debug # Set flags for uploading to BES in order to view results in the Bazel Build # Results UI. -build --bes_backend="buildeventservice.googleapis.com" +build --bes_backend=grpcs://buildeventservice.googleapis.com build --bes_timeout=60s build --bes_results_url="https://source.cloud.google.com/results/invocations/" build --project_id=grpc-testing From 0040bb9353f782b788e4bbbe20efdc87b36aa619 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 21 Nov 2018 10:55:41 +0100 Subject: [PATCH 100/120] attempt to add alpine C# distribtest --- .../DistribTest/DistribTestDotNet.csproj | 2 +- .../csharp/run_distrib_test_dotnetcli.sh | 17 ++++++++----- .../distribtest/csharp_alpine_x64/Dockerfile | 24 +++++++++++++++++++ .../artifacts/distribtest_targets.py | 1 + 4 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile diff --git a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj index d19eac91ba4..8cdf926f07f 100644 --- a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj +++ b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp1.0;net45 + netcoreapp2.1 false false false diff --git a/test/distrib/csharp/run_distrib_test_dotnetcli.sh b/test/distrib/csharp/run_distrib_test_dotnetcli.sh index 86c2d5231e1..357ce136cb7 100755 --- a/test/distrib/csharp/run_distrib_test_dotnetcli.sh +++ b/test/distrib/csharp/run_distrib_test_dotnetcli.sh @@ -28,19 +28,24 @@ cd DistribTest dotnet restore DistribTestDotNet.csproj dotnet build DistribTestDotNet.csproj -dotnet publish -f netcoreapp1.0 DistribTestDotNet.csproj -dotnet publish -f net45 DistribTestDotNet.csproj +dotnet publish -f netcoreapp2.1 DistribTestDotNet.csproj +#dotnet publish -f net45 DistribTestDotNet.csproj ls -R bin +#ldd /root/.nuget/packages/grpc.core/*/lib/netstandard1.5/../../runtimes/linux/native/libgrpc_csharp_ext.x64.so + +#ldd /root/.nuget/packages/grpc.tools/*/tools/linux_x64/grpc_csharp_plugin + +#exit 1 # .NET 4.5 target after dotnet build -mono bin/Debug/net45/publish/DistribTestDotNet.exe +#mono bin/Debug/net45/publish/DistribTestDotNet.exe # .NET 4.5 target after dotnet publish -mono bin/Debug/net45/publish/DistribTestDotNet.exe +#mono bin/Debug/net45/publish/DistribTestDotNet.exe # .NET Core target after dotnet build -dotnet exec bin/Debug/netcoreapp1.0/DistribTestDotNet.dll +dotnet exec bin/Debug/netcoreapp2.1/DistribTestDotNet.dll # .NET Core target after dotnet publish -dotnet exec bin/Debug/netcoreapp1.0/publish/DistribTestDotNet.dll +dotnet exec bin/Debug/netcoreapp2.1/publish/DistribTestDotNet.dll diff --git a/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile new file mode 100644 index 00000000000..aa5034872c3 --- /dev/null +++ b/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile @@ -0,0 +1,24 @@ +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM microsoft/dotnet:2.1-sdk-alpine + +RUN apk update && apk add bash +RUN apk update && apk add unzip + +# needed to satisfy the "ld-linux-x86-64.so.2" dependency +RUN apk add libc6-compat + +#RUN apk add libnsl +#RUN cp /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index 35a561ea928..d45abdcbd41 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -309,6 +309,7 @@ def targets(): CSharpDistribTest('linux', 'x64', 'ubuntu1404'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), CSharpDistribTest('linux', 'x64', 'ubuntu1404', use_dotnet_cli=True), + CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True), CSharpDistribTest('macos', 'x86'), CSharpDistribTest('windows', 'x86'), CSharpDistribTest('windows', 'x64'), From 32dbe30b3517c8f4d93b6141d1f9066c2b53d960 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 11:04:04 -0400 Subject: [PATCH 101/120] add .NET Core distribtest for ubuntu 16.04 --- .../distribtest/csharp_ubuntu1604_x64/Dockerfile | 10 ++++++++++ tools/run_tests/artifacts/distribtest_targets.py | 1 + 2 files changed, 11 insertions(+) diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile index 93ee75cfcd4..e0d8c458d0a 100644 --- a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile @@ -24,6 +24,16 @@ RUN apt-get update && apt-get install -y \ nuget \ && apt-get clean +RUN apt-get update && apt-get install -y curl && apt-get clean + +# Install dotnet SDK +ENV DOTNET_SDK_VERSION 2.1.500 +RUN curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \ + && mkdir -p /usr/share/dotnet \ + && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ + && rm dotnet.tar.gz \ + && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet + RUN apt-get update && apt-get install -y unzip && apt-get clean # Make sure the mono certificate store is up-to-date to prevent issues with nuget restore diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index d45abdcbd41..e221dee3ab8 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -308,6 +308,7 @@ def targets(): CSharpDistribTest('linux', 'x64', 'centos7'), CSharpDistribTest('linux', 'x64', 'ubuntu1404'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), + CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True), CSharpDistribTest('linux', 'x64', 'ubuntu1404', use_dotnet_cli=True), CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True), CSharpDistribTest('macos', 'x86'), From f4c723556650dd49df1c1ad0c93eab4e7d86e5ca Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 11:06:23 -0400 Subject: [PATCH 102/120] get rid of ubuntu14.04 C# distribtests --- .../csharp_ubuntu1404_x64/Dockerfile | 44 ------------------- .../artifacts/distribtest_targets.py | 2 - 2 files changed, 46 deletions(-) delete mode 100644 tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile deleted file mode 100644 index 61ca1a08a46..00000000000 --- a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM ubuntu:14.04 - -RUN apt-get update && apt-get install -y apt-transport-https && apt-get clean - -RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF -RUN echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | tee /etc/apt/sources.list.d/mono-official-stable.list - -RUN apt-get update && apt-get install -y \ - mono-devel \ - nuget \ - && apt-get clean - -RUN apt-get update && apt-get install -y unzip && apt-get clean - -# Install dotnet CLI -RUN apt-get install -y apt-transport-https -RUN sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' -RUN apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 -RUN apt-get update && apt-get install -y dotnet-dev-1.0.4 - -# Trigger the population of the local package cache for dotnet CLI -RUN mkdir warmup \ - && cd warmup \ - && dotnet new \ - && cd .. \ - && rm -rf warmup - -# Make sure the mono certificate store is up-to-date to prevent issues with nuget restore -RUN apt-get update && apt-get install -y curl && apt-get clean -RUN curl https://curl.haxx.se/ca/cacert.pem > ~/cacert.pem && cert-sync ~/cacert.pem && rm -f ~/cacert.pem diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index e221dee3ab8..2c7af6e37fc 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -306,10 +306,8 @@ def targets(): CSharpDistribTest('linux', 'x64', 'jessie'), CSharpDistribTest('linux', 'x86', 'jessie'), CSharpDistribTest('linux', 'x64', 'centos7'), - CSharpDistribTest('linux', 'x64', 'ubuntu1404'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True), - CSharpDistribTest('linux', 'x64', 'ubuntu1404', use_dotnet_cli=True), CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True), CSharpDistribTest('macos', 'x86'), CSharpDistribTest('windows', 'x86'), From e0b87cd4a13bb29eb68350b0207b75fdb9f8cd9f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 11:26:27 -0400 Subject: [PATCH 103/120] add debian stretch distribtest --- .../distribtest/csharp_stretch_x64/Dockerfile | 41 +++++++++++++++++++ .../artifacts/distribtest_targets.py | 2 + 2 files changed, 43 insertions(+) create mode 100644 tools/dockerfile/distribtest/csharp_stretch_x64/Dockerfile diff --git a/tools/dockerfile/distribtest/csharp_stretch_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_stretch_x64/Dockerfile new file mode 100644 index 00000000000..97779c52f8b --- /dev/null +++ b/tools/dockerfile/distribtest/csharp_stretch_x64/Dockerfile @@ -0,0 +1,41 @@ +# Copyright 2019 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM debian:stretch + +RUN apt-get update && apt-get install -y apt-transport-https dirmngr gnupg ca-certificates && apt-get clean + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb https://download.mono-project.com/repo/debian stable-stretch main" | tee /etc/apt/sources.list.d/mono-official-stable.list + +RUN apt-get update && apt-get install -y \ + mono-devel \ + nuget \ + && apt-get clean + +RUN apt-get update && apt-get install -y curl && apt-get clean + +# Install dotnet SDK +ENV DOTNET_SDK_VERSION 2.1.500 +RUN curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \ + && mkdir -p /usr/share/dotnet \ + && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ + && rm dotnet.tar.gz \ + && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet + +RUN apt-get update && apt-get install -y unzip && apt-get clean + +# Make sure the mono certificate store is up-to-date to prevent issues with nuget restore +RUN apt-get update && apt-get install -y curl && apt-get clean +RUN curl https://curl.haxx.se/ca/cacert.pem > ~/cacert.pem && cert-sync ~/cacert.pem && rm -f ~/cacert.pem diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index 2c7af6e37fc..5baf9d6c298 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -305,6 +305,8 @@ def targets(): CppDistribTest('windows', 'x86', testcase='cmake_as_externalproject'), CSharpDistribTest('linux', 'x64', 'jessie'), CSharpDistribTest('linux', 'x86', 'jessie'), + CSharpDistribTest('linux', 'x64', 'stretch'), + CSharpDistribTest('linux', 'x64', 'stretch', use_dotnet_cli=True), CSharpDistribTest('linux', 'x64', 'centos7'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True), From 21104ec1ee26d2f89affaa76a737ec23fb185e61 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 11:29:22 -0400 Subject: [PATCH 104/120] remove BOM --- test/distrib/csharp/DistribTest/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/distrib/csharp/DistribTest/Program.cs b/test/distrib/csharp/DistribTest/Program.cs index 0ea7211fc45..92f416785a6 100644 --- a/test/distrib/csharp/DistribTest/Program.cs +++ b/test/distrib/csharp/DistribTest/Program.cs @@ -16,7 +16,7 @@ #endregion -using System; +using System; using Grpc.Core; namespace TestGrpcPackage From 504c4ace804ba7e18c84125501628cf5cb327e97 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 Sep 2019 11:32:31 -0400 Subject: [PATCH 105/120] remove legacy c# testcodegen --- test/distrib/csharp/run_distrib_test.sh | 3 -- .../csharp/test_codegen/test_codegen.sh | 38 ------------------- .../csharp/test_codegen/testcodegen.proto | 29 -------------- test/distrib/csharp/update_version.sh | 2 +- 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100755 test/distrib/csharp/test_codegen/test_codegen.sh delete mode 100644 test/distrib/csharp/test_codegen/testcodegen.proto diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh index 45911cd91a7..824e33e2876 100755 --- a/test/distrib/csharp/run_distrib_test.sh +++ b/test/distrib/csharp/run_distrib_test.sh @@ -27,6 +27,3 @@ nuget restore || nuget restore || nuget restore msbuild DistribTest.sln mono DistribTest/bin/Debug/DistribTest.exe - -# test that codegen work -test_codegen/test_codegen.sh diff --git a/test/distrib/csharp/test_codegen/test_codegen.sh b/test/distrib/csharp/test_codegen/test_codegen.sh deleted file mode 100755 index fa101889f68..00000000000 --- a/test/distrib/csharp/test_codegen/test_codegen.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -# Copyright 2018 The gRPC Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -ex - -cd "$(dirname "$0")" - -ls -lR "../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools" - -PLATFORM_ARCH=linux_x64 -if [ "$(uname)" == "Darwin" ] -then - PLATFORM_ARCH=macosx_x64 -elif [ "$(getconf LONG_BIT)" == "32" ] -then - PLATFORM_ARCH=linux_x86 -fi - -PROTOC=../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/${PLATFORM_ARCH}/protoc -PLUGIN=../packages/Grpc.Tools.__GRPC_NUGET_VERSION__/tools/${PLATFORM_ARCH}/grpc_csharp_plugin - -"${PROTOC}" --plugin="protoc-gen-grpc=${PLUGIN}" --csharp_out=. --grpc_out=. -I . testcodegen.proto - -ls ./*.cs - -echo 'Code generation works.' diff --git a/test/distrib/csharp/test_codegen/testcodegen.proto b/test/distrib/csharp/test_codegen/testcodegen.proto deleted file mode 100644 index 5c228b81dba..00000000000 --- a/test/distrib/csharp/test_codegen/testcodegen.proto +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package testcodegen; - -service Greeter { - rpc SayHello (HelloRequest) returns (HelloReply) {} -} - -message HelloRequest { - string name = 1; -} - -message HelloReply { - string message = 1; -} diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh index 0e47ed3abd5..9759cc56481 100755 --- a/test/distrib/csharp/update_version.sh +++ b/test/distrib/csharp/update_version.sh @@ -28,4 +28,4 @@ then fi # Replaces version placeholder with value provided as first argument. -sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj DistribTest/DistribTestDotNet.csproj test_codegen/test_codegen.sh +sed -ibak "s/__GRPC_NUGET_VERSION__/${CSHARP_VERSION}/g" DistribTest/packages.config DistribTest/DistribTest.csproj DistribTest/DistribTestDotNet.csproj From aeb04913adfcbf90cf3dd4c2cb1aa8f55ac54508 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 9 Apr 2019 12:41:27 -0400 Subject: [PATCH 106/120] improved C# distribtest --- test/distrib/csharp/DistribTest/Program.cs | 44 +++++++++++++++---- .../csharp/DistribTest/testcodegen.proto | 2 +- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/test/distrib/csharp/DistribTest/Program.cs b/test/distrib/csharp/DistribTest/Program.cs index 92f416785a6..bda7b2104d6 100644 --- a/test/distrib/csharp/DistribTest/Program.cs +++ b/test/distrib/csharp/DistribTest/Program.cs @@ -17,7 +17,10 @@ #endregion using System; +using System.Linq; +using System.Threading.Tasks; using Grpc.Core; +using Helloworld; namespace TestGrpcPackage { @@ -25,14 +28,39 @@ namespace TestGrpcPackage { public static void Main(string[] args) { - // test codegen works - var reply = new Testcodegen.HelloReply(); - - // This code doesn't do much but makes sure the native extension is loaded - // which is what we are testing here. - Channel c = new Channel("127.0.0.1:1000", ChannelCredentials.Insecure); - c.ShutdownAsync().Wait(); - Console.WriteLine("Success!"); + // Disable SO_REUSEPORT to prevent https://github.com/grpc/grpc/issues/10755 + Server server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) + { + Services = { Greeter.BindService(new GreeterImpl()) }, + Ports = { new ServerPort("localhost", ServerPort.PickUnused, ServerCredentials.Insecure) } + }; + server.Start(); + + Channel channel = new Channel("localhost", server.Ports.Single().BoundPort, ChannelCredentials.Insecure); + + try + { + var client = new Greeter.GreeterClient(channel); + String user = "you"; + + var reply = client.SayHello(new HelloRequest { Name = user }); + Console.WriteLine("Greeting: " + reply.Message); + Console.WriteLine("Success!"); + } + finally + { + channel.ShutdownAsync().Wait(); + server.ShutdownAsync().Wait(); + } + } + } + + class GreeterImpl : Greeter.GreeterBase + { + // Server side handler of the SayHello RPC + public override Task SayHello(HelloRequest request, ServerCallContext context) + { + return Task.FromResult(new HelloReply { Message = "Hello " + request.Name }); } } } diff --git a/test/distrib/csharp/DistribTest/testcodegen.proto b/test/distrib/csharp/DistribTest/testcodegen.proto index 7845ac92c49..61444fc080e 100644 --- a/test/distrib/csharp/DistribTest/testcodegen.proto +++ b/test/distrib/csharp/DistribTest/testcodegen.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -package testcodegen; +package helloworld; service Greeter { rpc SayHello (HelloRequest) returns (HelloReply) {} From a5560e8f7300463d4cb3506bb5fee73446affd8c Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 4 Sep 2019 09:20:33 -0700 Subject: [PATCH 107/120] Fix PHP build error --- config.m4 | 2 ++ src/php/ext/grpc/config.m4 | 7 ++++--- templates/config.m4.template | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.m4 b/config.m4 index 4a8651dae38..efa86576f84 100644 --- a/config.m4 +++ b/config.m4 @@ -33,6 +33,8 @@ if test "$PHP_GRPC" != "no"; then ;; esac + PHP_SUBST(GRPC_SHARED_LIBADD) + PHP_NEW_EXTENSION(grpc, src/php/ext/grpc/byte_buffer.c \ src/php/ext/grpc/call.c \ diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index 1af93ceecad..ed62dee71cc 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -42,14 +42,15 @@ if test "$PHP_GRPC" != "no"; then dnl PHP_ADD_LIBRARY(pthread,,GRPC_SHARED_LIBADD) GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD" PHP_ADD_LIBRARY(pthread) - PHP_ADD_LIBRARY(stdc++,,GRPC_SHARED_LIBADD) - PHP_ADD_LIBRARY(stdc++) PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(dl) case $host in - *darwin*) ;; + *darwin*) + PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD) + ;; *) + PHP_ADD_LIBRARY(stdc++,1,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD) PHP_ADD_LIBRARY(rt) ;; diff --git a/templates/config.m4.template b/templates/config.m4.template index f13ac75914f..edb6a99dc67 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -35,6 +35,8 @@ ;; esac + PHP_SUBST(GRPC_SHARED_LIBADD) + PHP_NEW_EXTENSION(grpc, % for source in php_config_m4.src: ${source} ${"\\"} From 539b422708be9fc4ced914bf6738de49dc794852 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 4 Sep 2019 17:26:26 -0700 Subject: [PATCH 108/120] Trim trailing spaces --- src/php/ext/grpc/config.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4 index ed62dee71cc..7260dbc72ef 100755 --- a/src/php/ext/grpc/config.m4 +++ b/src/php/ext/grpc/config.m4 @@ -46,7 +46,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_LIBRARY(dl) case $host in - *darwin*) + *darwin*) PHP_ADD_LIBRARY(c++,1,GRPC_SHARED_LIBADD) ;; *) @@ -94,7 +94,7 @@ if test "$PHP_COVERAGE" = "yes"; then if test "$GCC" != "yes"; then AC_MSG_ERROR([GCC is required for --enable-coverage]) fi - + dnl Check if ccache is being used case `$php_shtool path $CC` in *ccache*[)] gcc_ccache=yes;; @@ -104,7 +104,7 @@ if test "$PHP_COVERAGE" = "yes"; then if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then AC_MSG_ERROR([ccache must be disabled when --enable-coverage option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) fi - + lcov_version_list="1.5 1.6 1.7 1.9 1.10 1.11 1.12 1.13" AC_CHECK_PROG(LCOV, lcov, lcov) @@ -123,7 +123,7 @@ if test "$PHP_COVERAGE" = "yes"; then done ]) else - lcov_msg="To enable code coverage reporting you must have one of the following LCOV versions installed: $lcov_version_list" + lcov_msg="To enable code coverage reporting you must have one of the following LCOV versions installed: $lcov_version_list" AC_MSG_ERROR([$lcov_msg]) fi From b876b35457121878345de26a1542d24cbb2d56a4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Sep 2019 13:48:31 +0200 Subject: [PATCH 109/120] address review comments --- src/csharp/Grpc.Core.Api/SerializationContext.cs | 4 ++-- .../Internal/DefaultSerializationContextTest.cs | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/csharp/Grpc.Core.Api/SerializationContext.cs b/src/csharp/Grpc.Core.Api/SerializationContext.cs index 76f1951b68e..59e14c12e3b 100644 --- a/src/csharp/Grpc.Core.Api/SerializationContext.cs +++ b/src/csharp/Grpc.Core.Api/SerializationContext.cs @@ -28,7 +28,7 @@ namespace Grpc.Core { /// /// Use the byte array as serialized form of current message and mark serialization process as complete. - /// Complete() can only be called once. By calling this method the caller gives up the ownership of the + /// Complete(byte[]) can only be called once. By calling this method the caller gives up the ownership of the /// payload which must not be accessed afterwards. /// /// the serialized form of current message @@ -47,7 +47,7 @@ namespace Grpc.Core } /// - /// Complete the payload written to the buffer writer. Complete() can only be called once. + /// Complete the payload written to the buffer writer. Complete() can only be called once. /// public virtual void Complete() { diff --git a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs index fcb12ae6656..061230d8ca4 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/DefaultSerializationContextTest.cs @@ -189,9 +189,6 @@ namespace Grpc.Core.Internal.Tests } } - // other ideas: - // AdjustTailSpace(0) if previous tail size is 0... (better for SliceBufferSafeHandle) - private DefaultSerializationContext.UsageScope NewDefaultSerializationContextScope() { return new DefaultSerializationContext.UsageScope(new DefaultSerializationContext()); From 91716467138c03fb97391c68cab3365ccf14a122 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Sep 2019 08:05:36 -0400 Subject: [PATCH 110/120] fix dependencies for classic .csproj --- test/distrib/csharp/DistribTest/DistribTest.csproj | 10 ++++++++-- test/distrib/csharp/DistribTest/packages.config | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj index e3fc94b4f23..a7f48146a5d 100644 --- a/test/distrib/csharp/DistribTest/DistribTest.csproj +++ b/test/distrib/csharp/DistribTest/DistribTest.csproj @@ -68,8 +68,14 @@ - - ..\packages\System.Interactive.Async.3.0.0\lib\net45\System.Interactive.Async.dll + + ..\packages\System.Buffers.4.4.0\lib\netstandard1.1\System.Buffers.dll + + + ..\packages\System.Memory.4.5.3\lib\netstandard1.1\System.Memory.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll diff --git a/test/distrib/csharp/DistribTest/packages.config b/test/distrib/csharp/DistribTest/packages.config index 5e09d5dad01..b6c6730e34b 100644 --- a/test/distrib/csharp/DistribTest/packages.config +++ b/test/distrib/csharp/DistribTest/packages.config @@ -9,6 +9,8 @@ - + + + \ No newline at end of file From ece5fbdcb0aecc152da6cce81b33695c7adad453 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Sep 2019 08:06:39 -0400 Subject: [PATCH 111/120] partially revert alpine distribtest attempts --- .../csharp/DistribTest/DistribTestDotNet.csproj | 12 +++++------- test/distrib/csharp/run_distrib_test_dotnetcli.sh | 11 +++-------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj index 8cdf926f07f..c855feb3fb3 100644 --- a/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj +++ b/test/distrib/csharp/DistribTest/DistribTestDotNet.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.1 + net45;netcoreapp2.1 false false false @@ -23,10 +23,8 @@ - - - /usr/lib/mono/4.5-api - /usr/local/lib/mono/4.5-api - /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.5-api - + + + + \ No newline at end of file diff --git a/test/distrib/csharp/run_distrib_test_dotnetcli.sh b/test/distrib/csharp/run_distrib_test_dotnetcli.sh index 357ce136cb7..ca22bce9d85 100755 --- a/test/distrib/csharp/run_distrib_test_dotnetcli.sh +++ b/test/distrib/csharp/run_distrib_test_dotnetcli.sh @@ -29,20 +29,15 @@ dotnet restore DistribTestDotNet.csproj dotnet build DistribTestDotNet.csproj dotnet publish -f netcoreapp2.1 DistribTestDotNet.csproj -#dotnet publish -f net45 DistribTestDotNet.csproj +dotnet publish -f net45 DistribTestDotNet.csproj ls -R bin -#ldd /root/.nuget/packages/grpc.core/*/lib/netstandard1.5/../../runtimes/linux/native/libgrpc_csharp_ext.x64.so - -#ldd /root/.nuget/packages/grpc.tools/*/tools/linux_x64/grpc_csharp_plugin - -#exit 1 # .NET 4.5 target after dotnet build -#mono bin/Debug/net45/publish/DistribTestDotNet.exe +mono bin/Debug/net45/publish/DistribTestDotNet.exe # .NET 4.5 target after dotnet publish -#mono bin/Debug/net45/publish/DistribTestDotNet.exe +mono bin/Debug/net45/publish/DistribTestDotNet.exe # .NET Core target after dotnet build dotnet exec bin/Debug/netcoreapp2.1/DistribTestDotNet.dll From 54c02148664047d610cd60178a5dc2faaa654252 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 Sep 2019 08:08:46 -0400 Subject: [PATCH 112/120] protoc cannot be run on alpine linux --- .../distribtest/csharp_alpine_x64/Dockerfile | 24 ------------------- .../artifacts/distribtest_targets.py | 1 - 2 files changed, 25 deletions(-) delete mode 100644 tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile diff --git a/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile deleted file mode 100644 index aa5034872c3..00000000000 --- a/tools/dockerfile/distribtest/csharp_alpine_x64/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM microsoft/dotnet:2.1-sdk-alpine - -RUN apk update && apk add bash -RUN apk update && apk add unzip - -# needed to satisfy the "ld-linux-x86-64.so.2" dependency -RUN apk add libc6-compat - -#RUN apk add libnsl -#RUN cp /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 diff --git a/tools/run_tests/artifacts/distribtest_targets.py b/tools/run_tests/artifacts/distribtest_targets.py index 5baf9d6c298..0674fc4c689 100644 --- a/tools/run_tests/artifacts/distribtest_targets.py +++ b/tools/run_tests/artifacts/distribtest_targets.py @@ -310,7 +310,6 @@ def targets(): CSharpDistribTest('linux', 'x64', 'centos7'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), CSharpDistribTest('linux', 'x64', 'ubuntu1604', use_dotnet_cli=True), - CSharpDistribTest('linux', 'x64', 'alpine', use_dotnet_cli=True), CSharpDistribTest('macos', 'x86'), CSharpDistribTest('windows', 'x86'), CSharpDistribTest('windows', 'x64'), From d3f50ace3953651c1f67a3c9da84821abae747fe Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 5 Sep 2019 08:13:59 -0700 Subject: [PATCH 113/120] Use mutex instead of combiner in client channel data plane. --- .../filters/client_channel/client_channel.cc | 450 +++++++++--------- src/core/lib/gprpp/ref_counted_ptr.h | 2 + test/core/gprpp/ref_counted_ptr_test.cc | 14 + 3 files changed, 229 insertions(+), 237 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 8a0fabfa6fd..40ac1f22059 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -130,7 +130,7 @@ class ChannelData { return disconnect_error_.Load(MemoryOrder::ACQUIRE); } - grpc_combiner* data_plane_combiner() const { return data_plane_combiner_; } + Mutex* data_plane_mu() const { return &data_plane_mu_; } LoadBalancingPolicy::SubchannelPicker* picker() const { return picker_.get(); @@ -166,8 +166,6 @@ class ChannelData { private: class SubchannelWrapper; - class ConnectivityStateAndPickerSetter; - class ServiceConfigSetter; class ClientChannelControlHelper; class ExternalConnectivityWatcher { @@ -214,6 +212,14 @@ class ChannelData { ChannelData(grpc_channel_element_args* args, grpc_error** error); ~ChannelData(); + void UpdateStateAndPickerLocked( + grpc_connectivity_state state, const char* reason, + UniquePtr picker); + + void UpdateServiceConfigLocked( + RefCountedPtr retry_throttle_data, + RefCountedPtr service_config); + void CreateResolvingLoadBalancingPolicyLocked(); void DestroyResolvingLoadBalancingPolicyLocked(); @@ -250,9 +256,9 @@ class ChannelData { channelz::ChannelNode* channelz_node_; // - // Fields used in the data plane. Guarded by data_plane_combiner. + // Fields used in the data plane. Guarded by data_plane_mu. // - grpc_combiner* data_plane_combiner_; + mutable Mutex data_plane_mu_; UniquePtr picker_; QueuedPick* queued_picks_ = nullptr; // Linked list of queued picks. // Data from service config. @@ -282,13 +288,13 @@ class ChannelData { Map subchannel_wrappers_; // Pending ConnectedSubchannel updates for each SubchannelWrapper. // Updates are queued here in the control plane combiner and then applied - // in the data plane combiner when the picker is updated. + // in the data plane mutex when the picker is updated. Map, RefCountedPtr, RefCountedPtrLess> pending_subchannel_updates_; // - // Fields accessed from both data plane and control plane combiners. + // Fields accessed from both data plane mutex and control plane combiner. // Atomic disconnect_error_; @@ -322,7 +328,16 @@ class CallData { void MaybeApplyServiceConfigToCallLocked(grpc_call_element* elem); // Invoked by channel for queued picks when the picker is updated. - static void StartPickLocked(void* arg, grpc_error* error); + static void PickSubchannel(void* arg, grpc_error* error); + + // Helper function for performing a pick while holding the data plane + // mutex. Returns true if the pick is complete, in which case the caller + // must invoke PickDone() or AsyncPickDone() with the returned error. + bool PickSubchannelLocked(grpc_call_element* elem, grpc_error** error); + + // Schedules a callback to process the completed pick. The callback + // will not run until after this method returns. + void AsyncPickDone(grpc_call_element* elem, grpc_error* error); private: class QueuedPickCanceller; @@ -931,7 +946,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { return connected_subchannel_.get(); } - // Caller must be holding the data-plane combiner. + // Caller must be holding the data-plane mutex. ConnectedSubchannel* connected_subchannel_in_data_plane() const { return connected_subchannel_in_data_plane_.get(); } @@ -1059,7 +1074,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { // Update the connected subchannel only if the channel is not shutting // down. This is because once the channel is shutting down, we // ignore picker updates from the LB policy, which means that - // ConnectivityStateAndPickerSetter will never process the entries + // UpdateStateAndPickerLocked() will never process the entries // in chand_->pending_subchannel_updates_. So we don't want to add // entries there that will never be processed, since that would // leave dangling refs to the channel and prevent its destruction. @@ -1069,7 +1084,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { if (connected_subchannel_ != connected_subchannel) { connected_subchannel_ = std::move(connected_subchannel); // Record the new connected subchannel so that it can be updated - // in the data plane combiner the next time the picker is updated. + // in the data plane mutex the next time the picker is updated. chand_->pending_subchannel_updates_[Ref( DEBUG_LOCATION, "ConnectedSubchannelUpdate")] = connected_subchannel_; } @@ -1086,159 +1101,10 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface { Map watcher_map_; // To be accessed only in the control plane combiner. RefCountedPtr connected_subchannel_; - // To be accessed only in the data plane combiner. + // To be accessed only in the data plane mutex. RefCountedPtr connected_subchannel_in_data_plane_; }; -// -// ChannelData::ConnectivityStateAndPickerSetter -// - -// A fire-and-forget class that sets the channel's connectivity state -// and then hops into the data plane combiner to update the picker. -// Must be instantiated while holding the control plane combiner. -// Deletes itself when done. -class ChannelData::ConnectivityStateAndPickerSetter { - public: - ConnectivityStateAndPickerSetter( - ChannelData* chand, grpc_connectivity_state state, const char* reason, - UniquePtr picker) - : chand_(chand), picker_(std::move(picker)) { - // Clean the control plane when entering IDLE, while holding control plane - // combiner. - if (picker_ == nullptr) { - chand->health_check_service_name_.reset(); - chand->saved_service_config_.reset(); - chand->received_first_resolver_result_ = false; - } - // Update connectivity state here, while holding control plane combiner. - grpc_connectivity_state_set(&chand->state_tracker_, state, reason); - if (chand->channelz_node_ != nullptr) { - chand->channelz_node_->SetConnectivityState(state); - chand->channelz_node_->AddTraceEvent( - channelz::ChannelTrace::Severity::Info, - grpc_slice_from_static_string( - channelz::ChannelNode::GetChannelConnectivityStateChangeString( - state))); - } - // Grab any pending subchannel updates. - pending_subchannel_updates_ = - std::move(chand_->pending_subchannel_updates_); - // Bounce into the data plane combiner to reset the picker. - GRPC_CHANNEL_STACK_REF(chand->owning_stack_, - "ConnectivityStateAndPickerSetter"); - GRPC_CLOSURE_INIT(&closure_, SetPickerInDataPlane, this, - grpc_combiner_scheduler(chand->data_plane_combiner_)); - GRPC_CLOSURE_SCHED(&closure_, GRPC_ERROR_NONE); - } - - private: - static void SetPickerInDataPlane(void* arg, grpc_error* ignored) { - auto* self = static_cast(arg); - // Handle subchannel updates. - for (auto& p : self->pending_subchannel_updates_) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { - gpr_log(GPR_INFO, - "chand=%p: updating subchannel wrapper %p data plane " - "connected_subchannel to %p", - self->chand_, p.first.get(), p.second.get()); - } - p.first->set_connected_subchannel_in_data_plane(std::move(p.second)); - } - // Swap out the picker. We hang on to the old picker so that it can - // be deleted in the control-plane combiner, since that's where we need - // to unref the subchannel wrappers that are reffed by the picker. - self->picker_.swap(self->chand_->picker_); - // Clean the data plane if the updated picker is nullptr. - if (self->chand_->picker_ == nullptr) { - self->chand_->received_service_config_data_ = false; - self->chand_->retry_throttle_data_.reset(); - self->chand_->service_config_.reset(); - } - // Re-process queued picks. - for (QueuedPick* pick = self->chand_->queued_picks_; pick != nullptr; - pick = pick->next) { - CallData::StartPickLocked(pick->elem, GRPC_ERROR_NONE); - } - // Pop back into the control plane combiner to delete ourself, so - // that we make sure to unref subchannel wrappers there. This - // includes both the ones reffed by the old picker (now stored in - // self->picker_) and the ones in self->pending_subchannel_updates_. - GRPC_CLOSURE_INIT(&self->closure_, CleanUpInControlPlane, self, - grpc_combiner_scheduler(self->chand_->combiner_)); - GRPC_CLOSURE_SCHED(&self->closure_, GRPC_ERROR_NONE); - } - - static void CleanUpInControlPlane(void* arg, grpc_error* ignored) { - auto* self = static_cast(arg); - GRPC_CHANNEL_STACK_UNREF(self->chand_->owning_stack_, - "ConnectivityStateAndPickerSetter"); - Delete(self); - } - - ChannelData* chand_; - UniquePtr picker_; - Map, RefCountedPtr, - RefCountedPtrLess> - pending_subchannel_updates_; - grpc_closure closure_; -}; - -// -// ChannelData::ServiceConfigSetter -// - -// A fire-and-forget class that sets the channel's service config data -// in the data plane combiner. Deletes itself when done. -class ChannelData::ServiceConfigSetter { - public: - ServiceConfigSetter( - ChannelData* chand, - Optional - retry_throttle_data, - RefCountedPtr service_config) - : chand_(chand), - retry_throttle_data_(retry_throttle_data), - service_config_(std::move(service_config)) { - GRPC_CHANNEL_STACK_REF(chand->owning_stack_, "ServiceConfigSetter"); - GRPC_CLOSURE_INIT(&closure_, SetServiceConfigData, this, - grpc_combiner_scheduler(chand->data_plane_combiner_)); - GRPC_CLOSURE_SCHED(&closure_, GRPC_ERROR_NONE); - } - - private: - static void SetServiceConfigData(void* arg, grpc_error* ignored) { - ServiceConfigSetter* self = static_cast(arg); - ChannelData* chand = self->chand_; - // Update channel state. - chand->received_service_config_data_ = true; - if (self->retry_throttle_data_.has_value()) { - chand->retry_throttle_data_ = - internal::ServerRetryThrottleMap::GetDataForServer( - chand->server_name_.get(), - self->retry_throttle_data_.value().max_milli_tokens, - self->retry_throttle_data_.value().milli_token_ratio); - } - chand->service_config_ = std::move(self->service_config_); - // Apply service config to queued picks. - for (QueuedPick* pick = chand->queued_picks_; pick != nullptr; - pick = pick->next) { - CallData* calld = static_cast(pick->elem->call_data); - calld->MaybeApplyServiceConfigToCallLocked(pick->elem); - } - // Clean up. - GRPC_CHANNEL_STACK_UNREF(self->chand_->owning_stack_, - "ServiceConfigSetter"); - Delete(self); - } - - ChannelData* chand_; - Optional - retry_throttle_data_; - RefCountedPtr service_config_; - grpc_closure closure_; -}; - // // ChannelData::ExternalConnectivityWatcher::WatcherList // @@ -1409,9 +1275,7 @@ class ChannelData::ClientChannelControlHelper } // Do update only if not shutting down. if (disconnect_error == GRPC_ERROR_NONE) { - // Will delete itself. - New(chand_, state, "helper", - std::move(picker)); + chand_->UpdateStateAndPickerLocked(state, "helper", std::move(picker)); } } @@ -1495,7 +1359,6 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error) client_channel_factory_( ClientChannelFactory::GetFromChannelArgs(args->channel_args)), channelz_node_(GetChannelzNode(args->channel_args)), - data_plane_combiner_(grpc_combiner_create()), combiner_(grpc_combiner_create()), interested_parties_(grpc_pollset_set_create()), subchannel_pool_(GetSubchannelPool(args->channel_args)), @@ -1568,13 +1431,108 @@ ChannelData::~ChannelData() { // Stop backup polling. grpc_client_channel_stop_backup_polling(interested_parties_); grpc_pollset_set_destroy(interested_parties_); - GRPC_COMBINER_UNREF(data_plane_combiner_, "client_channel"); GRPC_COMBINER_UNREF(combiner_, "client_channel"); GRPC_ERROR_UNREF(disconnect_error_.Load(MemoryOrder::RELAXED)); grpc_connectivity_state_destroy(&state_tracker_); gpr_mu_destroy(&info_mu_); } +void ChannelData::UpdateStateAndPickerLocked( + grpc_connectivity_state state, const char* reason, + UniquePtr picker) { + // Clean the control plane when entering IDLE. + if (picker_ == nullptr) { + health_check_service_name_.reset(); + saved_service_config_.reset(); + received_first_resolver_result_ = false; + } + // Update connectivity state. + grpc_connectivity_state_set(&state_tracker_, state, reason); + if (channelz_node_ != nullptr) { + channelz_node_->SetConnectivityState(state); + channelz_node_->AddTraceEvent( + channelz::ChannelTrace::Severity::Info, + grpc_slice_from_static_string( + channelz::ChannelNode::GetChannelConnectivityStateChangeString( + state))); + } + // Grab data plane lock to do subchannel updates and update the picker. + // + // Note that we want to minimize the work done while holding the data + // plane lock, to keep the critical section small. So, for all of the + // objects that we might wind up unreffing here, we actually hold onto + // the refs until after we release the lock, and then unref them at + // that point. This includes the following: + // - refs to subchannel wrappers in the keys of pending_subchannel_updates_ + // - ref stored in retry_throttle_data_ + // - ref stored in service_config_ + // - ownership of the existing picker in picker_ + RefCountedPtr retry_throttle_data_to_unref; + RefCountedPtr service_config_to_unref; + { + MutexLock lock(&data_plane_mu_); + // Handle subchannel updates. + for (auto& p : pending_subchannel_updates_) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: updating subchannel wrapper %p data plane " + "connected_subchannel to %p", + this, p.first.get(), p.second.get()); + } + // Note: We do not remove the entry from pending_subchannel_updates_ + // here, since this would unref the subchannel wrapper; instead, + // we wait until we've released the lock to clear the map. + p.first->set_connected_subchannel_in_data_plane(std::move(p.second)); + } + // Swap out the picker. + // Note: Original value will be destroyed after the lock is released. + picker_.swap(picker); + // Clean the data plane if the updated picker is nullptr. + if (picker_ == nullptr) { + received_service_config_data_ = false; + // Note: We save the objects to unref until after the lock is released. + retry_throttle_data_to_unref = std::move(retry_throttle_data_); + service_config_to_unref = std::move(service_config_); + } + // Re-process queued picks. + for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) { + grpc_call_element* elem = pick->elem; + CallData* calld = static_cast(elem->call_data); + grpc_error* error = GRPC_ERROR_NONE; + if (calld->PickSubchannelLocked(elem, &error)) { + calld->AsyncPickDone(elem, error); + } + } + } + // Clear the pending update map after releasing the lock, to keep the + // critical section small. + pending_subchannel_updates_.clear(); +} + +void ChannelData::UpdateServiceConfigLocked( + RefCountedPtr retry_throttle_data, + RefCountedPtr service_config) { + // Grab data plane lock to update service config. + // + // We defer unreffing the old values (and deallocating memory) until + // after releasing the lock to keep the critical section small. + { + MutexLock lock(&data_plane_mu_); + // Update service config. + received_service_config_data_ = true; + // Old values will be unreffed after lock is released. + retry_throttle_data_.swap(retry_throttle_data); + service_config_.swap(service_config); + // Apply service config to queued picks. + for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) { + CallData* calld = static_cast(pick->elem->call_data); + calld->MaybeApplyServiceConfigToCallLocked(pick->elem); + } + } + // Old values will be unreffed after lock is released when they go out + // of scope. +} + void ChannelData::CreateResolvingLoadBalancingPolicyLocked() { // Instantiate resolving LB policy. LoadBalancingPolicy::Args lb_args; @@ -1746,15 +1704,20 @@ bool ChannelData::ProcessResolverResultLocked( // if we feel it is unnecessary. if (service_config_changed || !chand->received_first_resolver_result_) { chand->received_first_resolver_result_ = true; - Optional - retry_throttle_data; + RefCountedPtr retry_throttle_data; if (parsed_service_config != nullptr) { - retry_throttle_data = parsed_service_config->retry_throttling(); + Optional + retry_throttle_config = parsed_service_config->retry_throttling(); + if (retry_throttle_config.has_value()) { + retry_throttle_data = + internal::ServerRetryThrottleMap::GetDataForServer( + chand->server_name_.get(), + retry_throttle_config.value().max_milli_tokens, + retry_throttle_config.value().milli_token_ratio); + } } - // Create service config setter to update channel state in the data - // plane combiner. Destroys itself when done. - New(chand, retry_throttle_data, - chand->saved_service_config_); + chand->UpdateServiceConfigLocked(std::move(retry_throttle_data), + chand->saved_service_config_); } UniquePtr processed_lb_policy_name; chand->ProcessLbPolicy(result, parsed_service_config, @@ -1838,8 +1801,8 @@ void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) { static_cast(value) == GRPC_CHANNEL_IDLE) { if (chand->disconnect_error() == GRPC_ERROR_NONE) { // Enter IDLE state. - New(chand, GRPC_CHANNEL_IDLE, - "channel entering IDLE", nullptr); + chand->UpdateStateAndPickerLocked(GRPC_CHANNEL_IDLE, + "channel entering IDLE", nullptr); } GRPC_ERROR_UNREF(op->disconnect_with_error); } else { @@ -1848,8 +1811,8 @@ void ChannelData::StartTransportOpLocked(void* arg, grpc_error* ignored) { GRPC_ERROR_NONE); chand->disconnect_error_.Store(op->disconnect_with_error, MemoryOrder::RELEASE); - New( - chand, GRPC_CHANNEL_SHUTDOWN, "shutdown from API", + chand->UpdateStateAndPickerLocked( + GRPC_CHANNEL_SHUTDOWN, "shutdown from API", UniquePtr( New( GRPC_ERROR_REF(op->disconnect_with_error)))); @@ -2092,8 +2055,8 @@ void CallData::StartTransportStreamOpBatch( // Add the batch to the pending list. calld->PendingBatchesAdd(elem, batch); // Check if we've already gotten a subchannel call. - // Note that once we have completed the pick, we do not need to enter - // the channel combiner, which is more efficient (especially for + // Note that once we have picked a subchannel, we do not need to acquire + // the channel's data plane mutex, which is more efficient (especially for // streaming calls). if (calld->subchannel_call_ != nullptr) { if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) { @@ -2105,18 +2068,15 @@ void CallData::StartTransportStreamOpBatch( return; } // We do not yet have a subchannel call. - // For batches containing a send_initial_metadata op, enter the channel - // combiner to start a pick. + // For batches containing a send_initial_metadata op, acquire the + // channel's data plane mutex to pick a subchannel. if (GPR_LIKELY(batch->send_initial_metadata)) { if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) { - gpr_log(GPR_INFO, "chand=%p calld=%p: entering client_channel combiner", + gpr_log(GPR_INFO, + "chand=%p calld=%p: grabbing data plane mutex to perform pick", chand, calld); } - GRPC_CLOSURE_SCHED( - GRPC_CLOSURE_INIT( - &batch->handler_private.closure, StartPickLocked, elem, - grpc_combiner_scheduler(chand->data_plane_combiner())), - GRPC_ERROR_NONE); + PickSubchannel(elem, GRPC_ERROR_NONE); } else { // For all other batches, release the call combiner. if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) { @@ -2544,8 +2504,8 @@ void CallData::DoRetry(grpc_call_element* elem, this, next_attempt_time - ExecCtx::Get()->Now()); } // Schedule retry after computed delay. - GRPC_CLOSURE_INIT(&pick_closure_, StartPickLocked, elem, - grpc_combiner_scheduler(chand->data_plane_combiner())); + GRPC_CLOSURE_INIT(&pick_closure_, PickSubchannel, elem, + grpc_schedule_on_exec_ctx); grpc_timer_init(&retry_timer_, next_attempt_time, &pick_closure_); // Update bookkeeping. if (retry_state != nullptr) retry_state->retry_dispatched = true; @@ -3660,6 +3620,11 @@ void CallData::CreateSubchannelCall(grpc_call_element* elem) { } } +void CallData::AsyncPickDone(grpc_call_element* elem, grpc_error* error) { + GRPC_CLOSURE_INIT(&pick_closure_, PickDone, elem, grpc_schedule_on_exec_ctx); + GRPC_CLOSURE_SCHED(&pick_closure_, error); +} + void CallData::PickDone(void* arg, grpc_error* error) { grpc_call_element* elem = static_cast(arg); ChannelData* chand = static_cast(elem->channel_data); @@ -3682,10 +3647,9 @@ class CallData::QueuedPickCanceller { public: explicit QueuedPickCanceller(grpc_call_element* elem) : elem_(elem) { auto* calld = static_cast(elem->call_data); - auto* chand = static_cast(elem->channel_data); GRPC_CALL_STACK_REF(calld->owning_call_, "QueuedPickCanceller"); GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this, - grpc_combiner_scheduler(chand->data_plane_combiner())); + grpc_schedule_on_exec_ctx); calld->call_combiner_->SetNotifyOnCancel(&closure_); } @@ -3694,6 +3658,7 @@ class CallData::QueuedPickCanceller { auto* self = static_cast(arg); auto* chand = static_cast(self->elem_->channel_data); auto* calld = static_cast(self->elem_->call_data); + MutexLock lock(chand->data_plane_mu()); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: cancelling queued pick: " @@ -3818,23 +3783,38 @@ const char* PickResultTypeName( GPR_UNREACHABLE_CODE(return "UNKNOWN"); } -void CallData::StartPickLocked(void* arg, grpc_error* error) { +void CallData::PickSubchannel(void* arg, grpc_error* error) { grpc_call_element* elem = static_cast(arg); CallData* calld = static_cast(elem->call_data); ChannelData* chand = static_cast(elem->channel_data); - GPR_ASSERT(calld->connected_subchannel_ == nullptr); - GPR_ASSERT(calld->subchannel_call_ == nullptr); - // picker's being null means the channel is currently in IDLE state. The - // incoming call will make the channel exit IDLE and queue itself. + bool pick_complete; + { + MutexLock lock(chand->data_plane_mu()); + pick_complete = calld->PickSubchannelLocked(elem, &error); + } + if (pick_complete) { + PickDone(elem, error); + GRPC_ERROR_UNREF(error); + } +} + +bool CallData::PickSubchannelLocked(grpc_call_element* elem, + grpc_error** error) { + ChannelData* chand = static_cast(elem->channel_data); + GPR_ASSERT(connected_subchannel_ == nullptr); + GPR_ASSERT(subchannel_call_ == nullptr); + // The picker being null means that the channel is currently in IDLE state. + // The incoming call will make the channel exit IDLE. if (chand->picker() == nullptr) { - // We are currently in the data plane. - // Bounce into the control plane to exit IDLE. - chand->CheckConnectivityState(true); - calld->AddCallToQueuedPicksLocked(elem); - return; + // Bounce into the control plane combiner to exit IDLE. + chand->CheckConnectivityState(/*try_to_connect=*/true); + // Queue the pick, so that it will be attempted once the channel + // becomes connected. + AddCallToQueuedPicksLocked(elem); + return false; } // Apply service config to call if needed. - calld->MaybeApplyServiceConfigToCallLocked(elem); + MaybeApplyServiceConfigToCallLocked(elem); // If this is a retry, use the send_initial_metadata payload that // we've cached; otherwise, use the pending batch. The // send_initial_metadata batch will be the first pending batch in the @@ -3846,31 +3826,27 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { // subchannel's copy of the metadata batch (which is copied for each // attempt) to the LB policy instead the one from the parent channel. LoadBalancingPolicy::PickArgs pick_args; - pick_args.call_state = &calld->lb_call_state_; + pick_args.call_state = &lb_call_state_; Metadata initial_metadata( - calld, - calld->seen_send_initial_metadata_ - ? &calld->send_initial_metadata_ - : calld->pending_batches_[0] + this, + seen_send_initial_metadata_ + ? &send_initial_metadata_ + : pending_batches_[0] .batch->payload->send_initial_metadata.send_initial_metadata); pick_args.initial_metadata = &initial_metadata; // Grab initial metadata flags so that we can check later if the call has // wait_for_ready enabled. const uint32_t send_initial_metadata_flags = - calld->seen_send_initial_metadata_ - ? calld->send_initial_metadata_flags_ - : calld->pending_batches_[0] - .batch->payload->send_initial_metadata - .send_initial_metadata_flags; - // When done, we schedule this closure to leave the data plane combiner. - GRPC_CLOSURE_INIT(&calld->pick_closure_, PickDone, elem, - grpc_schedule_on_exec_ctx); + seen_send_initial_metadata_ ? send_initial_metadata_flags_ + : pending_batches_[0] + .batch->payload->send_initial_metadata + .send_initial_metadata_flags; // Attempt pick. auto result = chand->picker()->Pick(pick_args); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: LB pick returned %s (subchannel=%p, error=%s)", - chand, calld, PickResultTypeName(result.type), + chand, this, PickResultTypeName(result.type), result.subchannel.get(), grpc_error_string(result.error)); } switch (result.type) { @@ -3879,10 +3855,9 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { grpc_error* disconnect_error = chand->disconnect_error(); if (disconnect_error != GRPC_ERROR_NONE) { GRPC_ERROR_UNREF(result.error); - GRPC_CLOSURE_SCHED(&calld->pick_closure_, - GRPC_ERROR_REF(disconnect_error)); - if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); - break; + if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); + *error = GRPC_ERROR_REF(disconnect_error); + return true; } // If wait_for_ready is false, then the error indicates the RPC // attempt's final status. @@ -3890,19 +3865,20 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { GRPC_INITIAL_METADATA_WAIT_FOR_READY) == 0) { // Retry if appropriate; otherwise, fail. grpc_status_code status = GRPC_STATUS_OK; - grpc_error_get_status(result.error, calld->deadline_, &status, nullptr, + grpc_error_get_status(result.error, deadline_, &status, nullptr, nullptr, nullptr); - if (!calld->enable_retries_ || - !calld->MaybeRetry(elem, nullptr /* batch_data */, status, - nullptr /* server_pushback_md */)) { + const bool retried = enable_retries_ && + MaybeRetry(elem, nullptr /* batch_data */, status, + nullptr /* server_pushback_md */); + if (!retried) { grpc_error* new_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Failed to pick subchannel", &result.error, 1); GRPC_ERROR_UNREF(result.error); - GRPC_CLOSURE_SCHED(&calld->pick_closure_, new_error); + *error = new_error; } - if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); - break; + if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); + return !retried; } // If wait_for_ready is true, then queue to retry when we get a new // picker. @@ -3910,26 +3886,26 @@ void CallData::StartPickLocked(void* arg, grpc_error* error) { } // Fallthrough case LoadBalancingPolicy::PickResult::PICK_QUEUE: - if (!calld->pick_queued_) calld->AddCallToQueuedPicksLocked(elem); - break; + if (!pick_queued_) AddCallToQueuedPicksLocked(elem); + return false; default: // PICK_COMPLETE + if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); // Handle drops. if (GPR_UNLIKELY(result.subchannel == nullptr)) { result.error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Call dropped by load balancing policy"); } else { // Grab a ref to the connected subchannel while we're still - // holding the data plane combiner. - calld->connected_subchannel_ = + // holding the data plane mutex. + connected_subchannel_ = chand->GetConnectedSubchannelInDataPlane(result.subchannel.get()); - GPR_ASSERT(calld->connected_subchannel_ != nullptr); + GPR_ASSERT(connected_subchannel_ != nullptr); } - calld->lb_recv_trailing_metadata_ready_ = - result.recv_trailing_metadata_ready; - calld->lb_recv_trailing_metadata_ready_user_data_ = + lb_recv_trailing_metadata_ready_ = result.recv_trailing_metadata_ready; + lb_recv_trailing_metadata_ready_user_data_ = result.recv_trailing_metadata_ready_user_data; - GRPC_CLOSURE_SCHED(&calld->pick_closure_, result.error); - if (calld->pick_queued_) calld->RemoveCallFromQueuedPicksLocked(elem); + *error = result.error; + return true; } } diff --git a/src/core/lib/gprpp/ref_counted_ptr.h b/src/core/lib/gprpp/ref_counted_ptr.h index 19f38d7f013..2e3f4671581 100644 --- a/src/core/lib/gprpp/ref_counted_ptr.h +++ b/src/core/lib/gprpp/ref_counted_ptr.h @@ -103,6 +103,8 @@ class RefCountedPtr { if (value_ != nullptr) value_->Unref(); } + void swap(RefCountedPtr& other) { std::swap(value_, other.value_); } + // If value is non-null, we take ownership of a ref to it. void reset(T* value = nullptr) { if (value_ != nullptr) value_->Unref(); diff --git a/test/core/gprpp/ref_counted_ptr_test.cc b/test/core/gprpp/ref_counted_ptr_test.cc index 96dbdf884b0..38bd4b61364 100644 --- a/test/core/gprpp/ref_counted_ptr_test.cc +++ b/test/core/gprpp/ref_counted_ptr_test.cc @@ -151,6 +151,20 @@ TEST(RefCountedPtr, EqualityOperators) { EXPECT_NE(foo, nullptr); } +TEST(RefCountedPtr, Swap) { + Foo* foo = New(); + Foo* bar = New(); + RefCountedPtr ptr1(foo); + RefCountedPtr ptr2(bar); + ptr1.swap(ptr2); + EXPECT_EQ(foo, ptr2.get()); + EXPECT_EQ(bar, ptr1.get()); + RefCountedPtr ptr3; + ptr3.swap(ptr2); + EXPECT_EQ(nullptr, ptr2.get()); + EXPECT_EQ(foo, ptr3.get()); +} + TEST(MakeRefCounted, NoArgs) { RefCountedPtr foo = MakeRefCounted(); EXPECT_EQ(0, foo->value()); From fd9bdd9922fffe88ae9f2752f790922d0ed8f369 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 5 Sep 2019 08:17:16 -0700 Subject: [PATCH 114/120] Avoid duplicate initialization of SSL (from within grpc and from test) --- test/core/handshake/server_ssl_common.cc | 56 +++++++++++++++++++----- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index 41b2829d8b7..1493094e3c3 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -32,6 +32,7 @@ #include #include +#include "src/core/lib/gprpp/sync.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/load_file.h" #include "test/core/util/port.h" @@ -41,10 +42,12 @@ #define SSL_KEY_PATH "src/core/tsi/test_creds/server1.key" #define SSL_CA_PATH "src/core/tsi/test_creds/ca.pem" +namespace { + // Handshake completed signal to server thread. -static gpr_event client_handshake_complete; +gpr_event client_handshake_complete; -static int create_socket(int port) { +int create_socket(int port) { int s; struct sockaddr_in addr; @@ -66,9 +69,34 @@ static int create_socket(int port) { return s; } +class ServerInfo { + public: + explicit ServerInfo(int p) : port_(p) {} + + int port() const { return port_; } + + void Activate() { + grpc_core::MutexLock lock(&mu_); + ready_ = true; + cv_.Signal(); + } + + void Await() { + grpc_core::MutexLock lock(&mu_); + cv_.WaitUntil(&mu_, [this] { return ready_; }); + } + + private: + const int port_; + grpc_core::Mutex mu_; + grpc_core::CondVar cv_; + bool ready_ = false; +}; + // Simple gRPC server. This listens until client_handshake_complete occurs. -static void server_thread(void* arg) { - const int port = *static_cast(arg); +void server_thread(void* arg) { + ServerInfo* s = static_cast(arg); + const int port = s->port(); // Load key pair and establish server SSL credentials. grpc_ssl_pem_key_cert_pair pem_key_cert_pair; @@ -100,6 +128,10 @@ static void server_thread(void* arg) { grpc_server_register_completion_queue(server, cq, nullptr); grpc_server_start(server); + // Notify the other side that it is now ok to start working since SSL is + // definitely already started. + s->Activate(); + // Wait a bounded number of time until client_handshake_complete is set, // sleeping between polls. int retries = 10; @@ -125,6 +157,8 @@ static void server_thread(void* arg) { grpc_slice_unref(ca_slice); } +} // namespace + // This test launches a gRPC server on a separate thread and then establishes a // TLS handshake via a minimal TLS client. The TLS client has configurable (via // alpn_list) ALPN settings and can probe at the supported ALPN preferences @@ -134,17 +168,19 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len, bool success = true; grpc_init(); - int port = grpc_pick_unused_port_or_die(); + ServerInfo s(grpc_pick_unused_port_or_die()); gpr_event_init(&client_handshake_complete); // Launch the gRPC server thread. bool ok; - grpc_core::Thread thd("grpc_ssl_test", server_thread, &port, &ok); + grpc_core::Thread thd("grpc_ssl_test", server_thread, &s, &ok); GPR_ASSERT(ok); thd.Start(); - SSL_load_error_strings(); - OpenSSL_add_ssl_algorithms(); + // The work in server_thread will cause the SSL initialization to take place + // so long as we wait for it to reach beyond the point of adding a secure + // server port. + s.Await(); const SSL_METHOD* method = TLSv1_2_client_method(); SSL_CTX* ctx = SSL_CTX_new(method); @@ -197,13 +233,13 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len, int retries = 10; int sock = -1; while (sock == -1 && retries-- > 0) { - sock = create_socket(port); + sock = create_socket(s.port()); if (sock < 0) { sleep(1); } } GPR_ASSERT(sock > 0); - gpr_log(GPR_INFO, "Connected to server on port %d", port); + gpr_log(GPR_INFO, "Connected to server on port %d", s.port()); // Establish a SSL* and connect at SSL layer. SSL* ssl = SSL_new(ctx); From 7235091dc26918f1b112d706786ca62b6ca17b45 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 5 Sep 2019 10:41:32 -0700 Subject: [PATCH 115/120] Don't start AuthMetadataProcessor threadpool for non-blocking processor --- src/cpp/server/secure_server_credentials.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index 24b133cf7f0..cc5ed1e1f92 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -46,7 +46,11 @@ class AuthMetadataProcessorAyncWrapper final { AuthMetadataProcessorAyncWrapper( const std::shared_ptr& processor) - : thread_pool_(CreateDefaultThreadPool()), processor_(processor) {} + : processor_(processor) { + if (processor && processor->IsBlocking()) { + thread_pool_.reset(CreateDefaultThreadPool()); + } + } private: void InvokeProcessor(grpc_auth_context* context, const grpc_metadata* md, From ecf7274aaae21a2828b393c263520901a5fbad53 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 5 Sep 2019 11:41:36 -0700 Subject: [PATCH 116/120] Add docstring to py2and3_test --- bazel/python_rules.bzl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index e7e9e597b05..373895fc94d 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -183,6 +183,12 @@ def py_grpc_library( def py2and3_test(name, py_test = native.py_test, **kwargs): + """Runs a Python test under both Python 2 and Python 3. + + Args: + name: The name of the test. + py_test: The rule to use for each test. + """ if "python_version" in kwargs: fail("Cannot specify 'python_version' in py2and3_test.") From c11539f79e75e6f6dd4fb17debe4e4f09755f07e Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 5 Sep 2019 12:32:58 -0700 Subject: [PATCH 117/120] Document kwargs --- bazel/python_rules.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 373895fc94d..356c62d673a 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -188,6 +188,8 @@ def py2and3_test(name, Args: name: The name of the test. py_test: The rule to use for each test. + **kwargs: Keyword arguments passed directly to the underlying py_test + rule. """ if "python_version" in kwargs: fail("Cannot specify 'python_version' in py2and3_test.") From 9f02fc7f91aa40e364835b4cf9fe9e78429d9ffb Mon Sep 17 00:00:00 2001 From: Prashant Jaikumar Date: Wed, 21 Aug 2019 14:54:56 -0700 Subject: [PATCH 118/120] Enable end2end C++ tests on iOS. Some e2e tests were disabled on iOS because they hit the Apple CFStream bug. This commit enables e2e tests and works around the Apple bug by disabling CFStream. --- test/cpp/common/time_jump_test.cc | 2 +- test/cpp/end2end/BUILD | 8 +- test/cpp/end2end/channelz_service_test.cc | 8 +- .../end2end/client_callback_end2end_test.cc | 6 ++ test/cpp/end2end/client_lb_end2end_test.cc | 5 ++ test/cpp/end2end/end2end_test.cc | 14 +++- test/cpp/end2end/grpclb_end2end_test.cc | 5 ++ test/cpp/end2end/hybrid_end2end_test.cc | 8 ++ test/cpp/end2end/port_sharing_end2end_test.cc | 7 ++ test/cpp/end2end/thread_stress_test.cc | 8 +- test/cpp/end2end/xds_end2end_test.cc | 4 + .../UnitTesting/GTMGoogleTestRunner.mm | 83 +++++++++---------- 12 files changed, 100 insertions(+), 58 deletions(-) diff --git a/test/cpp/common/time_jump_test.cc b/test/cpp/common/time_jump_test.cc index ea6711dfce3..a997982d9fa 100644 --- a/test/cpp/common/time_jump_test.cc +++ b/test/cpp/common/time_jump_test.cc @@ -121,7 +121,7 @@ TEST_P(TimeJumpTest, TimedWait) { GPR_ASSERT(1 == gpr_time_similar(gpr_time_sub(after, before), gpr_time_from_millis(kWaitTimeMs, GPR_TIMESPAN), - gpr_time_from_millis(10, GPR_TIMESPAN))); + gpr_time_from_millis(50, GPR_TIMESPAN))); thd.join(); } diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 1b487602a7a..9153439341f 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -165,7 +165,6 @@ grpc_cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) grpc_cc_test( @@ -224,6 +223,7 @@ grpc_cc_library( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + alwayslink = 1, ) grpc_cc_test( @@ -272,6 +272,7 @@ grpc_cc_test( # system uses it to specialize targets "//:grpc++", ], + tags = ["no_test_ios"], ) grpc_cc_test( @@ -441,7 +442,6 @@ grpc_cc_test( "//test/core/util:test_lb_policies", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) grpc_cc_test( @@ -482,7 +482,6 @@ grpc_cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) grpc_cc_test( @@ -505,7 +504,6 @@ grpc_cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) grpc_cc_test( @@ -698,7 +696,6 @@ grpc_cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) grpc_cc_test( @@ -756,5 +753,4 @@ grpc_cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], - tags = ["no_test_ios"], ) diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc index 1ed2d8c65f2..325a6ef7094 100644 --- a/test/cpp/end2end/channelz_service_test.cc +++ b/test/cpp/end2end/channelz_service_test.cc @@ -29,6 +29,7 @@ #include #include +#include "src/core/lib/gpr/env.h" #include "src/proto/grpc/channelz/channelz.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" @@ -104,7 +105,12 @@ class Proxy : public ::grpc::testing::EchoTestService::Service { class ChannelzServerTest : public ::testing::Test { public: ChannelzServerTest() {} - + static void SetUpTestCase() { +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + } void SetUp() override { // ensure channel server is brought up on all severs we build. ::grpc::channelz::experimental::InitChannelzService(); diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index a54158ac1d1..c4375b884ee 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -32,6 +32,7 @@ #include #include +#include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" @@ -1336,6 +1337,11 @@ TEST_P(ClientCallbackEnd2endTest, } std::vector CreateTestScenarios(bool test_insecure) { +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + std::vector scenarios; std::vector credentials_types{ GetCredentialsProvider()->GetSecureCredentialsTypeList()}; diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 1a96aafd7a1..e0b4b074ff2 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -45,6 +45,7 @@ #include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/lib/backoff/backoff.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/gpr/env.h" #include "src/core/lib/gprpp/debug_location.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/tcp_client.h" @@ -220,6 +221,10 @@ class ClientLbEnd2endTest : public ::testing::Test { // Make the backup poller poll very frequently in order to pick up // updates from all the subchannels's FDs. GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 1); +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif } void SetUp() override { grpc_init(); } diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index a8592fd97c2..a5a9675d14d 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -36,6 +36,7 @@ #include #include "src/core/ext/filters/client_channel/backup_poller.h" +#include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" @@ -254,6 +255,8 @@ void TestScenario::Log() const { class End2endTest : public ::testing::TestWithParam { protected: + static void SetUpTestCase() { grpc_init(); } + static void TearDownTestCase() { grpc_shutdown(); } End2endTest() : is_server_started_(false), kMaxMessageSize_(8192), @@ -2106,6 +2109,13 @@ std::vector CreateTestScenarios(bool use_proxy, bool test_callback_server) { std::vector scenarios; std::vector credentials_types; + + GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 200); +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + if (test_secure) { credentials_types = GetCredentialsProvider()->GetSecureCredentialsTypeList(); @@ -2173,12 +2183,8 @@ INSTANTIATE_TEST_CASE_P( } // namespace grpc int main(int argc, char** argv) { - GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 200); grpc::testing::TestEnvironment env(argc, argv); - // The grpc_init is to cover the MAYBE_SKIP_TEST. - grpc_init(); ::testing::InitGoogleTest(&argc, argv); int ret = RUN_ALL_TESTS(); - grpc_shutdown(); return ret; } diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index d71dafc855f..8f0b4cef2ee 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -39,6 +39,7 @@ #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/service_config.h" +#include "src/core/lib/gpr/env.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" @@ -378,6 +379,10 @@ class GrpclbEnd2endTest : public ::testing::Test { // Make the backup poller poll very frequently in order to pick up // updates from all the subchannels's FDs. GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 1); +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif grpc_init(); } diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 75001f0ab27..58ee1e3abb3 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -28,6 +28,7 @@ #include #include +#include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" @@ -229,6 +230,13 @@ class HybridEnd2endTest : public ::testing::TestWithParam { protected: HybridEnd2endTest() {} + static void SetUpTestCase() { +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + } + void SetUp() override { inproc_ = (::testing::UnitTest::GetInstance() ->current_test_info() diff --git a/test/cpp/end2end/port_sharing_end2end_test.cc b/test/cpp/end2end/port_sharing_end2end_test.cc index 4f30290d815..2c094c523c0 100644 --- a/test/cpp/end2end/port_sharing_end2end_test.cc +++ b/test/cpp/end2end/port_sharing_end2end_test.cc @@ -33,6 +33,7 @@ #include #include +#include "src/core/lib/gpr/env.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/pollset.h" @@ -310,6 +311,12 @@ static void SendRpc(EchoTestService::Stub* stub, int num_rpcs) { std::vector CreateTestScenarios() { std::vector scenarios; std::vector credentials_types; + +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + credentials_types = GetCredentialsProvider()->GetSecureCredentialsTypeList(); // Only allow insecure credentials type when it is registered with the // provider. User may create providers that do not have insecure. diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index eb8e7958b4b..fee20c82679 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -31,6 +31,7 @@ #include #include +#include "src/core/lib/gpr/env.h" #include "src/core/lib/surface/api_trace.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" @@ -66,7 +67,12 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { template class CommonStressTest { public: - CommonStressTest() : kMaxMessageSize_(8192) {} + CommonStressTest() : kMaxMessageSize_(8192) { +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif + } virtual ~CommonStressTest() {} virtual void SetUp() = 0; virtual void TearDown() = 0; diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 17436bbc13a..2d506c56c87 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -521,6 +521,10 @@ class XdsEnd2endTest : public ::testing::Test { // Make the backup poller poll very frequently in order to pick up // updates from all the subchannels's FDs. GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 1); +#if TARGET_OS_IPHONE + // Workaround Apple CFStream bug + gpr_setenv("grpc_cfstream", "0"); +#endif grpc_init(); } diff --git a/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm b/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm index 3e8e9245fd4..20b2855cfb1 100644 --- a/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm +++ b/third_party/objective_c/google_toolbox_for_mac/UnitTesting/GTMGoogleTestRunner.mm @@ -20,14 +20,14 @@ #error "This file requires ARC support." #endif -// This is a SenTest/XCTest based unit test that will run all of the GoogleTest +// This is a XCTest based unit test that will run all of the GoogleTest // https://code.google.com/p/googletest/ -// based tests in the project, and will report results correctly via SenTest so +// based tests in the project, and will report results correctly via XCTest so // that Xcode can pick them up in it's UI. -// SenTest dynamically creates one SenTest per GoogleTest. +// XCTest dynamically creates one XCTest per GoogleTest. // GoogleTest is set up using a custom event listener (GoogleTestPrinter) -// which knows how to log GoogleTest test results in a manner that SenTest (and +// which knows how to log GoogleTest test results in a manner that XCTest (and // the Xcode IDE) understand. // Note that this does not able you to control individual tests from the Xcode @@ -39,33 +39,30 @@ // project because of it's dependency on https://code.google.com/p/googletest/ // To use this: -// - If you are using XCTest (vs SenTest) make sure to define GTM_USING_XCTEST -// in the settings for your testing bundle. // - Add GTMGoogleTestRunner to your test bundle sources. // - Add gtest-all.cc from gtest to your test bundle sources. // - Write some C++ tests and add them to your test bundle sources. // - Build and run tests. Your C++ tests should just execute. -// If you are using this with XCTest (as opposed to SenTestingKit) -// make sure to define GTM_USING_XCTEST. -#ifndef GTM_USING_XCTEST -#define GTM_USING_XCTEST 0 -#endif +// NOTE: +// A key difference between how GTMGoogleTestRunner runs tests versus how a +// "standard" unit test package runs tests is that SetUpTestSuite/SetupTestCase +// and TeardownTestSuite/TeardownTestCase are going to be called before/after +// *every* individual test. Unfortunately this is due to restrictions in the +// design of GoogleTest in that the only way to run individual tests is to +// use a filter to focus on a specific test, and then "run" all the tests +// multiple times. +// If you have state that you need maintained across tests (not normally a +// great idea anyhow), using SetUp*, Teardown* is not going to work for you. -#if GTM_USING_XCTEST #import -#define SenTestCase XCTestCase -#define SenTestSuite XCTestSuite -#else // GTM_USING_XCTEST -#import -#endif // GTM_USING_XCTEST - #import #include using ::testing::EmptyTestEventListener; using ::testing::TestCase; +using ::testing::TestEventListener; using ::testing::TestEventListeners; using ::testing::TestInfo; using ::testing::TestPartResult; @@ -75,18 +72,19 @@ using ::testing::UnitTest; namespace { // A gtest printer that takes care of reporting gtest results via the -// SenTest interface. Note that a test suite in SenTest == a test case in gtest -// and a test case in SenTest == a test in gtest. +// XCTest interface. Note that a test suite in XCTest == a test case in gtest +// and a test case in XCTest == a test in gtest. // This will handle fatal and non-fatal gtests properly. class GoogleTestPrinter : public EmptyTestEventListener { public: - GoogleTestPrinter(SenTestCase *test_case) : test_case_(test_case) {} + GoogleTestPrinter(XCTestCase *test_case) : test_case_(test_case) {} virtual ~GoogleTestPrinter() {} virtual void OnTestPartResult(const TestPartResult &test_part_result) { if (!test_part_result.passed()) { - NSString *file = @(test_part_result.file_name()); + const char *file_name = test_part_result.file_name(); + NSString *file = @(file_name ? file_name : ""); int line = test_part_result.line_number(); NSString *summary = @(test_part_result.summary()); @@ -94,26 +92,16 @@ class GoogleTestPrinter : public EmptyTestEventListener { // the Xcode UI, so we clean them up. NSString *oneLineSummary = [summary stringByReplacingOccurrencesOfString:@"\n" withString:@" "]; -#if GTM_USING_XCTEST BOOL expected = test_part_result.nonfatally_failed(); [test_case_ recordFailureWithDescription:oneLineSummary inFile:file atLine:line expected:expected]; -#else // GTM_USING_XCTEST - NSException *exception = - [NSException failureInFile:file - atLine:line - withDescription:@"%@", oneLineSummary]; - - // failWithException: will log appropriately. - [test_case_ failWithException:exception]; -#endif // GTM_USING_XCTEST } } private: - SenTestCase *test_case_; + XCTestCase *test_case_; }; NSString *SelectorNameFromGTestName(NSString *testName) { @@ -127,7 +115,7 @@ NSString *SelectorNameFromGTestName(NSString *testName) { // GTMGoogleTestRunner is a GTMTestCase that makes a sub test suite populated // with all of the GoogleTest unit tests. -@interface GTMGoogleTestRunner : SenTestCase { +@interface GTMGoogleTestRunner : XCTestCase { NSString *testName_; } @@ -154,8 +142,7 @@ NSString *SelectorNameFromGTestName(NSString *testName) { + (id)defaultTestSuite { [GTMGoogleTestRunner initGoogleTest]; - SenTestSuite *result = - [[SenTestSuite alloc] initWithName:NSStringFromClass(self)]; + XCTestSuite *result = [[XCTestSuite alloc] initWithName:NSStringFromClass(self)]; UnitTest *test = UnitTest::GetInstance(); // Walk the GoogleTest tests, adding sub tests and sub suites as appropriate. @@ -163,15 +150,14 @@ NSString *SelectorNameFromGTestName(NSString *testName) { for (int i = 0; i < total_test_case_count; ++i) { const TestCase *test_case = test->GetTestCase(i); int total_test_count = test_case->total_test_count(); - SenTestSuite *subSuite = - [[SenTestSuite alloc] initWithName:@(test_case->name())]; + XCTestSuite *subSuite = [[XCTestSuite alloc] initWithName:@(test_case->name())]; [result addTest:subSuite]; for (int j = 0; j < total_test_count; ++j) { const TestInfo *test_info = test_case->GetTestInfo(j); NSString *testName = [NSString stringWithFormat:@"%s.%s", test_case->name(), test_info->name()]; - SenTestCase *senTest = [[self alloc] initWithName:testName]; - [subSuite addTest:senTest]; + XCTestCase *xcTest = [[self alloc] initWithName:testName]; + [subSuite addTest:xcTest]; } } return result; @@ -201,7 +187,7 @@ NSString *SelectorNameFromGTestName(NSString *testName) { } - (NSString *)name { - // A SenTest name must be "-[foo bar]" or it won't be parsed properly. + // An XCTest name must be "-[foo bar]" or it won't be parsed properly. NSRange dot = [testName_ rangeOfString:@"."]; return [NSString stringWithFormat:@"-[%@ %@]", [testName_ substringToIndex:dot.location], @@ -214,11 +200,15 @@ NSString *SelectorNameFromGTestName(NSString *testName) { // Gets hold of the event listener list. TestEventListeners& listeners = UnitTest::GetInstance()->listeners(); - // Adds a listener to the end. Google Test takes the ownership. - listeners.Append(new GoogleTestPrinter(self)); + // Adds a listener to the end. + GoogleTestPrinter printer = GoogleTestPrinter(self); + listeners.Append(&printer); - // Remove the default printer. - delete listeners.Release(listeners.default_result_printer()); + // Remove the default printer if it exists. + TestEventListener *defaultListener = listeners.default_result_printer(); + if (defaultListener) { + delete listeners.Release(defaultListener); + } // Since there is no way of running a single GoogleTest directly, we use the // filter mechanism in GoogleTest to simulate it for us. @@ -228,6 +218,9 @@ NSString *SelectorNameFromGTestName(NSString *testName) { // the output appropriately, and there is no reason to mark this test as // "failed" if RUN_ALL_TESTS returns non-zero. (void)RUN_ALL_TESTS(); + + // Remove the listener that we added. + listeners.Release(&printer); } @end From e6e5d2d5318ddbc218e2a02896f6be4c931e7329 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 5 Sep 2019 14:18:35 -0700 Subject: [PATCH 119/120] Use libc++ for clang sanity test --- Makefile | 24 ++++++++++++------------ build.yaml | 35 ++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index d48b36a531f..1e8acd7e99e 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,8 @@ CC_asan-trace-cmp = clang CXX_asan-trace-cmp = clang++ LD_asan-trace-cmp = clang++ LDXX_asan-trace-cmp = clang++ -CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan-trace-cmp = -fsanitize=address +CPPFLAGS_asan-trace-cmp = -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan-trace-cmp = -stdlib=libc++ -fsanitize=address VALID_CONFIG_dbg = 1 CC_dbg = $(DEFAULT_CC) @@ -103,8 +103,8 @@ CC_asan = clang CXX_asan = clang++ LD_asan = clang++ LDXX_asan = clang++ -CPPFLAGS_asan = -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan = -fsanitize=address +CPPFLAGS_asan = -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan = -stdlib=libc++ -fsanitize=address VALID_CONFIG_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1 @@ -112,8 +112,8 @@ CC_msan = clang CXX_msan = clang++ LD_msan = clang++ LDXX_msan = clang++ -CPPFLAGS_msan = -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory -fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) +CPPFLAGS_msan = -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory -fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_msan = -stdlib=libc++ -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) DEFINES_msan = NDEBUG VALID_CONFIG_basicprof = 1 @@ -139,8 +139,8 @@ CC_asan-noleaks = clang CXX_asan-noleaks = clang++ LD_asan-noleaks = clang++ LDXX_asan-noleaks = clang++ -CPPFLAGS_asan-noleaks = -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_asan-noleaks = -fsanitize=address +CPPFLAGS_asan-noleaks = -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan-noleaks = -stdlib=libc++ -fsanitize=address VALID_CONFIG_noexcept = 1 CC_noexcept = $(DEFAULT_CC) @@ -157,8 +157,8 @@ CC_ubsan = clang CXX_ubsan = clang++ LD_ubsan = clang++ LDXX_ubsan = clang++ -CPPFLAGS_ubsan = -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs -LDFLAGS_ubsan = -fsanitize=undefined,unsigned-integer-overflow +CPPFLAGS_ubsan = -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs +LDFLAGS_ubsan = -stdlib=libc++ -fsanitize=undefined,unsigned-integer-overflow DEFINES_ubsan = NDEBUG GRPC_UBSAN VALID_CONFIG_tsan = 1 @@ -167,8 +167,8 @@ CC_tsan = clang CXX_tsan = clang++ LD_tsan = clang++ LDXX_tsan = clang++ -CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS -LDFLAGS_tsan = -fsanitize=thread +CPPFLAGS_tsan = -O0 -stdlib=libc++ -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_tsan = -stdlib=libc++ -fsanitize=thread DEFINES_tsan = GRPC_TSAN VALID_CONFIG_stapprof = 1 diff --git a/build.yaml b/build.yaml index 9c546246ab0..ee51a72bb8d 100644 --- a/build.yaml +++ b/build.yaml @@ -6067,11 +6067,11 @@ vspackages: configs: asan: CC: clang - CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer - -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address + -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ LD: clang++ - LDFLAGS: -fsanitize=address + LDFLAGS: -stdlib=libc++ -fsanitize=address LDXX: clang++ compile_the_world: true test_environ: @@ -6079,23 +6079,23 @@ configs: LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1 asan-noleaks: CC: clang - CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer - -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address + -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ LD: clang++ - LDFLAGS: -fsanitize=address + LDFLAGS: -stdlib=libc++ -fsanitize=address LDXX: clang++ compile_the_world: true test_environ: ASAN_OPTIONS: detect_leaks=0:color=always asan-trace-cmp: CC: clang - CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ LD: clang++ - LDFLAGS: -fsanitize=address + LDFLAGS: -stdlib=libc++ -fsanitize=address LDXX: clang++ compile_the_world: true test_environ: @@ -6137,13 +6137,14 @@ configs: valgrind: --tool=memcheck --leak-check=full msan: CC: clang - CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory -fsanitize-memory-track-origins - -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 - -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=memory + -fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor -fno-omit-frame-pointer + -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -Wno-unused-command-line-argument + -fPIE -pie -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ DEFINES: NDEBUG LD: clang++ - LDFLAGS: -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 + LDFLAGS: -stdlib=libc++ -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -fPIE -pie $(if $(JENKINS_BUILD),-Wl$(comma)-Ttext-segment=0x7e0000000000,) LDXX: clang++ compile_the_world: true @@ -6165,24 +6166,24 @@ configs: DEFINES: NDEBUG tsan: CC: clang - CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ DEFINES: GRPC_TSAN LD: clang++ - LDFLAGS: -fsanitize=thread + LDFLAGS: -stdlib=libc++ -fsanitize=thread LDXX: clang++ compile_the_world: true test_environ: TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1 ubsan: CC: clang - CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined -fno-omit-frame-pointer - -Wno-unused-command-line-argument -Wvarargs + CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined + -fno-omit-frame-pointer -Wno-unused-command-line-argument -Wvarargs CXX: clang++ DEFINES: NDEBUG GRPC_UBSAN LD: clang++ - LDFLAGS: -fsanitize=undefined,unsigned-integer-overflow + LDFLAGS: -stdlib=libc++ -fsanitize=undefined,unsigned-integer-overflow LDXX: clang++ compile_the_world: true test_environ: From 4e8ecb9fe63c3d15363bb568c016636325ed3fb1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 6 Sep 2019 12:31:45 +0200 Subject: [PATCH 120/120] Revert "Upgrade to Bazel 0.29 (including Windows RBE)" --- templates/tools/dockerfile/bazel.include | 2 +- tools/bazel | 2 +- tools/dockerfile/test/bazel/Dockerfile | 2 +- tools/dockerfile/test/sanity/Dockerfile | 2 +- tools/internal_ci/windows/bazel_rbe.bat | 4 ++-- tools/remote_build/windows.bazelrc | 7 ++++--- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/templates/tools/dockerfile/bazel.include b/templates/tools/dockerfile/bazel.include index 9762bdcb85f..12a22785623 100644 --- a/templates/tools/dockerfile/bazel.include +++ b/templates/tools/dockerfile/bazel.include @@ -2,7 +2,7 @@ # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.29.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/bazel b/tools/bazel index cfa875b0e63..4d1d57f60d9 100755 --- a/tools/bazel +++ b/tools/bazel @@ -32,7 +32,7 @@ then exec -a "$0" "${BAZEL_REAL}" "$@" fi -VERSION=0.29.0 +VERSION=0.28.1 echo "INFO: Running bazel wrapper (see //tools/bazel for details), bazel version $VERSION will be used instead of system-wide bazel installation." diff --git a/tools/dockerfile/test/bazel/Dockerfile b/tools/dockerfile/test/bazel/Dockerfile index fde54bae877..7141fb9c5f1 100644 --- a/tools/dockerfile/test/bazel/Dockerfile +++ b/tools/dockerfile/test/bazel/Dockerfile @@ -52,7 +52,7 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 t # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.29.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 4d3691f32bd..badff52de34 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -97,7 +97,7 @@ ENV CLANG_TIDY=clang-tidy # Bazel installation # Must be in sync with tools/bazel -ENV BAZEL_VERSION 0.29.0 +ENV BAZEL_VERSION 0.28.1 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. ENV DISABLE_BAZEL_WRAPPER 1 diff --git a/tools/internal_ci/windows/bazel_rbe.bat b/tools/internal_ci/windows/bazel_rbe.bat index 8d8ea118ebd..153b2d59687 100644 --- a/tools/internal_ci/windows/bazel_rbe.bat +++ b/tools/internal_ci/windows/bazel_rbe.bat @@ -14,7 +14,7 @@ @rem TODO(jtattermusch): make this generate less output @rem TODO(jtattermusch): use tools/bazel script to keep the versions in sync -choco install bazel -y --version 0.29.0 --limit-output +choco install bazel -y --version 0.26.0 --limit-output cd github/grpc set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH% @@ -24,7 +24,7 @@ powershell -Command "[guid]::NewGuid().ToString()" >%KOKORO_ARTIFACTS_DIR%/bazel set /p BAZEL_INVOCATION_ID=<%KOKORO_ARTIFACTS_DIR%/bazel_invocation_ids @rem TODO(jtattermusch): windows RBE should be able to use the same credentials as Linux RBE. -bazel --bazelrc=tools/remote_build/windows.bazelrc build --invocation_id="%BAZEL_INVOCATION_ID%" --workspace_status_command=tools/remote_build/workspace_status_kokoro.sh :all --google_credentials=%KOKORO_GFILE_DIR%/rbe-windows-credentials.json +bazel --bazelrc=tools/remote_build/windows.bazelrc build --invocation_id="%BAZEL_INVOCATION_ID%" --workspace_status_command=tools/remote_build/workspace_status_kokoro.sh :all --incompatible_disallow_filetype=false --google_credentials=%KOKORO_GFILE_DIR%/rbe-windows-credentials.json set BAZEL_EXITCODE=%errorlevel% @rem TODO(jtattermusch): upload results to bigquery diff --git a/tools/remote_build/windows.bazelrc b/tools/remote_build/windows.bazelrc index 825d6765de9..9fd3071e79f 100644 --- a/tools/remote_build/windows.bazelrc +++ b/tools/remote_build/windows.bazelrc @@ -1,7 +1,8 @@ startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 -build --remote_cache=grpcs://remotebuildexecution.googleapis.com -build --remote_executor=grpcs://remotebuildexecution.googleapis.com +build --remote_cache=remotebuildexecution.googleapis.com +build --remote_executor=remotebuildexecution.googleapis.com +build --tls_enabled=true build --host_crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain build --crosstool_top=//third_party/toolchains/bazel_0.26.0_rbe_windows:toolchain @@ -37,7 +38,7 @@ test --test_env=GRPC_VERBOSITY=debug # Set flags for uploading to BES in order to view results in the Bazel Build # Results UI. -build --bes_backend=grpcs://buildeventservice.googleapis.com +build --bes_backend="buildeventservice.googleapis.com" build --bes_timeout=60s build --bes_results_url="https://source.cloud.google.com/results/invocations/" build --project_id=grpc-testing