Skip to content

Commit

Permalink
Try to install the SDK up to 3 times (#30742)
Browse files Browse the repository at this point in the history
Summary:
The windows CI tests are flaky due to network failures trying to install the android SDK.  This modifies the CI to retry a couple of times if the first install fails.

CircleCI will timeout the command if there is no output to the console for 10mins.  I've added a timeout to the choco command for 9mins, which should cause it to timeout before the circleci one (assuming that it spends a non-zero time with output before hanging on the download)  On successful downloads runs the download seems to be substantially quicker than the 10min timeout.

I added --force and --forcedependencies on the retries, otherwise if the jdk package fails, but the androidsdk package installs, the retry will still not install the jdk package.

This doesn't fully fix the issue, since the CI is still hitting the network, which could be flaky all 3 attempts.  But hopefully it'll improve the success rate somewhat.  -- Really the Windows CI job should have some kind of docker image or something that already has all the prereqs installed.

## Changelog

[Internal] [Fixed] - Windows CI Android SDK install retry

Pull Request resolved: #30742

Test Plan: We'll see if the windows CI becomes more reliable

Reviewed By: fkgozali

Differential Revision: D26231499

Pulled By: hramos

fbshipit-source-id: f4a7f2132b3317f4763ddadcd909ef1c2a43dc2f
  • Loading branch information
acoates-ms authored and facebook-github-bot committed Feb 3, 2021
1 parent 5d8e759 commit f66dcab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,11 @@ jobs:
paths:
- C:\Users\circleci\AppData\Local\Yarn

# Try to install the SDK up to 3 times, since network flakiness can cause install failures
# Using a timeout of 9 mins, as circle ci will timeout if there is no output for 10 mins
- run:
name: Install Android SDK Tools
command: choco install android-sdk
command: choco install android-sdk --timeout 540; if (!$?) { choco install android-sdk --timeout 540 --force --forcedependencies}; if (!$?) { choco install android-sdk --force --forcedependencies}

- run:
name: Setup Android SDKs
Expand Down

0 comments on commit f66dcab

Please sign in to comment.