[wp-trac] [WordPress Trac] #61459: Disable maintenance mode when core auto-update fails.
WordPress Trac
noreply at wordpress.org
Tue Jun 18 14:18:36 UTC 2024
#61459: Disable maintenance mode when core auto-update fails.
-----------------------------+-----------------------
Reporter: costdev | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.6
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------
Comment (by costdev):
[https://github.com/WordPress/wordpress-develop/pull/6847 PR 6847] adds a
call to `WP_Upgrader::maintenance_mode( false )` to disable maintenance
mode just before the early return.
Hookable points during this process to allow for testing aren't quite
clear, and may require hard-coded changes to functions/methods to return
the appropriate `WP_Error` object to force a failure during testing.
Despite this, it's clear that a flow exists where:
- Maintenance mode is enabled. [https://github.com/WordPress/wordpress-
develop/blob/trunk/src/wp-admin/includes/class-wp-automatic-
updater.php#L474 Line 474]
- The process may hit an early return. [https://github.com/WordPress
/wordpress-develop/blob/trunk/src/wp-admin/includes/class-wp-automatic-
updater.php#L518 Line 518]
- Maintenance mode is disabled later in the method, after the early return
and so won't be hit. [https://github.com/WordPress/wordpress-
develop/blob/trunk/src/wp-admin/includes/class-wp-automatic-
updater.php#L621 Line 621]
Given this, I think it's safe to consider [https://github.com/WordPress
/wordpress-develop/pull/6847 PR 6847] ready for commit ahead of the 6.6
Beta 3 commit freeze in under an hour.
@hellofromTonya What do you think?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61459#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list