Skip to content

lib/sync/outgoing: only run discover once per provider for outgoing syncs - #23899

Closed
ryanpesek wants to merge 3 commits into
goauthentik:mainfrom
ryanpesek:scim-discover-once
Closed

ryanpesek wants to merge 3 commits into
goauthentik:mainfrom
ryanpesek:scim-discover-once

Conversation

@ryanpesek

Copy link
Copy Markdown
Contributor

Details

Move outgoing provider discovery out of individual page tasks so remote users and groups are each discovered only once per full sync. Manual single-object syncs retain discovery behavior.
This prevents large SCIM/Entra/GWS directories from being enumerated repeatedly for every local sync page.


Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@ryanpesek
ryanpesek requested a review from a team as a code owner July 9, 2026 21:14
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 73214f6
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a500f4023e043000849f144
😎 Deploy Preview https://deploy-preview-23899--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.

@codecov

codecov Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.03%. Comparing base (32fab0d) to head (dcf3e2f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23899      +/-   ##
==========================================
- Coverage   93.23%   93.03%   -0.20%     
==========================================
  Files        1043     1043              
  Lines       60990    61016      +26     
  Branches      424      424              
==========================================
- Hits        56862    56769      -93     
- Misses       4128     4247     +119     
Flag Coverage Δ
conformance 36.30% <3.33%> (-0.02%) ⬇️
e2e 40.94% <3.33%> (-0.59%) ⬇️
integration 32.22% <3.33%> (-0.51%) ⬇️
rust 0.00% <ø> (ø)
unit 92.30% <100.00%> (+<0.01%) ⬆️
unit-migrate 92.33% <100.00%> (-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.

object_type=Group,
)
)
self._discover(provider, User)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should either only sync here or in L189, not in both

@ryanpesek ryanpesek Jul 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I left it at L189 to preserve a manual sync of a single object still doing a discovery first. But it doesn't really make a difference to me if that happens for manual syncs or not

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants