You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:11:35 UTC

[buildstream] 26/41: remote_execution.proto: Add proposed symlink support

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch jmac/googlecas_and_virtual_directories_1
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 9c2b7903ce4a12464343cf0eca74207ecebb4cb0
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Thu Mar 15 08:14:48 2018 +0100

    remote_execution.proto: Add proposed symlink support
---
 .../remoteexecution/v1test/remote_execution.proto  |  27 +++-
 .../remoteexecution/v1test/remote_execution_pb2.py | 170 ++++++++++++++-------
 2 files changed, 132 insertions(+), 65 deletions(-)

diff --git a/google/devtools/remoteexecution/v1test/remote_execution.proto b/google/devtools/remoteexecution/v1test/remote_execution.proto
index febe0cb..a1d8155 100644
--- a/google/devtools/remoteexecution/v1test/remote_execution.proto
+++ b/google/devtools/remoteexecution/v1test/remote_execution.proto
@@ -440,11 +440,12 @@ message Platform {
 }
 
 // A `Directory` represents a directory node in a file tree, containing zero or
-// more children [FileNodes][google.devtools.remoteexecution.v1test.FileNode]
-// and [DirectoryNodes][google.devtools.remoteexecution.v1test.DirectoryNode].
-// Each `Node` contains its name in the directory, the digest of its content
-// (either a file blob or a `Directory` proto), as well as possibly some
-// metadata about the file or directory.
+// more children [FileNodes][google.devtools.remoteexecution.v1test.FileNode],
+// [DirectoryNodes][google.devtools.remoteexecution.v1test.DirectoryNode] and
+// [SymlinkNodes][google.devtools.remoteexecution.v1test.SymlinkNode].
+// Each `Node` contains its name in the directory, either the digest of its
+// content (either a file blob or a `Directory` proto) or a symlink target, as
+// well as possibly some metadata about the file or directory.
 //
 // In order to ensure that two equivalent directory trees hash to the same
 // value, the following restrictions MUST be obeyed when constructing a
@@ -452,8 +453,8 @@ message Platform {
 //   - Every child in the directory must have a path of exactly one segment.
 //     Multiple levels of directory hierarchy may not be collapsed.
 //   - Each child in the directory must have a unique path segment (file name).
-//   - The files and directories in the directory must each be sorted in
-//     lexicographical order by path. The path strings must be sorted by code
+//   - The files, directories, and symlinks in the directory must each be sorted
+//     in lexicographical order by path. The path strings must be sorted by code
 //     point, equivalently, by UTF-8 bytes.
 //
 // A `Directory` that obeys the restrictions is said to be in canonical form.
@@ -505,6 +506,9 @@ message Directory {
 
   // The subdirectories in the directory.
   repeated DirectoryNode directories = 2;
+
+  // The symlinks in the directory.
+  repeated SymlinkNode symlinks = 3;
 }
 
 // A `FileNode` represents a single file and associated metadata.
@@ -533,6 +537,15 @@ message DirectoryNode {
   Digest digest = 2;
 }
 
+// A `SymlinkNode` represents a symbolic link.
+message SymlinkNode {
+  // The name of the symlink.
+  string name = 1;
+
+  // The target path of the symlink.
+  string target = 2;
+}
+
 // A content digest. A digest for a given blob consists of the size of the blob
 // and its hash. The hash algorithm to use is defined by the server, but servers
 // SHOULD use SHA-256.
diff --git a/google/devtools/remoteexecution/v1test/remote_execution_pb2.py b/google/devtools/remoteexecution/v1test/remote_execution_pb2.py
index 768950e..b45d4c9 100644
--- a/google/devtools/remoteexecution/v1test/remote_execution_pb2.py
+++ b/google/devtools/remoteexecution/v1test/remote_execution_pb2.py
@@ -23,7 +23,7 @@ DESCRIPTOR = _descriptor.FileDescriptor(
   name='google/devtools/remoteexecution/v1test/remote_execution.proto',
   package='google.devtools.remoteexecution.v1test',
   syntax='proto3',
-  serialized_pb=_b('\n=google/devtools/remoteexecution/v1test/remote_execution.proto\x12&google.devtools.remoteexecution.v1test\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\"\xd3\x02\n\x06\x41\x63tion\x12\x46\n\x0e\x63ommand_digest\x18\x01 \x01(\x0b\x32..google.devtools.remoteexecution.v1test.Digest\x12I\n\x11input_root_digest\x18\x02 \x01(\x0b\x32..google.devtools.remoteexecution.v1test.D [...]
+  serialized_pb=_b('\n=google/devtools/remoteexecution/v1test/remote_execution.proto\x12&google.devtools.remoteexecution.v1test\x1a\x1cgoogle/api/annotations.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\"\xd3\x02\n\x06\x41\x63tion\x12\x46\n\x0e\x63ommand_digest\x18\x01 \x01(\x0b\x32..google.devtools.remoteexecution.v1test.Digest\x12I\n\x11input_root_digest\x18\x02 \x01(\x0b\x32..google.devtools.remoteexecution.v1test.D [...]
   ,
   dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_longrunning_dot_operations__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,])
 
@@ -58,8 +58,8 @@ _EXECUTEOPERATIONMETADATA_STAGE = _descriptor.EnumDescriptor(
   ],
   containing_type=None,
   options=None,
-  serialized_start=2996,
-  serialized_end=3075,
+  serialized_start=3112,
+  serialized_end=3191,
 )
 _sym_db.RegisterEnumDescriptor(_EXECUTEOPERATIONMETADATA_STAGE)
 
@@ -301,6 +301,13 @@ _DIRECTORY = _descriptor.Descriptor(
       message_type=None, enum_type=None, containing_type=None,
       is_extension=False, extension_scope=None,
       options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='symlinks', full_name='google.devtools.remoteexecution.v1test.Directory.symlinks', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      options=None, file=DESCRIPTOR),
   ],
   extensions=[
   ],
@@ -314,7 +321,7 @@ _DIRECTORY = _descriptor.Descriptor(
   oneofs=[
   ],
   serialized_start=888,
-  serialized_end=1040,
+  serialized_end=1111,
 )
 
 
@@ -358,8 +365,8 @@ _FILENODE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1042,
-  serialized_end=1153,
+  serialized_start=1113,
+  serialized_end=1224,
 )
 
 
@@ -396,8 +403,46 @@ _DIRECTORYNODE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1155,
-  serialized_end=1248,
+  serialized_start=1226,
+  serialized_end=1319,
+)
+
+
+_SYMLINKNODE = _descriptor.Descriptor(
+  name='SymlinkNode',
+  full_name='google.devtools.remoteexecution.v1test.SymlinkNode',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='google.devtools.remoteexecution.v1test.SymlinkNode.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='target', full_name='google.devtools.remoteexecution.v1test.SymlinkNode.target', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1321,
+  serialized_end=1364,
 )
 
 
@@ -434,8 +479,8 @@ _DIGEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1250,
-  serialized_end=1292,
+  serialized_start=1366,
+  serialized_end=1408,
 )
 
 
@@ -507,8 +552,8 @@ _ACTIONRESULT = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1295,
-  serialized_end=1669,
+  serialized_start=1411,
+  serialized_end=1785,
 )
 
 
@@ -559,8 +604,8 @@ _OUTPUTFILE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1672,
-  serialized_end=1802,
+  serialized_start=1788,
+  serialized_end=1918,
 )
 
 
@@ -597,8 +642,8 @@ _TREE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1805,
-  serialized_end=1945,
+  serialized_start=1921,
+  serialized_end=2061,
 )
 
 
@@ -642,8 +687,8 @@ _OUTPUTDIRECTORY = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=1948,
-  serialized_end=2112,
+  serialized_start=2064,
+  serialized_end=2228,
 )
 
 
@@ -701,8 +746,8 @@ _EXECUTEREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=2115,
-  serialized_end=2309,
+  serialized_start=2231,
+  serialized_end=2425,
 )
 
 
@@ -739,8 +784,8 @@ _LOGFILE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=2311,
-  serialized_end=2408,
+  serialized_start=2427,
+  serialized_end=2524,
 )
 
 
@@ -777,8 +822,8 @@ _EXECUTERESPONSE_SERVERLOGSENTRY = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=2653,
-  serialized_end=2751,
+  serialized_start=2769,
+  serialized_end=2867,
 )
 
 _EXECUTERESPONSE = _descriptor.Descriptor(
@@ -828,8 +873,8 @@ _EXECUTERESPONSE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=2411,
-  serialized_end=2751,
+  serialized_start=2527,
+  serialized_end=2867,
 )
 
 
@@ -881,8 +926,8 @@ _EXECUTEOPERATIONMETADATA = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=2754,
-  serialized_end=3075,
+  serialized_start=2870,
+  serialized_end=3191,
 )
 
 
@@ -919,8 +964,8 @@ _GETACTIONRESULTREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3077,
-  serialized_end=3195,
+  serialized_start=3193,
+  serialized_end=3311,
 )
 
 
@@ -964,8 +1009,8 @@ _UPDATEACTIONRESULTREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3198,
-  serialized_end=3396,
+  serialized_start=3314,
+  serialized_end=3512,
 )
 
 
@@ -1002,8 +1047,8 @@ _FINDMISSINGBLOBSREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3398,
-  serialized_end=3516,
+  serialized_start=3514,
+  serialized_end=3632,
 )
 
 
@@ -1033,8 +1078,8 @@ _FINDMISSINGBLOBSRESPONSE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3518,
-  serialized_end=3622,
+  serialized_start=3634,
+  serialized_end=3738,
 )
 
 
@@ -1071,8 +1116,8 @@ _UPDATEBLOBREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3624,
-  serialized_end=3729,
+  serialized_start=3740,
+  serialized_end=3845,
 )
 
 
@@ -1109,8 +1154,8 @@ _BATCHUPDATEBLOBSREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3731,
-  serialized_end=3856,
+  serialized_start=3847,
+  serialized_end=3972,
 )
 
 
@@ -1147,8 +1192,8 @@ _BATCHUPDATEBLOBSRESPONSE_RESPONSE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3981,
-  serialized_end=4096,
+  serialized_start=4097,
+  serialized_end=4212,
 )
 
 _BATCHUPDATEBLOBSRESPONSE = _descriptor.Descriptor(
@@ -1177,8 +1222,8 @@ _BATCHUPDATEBLOBSRESPONSE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=3859,
-  serialized_end=4096,
+  serialized_start=3975,
+  serialized_end=4212,
 )
 
 
@@ -1229,8 +1274,8 @@ _GETTREEREQUEST = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=4099,
-  serialized_end=4246,
+  serialized_start=4215,
+  serialized_end=4362,
 )
 
 
@@ -1267,8 +1312,8 @@ _GETTREERESPONSE = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=4248,
-  serialized_end=4362,
+  serialized_start=4364,
+  serialized_end=4478,
 )
 
 
@@ -1305,8 +1350,8 @@ _TOOLDETAILS = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=4364,
-  serialized_end=4418,
+  serialized_start=4480,
+  serialized_end=4534,
 )
 
 
@@ -1357,8 +1402,8 @@ _REQUESTMETADATA = _descriptor.Descriptor(
   extension_ranges=[],
   oneofs=[
   ],
-  serialized_start=4421,
-  serialized_end=4595,
+  serialized_start=4537,
+  serialized_end=4711,
 )
 
 _ACTION.fields_by_name['command_digest'].message_type = _DIGEST
@@ -1371,6 +1416,7 @@ _PLATFORM_PROPERTY.containing_type = _PLATFORM
 _PLATFORM.fields_by_name['properties'].message_type = _PLATFORM_PROPERTY
 _DIRECTORY.fields_by_name['files'].message_type = _FILENODE
 _DIRECTORY.fields_by_name['directories'].message_type = _DIRECTORYNODE
+_DIRECTORY.fields_by_name['symlinks'].message_type = _SYMLINKNODE
 _FILENODE.fields_by_name['digest'].message_type = _DIGEST
 _DIRECTORYNODE.fields_by_name['digest'].message_type = _DIGEST
 _ACTIONRESULT.fields_by_name['output_files'].message_type = _OUTPUTFILE
@@ -1412,6 +1458,7 @@ DESCRIPTOR.message_types_by_name['Platform'] = _PLATFORM
 DESCRIPTOR.message_types_by_name['Directory'] = _DIRECTORY
 DESCRIPTOR.message_types_by_name['FileNode'] = _FILENODE
 DESCRIPTOR.message_types_by_name['DirectoryNode'] = _DIRECTORYNODE
+DESCRIPTOR.message_types_by_name['SymlinkNode'] = _SYMLINKNODE
 DESCRIPTOR.message_types_by_name['Digest'] = _DIGEST
 DESCRIPTOR.message_types_by_name['ActionResult'] = _ACTIONRESULT
 DESCRIPTOR.message_types_by_name['OutputFile'] = _OUTPUTFILE
@@ -1492,6 +1539,13 @@ DirectoryNode = _reflection.GeneratedProtocolMessageType('DirectoryNode', (_mess
   ))
 _sym_db.RegisterMessage(DirectoryNode)
 
+SymlinkNode = _reflection.GeneratedProtocolMessageType('SymlinkNode', (_message.Message,), dict(
+  DESCRIPTOR = _SYMLINKNODE,
+  __module__ = 'google.devtools.remoteexecution.v1test.remote_execution_pb2'
+  # @@protoc_insertion_point(class_scope:google.devtools.remoteexecution.v1test.SymlinkNode)
+  ))
+_sym_db.RegisterMessage(SymlinkNode)
+
 Digest = _reflection.GeneratedProtocolMessageType('Digest', (_message.Message,), dict(
   DESCRIPTOR = _DIGEST,
   __module__ = 'google.devtools.remoteexecution.v1test.remote_execution_pb2'
@@ -1660,8 +1714,8 @@ _EXECUTION = _descriptor.ServiceDescriptor(
   file=DESCRIPTOR,
   index=0,
   options=None,
-  serialized_start=4598,
-  serialized_end=4763,
+  serialized_start=4714,
+  serialized_end=4879,
   methods=[
   _descriptor.MethodDescriptor(
     name='Execute',
@@ -1684,8 +1738,8 @@ _ACTIONCACHE = _descriptor.ServiceDescriptor(
   file=DESCRIPTOR,
   index=1,
   options=None,
-  serialized_start=4766,
-  serialized_end=5272,
+  serialized_start=4882,
+  serialized_end=5388,
   methods=[
   _descriptor.MethodDescriptor(
     name='GetActionResult',
@@ -1717,8 +1771,8 @@ _CONTENTADDRESSABLESTORAGE = _descriptor.ServiceDescriptor(
   file=DESCRIPTOR,
   index=2,
   options=None,
-  serialized_start=5275,
-  serialized_end=5939,
+  serialized_start=5391,
+  serialized_end=6055,
   methods=[
   _descriptor.MethodDescriptor(
     name='FindMissingBlobs',