Remove all the pre-10.3.0 updates hooks

Created on 9 April 2024, 8 months ago
Updated 4 May 2024, 8 months ago

Problem/Motivation

Like the title says removes all the pre-10.3 update hooks

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Sites must update to Drupal 10.3.0 or higher, prior to updating to Drupal 11. <a href="https://www.drupal.org/node/3442097">See the change record for more details</a>

πŸ“Œ Task
Status

Fixed

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡³πŸ‡ΏNew Zealand quietone

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @quietone
  • Merge request !7400Remove all the pre-10.3.x updates hooks β†’ (Closed) created by quietone
  • Pipeline finished with Failed
    8 months ago
    Total: 1079s
    #142288
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The test failures are in the following, all of which I think need to switch to using the new dumps. The new dumps are over in πŸ“Œ Remove deprecated modules from update testing database dumps etc. Active

    • core/modules/datetime_range/tests/src/Functional/DateRangeFormatterSettingsUpdateTest.php
    • core/modules/editor/tests/src/Functional/Update/EditorSanitizeImageUploadSettingsUpdateTest.php
    • core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderSettingsUpdateTest.php
    • core/modules/system/tests/src/Functional/Update/CronLoggingUpdateTest.php
    • core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
    • core/modules/system/tests/src/Kernel/Scripts/DbImportCommandTest.php
    • core/modules/taxonomy/tests/src/Functional/Update/NullDescriptionTest.php
    • core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I left some local testing files in the MR, with those removed the failing tests are

    • core/modules/datetime_range/tests/src/Functional/DateRangeFormatterSettingsUpdateTest.php
    • core/modules/editor/tests/src/Functional/Update/EditorSanitizeImageUploadSettingsUpdateTest.php
    • core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderSettingsUpdateTest.php
    • core/modules/system/tests/src/Functional/Update/CronLoggingUpdateTest.php
    • core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php
    • core/modules/taxonomy/tests/src/Functional/Update/NullDescriptionTest.php
    • core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Need to investigate core/modules/systems/tests/fixtures/update/drupal-8.*.

  • Assigned to quietone
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • πŸ‡¬πŸ‡§United Kingdom catch

    Marked πŸ“Œ [11.x] [PP-x] Remove updates added up until 10.3.0 from Drupal 11 Active as duplicate since there's an MR here.

  • πŸ‡¬πŸ‡§United Kingdom catch
  • Status changed to Needs work 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    It looks like the UpdatePathTestBase failures are because we now have no updates to run - we should add an new, empty, post update to system.post_update.php to make those pass. We can then remove that stub post update when we have a real update in 11.x to run. It is kludgy, but we still want to test that updates will actually run when there's something to run.

  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    There is now only one failing test, UpdatePathTestBaseTest.php. And that does pass with the new fixture and some schema number changes to UpdatePathTestBase.php. This can be seen in MR7403 from πŸ“Œ Remove deprecated modules from update testing database dumps etc. Active .

    So, does this do the removals correctly (first time I have done this task)?

  • πŸ‡¬πŸ‡§United Kingdom catch

    Left some notes on the MR. I didn't review the whole thing. Everything I did review looked correct, the only thing is I think we can also remove a lot of hook_ENTITY_presave() implementations which are supporting config entity post updates - any config entity update is supposed to have its logic in presave so that it also runs when config is installed from modules (this is not implemented 100% because we make mistakes, but probably about 90%) - and those can all go when the updates go.

  • Status changed to Needs work 8 months ago
  • The Needs Review Queue Bot β†’ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

  • πŸ‡¬πŸ‡§United Kingdom catch

    I looked at this again.

    I think we should actually open a follow-up for the ViewsConfigUpdater/presave removals.

    1. It'll reduce the scope here and make it more reviewable.

    2. As soon as we commit this, new 11.x update hooks can use the new database dumps, so less merge conflicts in either direction.

    3. As soon as we commit this, we can go ahead with module removals.

    4. None of the presave hooks or ViewsConfigUpdater methods are part of the public API, more like dead code, so fine to do as 'deprecated code removal' issues without blocking other things.

    Looks like this needs a rebase though. Can try to do a line-by-line review after that.

  • Pipeline finished with Failed
    8 months ago
    Total: 989s
    #149974
  • Pipeline finished with Failed
    8 months ago
    Total: 1022s
    #149995
  • Pipeline finished with Failed
    8 months ago
    Total: 191s
    #150016
  • Pipeline finished with Failed
    8 months ago
    Total: 986s
    #150025
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    I've rebased and updated the MR. Not sure what needs to be done for ViewsConfigUpdater and I am too tired to think about it.

  • πŸ‡¬πŸ‡§United Kingdom catch

    I think we can do ViewsConfigUpdater in a follow-up per #13. I'll try to review the MR again soon.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    OK, I have pulled out any thing related to ViewsConfigUpdater. At least, I hope I have.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    For now, I have just added a note to the remaining tasks about ViewConfigUpdater om 🌱 [11.x] [META] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch Postponed

  • πŸ‡¬πŸ‡§United Kingdom catch

    Pushed one commit here - removes a dblog post update from the list of removed post updates, because it was removed from the 10.3.x and 11.x branches and wasn't run in the database dump from the other issue - so it's as though that update never existed now.

    Also restored one system post update which was added after the dump was created. We'll either have to create new database dumps to remove that, or leave it in core. I don't want to block the previous issue here on that because it's blocking so many thing and new updates could be added at any time.

    Going to add an extra branch here with the dumps from the other issue to try to figure out the remaining test failures.

  • πŸ‡³πŸ‡ΏNew Zealand quietone

    The test failures in this issue are all in UpdatePathTestBase tests. These are the ones that are fixed in the other issue, πŸ“Œ Remove deprecated modules from update testing database dumps etc. Active .
    I don't see any others.

  • Merge request !7607Draft: Resolve #3439769 "Combined" β†’ (Closed) created by catch
  • Pipeline finished with Success
    8 months ago
    Total: 1039s
    #151100
  • πŸ‡¬πŸ‡§United Kingdom catch

    OK the draft MR confirms that https://git.drupalcode.org/project/drupal/-/merge_requests/7400/diffs?co... gives us a green test run once πŸ“Œ Remove deprecated modules from update testing database dumps etc. Active is committed. So I think we are good here and just need the other issue to land, then a rebase here once it has.

    I had some trouble running update tests (and even manually visiting update.php/selection) locally, but that turns out to be an issue on my local, not caused by anything here or in HEAD afaict.

  • Status changed to Needs review 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • πŸ‡¬πŸ‡§United Kingdom catch

    I reviewed again and didn't find anything.

    Added a change record and release note.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    Note that the 10.3.0 dumps have been created before 10.3.0 is released therefore it is possible that more updates will be added so either we will need to update dumps or not remove these updates.

  • πŸ‡«πŸ‡·France andypost

    Blocker is in

  • Pipeline finished with Failed
    8 months ago
    Total: 232s
    #151326
  • πŸ‡¬πŸ‡§United Kingdom catch

    The changes to deprecated modules aren't really necessary here - the contrib modules already exist, and probably won't want to remove these updates. However because we're going to git rm the modules anyway, I'm not sure it matters - would be more work to go through and undo the changes again.

  • πŸ‡«πŸ‡·France andypost

    Looking at action and tracker removal issues - there's 15 tests to update (replace 9.4 with 10.3 dumps)

    For example https://git.drupalcode.org/project/drupal/-/merge_requests/7358/diffs?co...

  • Pipeline finished with Success
    8 months ago
    Total: 998s
    #151331
  • Status changed to RTBC 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    All green!

  • πŸ‡¬πŸ‡§United Kingdom catch

    @andypost the removal issues will just need to remove the modules in 11.x, nothing to do in core for those (hopefully). The contrib modules may want to update to using the new database dumps (which every other contrib module with updates tests will also want to do for 11.x compatibility).

  • Pipeline finished with Success
    8 months ago
    Total: 996s
    #151365
    • catch β†’ committed 360a9c58 on 11.x
      Issue #3439769 by quietone, catch: Remove all the pre-10.3.0 updates...
  • Status changed to Fixed 8 months ago
  • πŸ‡¬πŸ‡§United Kingdom catch

    Did one more line-by-line review and found one issue - forum was specifying a couple of help post updates in forum_removed_post_update() - these were also in help_removed_post_updates(). Sure this was copypasta, wouldn't cause any issues except confusion.

    I only made very minor changes fixing merge issues/cross commits with HEAD as well as the above, so I think I'm still fine to commit this one.

    One more follow-up created - we actually need to remove the old fixtures from core/modules/system/tests/update too πŸ“Œ Remove the 9.4 database dump fixtures from 11.x Active .

  • Issue was unassigned.
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024