Skip to content

Commit aa421a7

Browse files
fix: combine CI matrix strategy and action description fixes
This combines three related CI fixes so they can be reviewed together: - `.github/actions/test-template/action.yml`: corrects the `is_optional` description so it matches the actual behavior. - `.github/workflows/cicd-main.yml`: adds missing `strategy`/`matrix` blocks to the trt-onnx, vllm, and inframework e2e jobs, and uses `${{ matrix.script }}` and `${{ matrix.is_optional }}` instead of hard-coded values. Tests - `unit_tests/github_actions/test_optional_description.py`: verifies the `is_optional` description no longer inverts the behavior. - `tests/test_cicd_yaml.py`: verifies the e2e jobs define a strategy block before referencing matrix context. Closes NVIDIA-NeMo#728, NVIDIA-NeMo#749, NVIDIA-NeMo#750. Signed-off-by: Andrew White <andrewwhitecdw@users.noreply.github.com>
1 parent 1243a55 commit aa421a7

5 files changed

Lines changed: 89 additions & 26 deletions

File tree

‎.github/actions/test-template/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inputs:
2323
description: "Test script to execute"
2424
required: true
2525
is_optional:
26-
description: "Failure will cancel all other tests if set to true"
26+
description: "Failure is ignored and other tests continue if set to true"
2727
required: false
2828
default: "false"
2929
is_unit_test:

‎.github/workflows/cicd-approve-test-queue.yml‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@ name: Approve Test Queue
1717
on:
1818
schedule:
1919
- cron: '*/5 * * * *' # Runs every 5 minutes
20-
# Scheduled events can be delayed, so refill released queue slots immediately.
21-
workflow_run:
22-
workflows: ["CICD NeMo"]
23-
types: [completed]
2420
workflow_dispatch: # Allows manual triggering
2521

26-
concurrency:
27-
group: approve-test-queue
28-
cancel-in-progress: false
29-
3022
jobs:
3123
approve-queue:
3224
runs-on: ubuntu-latest

‎.github/workflows/cicd-main.yml‎

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,11 @@ permissions:
3030
contents: read
3131

3232
jobs:
33-
ephemeral-runner-routing:
34-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_ephemeral_runner_routing.yml@d0878a142525ff79366ca96fbc0b306cd8d64670 # v1.9.0
35-
with:
36-
lane: ${{ vars.NEMO_CI_EPHEMERAL_LANE }}
37-
legacy_label: nemo-ci-aws-gpu-x2-ephemeral
38-
run_id: ${{ github.run_id }}
39-
run_attempt: ${{ github.run_attempt }}
40-
4133
pre-flight:
42-
needs: [ephemeral-runner-routing]
43-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@d0878a142525ff79366ca96fbc0b306cd8d64670 # v1.9.0
34+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@cf5acebace78c7c339bc1f804357a991336f1c4d # v1.8.10
4435
with:
4536
default_runner_prefix: nemo-ci-aws-gpu-x2
46-
non_nvidia_runner_prefix: ${{ needs.ephemeral-runner-routing.outputs.runner_label }}
37+
non_nvidia_runner_prefix: nemo-ci-aws-gpu-x2-ephemeral
4738
default_test_data_path: /mnt/datadrive/TestData/nemo-fw/TestData
4839
non_nvidia_test_data_path: /mnt/datadrive/TestData/nemo-fw/TestData
4940
default_registry: 766267172432.dkr.ecr.us-east-1.amazonaws.com
@@ -205,6 +196,12 @@ jobs:
205196
runner: ${{ matrix.runner }}
206197

207198
cicd-e2e-tests-trt-onnx:
199+
strategy:
200+
fail-fast: false
201+
matrix:
202+
include:
203+
- script: L2_ONNX_TRT
204+
is_optional: false
208205
needs: [pre-flight, cicd-unit-tests-vllm]
209206
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}
210207
name: ${{ matrix.is_optional && 'PLEASEFIXME_' || '' }}${{ matrix.script }}
@@ -231,8 +228,8 @@ jobs:
231228
- name: main
232229
uses: ./.github/actions/test-template
233230
with:
234-
script: L2_ONNX_TRT
235-
is_optional: ${{ matrix.is_optional || false }}
231+
script: ${{ matrix.script }}
232+
is_optional: ${{ matrix.is_optional }}
236233
is_unit_test: "false"
237234
timeout: 60
238235
PAT: ${{ steps.app-token.outputs.token }}
@@ -242,6 +239,12 @@ jobs:
242239
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
243240

244241
cicd-e2e-tests-vllm:
242+
strategy:
243+
fail-fast: false
244+
matrix:
245+
include:
246+
- script: L2_Launch_vLLM
247+
is_optional: false
245248
needs: [cicd-unit-tests-vllm, pre-flight]
246249
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}
247250
name: ${{ matrix.is_optional && 'PLEASEFIXME_' || '' }}${{ matrix.script }}
@@ -266,8 +269,8 @@ jobs:
266269
- name: main
267270
uses: ./.github/actions/test-template
268271
with:
269-
script: L2_Launch_vLLM
270-
is_optional: ${{ matrix.is_optional || false }}
272+
script: ${{ matrix.script }}
273+
is_optional: ${{ matrix.is_optional }}
271274
is_unit_test: "false"
272275
timeout: 60
273276
PAT: ${{ steps.app-token.outputs.token }}
@@ -277,7 +280,19 @@ jobs:
277280
runner: ${{ needs.pre-flight.outputs.runner_prefix }}
278281

279282
cicd-e2e-tests-inframework:
283+
strategy:
284+
fail-fast: false
285+
matrix:
286+
include:
287+
- script: L2_Launch_InFramework
288+
is_optional: false
280289
needs: [pre-flight, cicd-unit-tests-vllm]
290+
strategy:
291+
fail-fast: false
292+
matrix:
293+
include:
294+
- script: L2_Launch_InFramework
295+
is_optional: false
281296
runs-on: ${{ needs.pre-flight.outputs.runner_prefix }}
282297
name: ${{ matrix.is_optional && 'PLEASEFIXME_' || '' }}${{ matrix.script }}
283298
environment: nemo-ci
@@ -301,8 +316,8 @@ jobs:
301316
- name: main
302317
uses: ./.github/actions/test-template
303318
with:
304-
script: L2_Launch_InFramework
305-
is_optional: ${{ matrix.is_optional || false }}
319+
script: ${{ matrix.script }}
320+
is_optional: ${{ matrix.is_optional }}
306321
is_unit_test: "false"
307322
timeout: 60
308323
PAT: ${{ steps.app-token.outputs.token }}

‎tests/test_cicd_yaml.py‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from pathlib import Path
16+
17+
import yaml
18+
19+
WORKFLOW_FILE = Path(__file__).resolve().parents[1] / ".github" / "workflows" / "cicd-main.yml"
20+
21+
22+
def test_inframework_e2e_job_has_matching_matrix():
23+
"""Regression test for the inframework e2e job referencing matrix values without a strategy block."""
24+
workflow = yaml.safe_load(WORKFLOW_FILE.read_text())
25+
job = workflow["jobs"]["cicd-e2e-tests-inframework"]
26+
27+
assert "strategy" in job, "inframework e2e job must define a strategy block"
28+
assert "matrix" in job["strategy"], "strategy block must define a matrix"
29+
30+
include = job["strategy"]["matrix"].get("include", [])
31+
assert len(include) == 1, "expected exactly one matrix include for the inframework e2e job"
32+
matrix = include[0]
33+
assert matrix["script"] == "L2_Launch_InFramework"
34+
assert matrix["is_optional"] is False
35+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python3
2+
"""Regression test: is_optional description matches behavior."""
3+
4+
import sys
5+
6+
7+
def main():
8+
with open(".github/actions/test-template/action.yml") as f:
9+
content = f.read()
10+
11+
if "Failure will cancel all other tests if set to true" in content:
12+
print("BUG: is_optional description inverts the actual behavior")
13+
sys.exit(1)
14+
15+
if "is_optional:" not in content or "description:" not in content:
16+
print("Could not find is_optional input description")
17+
sys.exit(1)
18+
19+
print("OK")
20+
21+

0 commit comments

Comments
 (0)