Skip to content

Instantly share code, notes, and snippets.

@adam-singer
Created December 22, 2023 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adam-singer/0d2396a59f36f0477daf510d59c54f9d to your computer and use it in GitHub Desktop.
Save adam-singer/0d2396a59f36f0477daf510d59c54f9d to your computer and use it in GitHub Desktop.
diff --git a/nativelink-proto/build/bazel/remote/execution/v2/remote_execution.proto b/nativelink-proto/build/bazel/remote/execution/v2/remote_execution.proto
index 78dc5e3..522634b 100644
--- a/nativelink-proto/build/bazel/remote/execution/v2/remote_execution.proto
+++ b/nativelink-proto/build/bazel/remote/execution/v2/remote_execution.proto
@@ -613,7 +613,7 @@ message Command {
// to execution, even if they are not explicitly part of the input root.
//
// DEPRECATED since v2.1: Use `output_paths` instead.
- repeated string output_files = 3; // [ deprecated = true ];
+ repeated string output_files = 3 [ deprecated = true ];
// A list of the output directories that the client expects to retrieve from
// the action. Only the listed directories will be returned (an entire
@@ -644,7 +644,7 @@ message Command {
// if they are not explicitly part of the input root.
//
// DEPRECATED since 2.1: Use `output_paths` instead.
- repeated string output_directories = 4; // [ deprecated = true ];
+ repeated string output_directories = 4 [ deprecated = true ];
// A list of the output paths that the client expects to retrieve from the
// action. Only the listed paths will be returned to the client as output.
@@ -684,7 +684,7 @@ message Command {
// DEPRECATED as of v2.2: platform properties are now specified directly in
// the action. See documentation note in the
// [Action][build.bazel.remote.execution.v2.Action] for migration.
- Platform platform = 5; // [ deprecated = true ];
+ Platform platform = 5 [ deprecated = true ];
// The working directory, relative to the input root, for the command to run
// in. It must be a directory which exists in the input tree. If it is left
@@ -703,6 +703,33 @@ message Command {
// property is not recognized by the server, the server will return an
// `INVALID_ARGUMENT`.
repeated string output_node_properties = 8;
+
+ enum OutputDirectoryFormat {
+ // The client is only interested in receiving output directories in
+ // the form of a single Tree object, using the `tree_digest` field.
+ TREE_ONLY = 0;
+
+ // The client is only interested in receiving output directories in
+ // the form of a hierarchy of separately stored Directory objects,
+ // using the `root_directory_digest` field.
+ DIRECTORY_ONLY = 1;
+
+ // The client is interested in receiving output directories both in
+ // the form of a single Tree object and a hierarchy of separately
+ // stored Directory objects, using both the `tree_digest` and
+ // `root_directory_digest` fields.
+ TREE_AND_DIRECTORY = 2;
+ }
+
+ // The format that the worker should use to store the contents of
+ // output directories.
+ //
+ // In case this field is set to a value that is not supported by the
+ // worker, the worker SHOULD interpret this field as TREE_ONLY. The
+ // worker MAY store output directories in formats that are a superset
+ // of what was requested (e.g., interpreting DIRECTORY_ONLY as
+ // TREE_AND_DIRECTORY).
+ OutputDirectoryFormat output_directory_format = 9;
}
// A `Platform` is a set of requirements, such as hardware, operating system, or
@@ -1060,7 +1087,7 @@ message ActionResult {
//
// DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API
// should still populate this field in addition to `output_symlinks`.
- repeated OutputSymlink output_file_symlinks = 10; // [ deprecated = true ];
+ repeated OutputSymlink output_file_symlinks = 10 [ deprecated = true ];
// New in v2.1: this field will only be populated if the command
// `output_paths` field was used, and not the pre v2.1 `output_files` or
@@ -1160,7 +1187,7 @@ message ActionResult {
//
// DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API
// should still populate this field in addition to `output_symlinks`.
- repeated OutputSymlink output_directory_symlinks = 11; // [ deprecated = true ];
+ repeated OutputSymlink output_directory_symlinks = 11 [ deprecated = true ];
// The exit code of the command.
int32 exit_code = 4;
@@ -1295,6 +1322,15 @@ message OutputDirectory {
// compute their digests, constructing the Tree object manually avoids
// redundant marshaling.
bool is_topologically_sorted = 4;
+
+ // The digest of the encoded
+ // [Directory][build.bazel.remote.execution.v2.Directory] proto
+ // containing the contents the directory's root.
+ //
+ // If both `tree_digest` and `root_directory_digest` are set, this
+ // field MUST match the digest of the root directory contained in the
+ // Tree message.
+ Digest root_directory_digest = 5;
}
// An `OutputSymlink` is similar to a
@@ -1632,7 +1668,7 @@ message BatchUpdateBlobsRequest {
bytes data = 2;
// The format of `data`. Must be `IDENTITY`/unspecified, or one of the
- // compressors advertised by the
+ // compressors advertised by the
// [CacheCapabilities.supported_batch_compressors][build.bazel.remote.execution.v2.CacheCapabilities.supported_batch_compressors]
// field.
Compressor.Value compressor = 3;
@@ -2082,4 +2118,4 @@ message RequestMetadata {
// There is no expectation that this value will have any particular structure,
// or equality across invocations, though some client tools may offer these guarantees.
string configuration_id = 7;
-}
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment