Repository navigation
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
BeryJu
approved these changes
Oct 26, 2026
dewi-tik
enabled auto-merge (squash)
October 27, 2026 11:05
Contributor
|
Thanks for this @ketchupz1999! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27136 +/- ##
==========================================
- Coverage 92.41% 92.38% -0.03%
==========================================
Files 1192 1192
Lines 80462 80509 +47
Branches 4351 4351
==========================================
+ Hits 74358 74378 +20
- Misses 6038 6065 +27
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. |
kensternberg-authentik
added a commit
that referenced
this pull request
Nov 5, 2026
* main: (89 commits) providers/scim: scope-aware adoption (#26174) sources/ldap: respect accountExpires attributes (#26135) web/flows: never let continuous login block the final redirect (#26269) website: document password hash import restrictions (#24235) core: restrict imported password hashers (#24234) core, web: update translations (#27148) server: retry requests on connections closed by a recycled worker (#27275) packages/django-postgres-cache, flows: count cache keys in the database (#25808) events: simplify execution of event rules/notifications (#26873) core: bump github.com/pires/go-proxyproto from 0.15.0 to 0.16.0 (#27260) core: bump goauthentik/platform-ssh from 26.04-ak-0.72.3 to 26.04-ak-0.72.4 in /tests/e2e (#27263) core: bump goauthentik/selenium from 155.0-ak-0.72.3 to 155.0-ak-0.72.4 in /tests/e2e (#27261) core: bump astral-sh/uv from 0.13.5 to 0.13.6 in /lifecycle/container (#27264) core: bump jsonpatch from 1.35 to 1.36 (#27269) outposts: refresh channel groups on hello (#27136) core: bump certifi from 2026.10.19 to 2026.10.23 (#27266) core: bump pluggy from 1.6.0 to v1.7.0 (#27238) core: bump markupsafe from 3.0.3 to v3.0.4 (#27225) core: bump httptools from 0.8.0 to v0.9.0 (#27219) core: bump iniconfig from 2.3.0 to v2.3.1 (#27221) ...
3 tasks done
Contributor
|
🍒 Cherry-pick to |
BeryJu
pushed a commit
that referenced
this pull request
Nov 10, 2026
…up_send (#27717) group_send and group_send_blocking looked up a group's channels without filtering on expires, so every expired GroupChannel row still received a copy of every broadcast. Each copy is a Message row insert plus a NOTIFY from the trigger. On one deployment with about 53,000 expired group rows, each outpost broadcast inserted about 53,000 messages, which contributed heavily to a 2.6 TB django_channels_postgres_message table. Filter the lookup on expires >= now(), passing now() as a query parameter like the receive path does. Expired memberships are already treated as gone elsewhere (clean_expired_models deletes them), so only dead channels are skipped. The existing (group_key, expires) index covers the query. This depends on #27136, which refreshes outpost group membership expiry on every hello. Any backport to a version branch must include #27136 as well; without it, outposts connected for longer than group_expiry (24 hours) would stop receiving broadcasts.
BeryJu
pushed a commit
that referenced
this pull request
Nov 10, 2026
…ion-2026.8) (#27737) outposts: refresh channel groups on hello (#27136) Co-authored-by: KetchupZ <[email protected]> Co-authored-by: Dewi Roberts <[email protected]>
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.
Details
What does this PR change?
HELLO.group_addoperation to refresh an existing membership expiry and insert only when the membership does not exist.HELLO, and verifies that the memberships and instance-group delivery recover without duplicate rows.Why is this change needed?
Channel group memberships expire 24 hours after
group_add, but an outpost can keep the same websocket open beyond that point. Once cleanup removes the membership rows, the websocket still appears healthy while server-to-outpost messages are silently dropped. RAC sessions can then hang until the outpost reconnects.Refreshing on the periodic
HELLOkeeps membership lifetime aligned with the live connection. Updating an existing row avoids accumulating a new row for every heartbeat.group_addis changed in the shared layer rather than only in the outpost consumer: re-adding on everyHELLO(about every 10 s) would otherwise insert a new row each time, roughly 17,000 rows per outpost per day.How was this tested?
python manage.py test authentik/outposts --keepdb --noinput(28 passed)git diff --checkLinked issues
Closes #27101
AI assistance disclosure
I used Opus 5.5 and gpt 5.6 sol (high) as a learning and development assistant while studying the authentik codebase. During that work, I found this existing issue, reproduced the reported behavior, traced the root cause, implemented the fix, and added the regression test with its assistance. I personally reviewed the final diff and verification results, understand the changes, and take responsibility for the submitted code.
Checklist
make all)make docs)The first two items are not checked because this focused backend change was validated with the commands listed above rather than the full polyglot
make all, and it does not change documentation.