isComplete() should not rely on RESULT_COMPLETED

Created on 19 August 2015, over 9 years ago
Updated 12 September 2023, over 1 year ago

In the course of hammering out #2545672: Handle various migration interruption scenarios β†’ , I noticed that isComplete() (which is meant to identify whether a given migration has completed processing all source items) looks like this:

  public function isComplete() {
    return $this->getMigrationResult() === static::RESULT_COMPLETED;
  }

However, this is not reliable. The migration result represents whether a given migration run as requested completed - a run that was requested to be partial (using --limit or --idlist, say) reports a COMPLETED result, but that does not mean that all source records for the migration have been processed. Also, when performing continuous migrations (as in a daily feed), there may now be new source records available to a dependent migration, and the current migration should not run until those records have been processed.

isComplete() should be implemented as it was in D7 migrate - it should return TRUE iff the number of available source records (source plugin count()) is equal to the number of processed records (id map processedCount()).

πŸ› Bug report
Status

Fixed

Version

8.0 ⚰️

Component
MigrationΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mikeryan Murphysboro, IL, USA

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024