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: enumerate caching paths manually #514

Merged

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Nov 9, 2019

Which problem is this PR solving?

Short description of the changes

  • Manually enumerate node_modules and yarn.lock files for caching paths
  • Cache paths for browser builds as well

@codecov-io
Copy link

codecov-io commented Nov 9, 2019

Codecov Report

Merging #514 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #514      +/-   ##
==========================================
- Coverage   90.39%   90.34%   -0.05%     
==========================================
  Files         144      142       -2     
  Lines        7277     7222      -55     
  Branches      643      641       -2     
==========================================
- Hits         6578     6525      -53     
+ Misses        699      697       -2
Impacted Files Coverage Δ
...res/opentelemetry-plugin-pg/test/assertionUtils.ts 96.29% <0%> (-3.71%) ⬇️
...core/src/context/propagation/BinaryTraceContext.ts 96.72% <0%> (-1.62%) ⬇️
...ges/opentelemetry-exporter-zipkin/src/transform.ts 100% <0%> (ø) ⬆️
...telemetry-plugin-grpc/test/utils/assertionUtils.ts 100% <0%> (ø) ⬆️
.../opentelemetry-exporter-zipkin/test/zipkin.test.ts 100% <0%> (ø) ⬆️
.../opentelemetry-plugin-dns/test/utils/assertSpan.ts 100% <0%> (ø) ⬆️
.../opentelemetry-core/src/trace/spancontext-utils.ts 100% <0%> (ø) ⬆️
...pe-async-hooks/test/AsyncHooksScopeManager.test.ts 100% <0%> (ø) ⬆️
...try-plugin-dns/test/functionals/dns-enable.test.ts 100% <0%> (ø) ⬆️
...telemetry-scope-base/test/NoopScopeManager.test.ts 100% <0%> (ø) ⬆️
... and 9 more

@dyladan dyladan force-pushed the caching-paths branch 2 times, most recently from 6fa8ac5 to 04ee361 Compare November 9, 2019 17:02
@dyladan
Copy link
Member Author

dyladan commented Nov 9, 2019

NOT READY FOR MERGE

edit: good to go now

@dyladan dyladan force-pushed the caching-paths branch 4 times, most recently from 5620616 to b7adb5b Compare November 9, 2019 17:52
@dyladan
Copy link
Member Author

dyladan commented Nov 9, 2019

image

Tests are way faster with this change. PTAL.

Anyone know why lint would fail when all that changed was the caching strategy? Lint passes on my local

@dyladan dyladan force-pushed the caching-paths branch 2 times, most recently from 233200a to 0381bfb Compare November 9, 2019 20:29
@dyladan
Copy link
Member Author

dyladan commented Nov 9, 2019

Caching resources for browser builds now too. Total build time is now under 5 minutes.
image

Copy link
Member

@vmarchaud vmarchaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, i don't know if it's possible but we could try to automate the enumeration (using lerna list) of all packages so we don't forget to add them there.

@dyladan
Copy link
Member Author

dyladan commented Nov 10, 2019

LGTM, i don't know if it's possible but we could try to automate the enumeration (using lerna list) of all packages so we don't forget to add them there.

Unfortunately no it isn't possible. Each path has to be manually entered into the paths array. There are a number of issues open with circle ci to remedy the issue but we probably have to wait for circle config 3.0 for that.

@dyladan
Copy link
Member Author

dyladan commented Nov 11, 2019

@vmarchaud @bg451 @markwolff and those yet to review, do you think we should remove the yarn.lock files from the cache? Right now the lock files are cached between test runs, and only can change if the package.lock checksums change. That means the CI server might not be running with the latest patch versions of our dependencies. Removal will make the test run slightly slower (a few seconds).

Prior to this change nothing was cached, so this would not be different behavior to what we're already used to.

.circleci/config.yml Outdated Show resolved Hide resolved
Copy link
Member

@mayurkale22 mayurkale22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, added a minor comment

@dyladan
Copy link
Member Author

dyladan commented Nov 12, 2019

@mayurkale22 I think everything is resolved here. afaik this is ready for merge

@mayurkale22 mayurkale22 added the enhancement New feature or request label Nov 12, 2019
@mayurkale22
Copy link
Member

@mayurkale22 I think everything is resolved here. afaik this is ready for merge

Somehow, all dependencies are getting installed for each job => https://circleci.com/workflow-run/5e613ca4-ce88-4529-87f6-3cdcba5c6496. Could you please verify the behavior?

@mayurkale22 mayurkale22 merged commit f15dedb into open-telemetry:master Nov 12, 2019
@dyladan dyladan deleted the caching-paths branch November 12, 2019 23:56
pichlermarc pushed a commit to dynatrace-oss-contrib/opentelemetry-js that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants