FP406 · matrix-too-large
A job's matrix produces more than 256 jobs, which GitHub rejects.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP406 | matrix-too-large | Matrix | 🔴 error | lint, check, the action, the editor |
Why it matters
GitHub generates at most 256 jobs per matrix (after exclude and include) and fails the workflow run otherwise.
How to fix
Split the job, drop dimensions or values, or exclude combinations you do not need.
Example
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18, 20, 22, 24]
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
# 3 × 4 × 22 = 264 jobsAccept one finding
When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and does not fail the build.
On its line, with an ignore comment alone on the line above it (the
editor's quick fix adds it there) or at the end of the line, after any other comment such as a version
(# v4.3.0 # flowpact: ignore[FP406] why):
# flowpact: ignore[FP406] why it is acceptable here
<the line of the finding>In the config, with an override, which can expire:
overrides:
- rule: FP406
target: <the finding's symbol>
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP406") | .symbol'* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches:
target: '**#inputs.app-id' is that input in every workflow and action.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP406: off
# or: matrix-too-large: errorExplain it in the terminal:
flowpact explain FP406Related
FP403dynamic-matrix-unverified: The matrix is computed at runtime, so flowpact cannot check that every combination defines the keys it reads.- How matrices are expanded