#7 Frontend crashes when /latest endpoint is used
Closed: Fixed 5 years ago Opened 7 years ago by kparal.

When I use /latest endpoint in the frontend (instead of using the api directly), I get HTTP 500 and I see this error in the log:

[Tue Apr 11 12:48:31.931648 2017] [wsgi:error] [pid 1047] app          2017-04-11 12:48:31 ERROR   Exception on /results/latest [GET]
[Tue Apr 11 12:48:31.931665 2017] [wsgi:error] [pid 1047] Traceback (most recent call last):
[Tue Apr 11 12:48:31.931672 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
[Tue Apr 11 12:48:31.931678 2017] [wsgi:error] [pid 1047]     response = self.full_dispatch_request()
[Tue Apr 11 12:48:31.931684 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
[Tue Apr 11 12:48:31.931691 2017] [wsgi:error] [pid 1047]     rv = self.handle_user_exception(e)
[Tue Apr 11 12:48:31.931697 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
[Tue Apr 11 12:48:31.931703 2017] [wsgi:error] [pid 1047]     reraise(exc_type, exc_value, tb)
[Tue Apr 11 12:48:31.931708 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
[Tue Apr 11 12:48:31.931714 2017] [wsgi:error] [pid 1047]     rv = self.dispatch_request()
[Tue Apr 11 12:48:31.931719 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
[Tue Apr 11 12:48:31.931725 2017] [wsgi:error] [pid 1047]     return self.view_functions[rule.endpoint](**req.view_args)
[Tue Apr 11 12:48:31.931731 2017] [wsgi:error] [pid 1047]   File "/usr/lib/python2.7/site-packages/resultsdb_frontend/controllers/main.py", line 92, in result
[Tue Apr 11 12:48:31.931737 2017] [wsgi:error] [pid 1047]     result['groups'] = (len(result['groups']), ','.join(result['groups']))
[Tue Apr 11 12:48:31.931743 2017] [wsgi:error] [pid 1047] KeyError: 'groups'

For example this link:
https://taskotron.fedoraproject.org/resultsdb/results/latest?item=FEDORA-2017-9e59baca41&type=bodhi_update&testcases:like=update.*
instead of this link:
https://taskotron.fedoraproject.org/resultsdb_api/api/v2.0/results/latest?item=FEDORA-2017-9e59baca41&type=bodhi_update&testcases:like=update.*

I'm not saying the frontend should be able to display /latest results, but at least it should not crash, and display an "unsupported query" message or something like that. Otherwise it's very hard to figure out why this is happening. I originally thought that resultsdb is simply overloaded again, and only Jan helped me realize I'm not accessing the API directly, but through the frontend.


Metadata Update from @jskladan:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata