berry icon indicating copy to clipboard operation
berry copied to clipboard

Metadata cache key changes

Open drodil opened this issue 1 year ago • 3 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

When I locally run yarn install, the __metadata.cacheKey in yarn.lock gets value of 10. Once I push the change ro Github and CI runs it with --immutable, the key changes to 10c0 thus failing the build.

To reproduce

Run install for this project: https://github.com/drodil/backstage-plugin-qeta

Environment

Node 18
Yarn 4.5.0

Additional context

I am not sure where the cache key comes from so probably it can be fixed with some configuration but not sure either if immutable install should change it?

drodil avatar Sep 17 '24 20:09 drodil

When you upgrade Yarn from v3 to v4, it automatically sets the compressionLevel config as part of the migration.

Based on your commit history, you have removed that config without running an install to update the lockfile.

clemyan avatar Sep 18 '24 07:09 clemyan

I actually encountered this same issue with Yarn1 -> Yarn4 migration. CI for some reason gets the compression level of zero while locally it's mixed. Forcing the compression level to some value in .yarnrc.yml fixes the issue.

drodil avatar Sep 18 '24 07:09 drodil

Hi! 👋

It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it.

yarnbot avatar Oct 18 '24 08:10 yarnbot