Skip to content

ci: fail topotest step when parallel run lacks JUnit failures - #22011

Merged
mjstapp merged 1 commit into
FRRouting:masterfrom
Jafaral:github-ci-failure
May 21, 2026
Merged

ci: fail topotest step when parallel run lacks JUnit failures#22011
mjstapp merged 1 commit into
FRRouting:masterfrom
Jafaral:github-ci-failure

Conversation

@Jafaral

@Jafaral Jafaral commented May 21, 2026

Copy link
Copy Markdown
Member

When the parallel pytest run exits non-zero but analyze.py finds no failures in topotests.xml, fail the step instead of treating it as a pass.

When the parallel pytest run exits non-zero but analyze.py finds no
failures in topotests.xml, fail the step instead of treating it as a pass.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
@greptile-apps

greptile-apps Bot commented May 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes a CI false-positive where a non-zero exit from the parallel pytest Docker run was silently treated as success when analyze.py found no failures in topotests.xml. The two-line change converts that silent pass into an explicit failure with a diagnostic error message.

  • The code path is only reachable after docker run has already exited non-zero (line 292 would have exited 0 on success), so the new exit 1 correctly surfaces infrastructure or setup failures that left topotests.xml without failure entries.
  • All always()-gated downstream steps (Gather results, Upload test results, Cleanup) still run after the new exit 1, so artifact uploads and container cleanup are unaffected.

Confidence Score: 5/5

Safe to merge β€” the change is a minimal, targeted two-line fix with no logic regressions.

The change closes a clear gap in the failure-detection path: the parallel run had already exited non-zero, yet the step could report success when topotests.xml contained no recorded failures. The fix is well-scoped, all downstream always()-gated steps (artifact upload, cleanup) continue to run as before, and there are no new code paths introduced.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/github-ci.yml Two-line fix: when the parallel pytest run fails but analyze.py reports no JUnit failures, the step now exits 1 (fail) instead of 0 (pass), correctly surfacing infrastructure-level or setup failures that weren't captured as test failures in topotests.xml.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[docker run parallel pytest] -->|exit 0| B[All tests passed β†’ exit 0]
    A -->|exit non-zero| C[analyze.py -Ar: grab results from container]
    C -->|no results dir| D[ERROR: no test results β†’ exit 1]
    C -->|no topotests.xml| E[ERROR: no XML, docker aborted β†’ exit 1]
    C -->|results grabbed| F[analyze.py -r: extract failed test names]
    F -->|rerun_tests is empty| G_new["(NEW) ERROR: no failures in XML β†’ exit 1 βœ…"]
    F -->|rerun_tests non-empty| H[Re-run failed tests serially]
    H -->|exit 0| I[All rerun tests passed β†’ exit 0]
    H -->|exit non-zero| J[Some rerun tests still failed β†’ exit 1]
Loading

Reviews (1): Last reviewed commit: "ci: fail topotest step when parallel run..." | Re-trigger Greptile

@mjstapp
mjstapp merged commit c9a58cf into FRRouting:master May 21, 2026
25 checks passed
@Jafaral
Jafaral deleted the github-ci-failure branch May 21, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants