Skip to content

Broadly restrict downstream pipeline tree size

drew stachon requested to merge restrict-pipeline-total-hierarchy-count into master

Four Merge Requests to address https://gitlab.com/gitlab-org/gitlab/-/issues/358075

Step Merge Request
1 !95753 (merged) Rename pipeline hierarchy methods
2 !95756 (merged) Report full size of Ci::Pipeline hierarchy trees
3 !95857 (merged) Broadly restrict downstream pipeline tree size 👈 You are here
4 !97841 (merged) Enable pipeline hierarchy size limit by default

What does this MR do and why?

Until now, we've only counted downstream pipelines within the same project against MAX_NESTED_CHILDREN. With this change, we'll now consider the entire queryable pipeline tree, including different branches off the same ancestor.

How to set up and validate locally

  1. Review the new method complete_hierarchy_count and the associated specs for it.
  2. Given the specified behavior, see how we've added a check for it in the CreateDownstreamPipelineService.
  3. Make sure the specs pass.

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 drew stachon

Merge request reports