ci: guard empty matrix categories in integration test workflow#2165
Open
musa-asad wants to merge 2 commits into
Open
ci: guard empty matrix categories in integration test workflow#2165musa-asad wants to merge 2 commits into
musa-asad wants to merge 2 commits into
Conversation
A filtered workflow_dispatch run (e.g. a test_dir_filter or test_os_filter
input) reduces every non-matching test category to [] via apply_filters.
Twelve inline matrix-consumer jobs in test-artifacts.yml expand
arrays: ${{ fromJson(needs.GenerateTestMatrix.outputs.<cat>_matrix) }}
with no emptiness guard, so fromJson('[]') makes GitHub raise
"Matrix vector 'arrays' does not contain any values" and the whole run
fails (the jobs are never created).
Add a job-level if: ${{ needs.GenerateTestMatrix.outputs.<cat>_matrix != '[]' }}
to each of the 12 inline jobs, mirroring the existing
ec2_linux_matrix_page_count > N guards on the paginated EC2Linux jobs.
This makes filtered dispatches safe without affecting unfiltered runs.
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.
Summary
A filtered
workflow_dispatchrun of the integration test workflow (one thatsets a
test_dir_filterortest_os_filterinput) reduces every non-matchingtest category to
[]viaapply_filters. Twelve inline matrix-consumer jobs in.github/workflows/test-artifacts.ymlexpandwith no emptiness guard. When the consumed output is
[],fromJson('[]')makesGitHub Actions reject the matrix with "Matrix vector 'arrays' does not contain
any values". The affected jobs are never created and the whole run is marked
failure, even thoughGenerateTestMatrixitself succeeded. Unfiltered (cron/bot)runs keep every category populated, so the defect is latent until a filtered
dispatch hits it.
Changes
Added a job-level guard
to each of the 12 inline consumer jobs in
.github/workflows/test-artifacts.yml,using the matching category output per job:
ec2_gpu_matrixec2_windows_matrixec2_mac_matrixecs_ec2_launch_daemon_matrixecs_fargate_matrixeks_daemon_matrixeks_deployment_matrixec2_performance_matrixec2_windows_performance_matrixec2_stress_matrixec2_windows_stress_matrixeks_addon_matrixThis mirrors the existing
ec2_linux_matrix_page_count > Nguards that alreadyprotect the paginated EC2Linux jobs. When a category is empty the consumer job is
cleanly skipped instead of failing matrix expansion. Unfiltered runs are
unaffected. No Go code changes.
Test Output
Guard count is exactly 12 (one per inline consumer job):
The workflow still parses as valid YAML:
The diff adds only the 12 guard lines and nothing else (excerpt):
EC2NvidiaGPUIntegrationTest: needs: [ StartLocalStack, GenerateTestMatrix, OutputEnvVariables ] + if: ${{ needs.GenerateTestMatrix.outputs.ec2_gpu_matrix != '[]' }} name: ${{ matrix.arrays.wip && '[WIP] ' || '' }}${{matrix.arrays.testName}} ... ECSEC2IntegrationTest: name: ${{ matrix.arrays.wip && '[WIP] ' || '' }}${{matrix.arrays.testName}} runs-on: ubuntu-latest needs: [ GenerateTestMatrix, OutputEnvVariables ] + if: ${{ needs.GenerateTestMatrix.outputs.ecs_ec2_launch_daemon_matrix != '[]' }} ... GPUEndToEndTest: name: ${{matrix.arrays.testName}} needs: [ GenerateTestMatrix, OutputEnvVariables ] + if: ${{ needs.GenerateTestMatrix.outputs.eks_addon_matrix != '[]' }}CI Fix: Node.js 24 action runtime migration
GitHub Actions force-migrated several pinned actions off the deprecated Node.js 20
runtime. The deprecated Node.js 20 action SHAs pinned across
.github/workflows/were bumped to the latest Node.js 24-compatible releases to keep CI green.
9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e04a3601121dd01d1626a1e23e37211e3254c1c06ce7f100cf4c008499ea8adda475de1042d6975c7bdfe3c3f87815947d99a8997f908cb6525fc44e9ead984534de44a9489a53aefd81eb77f87c70dc60f9f3042f7e2789586610d6e8b85c8f03e5195bafd7f5e7f509e45cec5c76c4d5afdd7de93d0b3df506116385d9baf250c9f4dcb4858b16962ea869c3All actions now run on the
node24runtime.