Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

feat(nx-distributed-task): reimplement caching mechanism #38

Merged
merged 23 commits into from
Mar 15, 2022

Conversation

ronnetzer
Copy link
Member

@ronnetzer ronnetzer commented Mar 9, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: fixes #19

What is the new behavior?

caching is now performed by calculating the hash of the executing command, it will be calculated per project being passed to the action and also saved to github's cache per project's target

create hasher and task-graph utils
deprecate distribution input
remove distribution from inputs interface
change cache saving to be per project target's hash
restore task's deps in case task cache is missing

Does this PR introduce a breaking change?

[ ] Yes
[x] No

create hasher and task-graph utils
deprecate distribution input
remove distribution from inputs interface
change cache saving to be per project target's hash
@nx-cloud
Copy link

nx-cloud bot commented Mar 9, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 5d50764. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #38 (5d50764) into main (c50d755) will increase coverage by 1.93%.
The diff coverage is 88.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   86.18%   88.12%   +1.93%     
==========================================
  Files          15       15              
  Lines         362      362              
  Branches       54       50       -4     
==========================================
+ Hits          312      319       +7     
+ Misses         41       39       -2     
+ Partials        9        4       -5     
Flag Coverage Δ
nx-affected-matrix 95.91% <80.00%> (ø)
nx-distributed-task 100.00% <100.00%> (+3.65%) ⬆️
utils 81.61% <80.00%> (+1.09%) ⬆️
Impacted Files Coverage Δ
packages/utils/src/lib/exec.ts 91.17% <0.00%> (+2.94%) ⬆️
packages/utils/src/lib/inputs.ts 61.81% <54.54%> (-0.93%) ⬇️
...s/nx-affected-matrix/src/app/nx-affected-matrix.ts 97.05% <66.66%> (ø)
packages/utils/src/lib/cache.ts 96.42% <92.85%> (-3.58%) ⬇️
packages/nx-affected-matrix/src/main.ts 90.90% <100.00%> (ø)
packages/nx-distributed-task/src/app/cache.ts 100.00% <100.00%> (ø)
packages/nx-distributed-task/src/app/inputs.ts 100.00% <100.00%> (+9.09%) ⬆️
packages/nx-distributed-task/src/app/nx.ts 100.00% <100.00%> (ø)
packages/nx-distributed-task/src/app/upload.ts 100.00% <100.00%> (+11.11%) ⬆️
packages/nx-distributed-task/src/main.ts 100.00% <100.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2879c11...5d50764. Read the comment docs.

@ronnetzer ronnetzer merged commit 53cd2c4 into main Mar 15, 2022
@ronnetzer ronnetzer deleted the feature/hasher branch March 15, 2022 08:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] cache doesnt work correctly for PRs
1 participant