Update ResetSkippedJobsService to support multiple jobs input
What does this MR do and why?
This MR updates ResetSkippedJobsService
so that it can take multiple jobs as input.
The purpose of this change is to make ResetSkippedJobsService
more performant when processing the dependent jobs of multiple jobs. This feature is intended to be used as part of the fix for #388539 (closed).
Feature Flag: ci_support_reset_skipped_jobs_for_multiple_jobs
Updates include:
-
reset_source_bridge
only runs once for all the jobs inputted. -
needs_dependent_jobs
gets all the jobs from the earliest stage of the inputted jobs. -
needs_dependent_jobs
uses a::Ci::Processable
relation that consists of multiple job IDs instead of just one.
Note that ResetSkippedJobsService
continues to support a single processable input as well.
Resolves: #410223 (closed)
How to set up and validate locally
All processes that call ResetSkippedJobsService
should behave as expected. There should be no visible change in the pipeline processing before and after the FF is turned on.
We can test with a simple pipeline example:
- Update your
.gitlab-ci.yml
file with the following contents: test.yml - Run the pipeline and notice the skipped jobs.
- Play the manual job and observe that all the skipped jobs transition to "created" status.
- Turn on the feature flag:
Feature.enable(:ci_support_reset_skipped_jobs_for_multiple_jobs)
. - Repeat steps 2-3 and observe that the behaviour is the same.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #410223 (closed)