Skip to content

Yarn use default value for enableGlobalCache #646

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

Merged
merged 3 commits into from
Oct 24, 2023
Merged

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Oct 24, 2023

Issue

The global cache was disabled while upgrading to [email protected] #632, as it was the default in 3.x

Description

Yarn use default value for enableGlobalCache

Testing

Before

$ yarn config cacheFolder
└─ cacheFolder
   ├─ Description: Folder where the cache files must be written
   ├─ Source: <default>
   └─ Value: '/Users/trivikram/workspace/aws-sdk-js-codemod/.yarn/cache'

After

$ yarn config cacheFolder 
└─ cacheFolder
   ├─ Description: Folder where the cache files must be written
   ├─ Source: <internal>
   └─ Value: '/Users/trivikram/.yarn/berry/cache'

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@changeset-bot
Copy link

changeset-bot bot commented Oct 24, 2023

⚠️ No Changeset found

Latest commit: 85a7d38

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@trivikr
Copy link
Member Author

trivikr commented Oct 24, 2023

There's no difference in CI, since it uses actions cache irrespective of value in enableGlobalCache.

Before

/usr/local/bin/yarn --version
4.0.0
/usr/local/bin/yarn config get cacheFolder
/home/runner/work/aws-sdk-js-codemod/aws-sdk-js-codemod/.yarn/cache
/usr/local/bin/yarn config get enableGlobalCache
false
All dependencies are managed locally by yarn3, the previous cache can be used
Received 0 of 48021279 (0.0%), 0.0 MBs/sec
Cache Size: ~46 MB (480[21](https://github.com/awslabs/aws-sdk-js-codemod/actions/runs/6628655988/job/18006226950#step:3:23)279 B)
/usr/bin/tar -xf /home/runner/work/_temp/d3e76b81-c1dc-4d38-941c-21c384a12708/cache.tzst -P -C /home/runner/work/aws-sdk-js-codemod/aws-sdk-js-codemod --use-compress-program unzstd
Received 48021279 of 48021279 (100.0%), 22.9 MBs/sec
Cache restored successfully

After

/usr/local/bin/yarn --version
4.0.0
/usr/local/bin/yarn config get cacheFolder
/home/runner/.yarn/berry/cache
/usr/local/bin/yarn config get enableGlobalCache
true
Cache Size: ~46 MB (48096368 B)
/usr/bin/tar -xf /home/runner/work/_temp/4ee53cdc-a00e-4f8d-88[14](https://github.com/awslabs/aws-sdk-js-codemod/actions/runs/6629014875/job/18007377991?pr=646#step:3:16)-7acc7b6[15](https://github.com/awslabs/aws-sdk-js-codemod/actions/runs/6629014875/job/18007377991?pr=646#step:3:17)e11/cache.tzst -P -C /home/runner/work/aws-sdk-js-codemod/aws-sdk-js-codemod --use-compress-program unzstd
Cache restored successfully

The benefit will be on developer workspaces, as the cache will be shared between local projects.

@trivikr trivikr marked this pull request as ready for review October 24, 2023 15:32
@trivikr trivikr requested a review from a team as a code owner October 24, 2023 15:32
@trivikr trivikr merged commit c0e3384 into main Oct 24, 2023
@trivikr trivikr deleted the yarn-enable-global-cache branch October 24, 2023 15:32
Copy link
Contributor

github-actions bot commented Nov 8, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant