Skip to content

Commit

Permalink
fix(builtin): don't use local:1 spawn (#3084)
Browse files Browse the repository at this point in the history
This makes the action not cached, so it causes re-runs on CI
We want pkg_web to be hermetic so it should use the sandbox.
  • Loading branch information
alexeagle committed Dec 3, 2021
1 parent 3571c38 commit f77e9fd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/pkg_web/pkg_web.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ See the section on stamping in the README.""",
),
})

# Hints for Bazel spawn strategy
_execution_requirements = {
# Copying files is entirely IO-bound and there is no point doing this work
# remotely.
"no-remote-exec": "1",
}

def _move_files(ctx, root_paths):
"""Moves files into an output directory
Expand Down Expand Up @@ -73,7 +80,7 @@ def _move_files(ctx, root_paths):
outputs = [www_dir],
executable = ctx.executable._assembler,
arguments = [args],
execution_requirements = {"local": "1"},
execution_requirements = _execution_requirements,
env = {"COMPILATION_MODE": ctx.var["COMPILATION_MODE"]},
)
return depset([www_dir])
Expand Down

0 comments on commit f77e9fd

Please sign in to comment.