Investigate a problem with issues not moved to needstriage milestone
There is an problem with certain issues not being moved to needstriage milestone and not getting any labels:
https://github.com/webcompat/web-bugs/issues/106463 https://github.com/webcompat/web-bugs/issues/106459 https://github.com/webcompat/web-bugs/issues/106383 https://github.com/webcompat/web-bugs/issues/106369 https://github.com/webcompat/web-bugs/issues/106351 https://github.com/webcompat/web-bugs/issues/106317 https://github.com/webcompat/web-bugs/issues/106284
There are the following errors:
2022-06-27 05:49:00,554 tracking Exception thrown:
Traceback (most recent call last):
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 518, in <lambda>
view_func=lambda **kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/scaffold.py", line 328, in send_static_file
return send_from_directory(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/helpers.py", line 700, in send_from_directory
return werkzeug.utils.send_from_directory( # type: ignore
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/werkzeug/utils.py", line 841, in send_from_directory
raise NotFound()
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2022-06-27 05:49:56,131 tracking Exception on /webhooks/labeler [POST]
Traceback (most recent call last):
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 2070, in wsgi_app
response = self.full_dispatch_request()
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 1515, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/webcompat/webcompat.com/./webcompat/webhooks/__init__.py", line 38, in hooklistener
return webhook_issue.process_issue_action()
File "/home/webcompat/webcompat.com/./webcompat/webhooks/model.py", line 396, in process_issue_action
self.moderate_private_issue()
File "/home/webcompat/webcompat.com/./webcompat/webhooks/model.py", line 157, in moderate_private_issue
payload_request = self.prepare_accepted_issue()
File "/home/webcompat/webcompat.com/./webcompat/webhooks/model.py", line 174, in prepare_accepted_issue
labels = get_issue_labels(self.body)
File "/home/webcompat/webcompat.com/./webcompat/webhooks/helpers.py", line 192, in get_issue_labels
priority_label = extract_priority_label(issue_body)
File "/home/webcompat/webcompat.com/./webcompat/webhooks/helpers.py", line 128, in extract_priority_label
label = priority_label_by_url(hostname)
File "/home/webcompat/webcompat.com/./webcompat/webhooks/helpers.py", line 114, in priority_label_by_url
site = global_site_db.query(SiteGlobal).filter_by(url=url).first()
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3429, in first
ret = list(self[0:1])
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3203, in __getitem__
return list(res)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
return self._execute_and_instances(context)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: SELECT "topsites-global".url AS "topsites-global_url", "topsites-global".priority AS "topsites-global_priority", "topsites-global".ranking AS "topsites-global_ranking"
FROM "topsites-global"
WHERE "topsites-global".url = ?
LIMIT ? OFFSET ?]
[parameters: ('pyodide.org', 1, 0)]
(Background on this error at: http://sqlalche.me/e/13/4xp6)
2022-06-27 05:49:56,132 tracking Exception thrown:
Traceback (most recent call last):
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/home/webcompat/webcompat.com/env/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed
The first error started last week:
2022-06-23 14:12:43,492 tracking Exception on /webhooks/labeler [POST]
I've updated the topsites DB that day, so it is likely related. Thinking it might be because I've performed the fetch on staging and copied the DB file over to prod (to avoid extra cost for Alexa queries), but staging had a different branch deployed to it - my bad 🥲
I've fetched a new version of top sites DB for prod and going to monitor incoming issues to see if the problem still occurs.
This error is not occurring anymore, so this can be closed.