ral-facilities / datagateway-api

ICAT API to interface with the DataGateway
Apache License 2.0
5 stars 4 forks source link

Dockerfile does not build #463

Closed moonraker595 closed 10 months ago

moonraker595 commented 1 year ago

Description: When building the docker image, the image fails to build due to mismatched Python dependencies:

...
datagateway_api                      |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
datagateway_api                      |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
datagateway_api                      |   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
datagateway_api                      |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/wsgi.py", line 6, in <module>
datagateway_api                      |     from datagateway_api.src.main import app as application
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/src/main.py", line 7, in <module>
datagateway_api                      |     from datagateway_api.src.api_start_utils import (
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/src/api_start_utils.py", line 17, in <module>
datagateway_api                      |     from datagateway_api.src.datagateway_api.backends import create_backend
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/src/datagateway_api/backends.py", line 3, in <module>
datagateway_api                      |     from datagateway_api.src.datagateway_api.database.backend import DatabaseBackend
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/src/datagateway_api/database/backend.py", line 15, in <module>
datagateway_api                      |     from datagateway_api.src.datagateway_api.database.helpers import (
datagateway_api                      |   File "/datagateway-api-run/datagateway_api/src/datagateway_api/database/helpers.py", line 6, in <module>
datagateway_api                      |     from flask_sqlalchemy import SQLAlchemy
datagateway_api                      |   File "/usr/local/lib/python3.11/site-packages/flask_sqlalchemy/__init__.py", line 14, in <module>
datagateway_api                      |     from flask import _app_ctx_stack, abort, current_app, request
datagateway_api                      | ImportError: cannot import name '_app_ctx_stack' from 'flask' (/usr/local/lib/python3.11/site-packages/flask/__init__.py)
datagateway_api                      | [2023-10-18 08:19:25 +0000] [11] [INFO] Worker exiting (pid: 11)

Acceptance criteria:

MRichards99 commented 10 months ago

@moonraker595 I think this issue might have been fixed as a result of #468 where the same error was found and fixed. Could you see your issue has been resolved please?

moonraker595 commented 10 months ago

Docker file successfully builds.