From ef71203679d14537aa56e92861ec6b7abda1bcec Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 20 May 2021 15:03:17 -0700 Subject: [PATCH] Don't upload large files to remote-cache Fixes #1855 --- container/layer_tools.bzl | 6 ++++++ skylib/zip.bzl | 6 ++++++ 2 files changed, 12 insertions(+) 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..7a4bc3c95 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, )