migrate lookup doesn't advance to the next source migration if the migration has the row as skipped

Created on 18 September 2024, 4 months ago

Problem/Motivation

The migrate_lookup migration process plugin can take a list of migrations, in which case, it returns the lookup value from the first migration that produced a result.

eg.

  field_destination:
    -
      plugin: migration_lookup
      no_stub: true
      migration:
        - migration_alpha
        - migration_beta
      source_ids:
        migration_alpha:
          - id
          - language
        migration_beta:
          - id
          - language

If migration_alpha has a map row for the values, but that row has NULLs in the destination IDs, then these are returned instead of advancing to try migration_beta.

This means that if migration_alpha needs to skip rows, those rows are saved in the map with a source_row_status of STATUS_IGNORED, and rows from migration_beta won't be used at all.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

  • Issue created by @joachim
  • πŸ‡¬πŸ‡§United Kingdom joachim

    I'm not sure how we fix this, as the MigrateLookup service is completely unaware of the row status, as is MigrateIdMapInterface::lookupDestinationIds().

Production build 0.71.5 2024