Merge branch 'master' into removescheduler

pull/21119/head
Yash Tibrewal 5 years ago
commit 9708c1f390
  1. 56
      CMakeLists.txt
  2. 2
      gRPC-C++.podspec
  3. 16
      templates/CMakeLists.txt.template
  4. 2
      templates/gRPC-C++.podspec.template
  5. 15
      test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc
  6. 2
      tools/internal_ci/macos/grpc_basictests_c_cpp.cfg
  7. 2
      tools/internal_ci/macos/pull_request/grpc_basictests_c_cpp.cfg

@ -220,15 +220,41 @@ function(protobuf_generate_grpc_cpp)
endforeach()
endfunction()
# These options allow users to enable or disable the building of the various
# protoc plugins. For example, running CMake with
# -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF will disable building the C# plugin.
set(_gRPC_PLUGIN_LIST)
option(gRPC_BUILD_GRPC_CPP_PLUGIN "Build grpc_cpp_plugin" ON)
if (gRPC_BUILD_GRPC_CPP_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_cpp_plugin)
endif ()
option(gRPC_BUILD_GRPC_CSHARP_PLUGIN "Build grpc_csharp_plugin" ON)
if (gRPC_BUILD_GRPC_CSHARP_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_csharp_plugin)
endif ()
option(gRPC_BUILD_GRPC_NODE_PLUGIN "Build grpc_node_plugin" ON)
if (gRPC_BUILD_GRPC_NODE_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_node_plugin)
endif ()
option(gRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN "Build grpc_objective_c_plugin" ON)
if (gRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_objective_c_plugin)
endif ()
option(gRPC_BUILD_GRPC_PHP_PLUGIN "Build grpc_php_plugin" ON)
if (gRPC_BUILD_GRPC_PHP_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_php_plugin)
endif ()
option(gRPC_BUILD_GRPC_PYTHON_PLUGIN "Build grpc_python_plugin" ON)
if (gRPC_BUILD_GRPC_PYTHON_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_python_plugin)
endif ()
option(gRPC_BUILD_GRPC_RUBY_PLUGIN "Build grpc_ruby_plugin" ON)
if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin)
endif ()
add_custom_target(plugins
DEPENDS
grpc_cpp_plugin
grpc_csharp_plugin
grpc_node_plugin
grpc_objective_c_plugin
grpc_php_plugin
grpc_python_plugin
grpc_ruby_plugin
DEPENDS ${_gRPC_PLUGIN_LIST}
)
add_custom_target(tools_c
@ -12906,7 +12932,7 @@ target_link_libraries(grpc_cli
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CPP_PLUGIN)
add_executable(grpc_cpp_plugin
src/compiler/cpp_plugin.cc
@ -12943,7 +12969,7 @@ if(gRPC_INSTALL)
endif()
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_CSHARP_PLUGIN)
add_executable(grpc_csharp_plugin
src/compiler/csharp_plugin.cc
@ -13053,7 +13079,7 @@ target_link_libraries(grpc_linux_system_roots_test
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_NODE_PLUGIN)
add_executable(grpc_node_plugin
src/compiler/node_plugin.cc
@ -13090,7 +13116,7 @@ if(gRPC_INSTALL)
endif()
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN)
add_executable(grpc_objective_c_plugin
src/compiler/objective_c_plugin.cc
@ -13127,7 +13153,7 @@ if(gRPC_INSTALL)
endif()
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_PHP_PLUGIN)
add_executable(grpc_php_plugin
src/compiler/php_plugin.cc
@ -13164,7 +13190,7 @@ if(gRPC_INSTALL)
endif()
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_PYTHON_PLUGIN)
add_executable(grpc_python_plugin
src/compiler/python_plugin.cc
@ -13201,7 +13227,7 @@ if(gRPC_INSTALL)
endif()
endif()
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_GRPC_RUBY_PLUGIN)
add_executable(grpc_ruby_plugin
src/compiler/ruby_plugin.cc

@ -1247,7 +1247,7 @@ Pod::Spec.new do |s|
end
s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = 'include/grpcpp'
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Cronet-Interface", version
ss.dependency "#{s.name}/Implementation", version

@ -315,13 +315,21 @@
endforeach()
endfunction()
add_custom_target(plugins
DEPENDS
# These options allow users to enable or disable the building of the various
# protoc plugins. For example, running CMake with
# -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF will disable building the C# plugin.
set(_gRPC_PLUGIN_LIST)
% for tgt in targets:
% if tgt.build == 'protoc':
${tgt.name}
option(gRPC_BUILD_${tgt.name.upper()} "Build ${tgt.name}" ON)
if (gRPC_BUILD_${tgt.name.upper()})
list(APPEND _gRPC_PLUGIN_LIST ${tgt.name})
endif ()
% endif
% endfor
add_custom_target(plugins
DEPENDS <%text>${_gRPC_PLUGIN_LIST}</%text>
)
add_custom_target(tools_c
@ -419,7 +427,7 @@
</%block>
endif()
% elif tgt.build in ["protoc"]:
if(gRPC_BUILD_CODEGEN)
if(gRPC_BUILD_CODEGEN AND gRPC_BUILD_${tgt.name.upper()})
<%block filter='platforms_condition_block(tgt.platforms)'>
${cc_binary(tgt)}
${cc_install(tgt)}

@ -208,7 +208,7 @@
end
s.subspec 'Cronet-Implementation' do |ss|
ss.header_mappings_dir = 'include/grpcpp'
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Cronet-Interface", version
ss.dependency "#{s.name}/Implementation", version

@ -236,7 +236,22 @@ class ConnectLoopRunner {
<< "connect_loop runner:" << std::hex << self
<< " got ev.type:" << ev.type << " i:" << i;
ASSERT_TRUE(ev.success);
grpc_connectivity_state prev_state = state;
state = grpc_channel_check_connectivity_state(channel, 1);
if (self->expected_connectivity_states_ ==
GRPC_CHANNEL_TRANSIENT_FAILURE &&
prev_state == GRPC_CHANNEL_CONNECTING &&
state == GRPC_CHANNEL_CONNECTING) {
// Detect a race in state checking: if the watch_connectivity_state
// completed from prior state "connecting", this could be because the
// channel momentarily entered state "transient failure", which is
// what we want. However, if the channel immediately re-enters
// "connecting" state, then the new state check might still result in
// "connecting". A continuous repeat of this can cause this loop to
// never terminate in time. So take this scenario to indicate that the
// channel momentarily entered transient failure.
break;
}
}
grpc_channel_destroy(channel);
grpc_completion_queue_shutdown(cq);

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
timeout_mins: 120
timeout_mins: 180
action {
define_artifacts {
regex: "**/*sponge_log.*"

@ -17,7 +17,7 @@
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
timeout_mins: 120
timeout_mins: 180
action {
define_artifacts {
regex: "**/*sponge_log.*"

Loading…
Cancel
Save