]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Make sure to report all results.
authorZack Cerza <zack@cerza.org>
Thu, 12 Dec 2013 23:33:53 +0000 (17:33 -0600)
committerZack Cerza <zack@cerza.org>
Thu, 12 Dec 2013 23:33:53 +0000 (17:33 -0600)
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 <zack.cerza@inktank.com>
teuthology/queue.py

index 12cb56ea2e87e376ebd0d1da885c005811e9fb0f..877d3e24c9357685c10273ac532d321108cd7937 100644 (file)
@@ -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'))