summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-12-14 22:25:47 +0100
committerJürg Billeter <j@bitron.ch>2020-12-14 22:25:47 +0100
commit1be8c18884e4481b3814a715fcdafa45ea1038db (patch)
treeeedc44904fbc0a4d40009d42c2b9310d700b519b
parenta4baf7b9f6ef3fe8e2e0c13b7154af25884c94b7 (diff)
downloadbuildstream-1be8c18884e4481b3814a715fcdafa45ea1038db.tar.gz
wip cache query queue
-rw-r--r--src/buildstream/_stream.py9
-rw-r--r--src/buildstream/element.py7
2 files changed, 9 insertions, 7 deletions
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index f25c2dcd6..7779d99e3 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -310,6 +310,8 @@ class Stream:
for element in self.targets:
element._set_artifact_files_required(scope=scope)
+ self.query_cache(elements)
+
# Now construct the queues
#
self._scheduler.clear_queues()
@@ -463,6 +465,9 @@ class Stream:
raise StreamError("No artifact caches available for pulling artifacts")
self._pipeline.assert_consistent(elements)
+
+ self.query_cache(elements)
+
self._scheduler.clear_queues()
self._add_queue(PullQueue(self._scheduler))
self._enqueue_plan(elements)
@@ -505,6 +510,8 @@ class Stream:
self._pipeline.assert_consistent(elements)
+ self.query_cache(elements)
+
self._scheduler.clear_queues()
self._add_queue(PullQueue(self._scheduler))
self._add_queue(ArtifactPushQueue(self._scheduler))
@@ -555,6 +562,8 @@ class Stream:
self._check_location_writable(location, force=force, tar=tar)
+ self.query_cache(elements)
+
uncached_elts = [elt for elt in elements if not elt._cached()]
if uncached_elts and pull:
self._message(MessageType.INFO, "Attempting to fetch missing or incomplete artifact")
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index cb4809434..e27de6e96 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -3245,13 +3245,6 @@ class Element(Plugin):
# In strict mode, the strong cache key always matches the strict cache key
self.__cache_key = self.__strict_cache_key
- # If we've newly calculated a cache key, our artifact's
- # current state will also change - after all, we can now find
- # a potential existing artifact.
- self._load_artifact(pull=False)
- if not self._pull_pending():
- self._load_artifact_done()
-
# Update the message kwargs in use for this plugin to dispatch messages with
#
self._message_kwargs["element_key"] = self._get_display_key()