Address feedback on performance tests continuous runs. (#26232)

pull/26238/head
Paulo Castello da Costa 4 years ago committed by GitHub
parent a543f77886
commit 7e14d23ab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 47
      tools/internal_ci/linux/grpc_e2e_performance_v2.sh

@ -31,17 +31,24 @@ gcloud container clusters get-credentials benchmarks-prod \
# Set up environment variables. # Set up environment variables.
PREBUILT_IMAGE_PREFIX="gcr.io/grpc-testing/e2etesting/pre_built_workers/${KOKORO_BUILD_INITIATOR}" PREBUILT_IMAGE_PREFIX="gcr.io/grpc-testing/e2etesting/pre_built_workers/${KOKORO_BUILD_INITIATOR}"
UNIQUE_IDENTIFIER=$(date +%Y%m%d%H%M%S) UNIQUE_IDENTIFIER="$(date +%Y%m%d%H%M%S)"
ROOT_DIRECTORY_OF_DOCKERFILES="../test-infra/containers/pre_built_workers/" ROOT_DIRECTORY_OF_DOCKERFILES="../test-infra/containers/pre_built_workers/"
GRPC_CORE_GITREF="$(git ls-remote https://github.com/grpc/grpc.git master | cut -c1-7)" # Prebuilt workers for core languages are always built from grpc/grpc.
GRPC_GO_GITREF="$(git ls-remote https://github.com/grpc/grpc-go.git master | cut -c1-7)" if [[ "${KOKORO_GITHUB_COMMIT_URL%/*}" == "https://github.com/grpc/grpc/commit" ]]; then
GRPC_JAVA_GITREF="$(git ls-remote https://github.com/grpc/grpc-java.git master | cut -c1-7)" GRPC_CORE_GITREF="${KOKORO_GIT_COMMIT}"
else
GRPC_CORE_GITREF="$(git ls-remote https://github.com/grpc/grpc.git master | cut -f1)"
fi
GRPC_GO_GITREF="$(git ls-remote https://github.com/grpc/grpc-go.git master | cut -f1)"
GRPC_JAVA_GITREF="$(git ls-remote https://github.com/grpc/grpc-java.git master | cut -f1)"
# Clone test-infra repository to one upper level directory than grpc. # Clone test-infra repository to one upper level directory than grpc.
pushd .. pushd ..
git clone --recursive https://github.com/grpc/test-infra.git git clone --recursive https://github.com/grpc/test-infra.git
cd test-infra cd test-infra
go build -o bin/runner cmd/runner/main.go go build -o bin/runner cmd/runner/main.go
go build -o bin/prepare_prebuilt_workers tools/prepare_prebuilt_workers/prepare_prebuilt_workers.go
go build -o bin/delete_prebuilt_workers tools/delete_prebuilt_workers/delete_prebuilt_workers.go
popd popd
# Build test configurations. # Build test configurations.
@ -53,9 +60,9 @@ buildConfigs() {
-s client_pool="${pool}" -s server_pool="${pool}" \ -s client_pool="${pool}" -s server_pool="${pool}" \
-s big_query_table=e2e_benchmarks.experimental_results \ -s big_query_table=e2e_benchmarks.experimental_results \
-s timeout_seconds=900 \ -s timeout_seconds=900 \
-s prebuilt_image_prefix=$PREBUILT_IMAGE_PREFIX \ -s prebuilt_image_prefix="${PREBUILT_IMAGE_PREFIX}" \
-s prebuilt_image_tag=$UNIQUE_IDENTIFIER \ -s prebuilt_image_tag="${UNIQUE_IDENTIFIER}" \
--prefix=$KOKORO_BUILD_INITIATOR -u $UNIQUE_IDENTIFIER -u "${pool}" \ --prefix=$KOKORO_BUILD_INITIATOR -u "${UNIQUE_IDENTIFIER}" -u "${pool}" \
-a pool="${pool}" --category=scalable \ -a pool="${pool}" --category=scalable \
--allow_client_language=c++ --allow_server_language=c++ \ --allow_client_language=c++ --allow_server_language=c++ \
-o "./loadtest_with_prebuilt_workers_${pool}.yaml" -o "./loadtest_with_prebuilt_workers_${pool}.yaml"
@ -68,23 +75,23 @@ buildConfigs workers-32core -l c++ -l csharp -l go -l java
# Delete prebuilt images on exit. # Delete prebuilt images on exit.
deleteImages() { deleteImages() {
echo "deleting images on exit" echo "deleting images on exit"
go run ../test-infra/tools/delete_prebuilt_workers/delete_prebuilt_workers.go \ ../test-infra/bin/delete_prebuilt_workers \
-p $PREBUILT_IMAGE_PREFIX \ -p "${PREBUILT_IMAGE_PREFIX}" \
-t $UNIQUE_IDENTIFIER -t "${UNIQUE_IDENTIFIER}"
} }
trap deleteImages EXIT trap deleteImages EXIT
# Build and push prebuilt images for running tests. # Build and push prebuilt images for running tests.
go run ../test-infra/tools/prepare_prebuilt_workers/prepare_prebuilt_workers.go \ ../test-infra/bin/prepare_prebuilt_workers \
-l cxx:$GRPC_CORE_GITREF \ -l "cxx:${GRPC_CORE_GITREF}" \
-l csharp:$GRPC_CORE_GITREF \ -l "csharp:${GRPC_CORE_GITREF}" \
-l go:$GRPC_GO_GITREF \ -l "go:${GRPC_GO_GITREF}" \
-l java:$GRPC_JAVA_GITREF \ -l "java:${GRPC_JAVA_GITREF}" \
-l python:$GRPC_CORE_GITREF \ -l "python:${GRPC_CORE_GITREF}" \
-l ruby:$GRPC_CORE_GITREF \ -l "ruby:${GRPC_CORE_GITREF}" \
-p $PREBUILT_IMAGE_PREFIX \ -p "${PREBUILT_IMAGE_PREFIX}" \
-t $UNIQUE_IDENTIFIER \ -t "${UNIQUE_IDENTIFIER}" \
-r $ROOT_DIRECTORY_OF_DOCKERFILES -r "${ROOT_DIRECTORY_OF_DOCKERFILES}"
# Run tests. # Run tests.
../test-infra/bin/runner \ ../test-infra/bin/runner \

Loading…
Cancel
Save