Skip to content

Add pipeline_hierarchy_size

Kasia Misirli requested to merge 358076/Add_pipeline_hierarchy_size into master

What does this MR do and why?

MR for https://gitlab.com/gitlab-org/gitlab/-/issues/358076

  1. Adding a new column to plan_limits called pipeline_hierarchy_size with default value of 1000.
  2. Adding an input field for admin users to update the pipeline_hierarchy_size in admin settings
  3. Allowing pipeline_hierarchy_size to be passed via params to controller and being saved in the db.
  4. Using the pipeline_hierarchy_size in CreateDownstreamPipelineService when checking if the the count has reached the limit.

How to set up and validate locally

  1. Checkout this branch and run the migration.
  2. Head over to the admin UI under Settings > CI/CD > Continuous Integration and Deployment > CI/CD limits > Maximum number of downstream pipeline tree size per project and see that the value out of the box is set to 1000 (default value).
  3. Change the value to another value.
  4. Create multiple children pipelines and see if the pipeline reaches your limit, will a new pipeline be created or will it in fact fail as expected.

I set the limit to 2 and I got this error when I had a tree of more then 2 downstream pipelines. Screen_Shot_2022-12-05_at_12.35.24

MR acceptance checklist

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

Edited by Kasia Misirli

Merge request reports