This is the final piece of #2533886: [meta] Move module-specific migration support into the particular modules supported.
Moving the entity:file plugin's config schema into the File module is a bit tricky because it would break migration tests which did not enable the File module (and only ones which pertain to file migrations should have to do that). The reason this was the case is because the tests' base classes would install all available migrations, not just the subset needed to complete the test.
This patch adds a bit of logic to MigrateTestBase::executeMigration() which will install the requested migration if it does not exist. Which is a slightly awkward place to put such logic, but it's the quickest and easiest way and doesn't require me to modify all of the migration tests.
The migration test suite is undergoing some restructuring anyway so it's possible this will be moved somewhere more suitable at some point in the future. But for now, we need to get this done.
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 2548841-16.patch | 1.17 KB | phenaproxima |
| #11 | 2548841-11.patch | 613 bytes | phenaproxima |
| #3 | interdiff-2548841-0-3.txt | 2.58 KB | phenaproxima |
| #3 | 2548841-3.patch | 7.53 KB | phenaproxima |
| migrate-file_destination_schema.patch | 5.98 KB | phenaproxima |
Comments
Comment #3
phenaproximaHmm, OK -- forgot to add the "if migration does not exist" logic in prepareMigrations(). Fixed now.
Comment #5
phenaproximaThis fix is, unfortunately, blocked by the presence of load plugins. (They cause test failures.) Postponing for when load plugins have been removed from the Migrate API.
Comment #6
webchickSounds like that is #2549013: Remove load plugins which is in turn postponed on #2549003: Create a builder for the d6_profile_values migration.
Comment #7
webchickWAT.
Comment #8
quietone commentedWhat does WAT mean?
Comment #9
phenaproximaIn this context, that webchick forgot to change the issue status. :)
Comment #10
phenaproximaUnblocked. Probably needs a re-roll and such.
Comment #11
phenaproximaTry again...this patch passes MigrateDrupal6Test so with a bit of luck it'll pass everything else and we'll be able to finally close out the Great Migration Migration.
Comment #12
mikeryanWhere's the part where we add it to the file module?
Comment #13
phenaproximaIt's already there. It was copied in during the Great Migration Migration; it simply couldn't be removed from Migrate Drupal without causing a kerfuffle.
Comment #14
mikeryanOh, so it is... And no part of Drupal objected to it being defined twice? Interesting...
Comment #16
phenaproximaThis should fix it -- MigrateDrupalTestBase now enables the file module as a matter of course. This is a kludge; the real solution is that migrations need to be installed one at a time by the tests, not all at once. But that's hard, and with this quick-fix we can finally close out the Great Migration Migration. The tests are very kludgey to begin with, so that's a larger issue that needs more attention later.
Comment #17
mikeryanYes!
Comment #18
webchickEasy-peasy.
Committed and pushed to 8.0.x. Thanks!