Use the new equivalent updates API to prevent updates from 10.4.0 to 11.0.0

Created on 23 July 2024, 3 months ago
Updated 1 August 2024, 3 months ago

Problem/Motivation

See 🌱 Prevent 'downgrades' from maintenance minors to older minor releases for the next major version Active for background.

If we add a hook_update_N() to system module in 11.1, and backport this to 10.4 using the equivalent updates API, then a site that attempts to 10.4.0 to 11.0.0 will get a requirements error that they're trying to update to a release that is too old, and they should update to a newer release instead (e.g. 11.1).

We don't currently have such an update, so the idea here is to add an empty/no-op update purely to prevent unintentional downgrades like the above from happening.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
Database updateΒ  β†’

Last updated 10 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom catch

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

Merge Requests

Comments & Activities

  • Issue created by @catch
  • First commit to issue fork.
  • Merge request !8900add test β†’ (Open) created by quietone
  • Status changed to Needs review 3 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • Status changed to Needs work 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So ran the test locally without the change to system.install and the test still passes. Shouldn't it fail?

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

    No it should not fail, it is independent of the system.install. The test is relying on the downgrade_test module to provide the hook and that module is only installed in the test after proving the requirement failure. The test is a functional test of the concept. There is no similar test using the actual system_update_11101 because I don't see a way to prevent the update process from finding and executing that hook.

  • Status changed to Needs work 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    I left some comments on the test. It could use some clarification since update tests are dark magic.

    I think we need also need the MR that adds the equivalent system update to review this properly, no?

  • Status changed to Needs review 3 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • Status changed to Needs work 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States xjm

    Still NW for a second MR for 10.4, I think.

Production build 0.71.5 2024