Skip to content

Fix a regression introduced by #4625 for nightly runs#4734

Merged
balasaajay merged 2 commits into
NVIDIA:mainfrom
balasaajay:hotfix-pr4625
May 12, 2026
Merged

Fix a regression introduced by #4625 for nightly runs#4734
balasaajay merged 2 commits into
NVIDIA:mainfrom
balasaajay:hotfix-pr4625

Conversation

@balasaajay

Copy link
Copy Markdown
Contributor

What does this PR do ?

Fix a regression introduced by #4625 where GitLab scheduled nightly and weekly pipelines stopped running real functional tests.

#4625 added LEGACY_SCOPE_ALIASES and applied it inside flatten_products, so recipes with scope: [nightly] get rewritten in memory to scope: "L2". The filter side (filter_by_scope) was left doing strict equality, so GitLab's --scope nightly (still the legacy value, per .gitlab/stages/04.functional-tests.yml) matched zero workloads. generate_jet_trigger_job.py then emitted the sleep 1 placeholder pipeline, which Slack reports as All 1 passed.

This PR adds _resolve_scope_alias and threads it through filter_by_scope so both sides of the comparison are in the same vocabulary. After the fix:

--scope nightly and --scope L2 both match the same number of nightly workloads. --scope weekly and --scope L3 both match the same number of weekly workloads. --scope mr-github / mr-github-slim continue to work for any external caller still on the legacy names. All other scopes (mr, mr-slim, unit-tests, *-broken, etc.) pass through unchanged.

⚠️ 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"

  1. When your PR is ready, click Ready for Review.
  2. 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.

⚠️ 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 eharper@nvidia.com or zijiey@nvidia.com.

…htly/weekly pipelines stopped running real functional tests.

NVIDIA#4625 added LEGACY_SCOPE_ALIASES and applied it inside flatten_products, so recipes with scope: [nightly] get rewritten in memory to scope: "L2". The filter side (filter_by_scope) was left doing strict equality, so GitLab's --scope nightly (still the legacy value, per .gitlab/stages/04.functional-tests.yml) matched zero workloads. generate_jet_trigger_job.py then emitted the sleep 1 placeholder pipeline, which Slack reports as All 1 passed.

This PR adds _resolve_scope_alias and threads it through filter_by_scope so both sides of the comparison are in the same vocabulary. After the fix:

--scope nightly and --scope L2 both match the same number of nightly workloads.
--scope weekly and --scope L3 both match the same number of  weekly workloads.
--scope mr-github / mr-github-slim continue to work for any external caller still on the legacy names.
All other scopes (mr, mr-slim, unit-tests, *-broken, etc.) pass through unchanged.
@copy-pr-bot

copy-pr-bot Bot commented May 11, 2026

Copy link
Copy Markdown

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.

@balasaajay

Copy link
Copy Markdown
Contributor Author

/ok to test 097b7ad

@balasaajay

Copy link
Copy Markdown
Contributor Author

/ok to test 097b7ad

@balasaajay

Copy link
Copy Markdown
Contributor Author

/ok to test 097b7ad

@balasaajay

Copy link
Copy Markdown
Contributor Author

/ok to test a5cf918

@svcnvidia-nemo-ci

Copy link
Copy Markdown

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/25714755059

Merged via the queue into NVIDIA:main with commit 7d24b28 May 12, 2026
194 of 195 checks passed
@balasaajay balasaajay deleted the hotfix-pr4625 branch May 12, 2026 06:26
balasaajay added a commit to balasaajay/Megatron-LM that referenced this pull request May 20, 2026
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.

3 participants