From 11a2e451e50ce0fcb575ca805a99d7980c115c18 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Mon, 22 Dec 2025 16:33:01 -0800 Subject: [PATCH] ci: Reduce pytest reruns from 10 to 4 to improve CI stability and resource usage While reruns are useful for mitigating flaky tests, a high rerun count significantly increases execution time for long-running integration tests (e.g. regtest / Docker-based setups). In the worst case, a single flaky test can run for nearly an hour, increasing the risk of GitHub Actions runner timeouts and unnecessary resource consumption. Reducing the reruns to 4 provides a better balance by: - Limiting excessive re-execution of long-running tests - Reducing overall CI runtime and runner usage - Surfacing persistent or systemic issues earlier, rather than masking them with repeated retries If a test consistently requires more than a few reruns to pass, it is likely indicative of a real issue rather than transient flakiness. --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea79a16d9639..c89832810819 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,13 +16,13 @@ env: RUST_PROFILE: release SLOW_MACHINE: 1 CI_SERVER_URL: "http://35.239.136.52:3170" - PYTEST_OPTS_BASE: "--reruns=10 -vvv --junit-xml=report.xml --timeout=1800 --durations=10" + PYTEST_OPTS_BASE: "--reruns=4 -vvv --junit-xml=report.xml --timeout=1800 --durations=10" jobs: prebuild: name: Pre-build checks runs-on: ubuntu-24.04 - timeout-minutes: 120 + timeout-minutes: 60 if: | github.event.action != 'edited' || contains(github.event.pull_request.body, 'Changelog')