update_cron() can run on every cron for easy misconfigure

Created on 18 February 2017, almost 8 years ago
Updated 21 January 2023, almost 2 years ago

Problem/Motivation

update.settings.yml says:

check:
  disabled_extensions: false
  interval_days: 1

If this value is set to 0 or lower, the logic in update_cron() pulls down update data from d.o on every cron run, for every multisite that has update module enabled.

This is a costly for d.o which has to handle these requests for all sites everywhere.

Proposed resolution

Add a usefulness check on the days-before-next-check value so that it never falls below one.

Allow arbitrary days-until-check settings to encourage even longer intervals, which means less bandwidth cost for the Drupal Association.

Document or somehow encourage users to disable update module on redundant sites, such as multisite.

Remaining tasks

There will likely be a follow-up where the update API is redesigned to be more efficient and scalable.

User interface changes

The settings form for the days-until-check setting will change from a 1 or 7 day dropdown to a numeric setting if the user has changed the value in some other way.

The user can issue a Drush command such as drush cset update.settings check.interval_days 23 and this value will then be reflected in the UI. If they change it back to 1 or 7, the dropdown will return.

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
UpdateΒ  β†’

Last updated 2 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @tedbow
  • πŸ‡ΊπŸ‡ΈUnited States @dww
Created by

πŸ‡ΊπŸ‡ΈUnited States mile23 Seattle, WA

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.

Production build 0.71.5 2024