diff options
author | Josh Smith <qinusty@gmail.com> | 2018-08-30 11:57:23 +0100 |
---|---|---|
committer | Josh Smith <qinusty@gmail.com> | 2018-08-31 12:29:38 +0100 |
commit | 0dc7524417ad37fd99af583ea38e972e705fea90 (patch) | |
tree | 24003a1b8d9a79a50aab3b8e8b9235bd03b543a6 | |
parent | 2b94532a3844b67bf7a3d4a1aee251a836e1144a (diff) | |
download | buildstream-0dc7524417ad37fd99af583ea38e972e705fea90.tar.gz |
job.py: Modify retry messages to be FAIL
This adjusts the message handler for the child processes to no longer
override the message type.
This also removes the ability for unhandled non BstError exceptions to
retry.
-rw-r--r-- | buildstream/_scheduler/jobs/job.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/buildstream/_scheduler/jobs/job.py b/buildstream/_scheduler/jobs/job.py index 922ce5613..165c7c83f 100644 --- a/buildstream/_scheduler/jobs/job.py +++ b/buildstream/_scheduler/jobs/job.py @@ -403,7 +403,7 @@ class Job(): if self._retry_flag and (self._tries <= self._max_retries): self.message(MessageType.FAIL, "Try #{} failed, retrying".format(self._tries), - elapsed=elapsed) + elapsed=elapsed, logfile=filename) else: self.message(MessageType.FAIL, str(e), elapsed=elapsed, detail=e.detail, @@ -430,7 +430,8 @@ class Job(): self.message(MessageType.BUG, self.action_name, elapsed=elapsed, detail=detail, logfile=filename) - self._child_shutdown(RC_FAIL) + # Unhandled exceptions should permenantly fail + self._child_shutdown(RC_PERM_FAIL) else: # No exception occurred in the action @@ -509,11 +510,6 @@ class Job(): message.action_name = self.action_name message.task_id = self._task_id - if (message.message_type == MessageType.FAIL and - self._tries <= self._max_retries and self._retry_flag): - # Job will be retried, display failures as warnings in the frontend - message.message_type = MessageType.WARN - # Send to frontend if appropriate if context.silent_messages() and (message.message_type not in unconditional_messages): return |