Skip to content
Latchkey

GitLab CI "interruptible" Not Cancelling Redundant Pipelines

interruptible: true lets GitLab auto-cancel a running pipeline when a newer commit supersedes it. It stops working once a non-interruptible job has started, or when the project auto-cancel setting is disabled.

What this error means

Pushing a new commit does not cancel the older still-running pipeline, so redundant pipelines pile up and waste runner minutes - even though jobs are marked interruptible.

Pipeline behavior
# New commit pushed, but the previous pipeline keeps running.
test:
  interruptible: true
  script: make test
deploy:
  script: make deploy   # NOT interruptible -> locks the whole pipeline

Common causes

A non-interruptible job already started

Once any job without interruptible: true begins running, GitLab will no longer auto-cancel that pipeline - the whole pipeline becomes non-interruptible from that point.

Auto-cancel-redundant setting disabled

Auto-cancellation of redundant pipelines is a project CI/CD setting. If it is off, interruptible has no effect regardless of how jobs are marked.

How to fix it

Mark early jobs interruptible, gate deploys

Keep build/test interruptible and make irreversible jobs (deploys) manual or late so they do not start before cancellation can happen.

.gitlab-ci.yml
default:
  interruptible: true   # applies to all jobs by default

deploy:
  interruptible: false  # protect a real deployment from cancellation
  when: manual
  script: make deploy

Enable auto-cancel in project settings

  1. Open Settings → CI/CD → General pipelines.
  2. Enable "Auto-cancel redundant pipelines".
  3. Confirm early jobs are interruptible so a newer commit cancels the older pipeline before deploy starts.

How to prevent it

  • Set interruptible: true via default: for build/test jobs.
  • Keep irreversible jobs (deploy/release) non-interruptible and gated.
  • Enable auto-cancel redundant pipelines at the project level.

Related guides

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