Skip to content

Fix PipelineBatchWorker retries

What does this MR do and why?

Updates the BulkImports::BatchTracker state machine to allow the status transition from started to started similar it was done on BulkImports::Tracker model.

Such transition is required to allow the BulkImports::PipelineBatchWorker worker to be retried.

To provide some context, the worker is retried when a network error occurs during the extract phase of the bulk import pipeline. It's important to note that in this phase, no updates are made, so it's perfectly acceptable to retry the worker and pipeline in such circumstances.

Related to: #424970 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Enabled Direct Transfer Migration in Admin Area -> Settings -> General -> Visibility and access controls -> Import sources
  2. Enabled `bulk_imports_batched_import_export feature flag
  3. Perform a Direct Transfer by going to http://gdk.test:3000/groups/new#import-group-pane
  4. During the migration tries to cause a network error to make the BulkImports::PipelineBatchWorker worker be retried
  5. Check if the migration ran successfully
  6. Check in the migration history if no error occurred

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rodrigo Tomonari

Merge request reports

Loading