Skip to content

sources/sync: configuration for outgoing sync trigger mode#17669

Merged
melizeche merged 12 commits intomainfrom
outgoing-sync-trigger-from-incoming-sync
Dec 10, 2025
Merged

sources/sync: configuration for outgoing sync trigger mode#17669
melizeche merged 12 commits intomainfrom
outgoing-sync-trigger-from-incoming-sync

Conversation

@rissson
Copy link
Member

@rissson rissson commented Oct 23, 2025

Details

Closes #17648


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson self-assigned this Oct 23, 2025
@rissson rissson requested a review from a team as a code owner October 23, 2025 12:55
@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit e27f6a4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/69396d16e1604a000816b38d
😎 Deploy Preview https://deploy-preview-17669--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.

@netlify
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit e27f6a4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/69396d1617ccf60008db0553
😎 Deploy Preview https://deploy-preview-17669--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
Copy link

netlify bot commented Oct 23, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit e27f6a4
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/69396d16c733d00008075bd8
😎 Deploy Preview https://deploy-preview-17669--authentik-docs.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.

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 88.13559% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.20%. Comparing base (cd09bff) to head (e27f6a4).
⚠️ Report is 13 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/lib/sync/outgoing/models.py 33.33% 2 Missing ⚠️
authentik/sources/kerberos/tasks.py 83.33% 2 Missing ⚠️
authentik/sources/ldap/tasks.py 83.33% 2 Missing ⚠️
authentik/lib/sync/outgoing/signals.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17669      +/-   ##
==========================================
+ Coverage   93.15%   93.20%   +0.04%     
==========================================
  Files         944      945       +1     
  Lines       51664    51715      +51     
==========================================
+ Hits        48130    48201      +71     
+ Misses       3534     3514      -20     
Flag Coverage Δ
e2e 44.79% <55.93%> (+0.34%) ⬆️
integration 23.32% <52.54%> (+0.02%) ⬆️
unit 91.43% <88.13%> (-0.01%) ⬇️
unit-migrate 91.48% <88.13%> (-0.01%) ⬇️

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

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

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson moved this from In Progress to Needs review in authentik Core Nov 12, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2025

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-e27f6a43106ee95b1df7f701d84174a2671cd236
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-e27f6a43106ee95b1df7f701d84174a2671cd236

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

Copy link
Contributor

@kensternberg-authentik kensternberg-authentik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Having to use a function to pass options in should be optional, but I think that's on us (frontend), not Risson.

import { customElement } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";

function createSyncOutgoingTriggerModeOptions(): RadioOption<SyncOutgoingTriggerModeEnum>[] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This is a static array. Why is it a function? If it has to be a function for API purposes, wrap it separately.

@rissson rissson requested a review from GirlBossRush December 9, 2025 16:25
@rissson rissson enabled auto-merge (squash) December 9, 2025 17:05
@rissson rissson disabled auto-merge December 9, 2025 17:05
@rissson rissson enabled auto-merge (squash) December 9, 2025 17:05
@rissson rissson disabled auto-merge December 9, 2025 17:40
if source.sync_outgoing_trigger_mode == SyncOutgoingTriggerMode.IMMEDIATE:
count = sync_inst.sync(page)
else:
with sync_outgoing_inhibit_dispatch():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with sync_outgoing_inhibit_dispatch():
with sync_outgoing_respect_inhibit_dispatch(source):

Kinda on the fence imo, we could just pass the source into the context manager and let it decide what to do rather than having the same snippet everywhere

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was that if we ever want to expand that for other places in the code, you can. But we can add an intermediate method for sources only that will look at the source to do so

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although that comes with extra hurdles for the DEFERRED_END case

@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Dec 10, 2025
@melizeche melizeche merged commit 92c5efb into main Dec 10, 2025
97 of 98 checks passed
@melizeche melizeche deleted the outgoing-sync-trigger-from-incoming-sync branch December 10, 2025 15:40
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2025.8.4: loop enqueuing SCIM/Google Workspace/Microsoft Entra sync tasks (not configured)

5 participants