Handle Praefect replication lag in CreatePipelineWorker

What does this MR do and why?

This MR relates to #504460 and handles a transient failure in CreatePipelineWorker where pipeline creation fails with "Reference not found" because Praefect has not yet replicated a newly pushed ref to all nodes.

Worker changes (app/workers/create_pipeline_worker.rb)

  • Introduces PraefectReplicationRetryError, a RetryError subclass, so Sidekiq retries the job without reporting the error to Sentry
  • Raises this error when all three conditions are met:
    1. The pipeline error is "Reference not found"
    2. The push is for a new branch/tag (blank before SHA)
    3. The FF ci_create_pipeline_worker_retry_on_reference_not_found is enabled

MR acceptance checklist

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

References

Edited by Oleg Yakovenko

Merge request reports

Loading