aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-18 09:54:51 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-18 09:54:51 -0700
commit50d6f7b60faf25678b33561b0348a4dd75fe97b0 (patch)
tree3699d952bc7697b8dc68385a01a2c0c8fd5c38f2
parent20afa3d7c933207c548ed11928c47b552b5b2f80 (diff)
parent1a62ec83b7af9c4437164d10fa23197c64542382 (diff)
Merge github.com:grpc/grpc into buffer_pools_for_realsies
-rw-r--r--examples/python/helloworld/run_codegen.py42
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.c1
-rwxr-xr-xtools/gce/create_linux_performance_worker.sh3
-rwxr-xr-xtools/gce/linux_performance_worker_init.sh22
-rwxr-xr-xtools/jenkins/run_sweep_performance.sh5
-rwxr-xr-xtools/run_tests/performance/build_performance.sh3
-rwxr-xr-xtools/run_tests/performance/kill_workers.sh1
-rwxr-xr-xtools/run_tests/performance/run_worker_csharp.sh4
8 files changed, 29 insertions, 52 deletions
diff --git a/examples/python/helloworld/run_codegen.py b/examples/python/helloworld/run_codegen.py
deleted file mode 100644
index 4835ec2b4d..0000000000
--- a/examples/python/helloworld/run_codegen.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Runs protoc with the gRPC plugin to generate messages and gRPC stubs."""
-
-from grpc.tools import protoc
-
-protoc.main(
- (
- '',
- '-I../../protos',
- '--python_out=.',
- '--grpc_python_out=.',
- '../../protos/helloworld.proto',
- )
-)
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
index 612852cb16..b2fdf88a87 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c
@@ -1447,6 +1447,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx,
}
if (due_to_error != GRPC_ERROR_NONE && !s->seen_error) {
s->seen_error = true;
+ grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s);
}
grpc_chttp2_mark_stream_closed(exec_ctx, t, s, 1, 1, due_to_error);
}
diff --git a/tools/gce/create_linux_performance_worker.sh b/tools/gce/create_linux_performance_worker.sh
index c9a0ffa4e1..2c8cf0b96b 100755
--- a/tools/gce/create_linux_performance_worker.sh
+++ b/tools/gce/create_linux_performance_worker.sh
@@ -48,7 +48,8 @@ gcloud compute instances create $INSTANCE_NAME \
--project="$CLOUD_PROJECT" \
--zone "$ZONE" \
--machine-type $MACHINE_TYPE \
- --image ubuntu-15-10 \
+ --image-project ubuntu-os-cloud \
+ --image-family ubuntu-1604-lts \
--boot-disk-size 300 \
--scopes https://www.googleapis.com/auth/bigquery
diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh
index 487672549f..523749ee81 100755
--- a/tools/gce/linux_performance_worker_init.sh
+++ b/tools/gce/linux_performance_worker_init.sh
@@ -90,6 +90,16 @@ sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang
# Python dependencies
sudo pip install tabulate
sudo pip install google-api-python-client
+sudo pip install virtualenv
+
+# TODO(jtattermusch): For some reason, building gRPC Python depends on python3.4
+# being installed, but python3.4 is not available on Ubuntu 16.04.
+# Temporarily fixing this by adding a PPA with python3.4, but we should
+# really remove this hack once possible.
+sudo add-apt-repository -y ppa:fkrull/deadsnakes
+sudo apt-get update
+sudo apt-get install -y python3.4 python3.4-dev
+python3.4 -m pip install virtualenv
curl -O https://bootstrap.pypa.io/get-pip.py
sudo pypy get-pip.py
@@ -105,17 +115,17 @@ nvm install 4 && npm config set cache /tmp/npm-cache
nvm install 5 && npm config set cache /tmp/npm-cache
nvm alias default 4
-# C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives)
-
+# C# mono dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives)
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install -y mono-devel nuget
-# The version of nuget that is installed using apt-get is too old to download
-# the System.Interactive.Async.3.0.0 C# dependency. Update to the latest version
-# in order to be able download it.
-sudo nuget update -self
+# C# .NET Core dependencies (https://www.microsoft.com/net/core#ubuntu)
+sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
+sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
+sudo apt-get update
+sudo apt-get install -y dotnet-dev-1.0.0-preview2-003131
# Ruby dependencies
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
diff --git a/tools/jenkins/run_sweep_performance.sh b/tools/jenkins/run_sweep_performance.sh
index 6cd7a9129b..3b22e25a45 100755
--- a/tools/jenkins/run_sweep_performance.sh
+++ b/tools/jenkins/run_sweep_performance.sh
@@ -31,6 +31,9 @@
# This script is invoked by Jenkins and runs full performance test suite.
set -ex
+SERVER_HOST=${1:-grpc-performance-server-32core}
+CLIENT_HOST1=${2:-grpc-performance-client-32core}
+CLIENT_HOST2=${3:-grpc-performance-client2-32core}
# Enter the gRPC repo root
cd $(dirname $0)/../..
@@ -39,7 +42,7 @@ tools/run_tests/run_performance_tests.py \
-l c++ \
--category sweep \
--bq_result_table performance_test.performance_experiment_32core \
- --remote_worker_host grpc-performance-server-32core grpc-performance-client-32core grpc-performance-client2-32core \
+ --remote_worker_host ${SERVER_HOST} ${CLIENT_HOST1} ${CLIENT_HOST2} \
|| EXIT_CODE=1
exit $EXIT_CODE
diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh
index 352c679757..e981cae76b 100755
--- a/tools/run_tests/performance/build_performance.sh
+++ b/tools/run_tests/performance/build_performance.sh
@@ -54,6 +54,9 @@ do
"go")
tools/run_tests/performance/build_performance_go.sh
;;
+ "csharp")
+ tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 --compiler coreclr
+ ;;
*)
tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8
;;
diff --git a/tools/run_tests/performance/kill_workers.sh b/tools/run_tests/performance/kill_workers.sh
index 279cc7df29..6e33efad4c 100755
--- a/tools/run_tests/performance/kill_workers.sh
+++ b/tools/run_tests/performance/kill_workers.sh
@@ -40,6 +40,7 @@ killall -9 qps_worker || true
# C#
ps -C mono -o pid=,cmd= | grep QpsWorker | awk '{print $1}' | xargs kill -9 || true
+ps -C dotnet -o pid=,cmd= | grep QpsWorker | awk '{print $1}' | xargs kill -9 || true
# Ruby
ps -C ruby -o pid=,cmd= | grep 'qps/worker.rb' | awk '{print $1}' | xargs kill -9 || true
diff --git a/tools/run_tests/performance/run_worker_csharp.sh b/tools/run_tests/performance/run_worker_csharp.sh
index b91df09b42..b4c5ec288f 100755
--- a/tools/run_tests/performance/run_worker_csharp.sh
+++ b/tools/run_tests/performance/run_worker_csharp.sh
@@ -33,6 +33,6 @@ set -ex
cd $(dirname $0)/../../..
# needed to correctly locate testca
-cd src/csharp/Grpc.IntegrationTesting.QpsWorker/bin/Release
+cd src/csharp/Grpc.IntegrationTesting.QpsWorker/bin/Release/netcoreapp1.0
-mono Grpc.IntegrationTesting.QpsWorker.exe $@
+dotnet exec Grpc.IntegrationTesting.QpsWorker.dll $@