Feature Request: Add configurable concurrency control for parallel:matrix jobs

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

Problem Statement

When using parallel:matrix to create multiple job instances, GitLab creates and attempts to run ALL jobs simultaneously. For example, a matrix generating 100 jobs will queue all 100 at once, potentially overwhelming runners and external resources.

Proposed Solution:

Add configurable concurrency control in the CI YAML to limit how many parallel matrix jobs can run simultaneously:

deploy:
  parallel:
    matrix:
      - ENVIRONMENT: [dev, staging, prod1, prod2, ..., prod50]
    max_concurrent: 5  # Only 5 jobs run at a time

Use Cases

  • API rate limiting: Prevent jobs from hitting external service limits
  • Resource management: Control infrastructure load without modifying runner configuration
  • Cost control: Limit concurrent cloud runner usage
  • Database connections: Prevent too many simultaneous connections

Benefits

  • Job-level concurrency control without affecting other pipelines
  • Better resource utilization
  • Prevents job failures due to resource exhaustion
  • More predictable pipeline behavior

Alternative Considered

Currently users must use workarounds like runner-level limits (affects all jobs), resource groups (only 1 concurrent), or manual stage batching (defeats the purpose of matrix).

Edited by 🤖 GitLab Bot 🤖