abderrahim commented on code in PR #1994:
URL: https://github.com/apache/buildstream/pull/1994#discussion_r2083207507


##########
src/buildstream/_frontend/widget.py:
##########
@@ -461,6 +461,25 @@ def show_pipeline(self, dependencies, format_):
                 # Dump the SourceInfo provenance objects in yaml format
                 line = p.fmt_subst(line, "source-info", 
_yaml.roundtrip_dump_string(all_source_infos))
 
+            # Artifact CAS Digest
+            if "%{artifact-cas-digest" in format_:
+                artifact = element._get_artifact()
+                if not artifact.query_cache():
+                    artifact = None
+                if artifact is not None:
+                    artifact_files = artifact.get_files()
+                    # We call the private CasBasedDirectory._get_digest() for
+                    # the moment, we should make it public on Directory.
+                    artifact_digest = artifact_files._get_digest()
+                    formated_artifact_digest = 
"{}/{}".format(artifact_digest.hash, artifact_digest.size_bytes)
+                    line = p.fmt_subst(line, "artifact-cas-digest", 
formated_artifact_digest)
+                else:
+                    # FIXME
+                    # We could instead collect all of the elements that are not
+                    # cached and issue a single warning message.

Review Comment:
   I wouldn't worry about this. #1997 does the same thing of warning for every 
element.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to