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 <[email protected]>
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 <[email protected]>
- 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 <[email protected]>
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 leftpathsunchanged.The commit changed to using
components = paths, then pushing ontocomponentslater. This changes thepathsarray.Closes #1377