diff --git a/container/layer_tools.bzl b/container/layer_tools.bzl index 9a435b823..125581d0d 100644 --- a/container/layer_tools.bzl +++ b/container/layer_tools.bzl @@ -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", ) diff --git a/skylib/zip.bzl b/skylib/zip.bzl index b8a7d6d1a..6ffcf35cb 100644 --- a/skylib/zip.bzl +++ b/skylib/zip.bzl @@ -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, ) @@ -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,