From 75b180af2c5d497fe270c26afa3bdad20104d5c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Mon, 4 Sep 2023 13:48:14 +0200 Subject: [PATCH] worker: remove ValueError work-around for kobo from ErrataDiffBuild task Related: https://github.com/release-engineering/kobo/pull/220 Resolves: https://gitlab.cee.redhat.com/covscan/covscan/-/issues/134 --- README.md | 2 +- osh.spec | 2 +- osh/worker/tasks/task_errata_diff_build.py | 14 ++------------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 586c99646..6072349e7 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ report bugs and feature requests on GitHub using the above URL. - `koji` - `python3-kobo-client` - `python3-kobo-rpmlib` -- `python3-kobo-worker` +- `python3-kobo-worker >= 0.30.0` ### client: - `koji` diff --git a/osh.spec b/osh.spec index ca6a2d258..507d02075 100644 --- a/osh.spec +++ b/osh.spec @@ -61,7 +61,7 @@ Requires: file Requires: koji Requires: python3-kobo-client Requires: python3-kobo-rpmlib -Requires: python3-kobo-worker >= 0.24.0 +Requires: python3-kobo-worker >= 0.30.0 Requires: %{name}-common = %{version}-%{release} Requires: osh-worker-conf diff --git a/osh/worker/tasks/task_errata_diff_build.py b/osh/worker/tasks/task_errata_diff_build.py index 8ffa30acc..c84112ddf 100644 --- a/osh/worker/tasks/task_errata_diff_build.py +++ b/osh/worker/tasks/task_errata_diff_build.py @@ -51,18 +51,8 @@ def run(self): self.hub.worker.set_scan_to_basescanning(scan_id) self.hub.worker.assign_task(subtask_id) self.hub.worker.create_sb(subtask_id) - try: - self.wait() - except ValueError: - # there is a race condition here: - # File "/usr/lib/python2.6/site-packages/osh/worker/tasks/task_errata_diff_build.py", line 60, in run - # self.wait() - # File "/usr/lib/python2.6/site-packages/kobo/worker/task.py", line 153, in wait - # self._subtask_list.remove(i) - # ValueError: list.remove(x): x not in list - # - # FIXME: workaround it here for now - pass + + self.wait() self.hub.worker.set_scan_to_scanning(scan_id) scanning_args = self.hub.worker.get_scanning_args(scanning_session_id)