nathanwilliams-ct commented on code in PR #2167:
URL: https://github.com/apache/buildstream/pull/2167#discussion_r3773985211
##########
src/buildstream/element.py:
##########
@@ -2700,11 +2778,18 @@ def
source_provenance_attribute_check(provenance_node=provenance_node):
# Returns:
# (list [str]): A list of refs of all dependencies in staging order.
#
- def __get_dependency_artifact_names(self):
- return [
- os.path.join(dep.project_name, _get_normal_name(dep.name),
dep._get_cache_key())
- for dep in self._dependencies(_Scope.BUILD)
- ]
+ def __get_dependency_artifact_names(self) -> list[str]:
+ refs = []
+ for dep in self._dependencies(_Scope.BUILD):
+ key = dep._get_cache_key()
+ assert key, f"Must have cache key for {_get_normal_name(dep.name)}"
+ refs.append(
+ os.path.join(
+ dep.project_name,
+ _get_normal_name(dep.name),
+ )
Review Comment:
```suggestion
key = dep._get_cache_key()
if key is None:
key = ""
refs.append(
os.path.join(
dep.project_name,
_get_normal_name(dep.name),
key,
)
```
--
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]