diff --git a/tools/internal_ci/linux/grpc_interop_matrix.cfg b/tools/internal_ci/linux/grpc_interop_matrix.cfg index 7178d83e2c5..ae59e930f77 100644 --- a/tools/internal_ci/linux/grpc_interop_matrix.cfg +++ b/tools/internal_ci/linux/grpc_interop_matrix.cfg @@ -16,6 +16,7 @@ # Location of the continuous shell script in repository. build_file: "grpc/tools/internal_ci/linux/grpc_interop_matrix.sh" +# grpc_interop tests can take 1 hours to complete. timeout_mins: 300 action { define_artifacts { @@ -23,8 +24,3 @@ action { regex: "github/grpc/reports/**" } } - -env_vars { - key: "RUN_TESTS_FLAGS" - value: "--language=all --release=all --allow_flakes --report_file=sponge_log.xml --bq_result_table interop_results" -} diff --git a/tools/internal_ci/linux/grpc_interop_matrix.sh b/tools/internal_ci/linux/grpc_interop_matrix.sh index fea365eeff5..4c24c434883 100755 --- a/tools/internal_ci/linux/grpc_interop_matrix.sh +++ b/tools/internal_ci/linux/grpc_interop_matrix.sh @@ -22,4 +22,4 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc -tools/interop_matrix/run_interop_matrix_tests.py $RUN_TESTS_FLAGS \ No newline at end of file +tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --allow_flakes --report_file=sponge_log.xml --bq_result_table interop_results $@ diff --git a/tools/internal_ci/linux/pull_request/grpc_interop_matrix_adhoc.cfg b/tools/internal_ci/linux/pull_request/grpc_interop_matrix_adhoc.cfg deleted file mode 100644 index 6726384f188..00000000000 --- a/tools/internal_ci/linux/pull_request/grpc_interop_matrix_adhoc.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2017 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. - -# Config file for the internal CI (in protobuf text format) - -# Location of the continuous shell script in repository. -build_file: "grpc/tools/internal_ci/linux/grpc_interop_matrix.sh" -timeout_mins: 300 -action { - define_artifacts { - regex: "**/sponge_log.xml" - regex: "github/grpc/reports/**" - } -} - -env_vars { - key: "RUN_TESTS_FLAGS" - value: "--language=all --release=all --allow_flakes --report_file=sponge_log.xml" -} diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index f887bd0fdd2..9d442346a70 100755 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -46,7 +46,6 @@ _RELEASES = sorted( for lang in client_matrix.LANG_RELEASE_MATRIX.values() for info in lang))) _TEST_TIMEOUT = 60 -_PULL_IMAGE_TIMEOUT_SECONDS = 10 * 60 argp = argparse.ArgumentParser(description='Run interop tests.') argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int) @@ -210,43 +209,17 @@ def find_test_cases(lang, runtime, release, suite_name): _xml_report_tree = report_utils.new_junit_xml_tree() -def pull_images_for_lang(lang, images): - """Pull all images for given lang from container registry.""" - jobset.message( - 'START', 'Downloading images for language "%s"' % lang, do_newline=True) - download_specs = [] - for release, image in images: - spec = jobset.JobSpec( - cmdline=['gcloud docker -- pull %s' % image], - shortname='pull_image_%s' % (image), - timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, - shell=True) - download_specs.append(spec) - num_failures, resultset = jobset.run( - download_specs, newline_on_success=True, maxjobs=args.jobs) - if num_failures: - jobset.message( - 'FAILED', 'Failed to download some images', do_newline=True) - return False - else: - jobset.message( - 'SUCCESS', 'All images downloaded successfully.', do_newline=True) - return True - - def run_tests_for_lang(lang, runtime, images): """Find and run all test cases for a language. images is a list of (, ) tuple. """ - # Fine to ignore return value as failure to download will result in test failure - # later anyway. - pull_images_for_lang(lang, images) - total_num_failures = 0 - for release, image in images: + for image_tuple in images: + release, image = image_tuple jobset.message('START', 'Testing %s' % image, do_newline=True) - + # Download the docker image before running each test case. + subprocess.check_call(['gcloud', 'docker', '--', 'pull', image]) suite_name = '%s__%s_%s' % (lang, runtime, release) job_spec_list = find_test_cases(lang, runtime, release, suite_name)