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

Cache node_modules on Azure Pipelines #19437

Merged
merged 3 commits into from Jun 4, 2019

Conversation

Projects
None yet
2 participants
@as-cii
Copy link
Member

commented Jun 3, 2019

Refs: #19366

This pull request's aim is to speed up our CI build times by taking advantage of https://github.com/microsoft/azure-pipelines-artifact-caching-tasks on this repository.

Caches are looked up by a key based on the contents of all package-lock.json files in the repository. When (at least) one of them changes, the cache won't be used and dependencies will be re-bootstrapped from scratch. We could probably find ways of starting with a base set of dependencies (e.g., the ones found on master) and only perform a partial bootstrap, but @rafeca pointed out that this could lead to some non-determinism in the package installed by npm. Maybe this is one argument in favor of switching to yarn at some point.

For now, this pull request picks the low-hanging fruit of skipping script/bootstrap entirely if the lockfile perfectly matches the set of dependencies that we have in the cache. When that happens, it saves ~8-9 minutes of build time.

Next Steps

In the future, we may want to investigate a couple of different options:

@as-cii as-cii force-pushed the as/ci-caching branch 3 times, most recently from 775f07e to 0baaa4f Jun 3, 2019

Cache node_modules on Azure Pipelines based on package-lock.json
Co-Authored-By: Nathan Sobo <nathan@github.com>
Co-Authored-By: Rafael Oleza <rafeca@github.com>

@as-cii as-cii force-pushed the as/ci-caching branch from a3d4810 to 3be4889 Jun 4, 2019

@as-cii as-cii marked this pull request as ready for review Jun 4, 2019

@as-cii as-cii requested review from rafeca and nathansobo Jun 4, 2019

@rafeca

rafeca approved these changes Jun 4, 2019

Copy link
Contributor

left a comment

🎉🎉🎉🎉🎉🎉🎉

@as-cii as-cii merged commit a21a2e3 into master Jun 4, 2019

1 of 2 checks passed

Atom Pull Requests in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@as-cii as-cii deleted the as/ci-caching branch Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.