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

task_data passed to BuildJob is really often None type #2816

Closed
nikromen opened this issue Jul 17, 2023 · 3 comments · Fixed by #2842
Closed

task_data passed to BuildJob is really often None type #2816

nikromen opened this issue Jul 17, 2023 · 3 comments · Fixed by #2842
Assignees
Labels

Comments

@nikromen
Copy link
Member

worker.log on backend has a ton of these:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/copr_backend/background_worker_build.py", line 793, in handle_task
    self.handle_build()
  File "/usr/lib/python3.11/site-packages/copr_backend/background_worker_build.py", line 785, in handle_build
    self._get_build_job()
  File "/usr/lib/python3.11/site-packages/copr_backend/background_worker_build.py", line 350, in _get_build_job
    self.job = BuildJob(resp.json(), self.opts)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/copr_backend/job.py", line 77, in __init__
    for key, val in task_data.items():
                    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'items'

@nikromen nikromen added the bug label Jul 17, 2023
@nikromen nikromen self-assigned this Aug 7, 2023
@nikromen
Copy link
Member Author

nikromen commented Aug 8, 2023

note for me so I don't forget

these exceptions happen roughly at the same time on frontend

2023-08-08 12:42:29,487 [ERROR][/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.py:187|backend_general:get_build_record][backend: 2600:1f18:8ee:ae00:d553:8ed5:d8b6:9f83] 'NoneType' object has no attribute 'module_setup_commands'
Traceback (most recent call last):
  File "/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.py", line 169, in get_build_record
    modules = copr_chroot.module_setup_commands
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

this exceptions happen in get_build_record which provides info about /get-build-task/ endpoint, but get_build_record throws an exception, logs it and then returns None -> /get-build-task/ returns "null" -> resp.json() in self.job = BuildJob(resp.json(), self.opts) returns None

@FrostyX
Copy link
Member

FrostyX commented Sep 8, 2023

I am sorry, I forgot about this issue and canceled the broken build, see #2904. So I accidentally got rid of your reproducer. But AFAIK we know how to reproduce it locally, so hopefully it should be fine.

@praiskup
Copy link
Member

praiskup to help jkyjovsk with reproducing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants