Follow-up to #2535458: Dispatch events at key points during migration
Problem/Motivation
When event dispatching is added to Migrate, a bunch of logically front-end responsibilities (such as time/memory limiting) now in the core service can be moved to contrib.
Proposed resolution
- Remove obsoleted code from the core Migrate module - support for statistics, time limits, memory limit handling, destination pre/post import/rollback methods that were never actually implemented. Statistics, time limits, memory handling will be the responsibility of front-ends running migrations (in practice, the migrate_tools module in migrate_plus).
Remaining tasks
- Split this patch out from the parent patch.
- Change record.
User interface changes
N/A.
API changes
Remove preImport(), preRollback(), postImport(), and postRollback() from MigrateDestinationInterface - these were never fully implemented. Implementers of this interface no longer need to define these methods.
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | interdiff.txt | 707 bytes | mikeryan |
| #7 | remove_obsoleted-2541580-7.patch | 29.46 KB | mikeryan |
Comments
Comment #1
mikeryanEvents have landed! Now we can remove the obsolete crap...
Comment #2
mikeryan9 files changed, 4 insertions(+), 790 deletions(-)OK, here's what's being removed:
There's one slight functional change - protected checkStatus() has been removed from MigrateExecutable, since all the running code it contained is removed. It did have a commented-out stub to allow migrations to be stopped from without (in particular, so if you have a migration running and want to cleanly abort it, you would run a drush migrate-stop command rather than Ctrl-C) - that bit is now implemented and in import() in place of the former call to checkStatus(). We could implement that in a separate patch if preferred.
Comment #3
phenaproximaSo much weight loss. Once there is a change record (and testbot passes it), I will RTBC.
Comment #4
mikeryanI'll call a nit on myself - s/An/A/. I'll wait to upload a fresh patch in case there's any other feedback to apply.
Comment #5
mikeryanDraft change record added.
Comment #6
phenaproximaAll looks great to me.
Comment #7
mikeryanTabling the stoppage bit, we need to think about that in relation to other stoppage scenarios.
9 files changed, 792 deletions(-)Comment #8
phenaproximaKewl.
Comment #9
webchickLess code FTW!
My understanding from talking to @mikeryan and @phenaproxima (this is mentioned in the change notice as well) is that these interfaces, as tantalizing as they looked, were not actually functional. The Events system is a much more full-fledged replacement, and it makes no sense for core to ship with two versions of the same thing, especially when one is half-broken.
I do wonder if we're going to miss having things like memory consumption tracking and such in core, but I guess if we start missing those we could always add them back in 8.1.x+.
Committed and pushed to 8.0.x. Thanks!
Comment #11
benjy commentedIt's a shame we had to remove all of this, things like memory re-claiming should be part of the core API and it seems we had plenty of tests for it as well.
I know we have events now so we can do stuff in contrib but there was nothing stopping us consuming those events in core rather than removing the code entirely. Would have been nice to get a review here, seemed to all happen pretty quickly.
Comment #12
webchickSorry, I was trying to clear the Migrate blockers. :( Jumped the gun a bit too soon.
Let's get an issue to add this back in.
Comment #13
webchick...for 8.0.x, not 8.1.x, in case that wasn't clear. Happy to commit it whenever it's ready.
Comment #14
webchickThat's happening at #2545632: [PP1] Move memory reclamation out of migrate executable.
Comment #16
quietone commentedPublished the change record.