Closed (fixed)
Project:
Drupal core
Version:
9.1.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Oct 2020 at 12:19 UTC
Updated:
22 Feb 2021 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
huzookaComment #3
huzookaComment #4
huzookaAdded a test-only patch for comment type (comment "bundle") migration tests to verify that no comment types are migrated when
comment,nodeor both of them are disabled on the source.The new "complete" patch adds additional test coverage for the new
CommentType(comment_type) migration source plugin.\Drupal\Tests\comment\Kernel\Plugin\migrate\source\CommentTypeTestverifies the basic functionality.\Drupal\Tests\comment\Kernel\Plugin\migrate\source\CommentTypeRequirementsTesttests the expected\Drupal\migrate\Exception\RequirementsExceptionComment #7
wim leersTested in detail, works great!
Comment #8
quietone commentedYes, the test coverage certainly looks thorough!
The two items I found are in the d6/d7 MigrateCommentTypeTests.
When the source fixture needs to be changed in a Migrate test the MigrateDumpAlterInterface is used for that. That would mean that this new test would move to a separate file. I am on the fence about this. It seems extra work for little gain.
According to the data provider this also tests with node and comment disabled but this summary suggests, to me, that it is either one or the other that is disabled. Maybe just make the summary line generic, "Tests comment type migration".
I'm setting to NW and feel free to push back on the first point.
Comment #9
huzookaComment #10
huzookaRe #8:
MigrateDumpAlterInterface::migrateDumpAlter()but also explains why it isn't used in this case.Comment #11
wim leersComment #13
catchCommitted 20895bd and pushed to 9.2.x. Thanks!
I think this should also go into 9.1.x - while it adds a class, it's fixing a bug and we generally err on the side of backporting migration fixes especially since we're still in the rc phase, but leaving at 'to be ported' in case we need to discuss more.
Comment #14
wim leers+1
Comment #15
wim leersSorry for not following through sooner here 😬
The patch in #10 in fact applies cleanly to
9.1.x— and still does today. Queuing tests to prove this…Comment #16
catchComment #17
huzookaComment #18
huzookaLet's see (first with SQLite)!
Comment #19
huzookaWith SQLite #18 works as it should – let's see othere nvs...
Comment #21
huzookaFailure of env PHP 7.3 & MySQL 5.7 seems to be unrelated (and I think I have already seen that before).
https://www.drupal.org/pift-ci-job/1958716
Comment #22
huzookaComment #23
quietone commentedI made a diff of the patches in #10 and #18 and confirmed that the reroll is fine. Patch still applies.
Comment #24
alexpottWe need a change record here to announce the new source migration plugin.
Comment #25
wim leersCR created: https://www.drupal.org/node/3197281
Comment #26
alexpottLet's get this into 9.1.x - in #24 I didn't realise that we'd already added to 9.2.x and this was only open for 9.1.x backport. I agree that since this is an addition, that fixes a bug, it is safe to backport.