Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
migration system
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2013 at 11:24 UTC
Updated:
29 Jul 2014 at 23:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
chx commentedComment #2
eliza411 commentedUpdating the issue to reflect that map has been renamed to static_map
Comment #3
eliza411 commentedI'm trying to sort out the "getting started" steps for writing migrations. Uploading my work-in-progress on the config file.
Comment #4
eliza411 commentedAfter much patient explaining from chx and some excellent new docs at https://drupal.org/node/2135345#scalar_list, here's a revised migration config file.
We still need tests and the two migration-specific plugins.
Comment #5
eliza411 commentedI'm not sure how the attachment got lost - here it is.
Comment #6
bdone commentedgoing to try some work on this.
Comment #7
bdone commentedhere is an as-is first pass, still needing much work...
Comment #8
bdone commentedComment #9
chx commentedI have added the missing two plugins. Note how SystemUpdate7000 processes a string while NodeUpdate7008 processes the array -- as instructed by the handle_multiples key in their respective class annotation. This is absolutely untested. What we need at this point is a dump which has several roles with permissions that the pipeline changes.
Comment #10
chx commentedComment #11
chx commentedThis passes for me but it won't pass the bot without the related issue and it needs more tests so I am keeping it at needs work.
Comment #12
chx commentedComment #13
bdone commentedgoing to update the test to assert the mapped permissions...
Comment #14
bdone commentedthis updates the asserts, including the mapped permissions from the permissions key in config. patch #12 is against HEAD from the imp sandbox. i wasn't quite sure how to re-roll this, amidst the imp sandbox to core issue queue transition.
Comment #15
chx commentedThanks, I will reroll once all the dependencies are in. It's very helpful to see it this cleanly -- a few more permissions are necessary still but I can add those now now that it's this cleanly visible what adding permissions mean, like 'administer nodes' (to test NodeUpdate7008) and something to test SystemUpdate7000.
Comment #16
chx commentedComment #17
chx commentedComment #18
chx commentedI recall webchick protesting the transform() @inheritdoc stating it's a lie. I can't argue that... so documented them.
Comment #19
dawehnerThis variable name is not really helpful to understand what this plugin manager does. what about using migrateEntityField(Plugin)Manager ?
As the documentation of __construct as well as properties are missing, I had to go all the way down to the container call to figure out what this could mean.
If we don't really need it, let's try to not add it now?
Comment #20
dawehnerAgain ... please add @group Drupal
I try to figure out why we need a seperate namespace here?
Comment #21
chx commentedI will reroll tomorrow for plugin manager but I am not going to remove the commented out parts from Entity. It'd make the sandbox a must to keep around and that's superb inconvenient. Such parts are the price for small, parallel patches instead of a two megabytes patch, and good luck reviewing. I have relented on everything, making the docs impeccable on the first go even at the cost of velocity but I am not relenting on this one -- getting Entity complete would require to add the field and field instance migrations so we can test fielded entities being migrated but those are entities so they would need to be in the same patch. So we would end up with entity, field settings migration, field instance settings migration and then either node or user (those will become fielded entities) all in a single patch.
Comment #22
chx commentedFixed those that need fixing. We need a separate namespace cos this allows you to specify the real plugin class and then the preg_replace in MigrateSqlSourceTestCase::setUp derives the test clas.
Comment #23
chx commentedThis contains andypost's fixes to Entity.php and my tests asserting that id map saving worked. Will need to add this to the guide on gdo...
Comment #24
chx commentedDiscussed with webchick, moved commented out code into followups but linked them from code this way interested parties can see them / contribute / not forget / etc.
Comment #25
andypostThat's enough for the scope, another follow-up should be to add stub entities.
RTBC with small comment change
Comment #26
chx commentedComment #27
chx commentedComment #28
chx commentedComment #29
chx commentedComment #30
alexpottCommitted c2e68a5 and pushed to 8.x. Thanks!
Cleaned up some very minor things during commit.