You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# See https://bazel.build/reference/be/common-definitions#common-attributes
#
# Copying file & directories is entirely IO-bound and there is no point doing this work
# remotely.
#
# Also, remote-execution does not allow source directory inputs, see
# https://github.com/bazelbuild/bazel/commit/c64421bc35214f0414e4f4226cc953e8c55fa0d2 So we must
# not attempt to execute remotely in that case.
#
# There is also no point pulling the output file or directory from the remote cache since the
# bytes to copy are already available locally. Conversely, no point in writing to the cache if
# no one has any reason to check it for this action.
#
# Read and writing to disk cache is disabled as well primarily to reduce disk usage on the local
# machine. A disk cache hit of a directory copy could be slghtly faster than a copy since the
# disk cache stores the directory artifact as a single entry, but the slight performance bump
# comes at the cost of heavy disk cache usage, which is an unmanaged directory that grow beyond
# the bounds of the physical disk.
"no-remote": "1",
"no-cache": "1",
}
which disable remote cache, remote execution, and cache for the Copy* actions.
This is a sane default for a local build, but for a fully remote build with Build without the Bytes turned on, this requirement causes Bazel to fetch the inputs locally, run the action, and upload the outputs. As a result, the build is dramatically slowed down compared to running these actions remotely and letting the RBE system handle the optimization.
I think it would make more sense if we create a separate execution group for these copy actions. The downstream rules/users could decide the default value of these execution properties for the copy group, or to override them.
Currently, we have
bazel-skylib/rules/private/copy_common.bzl
Lines 18 to 45 in fa66e6b
Copy*
actions.This is a sane default for a local build, but for a fully remote build with Build without the Bytes turned on, this requirement causes Bazel to fetch the inputs locally, run the action, and upload the outputs. As a result, the build is dramatically slowed down compared to running these actions remotely and letting the RBE system handle the optimization.
I think it would make more sense if we create a separate execution group for these copy actions. The downstream rules/users could decide the default value of these execution properties for the copy group, or to override them.
https://bazel.build/extending/exec-groups
The text was updated successfully, but these errors were encountered: