Repository navigation
build(deps): pin fastapi<0.144 until Prefect works on current FastAPI (#353) - #358
Merged
Merged
Conversation
Prefect 3.7 only requires fastapi<1.0. FastAPI 0.155.0 (2026-10-20) removed the deprecated min_items argument that prefect/server/api/concurrency_limits_v2.py still passes to Body(), so every fresh install fails on import prefect with "TypeError: Body() got an unexpected keyword argument 'min_items'", taking down the unit suite, prefect server start and the integration CI. A dry-run install of the pinned requirements resolves fastapi 0.154.0 with prefect 3.7.8. Drop the pin once a Prefect release stops passing min_items. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 28, 2026
The first CI run with fastapi<0.155 got past import prefect and prefect server start, then failed in prefect-deploy: FastAPI 0.144 to 0.154 no longer treat a JSON null as "missing" for Body(None) on an int parameter, so the Prefect client's workers/filter request (limit: null, offset: null) is rejected with 422 "Input should be a valid integer". Reproduced against a local Prefect 3.7.8 server: 422 on fastapi 0.154.0, 404 (pool lookup, as expected) on 0.143.5, and read_workers_for_work_pool succeeds on 0.143.5. 0.143.x is what the last green main CI run installed. Unit suite: 342 passed on 0.143.5. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
✅ No blocking issues noticed
No blocking implementation findings were identified. The dependency and Prefect compatibility criteria remain unverified by automated tests, including resolution, import, worker filtering, and deployment workflow coverage.
About this PR
- Consider adding automated dependency-resolution and Prefect smoke/integration coverage so the compatibility pin cannot be accidentally weakened or removed without detection.
Test suggestions
- Verify dependency resolution selects FastAPI below 0.144 while satisfying the Prefect constraint.
- Import Prefect successfully using the pinned dependency set.
- Exercise Prefect worker filtering with null limit and offset values.
- Run the Prefect deployment workflow against the pinned FastAPI version.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify dependency resolution selects FastAPI below 0.144 while satisfying the Prefect constraint.
2. Import Prefect successfully using the pinned dependency set.
3. Exercise Prefect worker filtering with null limit and offset values.
4. Run the Prefect deployment workflow against the pinned FastAPI version.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #353
Proposed fixes:
Every fresh install since 2026-10-20 fails on
import prefect:Prefect 3.7 only requires
fastapi<1.0, and FastAPI 0.155.0 removed the deprecatedmin_itemsargument Prefect still passes. This takes down the unit suite,prefect server start, and the integration CI. Main is red for this reason, and so are #356, #357 and the recent Dependabot PRs.The first version of this PR pinned
fastapi<0.155. The integration run on that commit got past the import and the server start, thenckan datapusher_plus prefect-deployfailed with a second FastAPI change: 0.144 to 0.154 no longer treat a JSONnullas "missing" forBody(None)on anintparameter, so the Prefect client'sworkers/filterrequest (limit: null, offset: null) is rejected:This PR therefore pins
fastapi<0.144. 0.143.x is what main's last green CI run (2026-10-16) installed; the whole 0.144 to 0.162 range was released between 2026-10-18 and 23.pip install --dry-run --ignore-installed -r requirements.txtPOST workers/filterwithlimit: nullPrefectClient.read_workers_for_work_poolagainst that server on 0.143.5pytest tests --ignore=tests/integration --ignore=tests/js, with--ckan-ini)<0.155commitprefect-deploywith the 422 aboveprefect>=3.7,<3.8stays; a Prefect release that works on current FastAPI is the real fix and this pin should go with it.requirements.txtand the changelog.🤖 Generated with Claude Code