Skip to content

fix(ci): pr_test_summary reports '0 passed' when all test jobs are skipped #1617

Description

@ramakrishnap-nv

Problem

When a PR only touches files that don't trigger any test jobs (e.g. pure C++ changes where Python/wheel/server jobs are skipped), the CI Test Summary bot comment reads:

✅ All 0 test job(s) passed.

This is misleading — no tests ran, but the message implies a clean pass.

Root Cause

In `ci/utils/pr_test_summary.py`, `_build_body()` has three branches:

  • `failed` → show failures
  • `cancelled` → show passed/skipped/cancelled counts
  • `else` → `"✅ All {len(passed)} test job(s) passed."`

When all test jobs are skipped (`passed=[]`, `skipped=[N jobs]`, `failed=[]`, `cancelled=[]`), it falls into the `else` branch and emits `"✅ All 0 test job(s) passed."`

Fix

Add an explicit branch for the all-skipped case:

```python
elif not passed:
lines.append(f"⏭️ All {len(skipped)} test job(s) skipped.")
else:
msg = f"✅ All {len(passed)} test job(s) passed."
if skipped:
msg += f" ({len(skipped)} skipped)"
lines.append(msg)
```

The fix was committed directly to `main` (commit `8973c65d`) — this should have gone through a PR. A follow-up PR should be opened to formally track the change and ensure it goes through review.

Follow-up

  • Open a PR against `main` with the fix from commit `8973c65d`
  • Verify the bot comment updates correctly on the next PR run where all jobs are skipped

Metadata

Metadata

Labels

awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions