Skip to content

fix(ci): AUT-2243 preserve scheduled nightly runs - #3164

Merged
kajalj22 merged 3 commits into
NVIDIA-NeMo:mainfrom
svcnemo-autobot:fix/preserve-scheduled-nightlies
Sep 9, 2026
Merged

kajalj22 merged 3 commits into
NVIDIA-NeMo:mainfrom
svcnemo-autobot:fix/preserve-scheduled-nightlies

Conversation

@svcnemo-autobot

@svcnemo-autobot svcnemo-autobot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Background

Gym's four-hour scheduled CICD run was cancelled by a newer push. Scheduled runs must finish independently while push runs may still supersede older pushes.

What changed

  • Partition top-level CICD concurrency by event type.
  • Disable cancellation only for scheduled runs.
  • Remove concurrency from the reusable unit-test workflow; GitHub evaluates it as workflow_call, where event-based expressions are invalid.
  • Add regression coverage for the top-level contract and reusable workflow shape.

Details

flowchart LR
  S[Scheduled CICD] --> U[Reusable unit tests]
  P[Push CICD] --> U
  S -. separate caller group .- P
Loading

Tested

  • ruff format --check tests/unit_tests/test_ci_environment.py
  • pytest -q tests/unit_tests/test_ci_environment.py::test_scheduled_cicd_runs_do_not_cancel_in_progress
  • Previous-head GitHub lint, DCO, copyright, and secret checks passed; GitHub exposed the reusable-workflow validation failure fixed by this head.

@svcnemo-autobot
svcnemo-autobot requested a review from a team as a code owner September 8, 2026 17:45
@copy-pr-bot

copy-pr-bot Bot commented Sep 8, 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.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/ok to test 9ed68ae

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/ok to test 79f2226

@kajalj22

kajalj22 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

/claude review

@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

SHIP — LGTM, no reliability concerns.

CI-only change; no verifier, scorer, async, or public-API surface touched. Semantics check out:

  • cicd-main.yml: concurrency group now includes github.event_name, and cancel-in-progress is gated to false for schedule events (true otherwise). This prevents a push/dispatch run and the 4-hourly scheduled run from cancelling each other, and keeps scheduled runs from being aborted mid-flight — correct for a benchmark cron that must complete.
  • unit-tests.yml: group keyed by event_name with cancel-in-progress: false. Since this is a reusable workflow_call, the concurrency key is evaluated in the caller's event context, so the event_name partitioning stays consistent with the parent workflow.
  • test_ci_environment.py: the asserted string blocks match both head workflow files exactly, including the wrapped -${{ github.event_name }} group suffix in unit-tests.yml. Real assertion, not vacuous.

One NOTE (author's call, not blocking): dropping cancel-in-progress to false for PR-triggered unit-test runs means superseded commits on a busy PR will no longer auto-cancel, so stale in-flight runs will consume runners until they finish. If runner contention becomes an issue, consider keying cancellation on event type the way cicd-main does (cancel for pull_request, keep for schedule) rather than blanket false.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/ok to test 016715c

@kajalj22

kajalj22 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

/claude review

@claude

claude Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

SHIP — LGTM, no reliability concerns.

CI-config-only change; no verifier, scorer, async, or public-API surface touched.

  • cicd-main.yml: cancel-in-progress becomes ${{ github.event_name != 'schedule' }}. Since the concurrency group already partitions by github.event_name, this only stops one scheduled (nightly) run from cancelling another when a run overruns the 4h cron interval. Correct intent, correct mechanism.
  • unit-tests.yml: dropped its own concurrency block. The workflow is workflow_call-only, so the caller's (cicd-main) concurrency now governs — avoids a reusable workflow's concurrency fighting the parent's. Sound.
  • Test asserts the exact new content of both files (not vacuous).

@yaoyu-33 yaoyu-33 added area:ci CI workflows, test routing, and repository automation ci CI, automation, test queue, or workflow infrastructure work needs-review PR is ready for code review and waiting on a reviewer labels Sep 8, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Sep 9, 2026
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Sep 9, 2026
@kajalj22
kajalj22 merged commit 40625e6 into NVIDIA-NeMo:main Sep 9, 2026
40 checks passed
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
## Background

Gym's four-hour scheduled CICD run was cancelled by a newer push.
Scheduled runs must finish independently while push runs may still
supersede older pushes.

## What changed

- Partition top-level CICD concurrency by event type.
- Disable cancellation only for scheduled runs.
- Remove concurrency from the reusable unit-test workflow; GitHub
evaluates it as `workflow_call`, where event-based expressions are
invalid.
- Add regression coverage for the top-level contract and reusable
workflow shape.

## Details

```mermaid
flowchart LR
  S[Scheduled CICD] --> U[Reusable unit tests]
  P[Push CICD] --> U
  S -. separate caller group .- P
```

## Tested

- `ruff format --check tests/unit_tests/test_ci_environment.py`
- `pytest -q
tests/unit_tests/test_ci_environment.py::test_scheduled_cicd_runs_do_not_cancel_in_progress`
- Previous-head GitHub lint, DCO, copyright, and secret checks passed;
GitHub exposed the reusable-workflow validation failure fixed by this
head.

---------

Signed-off-by: svcnemo-autobot <[email protected]>
Signed-off-by: Junkeun Yi <[email protected]>

This branch was previously deployed

1 inactive deployment
public — 016715ca Deployed Sep 8, 2026 by copy-pr-bot[bot] via release / finalize / notify #2684
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI workflows, test routing, and repository automation ci CI, automation, test queue, or workflow infrastructure work needs-review PR is ready for code review and waiting on a reviewer Run CICD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants