This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch juerg/build-with-source-push in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 8489630fa6b5dbea35ca4a04fb872112b3592ae0 Author: Jürg Billeter <[email protected]> AuthorDate: Wed Mar 17 16:31:42 2021 +0100 pullqueue.py: Do not call _load_artifact_done() on error It's correct to call `_load_artifact_done()` if the pull was unsuccessful because the artifact is not available on the server. However, if an error is raised (e.g. job was terminated or an internal error), we must not call `_load_artifact_done()` as no artifact object is available. --- src/buildstream/_scheduler/queues/pullqueue.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buildstream/_scheduler/queues/pullqueue.py b/src/buildstream/_scheduler/queues/pullqueue.py index 925ded0..ecff02c 100644 --- a/src/buildstream/_scheduler/queues/pullqueue.py +++ b/src/buildstream/_scheduler/queues/pullqueue.py @@ -21,6 +21,7 @@ # Local imports from . import Queue, QueueStatus from ..resources import ResourceType +from ..jobs import JobStatus from ..._exceptions import SkipJob @@ -42,6 +43,10 @@ class PullQueue(Queue): return QueueStatus.SKIP def done(self, _, element, result, status): + + if status is JobStatus.FAIL: + return + element._load_artifact_done() @staticmethod
