remote: introduce --experimental_remote_download_outputs=minimal

This implements the first milestone of #6862. When specifying
--experimental_remote_download_outputs=minimal Bazel will avoid
downloading most action outputs when used with remote caching
and remote execution. That is, it will only download an action's
stdout/stderr as well as .d and .jdeps output files when building
C++ and Java. All other output files will only be downloaded on
demand, that is if a local action declares a remote output as an
input.

Enabling this mode currently requires specifying three additional
flags to the set of the remote caching/execution flags:
$ bazel build ... \
  --experimental_inmemory_jdeps_files \
  --experimental_inmemory_dotd_files \
  --experimental_remote_download_outputs=minimal

This mode does not yet interact well with the Build Event
Service (--bes_backend=...). Specifically, local file uploads
and remote file name conversions are disabled when
--experimental_remote_download_outputs=minimal is specified.

Lastly, this mode also does not at all interact with Bazel's
on disk action cache. That is, all (local) cached state will
be lost after restarting the Bazel server. Also changing the
value of --experimental_remote_download_outputs between builds
will invalidate all (cached) actions.

Closes #7905.

PiperOrigin-RevId: 241681028
diff --git a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionInputFetcher.java b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionInputFetcher.java
index 8e6470d..4eb4e2a 100644
--- a/src/main/java/com/google/devtools/build/lib/remote/RemoteActionInputFetcher.java
+++ b/src/main/java/com/google/devtools/build/lib/remote/RemoteActionInputFetcher.java
@@ -39,7 +39,7 @@
  * Stages output files that are stored remotely to the local filesystem.
  *
  * <p>This is necessary for remote caching/execution when {@code
- * --experimental_remote_fetch_outputs=minimal} is specified.
+ * --experimental_remote_download_outputs=minimal} is specified.
  */
 class RemoteActionInputFetcher implements ActionInputPrefetcher {
 
@@ -126,7 +126,7 @@
                   new IOException(
                       String.format(
                           "Failed to fetch file with hash '%s' because it does not exist remotely."
-                              + " --experimental_remote_fetch_outputs=minimal does not work if"
+                              + " --experimental_remote_download_outputs=minimal does not work if"
                               + " your remote cache evicts files during builds.",
                           ((CacheNotFoundException) e).getMissingDigest().getHash()));
             }