Problem/Motivation
The D6NodeDeriver calls checkRequirements() when building migration plugin definitions:
$node_types = static::getSourcePlugin('d6_node_type');
try {
$node_types->checkRequirements();
}
catch (RequirementsException $e) {
// If the d6_node_type requirements failed, that means we do not have a
// Drupal source database configured - there is nothing to generate.
return $this->derivatives;
}
This causes a check of the database connection, because checkRequirements() does that.
If there is a node migration which depends on a database connection that's not available, then the attempt to get that connection will time out.
This means that the whole migration system is unusable, because migration tasks such as 'drush ms MIGRATION' load all migration definitions.
Workaround: override the database settings in settings.local.php.
Steps to reproduce
Run `drush ms MIGRATION` on a system with a node migration that uses a connection that's not available.
Proposed resolution
The reason for calling checkRequirements() is given in the comments in the catch block:
// If the d6_node_type requirements failed, that means we do not have a
// Drupal source database configured - there is nothing to generate.
Use another way to check the connection is configured which will not cause a timeout.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet