Skip to content

Commit

Permalink
More fixes for actions that shouldn't upload to remote-cache
Browse files Browse the repository at this point in the history
Similar to bazelbuild#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
  • Loading branch information
alexeagle committed May 24, 2021
1 parent 0652537 commit 4217606
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions container/layer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ def build_layer(
arguments = [args],
tools = files + file_map.values() + tars + debs + [manifest_file],
outputs = [layer],
execution_requirements = {
# This action produces large output files, so it's not
# economical to send this to the remote-cache
"no-remote-cache": "1",
},
use_default_shell_env = True,
mnemonic = "ImageLayer",
)
Expand Down
6 changes: 6 additions & 0 deletions docker/package_managers/install_pkgs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ def _impl(ctx, image_tar = None, installables_tar = None, installation_cleanup_c
installables_tar,
image_util,
],
execution_requirements = {
# This action produces large output files, and isn't economical to
# upload to a remote cache.
"no-remote-cache": "1",
},
mnemonic = "ExtractImageId",
tools = [ctx.executable._extract_image_id, ctx.executable._to_json_tool],
executable = script,
use_default_shell_env = True,
Expand Down
6 changes: 6 additions & 0 deletions docker/util/run.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ def _commit_layer_impl(
outputs = [output_layer_tar, output_diff_id],
inputs = runfiles,
executable = script,
execution_requirements = {
# This action produces large output files, and isn't economical to
# upload to a remote cache.
"no-remote-cache": "1",
},
mnemonic = "RunAndCommitLayer",
tools = [ctx.executable._extract_image_id, ctx.executable._last_layer_extractor_tool],
use_default_shell_env = True,
)
Expand Down

0 comments on commit 4217606

Please sign in to comment.