Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
#3087214: Expose manual method to update site does a good job of bindly letting someone just click a link to update their site until they reach the end of their minor version updates. Its logic is intentionally dumb and simple. Let's do things more better and figure out what is the most recent next minor version to which we wish to upgrade.
Steps to test
- Prerequisite: Have an install of Drupal 8 that needs an update. Bonus, install a version that has known security issues.
- Install module via composer,
composer require drupal/automatic_updates
- Apply patch.
- Visit /admin/config/automatic_updates, expand the experimental section, read the dire warnings and hit that link.
Note, depending on what version you are updating from, #3087196: Handle HTTP Status 429 from quasi patch files has not landed so you might have to hit that link a couple times to actually be successful.
Comment | File | Size | Author |
---|---|---|---|
#10 | 3087463-10.patch | 15.12 KB | heddn |
#10 | interdiff_9-10.txt | 1.87 KB | heddn |
Comments
Comment #2
heddnThis expands upon #3087214: Expose manual method to update site to provide a link to the recommended version, without as much dumbness.
Comment #3
heddnComment #4
heddnComment #5
ressa CreditAttribution: ressa at Ardea commentedCool, with this improvement I get to go directly from 8.7.4 to 8.7.8:
http://autoupdate.lndo.site/automatic_updates/in-place-update/drupal/cor...
I do get these warnings, the update succeeds nevertheless. Perhaps I get them because I use Composer, and not the tarball?:
After updating, initially this text is shown:
After I run
drush cr
, I get the correct text:So perhaps the cache can be rebuilt by the module, after the update process is completed?
Also, great to see that changed files are now getting logged, thanks! However, since there are so many insertions now, would it be possible to list the files in a single log insertion, or would that become too large?
----------------------
Putting my process for creating a fresh Lando environment here, to document it for myself, but also if others are interested, It takes me around two minutes:
Comment #6
heddnI've opened #3087501: How much and how to log when updating in-place to address the logging concerns.
Comment #7
heddnNW for clearing cache + code standards.
line 142 A comma should follow the last multiline array item. Found: 'Note: Might break the site. No readiness checks or anything in place. Just update the files of Drupal core. Database updates are not run.'
Comment #8
heddnThose warnings/errors come from readiness checks. The manual update process is very manual and doesn't honour anything. It in a sense bypasses any and all safety net. But it lets us get valuable feedback while we are experimenting. Please keep the input coming.
Comment #9
heddnHere we add some guard rails to the mix. For example 8.7.2 adds a modification to
composer.lock
. That is a modified file and with the current nature of how this module depends on 3rd party php dependencies, it means we have a modified composer.lock file.Comment #10
heddnFixing phpcs.
Comment #12
heddnI couldn't reproduce the issue w/ caching of the version string. If it surfaces again, we can fix it w/ a bug fix. This is an improvement over no guardrails, so committing.
Comment #13
ressa CreditAttribution: ressa at Ardea commentedI also now can't reproduce the version string thing @heddn. After updating it works perfectly, and shows the correct text: