Problem/Motivation

Using exceptions as signals to pass information back to the calling function is bad practice. In #3245997: Allow process plugins to stop further processing on a pipeline We are looking at providing a way for a plugin to declare itself final (i.e. no process plugins after it in the same pipeline should run). Once this is committed to core, process pipelines that currently throw a MigrateSkipProcessException could accomplish the same feat by declaring themselves final and returning NULL.

Steps to reproduce

Proposed resolution

Refactor core process plugins to use this method instead of signaling with a skip process exception.

Remaining tasks

#3245997: Allow process plugins to stop further processing on a pipeline
Remove remaining usages from core process plugins.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3247329

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mikelutz created an issue. See original summary.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mikelutz’s picture

Title: [PP-1] Remove usages of MigrateSkipProcessException from core process plugins » Remove usages of MigrateSkipProcessException from core process plugins
Status: Postponed » Active

#3245997: Allow process plugins to stop further processing on a pipeline has now been merged and this issue is no longer postponed.

mikelutz’s picture

Status: Active » Needs review
smustgrave’s picture

Test coverage definitely appears to be there https://git.drupalcode.org/issue/drupal-3247329/-/jobs/625221

Seeing as the task came from one of the migration submaintainers think that sign off is good.

Issue summary is complete and tests all green.

LGTM +1 RTBC.

per the new approach for #needs-review-queue-initative going to leave in NR for additional eyes. If no one does after a few days I'll mark it.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Been a few days and don't want the issue to stale going to mark it.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed e853205 and pushed to 11.x. Thanks!

  • longwave committed e8532054 on 11.x
    Issue #3247329 by mikelutz: Remove usages of MigrateSkipProcessException...

Status: Fixed » Closed (fixed)

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