summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/import/TARGETS.bazel_remote_apis7
-rw-r--r--etc/patches/remote_execution.proto.diff60
-rw-r--r--etc/repos.json3
3 files changed, 69 insertions, 1 deletions
diff --git a/etc/import/TARGETS.bazel_remote_apis b/etc/import/TARGETS.bazel_remote_apis
index 8f846701..a74b9ef0 100644
--- a/etc/import/TARGETS.bazel_remote_apis
+++ b/etc/import/TARGETS.bazel_remote_apis
@@ -3,6 +3,12 @@
, "name": ["semver_proto"]
, "srcs": ["build/bazel/semver/semver.proto"]
}
+, "build/bazel/remote/execution/v2/remote_execution.proto":
+ { "type": ["@", "rules", "patch", "file"]
+ , "src":
+ [["FILE", null, "build/bazel/remote/execution/v2/remote_execution.proto"]]
+ , "patch": [["@", "patches", "", "remote_execution.proto.diff"]]
+ }
, "remote_execution_proto impl":
{ "type": ["@", "rules", "proto", "library"]
, "name": ["remote_execution_proto"]
@@ -25,5 +31,6 @@
, "The Remote Execution API is an API that, at its most general, allows clients"
, "to request execution of binaries on a remote system."
]
+ , "flexible_config": ["ARCH", "ENV", "HOST_ARCH", "PATCH"]
}
}
diff --git a/etc/patches/remote_execution.proto.diff b/etc/patches/remote_execution.proto.diff
new file mode 100644
index 00000000..1de1a120
--- /dev/null
+++ b/etc/patches/remote_execution.proto.diff
@@ -0,0 +1,60 @@
+--- remote_execution.proto.orig 1970-01-01 01:00:00.000000000 +0100
++++ remote_execution.proto 2023-11-03 13:32:37.502134562 +0100
+@@ -406,6 +406,29 @@
+ rpc GetTree(GetTreeRequest) returns (stream GetTreeResponse) {
+ option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" };
+ }
++
++ // Split a blob into chunks.
++ //
++ // Clients can use this API before downloading a blob to determine which parts
++ // of the blob are already present locally and do not need to be downloaded
++ // again.
++ //
++ // The blob is split into chunks which are individually stored in the CAS. A
++ // list of the chunk digests is returned in the order in which the chunks have
++ // to be concatenated to assemble the requested blob.
++ //
++ // Using this API is optional but it allows clients to download only the
++ // missing parts of a blob instead of the entire blob data, which in turn can
++ // considerably reduce network traffic.
++ //
++ // Errors:
++ //
++ // * `NOT_FOUND`: The requested blob is not present in the CAS.
++ // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob
++ // chunks.
++ rpc SplitBlob(SplitBlobRequest) returns (SplitBlobResponse) {
++ option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{blob_digest.hash}/{blob_digest.size_bytes}:splitBlob" };
++ }
+ }
+
+ // The Capabilities service may be used by remote execution clients to query
+@@ -1601,6 +1624,27 @@
+ }
+
+ // A request message for
++// [ContentAddressableStorage.SplitBlob][build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob].
++message SplitBlobRequest {
++ // The instance of the execution system to operate against. A server may
++ // support multiple instances of the execution system (with their own workers,
++ // storage, caches, etc.). The server MAY require use of this field to select
++ // between them in an implementation-defined fashion, otherwise it can be
++ // omitted.
++ string instance_name = 1;
++
++ // The digest of the blob to be splitted.
++ Digest blob_digest = 2;
++}
++
++// A response message for
++// [ContentAddressableStorage.SplitBlob][build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob].
++message SplitBlobResponse {
++ // The digests of the chunks into in which the blob was splitted.
++ repeated Digest chunk_digests = 1;
++}
++
++// A request message for
+ // [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities].
+ message GetCapabilitiesRequest {
+ // The instance of the execution system to operate against. A server may
diff --git a/etc/repos.json b/etc/repos.json
index ad04cca7..91f0f398 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -282,7 +282,8 @@
}
, "target_root": "import targets"
, "target_file_name": "TARGETS.bazel_remote_apis"
- , "bindings": {"rules": "rules", "google_apis": "google_apis"}
+ , "bindings":
+ {"rules": "rules", "google_apis": "google_apis", "patches": "patches"}
, "pkg_bootstrap": {"local_path": "include"}
}
, "google_apis":