[wp-trac] [WordPress Trac] #10787: Email administrators that an update is available for core|plugins|themes

WordPress Trac noreply at wordpress.org
Fri Oct 18 08:36:27 UTC 2013


#10787: Email administrators that an update is available for core|plugins|themes
------------------------------+-----------------------
 Reporter:  dd32              |       Owner:
     Type:  task (blessed)    |      Status:  assigned
 Priority:  high              |   Milestone:  3.7
Component:  Upgrade/Install   |     Version:  2.9
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------
Changes (by nacin):

 * keywords:  needs-patch => has-patch commit


Comment:

 [attachment:10787.diff] sends the emails added in [25837]. Heavily
 documented because of all of the different situations it needs to account
 for. It also pretty much fixes #22704.

 The big thing it implements is it tracks core auto update failures in an
 option, using that to decide whether it can re-try an update. In a
 nutshell:

  * If the update is a '''success''', it lets the user know. Only in this
 instance: If there are any updates available for plugins or themes, it
 also adds a short note about it.
  * If a '''critical failure''' occurs (files started to be copied), the
 only way it ever tries an auto update again is if a manual update (pushing
 the button) is successful. It emails the administrator a very urgent note.
 (We haven't seen a single critical failure occur this week — this will
 ideally be rare, as it basically requires major I/O failure.)
  * If a '''non-critical failure''' occurs, like being unable to write to
 all required files, it will block auto updates to that version. But a
 future new version will gain the ability again. It emails the
 administrator a note saying we tried but couldn't update.
  * If a '''''transient'' non-critical failure''' occurs (like
 download_failed, which is usually going to be a network issue), it allows
 unlimited retries. But, it won't email the administrator right away. It'll
 schedule an update for an hour from that point of failure (rather than
 waiting 12 hours). If it fails again, *then* it'll email the
 administrator. I wasn't going to implement this originally, but
 markjaquith brought up a good point: the issue could actually be with
 WordPress.org, in which case we'd be emailing a lot of people to update in
 the middle of a brief network issue or something.
  * If we '''can't update''' (as in, we don't even try), and the API has
 tagged the release as `notify_email => true`, then it'll send an email to
 the administrator. We don't need to push this flag out right away with a
 new release. For example, we could use it for major releases a few weeks
 after the fact.

 It needs some testing. I'll make sure dd32 looks at it. Let's get it
 committed today.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/10787#comment:38>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list