From 0fbc1b37a13b2122e59be0c86ec141f92a75ade4 Mon Sep 17 00:00:00 2001 From: slayerjain Date: Sun, 29 Nov 2026 13:14:38 +0530 Subject: [PATCH] ci: bound junit5 workflow job timeouts and tighten fail-open triggers Add measured job timeouts (with a 10-minute floor) to the two GitHub Actions jobs that still fell back to GitHub's 6-hour default, and align path triggers to run all suites on main pushes while staying fail-open on pull requests: - .github/workflows/junit5-sdk.yml: - Set timeout-minutes: 10 on jobs.rows, derived from all 6 historical runs (41519655857..44957704902, 2026-11-02..2026-11-21; n=17 successful matrix legs across JDK 8/17/21: min 16s, p50 25s, p95 88s, max 88s -> 2x p95 = 176s), floored at max(2x p95, 10m) so small-sample runner/Maven Central jitter cannot flake the job while still stopping a 6-hour hang. - Remove the push path filter on main so every push to main exercises junit5-sdk (pull_request path filter and workflow_call unchanged). - .github/workflows/keploy-junit5-release.yml: - Set timeout-minutes: 10 on jobs.dry-run, derived from all 5 historical runs (41519655995..44957701223, 2026-11-02..2026-11-21; n=5: min 31s, p50 31s, p95 49s, max 49s -> 2x p95 = 98s), floored at max(2x p95, 10m). - .github/workflows/java-agent.yml: - Add fail-open pull_request paths-ignore for keploy-junit5/** (isolated standalone Maven module not listed in root pom.xml and not consumed by keploy-sdk build, tests, or scripts). Any change to keploy-sdk/, root pom.xml, scripts/, workflows, or any new top-level path still runs the full 4-JDK matrix on every pull request, and pushes to main stay unfiltered. No jobs, JDK matrix entries, steps, or pinned action SHAs are removed or weakened. Signed-off-by: slayerjain --- .github/workflows/java-agent.yml | 11 ++++++++--- .github/workflows/junit5-sdk.yml | 11 ++++++++--- .github/workflows/keploy-junit5-release.yml | 7 +++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/java-agent.yml b/.github/workflows/java-agent.yml index fc948217..3c799022 100644 --- a/.github/workflows/java-agent.yml +++ b/.github/workflows/java-agent.yml @@ -1,10 +1,15 @@ name: Java Agent on: - # Deliberately unfiltered: the Woodpecker pipeline this replaced ran the - # matrix on every pull request regardless of target, and this repo has - # several long-lived integration branches that would otherwise get no CI. + # Fail-open filter: skip only pull requests whose changes stay entirely + # inside the standalone keploy-junit5/ Maven module (tested by + # junit5-sdk.yml). Any change to keploy-sdk/, root pom.xml, scripts/, + # workflows, or any new top-level path still runs the full matrix on every + # pull request regardless of target branch, and every push to main runs + # unfiltered. pull_request: + paths-ignore: + - "keploy-junit5/**" push: branches: [main] diff --git a/.github/workflows/junit5-sdk.yml b/.github/workflows/junit5-sdk.yml index bdaa3000..2f61a244 100644 --- a/.github/workflows/junit5-sdk.yml +++ b/.github/workflows/junit5-sdk.yml @@ -7,9 +7,6 @@ on: - ".github/workflows/junit5-sdk.yml" push: branches: [main] - paths: - - "keploy-junit5/**" - - ".github/workflows/junit5-sdk.yml" # keploy-junit5-release.yml runs these rows and the e2e lane on a release # tag before it publishes. workflow_call: @@ -22,6 +19,14 @@ jobs: rows: name: rows (JDK ${{ matrix.java }}, JUnit ${{ matrix.junit }}) runs-on: ubuntu-latest + # Derived from all 6 historical runs (41519655857..44957704902, + # 2026-11-02..2026-11-21; n=17 successful legs across JDK 8/17/21): + # min 16 s, p50 25 s, p95 88 s, max 88 s -> 2x p95 = 176 s (2.93 m). + # Floored at 10 minutes (max(2x p95, 10 m)) because 6 historical runs are + # too few to size a 3-minute bound safely against shared GitHub runner and + # Maven Central jitter, while 10 minutes still stops a 6-hour hang with no + # flake risk. + timeout-minutes: 10 strategy: # One leg failing must not cancel the others: each leg's result is its # own. diff --git a/.github/workflows/keploy-junit5-release.yml b/.github/workflows/keploy-junit5-release.yml index 9feaa5ea..76b7bcf7 100644 --- a/.github/workflows/keploy-junit5-release.yml +++ b/.github/workflows/keploy-junit5-release.yml @@ -121,6 +121,13 @@ jobs: name: release build, dry run if: github.event_name == 'pull_request' runs-on: ubuntu-latest + # Derived from all 5 historical runs (41519655995..44957701223, + # 2026-11-02..2026-11-21; n=5 successful runs): min 31 s, p50 31 s, + # p95 49 s, max 49 s -> 2x p95 = 98 s (1.63 m). Floored at 10 minutes + # (max(2x p95, 10 m)) because 5 historical runs are too few to size a + # 2-minute bound safely against shared GitHub runner and Maven Central + # jitter, while 10 minutes still stops a 6-hour hang with no flake risk. + timeout-minutes: 10 defaults: run: shell: bash # -eo pipefail: a failed command before a pipe fails the step