Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Don't upload large files to remote-cache
Browse files Browse the repository at this point in the history
Fixes #1855
  • Loading branch information
alexeagle committed May 20, 2021
1 parent d18033b commit 0e9c6d8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions container/layer_tools.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ def assemble(
arguments = [args],
tools = inputs,
outputs = [output],
execution_requirements = {
# This action produces large output files, but doesn't require much CPU to compute.
# It's not economical to send this to the remote-cache, instead local cache misses
# should just run join_layers again.
"no-remote-cache": "1",
},
mnemonic = "JoinLayers",
)

Expand Down
13 changes: 13 additions & 0 deletions skylib/zip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def _gzip(ctx, artifact, out, decompress, options, mnemonic):
) + (options or []),
inputs = [artifact],
outputs = [out],
execution_requirements = {
# This action produces large output files, but doesn't require much CPU to compute.
# It's not economical to send this to the remote-cache, instead local cache misses
# should just run gzip again.
"no-remote-cache": "1",
},
mnemonic = mnemonic,
tools = ctx.attr._zipper[DefaultInfo].default_runfiles.files,
)
Expand All @@ -69,6 +75,13 @@ def _gzip(ctx, artifact, out, decompress, options, mnemonic):
input_manifests = input_manifests,
inputs = [artifact],
outputs = [out],
execution_requirements = {
# See comment above.
# In this case it's not guaranteed that the user's gzip implementation
# is actually faster than a network fetch, but we guess that any typical
# one should be.
"no-remote-cache": "1",
},
use_default_shell_env = True,
mnemonic = mnemonic,
tools = tools,
Expand Down

0 comments on commit 0e9c6d8

Please sign in to comment.