From e61b2a08b3b79e7d0165191606fadfdf10ead667 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Fri, 5 Apr 2024 12:54:47 +0100 Subject: [PATCH] CI: set pytest timeout for regression test suite --- .github/actions/run-python-test-set/action.yml | 9 +++++++++ .github/workflows/build_and_test.yml | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-python-test-set/action.yml b/.github/actions/run-python-test-set/action.yml index d9e543d4bb..a970ce988e 100644 --- a/.github/actions/run-python-test-set/action.yml +++ b/.github/actions/run-python-test-set/action.yml @@ -48,6 +48,10 @@ inputs: description: 'benchmark durations JSON' required: false default: '{}' + session_timeout: + description: 'Session timeout for the test suite' + required: false + default: '' runs: using: "composite" @@ -107,6 +111,7 @@ runs: ALLOW_FORWARD_COMPATIBILITY_BREAKAGE: contains(github.event.pull_request.labels.*.name, 'forward compatibility breakage') RERUN_FLAKY: ${{ inputs.rerun_flaky }} PG_VERSION: ${{ inputs.pg_version }} + SESSION_TIMEOUT: ${{ inputs.session_timeout }} shell: bash -euxo pipefail {0} run: | # PLATFORM will be embedded in the perf test report @@ -168,6 +173,10 @@ runs: EXTRA_PARAMS="--durations-path $TEST_OUTPUT/benchmark_durations.json $EXTRA_PARAMS" fi + if [ -n "${SESSION_TIMEOUT}" ]; then + EXTRA_PARAMS="--session-timeout ${SESSION_TIMEOUT} ${EXTRA_PARAMS}" + fi + if [[ "${{ inputs.build_type }}" == "debug" ]]; then cov_prefix=(scripts/coverage "--profraw-prefix=$GITHUB_JOB" --dir=/tmp/coverage run) elif [[ "${{ inputs.build_type }}" == "release" ]]; then diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 36922d5294..0180e1d244 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -461,7 +461,8 @@ jobs: - name: Pytest regression tests uses: ./.github/actions/run-python-test-set - timeout-minutes: 60 + # Hard timeout to prevent hanging tests, we also have set softer pytest timeout (set via `session_timeout`) which is shorter + timeout-minutes: 90 with: build_type: ${{ matrix.build_type }} test_selection: regress @@ -471,6 +472,7 @@ jobs: real_s3_region: eu-central-1 rerun_flaky: true pg_version: ${{ matrix.pg_version }} + session_timeout: '60' env: TEST_RESULT_CONNSTR: ${{ secrets.REGRESS_TEST_RESULT_CONNSTR_NEW }} CHECK_ONDISK_DATA_COMPATIBILITY: nonempty