From: Zack Cerza Date: Thu, 12 Dec 2013 23:33:53 +0000 (-0600) Subject: Make sure to report all results. X-Git-Tag: 1.1.0~1740 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=966dad544b76fddc69c5b5a5bed2e2bfc1b9e378;p=teuthology.git Make sure to report all results. If a just-finished job was using a teuthology branch not known to contain the reporting feature, then report the job via the teuthology-report script. Note that in some cases this will result in double reporting but the extra load should be negligible. Signed-off-by: Zack Cerza --- diff --git a/teuthology/queue.py b/teuthology/queue.py index 12cb56ea2..877d3e24c 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -213,10 +213,24 @@ def run_with_watchdog(process, job_config): report.try_push_job_info(job_info, dict(status='running')) time.sleep(teuth_config.watchdog_interval) - # The job finished. We don't know the status, but if it was a pass or fail - # it will have already been reported to paddles. In that case paddles - # ignores the 'dead' status. If the job was killed, paddles will use the - # 'dead' status. + # The job finished. Let's make sure paddles knows. + branches_with_reporting = ('master', 'next', 'last') + if job_config.get('teuthology_branch') not in branches_with_reporting: + # The job ran with a teuthology branch that may not have the reporting + # feature. Let's call teuthology-report (which will be from the master + # branch) to report the job manually. + args = ['teuthology-report', + '-r', + job_info['name'], + '-j', + job_info['job_id'], + ] + subprocess.Popen(args).wait() + + # Let's make extra sure that paddles knows the job is finished. We don't + # know the status, but if it was a pass or fail it will have already been + # reported to paddles. In that case paddles ignores the 'dead' status. If + # the job was killed, paddles will use the 'dead' status. report.try_push_job_info(job_info, dict(status='dead'))