Problems with `needs:`

Summary

I have a monorepo with a few dozens of projects. So I decided to use the new DAG feature. I configured needs: where needed and created a new merge request.

  1. Most of the jobs were run as expected however one of the jobs from the 3rd stage which was dependent from a job from the 1st stage wasn't run. bug_gitlab1 The 3rd and 4th stages of the pipeline were marked as pending. bug_gitlab2 The job's page stated that one of the needed jobs hadn't been run. Cancelling and resuming that job didn't change anything. However rerunning the needed job made the dependent job run.

  2. The next commit in this merge request made one of the jobs from the 2nd stage fail. The dependent job from the 3rd stage was skipped as expected. But the job from the 4th stage dependent from that job from the 3rd stage was run and failed. bug_gitlab3 Rerunning needed job from the 2nd stage made the dependent job from the 3rd stage also rerun but not the dependent job from the 4th stage.

What is the current bug behavior?

  1. Sometimes jobs with needs: hang.
  2. Jobs dependent from the skipped job may run.

What is the expected correct behavior?

  1. Jobs with all of the needs fulfilled should be run
  2. Jobs dependent from the skipped job should be skipped
Edited Oct 18, 2019 by Daniil Ayzenshteyn
Assignee Loading
Time tracking Loading