Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate:import loops over each migration, hits EOM before it finishes #4890

Closed
damienmckenna opened this issue Nov 4, 2021 · 6 comments
Closed

Comments

@damienmckenna
Copy link

damienmckenna commented Nov 4, 2021

Describe the bug
With Drush 10.6.x running "migrate:import" on an upgrade from a D7 site results in the migrations being looped over.

From migrate:upgrade:

--------------------------------------------------------------------------------- 
 Generated migrations                                                             
--------------------------------------------------------------------------------- 
 upgrade_book_settings                                                            
 upgrade_commerce1_cart_settings                                                  
 upgrade_commerce1_shipping_flat_rate                                             
 upgrade_commerce1_tax_type                                                       

When migrate:import runs it shows the following:

[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_book_settings'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_book_settings'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_cart_settings'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_book_settings'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_cart_settings'
[notice] Processed 31 items (31 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_shipping_flat_rate'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_book_settings'
[notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_cart_settings'
[notice] Processed 31 items (31 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_shipping_flat_rate'
[notice] Processed 0 items (0 created, 0 updated, 0 failed, 0 ignored) - done with 'upgrade_commerce1_tax_type'

As you can see, it starts with the first item, upgrade_book_settings. When it goes to process the second item, upgrade_commerce1_cart_settings, it first outputs upgrade_book_settings a second time. When it goes to run the third item, upgrade_commerce1_shipping_flat_rate, it loops over the first two items again. This repeats until it finally hits an out-of-memory error on the 129th item of a migration with 202 tasks.

To Reproduce
ddev drush migrate:upgrade
ddev drush migrate:import --group='migrate_drupal_7'

Expected behavior
The migration to run once.

Actual behavior
The migration loops incrementally as it processes each new task.

Workaround
Revert to Drush 10.3.x.

System Configuration

Q A
Drush version? Latest 10.6.x stable release.
Drupal version? 9.2.7
PHP version 7.4
OS? Mac, though the Drush command is running inside ddev.

Additional information
TBD.

@claudiu-cristea
Copy link
Member

What command do you run?

@damienmckenna
Copy link
Author

ddev drush migrate:import --group='migrate_drupal_7', like the "to reproduce" details indicate.

@weitzman
Copy link
Member

weitzman commented Nov 5, 2021

Any chance this command adds more batches as it goes? If yes it could be hitting a bug we just fixed #4886

@damienmckenna
Copy link
Author

That sounds like it might have been the problem.

Does this mean it won't be fixed in 10.x?

@damienmckenna
Copy link
Author

I created a PR with the fix against 10.x - #4893.

@weitzman
Copy link
Member

weitzman commented Nov 7, 2021

fixed in #4983

@weitzman weitzman closed this as completed Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants