Problem/Motivation
From CLI, running a migration group is easy: drush mim --group=foo.
It would be great to also have a way to do that easily from the UI.
Proposed resolution
Expose a new operation "Execute" operation for each of the listed migratioin groups at /admin/structure/migrate.
Then a similar UI than the presented on each migration run, like the migrate_tools.execute route, will be presented.
The execution will happen in a batch operation.
Reviewing a bit how the import is working on the current UI, I see the \Drupal\migrate_tools\MigrateBatchExecutable class instantiated and called from the form submit handler. But since it extends Drupal\migrate_tools\MigrateExecutable, which in turn extends Drupal\migrate\MigrateExecutable, only one migration is assumed to be passed, e.g. the following relevant line in \Drupal\migrate_tools\MigrateBatchExecutable::batchImport():
$operations = $this->batchOperations([$this->migration], 'import', [
'limit' => $this->itemLimit,
'update' => $this->updateExistingRows,
'force' => $this->checkDependencies
]);
It may be a good idea to change how this works to be able to pass several migrations, or even a migration group.
It seems like #2921721: Consolidate CLI functionality into a service may be a a way to generalize part of the shared functionality, and may allow re-using a service from both drush and UI, so maybe that issue could block this one.
Work-around: It is always possible to run all the migrations in the group manually one by one, but that can become tedious if the number of them is not small.
Remaining tasks
Ask maintainers for feedback about their opinion on this feature.
Implement the feature.
Review.
User interface changes
New option at /admin/structure/migrate to be able to run all migrations in a given group.
API changes
N.A.
Data model changes
N.A.
Comments
Comment #2
heddnSure, sounds like a nice feature.
Comment #3
andypost+1 to ui
Comment #4
Christopher Riley commented+1 here as well
Comment #5
kriboogh commentedSee https://www.drupal.org/project/migrate_tools/issues/2924296