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

500 Internal Server Error when examining an impact of a renamed package #355

Open
hroncok opened this issue Jul 25, 2023 · 3 comments
Open

Comments

@hroncok
Copy link

hroncok commented Jul 25, 2023

When I go for example to https://koschei.fedoraproject.org/package/PyYAML?collection=f39

screenshot

I click on the question mark near python3-cython + 3.0.0-1.fc39, it leads to:

https://koschei.fedoraproject.org/affected-by/python3-cython?epoch1=0&version1=&release1=&epoch2=0&version2=3.0.0&release2=1.fc39&collection=f39

That has:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Similarly, when I click to python3-Cython 0.29.35-2.fc39 - under show 166 more, it leads to the same error at https://koschei.fedoraproject.org/affected-by/python3-Cython?epoch1=0&version1=0.29.35&release1=2.fc39&epoch2=0&version2=&release2=&collection=f39

@mizdebsk
Copy link
Member

Confirmed. This is a bug in Koschei code.

@hroncok hroncok changed the title 500 Internal Server Error when examinign an impact of a renamed package 500 Internal Server Error when examining an impact of a renamed package Jul 25, 2023
@mizdebsk
Copy link
Member

Extracted stack trace from the logs:

Exception on /affected-by/python3-ply [GET]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3.10/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/share/koschei/koschei/frontend/views.py", line 905, in affected_by
    return render_template("affected-by.html", package_state=package_state,
  File "/usr/lib/python3.10/site-packages/flask/templating.py", line 147, in render_template
    return _render(
  File "/usr/lib/python3.10/site-packages/flask/templating.py", line 128, in _render
    rv = template.render(context)
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 1304, in render
    self.environment.handle_exception()
  File "/usr/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/share/koschei/templates/affected-by.html", line 3, in <module>
    {% set change_type = 'upgrade' if evr1 <= evr2 else 'downgrade' %}
  File "/usr/share/koschei/koschei/db.py", line 288, in __le__
    return self._cmp(other) <= 0
  File "/usr/share/koschei/koschei/db.py", line 320, in _cmp
    return util.compare_evr(self.__composite_values__(), other.__composite_values__())
  File "/usr/share/koschei/koschei/util.py", line 116, in compare_evr
    return rpm.labelCompare(evr1, evr2)
ValueError: invalid version

@hroncok
Copy link
Author

hroncok commented Jul 25, 2023

ValueError: invalid version happens with empty strings.

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

No branches or pull requests

2 participants