Repository navigation
packages/django-postgres-cache: rework to use ORM - #17771
Conversation
…n a transaction Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17771 +/- ##
=======================================
Coverage 92.79% 92.79%
=======================================
Files 1005 1005
Lines 57024 57024
Branches 437 437
=======================================
+ Hits 52916 52917 +1
+ Misses 4108 4107 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-2e7c4c9de679b5626a81f2558aee03eddbad19bc
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-2e7c4c9de679b5626a81f2558aee03eddbad19bcAfterwards, run the upgrade commands from the latest release notes. |
| @@ -66,59 +41,34 @@ def _base_set_expiry(self, timeout: float | None) -> datetime: | |||
| exp.replace(microsecond=0) | |||
There was a problem hiding this comment.
afaik replace creates a new datetime, this should be
exp = exp.replace(microsecond=0)
| class DatabaseCache(BaseCache): | ||
| pickle_protocol = pickle.HIGHEST_PROTOCOL | ||
|
|
||
| def _cull(self, *args: Any, **kwargs: Any) -> None: |
There was a problem hiding this comment.
nit: This backend doesn't handle expired entry cleanup but since this is a standalone package, we should document that consumers must implement their own periodic cleanup imho
| @@ -66,59 +41,34 @@ def _base_set_expiry(self, timeout: float | None) -> datetime: | |||
| exp.replace(microsecond=0) | |||
There was a problem hiding this comment.
afaik this returns a new datetime. this should be something like
exp = exp.replace(microsecond=0)
|
|
||
| def delete(self, key: Any, version: int | None = None) -> bool: | ||
| key = self.make_and_validate_key(key, version=version) | ||
| return bool(CacheEntry.objects.filter(cache_key=key).delete()) |
There was a problem hiding this comment.
QuerySet.delete() returns a tuple (count, {label: count}), so bool(...) is always True here.
Needs something like count, _ = ...delete() then return count !=0
* main: translate: Updates for project authentik and language fr_FR (#21285) packages/django-postgres-cache: rework to use ORM (#17771) providers/saml: Fix redirect for saml slo (#21258) core: fix provider not nullable (#21275) website/docs: ad source: add note about ldap signing (#21274) website/api: update API clients doc (#21202) ci: bump taiki-e/install-action from 2.70.2 to 2.70.3 in /.github/actions/setup (#21267) lifecycle/aws: bump aws-cdk from 2.1114.1 to 2.1115.0 in /lifecycle/aws (#21265) core, web: update translations (#21264) packages/ak-lib: init (#21257) website/docs: document group_uuid as a property for group object (#20865) web/flow: extract lifecycle events peripheral to stage management into their own controllers (#20898) core: bump pygments from 2.19.2 to 2.20.0 (#21260) website/docs: add grafana dashboard (#21254)
Details
REPLACE ME
Checklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)