automated_cron should not run cron when visiting update.php

Created on 3 November 2022, over 1 year ago
Updated 15 February 2023, over 1 year ago

Problem/Motivation

This problem has existed ever since #2507031: Optimize automatic cron subscriber by moving automatic cron to a module β†’ .

\Drupal\automated_cron\EventSubscriber\AutomatedCron::onTerminate() also gets invoked when visiting update.php, which may result in values getting set that the updates to be applied would have generated (e.g. renaming key-value pairs). This means that this can trigger a race condition that can cause updates to fail.

Steps to reproduce

Update automatic_updates to have automatic_updates_update_9001() applied on a site that has automated_cron installed.

Proposed resolution

Ensure that \Drupal\automated_cron\EventSubscriber\AutomatedCron::onTerminate() does not run when visiting update.php.

Remaining tasks

TBD

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.1 ✨

Component
CronΒ  β†’

Last updated 7 days ago

No maintainer
Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

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.

Production build 0.69.0 2024