-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Description of the bug:
A remotely executed action cannot use outputs from a locally executed action if they occurred during the same build with --noremote_upload_local_results set. The same build works on retry, since Bazel will upload those outputs as missing inputs.
Background
In our Bazel setup, users are allowed to execute actions remotely, without inputs being uploaded using a CAS only write key to the RBE. User are also able to run actions locally, if requested or if the action does not yet support remote execution. Users are not allowed to write action results to the cache.
In this setup, the first round of executions always works correctly. Bazel uploads any missing inputs to the CAS for remote executions. If an action is run remotely, its outputs end up in the CAS and are found as inputs to any subsequent executions. However, if the first round action ran locally, its outputs are not uploaded and the next remote execution requiring those outputs fails, with the output from the local execution (input file to the remote execution) being missing from the CAS.
Expected behavior
During the first build, the outputs should be uploaded to the CAS in the same way as missing inputs. Action results should still not be written to the cache.
What is the output of bazel info release
?
release 7.6.1
Any other information, logs, or outputs that you want to share?
One of our toolchains has a defect where certain rules_foreign_cc
libraries do not build correctly remotely, so while we investigate, these actions are marked no-remote-exec
. Any downstream library that needs to link against these libraries will fail the first build with an error from the RBE:
Remote Execution Failure:
Not Found: rpc error: code = NotFound desc = Exhausted all peers attempting to read "9a1b0d694d99be1a1b2d7cfc19f0dca9df6f0e31afe3bc28fd18aed7c5cf6879".