Skip to content

lib/sync/outgoing: store sync settings in database#17630

Merged
rissson merged 1 commit intomainfrom
sync-settings-in-db
Oct 22, 2025
Merged

lib/sync/outgoing: store sync settings in database#17630
rissson merged 1 commit intomainfrom
sync-settings-in-db

Conversation

@rissson
Copy link
Member

@rissson rissson commented Oct 21, 2025

Details

REPLACE ME


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 21, 2025
@rissson rissson requested review from a team as code owners October 21, 2025 12:46
@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit eaf8ee7
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/68f780bdbe892c0008062ea9
😎 Deploy Preview https://deploy-preview-17630--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.

@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit eaf8ee7
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/68f780bd68a68e0008aa46df
😎 Deploy Preview https://deploy-preview-17630--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 21, 2025

Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit eaf8ee7
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/68f780bd4349c70008ada526

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.88%. Comparing base (7190a94) to head (eaf8ee7).
⚠️ Report is 19 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17630      +/-   ##
==========================================
- Coverage   92.92%   92.88%   -0.05%     
==========================================
  Files         868      868              
  Lines       47913    47915       +2     
==========================================
- Hits        44525    44506      -19     
- Misses       3388     3409      +21     
Flag Coverage Δ
e2e 45.20% <50.00%> (+<0.01%) ⬆️
integration 23.12% <50.00%> (-0.07%) ⬇️
unit 91.07% <100.00%> (+<0.01%) ⬆️
unit-migrate 91.12% <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 Sentry.
📢 Have feedback on the report? Share it here.

@rissson rissson enabled auto-merge (squash) October 21, 2025 13:05
@github-actions
Copy link
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-eaf8ee78b9856195df5ac7e334bf78a1a596d2d1
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-eaf8ee78b9856195df5ac7e334bf78a1a596d2d1

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

label=${msg("Page timeout")}
input-hint="code"
required
value="${ifDefined(this.instance?.syncPageTimeout ?? "minutes=30")}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value="${ifDefined(this.instance?.syncPageTimeout ?? "minutes=30")}"
value="${this.instance?.syncPageTimeout ?? "minutes=30"}"

@rissson rissson merged commit e593933 into main Oct 22, 2025
138 of 140 checks passed
@rissson rissson deleted the sync-settings-in-db branch October 22, 2025 15:15
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.

These changes are routine. I made a suggestion, though, to make maintenance easier in the future.

</p>
</ak-form-element-horizontal>
</div>
</ak-form-group>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: All three of these blocks are exactly the same (with one caveat: the identity of the object passed in changes, although the API for these two fields is consistent), and are subject to both shotgun revision (having to touch all three if any of these fields change) and last line effect (that caveat means cutting and pasting them, and then editing them, can lead to errors because familiarity with the task can breed neglect).

So:

Create ./admin/providers/common/syncSettingsControls.ts and put:

import { SCIMProvider } from "@goauthentik/api";
import { msg } from "@lit/localize";
import { html } from "lit";
import { ifDefined } from "lit/directives/if-defined.js";
import "#components/ak-number-input";
import "#elements/utils/TimeDeltaHelp";
import "#components/ak-text-input";

// This should work for all of them, since they implement the same API for these two fields. If not,
// come back and we'll pick a more forceful implementation;
type SyncSettings = Pick<SCIMProvider, "syncPageSize" | "syncPageTimeout">;

function syncSettingsControls<T extends SyncSettings>(instance: T | undefined) {
    return html`
        <ak-form-group label="${msg("Sync settings")}">
            <div class="pf-c-form">
                <ak-number-input
                    label=${msg("Page size")}
                    required
                    name="pageSize"
                    value="${instance?.syncPageSize ?? 100}"
                    help=${msg("Controls the number of objects synced in a single task.")}
                ></ak-number-input>
                <ak-text-input
                    name="syncPageTimeout"
                    label=${msg("Page timeout")}
                    input-hint="code"
                    required
                    value="${ifDefined(instance?.syncPageTimeout ?? "minutes=30")}"
                    .bighelp=${html`<p class="pf-c-form__helper-text">
                            ${msg("Timeout for synchronization of a single page.")}
                        </p>
                        <ak-utils-time-delta-help></ak-utils-time-delta-help>`}
                >
                </ak-text-input>
            </div>
        </ak-form-group>
    `;
}

Then you can import this chunk into the three forms and replace all of that toil with:

${syncSettingsControls(this.instance)

... or ...

${syncSettingsControls(provider)}

kensternberg-authentik added a commit that referenced this pull request Nov 10, 2025
* main:
  website: bump the eslint group in /website with 3 updates (#17601)
  web: bump hono from 4.9.12 to 4.10.2 in /web (#17653)
  web: bump @types/node from 24.9.0 to 24.9.1 in /packages/esbuild-plugin-live-reload (#17616)
  core: bump goauthentik.io/api/v3 from 3.2025100.25 to 3.2025120.1 (#17613)
  website: bump @types/node from 24.9.0 to 24.9.1 in /website (#17612)
  web: bump vite from 7.1.10 to 7.1.11 in /web (#17604)
  lib/sync/outgoing: store sync settings in database (#17630)
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.

4 participants