copy_file should *never* set `no-remote`
When build-without-the-bytes is used, forcing no-remote + no-cache is often worse than allowing it to execute remotely. If the file is a source file, then it's better to upload it right away and execute the copy remotely (cached). If the file is an output file, then Bazel has to download the file in order to perform a local copy. Best case scenario, no work is ever done locally, and this breaks that.
It's a better policy to not try to set these at the rule level.
If this needs to be user-configurable on a per-rule basis, it might be viable to create a flag and then set these tags only if the flag is set.
https://github.com/bazelbuild/bazel-skylib/blob/main/rules/private/copy_common.bzl#L18
There also won't be a new CAS entry, so this would virtually be all upside. RBE does support source directories now.
That said, ideally allow_symlink would just be the default and then there wouldn't even be a non-trivial action to run in the first place.
If I read the code correctly, allow_symlink is the default, except on Windows.
@ulfjack I think that's not true, allow_symlink defaults to False in the copy_file macro and is_windows is only used to decide whether to use a shell script or a bat script.
You're right. Apparently I misread the code. I agree that it should default to true.