Skip to content

Give each example lane its own Codecov flag - #2111

Merged
kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/codecov-per-lane-flags
Aug 7, 2026
Merged

Give each example lane its own Codecov flag#2111
kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/codecov-per-lane-flags

Conversation

@kevalmorabia97

@kevalmorabia97 kevalmorabia97 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: CI/CD bug fix

Every example lane uploaded coverage under one shared examples flag. That was correct while all lanes ran on every PR, but #2090 gates them independently, and Codecov carryforward only applies to a flag with no upload on the commit.

scenario examples flag outcome
no lanes run (docs-only) absent ✅ carried forward
all lanes run complete ✅ correct
one lane runs (now common) present but partial ❌ carryforward skipped; full coverage replaced by that lane's subset

The third row is what gating made routine: a PR touching only examples/diffusers/** runs the onnx lane, uploads examples containing onnx coverage alone, and Codecov reports a drop for code the PR never touched.

One flag per example (examples-<name>, 12 flags) restores the intent already documented in .github/codecov.yml: a skipped lane has no upload for its flag and is carried forward; a lane that ran replaces only its own slice. The config comment is updated to explain why a shared flag defeats carryforward, so this isn't re-introduced.

gpu_tests deliberately keeps a single gpu flag — its five suites are gated at workflow level, so they upload together or not at all. It would need the same change if per-suite gating is ever added.

Testing

Not directly observable on this PR: it changes workflow files, which are in the gate's common group, so all twelve lanes run and every flag is uploaded — the healthy case either way. The behavior it fixes appears on the next PR that touches a single example, where codecov/project should now stay accurate instead of reporting a drop.

Worth noting the symptom was never blocking: codecov/project is not a required check and the threshold allows a 2% drop. This is about the coverage data being right.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅ — flags are new names; historical data under examples is unaffected
  • If you copied code from any other sources or added a new PIP dependency, did you follow guidance in CONTRIBUTING.md: N/A
  • Did you write any new necessary tests?: N/A — CI configuration
  • Did you update Changelog?: N/A
  • Did you get Claude approval on this PR?: ❌ — not yet run

Summary by CodeRabbit

  • Chores
    • Improved coverage reporting by tracking results separately for each test example.
    • Clarified coverage configuration and documented how skipped uploads are carried forward.

Every example lane uploaded under a shared `examples` flag. That was fine
while all lanes ran on every PR, but #2090 gates them independently, and
carryforward only applies to a flag with no upload on the commit. With a
shared flag a single-lane PR uploads that flag as present but partial, so
Codecov replaces the whole picture with the subset that ran and reports a
coverage drop for code the PR never touched.

One flag per example (examples-<name>) restores the intent: a lane that
skips has no upload for its flag and is carried forward, while a lane that
ran replaces only its own slice.

gpu_tests keeps a single `gpu` flag: its suites are gated at workflow level,
so they upload together or not at all. It would need the same treatment if
per-suite gating is ever added.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
@kevalmorabia97
kevalmorabia97 requested a review from a team as a code owner August 7, 2026 12:22
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 69deb9d5-9b32-4213-8520-fb14bb659f14

📥 Commits

Reviewing files that changed from the base of the PR and between 02b64bc and 6fe5680.

📒 Files selected for processing (2)
  • .github/codecov.yml
  • .github/workflows/_example_tests_runner.yml
 ______________________________________________________
< This code is a locked door with the key taped to it. >
 ------------------------------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kmorabia/codecov-per-lane-flags

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.73%. Comparing base (02b64bc) to head (6fe5680).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2111      +/-   ##
==========================================
+ Coverage   78.60%   78.73%   +0.13%     
==========================================
  Files         522      522              
  Lines       60167    60167              
==========================================
+ Hits        47294    47374      +80     
+ Misses      12873    12793      -80     
Flag Coverage Δ
examples-diffusers 20.82% <ø> (?)
examples-gpt-oss 13.27% <ø> (?)
examples-hf_ptq 21.50% <ø> (?)
examples-llm_distill 13.34% <ø> (?)
examples-llm_eval 17.12% <ø> (?)
examples-llm_qat 16.65% <ø> (?)
examples-llm_sparsity 15.93% <ø> (?)
examples-megatron_bridge 25.70% <ø> (?)
examples-specdec_bench 13.02% <ø> (?)
examples-speculative_decoding 17.54% <ø> (?)
examples-torch_onnx 21.91% <ø> (?)
examples-torch_trt 15.10% <ø> (?)
unit 55.38% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kevalmorabia97
kevalmorabia97 merged commit 43e9d15 into main Aug 7, 2026
40 checks passed
@kevalmorabia97
kevalmorabia97 deleted the kmorabia/codecov-per-lane-flags branch August 7, 2026 13:32
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-07 13:33 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant