Problem/Motivation
If someone has set their site to updated automatically via Cron then there is no reason it should need to update more that 1 patch version at a time via cron.
If someone turns on updates via cron and they are currently more than 1 patch release behind they could be prompted to update the latest release via the UI. This would mean they would then get all patch releases as they are released unless they can't be applied because they have DB updates. see #3252126: Do not apply updates during cron if there are DB updates in the staging area.
If we only choose the latest release on the installed minor then there is more chance there will be DB updates in the update from the current version to the most recent version.
Steps to reproduce
Proposed resolution
This is will need #3252190: Store all installable releases in update_calculate_project_update_status()
- After that is committed we should either, update `\Drupal\automatic_updates\UpdateRecommender::getRecommendedRelease()` to send in something like
$is_cronor just add another method. - add a Readiness check validator warn if cron is enabled and the site is multiple patch release behind instructing the user update via the UI
Remaining tasks
Decide the behavior during cron if the site multiple patch release behind
options:
- Don't allow updating at all
- If the next patch release, for example if the site is on 9.5.4 the next patch release would be 9.5.5, is installable and has no DB updates apply it. This would mean that if a site is on 9.5.4 and the latest release in the minor is 9.5.7 then if all the releases between 9.5.5 and 9.5.7 are installable and have no DB updates then in 3 cron runs the site would be 9.5.7.
User interface changes
API changes
Data model changes
Issue fork automatic_updates-3254207
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
Comment #2
tedbowComment #3
kunal.sachdev commentedComment #8
kunal.sachdev commentedOur error message will not be shown until we fix the problem in #3259810: Validation errors are not logged on cron update attempts.
Comment #9
kunal.sachdev commentedMaking it active again as #3259810: Validation errors are not logged on cron update attempts is fixed now.
Comment #10
kunal.sachdev commentedComment #11
tedbowRTBC. Looks good if tests pass!
Comment #12
phenaproximaI have a few concerns found during a review -- mostly I think this looks good and has solid test coverage, but there are some items of clean-up and one request for clarification.
Comment #13
phenaproximaComment #15
phenaproxima