Moving cancelPendingPipeline to async worker
What does this MR do and why?
CancelPendingPipelines step in CreatePipelineService is taking too long to run synchronously.
Instead of running sync, we can move this CancelPendingPipeline step into a sidekiq worker to process async.
CancelPendingPipeline -> CancelPendingPipelineWorker -> CancelPendingPipelineService
Screenshots or screen recordings
Older pipelines that were in pending should be canceled when a newer pipeline runs.
New Screenshots of child pipeline canceled when new pipeline is queued
How to set up and validate locally
- Create a pipeline. This will get picked up pretty fast into a "Running State"
- Create another pipeline on same commit hash. This will be put into "Pending" depending on number of runners.
- Make a commit that updates the branch.
- The pipeline in step 2 should be canceled because it's outdated.
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.
Feature Flag Rollout Issue:
Related to #383156 (closed)
Edited by Max Fan