Merge branch 'master' into completion-queue-fold

pull/18063/head
Karthik Ravi Shankar 6 years ago
commit d2b2f7f5a3
  1. 2
      BUILD
  2. 1
      BUILD.gn
  3. 3
      CMakeLists.txt
  4. 3
      Makefile
  5. 2
      WORKSPACE
  6. 1
      build.yaml
  7. 1
      gRPC-C++.podspec
  8. 89
      include/grpcpp/channel.h
  9. 4
      include/grpcpp/channel_impl.h
  10. 6
      include/grpcpp/create_channel_impl.h
  11. 5
      include/grpcpp/impl/codegen/client_callback.h
  12. 13
      include/grpcpp/impl/codegen/client_context.h
  13. 6
      include/grpcpp/impl/codegen/client_interceptor.h
  14. 4
      include/grpcpp/impl/codegen/completion_queue_impl.h
  15. 4
      include/grpcpp/impl/codegen/server_callback.h
  16. 1
      include/grpcpp/impl/codegen/server_interface.h
  17. 19
      include/grpcpp/security/credentials.h
  18. 1
      include/grpcpp/server_impl.h
  19. 1
      src/compiler/cpp_generator.cc
  20. 62
      src/cpp/client/channel_cc.cc
  21. 9
      src/cpp/client/client_context.cc
  22. 4
      src/cpp/client/create_channel.cc
  23. 9
      src/cpp/client/create_channel_internal.cc
  24. 9
      src/cpp/client/create_channel_internal.h
  25. 6
      src/cpp/client/create_channel_posix.cc
  26. 2
      src/cpp/client/cronet_credentials.cc
  27. 2
      src/cpp/client/insecure_credentials.cc
  28. 2
      src/cpp/client/secure_credentials.cc
  29. 9
      src/cpp/client/secure_credentials.h
  30. 4
      src/cpp/server/server_cc.cc
  31. 5
      test/core/end2end/generate_tests.bzl
  32. 4
      test/core/handshake/BUILD
  33. 1
      test/core/network_benchmarks/BUILD
  34. 1
      test/core/util/BUILD
  35. 2
      test/cpp/codegen/compiler_test_golden
  36. 2
      test/cpp/codegen/golden_file_test.cc
  37. 2
      test/cpp/microbenchmarks/bm_call_create.cc
  38. 2
      test/cpp/microbenchmarks/fullstack_fixtures.h
  39. 2
      test/cpp/performance/writes_per_rpc_test.cc
  40. 26
      test/cpp/util/create_test_channel.h
  41. 30
      third_party/toolchains/BUILD
  42. 188
      third_party/toolchains/bazel_0.23.2_rbe_windows/BUILD
  43. 1704
      third_party/toolchains/bazel_0.23.2_rbe_windows/cc_toolchain_config.bzl
  44. 23
      third_party/toolchains/bazel_0.23.2_rbe_windows/dummy_toolchain.bzl
  45. 1
      tools/doxygen/Doxyfile.c++
  46. 1
      tools/doxygen/Doxyfile.c++.internal
  47. 2
      tools/gce/create_linux_kokoro_performance_worker_from_image.sh
  48. 2
      tools/gce/linux_kokoro_performance_worker_init.sh
  49. 4
      tools/remote_build/README.md
  50. 48
      tools/remote_build/windows.bazelrc
  51. 2
      tools/run_tests/generated/sources_and_headers.json
  52. 29
      tools/run_tests/sanity/cpp_banned_constructs.sh
  53. 1
      tools/run_tests/sanity/sanity_tests.yaml

@ -216,6 +216,7 @@ GRPCXX_PUBLIC_HDRS = [
"include/grpcpp/alarm.h",
"include/grpcpp/alarm_impl.h",
"include/grpcpp/channel.h",
"include/grpcpp/channel_impl.h",
"include/grpcpp/client_context.h",
"include/grpcpp/completion_queue.h",
"include/grpcpp/create_channel.h",
@ -2362,6 +2363,7 @@ grpc_cc_library(
":google_api_upb",
":proto_gen_validate_upb",
],
tags = ["no_windows"],
)
grpc_cc_library(

@ -1003,6 +1003,7 @@ config("grpc_config") {
"include/grpcpp/alarm.h",
"include/grpcpp/alarm_impl.h",
"include/grpcpp/channel.h",
"include/grpcpp/channel_impl.h",
"include/grpcpp/client_context.h",
"include/grpcpp/completion_queue.h",
"include/grpcpp/create_channel.h",

@ -2997,6 +2997,7 @@ foreach(_hdr
include/grpcpp/alarm.h
include/grpcpp/alarm_impl.h
include/grpcpp/channel.h
include/grpcpp/channel_impl.h
include/grpcpp/client_context.h
include/grpcpp/completion_queue.h
include/grpcpp/create_channel.h
@ -3602,6 +3603,7 @@ foreach(_hdr
include/grpcpp/alarm.h
include/grpcpp/alarm_impl.h
include/grpcpp/channel.h
include/grpcpp/channel_impl.h
include/grpcpp/client_context.h
include/grpcpp/completion_queue.h
include/grpcpp/create_channel.h
@ -4585,6 +4587,7 @@ foreach(_hdr
include/grpcpp/alarm.h
include/grpcpp/alarm_impl.h
include/grpcpp/channel.h
include/grpcpp/channel_impl.h
include/grpcpp/client_context.h
include/grpcpp/completion_queue.h
include/grpcpp/create_channel.h

@ -5328,6 +5328,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/alarm.h \
include/grpcpp/alarm_impl.h \
include/grpcpp/channel.h \
include/grpcpp/channel_impl.h \
include/grpcpp/client_context.h \
include/grpcpp/completion_queue.h \
include/grpcpp/create_channel.h \
@ -5941,6 +5942,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/alarm.h \
include/grpcpp/alarm_impl.h \
include/grpcpp/channel.h \
include/grpcpp/channel_impl.h \
include/grpcpp/client_context.h \
include/grpcpp/completion_queue.h \
include/grpcpp/create_channel.h \
@ -6873,6 +6875,7 @@ PUBLIC_HEADERS_CXX += \
include/grpcpp/alarm.h \
include/grpcpp/alarm_impl.h \
include/grpcpp/channel.h \
include/grpcpp/channel_impl.h \
include/grpcpp/client_context.h \
include/grpcpp/completion_queue.h \
include/grpcpp/create_channel.h \

@ -11,10 +11,12 @@ grpc_test_only_deps()
register_execution_platforms(
"//third_party/toolchains:rbe_ubuntu1604",
"//third_party/toolchains:rbe_ubuntu1604_large",
"//third_party/toolchains:rbe_windows",
)
register_toolchains(
"//third_party/toolchains:cc-toolchain-clang-x86_64-default",
"//third_party/toolchains/bazel_0.23.2_rbe_windows:cc-toolchain-x64_windows",
)
# TODO(https://github.com/grpc/grpc/issues/18331): Move off of this dependency.

@ -1345,6 +1345,7 @@ filegroups:
- include/grpcpp/alarm.h
- include/grpcpp/alarm_impl.h
- include/grpcpp/channel.h
- include/grpcpp/channel_impl.h
- include/grpcpp/client_context.h
- include/grpcpp/completion_queue.h
- include/grpcpp/create_channel.h

@ -82,6 +82,7 @@ Pod::Spec.new do |s|
ss.source_files = 'include/grpcpp/alarm.h',
'include/grpcpp/alarm_impl.h',
'include/grpcpp/channel.h',
'include/grpcpp/channel_impl.h',
'include/grpcpp/client_context.h',
'include/grpcpp/completion_queue.h',
'include/grpcpp/create_channel.h',

@ -19,98 +19,15 @@
#ifndef GRPCPP_CHANNEL_H
#define GRPCPP_CHANNEL_H
#include <memory>
#include <mutex>
#include <grpc/grpc.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/codegen/channel_interface.h>
#include <grpcpp/impl/codegen/client_interceptor.h>
#include <grpcpp/impl/codegen/completion_queue.h>
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/grpc_library.h>
#include <grpcpp/impl/codegen/sync.h>
struct grpc_channel;
#include <grpcpp/channel_impl.h>
namespace grpc {
typedef ::grpc_impl::Channel Channel;
namespace experimental {
/// Resets the channel's connection backoff.
/// TODO(roth): Once we see whether this proves useful, either create a gRFC
/// and change this to be a method of the Channel class, or remove it.
void ChannelResetConnectionBackoff(Channel* channel);
} // namespace experimental
/// Channels represent a connection to an endpoint. Created by \a CreateChannel.
class Channel final : public ChannelInterface,
public internal::CallHook,
public std::enable_shared_from_this<Channel>,
private GrpcLibraryCodegen {
public:
~Channel();
/// Get the current channel state. If the channel is in IDLE and
/// \a try_to_connect is set to true, try to connect.
grpc_connectivity_state GetState(bool try_to_connect) override;
/// Returns the LB policy name, or the empty string if not yet available.
grpc::string GetLoadBalancingPolicyName() const;
/// Returns the service config in JSON form, or the empty string if
/// not available.
grpc::string GetServiceConfigJSON() const;
private:
template <class InputMessage, class OutputMessage>
friend class internal::BlockingUnaryCallImpl;
friend void experimental::ChannelResetConnectionBackoff(Channel* channel);
friend std::shared_ptr<Channel> CreateChannelInternal(
const grpc::string& host, grpc_channel* c_channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
friend class internal::InterceptedChannel;
Channel(const grpc::string& host, grpc_channel* c_channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
internal::Call CreateCall(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq) override;
void PerformOpsOnCall(internal::CallOpSetInterface* ops,
internal::Call* call) override;
void* RegisterMethod(const char* method) override;
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline, CompletionQueue* cq,
void* tag) override;
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline) override;
CompletionQueue* CallbackCQ() override;
internal::Call CreateCallInternal(const internal::RpcMethod& method,
ClientContext* context, CompletionQueue* cq,
size_t interceptor_pos) override;
const grpc::string host_;
grpc_channel* const c_channel_; // owned
// mu_ protects callback_cq_ (the per-channel callbackable completion queue)
grpc::internal::Mutex mu_;
// callback_cq_ references the callbackable completion queue associated
// with this channel (if any). It is set on the first call to CallbackCQ().
// It is _not owned_ by the channel; ownership belongs with its internal
// shutdown callback tag (invoked when the CQ is fully shutdown).
CompletionQueue* callback_cq_ = nullptr;
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators_;
};
} // namespace grpc
#endif // GRPCPP_CHANNEL_H

@ -28,13 +28,13 @@
#include <grpcpp/impl/codegen/client_interceptor.h>
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/grpc_library.h>
#include <grpcpp/impl/codegen/sync.h>
struct grpc_channel;
namespace grpc_impl {
class CompletionQueue;
namespace experimental {
/// Resets the channel's connection backoff.
/// TODO(roth): Once we see whether this proves useful, either create a gRFC
@ -99,7 +99,7 @@ class Channel final : public ::grpc::ChannelInterface,
grpc_channel* const c_channel_; // owned
// mu_ protects callback_cq_ (the per-channel callbackable completion queue)
std::mutex mu_;
grpc::internal::Mutex mu_;
// callback_cq_ references the callbackable completion queue associated
// with this channel (if any). It is set on the first call to CallbackCQ().

@ -35,7 +35,7 @@ namespace grpc_impl {
/// \param creds Credentials to use for the created channel. If it does not
/// hold an object or is invalid, a lame channel (one on which all operations
/// fail) is returned.
std::shared_ptr<grpc::Channel> CreateChannel(
std::shared_ptr<Channel> CreateChannel(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds);
@ -49,7 +49,7 @@ std::shared_ptr<grpc::Channel> CreateChannel(
/// hold an object or is invalid, a lame channel (one on which all operations
/// fail) is returned.
/// \param args Options for channel creation.
std::shared_ptr<grpc::Channel> CreateCustomChannel(
std::shared_ptr<Channel> CreateCustomChannel(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args);
@ -66,7 +66,7 @@ namespace experimental {
/// hold an object or is invalid, a lame channel (one on which all operations
/// fail) is returned.
/// \param args Options for channel creation.
std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
std::shared_ptr<Channel> CreateCustomChannelWithInterceptors(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args,

@ -29,9 +29,12 @@
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/status.h>
namespace grpc_impl {
class Channel;
}
namespace grpc {
class Channel;
class ClientContext;
namespace internal {

@ -57,9 +57,13 @@
struct census_context;
struct grpc_call;
namespace grpc {
namespace grpc_impl {
class Channel;
}
namespace grpc {
class ChannelInterface;
class CallCredentials;
class ClientContext;
@ -391,7 +395,7 @@ class ClientContext {
friend class ::grpc::testing::InteropClientContextInspector;
friend class ::grpc::internal::CallOpClientRecvStatus;
friend class ::grpc::internal::CallOpRecvInitialMetadata;
friend class Channel;
friend class ::grpc_impl::Channel;
template <class R>
friend class ::grpc::ClientReader;
template <class W>
@ -423,7 +427,8 @@ class ClientContext {
}
grpc_call* call() const { return call_; }
void set_call(grpc_call* call, const std::shared_ptr<Channel>& channel);
void set_call(grpc_call* call,
const std::shared_ptr<::grpc_impl::Channel>& channel);
experimental::ClientRpcInfo* set_client_rpc_info(
const char* method, internal::RpcMethod::RpcType type,
@ -456,7 +461,7 @@ class ClientContext {
bool wait_for_ready_explicitly_set_;
bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_;
std::shared_ptr<::grpc_impl::Channel> channel_;
grpc::internal::Mutex mu_;
grpc_call* call_;
bool call_canceled_;

@ -26,10 +26,14 @@
#include <grpcpp/impl/codegen/rpc_method.h>
#include <grpcpp/impl/codegen/string_ref.h>
namespace grpc_impl {
class Channel;
}
namespace grpc {
class ClientContext;
class Channel;
namespace internal {
class InterceptorBatchMethodsImpl;

@ -43,11 +43,11 @@ struct grpc_completion_queue;
namespace grpc_impl {
class Channel;
class Server;
class ServerBuilder;
} // namespace grpc_impl
namespace grpc {
class Channel;
template <class R>
class ClientReader;
@ -284,7 +284,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
friend class ::grpc::internal::BlockingUnaryCallImpl;
// Friends that need access to constructor for callback CQ
friend class ::grpc::Channel;
friend class ::grpc_impl::Channel;
// For access to Register/CompleteAvalanching
template <class Op1, class Op2, class Op3, class Op4, class Op5, class Op6>

@ -253,7 +253,9 @@ class ServerBidiReactor : public internal::ServerReactor {
void Finish(Status s) { stream_->Finish(std::move(s)); }
/// Notify the application that a streaming RPC has started and that it is now
/// ok to call any operation initation method.
/// ok to call any operation initiation method. An RPC is considered started
/// after the server has received all initial metadata from the client, which
/// is a result of the client calling StartCall().
///
/// \param[in] context The context object now associated with this RPC
virtual void OnStarted(ServerContext* context) {}

@ -36,7 +36,6 @@ class ServerCredentials;
namespace grpc {
class AsyncGenericService;
class Channel;
class GenericServerContext;
class ServerContext;
class Service;

@ -32,20 +32,26 @@
struct grpc_call;
namespace grpc_impl {
class Channel;
} // namespace grpc_impl
namespace grpc {
class CallCredentials;
class ChannelArguments;
class ChannelCredentials;
class SecureCallCredentials;
class SecureChannelCredentials;
} // namespace grpc
namespace grpc_impl {
std::shared_ptr<grpc::Channel> CreateCustomChannel(
std::shared_ptr<Channel> CreateCustomChannel(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args);
namespace experimental {
std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
std::shared_ptr<Channel> CreateCustomChannelWithInterceptors(
const grpc::string& target,
const std::shared_ptr<grpc::ChannelCredentials>& creds,
const grpc::ChannelArguments& args,
@ -55,7 +61,6 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
} // namespace experimental
} // namespace grpc_impl
namespace grpc {
class Channel;
class SecureChannelCredentials;
class SecureCallCredentials;
@ -78,12 +83,12 @@ class ChannelCredentials : private GrpcLibraryCodegen {
virtual SecureChannelCredentials* AsSecureCredentials() = 0;
private:
friend std::shared_ptr<Channel> grpc_impl::CreateCustomChannel(
friend std::shared_ptr<::grpc_impl::Channel> grpc_impl::CreateCustomChannel(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds,
const grpc::ChannelArguments& args);
friend std::shared_ptr<Channel>
friend std::shared_ptr<::grpc_impl::Channel>
grpc_impl::experimental::CreateCustomChannelWithInterceptors(
const grpc::string& target,
const std::shared_ptr<ChannelCredentials>& creds,
@ -92,12 +97,12 @@ class ChannelCredentials : private GrpcLibraryCodegen {
grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
virtual std::shared_ptr<Channel> CreateChannel(
virtual std::shared_ptr<::grpc_impl::Channel> CreateChannel(
const grpc::string& target, const ChannelArguments& args) = 0;
// 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<Channel> CreateChannelWithInterceptors(
virtual std::shared_ptr<::grpc_impl::Channel> CreateChannelWithInterceptors(
const grpc::string& target, const ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>

@ -27,6 +27,7 @@
#include <grpc/compression.h>
#include <grpc/support/atm.h>
#include <grpcpp/channel.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/codegen/client_interceptor.h>

@ -148,7 +148,6 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file,
printer->Print(vars, "namespace grpc_impl {\n");
printer->Print(vars, "class Channel;\n");
printer->Print(vars, "class CompletionQueue;\n");
printer->Print(vars, "class Channel;\n");
printer->Print(vars, "class ServerCompletionQueue;\n");
printer->Print(vars, "} // namespace grpc_impl\n\n");
printer->Print(vars, "namespace grpc {\n");

@ -42,14 +42,18 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/surface/completion_queue.h"
namespace grpc {
static internal::GrpcLibraryInitializer g_gli_initializer;
Channel::Channel(
const grpc::string& host, grpc_channel* channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators)
void grpc::experimental::ChannelResetConnectionBackoff(
::grpc::Channel* channel) {
grpc_impl::experimental::ChannelResetConnectionBackoff(channel);
}
namespace grpc_impl {
static ::grpc::internal::GrpcLibraryInitializer g_gli_initializer;
Channel::Channel(const grpc::string& host, grpc_channel* channel,
std::vector<std::unique_ptr<
::grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators)
: host_(host), c_channel_(channel) {
interceptor_creators_ = std::move(interceptor_creators);
g_gli_initializer.summon();
@ -65,7 +69,8 @@ Channel::~Channel() {
namespace {
inline grpc_slice SliceFromArray(const char* arr, size_t len) {
return g_core_codegen_interface->grpc_slice_from_copied_buffer(arr, len);
return ::grpc::g_core_codegen_interface->grpc_slice_from_copied_buffer(arr,
len);
}
grpc::string GetChannelInfoField(grpc_channel* channel,
@ -103,10 +108,9 @@ void ChannelResetConnectionBackoff(Channel* channel) {
} // namespace experimental
internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq,
size_t interceptor_pos) {
::grpc::internal::Call Channel::CreateCallInternal(
const ::grpc::internal::RpcMethod& method, ::grpc::ClientContext* context,
::grpc::CompletionQueue* cq, size_t interceptor_pos) {
const bool kRegistered = method.channel_tag() && context->authority().empty();
grpc_call* c_call = nullptr;
if (kRegistered) {
@ -115,7 +119,7 @@ internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method,
context->propagation_options_.c_bitmask(), cq->cq(),
method.channel_tag(), context->raw_deadline(), nullptr);
} else {
const string* host_str = nullptr;
const ::grpc::string* host_str = nullptr;
if (!context->authority_.empty()) {
host_str = &context->authority_;
} else if (!host_.empty()) {
@ -125,7 +129,7 @@ internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method,
SliceFromArray(method.name(), strlen(method.name()));
grpc_slice host_slice;
if (host_str != nullptr) {
host_slice = SliceFromCopiedString(*host_str);
host_slice = ::grpc::SliceFromCopiedString(*host_str);
}
c_call = grpc_channel_create_call(
c_channel_, context->propagate_from_call_,
@ -147,17 +151,17 @@ internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method,
interceptor_creators_, interceptor_pos);
context->set_call(c_call, shared_from_this());
return internal::Call(c_call, this, cq, info);
return ::grpc::internal::Call(c_call, this, cq, info);
}
internal::Call Channel::CreateCall(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq) {
::grpc::internal::Call Channel::CreateCall(
const ::grpc::internal::RpcMethod& method, ::grpc::ClientContext* context,
::grpc::CompletionQueue* cq) {
return CreateCallInternal(method, context, cq, 0);
}
void Channel::PerformOpsOnCall(internal::CallOpSetInterface* ops,
internal::Call* call) {
void Channel::PerformOpsOnCall(::grpc::internal::CallOpSetInterface* ops,
::grpc::internal::Call* call) {
ops->FillOps(
call); // Make a copy of call. It's fine since Call just has pointers
}
@ -173,7 +177,7 @@ grpc_connectivity_state Channel::GetState(bool try_to_connect) {
namespace {
class TagSaver final : public internal::CompletionQueueTag {
class TagSaver final : public ::grpc::internal::CompletionQueueTag {
public:
explicit TagSaver(void* tag) : tag_(tag) {}
~TagSaver() override {}
@ -191,7 +195,7 @@ class TagSaver final : public internal::CompletionQueueTag {
void Channel::NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline,
CompletionQueue* cq, void* tag) {
::grpc::CompletionQueue* cq, void* tag) {
TagSaver* tag_saver = new TagSaver(tag);
grpc_channel_watch_connectivity_state(c_channel_, last_observed, deadline,
cq->cq(), tag_saver);
@ -199,7 +203,7 @@ void Channel::NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
bool Channel::WaitForStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline) {
CompletionQueue cq;
::grpc::CompletionQueue cq;
bool ok = false;
void* tag = nullptr;
NotifyOnStateChangeImpl(last_observed, deadline, &cq, nullptr);
@ -214,7 +218,7 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor {
ShutdownCallback() { functor_run = &ShutdownCallback::Run; }
// TakeCQ takes ownership of the cq into the shutdown callback
// so that the shutdown callback will be responsible for destroying it
void TakeCQ(CompletionQueue* cq) { cq_ = cq; }
void TakeCQ(::grpc::CompletionQueue* cq) { cq_ = cq; }
// The Run function will get invoked by the completion queue library
// when the shutdown is actually complete
@ -225,17 +229,17 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor {
}
private:
CompletionQueue* cq_ = nullptr;
::grpc::CompletionQueue* cq_ = nullptr;
};
} // namespace
CompletionQueue* Channel::CallbackCQ() {
::grpc::CompletionQueue* Channel::CallbackCQ() {
// TODO(vjpai): Consider using a single global CQ for the default CQ
// if there is no explicit per-channel CQ registered
grpc::internal::MutexLock l(&mu_);
if (callback_cq_ == nullptr) {
auto* shutdown_callback = new ShutdownCallback;
callback_cq_ = new CompletionQueue(grpc_completion_queue_attributes{
callback_cq_ = new ::grpc::CompletionQueue(grpc_completion_queue_attributes{
GRPC_CQ_CURRENT_VERSION, GRPC_CQ_CALLBACK, GRPC_CQ_DEFAULT_POLLING,
shutdown_callback});
@ -245,4 +249,4 @@ CompletionQueue* Channel::CallbackCQ() {
return callback_cq_;
}
} // namespace grpc
} // namespace grpc_impl

@ -31,6 +31,11 @@
#include <grpcpp/server_context.h>
#include <grpcpp/support/time.h>
namespace grpc_impl {
class Channel;
}
namespace grpc {
class DefaultGlobalClientCallbacks final
@ -83,8 +88,8 @@ void ClientContext::AddMetadata(const grpc::string& meta_key,
send_initial_metadata_.insert(std::make_pair(meta_key, meta_value));
}
void ClientContext::set_call(grpc_call* call,
const std::shared_ptr<Channel>& channel) {
void ClientContext::set_call(
grpc_call* call, const std::shared_ptr<::grpc_impl::Channel>& channel) {
grpc::internal::MutexLock lock(&mu_);
GPR_ASSERT(call_ == nullptr);
call_ = call;

@ -43,7 +43,7 @@ std::shared_ptr<grpc::Channel> CreateCustomChannel(
grpc::GrpcLibraryCodegen
init_lib; // We need to call init in case of a bad creds.
return creds ? creds->CreateChannel(target, args)
: grpc::CreateChannelInternal(
: ::grpc_impl::CreateChannelInternal(
"",
grpc_lame_client_channel_create(
nullptr, GRPC_STATUS_INVALID_ARGUMENT,
@ -74,7 +74,7 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
interceptor_creators) {
return creds ? creds->CreateChannelWithInterceptors(
target, args, std::move(interceptor_creators))
: grpc::CreateChannelInternal(
: ::grpc_impl::CreateChannelInternal(
"",
grpc_lame_client_channel_create(
nullptr, GRPC_STATUS_INVALID_ARGUMENT,

@ -22,14 +22,15 @@
struct grpc_channel;
namespace grpc {
namespace grpc_impl {
std::shared_ptr<Channel> CreateChannelInternal(
const grpc::string& host, grpc_channel* c_channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
std::vector<std::unique_ptr<
::grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
return std::shared_ptr<Channel>(
new Channel(host, c_channel, std::move(interceptor_creators)));
}
} // namespace grpc
} // namespace grpc_impl

@ -26,15 +26,16 @@
struct grpc_channel;
namespace grpc {
namespace grpc_impl {
class Channel;
std::shared_ptr<Channel> CreateChannelInternal(
const grpc::string& host, grpc_channel* c_channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
std::vector<std::unique_ptr<
::grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
} // namespace grpc
} // namespace grpc_impl
#endif // GRPC_INTERNAL_CPP_CLIENT_CREATE_CHANNEL_INTERNAL_H

@ -32,7 +32,7 @@ std::shared_ptr<grpc::Channel> CreateInsecureChannelFromFd(
const grpc::string& target, int fd) {
grpc::internal::GrpcLibrary init_lib;
init_lib.init();
return grpc::CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr),
std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>>());
@ -44,7 +44,7 @@ std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelFromFd(
init_lib.init();
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return grpc::CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"",
grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args),
std::vector<std::unique_ptr<
@ -63,7 +63,7 @@ CreateCustomInsecureChannelWithInterceptorsFromFd(
init_lib.init();
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return grpc::CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"",
grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args),
std::move(interceptor_creators));

@ -47,7 +47,7 @@ class CronetChannelCredentialsImpl final : public ChannelCredentials {
interceptor_creators) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"",
grpc_cronet_secure_channel_create(engine_, target.c_str(),
&channel_args, nullptr),

@ -45,7 +45,7 @@ class InsecureChannelCredentialsImpl final : public ChannelCredentials {
interceptor_creators) override {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"",
grpc_insecure_channel_create(target.c_str(), &channel_args, nullptr),
std::move(interceptor_creators));

@ -50,7 +50,7 @@ SecureChannelCredentials::CreateChannelWithInterceptors(
interceptor_creators) {
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
args.GetSslTargetNameOverride(),
grpc_secure_channel_create(c_creds_, target.c_str(), &channel_args,
nullptr),

@ -27,6 +27,11 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/cpp/server/thread_pool_interface.h"
namespace grpc_impl {
class Channel;
}
namespace grpc {
class SecureChannelCredentials final : public ChannelCredentials {
@ -37,13 +42,13 @@ class SecureChannelCredentials final : public ChannelCredentials {
}
grpc_channel_credentials* GetRawCreds() { return c_creds_; }
std::shared_ptr<grpc::Channel> CreateChannel(
std::shared_ptr<::grpc_impl::Channel> CreateChannel(
const string& target, const grpc::ChannelArguments& args) override;
SecureChannelCredentials* AsSecureCredentials() override { return this; }
private:
std::shared_ptr<grpc::Channel> CreateChannelWithInterceptors(
std::shared_ptr<::grpc_impl::Channel> CreateChannelWithInterceptors(
const string& target, const grpc::ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>

@ -1028,7 +1028,7 @@ grpc_server* Server::c_server() { return server_; }
std::shared_ptr<grpc::Channel> Server::InProcessChannel(
const grpc::ChannelArguments& args) {
grpc_channel_args channel_args = args.c_channel_args();
return grpc::CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"inproc", grpc_inproc_channel_create(server_, &channel_args, nullptr),
std::vector<std::unique_ptr<
grpc::experimental::ClientInterceptorFactoryInterface>>());
@ -1041,7 +1041,7 @@ Server::experimental_type::InProcessChannelWithInterceptors(
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
grpc_channel_args channel_args = args.c_channel_args();
return grpc::CreateChannelInternal(
return ::grpc_impl::CreateChannelInternal(
"inproc",
grpc_inproc_channel_create(server_->server_, &channel_args, nullptr),
std::move(interceptor_creators));

@ -385,6 +385,7 @@ def grpc_end2end_tests():
":proxy",
":local_util",
],
tags = ["no_windows"],
)
for f, fopt in END2END_FIXTURES.items():
@ -398,6 +399,7 @@ def grpc_end2end_tests():
"//:grpc",
"//:gpr",
],
tags = ["no_windows"],
)
for t, topt in END2END_TESTS.items():
#print(_compatible(fopt, topt), f, t, fopt, topt)
@ -413,6 +415,7 @@ def grpc_end2end_tests():
t,
poller,
],
tags = ["no_windows"],
)
def grpc_end2end_nosec_tests():
@ -435,6 +438,7 @@ def grpc_end2end_nosec_tests():
":proxy",
":local_util",
],
tags = ["no_windows"],
)
for f, fopt in END2END_NOSEC_FIXTURES.items():
@ -450,6 +454,7 @@ def grpc_end2end_nosec_tests():
"//:grpc_unsecure",
"//:gpr",
],
tags = ["no_windows"],
)
for t, topt in END2END_TESTS.items():
#print(_compatible(fopt, topt), f, t, fopt, topt)

@ -32,6 +32,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_library(
@ -43,6 +44,7 @@ grpc_cc_library(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -60,6 +62,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(
@ -77,6 +80,7 @@ grpc_cc_test(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -33,4 +33,5 @@ grpc_cc_binary(
"//:grpc",
"//test/core/util:grpc_test_util",
],
tags = ["no_windows"],
)

@ -133,6 +133,7 @@ grpc_cc_library(
":grpc_test_util",
"//:grpc",
],
tags = ["no_windows"],
)
grpc_cc_test(

@ -41,12 +41,12 @@
#include <grpcpp/impl/codegen/sync_stream.h>
namespace grpc_impl {
class Channel;
class CompletionQueue;
class ServerCompletionQueue;
} // namespace grpc_impl
namespace grpc {
class Channel;
class ServerContext;
} // namespace grpc

@ -31,7 +31,7 @@ using namespace gflags;
DEFINE_string(
generated_file_path, "",
"path to the directory containing generated files compiler_test.grpc.pb.h"
"path to the directory containing generated files compiler_test.grpc.pb.h "
"and compiler_test_mock.grpc.pb.h");
const char kGoldenFilePath[] = "test/cpp/codegen/compiler_test_golden";

@ -131,7 +131,7 @@ static void* tag(int i) {
static void BM_LameChannelCallCreateCpp(benchmark::State& state) {
TrackCounters track_counters;
auto stub =
grpc::testing::EchoTestService::NewStub(grpc::CreateChannelInternal(
grpc::testing::EchoTestService::NewStub(grpc_impl::CreateChannelInternal(
"",
grpc_lame_client_channel_create("localhost:1234",
GRPC_STATUS_UNAUTHENTICATED, "blah"),

@ -218,7 +218,7 @@ class EndpointPairFixture : public BaseFixture {
"target", &c_args, GRPC_CLIENT_DIRECT_CHANNEL, client_transport_);
grpc_chttp2_transport_start_reading(client_transport_, nullptr, nullptr);
channel_ = CreateChannelInternal(
channel_ = ::grpc_impl::CreateChannelInternal(
"", channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>());

@ -118,7 +118,7 @@ class EndpointPairFixture {
"target", &c_args, GRPC_CLIENT_DIRECT_CHANNEL, transport);
grpc_chttp2_transport_start_reading(transport, nullptr, nullptr);
channel_ = CreateChannelInternal(
channel_ = ::grpc_impl::CreateChannelInternal(
"", channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>());

@ -24,8 +24,12 @@
#include <grpcpp/impl/codegen/client_interceptor.h>
#include <grpcpp/security/credentials.h>
namespace grpc {
namespace grpc_impl {
class Channel;
}
namespace grpc {
namespace testing {
@ -33,35 +37,35 @@ typedef enum { INSECURE = 0, TLS, ALTS } transport_security;
} // namespace testing
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, testing::transport_security security_type);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds,
const ChannelArguments& args);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& cred_type,
const grpc::string& override_hostname, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds,
const ChannelArguments& args);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& credential_type,
const std::shared_ptr<CallCredentials>& creds);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds,
@ -69,7 +73,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& override_hostname,
testing::transport_security security_type, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds, const ChannelArguments& args,
@ -77,7 +81,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& cred_type,
const grpc::string& override_hostname, bool use_prod_roots,
const std::shared_ptr<CallCredentials>& creds, const ChannelArguments& args,
@ -85,7 +89,7 @@ std::shared_ptr<Channel> CreateTestChannel(
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
std::shared_ptr<Channel> CreateTestChannel(
std::shared_ptr<::grpc_impl::Channel> CreateTestChannel(
const grpc::string& server, const grpc::string& credential_type,
const std::shared_ptr<CallCredentials>& creds,
std::vector<

@ -28,6 +28,36 @@ alias(
actual = ":rbe_ubuntu1604_r346485_large",
)
alias(
name = "rbe_windows",
actual = ":rbe_windows_1803",
)
# RBE Windows
platform(
name = "rbe_windows_1803",
constraint_values = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
"@bazel_tools//tools/cpp:msvc",
],
remote_execution_properties = """
properties: {
name: "container-image"
value:"docker://gcr.io/grpc-testing/rbe_windows_toolchain@sha256:689b177e4a157c431c7077d19d043de27922c37de835031f29c9093b8d5c6370"
}
properties: {
name: "gceMachineType" # Small machines for majority of tests.
value: "n1-highmem-2"
}
properties:{
name: "OSFamily"
value: "Windows"
}
""",
)
# RBE Ubuntu16_04 r346485
platform(
name = "rbe_ubuntu1604_r346485",

@ -0,0 +1,188 @@
# Copyright 2018 The Bazel Authors. All rights reserved.
#
# 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 becomes the BUILD file for @local_config_cc// under Windows.
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
cc_library(
name = "malloc",
)
filegroup(
name = "empty",
srcs = [],
)
# Hardcoded toolchain, legacy behaviour.
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
"x64_windows|msvc-cl": ":cc-compiler-x64_windows",
"x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
"x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
"x64_windows_msys": ":cc-compiler-x64_windows_msys",
"x64_windows": ":cc-compiler-x64_windows",
"armeabi-v7a": ":cc-compiler-armeabi-v7a",
},
)
cc_toolchain(
name = "cc-compiler-x64_windows_msys",
all_files = ":empty",
ar_files = ":empty",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 1,
toolchain_config = ":msys_x64",
toolchain_identifier = "msys_x64",
)
cc_toolchain_config(
name = "msys_x64",
compiler = "msys-gcc",
cpu = "x64_windows",
)
toolchain(
name = "cc-toolchain-x64_windows_msys",
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
"@bazel_tools//tools/cpp:msys",
],
target_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
],
toolchain = ":cc-compiler-x64_windows_msys",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain(
name = "cc-compiler-x64_windows_mingw",
all_files = ":empty",
ar_files = ":empty",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 0,
toolchain_config = ":msys_x64_mingw",
toolchain_identifier = "msys_x64_mingw",
)
cc_toolchain_config(
name = "msys_x64_mingw",
compiler = "mingw-gcc",
cpu = "x64_windows",
)
toolchain(
name = "cc-toolchain-x64_windows_mingw",
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
"@bazel_tools//tools/cpp:mingw",
],
target_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
],
toolchain = ":cc-compiler-x64_windows_mingw",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain(
name = "cc-compiler-x64_windows",
all_files = ":empty",
ar_files = ":empty",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 1,
toolchain_config = ":msvc_x64",
toolchain_identifier = "msvc_x64",
)
cc_toolchain_config(
name = "msvc_x64",
compiler = "msvc-cl",
cpu = "x64_windows",
)
toolchain(
name = "cc-toolchain-x64_windows",
exec_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
],
target_compatible_with = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
],
toolchain = ":cc-compiler-x64_windows",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
cc_toolchain(
name = "cc-compiler-armeabi-v7a",
all_files = ":empty",
ar_files = ":empty",
as_files = ":empty",
compiler_files = ":empty",
dwp_files = ":empty",
linker_files = ":empty",
objcopy_files = ":empty",
strip_files = ":empty",
supports_param_files = 1,
toolchain_config = ":stub_armeabi-v7a",
toolchain_identifier = "stub_armeabi-v7a",
)
cc_toolchain_config(
name = "stub_armeabi-v7a",
compiler = "compiler",
cpu = "armeabi-v7a",
)
toolchain(
name = "cc-toolchain-armeabi-v7a",
exec_compatible_with = [
],
target_compatible_with = [
"@bazel_tools//platforms:arm",
"@bazel_tools//platforms:android",
],
toolchain = ":cc-compiler-armeabi-v7a",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
filegroup(
name = "link_dynamic_library",
srcs = ["link_dynamic_library.sh"],
)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,23 @@
# pylint: disable=g-bad-file-header
# Copyright 2017 The Bazel Authors. All rights reserved.
#
# 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.
"""Skylark rule that stubs a toolchain."""
def _dummy_toolchain_impl(ctx):
ctx = ctx # unused argument
toolchain = platform_common.ToolchainInfo()
return [toolchain]
dummy_toolchain = rule(_dummy_toolchain_impl, attrs = {})

@ -927,6 +927,7 @@ include/grpc/support/workaround_list.h \
include/grpcpp/alarm.h \
include/grpcpp/alarm_impl.h \
include/grpcpp/channel.h \
include/grpcpp/channel_impl.h \
include/grpcpp/client_context.h \
include/grpcpp/completion_queue.h \
include/grpcpp/create_channel.h \

@ -928,6 +928,7 @@ include/grpc/support/workaround_list.h \
include/grpcpp/alarm.h \
include/grpcpp/alarm_impl.h \
include/grpcpp/channel.h \
include/grpcpp/channel_impl.h \
include/grpcpp/client_context.h \
include/grpcpp/completion_queue.h \
include/grpcpp/create_channel.h \

@ -22,7 +22,7 @@ cd "$(dirname "$0")"
CLOUD_PROJECT=grpc-testing
ZONE=us-central1-b # this zone allows 32core machines
LATEST_PERF_WORKER_IMAGE=grpc-performance-kokoro-v4 # update if newer image exists
LATEST_PERF_WORKER_IMAGE=grpc-performance-kokoro-v5 # update if newer image exists
INSTANCE_NAME="${1:-grpc-kokoro-performance-server}"
MACHINE_TYPE="${2:-n1-standard-32}"

@ -219,6 +219,8 @@ touch /tmpfs/READY
# See https://github.com/grpc/grpc/issues/17794
sudo sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/10periodic
sudo sed -i 's/APT::Periodic::AutocleanInterval "1"/APT::Periodic::AutocleanInterval "0"/' /etc/apt/apt.conf.d/10periodic
sudo sed -i 's/APT::Periodic::Update-Package-Lists "1"/APT::Periodic::Update-Package-Lists "0"/' /etc/apt/apt.conf.d/20auto-upgrades
sudo sed -i 's/APT::Periodic::Unattended-Upgrade "1"/APT::Periodic::Unattended-Upgrade "0"/' /etc/apt/apt.conf.d/20auto-upgrades
# Restart for VM to pick up kernel update
echo 'Successfully initialized the linux worker, going for reboot in 10 seconds'

@ -31,8 +31,8 @@ bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/...
Run on Windows MSVC:
```
# local manual run only for C++ targets (RBE to be supported)
bazel --bazelrc=tools/remote_build/windows.bazelrc test //test/cpp/...
# RBE manual run only for c-core (must be run on a Windows host machine)
bazel --bazelrc=tools/remote_build/windows.bazelrc build :all [--credentials_json=(path to service account credentials)]
```
Available command line options can be found in

@ -1,3 +1,49 @@
# TODO(yfen): Merge with rbe_common.bazelrc and enable Windows RBE
startup --host_jvm_args=-Dbazel.DigestFunction=SHA256
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.23.2_rbe_windows:toolchain
build --crosstool_top=//third_party/toolchains/bazel_0.23.2_rbe_windows:toolchain
build --extra_toolchains=//third_party/toolchains/bazel_0.23.2_rbe_windows:cc-toolchain-x64_windows
# Use custom execution platforms defined in third_party/toolchains
build --extra_execution_platforms=//third_party/toolchains:rbe_windows
build --host_platform=//third_party/toolchains:rbe_windows
build --platforms=//third_party/toolchains:rbe_windows
build --shell_executable=C:\\tools\\msys64\\usr\\bin\\bash.exe
build --python_path=C:\\Python27\\python.exe
build --spawn_strategy=remote
build --strategy=Javac=remote
build --strategy=Closure=remote
build --genrule_strategy=remote
build --remote_timeout=3600
build --remote_instance_name=projects/grpc-testing/instances/grpc-windows-rbe-test
build --verbose_failures=true
build --experimental_strict_action_env=true
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# don't use port server
build --define GRPC_PORT_ISOLATED_RUNTIME=1
build --test_tag_filters=-no_windows
build --build_tag_filters=-no_windows
# without verbose gRPC logs the test outputs are not very useful
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_timeout=60s
build --bes_results_url="https://source.cloud.google.com/results/invocations/"
build --project_id=grpc-testing
build --jobs=30
# print output for tests that fail (default is "summary")
build --test_output=errors

@ -10096,6 +10096,7 @@
"include/grpcpp/alarm.h",
"include/grpcpp/alarm_impl.h",
"include/grpcpp/channel.h",
"include/grpcpp/channel_impl.h",
"include/grpcpp/client_context.h",
"include/grpcpp/completion_queue.h",
"include/grpcpp/create_channel.h",
@ -10217,6 +10218,7 @@
"include/grpcpp/alarm.h",
"include/grpcpp/alarm_impl.h",
"include/grpcpp/channel.h",
"include/grpcpp/channel_impl.h",
"include/grpcpp/client_context.h",
"include/grpcpp/completion_queue.h",
"include/grpcpp/create_channel.h",

@ -0,0 +1,29 @@
#!/bin/sh
# 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.
set -e
cd "$(dirname "$0")/../../.."
#
# Prevent the use of synchronization and threading constructs from std:: since
# the code should be using grpc_core::Mutex, grpc::internal::Mutex,
# grpc_core::Thread, etc.
#
egrep -Irn \
'std::(mutex|condition_variable|lock_guard|unique_lock|thread)' \
include/grpc include/grpcpp src/core src/cpp | diff - /dev/null

@ -10,6 +10,7 @@
- script: tools/run_tests/sanity/check_tracer_sanity.py
- script: tools/run_tests/sanity/core_banned_functions.py
- script: tools/run_tests/sanity/core_untyped_structs.sh
- script: tools/run_tests/sanity/cpp_banned_constructs.sh
- script: tools/run_tests/sanity/check_deprecated_grpc++.py
- script: tools/run_tests/sanity/check_port_platform.py
- script: tools/buildgen/generate_projects.sh -j 3

Loading…
Cancel
Save