Skip to content

CI "needs" limit can be disabled

What does this MR do and why?

The CI/CD limit for the number of DAG jobs doesn't respect 0 as value to disable this limit.

How to set up and validate locally

Outdated old Description
CI Yaml
a:
  script:
    - echo a
b:
  script:
    - echo b
c:
  script:
    - echo c
  needs:
    - a
    - b
  1. Create a project and a .gitlab-ci.yml with the contents above
  2. Visit http://127.0.0.1:3000/admin/application_settings/ci_cd#js-ci-cd-settings and set Maximum number of DAG dependencies that a job can have to 1
  3. Go back to the project and try to run a pipeline
  4. Observe that the pipeline fails with c: one job can only need 1 others, but you have listed 2. See needs keyword documentation for more details
  5. Go back to the admin settings and set Maximum number of DAG dependencies that a job can have to 0
  6. Go to the project again and run a new pipeline
  7. Observe that the pipeline is created correctly

Screenshots

image

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #382421 (closed)

Edited by Niklas van Schrick

Merge request reports