Problem/Motivation

We should prevent people updating from 10.6 to 11.2 or lower.

See #3463226: Use the new equivalent updates API to prevent updates from 10.4.0 to 11.0.0 for the equivalent 11.1 issue, exactly the same pattern can be copied from there.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3561087

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

godotislate made their first commit to this issue’s fork.

godotislate’s picture

Title: Add equivalent updates hook to prevent downgrades from 10.6 to 11.3 » Add equivalent updates hook to prevent downgrades from 10.6 to 11.2
Issue summary: View changes

godotislate’s picture

Status: Active » Needs review

10.6.x MR https://git.drupalcode.org/project/drupal/-/merge_requests/14021
11.x MR https://git.drupalcode.org/project/drupal/-/merge_requests/14020

It occurs to me now that the test changes might be unnecessary, since the system update itself isn't being test. If so, I can revert.

Also, I noticed that if I started on the 10.6 MR branch and install a new site, then if I update the site to 11.2.x, the requirements warning is not shown. This is because when installing on 10.6, the update hooks don't run, so the equivalent update registration doesn't happen. This is the same as installing on 10.4 and updating to 11.0. Since there aren't a lot of reports of people updating to downgrade versions, this might be fine?

catch’s picture

This is because when installing on 10.6, the update hooks don't run, so the equivalent update registration doesn't happen.

I think you found a fatal flaw with the original plan... We could probably add something to system_install() in 10.6 to cover this, but it's another thing we'd need to remember and keep updated. It might not be worth it.

I'm only aware of one report from someone who actually did a downgrade, and that was fairly early on in the 11.0/11.1 cycle.

xjm’s picture

I think we should plan to address #6 for Drupal 11/12 in a more holistic way, and possibly consider backporting fixes for it for 10.6/11.2 at least so it is addressed for the next six months of security fixes there. I don't think it should block this issue, though, as the most immediate concern is for people who run latest versions.

xjm’s picture

Issue tags: +Needs followup

Tagging for #6.

xjm’s picture

I agree that we can remove the test changes BTW.

godotislate’s picture

Removed the test changes in both MRs, added follow up per #9: #3561302: Register equivalent updates on site install

godotislate’s picture

Issue tags: -Needs followup
catch’s picture

Status: Needs review » Reviewed & tested by the community

Good to go with just the updates now I think.

dww’s picture

Probably RTBC as-is, but opened a question about the chosen update N number for the 11.x MR.

dww’s picture

p.s. @godotislate: Thanks for discovering the flaw in the approach we've been using, and for opening the follow-up!

godotislate’s picture

@dww thanks for catching that. I was wondering why there wasn't a 11200, hence why I didn't do 11300, only to realize now that 11200 is above all the other update hooks, including 11100. Applied the suggestions.

catch’s picture

We reserve the 000 update hook for major releases, for reasons I can't remember and possibly never fully understood - it has to do with the 7-8 upgrade path and is not really relevant any more. I think starting from 001 is in various docs because of this, but it's definitely fine to use 11300 for minor releases and is what we should do. We only need to leave enough space to have 100 updates in 11.2.x, not 101.

dww’s picture

Great, thanks! This is now RTBC to my eyes...

quietone’s picture

@godotislate, thanks for the fast reply

dww’s picture

Good find, @quiteone. Sorry I missed that. Thanks @godotislate for the quick fix.

  • catch committed 74dfef46 on 11.3.x
    task: #3561087 Add equivalent updates hook to prevent downgrades from 10...

  • catch committed 68b873a9 on 11.x
    task: #3561087 Add equivalent updates hook to prevent downgrades from 10...

  • catch committed 9cb2f60a on 10.6.x
    task: #3561087 Add equivalent updates hook to prevent downgrades from 10...

catch’s picture

Version: 11.x-dev » 10.6.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and 11.3.x and then to 10.6.x respectively, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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