Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Now that #2859304: Show field type migrations correctly in Migrate Drupal UI is in the cck and field migrations need 'source_module' and 'destination_module' added to the annotations.
See change record, Migrate field plugins now require source_module and destination_module
Proposed resolution
Add the following to the cck and the field plugin.
* source_module = "addressfield",
* destination_module = "address"
Remaining tasks
Write the patch
review
Comment | File | Size | Author |
---|---|---|---|
#16 | 2920118-16.patch | 3.03 KB | heddn |
| |||
#16 | interdiff_10-16.txt | 1.82 KB | heddn |
Comments
Comment #2
quietone CreditAttribution: quietone as a volunteer commentedComment #3
quietone CreditAttribution: quietone as a volunteer commentedset to NR for testing
Comment #4
heddnComment #5
heddnTests only patch. Hopefully this shows that tests here are failing. Which justifies a critical priority.
Comment #6
heddnOK, this should show a test failure.
Comment #7
heddnComment #8
heddnAre we testing against core 8.5.x HEAD? I cannot tell. When I ran the tests locally against 8.5.x HEAD, they failed for the patch in #6.
Comment #9
quietone CreditAttribution: quietone as a volunteer commentedI get the same results as heddn, the test only patch in #6 fails.
Looking at the console output from the testbot, that new test isn't running
Why isn't it running?
tagging as a blocker because it is prevent work in commerce_migrate on lots of issues.
Comment #10
quietone CreditAttribution: quietone as a volunteer commentedIt was a namespace error on the test, also added a comment and a space.
Comment #12
joshmillerFunctionally applies and the tests speak for themselves. Definitely confusing to the use the term "cck" (a very D6 term) in regards to a very D7 module, "addressfield." I can only surmise this is because we're dealing with ubercart or we're defining something that can cross both D6 and D7 paths.
Just be aware, in D6 world "addressfield" is meaningless.
Comment #13
quietone CreditAttribution: quietone as a volunteer commented@joshmiller, thanks for the review!
The source_module is addressfield because the project page for address states, "The Drupal 8 heir to the addressfield module, powered by the commerceguys/addressing library."
Comment #14
quietone CreditAttribution: quietone as a volunteer commentedIt was a mistake to change to NR.
Comment #15
googletorp CreditAttribution: googletorp as a volunteer and at Reveal IT commentedI'm not familiar with the migrate code, so I don't want to commit any changes.
Overall the code looks good to me, but there are a few flaws:
You have add a comma to this line:
That is a mistake.
In the above code you have added
As far as I can tell, this doesn't do anything and is not used for anything. If the call to getDefinition is done to test that some internal things are not broken, you should add a comment about what you are doing here, otherwise as I read the code you can simply delete this line. The same is done in the other test case.
Comment #16
heddn#15 points are all addressed in this patch. The trailing annotation comma was out of scope code cleanup. I've added an assert not empty on the definition. We are testing that the plugin discovery process is possible and we don't throw any exceptions. But let's assert not empty too to make it more clear. Discovery would throw an exception well before it is ever empty, but this is more obvious.
Comment #17
quietone CreditAttribution: quietone as a volunteer commentedApplied that patch, ran the test, code reviewed. Sorry about the trailing annotation comma, seems I added that in the first patch. Yes that is for another issue.
Therefor RTBC it is.
Comment #19
bojanz CreditAttribution: bojanz at Centarro commentedCommitted, thanks!
Comment #20
quietone CreditAttribution: quietone as a volunteer commented@bojanz, @googletorp. Thank you!