Skip to content

Commit

Permalink
*: replace the bazelisk, disk and repo cache with sticky disks
Browse files Browse the repository at this point in the history
This change teaches restoreCache to get and mount a unique stickydisk
per key and mount it at the provided path. We require a stickydisk per
path and so we hash the path and add it to the user configured "cache key".
All other semantics around versioning of the cache and respecting the base
cache key remain the same.

On post, we teach the action to unmount and commit the relevant stickydisks.
For the moment we leave the "external" cache alone. In a follow-up we can move
that to be backed by stickydisks too.

The stickydisk.js file is heavily inspired by the useblacksmith/stickydisk
implementation.
  • Loading branch information
adityamaru committed Dec 14, 2024
1 parent beb23e2 commit 7e07ea7
Show file tree
Hide file tree
Showing 14 changed files with 104,965 additions and 12,689 deletions.
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const diskCacheEnabled = diskCacheConfig !== 'false'
let diskCacheName = 'disk'
if (diskCacheEnabled) {
bazelrc.push(`build --disk_cache=${bazelDisk}`)
if (diskCacheName !== 'true') {
if (diskCacheConfig !== 'true') {
diskCacheName = `${diskCacheName}-${diskCacheConfig}`
}
}
Expand Down
34,233 changes: 27,911 additions & 6,322 deletions dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

34,177 changes: 27,849 additions & 6,328 deletions dist/post/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 7e07ea7

Please sign in to comment.