From 3c223112067f51fa48486f4d4ceb2028a3c4d544 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 7 Feb 2023 07:22:30 -0800 Subject: [PATCH] Reduce flakyness by not downloading extra packages (#36077) 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: https://github.com/facebook/react-native/pull/36077 Test Plan: Will wait for a green CI Reviewed By: cipolleschi Differential Revision: D43080349 Pulled By: cortinico fbshipit-source-id: 6527c5ad129f47d8b5f02bf207e1af67a095afa1 --- .circleci/Dockerfiles/Dockerfile.android | 2 +- .circleci/config.yml | 17 +---------------- package.json | 2 +- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.circleci/Dockerfiles/Dockerfile.android b/.circleci/Dockerfiles/Dockerfile.android index 6b54b14815ca70..4038101a28bf4f 100644 --- a/.circleci/Dockerfiles/Dockerfile.android +++ b/.circleci/Dockerfiles/Dockerfile.android @@ -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 " diff --git a/.circleci/config.yml b/.circleci/config.yml index c86f1ce8fafa9d..768337f5995bd5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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" @@ -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 diff --git a/package.json b/package.json index 225346a4a1d73d..6119bd30689bfd 100644 --- a/package.json +++ b/package.json @@ -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",