Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
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 `BulkImport` record
- Creates an `Import::Offline::Configuration` record belonging to the new bulk import
- Creates `BulkImports::Entity` records 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::` or `Import::Offline::` to be consistent with offline transfer exports (`Import::Offline::Export`), but there's always flexibility in naming
issue