Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/buildstream/_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ def cache(

context = self._context
element = self._element
size = 0

filesvdir = None
buildtreevdir = None
Expand All @@ -247,7 +246,6 @@ def cache(
filesvdir = CasBasedDirectory(cas_cache=self._cas)
filesvdir._import_files_internal(collectvdir, properties=properties, collect_result=False)
artifact.files.CopyFrom(filesvdir._get_digest())
size += filesvdir._get_size()

with tempfile.TemporaryDirectory() as tmpdir:
files_to_capture = []
Expand Down
2 changes: 1 addition & 1 deletion src/buildstream/_cas/cascache.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def fetch_directory(self, remote, dir_digest):
"Failed to fetch directory tree {}: {}: {}".format(dir_digest.hash, e.code().name, e.details())
) from e

required_blobs = self.required_blobs_for_directory(dir_digest)
required_blobs = self.required_blobs_for_directory(dir_digest, _fetch_tree=False)
self.fetch_blobs(remote, required_blobs)

# pull_tree():
Expand Down
6 changes: 4 additions & 2 deletions src/buildstream/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -3337,6 +3337,8 @@ def __update_cache_keys(self):
# This code can be run multiple times until the strict key can be calculated,
# so let's ensure we only ever calculate the weak key once, even though we need
# to resolve it before we can resolve the strict key.
build_dependencies = list(self._dependencies(_Scope.BUILD))

if self.__weak_cache_key is None:
# Weak cache key includes names of direct build dependencies
# so as to only trigger rebuilds when the shape of the
Expand All @@ -3353,14 +3355,14 @@ def __update_cache_keys(self):
if self.BST_STRICT_REBUILD or e in self.__strict_dependencies
else [e.project_name, e.name]
)
for e in self._dependencies(_Scope.BUILD)
for e in build_dependencies
]
self.__weak_cache_key = self._calculate_cache_key(dependencies)

context = self._get_context()

# Calculate the strict cache key
dependencies = [[e.project_name, e.name, e.__strict_cache_key] for e in self._dependencies(_Scope.BUILD)]
dependencies = [[e.project_name, e.name, e.__strict_cache_key] for e in build_dependencies]
self.__strict_cache_key = self._calculate_cache_key(dependencies, self.__weak_cache_key)

if self.__strict_cache_key is None:
Expand Down