Merge branch 'master' of github.com:grpc/grpc into backoff_cpp

pull/13494/head
David Garcia Quintas 7 years ago
commit 9c8ea03ee3
  1. 733
      CMakeLists.txt
  2. 129
      WORKSPACE
  3. 29
      bazel/grpc_build_system.bzl
  4. 129
      bazel/grpc_deps.bzl
  5. 9
      examples/csharp/helloworld-from-cli/Greeter/Greeter.csproj
  6. 1
      examples/csharp/helloworld-from-cli/Greeter/HelloworldGrpc.cs
  7. 1
      examples/csharp/helloworld-from-cli/GreeterClient/GreeterClient.csproj
  8. 1
      examples/csharp/helloworld-from-cli/GreeterServer/GreeterServer.csproj
  9. 4
      examples/csharp/helloworld-from-cli/generate_protos.bat
  10. 10
      examples/csharp/helloworld/Greeter/Greeter.csproj
  11. 1
      examples/csharp/helloworld/Greeter/HelloworldGrpc.cs
  12. 8
      examples/csharp/helloworld/Greeter/packages.config
  13. 10
      examples/csharp/helloworld/GreeterClient/GreeterClient.csproj
  14. 6
      examples/csharp/helloworld/GreeterClient/packages.config
  15. 10
      examples/csharp/helloworld/GreeterServer/GreeterServer.csproj
  16. 6
      examples/csharp/helloworld/GreeterServer/packages.config
  17. 2
      examples/csharp/helloworld/generate_protos.bat
  18. 10
      examples/csharp/route_guide/RouteGuide/RouteGuide.csproj
  19. 1
      examples/csharp/route_guide/RouteGuide/RouteGuideGrpc.cs
  20. 6
      examples/csharp/route_guide/RouteGuide/packages.config
  21. 10
      examples/csharp/route_guide/RouteGuideClient/RouteGuideClient.csproj
  22. 6
      examples/csharp/route_guide/RouteGuideClient/packages.config
  23. 10
      examples/csharp/route_guide/RouteGuideServer/RouteGuideServer.csproj
  24. 8
      examples/csharp/route_guide/RouteGuideServer/packages.config
  25. 2
      examples/csharp/route_guide/generate_protos.bat
  26. 1
      src/compiler/cpp_generator.cc
  27. 3
      src/core/lib/compression/stream_compression_gzip.cc
  28. 2
      src/core/lib/iomgr/resource_quota.cc
  29. 19
      src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi
  30. 12
      src/python/grpcio/grpc/_server.py
  31. 62
      src/python/grpcio_tests/tests/unit/_metadata_test.py
  32. 2
      src/ruby/end2end/channel_closing_client.rb
  33. 5
      src/ruby/end2end/end2end_common.rb
  34. 2
      src/ruby/end2end/sig_handling_client.rb
  35. 3
      src/ruby/spec/channel_connection_spec.rb
  36. 2
      src/ruby/spec/client_auth_spec.rb
  37. 4
      src/ruby/spec/client_server_spec.rb
  38. 2
      src/ruby/spec/generic/active_call_spec.rb
  39. 4
      src/ruby/spec/generic/client_stub_spec.rb
  40. 2
      src/ruby/spec/generic/interceptor_registry_spec.rb
  41. 24
      src/ruby/spec/generic/rpc_server_spec.rb
  42. 5
      src/ruby/spec/google_rpc_status_utils_spec.rb
  43. 2
      src/ruby/spec/pb/health/checker_spec.rb
  44. 18
      src/ruby/spec/server_spec.rb
  45. 36
      src/ruby/spec/support/helpers.rb
  46. 9
      templates/CMakeLists.txt.template
  47. 12
      test/cpp/end2end/BUILD
  48. 30
      test/cpp/util/cli_credentials.cc
  49. 6
      third_party/BUILD
  50. 9
      third_party/cares/BUILD
  51. 38
      third_party/cares/cares.BUILD
  52. 57
      third_party/cares/cares_local_files.BUILD
  53. 2
      tools/distrib/yapf_code.sh
  54. 307
      tools/failures/detect_new_failures.py
  55. 62
      tools/failures/sql/new_failures_24h.sql
  56. 111
      tools/flakes/detect_flakes.py
  57. 2
      tools/internal_ci/linux/grpc_bazel_on_foundry_dbg.sh
  58. 2
      tools/internal_ci/linux/grpc_bazel_on_foundry_opt.sh
  59. 2
      tools/interop_matrix/client_matrix.py
  60. 5
      tools/interop_matrix/create_matrix_images.py
  61. 468
      tools/run_tests/generated/tests.json
  62. 60
      tools/run_tests/performance/scenario_config.py
  63. 84
      tools/run_tests/sanity/check_bazel_workspace.py

File diff suppressed because it is too large Load Diff

@ -1,127 +1,4 @@
bind(
name = "nanopb",
actual = "//third_party/nanopb",
)
workspace(name = "com_github_grpc_grpc")
bind(
name = "libssl",
actual = "@boringssl//:ssl",
)
bind(
name = "zlib",
actual = "@com_github_madler_zlib//:z",
)
bind(
name = "protobuf",
actual = "@com_google_protobuf//:protobuf",
)
bind(
name = "protobuf_clib",
actual = "@com_google_protobuf//:protoc_lib",
)
bind(
name = "protobuf_headers",
actual = "@com_google_protobuf//:protobuf_headers",
)
bind(
name = "protocol_compiler",
actual = "@com_google_protobuf//:protoc",
)
bind(
name = "cares",
actual = "@com_github_cares_cares//:ares",
)
bind(
name = "gtest",
actual = "@com_github_google_googletest//:gtest",
)
bind(
name = "gmock",
actual = "@com_github_google_googletest//:gmock",
)
bind(
name = "benchmark",
actual = "@com_github_google_benchmark//:benchmark",
)
bind(
name = "gflags",
actual = "@com_github_gflags_gflags//:gflags",
)
http_archive(
name = "boringssl",
# on the master-with-bazel branch
url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz",
)
new_http_archive(
name = "com_github_madler_zlib",
build_file = "third_party/zlib.BUILD",
strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f",
url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz",
)
http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-2761122b810fe8861004ae785cc3ab39f384d342",
url = "https://github.com/google/protobuf/archive/2761122b810fe8861004ae785cc3ab39f384d342.tar.gz",
)
new_http_archive(
name = "com_github_google_googletest",
build_file = "third_party/gtest.BUILD",
strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780",
url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz",
)
http_archive(
name = "com_github_gflags_gflags",
strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e",
url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz",
)
new_http_archive(
name = "com_github_google_benchmark",
build_file = "third_party/benchmark.BUILD",
strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8",
url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz",
)
new_local_repository(
name = "cares_local_files",
build_file = "third_party/cares/cares_local_files.BUILD",
path = "third_party/cares",
)
new_http_archive(
name = "com_github_cares_cares",
build_file = "third_party/cares/cares.BUILD",
strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce",
url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz",
)
http_archive(
name = "com_google_absl",
strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610",
url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz",
)
http_archive(
name = "bazel_toolchains",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
],
strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255",
sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928",
)
load("//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()

@ -26,6 +26,27 @@
# The set of pollers to test against if a test exercises polling
POLLERS = ['epollex', 'epollsig', 'epoll1', 'poll', 'poll-cv']
def _get_external_deps(external_deps):
ret = []
for dep in external_deps:
if dep == "nanopb":
ret.append("//third_party/nanopb")
else:
ret.append("//external:" + dep)
return ret
def _maybe_update_cc_library_hdrs(hdrs):
ret = []
hdrs_to_update = {
"third_party/objective_c/Cronet/bidirectional_stream_c.h": "//third_party:objective_c/Cronet/bidirectional_stream_c.h",
}
for h in hdrs:
if h in hdrs_to_update.keys():
ret.append(hdrs_to_update[h])
else:
ret.append(h)
return ret
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
external_deps = [], deps = [], standalone = False,
language = "C++", testonly = False, visibility = None,
@ -40,8 +61,8 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
"//conditions:default": [],}) +
select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"],
"//conditions:default": [],}),
hdrs = hdrs + public_hdrs,
deps = deps + ["//external:" + dep for dep in external_deps],
hdrs = _maybe_update_cc_library_hdrs(hdrs + public_hdrs),
deps = deps + _get_external_deps(external_deps),
copts = copts,
visibility = visibility,
testonly = testonly,
@ -82,7 +103,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
'srcs': srcs,
'args': args,
'data': data,
'deps': deps + ["//external:" + dep for dep in external_deps],
'deps': deps + _get_external_deps(external_deps),
'copts': copts,
'linkopts': ["-pthread"],
}
@ -114,7 +135,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
data = data,
testonly = testonly,
linkshared = linkshared,
deps = deps + ["//external:" + dep for dep in external_deps],
deps = deps + _get_external_deps(external_deps),
copts = copts,
linkopts = ["-pthread"] + linkopts,
)

@ -0,0 +1,129 @@
"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
def grpc_deps():
"""Loads dependencies need to compile and test the grpc library."""
native.bind(
name = "libssl",
actual = "@boringssl//:ssl",
)
native.bind(
name = "zlib",
actual = "@com_github_madler_zlib//:z",
)
native.bind(
name = "protobuf",
actual = "@com_google_protobuf//:protobuf",
)
native.bind(
name = "protobuf_clib",
actual = "@com_google_protobuf//:protoc_lib",
)
native.bind(
name = "protobuf_headers",
actual = "@com_google_protobuf//:protobuf_headers",
)
native.bind(
name = "protocol_compiler",
actual = "@com_google_protobuf//:protoc",
)
native.bind(
name = "cares",
actual = "@com_github_cares_cares//:ares",
)
native.bind(
name = "gtest",
actual = "@com_github_google_googletest//:gtest",
)
native.bind(
name = "gmock",
actual = "@com_github_google_googletest//:gmock",
)
native.bind(
name = "benchmark",
actual = "@com_github_google_benchmark//:benchmark",
)
native.bind(
name = "gflags",
actual = "@com_github_gflags_gflags//:gflags",
)
if "boringssl" not in native.existing_rules():
native.http_archive(
name = "boringssl",
# on the master-with-bazel branch
url = "https://boringssl.googlesource.com/boringssl/+archive/886e7d75368e3f4fab3f4d0d3584e4abfc557755.tar.gz",
)
if "com_github_madler_zlib" not in native.existing_rules():
native.new_http_archive(
name = "com_github_madler_zlib",
build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD",
strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f",
url = "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz",
)
if "com_google_protobuf" not in native.existing_rules():
native.http_archive(
name = "com_google_protobuf",
strip_prefix = "protobuf-2761122b810fe8861004ae785cc3ab39f384d342",
url = "https://github.com/google/protobuf/archive/2761122b810fe8861004ae785cc3ab39f384d342.tar.gz",
)
if "com_github_google_googletest" not in native.existing_rules():
native.new_http_archive(
name = "com_github_google_googletest",
build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD",
strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780",
url = "https://github.com/google/googletest/archive/ec44c6c1675c25b9827aacd08c02433cccde7780.tar.gz",
)
if "com_github_gflags_gflags" not in native.existing_rules():
native.http_archive(
name = "com_github_gflags_gflags",
strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e",
url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz",
)
if "com_github_google_benchmark" not in native.existing_rules():
native.new_http_archive(
name = "com_github_google_benchmark",
build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD",
strip_prefix = "benchmark-5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8",
url = "https://github.com/google/benchmark/archive/5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8.tar.gz",
)
if "com_github_cares_cares" not in native.existing_rules():
native.new_http_archive(
name = "com_github_cares_cares",
build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce",
url = "https://github.com/c-ares/c-ares/archive/3be1924221e1326df520f8498d704a5c4c8d0cce.tar.gz",
)
if "com_google_absl" not in native.existing_rules():
native.http_archive(
name = "com_google_absl",
strip_prefix = "abseil-cpp-cc4bed2d74f7c8717e31f9579214ab52a9c9c610",
url = "https://github.com/abseil/abseil-cpp/archive/cc4bed2d74f7c8717e31f9579214ab52a9c9c610.tar.gz",
)
if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
native.http_archive(
name = "com_github_bazelbuild_bazeltoolchains",
strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
],
sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928",
)

@ -6,14 +6,13 @@
<DebugType>portable</DebugType>
<AssemblyName>Greeter</AssemblyName>
<PackageId>Greeter</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.2.0" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.2.0" />
<PackageReference Include="Grpc" Version="1.2.2" />
<PackageReference Include="Grpc.Tools" Version="1.2.2" />
<PackageReference Include="Google.Protobuf" Version="3.5.0" />
<PackageReference Include="Google.Protobuf.Tools" Version="3.5.0" />
<PackageReference Include="Grpc" Version="1.8.0" />
<PackageReference Include="Grpc.Tools" Version="1.8.0" />
</ItemGroup>
</Project>

@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -7,7 +7,6 @@
<AssemblyName>GreeterClient</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>GreeterClient</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

@ -7,7 +7,6 @@
<AssemblyName>GreeterServer</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>GreeterServer</PackageId>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>
<ItemGroup>

@ -19,8 +19,8 @@ setlocal
@rem enter this directory
cd /d %~dp0
set PROTOC=%UserProfile%\.nuget\packages\Google.Protobuf.Tools\3.2.0\tools\windows_x64\protoc.exe
set PLUGIN=%UserProfile%\.nuget\packages\Grpc.Tools\1.2.2\tools\windows_x64\grpc_csharp_plugin.exe
set PROTOC=%UserProfile%\.nuget\packages\Google.Protobuf.Tools\3.5.0\tools\windows_x64\protoc.exe
set PLUGIN=%UserProfile%\.nuget\packages\Grpc.Tools\1.8.0\tools\windows_x64\grpc_csharp_plugin.exe
%PROTOC% -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%PLUGIN%

@ -32,12 +32,12 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -62,11 +62,11 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
</Project>

@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Tools" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Tools" version="1.8.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -32,12 +32,12 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -60,11 +60,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -32,12 +32,12 @@
<Externalconsole>true</Externalconsole>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
@ -60,11 +60,11 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
</Project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -19,7 +19,7 @@ setlocal
@rem enter this directory
cd /d %~dp0
set TOOLS_PATH=packages\Grpc.Tools.1.2.2\tools\windows_x86
set TOOLS_PATH=packages\Grpc.Tools.1.8.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe

@ -32,12 +32,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -75,12 +75,12 @@
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

@ -15,6 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#pragma warning disable 1591
#region Designer generated code
using System;

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -34,12 +34,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -72,12 +72,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -34,12 +34,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Google.Protobuf, Version=3.2.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.2.0\lib\net45\Google.Protobuf.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.5.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.5.0\lib\net45\Google.Protobuf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Grpc.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
<HintPath>..\packages\Grpc.Core.1.2.2\lib\net45\Grpc.Core.dll</HintPath>
<HintPath>..\packages\Grpc.Core.1.8.0\lib\net45\Grpc.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -73,12 +73,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" />
<Import Project="..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets" Condition="Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.2.2\build\net45\Grpc.Core.targets'))" />
<Error Condition="!Exists('..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Grpc.Core.1.8.0\build\net45\Grpc.Core.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Protobuf" version="3.2.0" targetFramework="net45" />
<package id="Grpc" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Core" version="1.2.2" targetFramework="net45" />
<package id="Grpc.Tools" version="1.2.2" targetFramework="net45" />
<package id="Google.Protobuf" version="3.5.0" targetFramework="net45" />
<package id="Grpc" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Core" version="1.8.0" targetFramework="net45" />
<package id="Grpc.Tools" version="1.8.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net45" />
</packages>

@ -19,7 +19,7 @@ setlocal
@rem enter this directory
cd /d %~dp0
set TOOLS_PATH=packages\Grpc.Tools.1.2.2\tools\windows_x86
set TOOLS_PATH=packages\Grpc.Tools.1.8.0\tools\windows_x86
%TOOLS_PATH%\protoc.exe -I../../protos --csharp_out RouteGuide ../../protos/route_guide.proto --grpc_out RouteGuide --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe

@ -1383,6 +1383,7 @@ void PrintSourceService(grpc_generator::Printer* printer,
"std::unique_ptr< $ns$$Service$::Stub> $ns$$Service$::NewStub("
"const std::shared_ptr< ::grpc::ChannelInterface>& channel, "
"const ::grpc::StubOptions& options) {\n"
" (void)options;\n"
" std::unique_ptr< $ns$$Service$::Stub> stub(new "
"$ns$$Service$::Stub(channel));\n"
" return stub;\n"

@ -114,7 +114,8 @@ static bool gzip_flate(grpc_stream_compression_context_gzip* ctx,
if (ctx->zs.avail_out == 0) {
grpc_slice_buffer_add(out, slice_out);
} else if (ctx->zs.avail_out < slice_size) {
slice_out.data.refcounted.length -= ctx->zs.avail_out;
size_t len = GRPC_SLICE_LENGTH(slice_out);
GRPC_SLICE_SET_LENGTH(slice_out, len - ctx->zs.avail_out);
grpc_slice_buffer_add(out, slice_out);
} else {
grpc_slice_unref_internal(slice_out);

@ -507,6 +507,7 @@ static void ru_shutdown(void* ru, grpc_error* error) {
gpr_log(GPR_DEBUG, "RU shutdown %p", ru);
}
grpc_resource_user* resource_user = (grpc_resource_user*)ru;
gpr_mu_lock(&resource_user->mu);
GRPC_CLOSURE_SCHED(resource_user->reclaimers[0], GRPC_ERROR_CANCELLED);
GRPC_CLOSURE_SCHED(resource_user->reclaimers[1], GRPC_ERROR_CANCELLED);
resource_user->reclaimers[0] = nullptr;
@ -516,6 +517,7 @@ static void ru_shutdown(void* ru, grpc_error* error) {
if (resource_user->allocating) {
rq_step_sched(resource_user->resource_quota);
}
gpr_mu_unlock(&resource_user->mu);
}
static void ru_destroy(void* ru, grpc_error* error) {

@ -26,15 +26,20 @@ cdef bytes str_to_bytes(object s):
raise TypeError('Expected bytes, str, or unicode, not {}'.format(type(s)))
cdef bytes _encode(str native_string_or_none):
if native_string_or_none is None:
# TODO(https://github.com/grpc/grpc/issues/13782): It would be nice for us if
# the type of metadata that we accept were exactly the same as the type of
# metadata that we deliver to our users (so "str" for this function's
# parameter rather than "object"), but would it be nice for our users? Right
# now we haven't yet heard from enough users to know one way or another.
cdef bytes _encode(object string_or_none):
if string_or_none is None:
return b''
elif isinstance(native_string_or_none, (bytes,)):
return <bytes>native_string_or_none
elif isinstance(native_string_or_none, (unicode,)):
return native_string_or_none.encode('ascii')
elif isinstance(string_or_none, (bytes,)):
return <bytes>string_or_none
elif isinstance(string_or_none, (unicode,)):
return string_or_none.encode('ascii')
else:
raise TypeError('Expected str, not {}'.format(type(native_string_or_none)))
raise TypeError('Expected str, not {}'.format(type(string_or_none)))
cdef str _decode(bytes bytestring):

@ -634,7 +634,7 @@ class _ServerState(object):
# pylint: disable=too-many-arguments
def __init__(self, completion_queue, server, generic_handlers,
interceptor_pipeline, thread_pool, maximum_concurrent_rpcs):
self.lock = threading.Lock()
self.lock = threading.RLock()
self.completion_queue = completion_queue
self.server = server
self.generic_handlers = list(generic_handlers)
@ -747,22 +747,12 @@ def _stop(state, grace):
state.shutdown_events.append(shutdown_event)
if grace is None:
state.server.cancel_all_calls()
# TODO(https://github.com/grpc/grpc/issues/6597): delete this loop.
for rpc_state in state.rpc_states:
with rpc_state.condition:
rpc_state.client = _CANCELLED
rpc_state.condition.notify_all()
else:
def cancel_all_calls_after_grace():
shutdown_event.wait(timeout=grace)
with state.lock:
state.server.cancel_all_calls()
# TODO(https://github.com/grpc/grpc/issues/6597): delete this loop.
for rpc_state in state.rpc_states:
with rpc_state.condition:
rpc_state.client = _CANCELLED
rpc_state.condition.notify_all()
thread = threading.Thread(target=cancel_all_calls_after_grace)
thread.start()

@ -34,16 +34,19 @@ _UNARY_STREAM = '/test/UnaryStream'
_STREAM_UNARY = '/test/StreamUnary'
_STREAM_STREAM = '/test/StreamStream'
_CLIENT_METADATA = (('client-md-key', 'client-md-key'),
('client-md-key-bin', b'\x00\x01'))
_INVOCATION_METADATA = ((b'invocation-md-key', u'invocation-md-value',),
(u'invocation-md-key-bin', b'\x00\x01',),)
_EXPECTED_INVOCATION_METADATA = (('invocation-md-key', 'invocation-md-value',),
('invocation-md-key-bin', b'\x00\x01',),)
_SERVER_INITIAL_METADATA = (
('server-initial-md-key', 'server-initial-md-value'),
('server-initial-md-key-bin', b'\x00\x02'))
_INITIAL_METADATA = ((b'initial-md-key', u'initial-md-value'),
(u'initial-md-key-bin', b'\x00\x02'))
_EXPECTED_INITIAL_METADATA = (('initial-md-key', 'initial-md-value',),
('initial-md-key-bin', b'\x00\x02',),)
_SERVER_TRAILING_METADATA = (
('server-trailing-md-key', 'server-trailing-md-value'),
('server-trailing-md-key-bin', b'\x00\x03'))
_TRAILING_METADATA = (('server-trailing-md-key', 'server-trailing-md-value',),
('server-trailing-md-key-bin', b'\x00\x03',),)
_EXPECTED_TRAILING_METADATA = _TRAILING_METADATA
def user_agent(metadata):
@ -56,7 +59,8 @@ def user_agent(metadata):
def validate_client_metadata(test, servicer_context):
test.assertTrue(
test_common.metadata_transmitted(
_CLIENT_METADATA, servicer_context.invocation_metadata()))
_EXPECTED_INVOCATION_METADATA,
servicer_context.invocation_metadata()))
test.assertTrue(
user_agent(servicer_context.invocation_metadata())
.startswith('primary-agent ' + _channel._USER_AGENT))
@ -67,23 +71,23 @@ def validate_client_metadata(test, servicer_context):
def handle_unary_unary(test, request, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
return _RESPONSE
def handle_unary_stream(test, request, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
for _ in range(test_constants.STREAM_LENGTH):
yield _RESPONSE
def handle_stream_unary(test, request_iterator, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
# TODO(issue:#6891) We should be able to remove this loop
for request in request_iterator:
pass
@ -92,8 +96,8 @@ def handle_stream_unary(test, request_iterator, servicer_context):
def handle_stream_stream(test, request_iterator, servicer_context):
validate_client_metadata(test, servicer_context)
servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA)
servicer_context.send_initial_metadata(_INITIAL_METADATA)
servicer_context.set_trailing_metadata(_TRAILING_METADATA)
# TODO(issue:#6891) We should be able to remove this loop,
# and replace with return; yield
for request in request_iterator:
@ -156,50 +160,50 @@ class MetadataTest(unittest.TestCase):
def testUnaryUnary(self):
multi_callable = self._channel.unary_unary(_UNARY_UNARY)
unused_response, call = multi_callable.with_call(
_REQUEST, metadata=_CLIENT_METADATA)
_REQUEST, metadata=_INVOCATION_METADATA)
self.assertTrue(
test_common.metadata_transmitted(_SERVER_INITIAL_METADATA,
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,
call.initial_metadata()))
self.assertTrue(
test_common.metadata_transmitted(_SERVER_TRAILING_METADATA,
test_common.metadata_transmitted(_EXPECTED_TRAILING_METADATA,
call.trailing_metadata()))
def testUnaryStream(self):
multi_callable = self._channel.unary_stream(_UNARY_STREAM)
call = multi_callable(_REQUEST, metadata=_CLIENT_METADATA)
call = multi_callable(_REQUEST, metadata=_INVOCATION_METADATA)
self.assertTrue(
test_common.metadata_transmitted(_SERVER_INITIAL_METADATA,
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,
call.initial_metadata()))
for _ in call:
pass
self.assertTrue(
test_common.metadata_transmitted(_SERVER_TRAILING_METADATA,
test_common.metadata_transmitted(_EXPECTED_TRAILING_METADATA,
call.trailing_metadata()))
def testStreamUnary(self):
multi_callable = self._channel.stream_unary(_STREAM_UNARY)
unused_response, call = multi_callable.with_call(
iter([_REQUEST] * test_constants.STREAM_LENGTH),
metadata=_CLIENT_METADATA)
metadata=_INVOCATION_METADATA)
self.assertTrue(
test_common.metadata_transmitted(_SERVER_INITIAL_METADATA,
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,
call.initial_metadata()))
self.assertTrue(
test_common.metadata_transmitted(_SERVER_TRAILING_METADATA,
test_common.metadata_transmitted(_EXPECTED_TRAILING_METADATA,
call.trailing_metadata()))
def testStreamStream(self):
multi_callable = self._channel.stream_stream(_STREAM_STREAM)
call = multi_callable(
iter([_REQUEST] * test_constants.STREAM_LENGTH),
metadata=_CLIENT_METADATA)
metadata=_INVOCATION_METADATA)
self.assertTrue(
test_common.metadata_transmitted(_SERVER_INITIAL_METADATA,
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,
call.initial_metadata()))
for _ in call:
pass
self.assertTrue(
test_common.metadata_transmitted(_SERVER_TRAILING_METADATA,
test_common.metadata_transmitted(_EXPECTED_TRAILING_METADATA,
call.trailing_metadata()))

@ -44,7 +44,7 @@ def main
ch = GRPC::Core::Channel.new("localhost:#{server_port}", {},
:this_channel_is_insecure)
srv = GRPC::RpcServer.new
srv = new_rpc_server_for_testing
thd = Thread.new do
srv.add_http2_port("0.0.0.0:#{client_control_port}", :this_port_is_insecure)
srv.handle(ChannelClosingClientController.new(ch))

@ -29,6 +29,9 @@ require 'optparse'
require 'thread'
require 'timeout'
require 'English' # see https://github.com/bbatsov/rubocop/issues/1747
require_relative '../spec/support/helpers'
include GRPC::Spec::Helpers
# GreeterServer is simple server that implements the Helloworld Greeter server.
class EchoServerImpl < Echo::EchoServer::Service
@ -46,7 +49,7 @@ class ServerRunner
end
def run
@srv = GRPC::RpcServer.new(@rpc_server_args)
@srv = new_rpc_server_for_testing(@rpc_server_args)
port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@srv.handle(@service_impl)

@ -66,7 +66,7 @@ def main
# The "shutdown" RPC should end very quickly.
# Allow a few seconds to be safe.
srv = GRPC::RpcServer.new(poll_period: 3)
srv = new_rpc_server_for_testing(poll_period: 3)
srv.add_http2_port("0.0.0.0:#{client_control_port}",
:this_port_is_insecure)
stub = Echo::EchoServer::Stub.new("localhost:#{server_port}",

@ -16,9 +16,10 @@ require 'timeout'
include Timeout
include GRPC::Core
include GRPC::Spec::Helpers
def start_server(port = 0)
@srv = GRPC::RpcServer.new(pool_size: 1)
@srv = new_rpc_server_for_testing(pool_size: 1)
server_port = @srv.add_http2_port("localhost:#{port}", :this_port_is_insecure)
@srv.handle(EchoService)
@server_thd = Thread.new { @srv.run }

@ -95,7 +95,7 @@ describe 'client-server auth' do
server_opts = {
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
port = @srv.add_http2_port('0.0.0.0:0', create_server_creds)
@srv.handle(SslTestService)
@srv_thd = Thread.new { @srv.run }

@ -542,7 +542,7 @@ end
describe 'the http client/server' do
before(:example) do
server_host = '0.0.0.0:0'
@server = GRPC::Core::Server.new(nil)
@server = new_core_server_for_testing(nil)
server_port = @server.add_http2_port(server_host, :this_port_is_insecure)
@server.start
@ch = Channel.new("0.0.0.0:#{server_port}", nil, :this_channel_is_insecure)
@ -574,7 +574,7 @@ describe 'the secure http client/server' do
server_host = '0.0.0.0:0'
server_creds = GRPC::Core::ServerCredentials.new(
nil, [{ private_key: certs[1], cert_chain: certs[2] }], false)
@server = GRPC::Core::Server.new(nil)
@server = new_core_server_for_testing(nil)
server_port = @server.add_http2_port(server_host, server_creds)
@server.start
args = { Channel::SSL_TARGET => 'foo.test.google.fr' }

@ -40,7 +40,7 @@ describe GRPC::ActiveCall do
before(:each) do
@pass_through = proc { |x| x }
host = '0.0.0.0:0'
@server = GRPC::Core::Server.new(nil)
@server = new_core_server_for_testing(nil)
server_port = @server.add_http2_port(host, :this_port_is_insecure)
@server.start
@ch = GRPC::Core::Channel.new("0.0.0.0:#{server_port}", nil,

@ -888,12 +888,12 @@ describe 'ClientStub' do
secure_credentials = GRPC::Core::ServerCredentials.new(
nil, [{ private_key: certs[1], cert_chain: certs[2] }], false)
@server = GRPC::Core::Server.new(nil)
@server = new_core_server_for_testing(nil)
@server.add_http2_port('0.0.0.0:0', secure_credentials)
end
def create_test_server
@server = GRPC::Core::Server.new(nil)
@server = new_core_server_for_testing(nil)
@server.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
end

@ -14,7 +14,7 @@
require 'spec_helper'
describe GRPC::InterceptorRegistry do
let(:server) { RpcServer.new }
let(:server) { new_rpc_server_for_testing }
let(:interceptor) { TestServerInterceptor.new }
let(:interceptors) { [interceptor] }
let(:registry) { described_class.new(interceptors) }

@ -172,7 +172,7 @@ describe GRPC::RpcServer do
it 'can be created with just some args' do
opts = { server_args: { a_channel_arg: 'an_arg' } }
blk = proc do
RpcServer.new(**opts)
new_rpc_server_for_testing(**opts)
end
expect(&blk).not_to raise_error
end
@ -183,7 +183,7 @@ describe GRPC::RpcServer do
server_args: { a_channel_arg: 'an_arg' },
creds: Object.new
}
RpcServer.new(**opts)
new_rpc_server_for_testing(**opts)
end
expect(&blk).to raise_error
end
@ -192,7 +192,7 @@ describe GRPC::RpcServer do
describe '#stopped?' do
before(:each) do
opts = { server_args: { a_channel_arg: 'an_arg' }, poll_period: 1.5 }
@srv = RpcServer.new(**opts)
@srv = new_rpc_server_for_testing(**opts)
@srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
end
@ -224,7 +224,7 @@ describe GRPC::RpcServer do
opts = {
server_args: { a_channel_arg: 'an_arg' }
}
r = RpcServer.new(**opts)
r = new_rpc_server_for_testing(**opts)
expect(r.running?).to be(false)
end
@ -233,7 +233,7 @@ describe GRPC::RpcServer do
server_args: { a_channel_arg: 'an_arg' },
poll_period: 2
}
r = RpcServer.new(**opts)
r = new_rpc_server_for_testing(**opts)
r.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
expect { r.run }.to raise_error(RuntimeError)
end
@ -243,7 +243,7 @@ describe GRPC::RpcServer do
server_args: { a_channel_arg: 'an_arg' },
poll_period: 2.5
}
r = RpcServer.new(**opts)
r = new_rpc_server_for_testing(**opts)
r.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
r.handle(EchoService)
t = Thread.new { r.run }
@ -257,7 +257,7 @@ describe GRPC::RpcServer do
describe '#handle' do
before(:each) do
@opts = { server_args: { a_channel_arg: 'an_arg' }, poll_period: 1 }
@srv = RpcServer.new(**@opts)
@srv = new_rpc_server_for_testing(**@opts)
@srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
end
@ -303,7 +303,7 @@ describe GRPC::RpcServer do
server_opts = {
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
server_port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@host = "localhost:#{server_port}"
@ch = GRPC::Core::Channel.new(@host, nil, :this_channel_is_insecure)
@ -474,7 +474,7 @@ describe GRPC::RpcServer do
poll_period: 1,
max_waiting_requests: 1
}
alt_srv = RpcServer.new(**opts)
alt_srv = new_rpc_server_for_testing(**opts)
alt_srv.handle(SlowService)
alt_port = alt_srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
alt_host = "0.0.0.0:#{alt_port}"
@ -538,7 +538,7 @@ describe GRPC::RpcServer do
poll_period: 1,
connect_md_proc: test_md_proc
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
alt_port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@alt_host = "0.0.0.0:#{alt_port}"
end
@ -573,7 +573,7 @@ describe GRPC::RpcServer do
server_opts = {
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
alt_port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@alt_host = "0.0.0.0:#{alt_port}"
end
@ -624,7 +624,7 @@ describe GRPC::RpcServer do
server_opts = {
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
alt_port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@alt_host = "0.0.0.0:#{alt_port}"

@ -19,6 +19,7 @@ require_relative '../pb/src/proto/grpc/testing/messages_pb'
require 'google/protobuf/well_known_types'
include GRPC::Core
include GRPC::Spec::Helpers
describe 'conversion from a status struct to a google protobuf status' do
it 'fails if the input is not a status struct' do
@ -150,7 +151,7 @@ GoogleRpcStatusTestStub = GoogleRpcStatusTestService.rpc_stub_class
describe 'receving a google rpc status from a remote endpoint' do
def start_server(encoded_rpc_status)
@srv = GRPC::RpcServer.new(pool_size: 1)
@srv = new_rpc_server_for_testing(pool_size: 1)
@server_port = @srv.add_http2_port('localhost:0',
:this_port_is_insecure)
@srv.handle(GoogleRpcStatusTestService.new(encoded_rpc_status))
@ -238,7 +239,7 @@ NoStatusDetailsBinTestServiceStub = NoStatusDetailsBinTestService.rpc_stub_class
describe 'when the endpoint doesnt send grpc-status-details-bin' do
def start_server
@srv = GRPC::RpcServer.new(pool_size: 1)
@srv = new_rpc_server_for_testing(pool_size: 1)
@server_port = @srv.add_http2_port('localhost:0',
:this_port_is_insecure)
@srv.handle(NoStatusDetailsBinTestService)

@ -192,7 +192,7 @@ describe Grpc::Health::Checker do
server_opts = {
poll_period: 1
}
@srv = RpcServer.new(**server_opts)
@srv = new_rpc_server_for_testing(**server_opts)
server_port = @srv.add_http2_port(server_host, :this_port_is_insecure)
@host = "localhost:#{server_port}"
@ch = GRPC::Core::Channel.new(@host, nil, :this_channel_is_insecure)

@ -30,12 +30,12 @@ describe Server do
describe '#start' do
it 'runs without failing' do
blk = proc { Server.new(nil).start }
blk = proc { new_core_server_for_testing(nil).start }
expect(&blk).to_not raise_error
end
it 'fails if the server is closed' do
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.close
expect { s.start }.to raise_error(RuntimeError)
end
@ -85,7 +85,7 @@ describe Server do
describe 'for insecure servers' do
it 'runs without failing' do
blk = proc do
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.add_http2_port('localhost:0', :this_port_is_insecure)
s.close
end
@ -93,7 +93,7 @@ describe Server do
end
it 'fails if the server is closed' do
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.close
blk = proc do
s.add_http2_port('localhost:0', :this_port_is_insecure)
@ -106,7 +106,7 @@ describe Server do
let(:cert) { create_test_cert }
it 'runs without failing' do
blk = proc do
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.add_http2_port('localhost:0', cert)
s.close
end
@ -114,7 +114,7 @@ describe Server do
end
it 'fails if the server is closed' do
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.close
blk = proc { s.add_http2_port('localhost:0', cert) }
expect(&blk).to raise_error(RuntimeError)
@ -124,7 +124,7 @@ describe Server do
shared_examples '#new' do
it 'takes nil channel args' do
expect { Server.new(nil) }.to_not raise_error
expect { new_core_server_for_testing(nil) }.to_not raise_error
end
it 'does not take a hash with bad keys as channel args' do
@ -175,14 +175,14 @@ describe Server do
describe '#new with an insecure channel' do
def construct_with_args(a)
proc { Server.new(a) }
proc { new_core_server_for_testing(a) }
end
it_behaves_like '#new'
end
def start_a_server
s = Server.new(nil)
s = new_core_server_for_testing(nil)
s.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
s.start
s

@ -31,7 +31,7 @@ module GRPC
#
def build_rpc_server(server_opts: {},
client_opts: {})
@server = RpcServer.new({ poll_period: 1 }.merge(server_opts))
@server = new_rpc_server_for_testing({ poll_period: 1 }.merge(server_opts))
@port = @server.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
@host = "0.0.0.0:#{@port}"
@client_opts = client_opts
@ -68,6 +68,40 @@ module GRPC
opts ||= @client_opts
klass.new(host, :this_channel_is_insecure, **opts)
end
##
# Build an RPCServer for use in tests. Adds args
# that are useful for all tests.
#
# @param [Hash] server_opts
#
def new_rpc_server_for_testing(server_opts = {})
server_opts[:server_args] ||= {}
update_server_args_hash(server_opts[:server_args])
RpcServer.new(**server_opts)
end
##
# Build an GRPC::Core::Server for use in tests. Adds args
# that are useful for all tests.
#
# @param [Hash] server_args
#
def new_core_server_for_testing(server_args)
server_args.nil? && server_args = {}
update_server_args_hash(server_args)
GRPC::Core::Server.new(server_args)
end
def update_server_args_hash(server_args)
so_reuseport_arg = 'grpc.so_reuseport'
unless server_args[so_reuseport_arg].nil?
fail 'Unexpected. grpc.so_reuseport already set.'
end
# Run tests without so_reuseport to eliminate the chance of
# cross-talk.
server_args[so_reuseport_arg] = 0
end
end
end
end

@ -269,6 +269,7 @@
add_subdirectory(<%text>${BORINGSSL_ROOT_DIR}</%text> third_party/boringssl)
if(TARGET ssl)
set(_gRPC_SSL_LIBRARIES ssl)
set(_gRPC_SSL_INCLUDE_DIR <%text>${BORINGSSL_ROOT_DIR}</%text>/include)
endif()
else()
message(WARNING "gRPC_SSL_PROVIDER is \"module\" but BORINGSSL_ROOT_DIR is wrong")
@ -280,7 +281,7 @@
elseif("<%text>${gRPC_SSL_PROVIDER}</%text>" STREQUAL "package")
find_package(OpenSSL REQUIRED)
set(_gRPC_SSL_LIBRARIES <%text>${OPENSSL_LIBRARIES}</%text>)
include_directories(<%text>${OPENSSL_INCLUDE_DIR}</%text>)
set(_gRPC_SSL_INCLUDE_DIR <%text>${OPENSSL_INCLUDE_DIR}</%text>)
set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()
@ -445,7 +446,7 @@
% for lib in libs:
% if lib.build in ["all", "protoc", "tool", "test", "private"] and not lib.boringssl:
% if not lib.get('build_system', []) or 'cmake' in lib.get('build_system', []):
% if not lib.name in ['benchmark', 'z']: # we build these using CMake instead
% if not lib.name in ['ares', 'benchmark', 'z']: # we build these using CMake instead
% if lib.build in ["test", "private"]:
if (gRPC_BUILD_TESTS)
${cc_library(lib)}
@ -515,7 +516,7 @@
target_include_directories(${lib.name}
PUBLIC <%text>$<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include></%text>
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
PRIVATE <%text>${BORINGSSL_ROOT_DIR}</%text>/include
PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text>
PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src
PRIVATE <%text>${ZLIB_INCLUDE_DIR}</%text>
PRIVATE <%text>${BENCHMARK}</%text>/include
@ -586,7 +587,7 @@
target_include_directories(${tgt.name}
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>
PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}</%text>/include
PRIVATE <%text>${BORINGSSL_ROOT_DIR}</%text>/include
PRIVATE <%text>${_gRPC_SSL_INCLUDE_DIR}</%text>
PRIVATE <%text>${PROTOBUF_ROOT_DIR}</%text>/src
PRIVATE <%text>${BENCHMARK_ROOT_DIR}</%text>/include
PRIVATE <%text>${ZLIB_ROOT_DIR}</%text>

@ -14,7 +14,7 @@
licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package")
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package", "grpc_cc_binary")
grpc_package(name = "test/cpp/end2end", visibility = "public") # Allows external users to implement end2end tests.
@ -66,12 +66,15 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
"//test/cpp/util:test_util",
],
data = [
":client_crash_test_server",
],
external_deps = [
"gtest",
],
)
grpc_cc_test(
grpc_cc_binary(
name = "client_crash_test_server",
srcs = ["client_crash_test_server.cc"],
deps = [
@ -301,9 +304,12 @@ grpc_cc_test(
external_deps = [
"gtest",
],
data = [
":server_crash_test_client",
],
)
grpc_cc_test(
grpc_cc_binary(
name = "server_crash_test_client",
srcs = ["server_crash_test_client.cc"],
deps = [

@ -22,27 +22,43 @@
DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls.");
DEFINE_bool(use_auth, false, "Whether to create default google credentials.");
DEFINE_string(
access_token, "",
"The access token that will be sent to the server to authenticate RPCs.");
namespace grpc {
namespace testing {
std::shared_ptr<grpc::ChannelCredentials> CliCredentials::GetCredentials()
const {
if (!FLAGS_enable_ssl) {
return grpc::InsecureChannelCredentials();
} else {
if (!FLAGS_access_token.empty()) {
if (FLAGS_use_auth) {
return grpc::GoogleDefaultCredentials();
} else {
return grpc::SslCredentials(grpc::SslCredentialsOptions());
fprintf(stderr,
"warning: use_auth is ignored when access_token is provided.");
}
return grpc::CompositeChannelCredentials(
grpc::SslCredentials(grpc::SslCredentialsOptions()),
grpc::AccessTokenCredentials(FLAGS_access_token));
}
if (FLAGS_use_auth) {
return grpc::GoogleDefaultCredentials();
}
if (FLAGS_enable_ssl) {
return grpc::SslCredentials(grpc::SslCredentialsOptions());
}
return grpc::InsecureChannelCredentials();
}
const grpc::string CliCredentials::GetCredentialUsage() const {
return " --enable_ssl ; Set whether to use tls\n"
" --use_auth ; Set whether to create default google"
" credentials\n";
" credentials\n"
" --access_token ; Set the access token in metadata,"
" overrides --use_auth\n";
}
} // namespace testing
} // namespace grpc

6
third_party/BUILD vendored

@ -0,0 +1,6 @@
exports_files([
"benchmark.BUILD",
"gtest.BUILD",
"objective_c/Cronet/bidirectional_stream_c.h",
"zlib.BUILD",
])

@ -0,0 +1,9 @@
exports_files([
"ares_build.h",
"cares.BUILD",
"config_android/ares_config.h",
"config_darwin/ares_config.h",
"config_freebsd/ares_config.h",
"config_linux/ares_config.h",
"config_openbsd/ares_config.h",
])

@ -35,33 +35,27 @@ config_setting(
)
genrule(
name = "ares_build",
srcs = ["@cares_local_files//:ares_build_h"],
name = "ares_build_h",
srcs = ["@com_github_grpc_grpc//third_party/cares:ares_build.h"],
outs = ["ares_build.h"],
cmd = "cat $(location @cares_local_files//:ares_build_h) > $@",
cmd = "cat $< > $@",
)
# cc_library(
# name = "ares_build_h",
# hdrs = ["ares_build.h"],
# data = [":ares_build"],
# includes = ["."],
# )
genrule(
name = "ares_config",
srcs = ["@cares_local_files//:ares_config_h"],
name = "ares_config_h",
srcs = select({
":ios_x86_64": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":ios_armv7": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":ios_armv7s": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":ios_arm64": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":darwin": ["@com_github_grpc_grpc//third_party/cares:config_darwin/ares_config.h"],
":android": ["@com_github_grpc_grpc//third_party/cares:config_android/ares_config.h"],
"//conditions:default": ["@com_github_grpc_grpc//third_party/cares:config_linux/ares_config.h"],
}),
outs = ["ares_config.h"],
cmd = "cat $(location @cares_local_files//:ares_config_h) > $@",
cmd = "cat $< > $@",
)
# cc_library(
# name = "ares_config_h",
# hdrs = ["ares_config.h"],
# data = [":ares_config"],
# includes = ["."],
# )
cc_library(
name = "ares",
srcs = [
@ -147,10 +141,6 @@ cc_library(
"-DNOMINMAX",
"-DHAVE_CONFIG_H",
],
data = [
":ares_build",
":ares_config",
],
includes = ["."],
linkstatic = 1,
visibility = [

@ -1,57 +0,0 @@
package(
default_visibility = ["//visibility:public"],
)
config_setting(
name = "darwin",
values = {"cpu": "darwin"},
)
# Android is not officially supported through C++.
# This just helps with the build for now.
config_setting(
name = "android",
values = {
"crosstool_top": "//external:android/crosstool",
},
)
# iOS is not officially supported through C++.
# This just helps with the build for now.
config_setting(
name = "ios_x86_64",
values = {"cpu": "ios_x86_64"},
)
config_setting(
name = "ios_armv7",
values = {"cpu": "ios_armv7"},
)
config_setting(
name = "ios_armv7s",
values = {"cpu": "ios_armv7s"},
)
config_setting(
name = "ios_arm64",
values = {"cpu": "ios_arm64"},
)
filegroup(
name = "ares_build_h",
srcs = ["ares_build.h"],
)
filegroup(
name = "ares_config_h",
srcs = select({
":ios_x86_64": ["config_darwin/ares_config.h"],
":ios_armv7": ["config_darwin/ares_config.h"],
":ios_armv7s": ["config_darwin/ares_config.h"],
":ios_arm64": ["config_darwin/ares_config.h"],
":darwin": ["config_darwin/ares_config.h"],
":android": ["config_android/ares_config.h"],
"//conditions:default": ["config_linux/ares_config.h"],
}),
)

@ -54,7 +54,7 @@ else
tempdir=$(mktemp -d)
cp -RT "${dir}" "${tempdir}"
yapf "${tempdir}"
diff -ru "${dir}" "${tempdir}" || ok=no
diff -x '*.pyc' -ru "${dir}" "${tempdir}" || ok=no
rm -rf "${tempdir}"
done
if [[ ${ok} == no ]]; then

@ -0,0 +1,307 @@
#!/usr/bin/env python
# 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.
"""Detect new flakes and create issues for them"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import datetime
import json
import logging
import os
import pprint
import sys
import urllib
import urllib2
from collections import namedtuple
gcp_utils_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '../gcp/utils'))
sys.path.append(gcp_utils_dir)
import big_query_utils
GH_ISSUE_CREATION_URL = 'https://api.github.com/repos/grpc/grpc/issues'
GH_ISSUE_SEARCH_URL = 'https://api.github.com/search/issues'
KOKORO_BASE_URL = 'https://kokoro2.corp.google.com/job/'
def gh(url, data=None):
request = urllib2.Request(url, data=data)
assert TOKEN
request.add_header('Authorization', 'token {}'.format(TOKEN))
if data:
request.add_header('Content-type', 'application/json')
response = urllib2.urlopen(request)
if 200 <= response.getcode() < 300:
return json.loads(response.read())
else:
raise ValueError('Error ({}) accessing {}'.format(response.getcode(),
response.geturl()))
def search_gh_issues(search_term, status='open'):
params = ' '.join((search_term, 'is:issue', 'is:open', 'repo:grpc/grpc'))
qargs = urllib.urlencode({'q': params})
url = '?'.join((GH_ISSUE_SEARCH_URL, qargs))
response = gh(url)
return response
def create_gh_issue(title, body, labels, assignees=[]):
params = {'title': title, 'body': body, 'labels': labels}
if assignees:
params['assignees'] = assignees
data = json.dumps(params)
response = gh(GH_ISSUE_CREATION_URL, data)
issue_url = response['html_url']
print('Created issue {} for {}'.format(issue_url, title))
def build_kokoro_url(job_name, build_id):
job_path = '{}/{}'.format('/job/'.join(job_name.split('/')), build_id)
return KOKORO_BASE_URL + job_path
def create_issues(new_flakes, always_create):
for test_name, results_row in new_flakes.items():
poll_strategy, job_name, build_id, timestamp = results_row
# TODO(dgq): the Kokoro URL has a limited lifetime. The permanent and ideal
# URL would be the sponge one, but there's currently no easy way to retrieve
# it.
url = build_kokoro_url(job_name, build_id)
title = 'New Failure: ' + test_name
body = '- Test: {}\n- Poll Strategy: {}\n- URL: {}'.format(
test_name, poll_strategy, url)
labels = ['infra/New Failure']
if always_create:
proceed = True
else:
preexisting_issues = search_gh_issues(test_name)
if preexisting_issues['total_count'] > 0:
print('\nFound {} issues for "{}":'.format(preexisting_issues[
'total_count'], test_name))
for issue in preexisting_issues['items']:
print('\t"{}" ; URL: {}'.format(issue['title'], issue[
'html_url']))
else:
print(
'\nNo preexisting issues found for "{}"'.format(test_name))
proceed = raw_input(
'Create issue for:\nTitle: {}\nBody: {}\n[Y/n] '.format(
title, body)) in ('y', 'Y', '')
if proceed:
assignees_str = raw_input(
'Asignees? (comma-separated, leave blank for unassigned): ')
assignees = [
assignee.strip() for assignee in assignees_str.split(',')
]
create_gh_issue(title, body, labels, assignees)
def print_table(table, format):
first_time = True
for test_name, results_row in table.items():
poll_strategy, job_name, build_id, timestamp = results_row
full_kokoro_url = build_kokoro_url(job_name, build_id)
if format == 'human':
print("\t- Test: {}, Polling: {}, Timestamp: {}, url: {}".format(
test_name, poll_strategy, timestamp, full_kokoro_url))
else:
assert (format == 'csv')
if first_time:
print('test,timestamp,url')
first_time = False
print("{},{},{}".format(test_name, timestamp, full_kokoro_url))
Row = namedtuple('Row', ['poll_strategy', 'job_name', 'build_id', 'timestamp'])
def get_new_failures(dates):
bq = big_query_utils.create_big_query()
this_script_path = os.path.join(os.path.dirname(__file__))
sql_script = os.path.join(this_script_path, 'sql/new_failures_24h.sql')
with open(sql_script) as query_file:
query = query_file.read().format(
calibration_begin=dates['calibration']['begin'],
calibration_end=dates['calibration']['end'],
reporting_begin=dates['reporting']['begin'],
reporting_end=dates['reporting']['end'])
logging.debug("Query:\n%s", query)
query_job = big_query_utils.sync_query_job(bq, 'grpc-testing', query)
page = bq.jobs().getQueryResults(
pageToken=None, **query_job['jobReference']).execute(num_retries=3)
rows = page.get('rows')
if rows:
return {
row['f'][0]['v']: Row(poll_strategy=row['f'][1]['v'],
job_name=row['f'][2]['v'],
build_id=row['f'][3]['v'],
timestamp=row['f'][4]['v'])
for row in rows
}
else:
return {}
def parse_isodate(date_str):
return datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
def get_new_flakes(args):
"""The from_date_str argument marks the beginning of the "calibration", used
to establish the set of pre-existing flakes, which extends over
"calibration_days". After the calibration period, "reporting_days" is the
length of time during which new flakes will be reported.
from
date
|--------------------|---------------|
^____________________^_______________^
calibration reporting
days days
"""
dates = process_date_args(args)
new_failures = get_new_failures(dates)
logging.info('|new failures| = %d', len(new_failures))
return new_failures
def build_args_parser():
import argparse, datetime
parser = argparse.ArgumentParser()
today = datetime.date.today()
a_week_ago = today - datetime.timedelta(days=7)
parser.add_argument(
'--calibration_days',
type=int,
default=7,
help='How many days to consider for pre-existing flakes.')
parser.add_argument(
'--reporting_days',
type=int,
default=1,
help='How many days to consider for the detection of new flakes.')
parser.add_argument(
'--count_only',
dest='count_only',
action='store_true',
help='Display only number of new flakes.')
parser.set_defaults(count_only=False)
parser.add_argument(
'--create_issues',
dest='create_issues',
action='store_true',
help='Create issues for all new flakes.')
parser.set_defaults(create_issues=False)
parser.add_argument(
'--always_create_issues',
dest='always_create_issues',
action='store_true',
help='Always create issues for all new flakes. Otherwise,'
' interactively prompt for every issue.')
parser.set_defaults(always_create_issues=False)
parser.add_argument(
'--token',
type=str,
default='',
help='GitHub token to use its API with a higher rate limit')
parser.add_argument(
'--format',
type=str,
choices=['human', 'csv'],
default='human',
help='Output format: are you a human or a machine?')
parser.add_argument(
'--loglevel',
type=str,
choices=['INFO', 'DEBUG', 'WARNING', 'ERROR', 'CRITICAL'],
default='WARNING',
help='Logging level.')
return parser
def process_date_args(args):
calibration_begin = (
datetime.date.today() - datetime.timedelta(days=args.calibration_days) -
datetime.timedelta(days=args.reporting_days))
calibration_end = calibration_begin + datetime.timedelta(
days=args.calibration_days)
reporting_begin = calibration_end
reporting_end = reporting_begin + datetime.timedelta(
days=args.reporting_days)
return {
'calibration': {
'begin': calibration_begin,
'end': calibration_end
},
'reporting': {
'begin': reporting_begin,
'end': reporting_end
}
}
def main():
global TOKEN
args_parser = build_args_parser()
args = args_parser.parse_args()
if args.create_issues and not args.token:
raise ValueError(
'Missing --token argument, needed to create GitHub issues')
TOKEN = args.token
logging_level = getattr(logging, args.loglevel)
logging.basicConfig(format='%(asctime)s %(message)s', level=logging_level)
new_flakes = get_new_flakes(args)
dates = process_date_args(args)
dates_info_string = 'from {} until {} (calibrated from {} until {})'.format(
dates['reporting']['begin'].isoformat(),
dates['reporting']['end'].isoformat(),
dates['calibration']['begin'].isoformat(),
dates['calibration']['end'].isoformat())
if args.format == 'human':
if args.count_only:
print(len(new_flakes), dates_info_string)
elif new_flakes:
found_msg = 'Found {} new flakes {}'.format(
len(new_flakes), dates_info_string)
print(found_msg)
print('*' * len(found_msg))
print_table(new_flakes, 'human')
if args.create_issues:
create_issues(new_flakes, args.always_create_issues)
else:
print('No new flakes found '.format(len(new_flakes)),
dates_info_string)
elif args.format == 'csv':
if args.count_only:
print('from_date,to_date,count')
print('{},{},{}'.format(dates['reporting']['begin'].isoformat(
), dates['reporting']['end'].isoformat(), len(new_flakes)))
else:
print_table(new_flakes, 'csv')
else:
raise ValueError(
'Invalid argument for --format: {}'.format(args.format))
if __name__ == '__main__':
main()

@ -0,0 +1,62 @@
#standardSQL
WITH calibration AS (
SELECT
RTRIM(LTRIM(REGEXP_REPLACE(filtered_test_name, r'(/\d+)|(bins/.+/)|(cmake/.+/.+/)', ''))) AS test_binary,
REGEXP_EXTRACT(test_name, r'GRPC_POLL_STRATEGY=(\w+)') AS poll_strategy,
job_name,
build_id
FROM (
SELECT
REGEXP_REPLACE(test_name, r'(/\d+)|(GRPC_POLL_STRATEGY=.+)', '') AS filtered_test_name,
test_name,
job_name,
build_id,
timestamp
FROM
`grpc-testing.jenkins_test_results.aggregate_results`
WHERE
timestamp > TIMESTAMP(DATETIME("{calibration_begin} 00:00:00", "America/Los_Angeles"))
AND timestamp <= TIMESTAMP(DATETIME("{calibration_end} 23:59:59", "America/Los_Angeles"))
AND NOT REGEXP_CONTAINS(job_name,
'portability')
AND result != 'PASSED'
AND result != 'SKIPPED' )),
reporting AS (
SELECT
RTRIM(LTRIM(REGEXP_REPLACE(filtered_test_name, r'(/\d+)|(bins/.+/)|(cmake/.+/.+/)', ''))) AS test_binary,
REGEXP_EXTRACT(test_name, r'GRPC_POLL_STRATEGY=(\w+)') AS poll_strategy,
job_name,
build_id,
timestamp
FROM (
SELECT
REGEXP_REPLACE(test_name, r'(/\d+)|(GRPC_POLL_STRATEGY=.+)', '') AS filtered_test_name,
test_name,
job_name,
build_id,
timestamp
FROM
`grpc-testing.jenkins_test_results.aggregate_results`
WHERE
timestamp > TIMESTAMP(DATETIME("{reporting_begin} 00:00:00", "America/Los_Angeles"))
AND timestamp <= TIMESTAMP(DATETIME("{reporting_end} 23:59:59", "America/Los_Angeles"))
AND NOT REGEXP_CONTAINS(job_name,
'portability')
AND result != 'PASSED'
AND result != 'SKIPPED' ))
SELECT
reporting.test_binary,
reporting.poll_strategy,
reporting.job_name,
reporting.build_id,
STRING(reporting.timestamp, "America/Los_Angeles") as timestamp_MTV
FROM
reporting
LEFT JOIN
calibration
ON
reporting.test_binary = calibration.test_binary
WHERE
calibration.test_binary IS NULL
ORDER BY
timestamp DESC;

@ -1,111 +0,0 @@
#!/usr/bin/env python
# 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.
"""Detect new flakes introduced in the last 24h hours with respect to the
previous six days"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import datetime
import os
import sys
import logging
logging.basicConfig(format='%(asctime)s %(message)s')
gcp_utils_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '../gcp/utils'))
sys.path.append(gcp_utils_dir)
import big_query_utils
def print_table(table):
kokoro_base_url = 'https://kokoro.corp.google.com/job/'
for k, v in table.items():
job_name = v[0]
build_id = v[1]
ts = int(float(v[2]))
# TODO(dgq): timezone handling is wrong. We need to determine the timezone
# of the computer running this script.
human_ts = datetime.datetime.utcfromtimestamp(ts).strftime(
'%Y-%m-%d %H:%M:%S PDT')
job_path = '{}/{}'.format('/job/'.join(job_name.split('/')), build_id)
full_kokoro_url = kokoro_base_url + job_path
print("Test: {}, Timestamp: {}, url: {}\n".format(k, human_ts,
full_kokoro_url))
def get_flaky_tests(days_lower_bound, days_upper_bound, limit=None):
""" period is one of "WEEK", "DAY", etc.
(see https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#date_add). """
bq = big_query_utils.create_big_query()
query = """
SELECT
REGEXP_REPLACE(test_name, r'/\d+', '') AS filtered_test_name,
job_name,
build_id,
timestamp
FROM
[grpc-testing:jenkins_test_results.aggregate_results]
WHERE
timestamp > DATE_ADD(CURRENT_DATE(), {days_lower_bound}, "DAY")
AND timestamp <= DATE_ADD(CURRENT_DATE(), {days_upper_bound}, "DAY")
AND NOT REGEXP_MATCH(job_name, '.*portability.*')
AND result != 'PASSED' AND result != 'SKIPPED'
ORDER BY timestamp desc
""".format(
days_lower_bound=days_lower_bound, days_upper_bound=days_upper_bound)
if limit:
query += '\n LIMIT {}'.format(limit)
query_job = big_query_utils.sync_query_job(bq, 'grpc-testing', query)
page = bq.jobs().getQueryResults(
pageToken=None, **query_job['jobReference']).execute(num_retries=3)
rows = page.get('rows')
if rows:
return {
row['f'][0]['v']:
(row['f'][1]['v'], row['f'][2]['v'], row['f'][3]['v'])
for row in rows
}
else:
return {}
def get_new_flakes():
last_week_sans_yesterday = get_flaky_tests(-14, -1)
last_24 = get_flaky_tests(0, +1)
last_week_sans_yesterday_names = set(last_week_sans_yesterday.keys())
last_24_names = set(last_24.keys())
logging.debug('|last_week_sans_yesterday| =',
len(last_week_sans_yesterday_names))
logging.debug('|last_24_names| =', len(last_24_names))
new_flakes = last_24_names - last_week_sans_yesterday_names
logging.debug('|new_flakes| = ', len(new_flakes))
return {k: last_24[k] for k in new_flakes}
def main():
new_flakes = get_new_flakes()
if new_flakes:
print("Found {} new flakes:".format(len(new_flakes)))
print_table(new_flakes)
else:
print("No new flakes found!")
if __name__ == '__main__':
main()

@ -50,7 +50,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
--genrule_strategy=remote \
--experimental_strict_action_env=true \
--experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-fl@sha256:aa20628a902f06a11a015caa94b0432eb60690de2d2525bd046b9eea046f5d8a" }' \
--crosstool_top=@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \
--crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \
--define GRPC_PORT_ISOLATED_RUNTIME=1 \
-c dbg \
-- //test/...

@ -50,7 +50,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
--genrule_strategy=remote \
--experimental_strict_action_env=true \
--experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-fl@sha256:aa20628a902f06a11a015caa94b0432eb60690de2d2525bd046b9eea046f5d8a" }' \
--crosstool_top=@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \
--crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \
--define GRPC_PORT_ISOLATED_RUNTIME=1 \
-c opt \
-- //test/...

@ -101,7 +101,7 @@ LANG_RELEASE_MATRIX = {
'v1.7.4': None
},
{
'v1.8.1': None
'v1.8.2': None
},
],
'java': [

@ -254,8 +254,9 @@ def maybe_apply_patches_on_git_tag(stack_base, lang, release):
files_to_patch = []
for release_info in client_matrix.LANG_RELEASE_MATRIX[lang]:
if client_matrix.get_release_tag_name(release_info) == release:
files_to_patch = release_info[release].get('patch')
break
if release_info[release] is not None:
files_to_patch = release_info[release].get('patch')
break
if not files_to_patch:
return
patch_file_relative_path = 'patches/%s_%s/git_repo.patch' % (lang, release)

@ -48729,6 +48729,32 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1cq_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -48755,6 +48781,32 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1cq_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -48781,6 +48833,32 @@
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_1cq_secure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -49617,6 +49695,32 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1cq_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -49643,6 +49747,32 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -49669,6 +49799,32 @@
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure",
"timeout_seconds": 120
},
{
"args": [
"--scenarios_json",
@ -50557,6 +50713,32 @@
"shortname": "qps_json_driver:inproc_cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "qps_json_driver",
"platforms": [
"linux"
],
"shortname": "qps_json_driver:inproc_cpp_generic_async_streaming_qps_unconstrained_1cq_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
@ -50583,6 +50765,32 @@
"shortname": "qps_json_driver:inproc_cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "qps_json_driver",
"platforms": [
"linux"
],
"shortname": "qps_json_driver:inproc_cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
@ -50609,6 +50817,32 @@
"shortname": "qps_json_driver:inproc_cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"tsan",
"asan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "qps_json_driver",
"platforms": [
"linux"
],
"shortname": "qps_json_driver:inproc_cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure",
"timeout_seconds": 360
},
{
"args": [
"--run_inproc",
@ -51406,6 +51640,45 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1cq_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
@ -51445,6 +51718,45 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1cq_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
@ -51484,6 +51796,45 @@
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_1cq_secure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
@ -52736,6 +53087,45 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_64KBmsg_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"server_type\": \"ASYNC_GENERIC_SERVER\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"security_params\": null, \"threads_per_cq\": 1000000}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_1cq_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
@ -52775,6 +53165,45 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"STREAMING\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_1cq_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
@ -52814,6 +53243,45 @@
"shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"security_params\": null, \"threads_per_cq\": 1000000, \"server_type\": \"ASYNC_SERVER\"}, \"num_clients\": 0, \"client_config\": {\"security_params\": null, \"channel_args\": [{\"str_value\": \"throughput\", \"name\": \"grpc.optimization_target\"}], \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 13, \"rpc_type\": \"UNARY\", \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"threads_per_cq\": 1000000, \"load_params\": {\"closed_loop\": {}}, \"client_type\": \"ASYNC_CLIENT\", \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}}]}"
],
"auto_timeout_scaling": false,
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": "capacity",
"defaults": "boringssl",
"exclude_configs": [
"asan-noleaks",
"asan-trace-cmp",
"basicprof",
"c++-compat",
"counters",
"dbg",
"gcov",
"helgrind",
"lto",
"memcheck",
"msan",
"mutrace",
"opt",
"stapprof",
"ubsan"
],
"excluded_poll_engines": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_1cq_insecure_low_thread_count",
"timeout_seconds": 600
},
{
"args": [
"--scenarios_json",

@ -365,16 +365,17 @@ class CXXLanguage:
minimal_stack=not secure,
categories=smoketest_categories + [SCALABLE])
# TODO(https://github.com/grpc/grpc/issues/11500) Re-enable this test
#yield _ping_pong_scenario(
# 'cpp_generic_async_streaming_qps_unconstrained_1cq_%s' % secstr,
# rpc_type='STREAMING',
# client_type='ASYNC_CLIENT',
# server_type='ASYNC_GENERIC_SERVER',
# unconstrained_client='async-limited', use_generic_payload=True,
# secure=secure,
# client_threads_per_cq=1000000, server_threads_per_cq=1000000,
# categories=smoketest_categories+[SCALABLE])
yield _ping_pong_scenario(
'cpp_generic_async_streaming_qps_unconstrained_1cq_%s' % secstr,
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_GENERIC_SERVER',
unconstrained_client='async-limited',
use_generic_payload=True,
secure=secure,
client_threads_per_cq=1000000,
server_threads_per_cq=1000000,
categories=smoketest_categories + [SCALABLE])
yield _ping_pong_scenario(
'cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_%s'
@ -389,15 +390,17 @@ class CXXLanguage:
server_threads_per_cq=2,
categories=smoketest_categories + [SCALABLE])
#yield _ping_pong_scenario(
# 'cpp_protobuf_async_streaming_qps_unconstrained_1cq_%s' % secstr,
# rpc_type='STREAMING',
# client_type='ASYNC_CLIENT',
# server_type='ASYNC_SERVER',
# unconstrained_client='async-limited',
# secure=secure,
# client_threads_per_cq=1000000, server_threads_per_cq=1000000,
# categories=smoketest_categories+[SCALABLE])
yield _ping_pong_scenario(
'cpp_protobuf_async_streaming_qps_unconstrained_1cq_%s' %
secstr,
rpc_type='STREAMING',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async-limited',
secure=secure,
client_threads_per_cq=1000000,
server_threads_per_cq=1000000,
categories=smoketest_categories + [SCALABLE])
yield _ping_pong_scenario(
'cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_%s'
@ -411,15 +414,16 @@ class CXXLanguage:
server_threads_per_cq=2,
categories=smoketest_categories + [SCALABLE])
#yield _ping_pong_scenario(
# 'cpp_protobuf_async_unary_qps_unconstrained_1cq_%s' % secstr,
# rpc_type='UNARY',
# client_type='ASYNC_CLIENT',
# server_type='ASYNC_SERVER',
# unconstrained_client='async-limited',
# secure=secure,
# client_threads_per_cq=1000000, server_threads_per_cq=1000000,
# categories=smoketest_categories+[SCALABLE])
yield _ping_pong_scenario(
'cpp_protobuf_async_unary_qps_unconstrained_1cq_%s' % secstr,
rpc_type='UNARY',
client_type='ASYNC_CLIENT',
server_type='ASYNC_SERVER',
unconstrained_client='async-limited',
secure=secure,
client_threads_per_cq=1000000,
server_threads_per_cq=1000000,
categories=smoketest_categories + [SCALABLE])
yield _ping_pong_scenario(
'cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_%s' %

@ -34,21 +34,76 @@ git_submodule_hashes = {
for s in git_submodules
}
# Parse git hashes from Bazel WORKSPACE {new_}http_archive rules
with open('WORKSPACE', 'r') as f:
workspace_rules = [expr.value for expr in ast.parse(f.read()).body]
_BAZEL_TOOLCHAINS_DEP_NAME = 'com_github_bazelbuild_bazeltoolchains'
http_archive_rules = [
rule for rule in workspace_rules if rule.func.id.endswith('http_archive')
]
archive_urls = [
kw.value.s for rule in http_archive_rules for kw in rule.keywords
if kw.arg == 'url'
_GRPC_DEP_NAMES = [
'boringssl',
'com_github_madler_zlib',
'com_google_protobuf',
'com_github_google_googletest',
'com_github_gflags_gflags',
'com_github_google_benchmark',
'com_github_cares_cares',
'com_google_absl',
_BAZEL_TOOLCHAINS_DEP_NAME,
]
class BazelEvalState(object):
def __init__(self, names_and_urls, overridden_name=None):
self.names_and_urls = names_and_urls
self.overridden_name = overridden_name
def http_archive(self, **args):
self.archive(**args)
def new_http_archive(self, **args):
self.archive(**args)
def bind(self, **args):
pass
def existing_rules(self):
if self.overridden_name:
return [self.overridden_name]
return []
def archive(self, **args):
if args['name'] == _BAZEL_TOOLCHAINS_DEP_NAME:
self.names_and_urls[args['name']] = 'dont care'
return
self.names_and_urls[args['name']] = args['url']
# Parse git hashes from bazel/grpc_deps.bzl {new_}http_archive rules
with open(os.path.join('bazel', 'grpc_deps.bzl'), 'r') as f:
names_and_urls = {}
eval_state = BazelEvalState(names_and_urls)
bazel_file = f.read()
# grpc_deps.bzl only defines 'grpc_deps', add this to call it
bazel_file += '\ngrpc_deps()\n'
build_rules = {
'native': eval_state,
}
exec bazel_file in build_rules
for name in _GRPC_DEP_NAMES:
assert name in names_and_urls.keys()
assert len(_GRPC_DEP_NAMES) == len(names_and_urls.keys())
# bazeltoolschains is an exception to this sanity check,
# we don't require that there is a corresponding git module.
names_without_bazeltoolchains = names_and_urls.keys()
names_without_bazeltoolchains.remove(_BAZEL_TOOLCHAINS_DEP_NAME)
archive_urls = [names_and_urls[name] for name in names_without_bazeltoolchains]
workspace_git_hashes = {
re.search(git_hash_pattern, url).group()
for url in archive_urls
}
if len(workspace_git_hashes) == 0:
print("(Likely) parse error, did not find any bazel git dependencies.")
sys.exit(1)
# Validate the equivalence of the git submodules and Bazel git dependencies. The
# condition we impose is that there is a git submodule for every dependency in
@ -60,4 +115,15 @@ if len(workspace_git_hashes - git_submodule_hashes) > 0:
)
sys.exit(1)
# Also check that we can override each dependency
for name in _GRPC_DEP_NAMES:
names_and_urls_with_overridden_name = {}
state = BazelEvalState(
names_and_urls_with_overridden_name, overridden_name=name)
rules = {
'native': state,
}
exec bazel_file in rules
assert name not in names_and_urls_with_overridden_name.keys()
sys.exit(0)

Loading…
Cancel
Save