Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#44858 closed enhancement (fixed)

Implement travis_retry to reduce the chance that network errors cause CI builds to fail

Reported by: johnbillion Owned by: pento
Priority: low Milestone: 5.0
Component: Build/Test Tools Version:
Severity: minor Keywords: has-patch commit
Cc: Focuses:

Description

Travis CI has a travis_retry shell function that can be prefixed onto installation commands and cause them to retry up to three times in the event of a non-zero response.

Let's implement this for all commands called during before_install and before_script that touch the network, for example the svn and composer commands. This will reduce the chance that a network issue will cause the build to fail.

Ref: ​https://docs.travis-ci.com/user/common-build-problems/#timeouts-installing-dependencies

Attachments (1)

44858.diff​ (1.4 KB ) - added by johnbillion 8 years ago.

Download all attachments as: .zip

Change History (8)

@johnbillion
8 years ago

#1 follow-up: @johnbillion
8 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone Awaiting Review → 5.0

@netweb Any thoughts on this? I can't see a downside myself.

#2 in reply to: ↑ 1 @netweb
8 years ago

  • Keywords commit added

Replying to johnbillion:

@netweb Any thoughts on this? I can't see a downside myself.

Nope, go for it

#3 @johnbillion
8 years ago

In 43645:

Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.

This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times.

See #44858

#4 @johnbillion
8 years ago

  • Resolution → fixed
  • Status new → closed

#5 @pento
8 years ago

  • Resolution fixed
  • Status closed → reopened

Reopen for merge to the 5.0 branch.

#6 @pento
8 years ago

  • Owner set to pento
  • Resolution → fixed
  • Status reopened → closed

In 43724:

Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.

This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times.

Merges [43645] to the 5.0 branch.

Props johnbillion.
Fixes #44858.

#7 @pento
8 years ago

In 43725:

Build/Test Tools: Remove an extra line incorrectly included in [43724].

See #44858.

Note: See TracTickets for help on using tickets.