Repository navigation
ci: scheduled (every 4h) Gym CI with manual trigger and single gate - #2810
Merged
Merged
Conversation
- Add a nightly cron trigger (0 9 * * *, matching NeMo-RL's schedule) - Gate container_build and gpu_e2e_tests on the schedule event instead of `if: false`, so they run nightly rather than staying fully off (follow-up to #2801) - Gate provider_e2e_tests (fireworks-e2e) on the schedule event too, since it exercises a live external provider and doesn't need to run on every PR push - Nemo_CICD_Test already treats all three as non-gating; update the log labels to say "nightly only" instead of "temporarily disabled" Signed-off-by: Kajal Jain <[email protected]>
- Run full-test-suite.yml (core unit tests, the full sharded server suite, and the wheel-install smoke test) on the same nightly cron as cicd-main.yml, in addition to container_build and unit_tests. It already alerts on failure via SLACK_TEAM_CHANNEL_WEBHOOK, so this reuses the same post-merge alerting path for nightly runs. - Add a notify-nightly-failure job to cicd-main.yml that posts to the same Slack webhook when container_build, gpu_e2e_tests, or provider_e2e_tests fails on a scheduled (nightly) run. Signed-off-by: Kajal Jain <[email protected]>
- Add workflow_dispatch to cicd-main.yml and full-test-suite.yml so the nightly jobs can be run on demand from the Actions UI, with a send_notification input to opt out of Slack alerts on manual runs (defaults to true for real nightly failures) - Extend container_build/gpu_e2e_tests/provider_e2e_tests to also run on workflow_dispatch, matching the schedule-only gating - Add a single Nightly_Gate job in cicd-main.yml that aggregates the three nightly-only job results (mirrors NeMo-RL's CI_QA_Gate pattern), replacing the previous multi-condition OR check - Extract the Slack POST into a reusable composite action (.github/actions/notify-slack-failure) and use it from both cicd-main.yml's nightly notifier and full-test-suite.yml's existing post-merge notifier, instead of duplicating the curl/message logic Signed-off-by: Kajal Jain <[email protected]>
Per feedback, mirror NeMo-RL's CI_QA_Gate pattern exactly: one gate job whose pass/fail logic depends on which event triggered the run, rather than a second Nightly_Gate job. Nemo_CICD_Test now additionally requires container_build/gpu_e2e_tests/provider_e2e_tests to succeed only when the run is schedule/workflow_dispatch (nightly); PR/push runs are unaffected since those jobs are skipped in that case. notify-nightly-failure now keys off Nemo_CICD_Test's result directly. Signed-off-by: Kajal Jain <[email protected]>
NVIDIA-NeMo/FW-CI-templates already provides a reusable .github/actions/send-slack-alert composite action (message + webhook inputs) that neither Gym nor RL was using despite both hand-rolling the same curl/jq post. Drop the Gym-local notify-slack-failure action in favor of the shared one, pinned to the same v1.8.10 ref already used for _cicd_preflight.yml. No local checkout needed since it's a remote action reference. Signed-off-by: Kajal Jain <[email protected]>
Post-merge push-to-main coverage is now redundant with the scheduled full-test-suite run, so drop the push: [main] trigger entirely - schedule/workflow_dispatch only. Bump both cicd-main.yml's and full-test-suite.yml's cron from once daily (0 9 * * *) to every 4 hours (0 */4 * * *) to compensate for losing per-merge coverage. Signed-off-by: Kajal Jain <[email protected]>
Add a pr-authors-since-last-run composite action used by both notify-nightly-failure (cicd-main.yml) and notify-failure (full-test-suite.yml). It finds internal (non-external) authors of PRs merged since the last completed run of the same workflow and appends them to the failure message. Fail-safe behavior, per requirements: - If the previous run is still in progress/queued, author attribution is skipped (no reliable "since" boundary), but the alert still goes out with no author line. - External (non-member/collaborator) PR authors are excluded from attribution based on author_association. - The lookup step runs with continue-on-error: true and never raises a non-zero exit itself, so a GitHub API hiccup can never suppress the alert - "Notify Gym alerts channel" always runs regardless of whether author lookup succeeded. Signed-off-by: Kajal Jain <[email protected]>
Drop the org-membership/email lookup approach - it required replicating check-nvidia-sso's private github-audits download inline (the shared action only exposes booleans, not email) to loop over a variable number of PR authors, which isn't verifiable without access to that private repo. Simpler: list the commits (short SHA + subject) since the last completed run instead, same fail-safe behavior as before (skip silently if the previous run is still in progress or the lookup errors; the alert is always sent regardless). Signed-off-by: Kajal Jain <[email protected]>
The docs_only early-exit ran (and exited) before the nightly-job gate ever executed. classify_changes computes docs_only from a diff against HEAD~1 regardless of trigger, so a schedule/workflow_dispatch run lands in the docs_only=true branch and exits success whenever the latest commit on main happens to be docs-only - even though container_build/gpu_e2e_tests/provider_e2e_tests still ran (their `if:` only checks event_name) and could have failed. Restructure so schedule/workflow_dispatch always evaluates unit_tests (success or skipped) plus the three nightly jobs, independent of docs_only; PR/push behavior is unchanged. Verified by extracting the script and running it standalone against: nightly+docs-only+container_build-failure -> now correctly fails (previously passed), PR+docs-only -> still passes, nightly all-green -> still passes. Signed-off-by: Kajal Jain <[email protected]>
Revert the commits-since-last-run composite action and its wiring into both notify jobs, back to a plain static Slack message. Keeping this PR scoped to the nightly-scheduling/gating change; the commit- list feature (plus its event= filter fix for the review finding about cicd-main.yml's push traffic pushing the last nightly run out of an unfiltered top-10 window) will land as a separate follow-up PR once this one merges. Signed-off-by: Kajal Jain <[email protected]>
3 tasks
- P1 fix: a job's own `if:` replaces (not ANDs with) the implicit success()-of-needs check. Restore the original intended flow - container_build only runs after pre-flight/classify_changes/ unit_tests succeed (or unit_tests is skipped, for docs-only nightly runs), gpu_e2e_tests additionally requires container_build to have actually succeeded, and provider_e2e_tests requires classify_changes/ unit_tests. Previously these jobs would still fire on a nightly run even if an earlier stage failed, wasting nemo-ci-aws-gpu-x2 capacity before the failure was ever detected. - Enforce that Slack alerts only fire for runs against main or a release branch (rMAJOR.MINOR.PATCH) via a dedicated ref-check step, so a workflow_dispatch run against an arbitrary feature branch can't spam the shared Gym alerts channel. Also drops the hardcoded "on main branch" wording in favor of the actual ref. - Rename cicd-main.yml's notify-nightly-failure/"Notify nightly failure" to notify-failure/"Notify test failure", matching full-test-suite.yml's existing job (it fires on workflow_dispatch too, not just the nightly schedule, so "nightly" was inaccurate). - Update the two now-stale assertions in test_ci_environment.py that still expected the old if:false/docs-only-gated state from #2801, and add real behavioral coverage: the "Check test results" gating script and the ref-check script are extracted from the parsed workflow YAML and executed via subprocess across the event x job-result matrix (17 cases) and the ref matrix (7 cases x 2 workflows), rather than only asserting on string content. All 63 tests in tests/unit_tests/test_ci_environment.py pass. Signed-off-by: Kajal Jain <[email protected]>
Per review feedback, the github.event_name == 'schedule' || 'workflow_dispatch' check was duplicated in 5 places (3 job ifs, the Nemo_CICD_Test bash gate, notify-failure's if). Add classify_changes. outputs.is_nightly as the single source of truth and reference it everywhere instead, so a future change to the trigger condition only needs to happen in one place. Scoped to this repo only (an equivalent change threading this through the shared FW-CI-templates preflight workflow was considered and explicitly out of scope here). Updated test_ci_environment.py accordingly; all 63 tests pass. Signed-off-by: Kajal Jain <[email protected]>
…alert - Fix real bug from review: notify-failure gated on needs.classify_changes.outputs.is_nightly, but classify_changes (and all its outputs, including literal ones) is skipped whenever pre-flight fails. That silently suppressed the Slack alert for exactly the failure class (infra/pre-flight failures on a nightly run) this notifier exists to catch. notify-failure now checks github.event_name directly instead, independent of whether classify_changes ran. - Widen the alert to include pre-flight/classify_changes/unit_tests results (not just the three nightly-only jobs), so a nightly failure caused by an earlier stage doesn't show three misleading "skipped" fields with no indication of the real cause. - Extract the duplicated ref-check step (identical between cicd-main.yml and full-test-suite.yml) into .github/actions/is-main-or-release-ref, matching the existing local-composite-action convention (classify-changes, test-template). - Add missing test coverage flagged by review: full-test-suite.yml's trigger block (schedule/workflow_dispatch, push removed) was previously untested, and the send_notification suppression clause was asserted to exist as an input but never checked in either notify-failure job's actual `if:`. All 67 tests in tests/unit_tests/test_ci_environment.py pass. Signed-off-by: Kajal Jain <[email protected]>
Contributor
Author
|
/ok to test 6ad5c18 |
chtruong814
previously approved these changes
Aug 27, 2026
balasaajay
previously approved these changes
Aug 27, 2026
Fits within the 119-char line length, so ruff-format wants it on one line rather than wrapped in parens across three. Signed-off-by: Kajal Jain <[email protected]>
Contributor
Author
|
/ok to test e5a373d |
ko3n1g
approved these changes
Aug 27, 2026
ananthsub
pushed a commit
that referenced
this pull request
Aug 27, 2026
…2810) ## Why `container_build`, `gpu_e2e_tests`, `provider_e2e_tests`, and the full test suite were queuing indefinitely on every PR push against the shared `nemo-ci-aws-gpu-x2` runner pool (follow-up to #2801). ## Before → After | | Before | After | |---|---|---| | Heavy CI trigger | Every PR push + every merge to `main` | Every 4 hours (`0 */4 * * *`) or manual `workflow_dispatch` | | `Nemo_CICD_Test` gate | Docs-only shortcut could bypass checking the heavy jobs entirely | Single gate, branches on `event_name`, always checks the right jobs with proper `needs.*.result` gating | | Slack alerts | None for these jobs | Fire on failure, but only for `main`/release-branch runs; show all upstream results, not just the 3 nightly ones | | Alert gating | N/A | Keyed directly on `event_name` — can't silently disappear if an earlier job in the chain gets skipped | | Ref-check / notify logic | N/A | Deduped into a shared `.github/actions/is-main-or-release-ref` action; job renamed `notify-failure` to match `full-test-suite.yml`'s convention | | Test coverage | N/A | `tests/unit_tests/test_ci_environment.py` extended to cover the new gating/alerting behavior (67 passing) | Split out: the "commits since last run" alert feature is a separate stacked PR, #2812. ## Test plan - [ ] PR pushes skip `container_build`/`gpu_e2e_tests`/`provider_e2e_tests`; `Nemo_CICD_Test` still passes - [ ] Scheduled run triggers all nightly jobs + `full-test-suite.yml` on `main`, gated correctly - [ ] A nightly `unit_tests` or `pre-flight` failure still sends a Slack alert with the real cause - [ ] Merging to `main` no longer triggers `full-test-suite.yml` directly - [ ] `workflow_dispatch` runs on demand; alert suppressed on non-main/non-release refs - [ ] `pytest tests/unit_tests/test_ci_environment.py -q` passes --------- Signed-off-by: Kajal Jain <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
container_build,gpu_e2e_tests,provider_e2e_tests, and the full test suite were queuing indefinitely on every PR push against the sharednemo-ci-aws-gpu-x2runner pool (follow-up to #2801).Before → After
main0 */4 * * *) or manualworkflow_dispatchNemo_CICD_Testgateevent_name, always checks the right jobs with properneeds.*.resultgatingmain/release-branch runs; show all upstream results, not just the 3 nightly onesevent_name— can't silently disappear if an earlier job in the chain gets skipped.github/actions/is-main-or-release-refaction; job renamednotify-failureto matchfull-test-suite.yml's conventiontests/unit_tests/test_ci_environment.pyextended to cover the new gating/alerting behavior (67 passing)Split out: the "commits since last run" alert feature is a separate stacked PR, #2812.
Test plan
container_build/gpu_e2e_tests/provider_e2e_tests;Nemo_CICD_Teststill passesfull-test-suite.ymlonmain, gated correctlyunit_testsorpre-flightfailure still sends a Slack alert with the real causemainno longer triggersfull-test-suite.ymldirectlyworkflow_dispatchruns on demand; alert suppressed on non-main/non-release refspytest tests/unit_tests/test_ci_environment.py -qpasses