[wp-trac] [WordPress Trac] #51857: Add rollback for failed plugin/theme updates

WordPress Trac noreply at wordpress.org
Wed Jan 20 21:37:55 UTC 2021


#51857: Add rollback for failed plugin/theme updates
-------------------------------------------------+-------------------------
 Reporter:  pbiron                               |       Owner:  pbiron
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.7
Component:  Upgrade/Install                      |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-        |     Focuses:
  testing early                                  |
-------------------------------------------------+-------------------------

Comment (by afragen):

 Replying to [comment:49 SergeyBiryukov]:
 > Thanks for the patch!
 >
 > It looks like there are some concerns about performance implications of
 building (and then potentially unpacking) a zip file with the current
 plugin version, especially for large plugins. Instead of building a zip
 file, could we rename the plugin directory to something reasonably unique
 like `plugin-slug.__rollback__`, and then delete it on successful update,
 or rename back on failure? I think that would not require any additional
 resources. Creating a zip file might save some disk space, but if the
 space is already low enough for that to make a difference, then it seems
 like updates on that site would start failing anyway sooner rather than
 later.

 Thanks for the feedback.

 Unfortunately `rename()` can be flaky/unreliable and fallback from
 `rename()` involves file copy which is the likely cause of the failure in
 the first place. Without testing the patch are we looking to solve a
 problem that doesn't exist?

 A server timeout issue is mostly fixed in a page reload and the site isn't
 likley any worse off than it currently would be.

 Isn't this what alpha is for? Unless there's some other concern?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51857#comment:52>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list