ci: Update test configurations to unify legacy scope names
What does this PR do ?
Update functional test configurations to unify legacy scope names with L-tier vocabulary. Refactor recipe parser to alias GitHub and GitLab scopes, ensuring compatibility across platforms. Adjust test cases to reflect new scope mappings and cadence settings for improved clarity and consistency.
Test scope & cadence: unified L-tier vocabulary
This PR migrates functional test recipes from the legacy scope names
(mr, mr-github, nightly, …) to a unified L-tier vocabulary, and
separates the two concepts that the old scope field fused together.
The two axes
| Axis | Question it answers | Values | Property of |
|---|---|---|---|
scope (L-tier) |
How expensive / which coverage tier? | L0–L4 |
the test |
cadence |
On which event does it trigger? | pr, mergegroup, nightly, weekly |
the schedule |
A CI trigger filters on both axes. E.g. a default PR runs scope=L0 + cadence=pr;
the merge queue runs scope=L1 + cadence=mergegroup; the nightly schedule runs
scope=L3 + cadence=nightly.
Legacy → new scope mapping
| Legacy scope | New tier | Default cadence injected | Runs on |
|---|---|---|---|
mr-github-slim |
L0 |
default (pr,nightly,mergegroup) |
Every GitHub PR (slim set) |
mr-github |
L1 |
default | Full PR suite, merge queue, GH nightly |
mr |
L2 |
default | GitLab MR extras (L1,L2) + nightly |
nightly |
L3 |
[nightly] |
Nightly |
weekly |
L4 |
[weekly] |
Weekly |
mr-slimis intentionally NOT mapped. It is a GitLab-only legacy value and does not becomeL0(L0 =mr-github-slimonly). Mapping it to L0 would incorrectly inflate the GitHub default-PR matrix.Values not in the map (
mr-broken,deprecated,flaky,unit-tests,mr-slim) pass through verbatim.
How to add a new test
1. Pick a scope (required)
Choose the cheapest tier that gives the coverage you need:
| Tier | Use for |
|---|---|
L0 |
Tiny, fast, critical-path smoke test (gates every PR — budget is tight) |
L1 |
Standard PR functional test ← default choice |
L2 |
GitLab-only extras (inference, perf, niche configs) |
L3 |
Heavyweight / long-running, too expensive for PRs |
L4 |
Heaviest, rare |
2. Set cadence (optional)
- Omit it in almost all cases — the default is
[pr, nightly, mergegroup]. - Only set it explicitly to decouple the trigger from the default (e.g. an L1 test restricted to nightly, or a heavyweight test that should also run in the merge queue).
3. Use the new vocabulary
New recipes should use L0–L4 directly. Legacy names still resolve for
back-compat but should not be added to new rows.
Example
- test_case: [my_new_test]
products:
- environment: [dev]
scope: [L1] # standard PR functional test
platforms: [dgx_h100]
- test_case: [my_heavy_test]
products:
- environment: [dev]
scope: [L3]
cadence: [nightly] # explicit: heavyweight, nightly only
platforms: [dgx_h100]
:warning: For major changes (either in lines of code or in its impact), please make sure to first share a design doc with the team. If you're unsure what's the best way to do so, contact the @mcore-oncall.
Issue tracking
For PRs from open-source community contributors:
- New features: a linked issue is required. Please open a feature request and reference it here before submitting the PR.
- Small updates (bug fixes, minor improvements): a linked issue is recommended and will accelerate the PR review process.
Linked issue:
Contribution process
Pre-checks
- [ ] I have added relevant unit tests
- [ ] I have added relevant functional tests
- [ ] I have added proper typing to my code Typing guidelines
- [ ] I have added relevant documentation
- [ ] I have run the autoformatter.sh on my PR
Code review
Feel free to message or comment the @mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
- When your PR is ready, click Ready for Review.
- An oncall reviewer is auto-assigned and expert reviewers are notified based on your changes.
- Some PRs may jump straight to step 2. This is determined by
.github/CODEOWNERS.
- Some PRs may jump straight to step 2. This is determined by
:warning: Only mark as ready once merge-conflicts are resolved and the CI is passing. Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change megatron/core, once all expert reviewers have approved, the Final Review label is applied automatically and final reviewers are assigned.
For PRs outside megatron/core, this step is skipped.
Step 3: Approved
Once all required reviewers have approved, the Approved label is applied automatically.
Merge
Any member of mcore-engineers will be able to merge your PR.
For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either [email protected] or [email protected].
This pull request requires additional validation before any workflows can run on NVIDIA's runners.
Pull request vetters can view their responsibilities here.
Contributors can view more details about this message here.
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/3d26f93403e2cf286046d7982ba9862e6b80cf31
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/fd2d5e30b22ff63f3b3b14ef67f0f6b3d129c22f
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/a12480402fc5f4dbce63bf2a808f720cf4ddf2e3
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/caac934ab15b0d39ccab7f15c85edf4a11610cf5
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/73f20a1fe684d499b3850147320132ad35489984
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/a0c5be07eeacc513a729be512aae137830474184
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/6275bc2a44e7bbeabae176f15aecd507e9522f16
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/a42a3c05fdcc9ac8f10875bbcebfeba7c42a60f0
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/060b35b1276f89041e9b773b9afdfdf8e96784aa
/ok to test https://github.com/NVIDIA/Megatron-LM/commit/3225f209d621e6838706fc113daf511f7938cb28