Skip to content
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

Merged
merged 3 commits into from
Dec 8, 2017

Conversation

BYK
Copy link
Member

@BYK BYK commented Dec 8, 2017

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.

**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.
@rally25rs
Copy link
Contributor

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.

Copy link
Member

@arcanis arcanis left a 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.

@BYK
Copy link
Member Author

BYK commented Dec 8, 2017

So we don't have to worry about the architecture any more?

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.

I would think it might make a difference between Mac and Linux for any native/build deps.

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.

@BYK BYK merged commit fbdce22 into master Dec 8, 2017
@BYK BYK deleted the fix-circle-config branch December 8, 2017 17:11
@Daniel15
Copy link
Member

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.

agoldis pushed a commit to agoldis/yarn that referenced this pull request Dec 18, 2017
…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)
agoldis pushed a commit to agoldis/yarn that referenced this pull request Dec 18, 2017
…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)
agoldis pushed a commit to agoldis/yarn that referenced this pull request Dec 18, 2017
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants