Skip to content

root: bump uvicorn to 0.54.0 and hyper to 1.12.0 - #27199

Merged
dominic-r merged 1 commit into
version-2026.8from
dominic/2026.8-bump-uvicorn-hyper
Oct 26, 2026
Merged

dominic-r merged 1 commit into
version-2026.8from
dominic/2026.8-bump-uvicorn-hyper

Conversation

@dominic-r

Copy link
Copy Markdown
Member

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 versions main already runs. The lockfiles only change those two packages and hyper's dependency want (0.3.1 to 0.3.2).

Why is this change needed?

On 2026.8, a request sent right after a request with Connection: Close can 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:

  1. The server forwards the client's Connection: Close to uvicorn. uvicorn before 0.53 only treats a lowercase close as closing, so it keeps the connection open and doesn't answer with Connection: close.
  2. hyper before 1.12 decides whether to reuse a connection from the response alone, so the server puts that connection back in its pool.
  3. uvicorn's HTTP parser did read Close as closing, and uvicorn turns on lenient_data_after_close, so it discards anything sent on that connection afterwards.
  4. The next request the server sends on that connection within uvicorn's 2 second keep-alive never gets a response.

uvicorn 0.53 parses Connection case-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 matches main and 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: Close followed 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: Close straight 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

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)
  • I have read the AI usage policy.

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.
@netlify

netlify Bot commented Oct 26, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 777592f
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6adf8ff6b88f8d934b890b28
😎 Deploy Preview https://deploy-preview-27199--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 26, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 777592f
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6adf8ff66dcabaab98d76c2f
😎 Deploy Preview https://deploy-preview-27199--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@dominic-r
dominic-r enabled auto-merge (squash) October 26, 2026 17:43
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.04%. Comparing base (366ebd3) to head (777592f).
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ
conformance 33.69% <ø> (+<0.01%) ⬆️
e2e 38.32% <ø> (ø)
integration 30.36% <ø> (+<0.01%) ⬆️
rust 46.45% <ø> (ø)
unit 93.47% <ø> (+<0.01%) ⬆️
unit-migrate 93.48% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@dominic-r
dominic-r merged commit e5193b1 into version-2026.8 Oct 26, 2026
137 checks passed
@dominic-r
dominic-r deleted the dominic/2026.8-bump-uvicorn-hyper branch October 26, 2026 18:13
@github-actions

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

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)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

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-777592f0e0d60664a4a83e50529f81db0e4f859d

Afterwards, run the upgrade commands from the latest release notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants