From 966dad544b76fddc69c5b5a5bed2e2bfc1b9e378 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 12 Dec 2013 17:33:53 -0600 Subject: [PATCH] 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 --- teuthology/queue.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/teuthology/queue.py b/teuthology/queue.py index 12cb56ea2e..877d3e24c9 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')) -- 2.39.5