Repository navigation
root: bump uvicorn to 0.54.0 and hyper to 1.12.0 - #27199
Conversation
uvicorn before 0.53 only treats a lowercase `Connection: close` as closing. A request with `Connection: Close`, as DokuWiki sends it, left the server's connection to uvicorn open while uvicorn's parser discarded anything sent on it afterwards, and hyper before 1.12 put that connection back in the server's pool. The next request sent on it within uvicorn's 2 second keep-alive never got a response. Either upgrade avoids this on its own. main already has both.
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version-2026.8 #27199 +/- ##
==================================================
- Coverage 92.05% 92.04% -0.01%
==================================================
Files 1163 1163
Lines 75194 75194
Branches 4129 4129
==================================================
- Hits 69219 69215 -4
- Misses 5909 5913 +4
Partials 66 66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-777592f0e0d60664a4a83e50529f81db0e4f859d
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-777592f0e0d60664a4a83e50529f81db0e4f859dAfterwards, run the upgrade commands from the latest release notes. |
Details
What does this PR change?
Upgrades uvicorn from 0.51.0 to 0.54.0 and hyper from 1.11.0 to 1.12.0 on
version-2026.8. These are the versionsmainalready runs. The lockfiles only change those two packages and hyper's dependencywant(0.3.1 to 0.3.2).Why is this change needed?
On 2026.8, a request sent right after a request with
Connection: Closecan hang until the client gives up. In #27181, DokuWiki's userinfo request after the token exchange times out after 15 seconds and nothing is logged:Connection: Closeto uvicorn. uvicorn before 0.53 only treats a lowercasecloseas closing, so it keeps the connection open and doesn't answer withConnection: close.Closeas closing, and uvicorn turns onlenient_data_after_close, so it discards anything sent on that connection afterwards.uvicorn 0.53 parses
Connectioncase-insensitively (Kludex/uvicorn#3103) and closes the connection. hyper 1.12 never pools a connection after a request that asked to close it. Either one fixes the hang on its own. Taking both matchesmainand fixes it at the source, without carrying code changes in a patch release. Everything else in uvicorn since 0.51 is either a fix or opt-in (zttp, HTTP/2, zuvloop).How was this tested?
I ran the 2026.8.5 image limited to 0.2 CPU and sent a request with
Connection: Closefollowed by any request 0, 1 or 1.5 seconds later. The stock image hung on the second request 4 out of 4 times at each delay. With uvicorn 0.53 alone, hyper 1.12 alone, and both together (hyper 1.12 with uvicorn 0.54), none hung.With hyper 1.12 and uvicorn 0.54, I also logged in through Chromium, with a callback server that exchanges the code and calls userinfo with
Connection: Closestraight away, as DokuWiki does. All 4 logins succeeded and the flow's WebSocket connected. The same flow timed out on userinfo 4 out of 4 times on the stock image.Linked issues
closes #27181
Checklist
make all)make docs)