-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade/Install: Delay automatic updates after installation. #6828
Upgrade/Install: Delay automatic updates after installation. #6828
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
ca61465
to
d31f613
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on WordPress-Develop by adding add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' );
as an mu-plugin.
On trunk I was immediately presented with a maintenance mode screen, on this branch I was able to login immediately.
I think this change makes sense but it was my suggestion so of course I do. It would be good to get a few others to express an opinion too.
My one question is why the scheduling is being modified in wp_install()
rather than in wp_schedule_update_checks()
?
The main reason is context. The normal scheduling of An additional but related reason is that other calls to @hellofromtonya @desrosj @audrasjb @johnbillion Are any of you available to add your thoughts on this PR? I'd like to land this ahead of 6.6 Beta 3 tomorrow as the final planned Beta of the 6.6 cycle. Thanks! |
Test ReportEnv
Test Steps
<?php
add_filter( 'automatic_updates_is_vcs_checkout', '__return_false' );
Actual ResultsWithout this patch, able to reproduce the issue: With this patch, ✅ was redirected to the Login screen. This PR resolves the issue ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in my test report, this patch resolves the issue.
I agree with @costdev to include the changes in wp_install()
function (see his reasoning here).
This change LGTM for commit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@costdev @hellofromtonya Thanks, that works for me.
Personally, I don't think there's a realistic expectation of that, and scheduling it at I don't feel strongly about this though, but I do feel it would be cleaner than the PR. |
@dd32 I see your point, and though the code changes would be cleaner if only modifying For example, code that clears the cron schedule for automatic updates, then runs Given that this is possible, it's a risk I don't feel is worth taking to resolve the issue in the ticket, which is specifically in a post-installation context. |
I chatted to Colin a bit further about when to delay/offset the cron jobs. Given that the release is in beta, we think it might be best to reevaluate whether the offset can be added in the original location post release. That will allow for further work looking in to the situation described above and a considered decision about any implications. |
@dd32 Are you happy for us to commit this PR's changes for 6.6 Beta 3 and look at whether to change this to the |
Good plan.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM for 6.6 Beta 3 commit as it resolves the reported issue in the "post-installation context."
Plus, there's a plan to evaluate "unintended consequences" concerns of changing in wp_schedule_update_checks()
in this context.
Committed in r58435. |
Note:
The changes in this PR cannot be tested in a
wordpress-develop
checkout because automatic updates do not run in version-controlled systems. Download 6.6 Beta X, then paste these changes in place before attempting to install the site.Alternatively, if you have permissions for this repo, download the build artifact from the bottom of this page.
After installation, the user is directed to the
Log In
page. This triggers thewp_schedule_update_checks()
function which is hooked toinit
. As a result, the user may be presented with a maintenance mode screen just after installing WordPress.To improve the user experience, this delays Core updates by 1 hour, plugin updates by 1.5 hours, and theme updates by 2 hours.
Trac ticket: https://core.trac.wordpress.org/ticket/61457