[wp-trac] [WordPress Trac] #38024: fs_unavailable while auto-updating several plugins in a row

WordPress Trac noreply at wordpress.org
Sat Nov 12 11:56:07 UTC 2016


#38024: fs_unavailable while auto-updating several plugins in a row
-------------------------------------+------------------------
 Reporter:  benjaminniess            |       Owner:  dd32
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  4.6.2
Component:  Upgrade/Install          |     Version:  4.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------

Comment (by dd32):

 Traced this back to [37272] & [34751] which forcibly clears the update
 caches during the update, rather than respecting the parameters passed in.

 We could pass the `is_multi` flag, but that doesn't actually fix anything,
 it simply avoids running the `upgrader_process_complete` action, which is
 what the problematic cache-clearing functions are hooked onto, it also
 happens to be the action that other things are hooked onto, so if we were
 to do that, we'd need to duplicate that action out into the automatic
 updater, not something I feel like doing right now.

 [attachment:38024.2.diff] fixes this by rejigging the cache clearing to
 happen when it should, and also to respect the parameter which specifies
 to clear the cache or not. I'm posting here for others to test and review,
 I'll finish up reviewing it tomorrow and commit.
 [attachment:test.php] is my CLI script for testing that the autoupdate is
 working; patch `src`, add some out-of-date plugins to it, and run that..
 it does a grunt file copy, kicks off a background update and displays the
 email message on the command line.

 I've tested and confirmed that translation installation appears to work as
 expected for the various update flows in WordPress, even the ones that are
 absolutely impossible to trigger now thanks to JS.

 We could backport these to 4.4+ (which [37272] was in), but I'm okay with
 4.7+ only. My reasoning is that the plugin background updates will be done
 the next time the cron is run (2~4 times daily) and it's not that often
 for multiple plugins to get updates within the same update check period.
 Those with background updates enabled for plugins are also more likely
 keeping up with major version updates, so they'll get the fixes anyway.

 cc @ocean90

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


More information about the wp-trac mailing list