Skip to content
Latchkey

GitLab CI "dependencies" Job Not Found / Wrong Stage

dependencies: controls which jobs’ artifacts a job downloads. It fails validation - or silently passes nothing - when a listed job is undefined, in a later stage, or has no artifacts.

What this error means

Either a hard config error naming an undefined dependency, or a job that runs but receives no files because the dependency it named produced or passed nothing.

Pipeline Editor
This GitLab CI configuration is invalid:
'test' job: undefined dependency: 'biuld'

Common causes

Dependency job undefined or misnamed

Each name in dependencies: must match a real job. A typo (biuld) or a removed job is an undefined dependency.

Dependency in a later stage

dependencies can only reference jobs from earlier stages. Listing a same- or later-stage job is invalid because its artifacts do not exist yet.

Listed job has no artifacts

If the named job never declares artifacts:paths, the consumer downloads nothing - no error, just empty inputs.

How to fix it

List real, earlier jobs that produce artifacts

.gitlab-ci.yml
test:
  stage: test
  dependencies:
    - build      # earlier stage, declares artifacts:paths
  script: ./run-tests.sh dist/

Prefer needs for clarity

  1. Use needs: with artifacts: true to both order jobs and pass artifacts.
  2. Set dependencies: [] to explicitly download nothing when a job needs no inputs.
  3. Confirm the producing job declares artifacts:paths.

How to prevent it

  • Keep dependencies/needs job names in sync during refactors.
  • Ensure any job named as a dependency declares artifacts.
  • Prefer needs:artifacts for explicit data flow.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →