Merge remote-tracking branch 'upstream/master' into matcher_new

pull/22951/head
Donna Dionne 5 years ago
commit 459b58ae3d
  1. 9
      src/cpp/ext/proto_server_reflection_plugin.cc
  2. 11
      src/cpp/server/channelz/channelz_service_plugin.cc
  3. 13
      test/cpp/end2end/server_builder_plugin_test.cc
  4. 4
      tools/distrib/pylint_code.sh

@ -64,10 +64,11 @@ static std::unique_ptr< ::grpc::ServerBuilderPlugin> CreateProtoReflection() {
}
void InitProtoReflectionServerBuilderPlugin() {
static bool already_here = false;
if (already_here) return;
already_here = true;
::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection);
static struct Initialize {
Initialize() {
::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection);
}
} initializer;
}
// Force InitProtoReflectionServerBuilderPlugin() to be called at static

@ -75,11 +75,12 @@ namespace channelz {
namespace experimental {
void InitChannelzService() {
static bool already_here = false;
if (already_here) return;
already_here = true;
::grpc::ServerBuilder::InternalAddPluginFactory(
&grpc::channelz::experimental::CreateChannelzServicePlugin);
static struct Initializer {
Initializer() {
::grpc::ServerBuilder::InternalAddPluginFactory(
&grpc::channelz::experimental::CreateChannelzServicePlugin);
}
} initialize;
}
} // namespace experimental

@ -121,17 +121,12 @@ std::unique_ptr<ServerBuilderPlugin> CreateTestServerBuilderPlugin() {
return std::unique_ptr<ServerBuilderPlugin>(new TestServerBuilderPlugin());
}
void AddTestServerBuilderPlugin() {
static bool already_here = false;
if (already_here) return;
already_here = true;
::grpc::ServerBuilder::InternalAddPluginFactory(
&CreateTestServerBuilderPlugin);
}
// Force AddServerBuilderPlugin() to be called at static initialization time.
struct StaticTestPluginInitializer {
StaticTestPluginInitializer() { AddTestServerBuilderPlugin(); }
StaticTestPluginInitializer() {
::grpc::ServerBuilder::InternalAddPluginFactory(
&CreateTestServerBuilderPlugin);
}
} static_plugin_initializer_test_;
// When the param boolean is true, the ServerBuilder plugin will be added at the

@ -40,7 +40,9 @@ python3 -m virtualenv $VIRTUALENV -p $(which python3)
PYTHON=$VIRTUALENV/bin/python
$PYTHON -m pip install --upgrade pip==19.3.1
$PYTHON -m pip install --upgrade astroid==2.3.3 pylint==2.2.2
# TODO(https://github.com/grpc/grpc/issues/23394): Update Pylint.
$PYTHON -m pip install --upgrade astroid==2.3.3 pylint==2.2.2 "isort>=4.3.0,<5.0.0"
EXIT=0
for dir in "${DIRS[@]}"; do

Loading…
Cancel
Save