Needs work
Project:
Drupal core
Version:
main
Component:
migration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Jun 2020 at 12:01 UTC
Updated:
4 Oct 2022 at 08:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
wim leersCalling
checkRequirements()on every (derived) migration plugin instances with\Drupal\migrate_drupal\MigrationPluginManager's cache primed (meaning they've already been discovered), on the concrete project I'm working on:Comment #4
wim leers😅
Comment #5
quietone commentedNice improvement that will help most migrations.
Ah, but source plugins that extend SqlBase can set a database connection. There is no guarantee that all source plugins will use the same db.
Comment #7
wim leers#5: But … this is specifically
DrupalSqlBase, notSqlBase. So only Drupal-DB-targeting source plugins will be affected by this. Which also means only they would get this performance improvement, and hence your concern in #5 would not apply?Perhaps you want to change the wording of the comment from "all source plugins" to something more specific? 🤓
Comment #8
quietone commentedYes, a change to the comment would be good. Unfortunately, I am not coming up with anything (a bit late here). Also, the use of 'cross-instance' muddles things. I keep wondering if what I am thinking as 'cross-instance' is the same as yours. Perhaps the comments would be clearer without that.
Why deprecate this?
Comment #10
quietone commentedTook another look and this will need proper deprecation of the property, https://www.drupal.org/node/2856615#how-param.
Comment #11
rosk0Tested patch from #2 on 9.2.9. Call to
drush migrate:status --tag=tag -vvvSpeaks for itself.
With regards to
$systemDataproperty: maybe we should mark it internal instead?Comment #12
wim leers#11: Thanks for the test! 🥳
#10: The docs you linked to only work for method parameters, not for class properties. I don't think we can trigger a deprecation error for properties… I'm also fine with not deprecating this; there's no real cost in maintaining it anyway. Did that in this reroll.
Comment #14
wim leersThis failed because
\Drupal\Tests\migrate_drupal\Unit\source\DrupalSqlBaseTest::testMinimumVersion()was newly introduced in #3151732: DrupalSqlBase::checkRequirements should test version with $minimum_version and is the only code violating the assumptions this patch introduces: it pretends there are different databases for each migration plugin definition.This is not reproducible in real-world scenarios. Therefore we should change that test.
Do you agree, @quietone?
Comment #16
anybody@quietone here's an open question from @Wim Leers in #14, which might be relevant for the next steps here.
Still relevant for migration performance, updating version.