abderrahim commented on code in PR #1994:
URL: https://github.com/apache/buildstream/pull/1994#discussion_r2083206569
##########
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:
Review Comment:
This is bad style, just check the actual condition directly
```suggestion
if artifact.query_cache():
```
Better yet, since we have already queried the cache, we just need to check
whether the artifact is cached
```suggestion
if artifact.cached():
```
--
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]