Skip to content

Commit

Permalink
worker: remove ValueError work-around for kobo from ErrataDiffBuild task
Browse files Browse the repository at this point in the history
  • Loading branch information
lzaoral committed Sep 12, 2023
1 parent 6964c37 commit dd9209b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion osh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,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

Expand Down
14 changes: 2 additions & 12 deletions osh/worker/tasks/task_errata_diff_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dd9209b

Please sign in to comment.