Ensure that the shared_configuration option doesn't recursively merge the Url source plugin's urls

Created on 23 October 2023, 8 months ago

Problem/Motivation

If the migration group contains the following shared configuration entry:

shared_configuration:
  source:
    plugin: url
    urls:
      - 'private://file-1.jsonlines'
      - 'private://file-2.jsonlines'
      - 'private://file-3.jsonlines'

And an individual migration contains the following:

source:
  plugin: url
  urls:
    - 'private://overridden-file-entry.jsonlines'

The final output becomes this:

source:
  plugin: url
  urls:
    - 'private://overridden-file-entry.jsonlines'
    - 'private://file-2.jsonlines'
    - 'private://file-3.jsonlines'

But should contain only the single original entry.

Steps to reproduce

Proposed resolution

Persist the original urls if they exist in the original migration.

An alternative is to introduce a new #merge_options property within the shared_configuration property which controls whether certain entries should be merged or not (I believe most list arrays should typically be left unmerged).

Remaining tasks

Provide issue fork/patch.

User interface changes

N/A

πŸ“Œ Task
Status

Needs review

Version

6.0

Component

Miscellaneous

Created by

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

Comments & Activities

Production build 0.69.0 2024