Problem/Motivation
Background discussion in #2942096: [policy, no patch] Remove old update hooks prior to each major version (Drupal 10 and later).
Last time we did similar was in #3261486: Remove core updates added prior to 9.3.0 and adjust test coverage
Steps to reproduce
Proposed resolution
1. Find the updates and post updates
2. Remove the updates and increment hook_update_last_removed() and hook_removed_post_updates()
3. Import the 9.3.x dumps into a 9.3.0 install, update to 9.4.x, uninstall any deleted (in 10.0.x) core modules, enable mysql and sqlite module. re-export the dumps with their new names, add the newly renamed dumps to 10.0.x
4. Remove any tests of the removed upgrade paths from 10.0.x
5. Also add the new 9.4.0 dumps to 9.5.x and 9.4.x so that tests can more easily be backported. However both 9.5.x and 9.4.x can and should keep the 9.3.0 dumps too.
6. Update @required_min_version in system_requirements().
Actual dumps will be from 9.4.x instead of 9.4.0 to account for an additional ckeditor update being removed, since we don't know exactly which tag the update will have been removed from yet, dump names have been kept as 9.4.0. No other updates have been added in the meantime so the database is identical to what it would otherwise be except for ckeditor4.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
All Drupal core updates added prior to the 9.4.0, (9.4.4 for sites with CKEditor installed), release have been removed from the 10.0.x branch.
This means that Drupal sites running 9.3.x or earlier versions, must first update to 9.4.0 or later, prior to updating to Drupal 10. In general, sites should aim to update to the most recent release of their current major branch before updating to the next major release.
| Comment | File | Size | Author |
|---|---|---|---|
| #62 | 3290810-d10.1-62.patch | 1.3 MB | spokje |
| #61 | 3290810-61.patch | 1.3 MB | spokje |
Comments
Comment #2
xjmComment #3
catchComment #4
longwaveAdded a note to update system_requirements() following #3290808: Remove workspaces special casing from system_requirements() and fix versions/docs
Comment #5
catchvia @longwave:
This is a new problem I think. System module hasn't had a single 9.x update, so special casing it in system_requirements() won't work. User module has user_update_9301() so maybe we can use that. This only affects the message you get, you still won't be able to update if any module is skipping updates, just you won't get the custom 'update to 9.4.0 first' message but instead the generic one about schema version - but we should try to retain that if we can since it's a much more self-documenting error message.
If we had to we could probably special-case non-required core modules like views too - since if any of them can't be updated we know it's an issue with jumping over too many core versions.
Comment #6
xjmComment #7
catch#3291744: Ensure Editor config entities using CKEditor 4 only store plugins settings for actually enabled plugins just landing in 9.4.x, we'll want to remove that update in 10.0.x and implement hook_update_last_removed() for it so that ckeditor4 users have to run that update before switching to Drupal 10 - that will increase the likelihood of a successful switch to ckeditor5.
@Spokje also noted this will conflict with a lot of deprecated module removal issues. One thing we could potentially do is remove modules we know we definitely want to deprecate (quickedit, RDF) from the 9.4.0 standard filled database dump in Drupal 10 pre-emptively.
Comment #8
spokjeSeeing the speed at which the current removal is going, I would advise not to take this route and fix this (issue) first and update the fixture when the removal is actually (almost) going in.
So basically: Update the fixture in each removal issue. If one gets in, that's great, we'll update "all" the other removal issues with the newly recreated fixture (with one less module in it), as we go.
Comment #9
catch@Spokje OK that makes sense. More conflicts but each issue internally consistent.
If that's the case, I think we should try to get this issue over and done with so it's a clear path for removal issues (apart from each other) once it's in.
Uploading a patch with what is hopefully the correct update removals, but without the database dump changes yet. This should cause a lot of test failures.
Comment #10
catchAnd with the correlating update tests removed and new database dumps.
Comment #11
catchShould fix various linting errors/cruft.
Comment #12
catchMore cruft in ViewsConfigUpdater.
Comment #13
catchEven more cruft.
Comment #14
catchNeeds a phpcs:ignore (at least until we decide what to do with an empty ViewsConfigUpdater).
Comment #16
catchHelps when the database dumps have the right filename.
Comment #18
spokjeSlight less red TestBot
Comment #19
catchThe two ViewsConfigUpdater sort methods appear to be relied on by non-update tests. This seems wrong but we should open a separate issue to fix that I think.
Restoring those.
The rest of the test failures appear to be because we have no updates to run any more, can't remember what we did about that last time, maybe a placeholder?
Comment #20
spokjeHmmm, don't think so, on 10.x there's no
aggregatorandhalany more.Not sure what to do about the CKEditor version being too old.
Comment #21
catcharghhh - I should have dumped a 9.4.x database instead of a 9.4.0 database! We'll need to re-do the database dumps anyway to uninstall hal and aggregator.
Comment #22
longwave@catch Not sure we ran into this before, because of the situation with Workspaces - we added
workspaces_post_update_remove_association_schema_data()in 8.8.3 and did not remove it for the Drupal 9 cycle, and the upgrade tests ran from dumps from 8.8.0. See #3106666-47: Remove post updates added prior to 8.8.0edit: though #20 points to a different problem anyway, we might still run into this when the dump is clean, let's see!
Comment #23
spokjeLet's see if this gets rid off all the non
UpdatePathTestTraitrelated errors before we redo the fixtures.Comment #24
spokjeComment #25
spokjeCan we loose the
phpcs:ignore?Comment #26
spokjeComment #27
spokjeBy the looks of it (haven't actually run them locally to confirm) the remaining test-failures are because the updates that are being tested already ran when doing the updates from 9.3.0 => 9.4.x.
Comment #28
catchYep those two tests can just go.
Comment #29
catchsqlite and pgsql test failures are relevant.
Comment #30
spokjeI (kinda) was afraid of this already...
How do we enable the relevant DB-specific module on Drupal CI?
Locally I work with MySQL, so I have the
mysqlmodule enabled.Uninstalling (with drush) isn't possible:
mysql: The module 'MySQL' is providing the database driver 'mysql'.It's present in
core.extensionandlocale.project.Please don't tell me we have to manually delete if from the fixture?
Comment #31
spokjeComment #32
catchI think the fixture now needs to have all three modules installed (i.e. we need to regenerate the fixture with sqlite and pgsql additionally installed) - that way the driver is available for whichever connection ends up being used in the test.
Comment #33
andypostInstead of 3 different fixtures I find it more useful to enable all 3 drivers in one dump
Comment #34
catchIncluding the fix from #3296108: mysql_requirements() assumes it's used for the default connection now to get a proper green run here. Once that issue lands we need to remove the mysql.install hunk from here.
Comment #35
spokjeLet's see if that works
Comment #36
dwwThanks everyone for working on this! Given #34 and the PP-1, I think we should leave this postponed, even if we're actively working on it.
Agreed with @andypost (33) and @catch (34) that a single fixture with all 3 drivers enabled is the best solution, so thanks for uploading that, @Spokje!
Glad to see we're planning to put the new fixtures into as many branches as possible. That's definitely helped during similar issues in the past.
Comment #37
catchOpened the ViewsConfigUpdater follow-up #3296112: Remove ViewsConfigUpdater::processSortFieldIdentifierUpdateHandler.
Comment #38
spokjeComment #39
dwwBlocker is in. Needs trivial reroll to remove the mysql.install chunk.
Comment #40
dwwComment #41
spokjePatch looks fine to me, but since I've worked on it, can't RTBC it myself.
Also:
1)
It needs a9.5.xpatch/MR which includes only both the 9.4.0-fixtures. Thedrupal-9.4.0.filled.standard.php.gzfixture should haveaggregatorandhalenabled.2) Although this patch isn't technically postponed on it, #3296112: Remove ViewsConfigUpdater::processSortFieldIdentifierUpdateHandler in combination with this issue would truly get rid of all code related to updates before
9.4.0.Comment #42
spokjeComment #43
dwwI’m no release manager, but I hope we’re not planning to backport this to 9.5.x. That seems wrong. Folks should be able to update from 9.2.x directly to 9.5.x...
Comment #44
spokjeOnly adding the fixtures without using them in any code seems to me like it's not interfering with updates from any version to any other version?
Disclaimer: Also not a release manager :)
Comment #45
dwwOh, slick. I didn’t actually look. 😅 yes, if it’s just the fixtures, love it. 😍
Thanks!
-Derek
Comment #46
catchBackport looks good (to the extent that it's possible to say that a 100% binary patch looks good) and think we should probably backport that one all the way back to 9.4.x for contrib updates (or unexpected 9.4.x updates still to come, hopefully not though).
Comment #47
spokjeComment #48
spokjeUpdated version and IS accordingly
Comment #49
dwwYeah, totally agree that the 9.4.0 fixtures should be back in 9.4.x, too. Sorry for the false alarm, I didn’t look at the actual patch in 42. I’ve been on my phone since early today...
Thanks y’all
Comment #50
catchComment #51
dwwThanks for the title change. Maybe it’s too much of a PITA for committers, but any chance the commit message for the 9.x backports of this just say the “Add 9.4.0 database dumps” part of that? I predict I won’t be the only one confused and concerned if we see the “remove updates” part in the 9.x histories...
Comment #52
dwwP.S. We could even split that out to a child issue if that was cleaner / easier.
Comment #53
spokjeComment #54
spokjeComment #55
spokjeComment #56
spokjeO, the joy of multiple branches...
Comment #57
spokjeIf #3281434: Update System module tests to not use Bartik and Seven lands before this one, we need to update all fixtures in this issue.
If it doesn't, we need a new issue to update all fixtures in this issue...
Comment #58
catchJust committed #3281434: Update System module tests to not use Bartik and Seven which means we do indeed need new fixtures here.
Comment #59
catchOpened a separate backport issue so we don't end up with the alarming commit message quandry.
Comment #60
spokjeComment #61
spokjeComment #62
spokjeComment #63
spokjeNo interdiffs, only fixture changes.
Comment #64
spokjeComment #65
bbralaWent through all changes, every single change makes sense. No references to the 9.3 fixture left and all tasks in IS look like they have been done. I have not scoured for possible missed updates though, but i feel that has been handled by the capable people before me.
RTBC for me.
Comment #66
alexpottcore/themes/olivero/tests/src/Unit/OliveroHexToHslTest.php should not be removed.
Comment #67
alexpottActually I can fix that on commit. The rest is fine.
Comment #68
alexpottCommitted 6a1855c and pushed to 10.1.x. Thanks!
Committed f342728 and pushed to 10.0.x. Thanks!
Comment #71
quietone commentedAdded change record
Comment #72
xjmComment #74
phenaproximaThis needs a release note to explain that you have to be on Drupal 9.4.0 or later before updating to Drupal 10. I'm re-opening it for that.
Comment #75
catchComment #76
phenaproximaThanks, @catch. Looks great!