Skip to content

Commit e33dda0

Browse files
committed
More fixes for actions that shouldn't upload to remote-cache
Similar to #1856. I found these by patching that PR and running through a big monorepo and searching execution log for more remote cache uploads over 10MB
1 parent 3fdfe0c commit e33dda0

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

container/layer.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ def build_layer(
151151
arguments = [args],
152152
tools = files + file_map.values() + tars + debs + [manifest_file],
153153
outputs = [layer],
154+
execution_requirements = {
155+
# This action produces large output files, so it's not
156+
# economical to send this to the remote-cache
157+
"no-remote-cache": "1",
158+
},
154159
use_default_shell_env = True,
155160
mnemonic = "ImageLayer",
156161
)

docker/package_managers/install_pkgs.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ def _impl(ctx, image_tar = None, installables_tar = None, installation_cleanup_c
126126
installables_tar,
127127
image_util,
128128
],
129+
execution_requirements = {
130+
# This action produces large output files, and isn't economical to
131+
# upload to a remote cache.
132+
"no-remote-cache": "1",
133+
},
134+
mnemonic = "ExtractImageId",
129135
tools = [ctx.executable._extract_image_id, ctx.executable._to_json_tool],
130136
executable = script,
131137
use_default_shell_env = True,

docker/util/run.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,12 @@ def _commit_layer_impl(
386386
outputs = [output_layer_tar, output_diff_id],
387387
inputs = runfiles,
388388
executable = script,
389+
execution_requirements = {
390+
# This action produces large output files, and isn't economical to
391+
# upload to a remote cache.
392+
"no-remote-cache": "1",
393+
},
394+
mnemonic = "RunAndCommitLayer",
389395
tools = [ctx.executable._extract_image_id, ctx.executable._last_layer_extractor_tool],
390396
use_default_shell_env = True,
391397
)

0 commit comments

Comments
 (0)