Generate graphs of migration dependencies

Created on 5 December 2019, over 4 years ago
Updated 21 January 2023, over 1 year ago

For a large complex migration project (124 migrations with complex dependencies), I was trying to determine the optimal way to run migrations in parallel, and developed a migrate:dependency-graph command. This generates PlantUML files for input to Graphviz. I'm not sure when I'll have a little time to generalize it for a migrate_tools patch, but by opening an issue interested people can ping me here as a reminder if I don't do it in the next couple of weeks (might have to wait until January though).

The usage (assuming you have Graphviz installed) is:

drush migrate:dependency-graph >dependencies.dot
dot dependencies.dot -T pdf >dependencies.pdf

Creating something like this:

Oh, did I mention that because we're trying to figure out process parallelization, I made the heights proportional to the source counts (as a rough proxy of migration time)?

Two features that should be added for the patch to be submitted here:

  1. Using source counts for height should be an option (and not the default) - most people probably just want to see the relationships.
  2. A means (perhaps tag-based?) of excluding certain migrations. You can see in our example how unwieldy it can get - and that's including a little hack to exclude our many small "lookup" migrations (basically vocabularies).

Attached is what I have now.

โœจ Feature request
Status

Active

Version

4.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mikeryan Murphysboro, IL, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024