Problem/Motivation

The migrate process plugins are missing schema.

Proposed resolution

Add the relevant schema files for all the process plugins in migrate. We still can't use it due to the human written flexible nature of our migration entities but the UI will love us. And anyways this is sort of the responsibility of the plugin.

Remaining tasks

Write patch

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Comments

benjy created an issue. See original summary.

benjy’s picture

Status: Active » Needs review
StatusFileSize
new3.25 KB

Just wrote this, still un-tested.

phenaproxima’s picture

  1. +++ b/core/modules/migrate/config/schema/migrate.process.schema.yml
    @@ -0,0 +1,123 @@
    +      label: 'Source Ids'
    

    Should be IDs.

  2. +++ b/core/modules/migrate/config/schema/migrate.process.schema.yml
    @@ -0,0 +1,123 @@
    +      label: 'Stub Id'
    

    Should be ID.

  3. +++ b/core/modules/migrate/config/schema/migrate.process.schema.yml
    @@ -0,0 +1,123 @@
    +migrate.process.skip_row_if_not_set:
    +  type: migrate_process
    +  label: 'Skip Row process'
    +  mapping:
    +    index:
    +      type: integer
    +      label: 'Index'
    

    Does this plugin even exist? I thought it was covered by skip_on_empty.

I'm not sure if I should apply the "Needs tests" tag to this issue -- how does one even test this?

benjy’s picture

StatusFileSize
new3.25 KB

There isn't actually anything to test because the top level migration schema has type: ignore on the whole process array.

Does this plugin even exist?

yeah, see: core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php:

benjy’s picture

StatusFileSize
new3.25 KB
new604 bytes

This time the right patch and a interdiff.

phenaproxima’s picture

+++ b/core/modules/migrate/config/schema/migrate.process.schema.yml
@@ -0,0 +1,123 @@
+migrate.process.skip_row_if_not_set:
+  type: migrate_process
+  label: 'Skip Row process'

The label should probably be something like "Skip row if not set", yes? :)

Otherwise, looks okay...would like confirmation from @chx or @mikeryan, though.

benjy’s picture

StatusFileSize
new3.25 KB
new744 bytes

Fixed.

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

I'd still like a second pair of eyes on it (@chx's, preferably), but assuming Drupal CI OKs it, RTBC from me.

benjy’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new3.48 KB
new653 bytes

Found another plugin while testing my UI today.

chx’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: 2611024-9.patch, failed testing.

The last submitted patch, 9: 2611024-9.patch, failed testing.

benjy’s picture

Status: Needs work » Needs review

This passes locally.

benjy’s picture

Status: Needs review » Reviewed & tested by the community

Green this time, back to RTBC, nothing changed, must have been random fails in head.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed c938db1 and pushed to 8.0.x and 8.1.x. Thanks!

  • alexpott committed c938db1 on 8.1.x
    Issue #2611024 by benjy: Migration process plugins are missing schema
    

  • alexpott committed 6b19b4b on
    Issue #2611024 by benjy: Migration process plugins are missing schema
    
    (...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.