... |
... |
@@ -618,7 +618,7 @@ class Element(Plugin): |
618
|
618
|
# Time to use the artifact, check once more that it's there
|
619
|
619
|
self.__assert_cached()
|
620
|
620
|
|
621
|
|
- with self.timed_activity("Staging {}/{}".format(self.name, self.__get_brief_display_key())):
|
|
621
|
+ with self.timed_activity("Staging {}/{}".format(self.name, self._get_brief_display_key())):
|
622
|
622
|
# Get the extracted artifact
|
623
|
623
|
artifact_base, _ = self.__extract()
|
624
|
624
|
artifact = os.path.join(artifact_base, 'files')
|
... |
... |
@@ -1157,6 +1157,19 @@ class Element(Plugin): |
1157
|
1157
|
length = min(len(cache_key), context.log_key_length)
|
1158
|
1158
|
return (cache_key, cache_key[0:length], dim_key)
|
1159
|
1159
|
|
|
1160
|
+ # _get_brief_display_key()
|
|
1161
|
+ #
|
|
1162
|
+ # Returns an abbreviated cache key for display purposes
|
|
1163
|
+ #
|
|
1164
|
+ # Returns:
|
|
1165
|
+ # (str): An abbreviated hex digest cache key for this Element
|
|
1166
|
+ #
|
|
1167
|
+ # Question marks are returned if information for the cache key is missing.
|
|
1168
|
+ #
|
|
1169
|
+ def _get_brief_display_key(self):
|
|
1170
|
+ _, display_key, _ = self._get_display_key()
|
|
1171
|
+ return display_key
|
|
1172
|
+
|
1160
|
1173
|
# _preflight():
|
1161
|
1174
|
#
|
1162
|
1175
|
# A wrapper for calling the abstract preflight() method on
|
... |
... |
@@ -1631,7 +1644,7 @@ class Element(Plugin): |
1631
|
1644
|
return False
|
1632
|
1645
|
|
1633
|
1646
|
# Notify successfull download
|
1634
|
|
- display_key = self.__get_brief_display_key()
|
|
1647
|
+ display_key = self._get_brief_display_key()
|
1635
|
1648
|
self.info("Downloaded artifact {}".format(display_key))
|
1636
|
1649
|
return True
|
1637
|
1650
|
|
... |
... |
@@ -1671,14 +1684,14 @@ class Element(Plugin): |
1671
|
1684
|
self.warn("Not pushing tainted artifact.")
|
1672
|
1685
|
return False
|
1673
|
1686
|
|
1674
|
|
- with self.timed_activity("Pushing artifact"):
|
|
1687
|
+ display_key = self._get_brief_display_key()
|
|
1688
|
+ with self.timed_activity("Pushing artifact {}".format(display_key)):
|
1675
|
1689
|
# Push all keys used for local commit
|
1676
|
1690
|
pushed = self.__artifacts.push(self, self.__get_cache_keys_for_commit())
|
1677
|
1691
|
if not pushed:
|
1678
|
1692
|
return False
|
1679
|
1693
|
|
1680
|
1694
|
# Notify successful upload
|
1681
|
|
- display_key = self.__get_brief_display_key()
|
1682
|
1695
|
self.info("Pushed artifact {}".format(display_key))
|
1683
|
1696
|
return True
|
1684
|
1697
|
|
... |
... |
@@ -1954,19 +1967,6 @@ class Element(Plugin): |
1954
|
1967
|
def __can_build_incrementally(self):
|
1955
|
1968
|
return bool(self._get_workspace())
|
1956
|
1969
|
|
1957
|
|
- # __get_brief_display_key():
|
1958
|
|
- #
|
1959
|
|
- # Returns an abbreviated cache key for display purposes
|
1960
|
|
- #
|
1961
|
|
- # Returns:
|
1962
|
|
- # (str): An abbreviated hex digest cache key for this Element
|
1963
|
|
- #
|
1964
|
|
- # Question marks are returned if information for the cache key is missing.
|
1965
|
|
- #
|
1966
|
|
- def __get_brief_display_key(self):
|
1967
|
|
- _, display_key, _ = self._get_display_key()
|
1968
|
|
- return display_key
|
1969
|
|
-
|
1970
|
1970
|
# __prepare():
|
1971
|
1971
|
#
|
1972
|
1972
|
# Internal method for calling public abstract prepare() method.
|
... |
... |
@@ -1989,7 +1989,7 @@ class Element(Plugin): |
1989
|
1989
|
# Raises an error if the artifact is not cached.
|
1990
|
1990
|
#
|
1991
|
1991
|
def __assert_cached(self):
|
1992
|
|
- assert self._cached(), "{}: Missing artifact {}".format(self, self.__get_brief_display_key())
|
|
1992
|
+ assert self._cached(), "{}: Missing artifact {}".format(self, self._get_brief_display_key())
|
1993
|
1993
|
|
1994
|
1994
|
# __get_tainted():
|
1995
|
1995
|
#
|