GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
546 stars 87 forks source link

catalog failed to start in docker #4721

Closed FuhuXia closed 2 months ago

FuhuXia commented 2 months ago

Got the following error when run make clean build up on catalog app:

...
File "/usr/local/lib/python3.10/site-packages/flask_login/login_manager.py", line 5, in <module>
from flask import _request_ctx_stack
ImportError: cannot import name '_request_ctx_stack' from 'flask' (/usr/local/lib/python3.10/site-packages/flask/__init__.py)

You might have to run a docker system prune -a to see the error.

This could be the reason that tests are failing on catalog PRs, as noted here.

btylerburton commented 2 months ago

https://stackoverflow.com/questions/77240858/how-to-fix-cannot-import-name-request-ctx-stack-from-flask

So far the only clue I can find is _request_ctx_stack was going to be removed in Flask 2.4, but we're on Flask 2.0.3

FuhuXia commented 2 months ago

Inventory is still ok, so there is hope. We just need to figure what we did on catalog differently from inventory.

jbrown-xentity commented 2 months ago

The only thing I can think of is that catalog has some configuration for login to the website for staging (and there's probably some logic for that), however I can't find it... We don't have an equivalent for inventory because it's always locked down, but we don't want catalog staging and dev to be indexed by bots so we put it behind a login...

btylerburton commented 2 months ago

Resolved by https://github.com/GSA/catalog.data.gov/pull/1322