diff --git a/scripts/get-job-matrix.py b/scripts/get-job-matrix.py index f4deb70f98dc..7424f19cb93f 100755 --- a/scripts/get-job-matrix.py +++ b/scripts/get-job-matrix.py @@ -99,19 +99,19 @@ class MakefileTest(TypedDict): eta: int MAKEFILE_INTEGRATION_TESTS: List[MakefileTest] = [ - {"name": "sdk/nodejs test_auto", "run": "cd sdk/nodejs && ../../scripts/retry make test_auto", "eta": 3}, - {"name": "sdk/nodejs unit_tests", "run": "cd sdk/nodejs && ../../scripts/retry make unit_tests", "eta": 4}, - {"name": "sdk/nodejs test_integration", "run": "cd sdk/nodejs && ../../scripts/retry make test_integration", "eta": 3}, - {"name": "sdk/python test_auto", "run": "cd sdk/python && ../../scripts/retry make test_auto", "eta": 6}, - {"name": "sdk/python test_fast", "run": "cd sdk/python && ../../scripts/retry make test_fast", "eta": 3}, + {"name": "sdk/nodejs test_auto", "run": "cd sdk/nodejs && make test_auto", "eta": 3}, + {"name": "sdk/nodejs unit_tests", "run": "cd sdk/nodejs && make unit_tests", "eta": 4}, + {"name": "sdk/nodejs test_integration", "run": "cd sdk/nodejs && make test_integration", "eta": 3}, + {"name": "sdk/python test_auto", "run": "cd sdk/python && make test_auto", "eta": 6}, + {"name": "sdk/python test_fast", "run": "cd sdk/python && make test_fast", "eta": 3}, ] MAKEFILE_ACCEPTANCE_TESTS: List[MakefileTest] = [ - {"name": "sdk/nodejs test_integration", "run": "cd sdk/nodejs && ../../scripts/retry make test_integration", "eta": 3}, + {"name": "sdk/nodejs test_integration", "run": "cd sdk/nodejs && make test_integration", "eta": 3}, ] MAKEFILE_UNIT_TESTS: List[MakefileTest] = [ - {"name": "sdk/nodejs sxs_tests", "run": "cd sdk/nodejs && ../../scripts/retry make sxs_tests", "eta": 3}, + {"name": "sdk/nodejs sxs_tests", "run": "cd sdk/nodejs && make sxs_tests", "eta": 3}, ] ALL_PLATFORMS = ["ubuntu-latest", "windows-latest", "macos-latest"] @@ -241,7 +241,7 @@ def run_gotestsum_ci_matrix_packages(go_packages: List[str], partition_module: P pkgs = " ".join(go_packages) return [{ "name": f"{partition_module.module_dir}", - "command": f'GO_TEST_TAGS="{" ".join(tags)}" PKGS="{pkgs}" ./scripts/retry make gotestsum/{partition_module.module_dir}' + "command": f'GO_TEST_TAGS="{" ".join(tags)}" PKGS="{pkgs}" make gotestsum/{partition_module.module_dir}' }] gotestsum_matrix_args = [ @@ -279,7 +279,7 @@ def run_gotestsum_ci_matrix_packages(go_packages: List[str], partition_module: P for idx, include in enumerate(matrix_jobs): idx_str = f"{idx+1}".zfill(buckets_len) - test_command = f'GO_TEST_TAGS="{" ".join(tags)}" PKGS="{include["packages"]}" ./scripts/retry make gotestsum/{partition_module.module_dir}' + test_command = f'GO_TEST_TAGS="{" ".join(tags)}" PKGS="{include["packages"]}" make gotestsum/{partition_module.module_dir}' if global_verbosity >= 1: print(test_command, file=sys.stderr) test_suites.append( @@ -351,7 +351,7 @@ def run_gotestsum_ci_matrix_single_package( env=f'PKGS="{include["packages"]}" OPTS="{test_list}"' env=f'GO_TEST_TAGS="{" ".join(tags)}" PKGS="{include["packages"]}" OPTS="{test_list}"' - test_command = f'{env} ./scripts/retry make gotestsum/{partition_pkg.package_dir}' + test_command = f'{env} make gotestsum/{partition_pkg.package_dir}' if global_verbosity >= 1: print(test_command, file=sys.stderr) diff --git a/scripts/retry b/scripts/retry deleted file mode 100755 index 73fd536d669d..000000000000 --- a/scripts/retry +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# This script implements a general retry mechanism for a command. On each iteration, parallelism -# flags are halved and the command is retried. - -retries="${PULUMI_TEST_RETRIES:-"0"}" -attempts=1 -success=false -retried=false - -run_tests() { - export GO_TEST_PARALLELISM="${GO_TEST_PARALLELISM:-"8"}" - export GO_TEST_PKG_PARALLELISM="${GO_TEST_PKG_PARALLELISM:-"2"}" - # TODO: https://github.com/pulumi/pulumi/issues/10699 - # Enable running tests with -shuffle on. - export GO_TEST_SHUFFLE=${GO_TEST_SHUFFLE:-"off"} - - echo "COMMAND = " "${@}" - - until "${@}"; do - retried=true - if [ "${attempts}" -gt "${retries}" ]; then - echo "::warning Failed after ${attempts} attempts" - return - else - echo "::warning Retrying command" - fi - attempts=$((attempts + 1)) - - export GO_TEST_PARALLELISM=$((GO_TEST_PARALLELISM <= 2 ? 1 : GO_TEST_PARALLELISM / 2)) - export GO_TEST_PKG_PARALLELISM=$((GO_TEST_PKG_PARALLELISM <= 2 ? 1 : GO_TEST_PKG_PARALLELISM / 2)) - export GO_TEST_SHUFFLE="off" - done - - success=true - echo "::info Tests successful.. failures refer to test flakes that were successfully re-run." -} - -run_tests "${@}" - -echo "TEST_SUCCESS=${success}" >> "$GITHUB_OUTPUT" -echo "TEST_RETRIED=${retried}" >> "$GITHUB_OUTPUT" - -if ! "${success}"; then - exit 1 -fi