Skip to content

Commit 252b2a6

Browse files
cortinicofacebook-github-bot
authored andcommitted
Updating Yarn Cache path to fix broken CI (#32834)
Summary: The CI is currently failing with: ``` Error extracting tarball /tmp/cache1419328940 : tar: root/.cache/yarn: Cannot mkdir: Permission denied tar: root/.cache/yarn/v6 ``` The problem is that we're sharing the Yarn cache between two jobs (`test_js` and `test_ios_unit_jsc`) which are executed on two difference executors (a Machine vs a Docker container). I've update the cache key to be `v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}` so the job name is accounted when computing the Cache Key. Moreover the `test_js` test was also failing on `flow check` as one of the library we depend on (`resolve`) added a test with a malformed JSON. I'm fixing this failure as well so the CI is back green. ## Changelog [Internal] - Updating Yarn Cache path to fix broken CI Pull Request resolved: #32834 Test Plan: Verified that the external CI is green: #32834 Reviewed By: lunaleaps Differential Revision: D33453702 Pulled By: cortinico fbshipit-source-id: 52bf42db583eaf6aa913f1bb164566f8c3563d36
1 parent cd4c665 commit 252b2a6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ commands:
7878
steps:
7979
- restore_cache:
8080
keys:
81-
- v5-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
81+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}
82+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}
83+
- v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}
8284
- run:
8385
name: "Yarn: Install Dependencies"
8486
command: |
@@ -90,7 +92,7 @@ commands:
9092
- save_cache:
9193
paths:
9294
- ~/.cache/yarn
93-
key: v5-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
95+
key: v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "yarn.lock" }}
9496

9597
install_buck_tooling:
9698
steps:

scripts/run-ci-e2e-tests.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* --retries [num] - how many times to retry possible flaky commands: yarn add and running tests, default 1
2020
*/
2121

22-
const {cd, cp, echo, exec, exit, mv} = require('shelljs');
22+
const {cd, cp, echo, exec, exit, mv, rm} = require('shelljs');
2323
const spawn = require('child_process').spawn;
2424
const argv = require('yargs').argv;
2525
const path = require('path');
@@ -265,6 +265,9 @@ try {
265265
throw Error(exitCode);
266266
}
267267
describe('Test: Flow check');
268+
// The resolve package included a test for a malformed package.json (see https://github.com/browserify/resolve/issues/89)
269+
// that is failing the flow check. We're removing it.
270+
rm('-rf', './node_modules/resolve/test/resolver/malformed_package_json');
268271
if (exec(`${ROOT}/node_modules/.bin/flow check`).code) {
269272
echo('Flow check failed.');
270273
exitCode = 1;

0 commit comments

Comments
 (0)