Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44858 closed enhancement (fixed)

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

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

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 6 years ago.

Download all attachments as: .zip

Change History (8)

@johnbillion
6 years ago

#1 follow-up: @johnbillion
6 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 5.0

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

#2 in reply to: ↑ 1 @netweb
6 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
6 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
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#5 @pento
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for merge to the 5.0 branch.

#6 @pento
6 years ago

  • Owner set to pento
  • Resolution set to fixed
  • Status changed from reopened to 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
6 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.