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:05:35 UTC

[buildstream] 18/26: Reference node properties specification in comments

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

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

commit cc20ce3a7b966dcb5fc5faaec46b227e721e1796
Author: Darius Makovsky <tr...@protonmail.com>
AuthorDate: Wed Jan 8 13:35:51 2020 +0000

    Reference node properties specification in comments
---
 src/buildstream/_cas/cascache.py               | 2 +-
 src/buildstream/storage/_casbaseddirectory.py  | 2 ++
 src/buildstream/storage/_filebaseddirectory.py | 4 +++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/buildstream/_cas/cascache.py b/src/buildstream/_cas/cascache.py
index c608f12..bb2abc6 100644
--- a/src/buildstream/_cas/cascache.py
+++ b/src/buildstream/_cas/cascache.py
@@ -224,7 +224,7 @@ class CASCache:
             else:
                 utils.safe_copy(self.objpath(filenode.digest), fullpath)
                 if filenode.node_properties:
-                    # XXX: see https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/execution/v2/nodeproperties.md
+                    # see https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/execution/v2/nodeproperties.md
                     # for supported node property specifications
                     for prop in filenode.node_properties:
                         if prop.name == "MTime" and prop.value:
diff --git a/src/buildstream/storage/_casbaseddirectory.py b/src/buildstream/storage/_casbaseddirectory.py
index 6fdca1a..93facd6 100644
--- a/src/buildstream/storage/_casbaseddirectory.py
+++ b/src/buildstream/storage/_casbaseddirectory.py
@@ -163,6 +163,8 @@ class CasBasedDirectory(Directory):
         entry.digest = self.cas_cache.add_object(path=path, link_directly=can_link)
         entry.is_executable = os.access(path, os.X_OK)
         properties = properties or []
+        # see https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/execution/v2/nodeproperties.md
+        # for supported node property specifications
         entry.node_properties = []
         if "MTime" in properties:
             node_property = remote_execution_pb2.NodeProperty()
diff --git a/src/buildstream/storage/_filebaseddirectory.py b/src/buildstream/storage/_filebaseddirectory.py
index a38e2ac..7b745f7 100644
--- a/src/buildstream/storage/_filebaseddirectory.py
+++ b/src/buildstream/storage/_filebaseddirectory.py
@@ -307,7 +307,9 @@ class FileBasedDirectory(Directory):
                     if update_mtime or entry.node_properties:
                         utils.safe_copy(src_path, dest_path, result=result)
                         mtime = update_mtime
-                        # XXX mtime property will override specified mtime
+                        # mtime property will override specified mtime
+                        # see https://github.com/bazelbuild/remote-apis/blob/master/build/bazel/remote/execution/v2/nodeproperties.md
+                        # for supported node property specifications
                         if entry.node_properties:
                             for prop in entry.node_properties:
                                 if prop.name == "MTime" and prop.value: