summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-11 21:56:01 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-11 23:16:57 +0900
commitb97c526bfaaf6beedfa8b5b550926a009be33c03 (patch)
treeabb0ca31742bdbbc1d2cc18365ecc2dcf3d80691
parent8d4e1634f64f9b6acc3a3672ef519c206115f832 (diff)
downloadbuildstream-b97c526bfaaf6beedfa8b5b550926a009be33c03.tar.gz
_scheduler/trackqueue.py: Dont use Plugin.error(), use Plugin.warn() for now.
This is already problematic as this particular error is reported but fails to fail the session correctly. Documented this in issue #187
-rw-r--r--buildstream/_scheduler/job.py4
-rw-r--r--buildstream/_scheduler/trackqueue.py13
2 files changed, 11 insertions, 6 deletions
diff --git a/buildstream/_scheduler/job.py b/buildstream/_scheduler/job.py
index 310bb8c70..962ca3c13 100644
--- a/buildstream/_scheduler/job.py
+++ b/buildstream/_scheduler/job.py
@@ -274,8 +274,8 @@ class Job():
self.message(element, MessageType.FAIL, "Try #{} failed, retrying".format(self.tries),
elapsed=elapsed)
else:
- self.message(element, MessageType.FAIL, self.action_name,
- elapsed=elapsed, detail=str(e),
+ self.message(element, MessageType.FAIL, str(e),
+ elapsed=elapsed, detail=e.detail,
logfile=filename, sandbox=e.sandbox)
# Report the exception to the parent (for internal testing purposes)
diff --git a/buildstream/_scheduler/trackqueue.py b/buildstream/_scheduler/trackqueue.py
index ffa143d5a..4e6f8d316 100644
--- a/buildstream/_scheduler/trackqueue.py
+++ b/buildstream/_scheduler/trackqueue.py
@@ -73,10 +73,15 @@ class TrackQueue(Queue):
try:
_yaml.dump(toplevel, fullname)
except OSError as e:
- source.error("Failed to update project file",
- detail="{}: Failed to rewrite "
- "tracked source to file {}: {}"
- .format(source, fullname, e))
+ # FIXME: We currently dont have a clear path to
+ # fail the scheduler from the main process, so
+ # this will just warn and BuildStream will exit
+ # with a success code.
+ #
+ source.warn("Failed to update project file",
+ detail="{}: Failed to rewrite "
+ "tracked source to file {}: {}"
+ .format(source, fullname, e))
# Forcefully recalculate the element's consistency state after successfully
# tracking, this is avoid a following fetch queue operating on the sources