GitLab CI parallel/matrix Errors - Invalid parallel or matrix Config
By Daniel Zoghalchali·Latchkey
parallel splits a job into N copies, and parallel:matrix fans it out across variable combinations. The config fails when the count is out of range or the matrix shape is wrong.
What this error means
Validation rejects the job: parallel must be between 1 and 200, a matrix entry is not a list of mappings, or the expanded matrix exceeds the allowed number of jobs.
Pipeline Editor
This GitLab CI configuration is invalid:
jobs:test:parallel config must be greater than or equal to 1 and less than or equal to 200
Diagnose it: which rule matched, and on which runner?
GitLab evaluates rules: top to bottom and the first match wins, including one that sets when: never. A job that does not run, or runs when you did not expect it to, is nearly always matching an earlier rule than the one you are reading.
.gitlab-ci.yml
# validate the definition against the projectcurl -s --header "PRIVATE-TOKEN:$TOKEN" \"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/ci/lint" \--data-urlencode "content=$(cat .gitlab-ci.yml)"# what the job actually seesscript:- env | grep -E "^CI_(PIPELINE_SOURCE|COMMIT_REF_NAME|RUNNER)" | sort
Common causes
parallel count out of range
parallel must be an integer from 1 to 200. A 0, a negative, or a value from an unresolved variable fails validation.
Malformed matrix variables
parallel:matrix expects a list of mappings of variable → list of values. A scalar where a list is expected, or a single mapping not wrapped in a list, is invalid.
How to fix it
Use a valid parallel count
.gitlab-ci.yml
test:script:make testparallel:5 # 1..200
Shape the matrix correctly
Each list item is a mapping; each value is a list. The product of all lists is the number of jobs and must stay within the limit.
Validate matrix shape in the Pipeline Editor before pushing.
Keep matrix products small to stay within concurrency and limits.
Avoid driving parallel from variables that may be empty.
Frequently asked questions
What causes GitLab CI parallel/matrix errors?
There are 2 common causes: parallel count out of range and malformed matrix variables. parallel must be an integer from 1 to 200.
How do I fix GitLab CI parallel/matrix errors?
There are 2 fixes depending on which cause you have: use a valid parallel count and shape the matrix correctly. Work through them in order, since the first is the most common.
What does GitLab CI parallel/matrix errors actually mean?
Validation rejects the job: parallel must be between 1 and 200, a matrix entry is not a list of mappings, or the expanded matrix exceeds the allowed number of jobs.
How do I stop GitLab CI parallel/matrix errors happening again?
Validate matrix shape in the Pipeline Editor before pushing. The prevention section lists 3 changes that keep it from recurring.