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

Add flag to filter for migration status (complete, incomplete, in progress) #5013

Open
brooke-heaton opened this issue Jan 12, 2022 · 3 comments

Comments

@brooke-heaton
Copy link

brooke-heaton commented Jan 12, 2022

Is your feature request related to a problem? Please describe.

I'm running a D7 to D9 migration and am constantly updating the source DB as we approach our 'Go Live' date. This requires me to rerun migrations and occasionally I hit snags and need to reset then rerun them. So I'm then having to look at the VERY LONG and very verbose output of drush migrate-status to see what needs updating. Sometimes a migration 'gets stuck' on 'In Progress' so I need to reset it and I've been grepping the output of drush migrate-status to find any migrations stuck in In Progress. I also only want to run migrations that have new entities that are Unprocessed. All of this experience suggests there's a better way.

Describe the solution you'd like

Create a --status parameter that can be passed to the migrate-status command that will look for migrations by status.
in-progress would show any migrations current in progress
complete would look for migrations at Idle that have 0 unprocessed entities
incomplete would look for migrations at Idle that have >0 unprocessed entities

Describe alternatives you've considered
Alternately if there were a better way to grep the output of migrate-status for a status output of the table, that might work, however the table only outputs In Progress as a status. Idle is not that helpful.

@weitzman
Copy link
Member

grep is a very good approach IMO.

If you want to be more precise, you can usually use the --filter option on table output but for some reason that option is not present in this command. I'll open a PR for that in a sec. See https://www.drush.org/latest/output-formats-filters/#output-filters

@weitzman
Copy link
Member

I see now that you want to add a new type of status. I'll leave this open as a feature request

@weitzman
Copy link
Member

That option is added in #5014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants