bazelbuild / bazelbuild/bazel-skylib

Make COPY_EXECUTION_REQUIREMENTS optional

Open
#533 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
444
Forks
202
PR merge metrics
No merged PRs in 30d

Description

Currently, we have https://github.com/bazelbuild/bazel-skylib/blob/fa66e6b15b06070c0c6467983b4892bc33dc9145/rules/private/copy_common.bzl#L18-L45 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.

https://bazel.build/extending/exec-groups

Contributor guide

Open the contributing guide

Research direction

Start with rules/private/copy_common.bzl at lines 18-45 and read Bazel's execution groups documentation linked in the issue. Determine how Copy* actions receive COPY_EXECUTION_REQUIREMENTS, then define the execution-group behavior so downstream rules can choose or override those properties; verify remote and local builds preserve the intended behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
build-system
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.