Skip to content

Apply the docs-only ignore to the example lane groups - #2101

Merged
kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/ci-fix-files-ignore-yaml
Aug 7, 2026
Merged

Apply the docs-only ignore to the example lane groups#2101
kevalmorabia97 merged 1 commit into
mainfrom
kmorabia/ci-fix-files-ignore-yaml

Conversation

@kevalmorabia97

@kevalmorabia97 kevalmorabia97 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change: Bug fix (CI)

Follow-up to #2090. files_ignore does not apply to files_yaml groups — the action keys ignores separately through files_ignore_yaml. Docs-only PRs therefore still matched a lane: a change to examples/diffusers/README.md alone started the onnx lane's three GPU jobs.

files_ignore_yaml: |
  common: &docs
    - "**.ipynb"
    - "**.md"
    - "**.png"
    - "**.rst"
  torch: *docs
  trtllm: *docs
  megatron: *docs
  onnx: *docs

Only example_tests.yml is affected. gpu_tests, regression_tests and unit_tests go through _pr_gate.yml, which uses the plain files + files_ignore pair where the ignore does apply.

Testing

Found by a probe PR opened against merged main (a README-only change), which showed onnx running when nothing should have. The same probe is re-run against this branch to confirm the fix — see the linked draft PR.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅
  • 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
    • Updated example-test workflow filtering to consistently ignore documentation, image, and notebook-only changes across all test lanes.
    • Improved pull request gate file matching by using recursive patterns for Markdown, reStructuredText, PNG, and notebook files.

@kevalmorabia97
kevalmorabia97 requested a review from a team as a code owner August 7, 2026 07:36
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 5016d8ad-3445-46a5-98d6-9eb338ce1011

📥 Commits

Reviewing files that changed from the base of the PR and between 3d4d924 and f1a3e49.

📒 Files selected for processing (2)
  • .github/workflows/_pr_gate.yml
  • .github/workflows/example_tests.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/example_tests.yml

📝 Walkthrough

Walkthrough

The workflows now use recursive glob patterns for ignored documentation, image, and notebook files. The example-test workflow applies these exclusions to the shared and individual test lanes.

Changes

File-ignore gating

Layer / File(s) Summary
Recursive ignore configuration
.github/workflows/_pr_gate.yml, .github/workflows/example_tests.yml
The PR gate uses **/*.<extension> patterns. The example-test workflow applies the exclusions to the common, torch, trtllm, megatron, and onnx groups.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: aanoosheh

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes applying documentation-only ignore patterns to the example lane groups, which is the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns ✅ Passed The PR changes only two workflow YAML files; no modelopt/examples Python or dependency files changed, and added lines contain none of the listed security patterns.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kmorabia/ci-fix-files-ignore-yaml

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 77.57%. Comparing base (3d4d924) to head (f1a3e49).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2101      +/-   ##
==========================================
- Coverage   78.60%   77.57%   -1.04%     
==========================================
  Files         522      522              
  Lines       60167    60167              
==========================================
- Hits        47294    46673     -621     
- Misses      12873    13494     +621     
Flag Coverage Δ
examples 33.42% <ø> (-8.46%) ⬇️
gpu 58.65% <ø> (-0.62%) ⬇️
regression 14.90% <ø> (+0.04%) ⬆️
unit 55.39% <ø> (+<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.

The ignore never took effect. Two separate causes, both found by a probe PR
against merged main whose only change was a README:

- files_ignore does not apply to files_yaml groups, so the example lanes
  filtered nothing. Exclude per group instead.
- As an inline negation, `**.md` does not exclude, while `**/*.md` does
  (micromatch treats the two forms differently, though isMatch accepts both).
  This also made _pr_gate's ignore inert for its callers, where it only
  looked correct because docs paths usually fall outside the watch lists.

Verified against micromatch 4.0.5, the version the action depends on:
README.md, examples/diffusers/README.md and a nested .png now match no lane,
while config.py -> onnx, examples/dataset -> torch+trtllm and
tests/examples/conftest.py -> common are unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
@kevalmorabia97
kevalmorabia97 force-pushed the kmorabia/ci-fix-files-ignore-yaml branch from 14f1406 to f1a3e49 Compare August 7, 2026 08:15
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@kevalmorabia97
kevalmorabia97 merged commit 3d4430f into main Aug 7, 2026
41 of 43 checks passed
@kevalmorabia97
kevalmorabia97 deleted the kmorabia/ci-fix-files-ignore-yaml branch August 7, 2026 09:30
@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 09:30 UTC

kevalmorabia97 added a commit that referenced this pull request Aug 7, 2026
### What does this PR do?

Type of change: CI/CD maintenance

Last of the [Node
20](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/)
actions: `step-security/changed-files` v46.0.5 → v47.0.5, in
`_pr_gate.yml`, `example_tests.yml` and `unit_tests.yml`.

Deliberately separate from #2102. Every gate in the repo runs through
this action, and the example lanes depend on its `files_yaml` per-group
outputs plus `any_modified` semantics. v47 has no release notes
describing output behavior, and the upstream v47 notes are dependency
bumps only — so this is the one bump I could not clear from a changelog.
On its own, any gating regression is unambiguous.

What I did verify at `v47.0.5`:

- `micromatch` is still `^4.0.5` — the matcher the lane patterns were
validated against
- `files`, `files_ignore`, `files_yaml`, `files_ignore_yaml` are all
still inputs
- `any_modified`, `any_changed`, `changed_keys` are all still documented
outputs

### Testing

Static checks above. The behavior that matters cannot be proven from
this PR: it changes workflow files, which are in the `common` group, so
**every lane runs regardless** of whether gating still works. I plan to
confirm with a throwaway probe PR against this branch — a docs-only
change must run nothing, and a single-example change must run exactly
one lane — the same method that caught the two ignore bugs fixed in
#2101.

### Before your PR is "*Ready for review*"

- Is this change backward compatible?: ✅
- 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](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?:
N/A
- Did you get Claude approval on this PR?: ❌ — not yet run

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated pull-request file-change checks to use the latest available
file-detection action.
* Applied the update consistently across example-test and unit-test
workflows.
* Improved consistency and reliability across automated pull-request
validation checks without changing application behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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