Make BulkImports::RelationBatchExportWorker and BulkImports::RelationExportWorker retriable
BulkImports::RelationBatchExportWorker and BulkImports::RelationExportWorker workers call services that rescue StandardError (rescue 1, rescue 2). Consequently, exceptions don't bubble up and the workers don't retry.
Allowing the workers to try would increase the chances for a migration to succeed.
An example of when these workers can fail is when they are compressing the exported files, and Sidekiq receives TERM Signal, causing the workers to fail with the error code 15 similar to Project export fails with message "command exit... (#370617)
Proposed solution
- Remove the
rescue StandardError
from the services. - Update the workers to use the
sidekiq_retries_exhausted
callback to log the fail reason and update the export status to fail in case the retries are exhausted
Edited by Rodrigo Tomonari