Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
While looking at Migration::findMigrationDependencies
, I saw that migration dependencies are supposed to be automatically set when using the now deprecated 'migration' process plugin. This method has not been updated for the new 'migration_lookup' process plugin.
/**
* Find migration dependencies from the migration and the iterator plugins.
*
* @param $process
* @return array
*/
protected function findMigrationDependencies($process) {
$return = [];
foreach ($this->getProcessNormalized($process) as $process_pipeline) {
foreach ($process_pipeline as $plugin_configuration) {
if ($plugin_configuration['plugin'] == 'migration') {
$return = array_merge($return, (array) $plugin_configuration['migration']);
}
if ($plugin_configuration['plugin'] == 'sub_process') {
$return = array_merge($return, $this->findMigrationDependencies($plugin_configuration['process']));
}
}
}
return $return;
}
Also, we should still support the deprecated iterator process plugin.
Proposed resolution
Add a check for the 'migration_lookup' & iterator process plugins so their dependencies are set correctly.
Remaining tasks
Add a failing testFix it- Review
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#8 | interdiff-2945563-4-8.txt | 2.34 KB | maxocub |
#8 | 2945563-8.patch | 2.71 KB | maxocub |
#8 | 2945563-8-test-only.patch | 2.49 KB | maxocub |
Comments
Comment #2
maxocub CreditAttribution: maxocub as a volunteer commentedHere's a filing test and the fix.
Comment #4
maxocub CreditAttribution: maxocub as a volunteer commentedMore test coverage and doc block improvements.
Comment #5
heddnAssigning to myself for review.
Comment #6
heddnDoes this need to handle iterator and sub_process, both? Either way, I'd like to see a test with iterator.
Comment #7
heddnComment #8
maxocub CreditAttribution: maxocub commentedRight, good catch!
Comment #10
maxocub CreditAttribution: maxocub commentedIS updated.
Comment #11
heddnAssuming this comes back green, I think this ready for commit. Full test coverage to fix a bug. Should be back ported to 8.5. For that I'm adding a test run, just to be safe.
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedTests are passing, restoring RTBC
Comment #16
alexpottTestbot had a hiccup re-rtbcing
Comment #18
maxocub CreditAttribution: maxocub commentedAnother hiccup, back to RTBC.
Comment #19
alexpottCommitted and pushed a809a15ece to 8.6.x and 6fca7ffdea to 8.5.x. Thanks!