From 602298330a682d152e8fb006d5a1c28d36baf14b Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 19 Feb 2019 15:41:49 +0100 Subject: [PATCH] [IMP] runbot: send status earlier when the build fails When a user checks the runbot frontend, the guess_result field is used to change the color of the build state. But github is not notified of this guessed result. As a consequence, the runbot_merge is not aware the build is failed and will continue to wait. With this commit, as soon as the guess_result detects a failure, the status is sent to github, that way, runbot_merge will stop waiting sooner. --- runbot/models/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runbot/models/build.py b/runbot/models/build.py index e060d70a..0c3c6ee8 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -423,6 +423,11 @@ class runbot_build(models.Model): build._logger('%s time exceded (%ss)', build.job, build.job_time) build.write({'job_end': now()}) build._kill(result='killed') + else: + # failfast + if not build.result and build.guess_result in ('ko', 'warn'): + build.result = build.guess_result + build._github_status() continue build._logger('%s finished', build.job) # schedule