summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-05 11:22:56 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-12-07 10:00:12 +0100
commit87ac0c7939ff6059b5ebea5999eededcfbf6f0db (patch)
treeb2bbd02dd42984b1a802723de655574d45da33fc
parentedd091f4b4065ff2a4e4932be37c97628a6640d6 (diff)
downloadjustbuild-87ac0c7939ff6059b5ebea5999eededcfbf6f0db.tar.gz
just_serve.proto: Add rpc to serve known tree and sync it to remote CAS
-rw-r--r--src/buildtool/serve_api/serve_service/just_serve.proto34
1 files changed, 34 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 dc9d0fea..3d004c13 100644
--- a/src/buildtool/serve_api/serve_service/just_serve.proto
+++ b/src/buildtool/serve_api/serve_service/just_serve.proto
@@ -156,6 +156,34 @@ message ServeContentResponse {
ServeContentStatus status = 1;
}
+// A request message for
+// [TargetLevelCache.ServeTree][justbuild.just_serve.TargetLevelCache.ServeTree].
+message ServeTreeRequest {
+ // The git tree identifier.
+ string tree = 1;
+}
+
+// A response message for
+// [TargetLevelCache.ServeTree][justbuild.just_serve.TargetLevelCache.ServeTree].
+message ServeTreeResponse {
+ enum ServeTreeStatus{
+ // All good
+ OK = 0;
+
+ // Tree not known
+ NOT_FOUND = 1;
+
+ // Failed to upload tree to remote CAS
+ SYNC_ERROR = 2;
+
+ // Internally, something is very broken
+ INTERNAL_ERROR = 3;
+ }
+
+ // If the status has a code `OK`, the tree is in the remote CAS
+ ServeTreeStatus status = 1;
+}
+
// Services for improved interaction with the target-level cache.
service SourceTree {
// Retrieve the Git-subtree identifier from a given Git commit.
@@ -174,6 +202,12 @@ service SourceTree {
//
// There are no method-specific errors.
rpc ServeContent(ServeContentRequest) returns (ServeContentResponse) {}
+
+ // Make a given tree identifier available in remote CAS,
+ // if tree is known.
+ //
+ // There are no method-specific errors.
+ rpc ServeTree(ServeTreeRequest) returns (ServeTreeResponse) {}
}
message ServeTargetRequest {