Skip to content

Commit 8fa575d

Browse files
authored
Merge pull request github#17010 from github/criemen/disable-remote-cache-zipmerge
pkg.bzl: Disable remote caching of zipmerge steps.
2 parents c1853e0 + afb6e41 commit 8fa575d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

misc/bazel/pkg.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,16 @@ def _zipmerge_impl(ctx):
140140
executable = ctx.executable._zipmerge,
141141
inputs = depset(zips, transitive = transitive_zips),
142142
arguments = args,
143+
# Disable remote caching for zipmerge:
144+
# * One of the inputs to zipmerge (often the larger one) comes from a lazy-lfs rule.
145+
# Those are retrieved by bazel even in the presence of a build cache, so downloading the whole zipmerged
146+
# artifact is slower than downloading the smaller bazel-produced zip and rerunning zipmerge on that
147+
# and the (already-present) LFS artifact.
148+
# * This prevents unnecessary cache usage - every change to the Swift extractor would otherwise
149+
# trigger a build of a >500MB zip file that'd quickly fill up the cache.
150+
execution_requirements = {
151+
"no-remote-cache": "1",
152+
},
143153
)
144154

145155
return [

0 commit comments

Comments
 (0)