Page MenuHomePhabricator

The absence of resultset/unknown number case is not handled
Closed, ResolvedPublic

Description

Like on https://quarry.wmflabs.org/query/29876, an empty query that result in the absence of resultset

10.0.2.2 - - [23/Sep/2018 13:18:26] "GET /run/53/output/0/json HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/venv/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/venv/lib/python3.5/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/srv/venv/lib/python3.5/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/vagrant/quarry/web/app.py", line 296, in output_result
    response = output.get_formatted_response(format, qrun, reader, resultset_id)
  File "/vagrant/quarry/web/output.py", line 13, in get_formatted_response
    return json_formatter(queryrun, reader, resultset_id)
  File "/vagrant/quarry/web/output.py", line 102, in json_formatter
    header = next(rows)
  File "/vagrant/quarry/web/results.py", line 102, in get_rows
    cur.execute('SELECT * FROM %s ORDER BY __id__' % table_name)
sqlite3.OperationalError: no such table: resultset_0

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 23 2018, 1:19 PM
Framawiki renamed this task from Empty resultset case is not handled to The absence of resultset case is not handled.Sep 23 2018, 1:21 PM
Framawiki updated the task description. (Show Details)
Framawiki moved this task from Backlog to Bugs on the Quarry board.Oct 21 2018, 6:58 PM
Framawiki renamed this task from The absence of resultset case is not handled to The absence of resultset/unknown number case is not handled.Oct 21 2018, 7:39 PM
Framawiki claimed this task.

Change 468866 had a related patch set uploaded (by Framawiki; owner: Framawiki):
[analytics/quarry/web@master] results.py: handle queries without resultsets

https://gerrit.wikimedia.org/r/468866

Change 468866 merged by jenkins-bot:
[analytics/quarry/web@master] Handle bad output_result endpoint params

https://gerrit.wikimedia.org/r/468866

Framawiki closed this task as Resolved.Nov 12 2018, 8:25 PM

Mentioned in SAL (#wikimedia-cloud) [2018-11-12T20:37:04Z] <framawiki> deployed till ed511d1 on quarry-web-01 T205222 T205221