diff options
Diffstat (limited to 'buildstream/_scheduler')
-rw-r--r-- | buildstream/_scheduler/buildqueue.py | 5 | ||||
-rw-r--r-- | buildstream/_scheduler/pullqueue.py | 4 | ||||
-rw-r--r-- | buildstream/_scheduler/trackqueue.py | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/buildstream/_scheduler/buildqueue.py b/buildstream/_scheduler/buildqueue.py index 045413289..6d1857313 100644 --- a/buildstream/_scheduler/buildqueue.py +++ b/buildstream/_scheduler/buildqueue.py @@ -35,6 +35,9 @@ class BuildQueue(Queue): return element._get_unique_id() def ready(self, element): + # state of dependencies may have changed, recalculate element state + element._update_state() + return element._buildable() def skip(self, element): @@ -43,6 +46,6 @@ class BuildQueue(Queue): def done(self, element, result, returncode): # Elements are cached after they are successfully assembled if returncode == 0: - element._cached(recalculate=True) + element._update_state() return True diff --git a/buildstream/_scheduler/pullqueue.py b/buildstream/_scheduler/pullqueue.py index b21267eb3..b8091e24d 100644 --- a/buildstream/_scheduler/pullqueue.py +++ b/buildstream/_scheduler/pullqueue.py @@ -58,9 +58,7 @@ class PullQueue(Queue): if returncode != 0: return False - # return code is 0 even if artifact was unavailable - if element._cached(recalculate=True): - element._get_cache_key_from_artifact(recalculate=True) + element._update_state() # Element._pull() returns True if it downloaded an artifact, # here we want to appear skipped if we did not download. diff --git a/buildstream/_scheduler/trackqueue.py b/buildstream/_scheduler/trackqueue.py index 4e6f8d316..3c1521f7b 100644 --- a/buildstream/_scheduler/trackqueue.py +++ b/buildstream/_scheduler/trackqueue.py @@ -90,6 +90,7 @@ class TrackQueue(Queue): context = element._get_context() context._push_message_depth(True) element._consistency(recalculate=True) + element._update_state() context._pop_message_depth() # We'll appear as a skipped element if tracking resulted in no change |