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.

Comments

phenaproxima created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, migrate-file_destination_schema.patch, failed testing.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new7.53 KB
new2.58 KB

Hmm, OK -- forgot to add the "if migration does not exist" logic in prepareMigrations(). Fixed now.

Status: Needs review » Needs work

The last submitted patch, 3: 2548841-3.patch, failed testing.

phenaproxima’s picture

Status: Needs work » Postponed

This 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.

webchick’s picture

Status: Postponed » Needs work
webchick’s picture

Status: Needs work » Postponed

WAT.

quietone’s picture

What does WAT mean?

phenaproxima’s picture

In this context, that webchick forgot to change the issue status. :)

phenaproxima’s picture

Status: Postponed » Needs work

Unblocked. Probably needs a re-roll and such.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new613 bytes

Try 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.

mikeryan’s picture

Status: Needs review » Needs work

Where's the part where we add it to the file module?

phenaproxima’s picture

Title: Move entity:file destination schema into File module » Remove entity:file destination schema from Migrate Drupal

It'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.

mikeryan’s picture

Status: Needs work » Needs review

Oh, so it is... And no part of Drupal objected to it being defined twice? Interesting...

Status: Needs review » Needs work

The last submitted patch, 11: 2548841-11.patch, failed testing.

phenaproxima’s picture

Status: Needs work » Needs review
StatusFileSize
new1.17 KB

This 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.

mikeryan’s picture

Status: Needs review » Reviewed & tested by the community

Yes!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Easy-peasy.

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 78e2e8e on 8.0.x
    Issue #2548841 by phenaproxima: Remove entity:file destination schema...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.