Problem/Motivation
In #3264122-24: Move all non migration aggregator tests to the module in preparation of removal in d10 @Spokje sought clarification the approach to issue scope taken when we remove a module from core.
This issue is to decide on that scope and document the steps in the handbook.
Further slack discussion for context.
Proposed resolution
Policy - 'Deprecate core module'
- Discuss module removal
- Open an issue against the Core ideas queue providing justification for removing the module.
- Seek approval from product managers.
- When the above issue is marked Fixed and the decision is to remove the module from core, then open a core issue 'Meta - Implement deprecation of code module {module}' that will track and coordinate the work. The Meta should have the following steps where each will require a new issue. The first step will also be a Meta because there are several tasks to be done to make sure everything is moved.
- Move code and references to the module in core to the module.
- Create the contrib project with a stable release.
- Deprecate the core module in the current major version.
- Remove the module from core in the next major version.
- Commit the deprecation patch and the removal patch within 24 hours of each other.
- Open an issue against https://www.drupal.org/project/project_composer.
- Move core issues for the module from the core queue to the contrib module.
- Move all core documentation for the module to the contrib project.
- When the issue in https://www.drupal.org/project/project_composer is Fixed update the documentation with the new composer command.
Implementation details
- Move code and references to the module in core to the module.
This step may need a Meta so the work can be scoped sensibly. The following areas need to be addressed. If needed add @todo statements linking to the removal issue.
- Move non migration tests to the module.
- Move help topics to the module.
- Possible issue for removing references to the module from database dumps.
- Handle migrations, if the module has migrations.
- Copy the drupal 6 and drupal 7 test fixtures to the module so they remain independent of any core changes to the fixture.
- Migration yml and processes that are in the module move with the module to contrib.
- Move migration tests to the module.
- Keep all the assertions in core tests related to module as much as possible.
- Migration yml and processes that are outside the module but support the upgrade path for that module stay in core.
- The functional tests in migrate_drupal_ui will need to change. Add @todo to remove the module in the removal issue.
- The drupal 6 and drupal 7 test fixtures stay the same.
- Create the contrib project with a stable release.
- Once the above items in the meta are complete, create the contrib project. Use a sub-tree split to retain git history.
- Ensure tests run successfully.
- Check it works and can be installed with composer.
- Create a stable release.
- Deprecate the core module in the current major version.
- Set lifecycle to deprecated, to be deprecated in next major version.
- Set lifecylcle_link to the doc page.
- Add '@group legacy' to the tests in the module.
- The change record for this issue includes a link to the doc page.
This is postponed on the above children and creation of a stable
release for the contrib module. - Remove the module from core in the next major version.
- Create an issue, 'Remove module from core'.
- The change record for this issue includes a link to the doc page.
- Tag this issue 'Needs release note.'
- Remove the module ;-).
- Remove references from core/phpstan-baseline.neon.
- Check for references in @todo.
- Create an issue, 'Remove module from core'.
- Commit the deprecation patch and the removal patch within 24 hours of each other.
- Open an issue against https://www.drupal.org/project/project_composer.
- Move core issues for the module from the core queue to the contrib module.
- Move all core documentation for the module to the contrib project.
- When the issue in https://www.drupal.org/project/project_composer is Fixed update the documentation with the new composer command.
Remaining tasks
Discuss/decide
Comments
Comment #6
larowlan🔧 Updating the issue summary with proposed list/steps kindly collated by @quietone and added some additional steps.
➕ Adding issue credit for those involved in the relevant slack discussion.
💬 Please discuss
Comment #7
larowlanComment #8
larowlanComment #9
quietone commentedHow is #3 completed? Is is manual or automated?
Comment #10
larowlanI think we'd need to ask @drumm if it can be automated
Comment #11
quietone commentedYes, that makes sense.
Looking at #3227033: Remove Quick Edit from core, it is postponed on two issues that don't fit into 1-5. Perhaps a step 0 is needed for researching the module and making children with sensible scope where steps 1-5 are known issues that need to researched. Or something like that to identify all the bits to do before leaping in.
Comment #12
quietone commentedAdded 'adding legacy' to tests in the IS.
Comment #13
larowlanAgree, because they may not all be required in all cases
Comment #14
quietone commentedComment #15
bbralaThanks for this issue! Some thoughts;
Not sure how detailed you need to go here.
But there might be references to the module in other places. Like comments in core api.pho files.
Also, documentation might be an issue. As long as the module is in a supported core version one will expect the docs in the core namespace but that can't be forever ofcourse.
The extracted module could refer to core docs until the module is no longer supported in core, then docs could move to a new location. Not sure how we would make sure that that step is followed though.
Comment #16
spokjeAgreed with what @bbrala states in #15, there (almost) always will be textual references in comments/
core.api.php/whatever, is that sub-issue worthy?I think we agreed here #3263618-10: Deprecate HAL module (and the comments above) to link to the documentation page instead of CRs.
Finally: Thanks _very_ much @larowlan and @quietone for taking this up and write it down. It prevents the good people trying to do the grind work from hitting The Concrete Wall if not absolutely unavoidable
Closing thoughts: By adding every sub-issue, however needed it might be, we add a potential blocker.
Not saying we should whack it all in one issue (Looking at you #3227033: Remove Quick Edit from core!), since that's too much, but (kinda) saying: Let's prevent shooting in own foot by making everything a sub-issue without it needing to be.
Comment #17
bbralaThe good thing about that though is that every step in the process is a managable piece of work. Which means there is at least a somewhat consistent set of small-ish milestones. This means you should be able to see progress more often and not end up with an issue with 6 discussions over 120 comments.
Basically, I think splitting in small steps is smart and prevents "death by a 1000 comments".
Comment #18
spokjeFully agreed @bbrala, but it _could_ introduce "death by admin-overload of creating/managing 1000 sub-issues".
Anyway, besides the non-code references for the module-to-be-deprecated/removed deserving a separate sub-issue, as mentioned above and some minor nitpicks about
lifecycle_links, I'm very happy with the defined stuff above and see no risk of any d.o.-queue-related deaths any time soon when we stick to it.Comment #19
spokjeSome more do-this-before-that in a slack thread:
Comment #20
quietone commentedAdding related migration issue that has more details of the migration steps which should be included in any documentation that is made from this discussion.
Comment #21
quietone commentedUpdated the process based on last comments.
Comment #22
bbralaI'd say first test composer install, then roll a stable release tbh. Updating is.
Comment #23
bbralaWhen we agree on the process we can link ti relevant issues and such to make things easier.
Comment #24
catchI added some initial documentation on the process as it stands so far to https://www.drupal.org/about/core/policies/core-change-policies/drupal-d... before seeing this thread. Haven't caught up here yet although there are steps in the issue summary I forgot to add to the docs.
Comment #25
quietone commentedAdd removing from phpstan-baseline.neon. And a note about @todo statements.
@catch, thanks for adding this to the doc page.
Since the implementation details are so long, can that be a separate page?
Comment #26
quietone commentedAdd migration details from #3264607: [policy, no patch] How to ensure migrations continue to work when modules are moved to contrib
Comment #27
quietone commentedFormatting
Comment #28
spokjeWow, that's impressive work @quietone (and @larowlan)!
Would like some more eyes on this before RTBC, but I think you captured it all, at the very least this is a great fundament for a doc-page.
We might bump into some small fringe-issues whilst we deprecate/remove for D10, but this (again) at the very least covers all the basics.
Comment #29
catchA separate page with a direct link sounds good to me. The main page could just define obsolete vs. deprecated and link?
Comment #30
bbralaThat would be best probably.
Comment #31
quietone commentedI created a new page, Module of theme removal process and updated Modules and themes on the deprecation policy page to point to former for the detailed steps. I don't think I lost any data in my changes but I am sure these will needed tweaks as module removals are worked on.
I think we have done everything that needs to be done here and and therefor setting to RTBC.
Is there more to do here?
Comment #32
spokjeAs far as I can see this is (at the _very_ least) an excellent documentation of what we've learned so far whilst doing the core-deprecation/removal-dance.
As already said by @quietone:
But now we have a base for the tweaks to be done on.
Marking this as fixed (with a big thanks to all involved, with bonus bow to @quietone and @larowlan)
Comment #33
bbralaChanged 2 small typos. Think there was some theme mentions that should be module.