-
Bug
-
Resolution: Done
-
Critical
-
quay-v3.4.0
Description:
This is an issue when edit the permissions of robot account, after click "Set Repository Permissions" for target robot account, quay redirect to 500 error page, checked Quay POD logs, get "AttributeError: module 'data.model' has no attribute 'repositoy'", see Quay POD logs attached.
Quay Image: quay.io/projectquay/quay:50ba6130
Steps:
- Login Quay Console
- Create new Organization
- Create new Image repositoryA
- Create new robot account, give write permissions to repositoryA
- Create new image repositoryB
- Click "Set Repository Permissions" for robot account
Expected Results:
Quay should navigate to page where users can edit the permissions
Actual Results:
Quay navigate to quay 500 error page
Quay POD logs:
gunicorn-web stdout | 2020-08-05 08:04:49,543 [364] [ERROR] [gunicorn.error] Error handling request /api/v1/organization/qateam/robots/siri/permissions
gunicorn-web stdout | Traceback (most recent call last):
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 55, in handle
gunicorn-web stdout | self.handle_request(listener_name, req, client, addr)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request
gunicorn-web stdout | super().handle_request(listener_name, req, sock, addr)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 106, in handle_request
gunicorn-web stdout | respiter = self.wsgi(environ, resp.start_response)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in _call_
gunicorn-web stdout | return self.wsgi_app(environ, start_response)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 232, in _call_
gunicorn-web stdout | return self.app(environ, start_response)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
gunicorn-web stdout | response = self.handle_exception(e)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 269, in error_router
gunicorn-web stdout | return original_handler(e)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
gunicorn-web stdout | reraise(exc_type, exc_value, tb)
......
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 458, in wrapper
gunicorn-web stdout | resp = resource(*args, **kwargs)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask/views.py", line 89, in view
gunicorn-web stdout | return self.dispatch_request(*args, **kwargs)
gunicorn-web stdout | File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 573, in dispatch_request
gunicorn-web stdout | resp = meth(*args, **kwargs)
gunicorn-web stdout | File "/quay-registry/endpoints/decorators.py", line 141, in wrapper
gunicorn-web stdout | return func(*args, **kwargs)
gunicorn-web stdout | File "/quay-registry/endpoints/decorators.py", line 120, in wrapper
gunicorn-web stdout | return func(*args, **kwargs)
gunicorn-web stdout | File "/quay-registry/endpoints/api/_init_.py", line 320, in wrapped
gunicorn-web stdout | return func(self, *args, **kwargs)
gunicorn-web stdout | File "/quay-registry/endpoints/api/robot.py", line 307, in get
gunicorn-web stdout | permissions = model.list_robot_permissions(robot.name)
gunicorn-web stdout | File "/quay-registry/endpoints/api/robot_models_pre_oci.py", line 31, in list_robot_permissions
gunicorn-web stdout | for permission in permissions
gunicorn-web stdout | File "/quay-registry/endpoints/api/robot_models_pre_oci.py", line 31, in <listcomp>
gunicorn-web stdout | for permission in permissions
gunicorn-web stdout | AttributeError: module 'data.model' has no attribute 'repositoy'
gunicorn-web stdout | 2020-08-05 08:04:49,544 [364] [INFO] [gunicorn.access] - - [05/Aug/2020:08:04:49 +0000] "GET /api/v1/organization/qateam/robots/siri/permissions HTTP/1.0" 500 0 "" ""
nginx stdout | 10.128.2.4 () - - [05/Aug/2020:08:04:49 +0000] "GET /api/v1/organization/qateam/robots/siri/permissions HTTP/2.0" 500 141 "https://demo-quayecosystem-quay-quay-enterprise.apps.quay-281.qe.devcluster.openshift.com/organization/qateam?tab=robots" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Firefox/68.0" (0.029 498 0.029)