Prevent mutation of paths array in cacheHttpClient#17
Merged
Conversation
Prevent mutation of the paths array by using slice() to create a copy.
|
@abhijit-hota or @darshanime is this something you could review and get merged? |
Member
|
@DSharifi @jkelleyrtp thank you for the fix here! (and sorry for the delay) i just see a very minor typo in the comment. |
Thanks, hopefully the suggestion can just be applied. This is currently blocking us, https://github.com/near/mpc, from using the warp cache with nix. |
Member
|
Will be releasing this in the next hour or two. |
10 tasks
Member
|
We've released the fix in @jkelleyrtp @DSharifi Can you please check again if the issue persists? |
DSharifi
added a commit
to DSharifi/cache-nix-action
that referenced
this pull request
Apr 28, 2026
Adds a `warpbuild` option to the `backend` input, vendored as a submodule from WarpBuilds/toolkit at v1.4.11 (which includes the upstream paths-mutation fix from WarpBuilds/toolkit#17). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@abhijit-hota It's working well now. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adjust the getCacheVersion in the internal warp-cache by preventing mutation of the paths array by using slice() to create a copy.
I discovered this bug while adding warpbuild support to nix-community/cache-nix-action#321
This is important because restoreCacheV2 passes the paths array by reference, and the current impl is modifying that paths array, breaking cache paths on disk, breaking caching altogether when called from other SDKs