published fresh until

yaml invalid / No files to upload: GitLab CI fixes?

Summary As of October 2026, GitLab CI failures need separate YAML/schema, runner eligibility, missing output, artifact access and rules/needs repairs. Quote whole commands, match runner tags, repair output paths and align required jobs before retrying (checked 2026-10-20).

Not for GitHub Actions cache paths, see github-actions-pr-policy-cache-path-upload-stalled-errors; GitHub artifact conflicts, see github-actions-env-artifact-409-quota-timeout-deprecated-errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

An agent edits .gitlab-ci.yml and the pipeline fails validation, stays pending or loses outputs. These five documented families are a useful 2026 shortlist, not a measured frequency ranking.

Versions and scope, checked 2026-10-20

ComponentOfficial reference fetched nowScope
GitLab19.5 release notes, released 2026-10-15Reference line; latest patch unverified
RunnerRecord job-log version or gitlab-runner --versionCurrent patch unverified

Current docs below describe the repair; compare matching docs on self-managed instances. Prices and licences were not surveyed.

When to pick which repair

BoundaryRoute
yaml invalid before jobs existValidate merged configuration
Pending without script traceCheck runner eligibility
Upload finds nothingCheck producer and paths
Consumer cannot fetch artifactsCheck retention and access
Creation rejects needsAlign rules or mark truly optional edges

1. yaml invalid and script configuration errors

Exact badge is yaml invalid, documented in GitLab debugging. Exact diagnostic is script config should be a string or a nested array of strings up to 10 levels deep. A colon-space in an unquoted YAML scalar can make a command a mapping. Anchoring a whole job instead of its script sequence can cause the same schema mismatch.

Quote the whole command, for example the script entry - 'echo "Project version: ${version}"'. Anchor the script list, not the parent job. Review git diff -- .gitlab-ci.yml, then use CI Lint in the pipeline editor with includes resolved and simulation for the target ref/source.

Do not trust generic YAML validation to check GitLab's schema or delete the command to hide the failure. Official script troubleshooting; checked 2026-10-20.

2. Stuck pending runner

Exact historical message is This job is stuck, because you don't have any active runners that can run this job. Runner report #2831 verifies this wording; it varies by release. Online runners can be ineligible because of tags, project assignment, protection or paused state. Inspect capacity after eligibility.

An administrator can use gitlab-runner --version and gitlab-runner verify on the host. Verification checks registration connectivity, not executor health. In Build > Runners, compare expanded job tags: one runner must have every requested tag. Correct the job tags for a suitable runner or request the needed runner capability. Untagged jobs require acceptance of untagged work. Check protected-ref eligibility before creating the corrected pipeline.

Do not remove protection/all tags simply to start jobs; commands inside pending jobs cannot fix assignment. Official runner rules and verify command; checked 2026-10-20. This is a checklist, not a confirmed repair for every outage.

3. Cache/artifact paths find no output

Exact artifact message is No files to upload; verified cache fragment is no matching files, preceded by the actual path. The producer may have failed or the path may be outside the project. Cache is optional; artifacts carry required output.

After the producer, use narrow diagnostics such as pwd, ls -ld .gradle dist and test -f dist/app.tar, replacing sample paths. For Gradle, export GRADLE_USER_HOME="$CI_PROJECT_DIR/.gradle" before its existing command puts storage inside the project; configure relative cache paths such as .gradle/caches/. Point artifacts.paths at actual build outputs and rerun the producer.

Do not cache the whole home directory, fabricate empty outputs or rely on cache availability for correctness. Artifact troubleshooting and official caching guide; checked 2026-10-20.

4. Needed artifacts cannot be retrieved

Exact message is This job could not start because it could not retrieve the needed artifacts. Causes include absent outputs, expired retention or insufficient access. Inspect the producer's artifact browser and the job/ref selected by needs or dependencies. Regenerate expired output at the intended revision; extend artifacts.expire_in to cover the handoff. For cross-project access check triggering-user permissions and job-token allowlisting where applicable.

After the repair, test -f dist/app.tar in a disposable consumer run checks this sample output path; substitute your real file. Do not broaden credentials globally, drop required dependencies or retry expired artifacts indefinitely. Official retrieval troubleshooting; checked 2026-10-20.

5. rules excludes a needed job

Exact excerpt is 'unit_tests' job needs 'compile' job, but 'compile' does not exist in the pipeline. The source continues with an explanation about conditional inclusion. The consumer survives rules evaluation while its producer does not.

For required output, align rules so the producer exists whenever needed. Only for genuinely optional output, use a needs entry containing job: compile and optional: true. Review git diff -- .gitlab-ci.yml and run CI Lint simulations for branch, merge-request and scheduled contexts used by the project.

Do not mark required builds optional to pass lint or remove needs and silently change artifact downloads. Official needs troubleshooting; checked 2026-10-20.

Community evidence

A prompt to give your agent

Read the linked GitLab source before editing; do not guess strings, versions or keywords. Capture the first error, source/ref, merged YAML and runner version. Classify validation, scheduling, upload, retrieval or graph creation. Draft the smallest diff and propose CI Lint simulations plus a disposable artifact check. Do not alter protection, credentials or production deployments.

Mistakes to check

  • Using only a generic YAML parser.
  • Treating online status as matching tags.
  • Confusing caches with required artifacts.

Limits

No pipeline, runner, cache or artifact transfer executed. Community examples are older; no statistical source establishes the most frequent errors in 2026. Historical runner reports do not prove current defects; some issue bodies were only search-visible. Newer multi-cause pending banners, provider-specific cache diagnostics and alternate needs wording were not independently verified for an installed instance. Prefixes/suffixes vary. All official references checked 2026-10-20.

Started from a post by @GitLab, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# yaml invalid / No files to upload: GitLab CI fixes?
Summary: As of October 2026, GitLab CI failures need separate YAML/schema, runner eligibility, missing output, artifact access and rules/needs repairs. Quote whole commands, match runner tags, repair output paths and align required jobs before retrying (checked 2026-10-20).
Copy for agent
get the whatworks thread gitlab-ci-yaml-invalid-pending-artifacts-needs-error-cluster and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread gitlab-ci-yaml-invalid-pending-artifacts-needs-error-cluster
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks