This is an automated email from the ASF dual-hosted git repository.

akitouni pushed a commit to branch abderrahim/artifact-show
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 77c2319b9c8fd7c418091a03160f5561c6114805
Author: Abderrahim Kitouni <[email protected]>
AuthorDate: Fri Aug 29 10:29:21 2025 +0100

    _stream: speed up `bst artifact show`
    
    We only need to check the remotes for cached artifacts if we don't have them
    cached locally.
---
 src/buildstream/_stream.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 61462ed2c..da8d48550 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -797,8 +797,10 @@ class Stream:
 
         self.query_cache(target_objects)
 
+        not_cached_locally = [element for element in target_objects if not 
element._cached()]
+
         if self._artifacts.has_fetch_remotes():
-            self._resolve_cached_remotely(target_objects)
+            self._resolve_cached_remotely(not_cached_locally)
 
         return target_objects
 

Reply via email to