Skip to content

3281752: Clone the migration source plugin to get the count, avoiding intializing any generators.

The issue points out this issue with migrate_source_csv which uses a generator. If we use up that generator counting the total items in the migration, we can't later rewind it when we actually perform the import. The MigrateImportSync event subscriber uses this cloning method to avoid this exact problem. This change just replicates the same fix here when trying to get the count.

Closes #3281752

Merge request reports