Repository navigation
lib/sync: add Sync base model for storing past sync history - #23184
Conversation
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| for cls in Sync.__subclasses__(): | ||
| amount = cls.cleanup() | ||
| LOGGER.debug("Expired models", model=cls, amount=amount) |
There was a problem hiding this comment.
if we're doing this in here why not inherit from expiringmodel
There was a problem hiding this comment.
How do you handle the count-based expiration with ExpiringModel?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23184 +/- ##
==========================================
- Coverage 93.26% 93.19% -0.08%
==========================================
Files 1035 1036 +1
Lines 60338 60400 +62
Branches 400 400
==========================================
+ Hits 56277 56287 +10
- Misses 4061 4113 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-eea8b441d0c0575e0e9c72359b0aca1775136f3f
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your 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-eea8b441d0c0575e0e9c72359b0aca1775136f3fAfterwards, run the upgrade commands from the latest release notes. |
* main: (591 commits) core: bump dramatiq from 2.1.0 to 2.2.0 (#23381) website: bump semver from 7.8.4 to 7.8.5 in /website (#23299) web/flows: fix untranslated user field labels in identification stage (#23518) tasks/schedules: fix paused schedules getting unpaused on startup (#23521) sources/ldap: avoid re-creating connections to LDAP server (#23520) web: bump the bundler group across 1 directory with 3 updates (#23207) core: bump webauthn from 2.7.1 to 2.8.0 (#23249) lib/sync: add Sync base model for storing past sync history (#23184) web: bump launch-editor from 2.13.2 to 2.14.1 (#23309) web: bump the eslint group across 1 directory with 2 updates (#23239) web: bump uuid from 14.0.0 to 14.0.1 in /web (#23310) lifecycle/aws: bump aws-cdk from 2.1126.0 to 2.1128.0 in /lifecycle/aws (#23377) website: bump the build group across 1 directory with 6 updates (#23406) core: bump coverage[toml] from 7.14.2 to 7.14.3 (#23410) core: bump github.com/jellydator/ttlcache/v3 from 3.4.0 to 3.4.1 (#23405) core: bump gorm.io/gorm from 1.31.1 to 1.31.2 (#23404) ci: bump actions/setup-go from 6.4.0 to 6.5.0 (#23412) core: bump library/node from `f9b8bd6` to `a1d9d67` in /lifecycle/container (#23407) core: bump goauthentik/fips-python from `fe20a68` to `15f00f3` in /lifecycle/container (#23408) core: bump library/node from 26.3.1-trixie to 26.4.0-trixie in /website (#23409) ...
* main: core: bump dramatiq from 2.1.0 to 2.2.0 (#23381) website: bump semver from 7.8.4 to 7.8.5 in /website (#23299) web/flows: fix untranslated user field labels in identification stage (#23518) tasks/schedules: fix paused schedules getting unpaused on startup (#23521) sources/ldap: avoid re-creating connections to LDAP server (#23520) web: bump the bundler group across 1 directory with 3 updates (#23207) core: bump webauthn from 2.7.1 to 2.8.0 (#23249) lib/sync: add Sync base model for storing past sync history (#23184)
Details
What does this PR change?
Extracted from #23126
Add a
Syncmodel (looking for feedback on the name) that can store past sync statuses and related tasks. See the above PR for use case.Currently 20 syncs are kept, but I am also looking for feedback regarding that, especially since we might create Sync objects for partial syncs (in SCIM providers for instance).
Why is this change needed?
Relying on past tasks is flaky and hard to correctly track. A persistent model to store that state is better suited for that task.
How was this tested?
Linked issues
Checklist
make all)make docs)