summaryrefslogtreecommitdiff
path: root/zuul
diff options
context:
space:
mode:
authorSimon Westphahl <simon.westphahl@bmw.de>2022-10-14 13:45:37 +0200
committerSimon Westphahl <simon.westphahl@bmw.de>2022-10-14 14:03:01 +0200
commit7c9dbc53075501b6e29d8b0d1c2851d4ee330b5d (patch)
treed4b1e1e454a31935d15278c11682db8b7e131db3 /zuul
parent4bda3e1969313d7046e54a4fbcb347217121aeeb (diff)
downloadzuul-7c9dbc53075501b6e29d8b0d1c2851d4ee330b5d.tar.gz
Fix re-use of existing job data when hash matches
When restoring the jobs from Zookeeper we did not check for the correct job data attribute on the FrozenJob instance. Instead, we always restored the job data from Zookeeper. Change-Id: Ic1561ea4e17b9da7b02e4c613b13bfbbdb70073c
Diffstat (limited to 'zuul')
-rw-r--r--zuul/model.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/zuul/model.py b/zuul/model.py
index 67b5e0117..5d3e48081 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -2300,7 +2300,7 @@ class FrozenJob(zkobject.ZKObject):
# The data are stored locally in this dict
data['_' + job_data_key] = job_data['data']
elif job_data['storage'] == 'offload':
- existing_job_data = getattr(self, job_data_key, None)
+ existing_job_data = getattr(self, f"_{job_data_key}", None)
if (getattr(existing_job_data, 'hash', None) ==
job_data['hash']):
# Re-use the existing object since it's the same