Skip to content

Commit

Permalink
Reduce flakyness by not downloading extra packages (facebook#36077)
Browse files Browse the repository at this point in the history
Summary:
Yesterday CircleCI was extremely flaky due to us trying to `apt install` extra packages. This mitigates one scenario where we try to redownload `jq` and `shellcheck`.

I've moved to use a container which contains those packages already

## Changelog

[INTERNAL] - Reduce flakyness by not downloading extra packages

Pull Request resolved: facebook#36077

Test Plan: Will wait for a green CI

Reviewed By: cipolleschi

Differential Revision: D43080349

Pulled By: cortinico

fbshipit-source-id: 6527c5ad129f47d8b5f02bf207e1af67a095afa1
  • Loading branch information
cortinico authored and OlimpiaZurek committed May 22, 2023
1 parent 19b43fe commit 3c22311
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:6.2
FROM reactnativecommunity/react-native-android:7.0

LABEL Description="React Native Android Test Image"
LABEL maintainer="Héctor Ramos <[email protected]>"
Expand Down
17 changes: 1 addition & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ executors:
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:6.2
- image: reactnativecommunity/react-native-android:7.0
resource_class: "xlarge"
environment:
- TERM: "dumb"
Expand Down Expand Up @@ -448,24 +448,9 @@ jobs:
steps:
- checkout
- run_yarn


# Note: The yarn gpg key needs to be refreshed to work around https://github.com/yarnpkg/yarn/issues/7866
- run:
name: Install additional GitHub bot dependencies
# TEMP: Added workaround from https://github.com/nodesource/distributions/issues/1266#issuecomment-932583579
command: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
apt update && apt install -y shellcheck jq
apt-get -y install openssl ca-certificates
update-ca-certificates
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
apt update && apt install -y shellcheck jq
- run:
name: Run linters against modified files (analysis-bot)
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" yarn lint-ci
when: always

# -------------------------
# JOBS: Analyze Code
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"update-lock": "npx yarn-deduplicate",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.2",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:7.0",
"docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .",
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh",
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh",
Expand Down

0 comments on commit 3c22311

Please sign in to comment.