Settings to limit the number of concurrently running pipelines per project

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary:

Manage the number of pipelines running concurrently within a project. This will help in the following scenarios

  • Optimize Resource Usage
  • Prevent race conditions for MR's on the same branch
  • A single rebase can trigger thousands of jobs that clone the full repository in parallel, with no mechanism to detect or deprioritize these anomalous workloads. The CI patterns - hundreds of parallel jobs, full repository clones, and massive matrix deployments - consistently push Gitaly beyond its limits, making the monorepo a frequent source of platform-wide incidents.

This feature request aims to introduce a configuration setting within each project that dictates the maximum number of pipelines that can run simultaneously.

Proposal:

Project-Level Setting:

  • Add a new configuration option within the CI/CD settings of each project. This setting will determine the maximum number of pipelines that can run simultaneously for that particular project. When this limit is reached, subsequent pipelines will be queued and will only commence once a slot becomes available (i.e., one of the running pipelines completes).
  • An additional setting that will restrict it to branches
Edited by Rutvik Shah