Skip to content

Updating Yarn Cache path to fix broken CI #32834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed

Conversation

cortinico
Copy link
Contributor

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

This PR attempts to fix it by changing the path of the Yarn cache to a folder that is always writable.
See react-native-community/react-native-circleci-orb#59 for reference.

Changelog

[Internal] - Updating Yarn Cache path to fix broken CI

Test Plan

Will wait for CI output.

The CI is currently failing with:
```
Error extracting tarball /tmp/cache1419328940 : tar: root/.cache/yarn: Cannot mkdir: Permission denied tar: root/.cache/yarn/v6
```
This PR attempts to fix it by changing the path of the Yarn cache to a folder that is always writable.
See react-native-community/react-native-circleci-orb#59 for reference.
@cortinico cortinico requested a review from lunaleaps January 5, 2022 17:35
@cortinico cortinico requested a review from hramos as a code owner January 5, 2022 17:35
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jan 5, 2022
@analysis-bot
Copy link

analysis-bot commented Jan 5, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,289,887 -12
android hermes armeabi-v7a 7,624,827 +0
android hermes x86 8,762,312 -5
android hermes x86_64 8,699,306 -10
android jsc arm64-v8a 9,678,191 +2
android jsc armeabi-v7a 8,669,816 +11
android jsc x86 9,636,109 +2
android jsc x86_64 10,230,710 +3

Base commit: a03bd2f
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: a03bd2f
Branch: main

@facebook-github-bot
Copy link
Contributor

@cortinico has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cortinico in 252b2a6.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 6, 2022
Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this pull request Jan 9, 2022
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.

[Internal] - Updating Yarn Cache path to fix broken CI

Pull Request resolved: facebook#32834

Test Plan: Verified that the external CI is green: facebook#32834

Reviewed By: lunaleaps

Differential Revision: D33453702

Pulled By: cortinico

fbshipit-source-id: 52bf42db583eaf6aa913f1bb164566f8c3563d36
kelset pushed a commit to microsoft/react-native-macos that referenced this pull request Mar 29, 2022
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: facebook#32834

Test Plan: Verified that the external CI is green: facebook#32834

Reviewed By: lunaleaps

Differential Revision: D33453702

Pulled By: cortinico

fbshipit-source-id: 52bf42db583eaf6aa913f1bb164566f8c3563d36
@cortinico cortinico deleted the cortinico-patch-1 branch June 27, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants