Repository navigation
API: Remove unreachable Accept branch and last deprecated 422 alias - #73463
Eason09053360 wants to merge 1 commit into
Conversation
The NDJSON branch in header_accept_json_or_ndjson_depends also tested for Mimetype.ANY, which the first branch has already returned for. Read at face value it says "*/* streams NDJSON", the opposite of the documented behaviour in get_log, so the next reader is misled and the condition can never be covered. api_fastapi/compat.py exists solely to paper over Starlette's rename of HTTP_422_UNPROCESSABLE_ENTITY. The asset events route was added two days after the cleanup that removed every other direct use, so it bypassed the shim: it emits a StarletteDeprecationWarning on every malformed request and would turn a 422 into a 500 once Starlette drops the old name. That path had no test at all, so one is added along with it.
|
Hello @Eason09053360 - thank you for your contributions to Apache Airflow! The Airflow community has introduced a limit of 5 open pull requests at a time for contributors without write access to the repository. You currently have 33 open pull requests, so - as a one-time step of introducing the limit - we closed the ones where maintainers have not engaged yet:
These pull requests stay open because maintainers are already engaged in them - they count towards your limit:
This is not a judgement of you or of your changes. We never told contributors before that opening many pull requests at once was a problem, so there is nothing to feel bad about - and nothing is lost: your branches, commits and the review history stay where they are. What we ask you to do is to make your first prioritization decision: choose which of the pull requests above matter most to you, and reopen them (up to 5 open at a time, including the ones still open) with the "Reopen pull request" button or While your pull requests are waiting for review, the most valuable thing you can do is help in other ways - reviewing other contributors' pull requests, helping with issues, and taking part in the discussions on the devlist and Slack. Why we introduced the limit, what it means for you and how to reopen or restore a pull request is explained in https://github.com/apache/airflow/blob/main/contributing-docs/32_open_pull_request_limit.rst. Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting |
Why
Two unrelated-looking leftovers in
api_fastapi, both cases of the code saying something untrue. The NDJSON branch ofheader_accept_json_or_ndjson_dependsalso tests forMimetype.ANY, which the first branch has already returned for — read at face value it claims*/*streams NDJSON, the opposite of whatget_logdocuments and does. Andapi_fastapi/compat.pyexists only to absorb Starlette's rename ofHTTP_422_UNPROCESSABLE_ENTITY, but the asset events route landed two days after #69415 removed every other direct use, so it bypasses the shim: it warns on each malformed request and would turn a 422 into a 500 once Starlette drops the old name.What
common/headers.py: drop the unreachableor accept.startswith(Mimetype.ANY). No behaviour change.execution_api/routes/asset_events.py: take the 422 constant fromapi_fastapi.compat— the last direct use in the package.extra422 path, which had none.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5) following the guidelines