Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support node properties in the remote tool #460

Open
ola-rozenfeld opened this issue Jun 8, 2023 · 1 comment
Open

Support node properties in the remote tool #460

ola-rozenfeld opened this issue Jun 8, 2023 · 1 comment

Comments

@ola-rozenfeld
Copy link
Contributor

ola-rozenfeld commented Jun 8, 2023

Problem

Node properties are a (relatively recent) part of the RE-API which is relied upon by Bazel's persistent remote workers feature: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/remote/merkletree/MerkleTree.java#L398
Bazel uses this to "mark" some files as tools that should persist on the remote worker. This is used by RE implementations (definitely by EngFlow, unsure about Google's RBE).
However, https://github.com/bazelbuild/remote-apis-sdks doesn't support node properties at the moment, which, for example, makes it impossible to use the remotetool to debug actions that use remote persistent workers.

Suggested fix

Introduce optional node properties specification throughout the rexec client layer, starting with adding it to the command proto:

message InputSpec {
  ...
  map<string,NodeProperties> input_node_properties = 7;
}

// Either copied from [RE-API](https://github.com/bazelbuild/remote-apis/blob/main/build/bazel/remote/execution/v2/remote_execution.proto#L852) or introduce a proto dependency on it
message NodeProperties {
...
}

and then reading these in GetDirectoryTree, passing them through to rexec here, here and here.

Please let me know if you're okay with this plan, and I'll try to send a PR shortly.

Thank you!

@ramymedhat
Copy link
Collaborator

SGTM, thanks Ola!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants