Split Pipeline logic from MergeRequests::RefreshService
What does this MR do and why?
This MR splits pipeline refresh logic from MergeRequests::RefreshService
into a dedicated service and background worker as part of our ongoing effort to decompose the monolithic refresh service.
Changes:
- Creates
MergeRequests::Refresh::PipelineService
to handle pipeline refresh logic - Adds
MergeRequests::Refresh::PipelineWorker
to process pipeline refreshes asynchronously - Introduces feature flag
split_refresh_worker_pipeline
to control the rollout - Maintains backward compatibility by keeping existing logic when feature flag is disabled
Benefits:
- Reduces complexity of the main
RefreshService
- Enables independent scaling of pipeline refresh operations
- Improves observability and error handling for pipeline-specific operations
- Follows the established pattern from notification worker split
References
Part of the broader effort to split MergeRequests::RefreshService
into smaller, focused services.
To Test:
- Have an MR with pipelines
- Turn on feature flag
Feature.enable(:split_refresh_worker_pipeline)
- Push to the MR
- Check in the
log/sidekiq.log
file forPipelineWorker
being executed - Check that the pipeline for the MR is created
- Push with
git push -o ci.skip origin your-branch
to check that the params are passed through correctly and pipeline is skipped
Edited by Marc Shaw