-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 - getCacheVersion - dup paths array #1378
Conversation
Not sure how deep the copy/clone should be. Maybe a better choice would be the below, or something similar: JSON.parse(JSON.stringify(arr)) EDIT: js isn't my 'primary' langauge, at least for several years. I think |
I think the below is a fairly common pattern using this code is: // full_key is often generated from dependency lock file
restoreKey = restoreCache(paths, full_key, partialKeys)
if (restoreKey !== full_key) {
// update dependencies
saveCache(paths, full_key)
} So, if Consumers of the code can replace |
bump. I think a lot of people have been patiently waiting for this fix. |
@kotewar, @rentziass, please, review this PR. The fix suggested in #1378 (comment) worked for me. After nix-community/cache-nix-action@93041f2 cache was restored successfully in the second run https://github.com/deemp/cache-nix-too/actions/runs/5573652888/jobs/10181692942#step:4:19 |
For more information, please refer to: actions/toolkit#1378 (comment)
Please refer to: actions/toolkit#1378 (comment)
An issue in action/toolkit modifies the inputPath values passed to cache function. These changes work around this issue. For more details see: actions/toolkit#1378 Co-authored-by: Justin Leis <justin.leis@webewizard.com>
An issue in action/toolkit modifies the inputPath values passed to cache function. These changes work around this issue. For more details see: actions/toolkit#1378 Co-authored-by: Justin Leis <justin.leis@webewizard.com>
- closes #175 An issue in action/toolkit modifies the inputPath values passed to cache function. These changes work around this issue. For more details see: actions/toolkit#1378 Co-authored-by: Justin Leis <justin.leis@webewizard.com>
until issue get resolved Issue: actions/toolkit#1377 PR: actions/toolkit#1378
When are we going to merge this? I just stumble upon this issue too |
I have run into this issue as well can we merge and release please? |
@robherley @bethanyj28 @konradpabjan Sorry for mentioning you but it would be great if we could get a review on this from the actions team |
👋 The |
…since we use the latest @cache-nix-action/cache which is a mod of @actions/cache which has this bug fixed actions/cache#1302
Previous to commit b2d865f, code used
components = paths.concat(...)
, which leftpaths
unchanged.The commit changed to using
components = paths
, then pushing ontocomponents
later. This changes thepaths
array.Closes #1377