- Issue created by @godotislate
- Merge request !6827Issue #3424509: Update MigratePluginManager base class to use attributes and annotations. β (Closed) created by godotislate
- Status changed to Needs review
9 months ago 5:06am 29 February 2024 Put up MR with one approach to tackle BC for migrate plugin manager.
- First commit to issue fork.
- π³πΏNew Zealand quietone
Let's test this by converting one process plugin, 'explode'.
- Status changed to Needs work
9 months ago 2:42pm 29 February 2024 - Status changed to Needs review
9 months ago 3:21pm 29 February 2024 - Status changed to RTBC
9 months ago 3:43pm 29 February 2024 - πΊπΈUnited States smustgrave
Thanks for answering that for me @godotislate
- Status changed to Needs work
9 months ago 11:23pm 29 February 2024 - π³πΏNew Zealand quietone
Thanks for the reviews!
I think this should include the conversion of a source, destination and field plugin as well as discussed in Slack.https://drupal.slack.com/archives/C1BMUQ9U6/p1709180072609059. Lets make sure that all plugin types that use this manager can work.
- Status changed to Needs review
9 months ago 12:34am 1 March 2024 Originally pushed conversion for at least attribute of each type, but tests failed on the source plugin. I cherry-picked from MR 6780 for π Convert MigrateSource plugin discovery to attributes Needs work , and it looks like work in that issue for the Attribute class is incomplete, including an outstanding question on how to handle multiple provders. So I reverted the changes for Migrate source, and test are passing for one plugin of each of the other three.
- Status changed to Needs work
9 months ago 4:29am 2 March 2024 - π³πΏNew Zealand quietone
Migrate source plugins have their own discovery using, \Drupal\migrate\Plugin\Discovery\AnnotatedClassDiscoveryAutomatedProviders and they also have to handle multiple providers, \Drupal\migrate\Annotation\MultipleProviderAnnotationInterface. I am not familiar with those and am just starting to take a look.
- Status changed to Needs review
9 months ago 2:05am 4 March 2024 - π³πΏNew Zealand quietone
This may need to be split up but I did find it helpful to work on all these at one time. The most problematic is the source plugins because it requires multiple providers which meant changes to discovery. And adding a class property, $providers.
- Status changed to Needs work
9 months ago 6:16pm 4 March 2024 A couple comments/questions on the MR.
Also, I wonder if the work to deal with sources having multiple providers shouldn't be done in π Convert MigrateSource plugin discovery to attributes Needs work , so iterating on that part doesn't block getting the other plugin types done.
- First commit to issue fork.
- Status changed to Needs review
9 months ago 9:48am 5 March 2024 - π³πΏNew Zealand quietone
Add the two generic plugins that also need the MigratePluginManager
- π³πΏNew Zealand quietone
Added commas to meet Coding Standards per Function Declarations β , which is a new addition to the standards.
- πΊπΈUnited States smustgrave
Left 1 question but will leave in review for additional eyes. Based on other attribute tickets change look good to me.
- Status changed to Needs work
8 months ago 1:36am 17 March 2024 - πΊπΈUnited States benjifisher Boston area
I reviewed MR 6827. I have a bunch of minor suggestions for code cleanup, which I will add to the MR as suggestions. This is the first time that I have looked at attributes for plugin definitions, so take my suggestions with a grain of salt. (That is, do not be surprised if some suggestions seem like bad ideas.)
This MR has conflicts with π Convert the PHPStan baseline from NEON to PHP Fixed . One commit adds an exception to the PHPStan baseline, and a later commit removes that exception. If you remove those two changes, then you should be able to rebase cleanly.
- Status changed to Needs review
8 months ago 3:50pm 17 March 2024 I think all MR feedback has been addressed with changes or commented on.
- πΊπΈUnited States benjifisher Boston area
@godotislate:
Thanks. I am not sure when I will have time to re-review. Also, I am not sure I am qualified to declare the issue RTBC. As I said, this is the first time I have looked at attributes.
Do we need additional test coverage, or are the existing tests good enough now that we have converted a few plugins?
I think we should at least add a test to confirm that the system works with a combination of annotation and attribute plugins. Once we convert Drupal core to attributes, there will still be contrib modules using annotations.
- Status changed to Needs work
8 months ago 1:47am 19 March 2024 Do we need additional test coverage, or are the existing tests good enough now that we have converted a few plugins?
I think we should at least add a test to confirm that the system works with a combination of annotation and attribute plugins. Once we convert Drupal core to attributes, there will still be contrib modules using annotations.
This thought did occur to me. We think things are fine now, because in the MR we have a few plugins converted to attributes and most of the rest left with annotations, with all tests passing. But once all the core annotations are removed, annotation support for migration multiple providers might not be directly tested anymore. Looks like for other plugin types there is
Drupal\Tests\Component\Annotation\AnnotatedClass\DiscoveryTest
, so we'll need something similar for migration source plugins.- Status changed to Needs review
8 months ago 8:57pm 20 March 2024 Added the test for backwards compatibility for annotated migrate source plugins.
- Status changed to RTBC
8 months ago 4:01pm 26 March 2024 - πΊπΈUnited States smustgrave
Appears all feedback has been addressed. Went through one more time and I don't have any questions
- Status changed to Needs work
8 months ago 5:34pm 26 March 2024 Addressed most comments. Left questions open about
requirements_met
functionality for anyone more familiar with that than me.- Status changed to Needs review
8 months ago 12:09am 27 March 2024 - π³πΏNew Zealand quietone
Changing status for another review.
Also, it needs to be decided if all the migrate plugins will be converted in this issue. This issue is already rather large,
37 files + 763 β 105
. - π³πΏNew Zealand quietone
To help with the decision there are:
- 118 MigrateSource plugins
- 24 MigrateFielld plugins
- 79 MigrateProcessPlugins plugins
- 31 MigrateDestination plugins
That seems like a lot of additional files to look at. I think those can be done in the original migration plugin type conversion tickets and reviewed separately.
- πΊπΈUnited States smustgrave
Is there any pro to combining? Seems like keeping separate makes the most sense from a reviewing standpoint.
- π¬π§United Kingdom catch
I think it would be fine to do those in the four existing issues that are postponed on this one.
- πΊπΈUnited States smustgrave
Sweet, looking at the MR I believe all threads have been answer, there any outstanding questions?
- Status changed to RTBC
8 months ago 10:00pm 2 April 2024 - πΊπΈUnited States smustgrave
Going to go ahead and mark it as I didn't see any outstanding threads
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed c9d53fd473 to 11.x and d7f89942a7 to 10.3.x. Thanks!
I've had a good look and the changes to the plugin managers to support multiple providers and I think this is the best we can do. It would be lovely to move this upstream from migrate to core somehow.
-
alexpott β
committed d7f89942 on 10.3.x
Issue #3424509 by godotislate, quietone, sorlov, smustgrave, benjifisher...
-
alexpott β
committed d7f89942 on 10.3.x
- Status changed to Fixed
8 months ago 11:43pm 3 April 2024 -
alexpott β
committed c9d53fd4 on 11.x
Issue #3424509 by godotislate, quietone, sorlov, smustgrave, benjifisher...
-
alexpott β
committed c9d53fd4 on 11.x
- π³πΏNew Zealand quietone
The issue to move the support for multiple providers to the plugin system is #2786355: Move multiple provider plugin work from migrate into core's plugin system β
-
quietone β
committed 580bfcb7 on 11.x
Revert "Issue #3424509 by godotislate, quietone, sorlov, smustgrave,...
-
quietone β
committed 580bfcb7 on 11.x
-
quietone β
committed effc39d1 on 10.3.x
Revert "Issue #3424509 by godotislate, quietone, sorlov, smustgrave,...
-
quietone β
committed effc39d1 on 10.3.x
- Status changed to Needs work
8 months ago 4:37am 4 April 2024 - π³πΏNew Zealand quietone
Reverted because this was requiring source_module on all source plugins, when it is really just for migrate drupal.
- π³πΏNew Zealand quietone
I remembered π Move source_module and destination_module from Migrate to Migrate Drupal Needs work . So I have updated that and it looks like it will help with the problem of the source_module.
- Merge request !7327Issue #3424509: Update MigratePluginManager to work with attributes and add... β (Closed) created by godotislate
- Status changed to Needs review
8 months ago 2:56pm 4 April 2024 I think the best way to keep moving forward is to de-scope everything to do with migrate source plugins from this issue and handle that in π Convert MigrateSource plugin discovery to attributes Needs work . The remainder of the reverted commit for this issue can be brought back here.
I've put up MR 7327 for the proposed changes for this issue:
- MigratePluginManager
- Destination, Process, and Field attributes
- Sample destination, process, and field plugins
- Doc block references to destination, process, and field annotation classes
Remaining work to do in in π Convert MigrateSource plugin discovery to attributes Needs work :
- Automated/multiple provider handling
- MigrateSourceManager
- Source plugins
- Source attribute
- Docblock references to source annotations
A lot of the migrate source work will just be restoring the remaining diff from the reverted commit. Along with dealing with the source_module property in the attribute, and then converting the remainder of the plugins.
- Status changed to RTBC
7 months ago 1:23pm 5 April 2024 - πΊπΈUnited States smustgrave
I'm in favor of breaking out more. Makes reviews simpler and know we shouldn't assume anything but I can put money the other postponed tickets will be addressed before 11.x release, they got all the attention right now haha.
So looking at MR 7327 tests are green from the re-scope.
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 7dd6b190eb to 11.x and b7e0c8e94b to 10.3.x. Thanks!
Great idea to get most of this done.
-
alexpott β
committed b7e0c8e9 on 10.3.x
Issue #3424509 by godotislate, quietone, sorlov, smustgrave, alexpott,...
-
alexpott β
committed b7e0c8e9 on 10.3.x
- Status changed to Fixed
7 months ago 1:45pm 5 April 2024 -
alexpott β
committed 7dd6b190 on 11.x
Issue #3424509 by godotislate, quietone, sorlov, smustgrave, alexpott,...
-
alexpott β
committed 7dd6b190 on 11.x
- π¬π§United Kingdom alexpott πͺπΊπ
I've updated all the all issues postponed on this one.
Automatically closed - issue fixed for 2 weeks with no activity.