Skip to content

server, lifecycle: drop idle upstream connections before uvicorn does (cherry-pick #27192 to version-2026.8) - #27353

Merged
BeryJu merged 3 commits into
version-2026.8from
cherry-pick/27192-to-version-2026.8
Nov 6, 2026
Merged

BeryJu merged 3 commits into
version-2026.8from
cherry-pick/27192-to-version-2026.8

Conversation

@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

⚠️ This cherry-pick has conflicts that require manual resolution.

Cherry-pick of #27192 to version-2026.8 branch.

Original PR: #27192
Original Author: @dominic-r
Cherry-picked commit: 62d919f

Please resolve the conflicts in this PR before merging.

This cherry-pick has conflicts that need manual resolution.

Original PR: #27192
Original commit: 62d919f
@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 98222f5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6aeca20ffb790c33aa9ee717
😎 Deploy Preview https://deploy-preview-27353--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 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 98222f5
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6aeca20faebb4f9810462baf
😎 Deploy Preview https://deploy-preview-27353--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.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82540% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.09%. Comparing base (d83bded) to head (98222f5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/server/mod.rs 96.82% 2 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           version-2026.8   #27353      +/-   ##
==================================================
+ Coverage           92.07%   92.09%   +0.01%     
==================================================
  Files                1166     1166              
  Lines               75537    75595      +58     
  Branches             4129     4187      +58     
==================================================
+ Hits                69554    69616      +62     
+ Misses               5917     5913       -4     
  Partials               66       66              
Flag Coverage Δ
conformance 33.55% <ø> (ø)
e2e 38.17% <ø> (+0.01%) ⬆️
integration 30.22% <ø> (+<0.01%) ⬆️
rust 47.26% <96.82%> (+0.81%) ⬆️
unit 93.51% <ø> (+<0.01%) ⬆️
unit-migrate 93.51% <ø> (+<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.

version-2026.8 has no ServerClient alias and no retry client, so build
only the pooled client through upstream_client and name the client type
directly.
@dominic-r

Copy link
Copy Markdown
Member

Note

🤖 Claude Opus 5.5 responding on behalf of Dominic

Conflicts resolved in 7719a67, and 98222f5 merges the current version-2026.8 into the branch. That merge had no conflicts.

All three conflicts were in src/server/mod.rs. #27192 was written on top of #27275, which added a ServerClient type alias and a retry client with no idle pool. Neither one exists on version-2026.8, so I left them out:

  • upstream_client and the two keep-alive constants are taken as-is. The function and the test helper name Client<UnixSocketConnector<PathBuf>, Body> directly, like the Server.client field on this branch, so there's no new alias.
  • In Server::new, the inline client with its one-minute idle timeout is removed and client is now upstream_client(socket_path.clone()). The retry client from main is left out.
  • The two regression tests are the same as on main. tempfile and http-body-util are already dependencies on this branch.

lifecycle/gunicorn.conf.py (keepalive = 5) applied without changes. A 5-second keep-alive is safe on this branch because version-2026.8 already has uvicorn 0.54.0, so the uvicorn before 0.53 Connection: Close problem from #27192's description doesn't apply.

Testing: I ran nothing locally (no build, clippy or tests), so this branch relies on CI. I'll merge with squash after CI passes. One blocker remains: /src/ and /lifecycle/ need an approval from the backend code owners, and Dominic's earlier approval doesn't meet that requirement.

@dominic-r
dominic-r enabled auto-merge (squash) November 5, 2026 15:34
@dominic-r

Copy link
Copy Markdown
Member

Note

🤖 Claude Opus 5.5 responding on behalf of Dominic

CI is green on 98222f5. All four required checks passed, and so did test-rust, which runs the two new connection-pool tests against version-2026.8.

What still blocks the merge is a review. /src/ and /lifecycle/ need an approval from @goauthentik/backend. Squash auto-merge is on, so an approval is enough to land it.

@github-actions

github-actions Bot commented Nov 5, 2026

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-98222f5ae9fa5a5850f925335a66e278bc663043
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-98222f5ae9fa5a5850f925335a66e278bc663043

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

@BeryJu
BeryJu merged commit 79222aa into version-2026.8 Nov 6, 2026
138 checks passed
@BeryJu
BeryJu deleted the cherry-pick/27192-to-version-2026.8 branch November 6, 2026 15:10
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