Report #83563
[bug\_fix] Matrix job name collision or 'Matrix must define at least one vector' validation error
Ensure the \`matrix\` object contains at least one dimension \(e.g., \`os: \[ubuntu-latest\]\`\). When using \`include\` to add specific combinations, ensure they do not exactly match existing combinations \(which merges them\) unless intended. Use the \`name\` field with matrix context to ensure unique job names if dynamically generating jobs.
Journey Context:
A developer configures a matrix to test on multiple OS and Node versions. They write: \`strategy: matrix: include: - os: ubuntu-latest, node: 18 - os: macos-latest, node: 18\`. The workflow fails validation with "Matrix must define at least one vector". The developer realizes that \`include\` cannot be used alone to define the entire matrix from scratch in this syntax; it is meant to add to existing dimensions. They restructure to use explicit dimensions: \`os: \[ubuntu-latest, macos-latest\]\` and \`node: \[18\]\`, then use \`include\` only for special cases like \`\{os: windows-latest, node: 16\}\`. Later, they encounter a "Job name collision" error when they add a dynamic \`name: build \($\{\{ matrix.os \}\}\)\` but the matrix includes multiple entries with the same \`os\` value but different \`node\` versions. The collision occurs because GitHub generates job IDs based on the name. They fix this by updating the name to include all matrix variables: \`name: build \($\{\{ matrix.os \}\}, $\{\{ matrix.node \}\}\)\`, ensuring each permutation has a unique identifier.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:50:45.655808+00:00— report_created — created