Create offline BulkImports::Create service
Problem
BulkImport records are currently created with BulkImports::CreateService, but this service makes multiple API calls to the source instance to validate the migration request. In offline transfer, we won't be able to make the same validations as direct transfer, but we still need a way to kick off offline transfer imports.
Solution
Create a new service analogous to BulkImports::CreateService that:
- Validates provided object storage creadentials
- Creates a
BulkImportrecord - Creates an
Import::Offline::Configurationrecord belonging to the new bulk import - Creates
BulkImports::Entityrecords for the entities provided in request params - Asynchronously executes
BulkImportWorker
Implementation suggestions
- Validating export file contents should be avoided in this synchronous service. This may limit validations to basic checks like validating the bucket connection, validating that critical files are present in the bucket, validating import permissions, etc.
- The new service should be under the namespace
Import::Offline::Import::orImport::Offline::to be consistent with offline transfer exports (Import::Offline::Export), but there's always flexibility in naming