Don't append migration dependencies after config is exported

Created on 12 September 2023, over 1 year ago

Problem/Motivation

When generating migration config for a site upgrade, derivative migrations are exported with a different name.

d7_file_entity:image:public > upgrade_d7_file_entity_image_public

When migrations are run, the derived migrations are injected as dependencies, duplicating the exported ones.

MediaWysiwygPluginBase is doing this in appendProcessor().

Steps to reproduce

1. Install fresh d10 site w/ migrate_plus, migrate_drupal, migrate_tools, media_migration, migrate_upgrade.
2. Configure migrate_upgrade, export configuration. This creates the upgrade_drupal_7 migration group, with migrations prefixed with upgrade_d7.
3. Run migrate:tree on a complete node migration:

upgrade_d7_node_complete_work
├──upgrade_d7_user
│ └──upgrade_d7_user_role
├──upgrade_d7_node_type
├──upgrade_d7_file_entity_image_public
│ ├──upgrade_d7_file_entity_type_image
│ │ └──upgrade_d7_file_entity_source_field_image
│ ├──upgrade_d7_file_entity_source_field_config_image
│ │ ├──upgrade_d7_file_entity_source_field_image
│ │ └──upgrade_d7_file_entity_type_image
│ │ └──upgrade_d7_file_entity_source_field_image
│ ├──upgrade_d7_field_instance
│ │ ├──upgrade_d7_field
│ │ └──upgrade_d7_node_type
│ └──upgrade_d7_file
├──upgrade_d7_file_entity_video_public
│ ├──upgrade_d7_file_entity_type_video
│ │ └──upgrade_d7_file_entity_source_field_video
│ ├──upgrade_d7_file_entity_source_field_config_video
│ │ ├──upgrade_d7_file_entity_source_field_video
│ │ └──upgrade_d7_file_entity_type_video
│ │ └──upgrade_d7_file_entity_source_field_video
│ ├──upgrade_d7_field_instance
│ │ ├──upgrade_d7_field
│ │ └──upgrade_d7_node_type
│ └──upgrade_d7_file
├──upgrade_d7_file_entity_video_youtube
│ ├──upgrade_d7_file_entity_type_remote_video
│ │ └──upgrade_d7_file_entity_source_field_remote_video
│ ├──upgrade_d7_file_entity_source_field_config_remote_video
│ │ ├──upgrade_d7_file_entity_source_field_remote_video
│ │ └──upgrade_d7_file_entity_type_remote_video
│ │ └──upgrade_d7_file_entity_source_field_remote_video
│ └──upgrade_d7_field_instance
│ ├──upgrade_d7_field
│ └──upgrade_d7_node_type
├──upgrade_d7_file_entity_video_vimeo
│ ├──upgrade_d7_file_entity_type_remote_video
│ │ └──upgrade_d7_file_entity_source_field_remote_video
│ ├──upgrade_d7_file_entity_source_field_config_remote_video
│ │ ├──upgrade_d7_file_entity_source_field_remote_video
│ │ └──upgrade_d7_file_entity_type_remote_video
│ │ └──upgrade_d7_file_entity_source_field_remote_video
│ └──upgrade_d7_field_instance
│ ├──upgrade_d7_field
│ └──upgrade_d7_node_type
└──d7_file_entity:image:public
├──d7_file_entity_type:image
│ └──d7_file_entity_source_field:image
├──d7_file_entity_source_field_config:image
│ ├──d7_file_entity_source_field:image
│ └──d7_file_entity_type:image
│ └──d7_file_entity_source_field:image
├──d7_field_instance
│ └──d7_field
└──d7_file

Proposed resolution

We need a way to check if the the processed migrations and skip adding dependencies to ones that are exported.

Remaining tasks

Review issue and propose options for checking when to skip adding dependencies.

Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

🇺🇸United States mortona2k Seattle

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

Comments & Activities

Production build 0.71.5 2024