Skip to content

Move `Chain::Limit::Size` from ee to core

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Fix #287669

Limits related to pipeline creation such as Chain::Limit::Size, Chain::Limit::Activity and Chain::Limit::JobActivity are defined on GitLab EE codebase but not in Core...

After checking, only Chain::Limit::Size requires migration:

  • Chain::Limit::Size: Addressed by this MR
  • Chain::Limit::Activity: According to f30fa989, Activity is deprecated and removed. Nothing to do here.
  • Chain::Limit::JobActivity: According to !100184 (3e4785c8), JobActivity was deprecated in favor of ActiveJob, which is already in core. Nothing to do here.

How to review this MR

Please consider review commits separately.

The first commit addresses #287669. The following 7 commits fix Rubocop violations for the moved files, one rule at a time. That's because modifying the .rubocop_todo to ignore the new file paths doesn't seem to be easier.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Should be unchanged. Please see the "How to set up and validate locally" section below

Before (tested on master da55fe1) After
foss image Can create pipeline successfully image Blocked by The number of jobs has exceeded the limit of 2.
ee image Blocked by The number of jobs has exceeded the limit of 2. image Blocked by The number of jobs has exceeded the limit of 2. (unchanged)

How to set up and validate locally

  1. Visit /admin/application_settings/ci_cd#js-ci-cd-settings and set Maximum number of jobs in a single pipeline to 2 image
  2. Create a new project, with a new pipeline with 3 jobs. (Just remove one job from the default Pipeline Editor template)
  3. If it's CE with master code, the pipeline should be created successfully. To simulate CE, follow Simulate a CE instance with a licensed GDK .
  4. If it's CE with new code or EE, the pipeline creation should be blocked by The number of jobs has exceeded the limit of 2. image

Related to #287669

Edited by Chou Yu Ta

Merge request reports

Loading