Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worker: do not repeatedly remove already awaited tasks from subtask list #220

Merged
merged 1 commit into from
Aug 24, 2023

Commits on Aug 23, 2023

  1. worker: do not repeatedly remove already awaited tasks from subtask list

    Plain TaskBase.wait() always uses the **whole** list of all subtasks as
    the set of subtasks that should be awaited.  Therefore, it will try to
    await even tasks that were already awaited in some previous
    TaskBase.wait() call and are no longer present in self._subtask_list
    which subsequently raise the ValueError shown below.
    
    Keep the set of already awaited tasks and skip their IDs when marking
    newly awaited subtasks as finished.
    
    Fixes the following traceback:
    ```
    Traceback (most recent call last):
      File "/src/kobo/kobo/worker/taskmanager.py", line 423, in run_task
        task.run()
      File "/src/osh/worker/tasks/task_errata_diff_build.py", line 55, in run
        self.wait()
      File "/src/kobo/kobo/worker/task.py", line 147, in wait
        self._subtask_list.remove(i)
    ValueError: list.remove(x): x not in list
    ```
    lzaoral committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    fd6006c View commit details
    Browse the repository at this point in the history