diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-12-12 17:42:58 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-12-14 17:08:51 +0100 |
commit | 9cc4a6f8c66f207a78ed5df95db221a2bb3ed8f3 (patch) | |
tree | cba26d4beb25d5106d9a6fdd9c9d1a39c37352dc | |
parent | 695728e4b5a77e39032a5fea4ef7abacf8a286af (diff) | |
download | justbuild-9cc4a6f8c66f207a78ed5df95db221a2bb3ed8f3.tar.gz |
just_serve.proto: Add rpc to serve description of an export target
-rw-r--r-- | src/buildtool/serve_api/serve_service/just_serve.proto | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/serve_service/just_serve.proto b/src/buildtool/serve_api/serve_service/just_serve.proto index a1803b01..0fd38ab3 100644 --- a/src/buildtool/serve_api/serve_service/just_serve.proto +++ b/src/buildtool/serve_api/serve_service/just_serve.proto @@ -260,6 +260,22 @@ message ServeTargetVariablesResponse { repeated string flexible_config = 1; } +message ServeTargetDescriptionRequest { + // Git hash of the target-level root tree. + string root_tree = 1; + + // Relative path of the targets file inside the root tree. + string target_file = 2; + + // Name of the export target to look up. + string target = 3; +} + +message ServeTargetDescriptionResponse { + // Digest of the blob containing the desired target description fields. + build.bazel.remote.execution.v2.Digest description_id = 1; +} + service Target { // Given a target-level caching key, returns the computed value. In doing so, // it can build on the associated end-point passing the @@ -286,6 +302,26 @@ service Target { // being of "type" : "export". // * `INTERNAL`: Internally, something is very broken. rpc ServeTargetVariables(ServeTargetVariablesRequest) returns (ServeTargetVariablesResponse) {} + + // Given the target-level root tree and the name of an export target, + // returns the digest of the blob containing the flexible variables field, + // as well as the documentation fields pertaining tho the target and + // its configuration variables, as taken from the target's description. + // This information should be enough for a client to produce locally a + // full description of said target. + // + // The server MUST make the returned blob available in the remote CAS. + // + // If the status has a code different from `OK`, the response MUST not be used. + // + // Errors: + // * `FAILED_PRECONDITION`: An error occurred in retrieving the configuration + // of the requested target, such as missing entries (target-root, target + // file, target name), unparsable target file, or requested target not + // being of "type" : "export". + // * `UNAVAILABLE`: Could not communicate with the remote CAS. + // * `INTERNAL`: Internally, something is very broken. + rpc ServeTargetDescription(ServeTargetDescriptionRequest) returns (ServeTargetDescriptionResponse) {} } message RemoteExecutionEndpointRequest {} |