[rbe] Auto-relaunch self with reproxy

Include a unique build-id (e.g. the reproxy log dir) in download stub.

The unique build-id will inform the RBE wrapper whether the stub
came from the same build session as the current one, or a previous one.
Within the same build session, it is guaranteed that the RBE CAS will
already hold the referenced object.  Across different build sessions
(like with incremental builds), there may be a way to inform
reproxy to use an existing file metadata if the stub is present.

Download stubs are written to the same location as the original output,
so local consumers will need to be informed of this to auto-fetch
inputs.

For the build-id, we arbitrarily chose to use the reproxy tempdir,
which is setup by fuchsia-reproxy-wrap.sh.

Since build-id is now required for remote execution, we also make
the reproxy wrap more automatic, without requiring `--auto-reproxy`.
This should make repro-ing individual actions easier, without having to
remember --auto-reproxy, which can be considered deprecated now.
Users will see a notices that the option is no longer needed.

Both the C++ and Rust wrappers auto-relaunch themselves.

Bug: 123178
Fixed: 124190

Change-Id: Ifdb44d2ce09b0a878e582dfd73590afe2fc006a7
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/839762
Commit-Queue: David Fang <fangism@google.com>
Reviewed-by: David Turner <digit@google.com>
6 files changed
tree: b6973ad08cce15eca07ea198ea0d464ddc076410
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. infra/
  7. products/
  8. scripts/
  9. sdk/
  10. src/
  11. third_party/
  12. tools/
  13. zircon/
  14. .clang-format
  15. .clang-tidy
  16. .editorconfig
  17. .git-blame-ignore-revs
  18. .gitattributes
  19. .gitignore
  20. .gitmodules
  21. .gn
  22. .ignore
  23. .style.yapf
  24. analysis_options.yaml
  25. AUTHORS
  26. BUILD.gn
  27. CODE_OF_CONDUCT.md
  28. CONTRIBUTING.md
  29. fuchsia.code-workspace
  30. LICENSE
  31. OWNERS
  32. PATENTS
  33. pyrightconfig.json
  34. README.md
  35. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.