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

Upgrade to Flask v3 #2484

Merged
merged 6 commits into from
Nov 7, 2024
Merged

Upgrade to Flask v3 #2484

merged 6 commits into from
Nov 7, 2024

Conversation

jtherrmann
Copy link
Contributor

@jtherrmann jtherrmann commented Nov 4, 2024

Context

We recently started seeing a ton of failing tests like this:

AttributeError: module 'werkzeug' has no attribute '__version__'

which originate from an old version of Flask (see this commit for example).

For some reason, dependabot has not been opening PRs to upgrade Flask. I can only think this must be because the PyPI package is named Flask but our requirements file specified flask (lowercase).

This PR bumps to the latest version of Flask, which fixes the werkzeug-related test failures but introduces 8 new failing tests. Skimming the failures, it looks like this may just be some data type mismatches in expected HTTP responses, so will probably just involve identifying why we're seeing those mismatches and then updating the types in either the code or the tests.

Additional notes

In addition to the changes listed in the Changelog, this PR also updates three API unit tests so that we don't use Decimal values in the expected API responses. This wasn't causing any test failures, but it brings the tests closer to reality because those values are serialized to either int or float in the JSON responses.

TODO

  • Read Flask changelog for v2 -> v3 for breaking changes
  • Fix tests
  • Validate in sandbox deployment

@jtherrmann jtherrmann added the bumpless Changes to documentation, CI/CD pipelines, etc that don't affect the project's version label Nov 4, 2024
@jtherrmann jtherrmann temporarily deployed to hyp3-multi-burst-sandbox November 7, 2024 20:21 — with GitHub Actions Inactive
@jtherrmann jtherrmann temporarily deployed to hyp3-multi-burst-sandbox November 7, 2024 21:18 — with GitHub Actions Inactive
@jtherrmann jtherrmann removed the bumpless Changes to documentation, CI/CD pipelines, etc that don't affect the project's version label Nov 7, 2024
@jtherrmann jtherrmann marked this pull request as ready for review November 7, 2024 21:31
@jtherrmann jtherrmann requested a review from a team as a code owner November 7, 2024 21:31
@jtherrmann jtherrmann merged commit 4d72eee into develop Nov 7, 2024
11 checks passed
@jtherrmann jtherrmann deleted the upgrade-to-flask-v3 branch November 7, 2024 23:50
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 this pull request may close these issues.

2 participants