Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't upload large files to remote-cache #1856

Merged
merged 1 commit into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = {
alexeagle marked this conversation as resolved.
Show resolved Hide resolved
# 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