Hello all, it’s time for the weekly migration subsystem meeting. The meeting will take place in slack in various threads
This meeting:
➤ Is for core migrate maintainers and developers and anybody else in the community with an interest in migrations
➤ Usually happens every Thursday and alternates between 1400 and 2100 UTC.
➤ Is done on the #migration channel in Drupal Slack (see www.drupal.org/slack for information).
➤ Happens in threads, which you can follow to be notified of new replies even if you don’t comment in the thread. You may also join the meeting later and participate asynchronously!
➤ Has a public agenda anyone can add to. See the parent issue for an idea of the typical agenda.
➤*Transcript will be exported and posted* to the agenda issue. For anonymous comments, start with a :bust_in_silhouette: emoji. To take a comment or thread off the record, start with a :no_entry_sign: emoji.

Core migration issues

Video meeting 2022-10-13 2100Z (tentative)

The hope is that most or all of the maintainers will attend. We will try to focus on longer-term goals than in the weekly meeting.

0️⃣ Who is here today?

quietone Hi
alison hello!  TBD if I'm lurking or participating, but :meow-wave-peek:
mikelutz (he/him) On vacation, but catching up.

1️⃣ What should we talk about today? Suggest topics here and I will add threads. I will also check for comments on the issue for today's meeting.

quietone #3009349: Revert migrate_drupal source annotations to attributes conversion

2️⃣ Action items. To be added later.

3️⃣ Statistics

benjifisher Fixed since last week's meeting: 0 (not counting issues for meetings).
benjifisher RTBC: 9, including 1 Critical and 2 Major; 1 has not been updated in more than one month.
benjifisher NR: 9, including 3 that have not been updated in more than one month.
benjifisher Google sheet for recording stats: https://docs.google.com/spreadsheets/d/1o0Rjlc1vnnLP5bM5P-SMMyGzqn7258hi...

4️⃣ Comment in this thread if you are looking for ways to help. Give us some idea of what you would like to do: documentation, code review, testing, project management, ...

5️⃣ Previous minutes.

benjifisher We are a little behind. These need transcripts:2022-08-18: #3307391: [meeting] Migrate Meeting 2022-08-25 1400Z
benjifisher @alison: I see that you commented on the issue for the video meeting, #3296087: [meeting] Migrate Meeting 2022-07-21 2100Z. I just added issue credit corresponding to the list in your comment. If it looks good, can you mark it RTBC?
alison Done, thank you!
benjifisher And fixed. Thank you!

6️⃣ Announcements

7️⃣ Only migrate role permissions that exist on the destination

benjifisher #2953111: Only migrate role permissions that exist on the destination
benjifisher We discussed this issue during the 2022-07-14 meeting: https://drupal.slack.com/archives/C226VLXBP/p1657807796502079. We added to that thread earlier today, but let's continue the discussion here.
quietone can you clarify which post-update  function is being referred to in  "The post-update function will not run."
benjifisher It is the one that removes invalid permissions. We added it in #2571235: [regression] Roles should depend on objects that are building the granted permissions, and I think it lives in the User module. I think you borrowed some code from that issue in this one (but maybe not the current patch).
benjifisher user_post_update_update_roles()
benjifisher Do not look for it in the 10.0.x branch. It has been removed.
quietone What is the nature of the :boom: in this scenario (from the other thread)

I guess the most realistic scenario is

  1. Install Drupal 9.3+. The post-update function will not run.
  2. Migrate users and roles from your D6/D7 site.
  3. There will be deprecation notices. They are hard to find. Maybe only the upgrade_status module exposes them.
  4. Upgrade to D10. :boom:

(I am off to get caffeine)

benjifisher I am assuming that Step 2 created some invalid permissions. That is why there are deprecation messages in Step 3. Once you upgrade to D10, those deprecation messages turn into uncaught exceptions, any time you try to save a role that has invalid permissions. :boom: means WSOD in this context.
benjifisher @alison: You commented on this issue too, a long time ago.
alison I did!  But it wasn't in the context of migrations, I was having general issues with permissions and dependencies.  I'm not in a position to jump back in, I'm afraid, but I have continued to follow the progress of this issue.
benjifisher It  seems to me that when we decided, in #2571235, to trigger deprecation messages in D9 and throw an exception in D10, we set an expectation that the old way of doing things (migrating permissions before enabling the modules that provide them) would continue to work in D9.
If I cannot convince @alexpott of that, then we should take his suggestion and remove the special flag that lets migrations create invalid permissions. This is when we get around to providing a patch for 9.5.
benjifisher Or maybe someone will explain to me why I am wrong.
alison That's the dream.
alison Wait...
alison (jk) (don't mind me, just jumping in in an unhelpful way)
benjifisher In other words, Alex Pott suggests that we make the patch for 9.5 just like the one for 10.0.
benjifisher @alison: I understand: convincing me that I am wrong is a dream. Dream on! :wink:
quietone Wheather it is 9.5 and/or 10 we still need to add an update function to clean up any rouge permissions. Right?
benjifisher Yes, I think so.Also, we need a patch for 9.5 either way.
benjifisher This is what I asked near the top of the July meeting:

This issue changes behavior, with no option for keeping the old behavior. That is appropriate for D10, where you get a WSOD instead of deprecation messages if you try to save a role with invalid permissions.What about Drupal 9.5? Should wemake it just like D10provide an option to keep the old behavior

Alex Pott recommends the "just like D10" option.

quietone Right now, I disagree with doing this in 9.5 but alexpott has more experience.
quietone I'll add it to my list to add the update function, D10 first. Then make a n 9.5 patch.
benjifisher It is too bad that you, alexpott, and I are in such different timezones. Near-synchronous discussions between the three of us are hard.

8️⃣ Move source_module and destination_module from Migrate to Migrate Drupal

benjifisher #3009349: Revert migrate_drupal source annotations to attributes conversion
quietone We have advertised that migration yml can add source_module so a source plugin can be used in migrate drupal land. This patch removes that and makes it necessary to have two versions of a source plugin, one for migrate and one for migrate_drupal. I do not like that.
quietone Instead, can we change \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getSourceModule to just check the configuration of the source plugin and move the all the checking for source_module to  migrate drupal.
benjifisher I have not looked at the patch, but from your description, I do not like it, either.
benjifisher Your suggestion looks reasonable.
benjifisher I am taking a look now.
danflanagan8 I don’t like the drupal_embedded_data either, but I think I added it because of what we’re seeing in the failed tests on #33
danflanagan8 Looks like I added drupal_embedded_data in comment #15. Maybe that’s helpful?
benjifisher Is it enough if I look at just the most recent patch?
benjifisher From the CR:
Before
 \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getSourceModule
After
 \Drupal\migrate\Plugin\migrate_drupal\source\SourcePluginBase::getSourceModule
benjifisher Shouldn't the last line be \Drupal\migrate_drupal\Plugin\migrate\source\SourcePluginBase::getSourceModule
quietone The lasted patch shows failures because the test can't find the source_module on the migration yaml in the block_content migrations which use embedded_data.
quietone That can be fixed by my proposal to allow Migrate to check for source_module in only the configuration in \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::getSourceModule.
quietone That allows the source plugins in migrate land to work in migrate drupal land.
benjifisher So you want to keep getSourceModule() in the Migrate module, and the current patch moves it to Migrate Drupal (in a trait), right?
benjifisher That seems like a compromise. The goal of the issue is to remove from Migrate anything specific to Drupal sources.
benjifisher Do we really have a public class variable in the current code? And are we removing it directly (not deprecating) in the current patch?
+++ b/core/modules/migrate/src/Annotation/MigrateSource.php
@@ -40,19 +40,6 @@ class MigrateSource extends Plugin implements MultipleProviderAnnotationInterfac
...
-  public $source_module;
benjifisher I have not looked at annotation plugins much until now.

9️⃣ Add content in tests only when needed

benjifisher #3266491: Add content in migrate UI functional tests only when needed
benjifisher This issue was RTBC, but it needs a reroll.

1️⃣0️⃣ trackLastImported YAML key to enable tracking the last import date of a row is undocumented and confusing

benjifisher #3198608: trackLastImported YAML key to enable tracking the last import date of a row is undocumented and confusing.
benjifisher This issue is RTBC, but for some reason the testbot is not re-testing. I triggered a retest. I am just mentioning it here to remind me to check the result.
benjifisher The test is green. :white_check_mark:

1️⃣1️⃣ $migration_dependencies has inconsistent structure

benjifisher #3262395: $migration_dependencies has inconsistent structure
benjifisher Similar to 1️⃣0️⃣, except this issue had a MR instead of a patch. The tests would not run until someone triggered the "rebase" link. I did that shortly before the meeting, and now the test is running.
benjifisher The test is green. :white_check_mark:

1️⃣2️⃣ Wrap up

benjifisher Thanks for participating! I will update 2️⃣. Please continue to add comments in the threads. In 1-7 days, we will post a transcript for today's meeting.
quietone Thanks for hosting @benjifisher
alison Thank you, Benji!
benjifisher :bow:

Comments

benjifisher created an issue. See original summary.

quietone credited alison.

quietone credited mikelutz.

quietone’s picture

Issue summary: View changes
Status: Active » Needs review
benjifisher’s picture

Issue summary: View changes

I checked that the threads had the correct number of comments, and I reviewed the issue credits.

I fixed the formatting of the last entry in Thread #8: the <code> block was messed up, and two comments were squashed.

I am removing credit for @mikelutz (or at least, I am trying to remove it) since his only comment was in Thread #0.

Since I made those changes, I am leaving the issue at NR.

quietone’s picture

Status: Needs review » Fixed

@benjifisher, thanks for fixing the format, I confirmed that it is correct now. It is easy to miss those things. The credit has been adjusted too.

I am closing as Fixed.

Status: Fixed » Closed (fixed)

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