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.
There's no indication of progress for any of the migrate commands.
Symfony Console provides a nice progress bar which we could use, since symfony/console is required by Drush.
Patch coming.
Comment | File | Size | Author |
---|---|---|---|
#10 | 3075131-10.patch | 5.21 KB | heddn |
Comments
Comment #2
joachim CreditAttribution: joachim as a volunteer commentedHere's how far I got with this:
- progress bar works for import
-- width isn't right -- looking at the Symfony code, it appears this should pick up on the terminal width, but it's not
-- there needs to be a newline after the progress bar, otherwise the next message runs on. Again, you'd think this would be something Symfony would do by itself?
- needs to be implemented for rollback as well
I'm leaving this for now, perhaps someone else can move it along a bit further?
Comment #3
heddnPart of the issue with import progress (I think) is that we don't actually return any results from import. We're using a logger to override the default drupal logging during a migration and display results.
Comment #4
joachim CreditAttribution: joachim as a volunteer commented@heddn sorry, I don't really follow your comment.
The patch here works. It doesn't rely on any return from the import, but uses an event subscriber to update the Symfony progress bar for each migrated row:
All that this patch needs is some formatting tweaks, and an event subscriber added for rollback.
Comment #5
heddnI hadn't looked at it so closely as that. But based on what you state in #4, I wonder if https://github.com/consolidation/annotated-command#configuring-output-fo... would help any?
Comment #6
heddnThis is shaping up really nice. Here we add rollback and we clear off the progress bar after completion of the operation so Drush messages can display. Not sure there's any better way of doing it.
Comment #7
heddnComment #9
heddnThis is a really great suggestion and improvement. Thanks for your contributions @joachim.
Comment #10
heddnSeems to have introduced a failure on the testbot.
Comment #12
heddn