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

Flask>=3 requires changes to flask-jwt-extended usage #1448

Closed
8 tasks done
kkaris opened this issue Jun 7, 2024 · 1 comment · Fixed by #1452
Closed
8 tasks done

Flask>=3 requires changes to flask-jwt-extended usage #1448

kkaris opened this issue Jun 7, 2024 · 1 comment · Fixed by #1452

Comments

@kkaris
Copy link
Member

kkaris commented Jun 7, 2024

Upgrading to Flask>=3,<4 comes with a second order consequence: currently we use flask-jwt-extended<4, which requires Flask<2.0,>=1.0. However, upgrading flask-jwt-extended to be compatible with Flask>=3,<4 comes with an api change documented here: https://flask-jwt-extended.readthedocs.io/en/stable/v4_upgrade_guide.html#api-changes

In short, we need to replace all instances of the decorator @jwt_optional with @jwt_required(optional=True) wherever we update to Flask>=3,<4.

Related: gyorilab/gilda#137

I'll try to list all places in downstream repositories in sorger/gyorilab where we would need to make the change:

To test the upgrade

  • Use e.g. CoGEx with the updates provided in Upgrade to flask_jwt_extended>3 gyorilab/indra_cogex#172 as a test case
  • Build the CoGEx docker locally and ensure the docker builds from the branch for CoGEx and for indralab_auth_tools to provide the full updates. Make sure the build is tagged with something else than latest to not overwrite the current running service.
  • Run the docker locally and check that login and curation capabilities work as expected (although actually logging in probably won't work as login typically requires https) as well as looking for any other issues that come from updates.
  • Repeat the build and deploy steps for the current service and check again that everything works (especially the actual login functionality).
  • Repeat the whole process for emmaa (which runs on a separate server) and indra_db (which uses lambda + api gateway)

Testing

@kkaris
Copy link
Member Author

kkaris commented Jul 18, 2024

Remaining things:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant