migrate_7x_claw exits batch prematurely if xpath query does not find a result in the first batch #1516
Labels
Subject: Migration
Concerning migration from Islandora 7 to Islandora 2.x.x
Type: bug
identifies a problem in the software with clear steps to reproduce
There is an edge case wherein, the migration will not run if there is no matching results in the first batch of results. This is due to how the
core/modules/migrate/src/MigrateExecutable.php
prepares to perform the migration and howDataParserPluginBase
deals with non-matching results. Before starting the migrationMigrateExecutable
rewinds the iterator and checks if it's valid. In our implementationDataParserPluginBase
is used as the iterator, when told to rewind, it will do so, but it will iterate over its contents until it finds a the first valid result, since there isn't any guarantee of valid results for the URLs it's told to iterator over. If no valid result is found the iterator itself (DataParserPluginBase
) will be considered invalid, as it has no concept of batches. ThereforeMigrateExecutable
will assume there is no content to migrate.From
MigrateExecutable
:Steps to reproduce:
The text was updated successfully, but these errors were encountered: