fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
113 stars 61 forks source link

Error 500 instead of 404? #3457

Open praiskup opened 1 month ago

praiskup commented 1 month ago
ERROR:coprs:Admin-only exception
Request: GET https://copr.fedorainfracloud.org/backend/get-build-task/6742605-fedora-39-aarch64:
User: None
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/coprs/views/backend_ns/backend_general.py", line 368, in get_build_task
    task = BuildsLogic.get_build_task(task_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 463, in get_build_task
    build_chroot = BuildChrootsLogic.get_by_build_id_and_name(build_id, chroot_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/copr/coprs_frontend/coprs/logic/builds_logic.py", line 1501, in get_by_build_id_and_name
    mc = MockChrootsLogic.get_from_name(name).one()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/orm/query.py", line 2870, in one
    return self._iter().one()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/result.py", line 1522, in one
    return self._only_one_row(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/sqlalchemy/engine/result.py", line 562, in _only_one_row
    raise exc.NoResultFound(
sqlalchemy.exc.NoResultFound: No row was found when one was required
ERROR:coprs:Response error: 500 Database error, contact admin