-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ci(circle): Fix cache key setup for proper node_modules sharing #5060
Conversation
**Summary** We had a tiered cache key setup for some reason (probably remnant of the pre-macOS builds config) which was breaking macOS builds when a new dpenednecy was introduced due to common install was done on a Docker machine and acached with a key including the architecture. This patch changes that and ties everything to a single cache key. **Test plan** CircleCI builds should pass without issues.
So we don't have to worry about the architecture any more? I would think it might make a difference between Mac and Linux for any native/build deps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed it a bit with @BYK and I understand the change. I'd like to make sure that we don't ever install native node modules in the cache by mistake, but it seems hard to do, so we can think about this later on.
We didn't do that already. The way we setup CircleCI right now is to have single, unified install step and then share the installed resources. This is not completely "safe" as you point out but we cab get away with it since we don't have any platform-specific dependencies and we build JS files that are platform agnostic. Doing it this way saves us time.
Again, it may and if we ever pull in this kind of dependencies, we would need to separate the workflows into Linux and macOS which would be costlier and slower. |
This should be fine... We'll need to change the build and release process if we ever add native dependencies. Since we currently bundle Yarn as a single .js file, it doesn't take native dependencies into account at all. |
…readdir_files * upstream/master: fix(cli): Write Node4+ error message to stderr (yarnpkg#5094) test(jest): Upgrade jest to latest available version (yarnpkg#5018) fix(git): Ignores irrelevant output from ls-remote (yarnpkg#5081) test(integration): Fix failing react-scripts test due to unexpected warning (yarnpkg#5076) feat(help) Add command descriptions to commander output (yarnpkg#5033) ci(circle): Fix cache key setup for proper node_modules sharing (yarnpkg#5060) fixed (yarnpkg#5034) fix(fetcher): offline mirror name collision w/ private registries and scopes (yarnpkg#4822) fix(add): Make semver flags compatible with versioned requests (yarnpkg#4999) [yarnpkg#5021] Add help comment to --json flag (yarnpkg#5045) fix(git): match git dependencies by name instead of whole url fix(install): connectionOptions passes in localhost as its host to prevent popup on MacOsx. (yarnpkg#5006) chore(eslint): ignore packages dir (yarnpkg#4963)
…readdir_files * upstream/master: fix(cli): Write Node4+ error message to stderr (yarnpkg#5094) test(jest): Upgrade jest to latest available version (yarnpkg#5018) fix(git): Ignores irrelevant output from ls-remote (yarnpkg#5081) test(integration): Fix failing react-scripts test due to unexpected warning (yarnpkg#5076) feat(help) Add command descriptions to commander output (yarnpkg#5033) ci(circle): Fix cache key setup for proper node_modules sharing (yarnpkg#5060) fixed (yarnpkg#5034) fix(fetcher): offline mirror name collision w/ private registries and scopes (yarnpkg#4822) fix(add): Make semver flags compatible with versioned requests (yarnpkg#4999) [yarnpkg#5021] Add help comment to --json flag (yarnpkg#5045) fix(git): match git dependencies by name instead of whole url fix(install): connectionOptions passes in localhost as its host to prevent popup on MacOsx. (yarnpkg#5006) chore(eslint): ignore packages dir (yarnpkg#4963)
…readdir_files * upstream/master: fix(cli): Write Node4+ error message to stderr (yarnpkg#5094) test(jest): Upgrade jest to latest available version (yarnpkg#5018) fix(git): Ignores irrelevant output from ls-remote (yarnpkg#5081) test(integration): Fix failing react-scripts test due to unexpected warning (yarnpkg#5076) feat(help) Add command descriptions to commander output (yarnpkg#5033) ci(circle): Fix cache key setup for proper node_modules sharing (yarnpkg#5060) fixed (yarnpkg#5034) fix(fetcher): offline mirror name collision w/ private registries and scopes (yarnpkg#4822) fix(add): Make semver flags compatible with versioned requests (yarnpkg#4999) [yarnpkg#5021] Add help comment to --json flag (yarnpkg#5045) fix(git): match git dependencies by name instead of whole url fix(install): connectionOptions passes in localhost as its host to prevent popup on MacOsx. (yarnpkg#5006) chore(eslint): ignore packages dir (yarnpkg#4963)
Summary
We had a tiered cache key setup for some reason (probably remnant of the pre-macOS builds config) which was breaking macOS builds when a new dependency was introduced due to common install was done on a Docker machine and cached with a key including the architecture. This patch changes that and ties everything to a single cache key.
Test plan
CircleCI builds should pass without issues.