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

Update base docker images to ubuntu:22.04. #185

Merged
merged 5 commits into from
Aug 1, 2022

Conversation

ezio-melotti
Copy link
Collaborator

Fixes #184.

@ezio-melotti ezio-melotti added infrastructure Docker, GCP, GitHub actions, etc. enhancement An enhancement for an existing feature labels Apr 30, 2022
@ezio-melotti ezio-melotti self-assigned this Apr 30, 2022
@ezio-melotti
Copy link
Collaborator Author

After another attempt at deploying this to beta, I got the error: ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/usr/local/lib/python3.10/dist-packages/werkzeug/routing/__init__.py).

Click to see full error logs
flask-app_1      | 2022-07-23T23:16:53.056727365Z Traceback (most recent call last):
flask-app_1      | 2022-07-23T23:16:53.056746589Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/arbiter.py", line 589, in spawn_worker
flask-app_1      | 2022-07-23T23:16:53.056762873Z     worker.init_process()
flask-app_1      | 2022-07-23T23:16:53.056778578Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/workers/ggevent.py", line 146, in init_process
flask-app_1      | 2022-07-23T23:16:53.056793809Z     super().init_process()
flask-app_1      | 2022-07-23T23:16:53.056809234Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/workers/base.py", line 134, in init_process
flask-app_1      | 2022-07-23T23:16:53.056824600Z     self.load_wsgi()
flask-app_1      | 2022-07-23T23:16:53.056977057Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
flask-app_1      | 2022-07-23T23:16:53.057107358Z     self.wsgi = self.app.wsgi()
flask-app_1      | 2022-07-23T23:16:53.057202096Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/app/base.py", line 67, in wsgi
flask-app_1      | 2022-07-23T23:16:53.057262448Z     self.callable = self.load()
flask-app_1      | 2022-07-23T23:16:53.057322098Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
flask-app_1      | 2022-07-23T23:16:53.057436989Z     return self.load_wsgiapp()
flask-app_1      | 2022-07-23T23:16:53.057583534Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
flask-app_1      | 2022-07-23T23:16:53.057961684Z     return util.import_app(self.app_uri)
flask-app_1      | 2022-07-23T23:16:53.058250100Z   File "/usr/local/lib/python3.10/dist-packages/gunicorn/util.py", line 359, in import_app
flask-app_1      | 2022-07-23T23:16:53.058601329Z     mod = importlib.import_module(module)
flask-app_1      | 2022-07-23T23:16:53.058837049Z   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
flask-app_1      | 2022-07-23T23:16:53.058902738Z     return _bootstrap._gcd_import(name[level:], package, level)
flask-app_1      | 2022-07-23T23:16:53.058921972Z   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
flask-app_1      | 2022-07-23T23:16:53.058938684Z   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
flask-app_1      | 2022-07-23T23:16:53.058963537Z   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
flask-app_1      | 2022-07-23T23:16:53.059020370Z   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
flask-app_1      | 2022-07-23T23:16:53.059041956Z   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
flask-app_1      | 2022-07-23T23:16:53.059199701Z   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
flask-app_1      | 2022-07-23T23:16:53.059508107Z   File "/simoc/simoc_server/__init__.py", line 73, in <module>
flask-app_1      | 2022-07-23T23:16:53.059927016Z     import simoc_server.views
flask-app_1      | 2022-07-23T23:16:53.060293621Z   File "/simoc/simoc_server/views.py", line 11, in <module>
flask-app_1      | 2022-07-23T23:16:53.060853852Z     from flask_login import LoginManager, login_user, login_required, logout_user, current_user
flask-app_1      | 2022-07-23T23:16:53.061348288Z   File "/usr/local/lib/python3.10/dist-packages/flask_login/__init__.py", line 12, in <module>
flask-app_1      | 2022-07-23T23:16:53.061788517Z     from .login_manager import LoginManager
flask-app_1      | 2022-07-23T23:16:53.062284600Z   File "/usr/local/lib/python3.10/dist-packages/flask_login/login_manager.py", line 35, in <module>
flask-app_1      | 2022-07-23T23:16:53.062692896Z     from .utils import _create_identifier
flask-app_1      | 2022-07-23T23:16:53.063071361Z   File "/usr/local/lib/python3.10/dist-packages/flask_login/utils.py", line 14, in <module>
flask-app_1      | 2022-07-23T23:16:53.063503421Z     from werkzeug.routing import parse_rule
flask-app_1      | 2022-07-23T23:16:53.063961563Z ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/usr/local/lib/python3.10/dist-packages/werkzeug/routing/__init__.py)

This seems related to this issue:

After pinning the werkzeug version to 2.1 in 1bf40ce, the problem was fixed, and I was able to deploy this branch on beta.simoc.space.

@ezio-melotti
Copy link
Collaborator Author

Upstream flask-login issue seems to be fixed, so I unpinned werkzeug version and redeployed on beta, and everything seems to run smoothly now.
We still need to test on GCP before merging.

@ezio-melotti ezio-melotti merged commit d8b76f8 into master Aug 1, 2022
@ezio-melotti ezio-melotti deleted the update-docker-imgs-2204 branch August 1, 2022 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement for an existing feature infrastructure Docker, GCP, GitHub actions, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update base Docker images
1 participant