if process to install a module encounters an unrelated missing module in the system, the system is left unstable

Created on 20 March 2019, about 5 years ago
Updated 8 June 2023, about 1 year ago

This came up in #3029107: Drush updb doesn't work with latest version of Lightning Media. β†’ but it seems to me this is a general problem.

Over on that issue, we have a hook_update_N() that is installing a new module.

On my system, I happened to have a missing module, a completely unrelated custom module I'd built in a sandbox branch, installed, and then switched branches without uninstalling (oops!).

The update hook crashed with 'The module foo does not exist.'

The site was then left in an unstable state: the new module that hook_update_N() wanted to enable was enabled, but its install configuration was missing.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
ExtensionΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada jodavidson

    This seems like a situation that should be handled in the custom hook. If something goes wrong during the update/install process that process should be rolled back. Ie, the module that is being installed should then be uninstalled. Unless I'm missing something.

Production build 0.69.0 2024