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
Next video meeting 2022-07-07 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? Should we add DrupalCon Global to the annual schedule?
danflanagan8 | I don’t travel too good, so if DrupalCon Global isn’t in the American Midwest, it’s out of reach for me. |
mikelutz (he/him) | Hey all. |
benjifisher | Hi!Personally, I am pretty happy with going to DrupalCon NA in person every year. Maybe sometime I will travel to Europe or India for their Cons.But I think there are a lot of people who cannot afford to travel for a conference and really miss the Global events from 2020 and 2021. I think we should make it an annual event.All we need is someone to organize it ... |
danflanagan8 | Oh, the Global Con would always be virtual. I dig that. |
alison | Alison here!It was a bummer DrupalCon NA wasn't hybrid, DrupalCon Global is a cool idea! |
benjifisher | I think it is hard to do hybrid events well. It might be easier to do a separate, virtual (Global) event than to make even one of the existing ones hybrid.Sorry I was not clear about the intent. |
danflanagan8 | I’m not sure an apology is called for :slightly_smiling_face: |
quietone | Hi. Yes, a regular global virtual event is preferred (increases opportunity for participation and is nicer to the planet) to all in person events. |
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.
2️⃣ Action items. To be added later.
benjifisher | Decide on how to manage the test trait used in #3266491: Add content in tests only when needed. |
benjifisher | Decide whether to remove permissions, instead of creating temporary permissions, in #2953111: Migrate non-existing permissions to temporary migrate permissions. |
3️⃣ Statistics
benjifisher | Fixed since last week's meeting: 1 (not counting the issue for the meeting). |
benjifisher | RTBC: 9, 1 of which is Major. |
benjifisher | NR: 18, including 1 Critical, 2 Major, and 3 that have not been updated in more than two months. |
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 | Is there anything to follow up? Anything need to be changed in those minutes? |
benjifisher |
6️⃣ Announcements
danflanagan8 | I haven’t had much time for contrib lately, but I’ve really been enjoying using @benjifisher’s snippet process plugin and the Migrate Conditions module in a big migration. If you haven’t checked those out, I recommend them! |
benjifisher | It looks as though I will be giving a migration session at DrupalCamp NJ next week: https://www.drupalcampnj.org/sessions/build-back-better-migrate-api The secret title is "recently added process plugins". I already have a draft of the slides: https://slides.benjifisher.info/migrate-dom-plugins-2021.html#/title-slide. But I wrote that a long time ago. (I think I did not present it on the date mentioned in the title slide.) There are more process plugins I could mention. |
benjifisher | I have not had a migration project at work for some time, so I have not had a chance to use the new toys! |
7️⃣ Migrate non-existing permissions to temporary migrate permissions
benjifisher | #2953111: Migrate non-existing permissions to temporary migrate permissions |
benjifisher | Current approach on the issue: define a new config entity type: TemporaryPermission. When migrating, create config entities as needed. The Migrate module provides permissions based on this configuration. |
benjifisher | The core committers suggest that we go back to an earlier, simpler approach: just remove any permissions that are not provided by (currently enabled) modules. |
benjifisher | They also suggest that, if we keep the current approach, we use state instead of config. |
benjifisher | Let's discuss pros and cons in this thread. Then decide whether we want to push back or take their recommendation. |
benjifisher | I do not like the idea of using state instead of config. I like the current approach: it relies on the config dependency system to update user roles when the temporary permissions are removed. |
benjifisher | I do not like the idea of... just drop these permissions. People can always easily re-enable them if they chose to reinstall the module at a later date.
But we can do better than that without creating temporary permissions. That comment ignores the fact that many permissions already depend on config. For example, "Edit own Article content". The earlier approach on the issue was to remove the permissions, but add dependencies so that the code d6_user_role and d7_user_role migrations ran after other migrations that affect permissions. |
benjifisher | Going back to the earlier approach puts more of the burden on
We can make that easier by generating migrate messages and/or log messages listing the permissions that were removed. |
benjifisher | Other considerations:
|
mikelutz (he/him) | We may just have to go with what the committors ask. |
benjifisher | If they insist, of course. If we come up with good reasons, then we might persuade them. |
mikelutz (he/him) | I tend to agree with them that simpler is better in this case, honestly. Everyone should be going over their permissions with a fine tooth comb after a migration anyway. |
alison | I'm not in a position to give technical feedback or suggestions, BUT:
I think migration is hard enough, and I hope the outcome of this will relieve rather than add to DX pain points/complexity/etc. |
mikelutz (he/him) | Also, if the point is that the configs are storing these temporary permissions forever in case they come back, that kinda defeats the purpose of hardening this system in the first place. |
benjifisher | It is not forever.
If you migrate using the UI, then the temporary permissions are removed. For example, it is OK to migrate user roles before content types and you will still have "Edit own Article content". If something interrupts the migration process, or if you are not using the UI, then you get a warning message on the site status page. |
xurizaemon | As a user, I don't think I'd be too concerned about "what if I want to migrate a module's permissions, but have it deactivated".
That feels like a reasonable limitation, while working around to achieve the requirement feels complicated. (For Search API specifically, disabling indexing and retaining the module installation does the job for migrations IMO.) |
quietone | If state or config (not configentity) are used then when the migration via /upgrade is complete more code is needed to remove the roles from the permissions. |
quietone | When the UI is not used, the 'what should be temporary permissions' will still be assigned to roles and appear on the permissions page. That seems wrong. |
benjifisher | I do not understand that last remark. If the migrate module is actually providing permissions, then should they somehow be hidden? |
benjifisher | Most of my points have been in favor of the current approach (temporary permissions). Here is one against.If the migrate module is providing a temporary permission and another module (after being enabled, or depending on some config) provides the same permission, then the results are hard to predict and potentially confusing. (edited) |
8️⃣ Add content in tests only when needed
benjifisher | #3266491: Add content in tests only when needed |
benjifisher | This issue was RTBC, but now it fails PHPStan tests. Here is my comment from the issue:
|
benjifisher | @danflanagan8, do you have an opinion on this? |
danflanagan8 | I’ll try to check it out in a bit |
benjifisher | @mikelutz (he/him), how about you? |
benjifisher | What is the best practice when a trait assumes that some method is available? |
benjifisher | The installEntitySchemas() method is used in only two test classes: one for D6 and one for D7. |
mikelutz (he/him) | A trait really shouldn't depend on a non trait method, I would think. We could get around phpstan by defining it in the classes, but it really seems like the trait is poorly thought out. |
danflanagan8 | I just proposed a couple things on the issue. Not solutions, exactly. More focused on how to manage scope here. |
9️⃣ Wrap up
benjifisher | Thanks for participating! I already updated 2️⃣. Please continue to add comments in the threads. In 1-7 days, we will post a transcript for today's meeting. |