]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix dictionary update in try_push_job_info() 1673/head
authorKamoltat <ksirivad@redhat.com>
Mon, 13 Sep 2021 21:14:41 +0000 (21:14 +0000)
committerKamoltat <ksirivad@redhat.com>
Fri, 17 Sep 2021 03:33:24 +0000 (03:33 +0000)
the function `try_push_job_info()` is not
updating `job_info` dictionary properly since
we want to update `job_info` with `extra_info`,
however, in lines 498 and 499 we are assigning
`job_info` to a copy of `extra_info` and updating
`job_info` with `job_config` which is incorrect.
Instead, we should assign `job_info` with
a copy of `job_config` and update `job_info` with
`extra_info`

teuthology/report.py

index 2d063567728fecb984f65ae4adadb1f888f42ab5..08e115cd4d5e55a7b4d6a1af59b65d5e46d74b9c 100644 (file)
@@ -495,8 +495,8 @@ def try_push_job_info(job_config, extra_info=None):
     job_id = job_config['job_id']
 
     if extra_info is not None:
-        job_info = extra_info.copy()
-        job_info.update(job_config)
+        job_info = job_config.copy()
+        job_info.update(extra_info)
     else:
         job_info = job_config