Commit 13808375 authored by Tristan Van Berkom's avatar Tristan Van Berkom Mark all elements as pulled in Stream.push()

Marking all elements as pulled in Stream.push() ensures that cache
keys are resolved before pushing elements, otherwise state is left
unresolved in non-strict mode while elements are awaiting to download
an artifact by it's strict cache key.

Fixes #990
parent b9eec0ca
......@@ -441,6 +441,20 @@ class Stream():
self._message(MessageType.INFO, "Attempting to fetch missing artifact buildtrees")
# FIXME: This hack should be removed as a result of refactoring
# Element._update_state()
# This workaround marks all dependencies of all selected elements as
# "pulled" before trying to push.
# Instead of lying to the elements and telling them they have already
# been pulled, we should have something more consistent with how other
# state bits are handled; and explicitly tell the elements that they
# need to be pulled with something like Element._schedule_pull().
for element in elements:
push_queue = ArtifactPushQueue(self._scheduler)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment