From 4b9b59649e7f883419fe0b6badf82da864645527 Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Sun, 11 Oct 2026 20:04:39 +0100 Subject: [PATCH] _stream: Query the cache for elements as part of the pipeline --- src/buildstream/_stream.py | 8 ++++---- src/buildstream/_testing/runcli.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index a1d88d667..a46470430 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -416,14 +416,14 @@ def build( source_push_enabled = self._sourcecache.has_push_remotes() - # If source push is enabled, the source cache status of all elements - # is required, independent of whether the artifact is already available. - self.query_cache(elements, sources_of_cached_elements=source_push_enabled) - # Now construct the queues # self._reset() + # If source push is enabled, the source cache status of all elements + # is required, independent of whether the artifact is already available. + self._add_queue(CacheQueryQueue(self._scheduler, sources_if_cached=source_push_enabled)) + if self._artifacts.has_fetch_remotes(): self._add_queue(PullQueue(self._scheduler)) diff --git a/src/buildstream/_testing/runcli.py b/src/buildstream/_testing/runcli.py index 24af09da7..fe12cd4ad 100644 --- a/src/buildstream/_testing/runcli.py +++ b/src/buildstream/_testing/runcli.py @@ -231,7 +231,7 @@ def get_pulled_elements(self): return list(pulled) def get_discarded_elements(self): - discarded = re.findall(r"\[\s*(?:main|pull):(\S+)\s*\]\s*INFO\s*Discarded failed build", self.stderr) + discarded = re.findall(r"\[\s*(?:cache-query|pull):(\S+)\s*\]\s*INFO\s*Discarded failed build", self.stderr) if discarded is None: return []