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 FastAPI to the latest version by pinning it to >=0.110.0 #943

Merged
merged 1 commit into from Mar 19, 2024

Conversation

shangyian
Copy link
Contributor

@shangyian shangyian commented Mar 18, 2024

Summary

This PR takes the opportunity to upgrade DJ to the latest version of FastAPI. We're doing this because a number of updates to newer versions of FastAPI may fix the deadlock issue we were seeing with database sessions using Depends, namely this fix in 0.82.0:

🐛 Allow exit code for dependencies with yield to always execute, by removing capacity limiter for them, to e.g. allow closing DB connections without deadlocks.

This is preferable to rolling our own solution.

The primary changes in this PR are to accommodate the new starlette TestClient, which uses httpx rather than requests. There are also a few changes needed for the updated version of pydantic (although no breaking changes as we haven't upgraded to pydantic>=2).

Test Plan

Will update as tests are done.

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

ASAP

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 77102aa
🔍 Latest deploy log https://app.netlify.com/sites/thriving-cassata-78ae72/deploys/65f8cb4c78880e00085d53ae

Copy link
Member

@agorajek agorajek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your assessment @shangyian . Thanks for finding this in the FastAPI release notes!

@shangyian shangyian marked this pull request as ready for review March 19, 2024 14:08
@shangyian shangyian merged commit 3a2d628 into DataJunction:main Mar 19, 2024
24 checks passed
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.

None yet

2 participants