Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
migration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2017 at 05:19 UTC
Updated:
1 Sep 2017 at 06:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nickdickinsonwildeactually I *think* this bugfix is okay for 8.2.x
Comment #3
nickdickinsonwildeshould be noted that in *most* cases there aren't messages to save, but I managed to trigger it by doing something ahem different.
Comment #5
mikeryanGood catch, I saw this happen recently and didn't have a chance to track it down.
At this points bug fixes should go against 8.3.x - I don't believe there will be any more 8.2.x releases, barring critical security fixes (which won't include "normal" bug fixes).
Comment #6
nickdickinsonwildeAh okay, thought there was one or two more.
Here it is rolled for 8.3.x (and including the use statement I neglected to include ahem).
Comment #7
nickdickinsonwildeComment #9
nickdickinsonwildeah need to mock another method...
Comment #10
nickdickinsonwildeComment #12
nickdickinsonwildenever seen that error... looks like a testbot fail, requeueing
Comment #14
nickdickinsonwildeEr that test passed you silly bot!
Comment #15
heddnAssigning to myself to do a review this week.
Comment #16
heddnThis needs a re-roll after #2845486: Rename Migration process plugin and add documentation. Can we also see a tests only patch to demonstrate the problem?
Comment #17
gaurav.kapoor commentedRe roll.
Comment #19
jofitzCorrect the omissions in the re-roll.
Comment #20
jofitzRe-setting to Needs Work for adding a tests-only patch to demonstrate the problem (as requested by @heddn in #16).
Comment #21
jofitzAdded a test to make sure setMessage() is called.
Comment #23
heddnAssigning to myself to review this week.
Comment #24
joelpittetI'm comfortable calling this one done. The test looks pretty heafty, not sure if that could be refactored but it does the job. @heddn, feel free to jump in.
Comment #25
larowlanThis is tying understanding of how the id map works in the migration lookup class.
Are we sure we want to do that?
Shouldn't the id map do this itself? It would make sense for it to have knowledge of how to create a new MigrateMessage class if it needs one.
It doesn't make sense for this knowledge to be embedded in the MigrationLookup class. It also means anyone else using that needs to know that knowledge too.
This is known as 'Inappropriate intimacy'.
Comment #26
heddnPerhaps saveMessage could new it up or inject it somehow if the object doesn't yet exist. I think doing that would address the problem in the IS. If we do that, do we want to deprecate setMessage then? I haven't looked at the code closely enough to make a call on that.
Comment #27
heddnComment #28
larowlanthis is what I was trying to articulate earlier
Comment #29
heddnShould we mark setMessage as deprecated then too?
This looks great.
Is this necessary any more? Or is that a follow-up?
Comment #30
larowlanThere is one other call to setMessage so I think keep it, removing it is out of scope here.
w.r.t test changes - yep they can go.
Comment #32
jofitzHaving waited 21 days for a Novice, I've gone ahead and made the minor changes recommended by @heddn and @larowlan in #29/#30.
This is probably ready for RTBC, but I can't do that having contributed a few patches to this issue.
Comment #33
joelpittetBack to RTBC as items have been addressed from #29 and #30
Comment #34
catchFixed this on commit to 8.5.x/cherry-pick to 8.4.x, thanks!