diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-11 21:56:01 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-11 21:56:01 +0900 |
commit | b07ca524ec2c24575425b58ff96416bd92e38ba0 (patch) | |
tree | 280ad485c8f1bc4471494d1980878bdac290e683 | |
parent | ab303aa6e4da0ede0de0521522c4389e6f6a03c8 (diff) | |
download | buildstream-b07ca524ec2c24575425b58ff96416bd92e38ba0.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.py | 4 | ||||
-rw-r--r-- | buildstream/_scheduler/trackqueue.py | 13 |
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 |