-
-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api: use custom json renderer for speed #9977
Conversation
✅ Deploy Preview for authentik-docs canceled.
|
✅ Deploy Preview for authentik-storybook canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9977 +/- ##
==========================================
+ Coverage 92.61% 92.62% +0.01%
==========================================
Files 714 714
Lines 35011 35012 +1
==========================================
+ Hits 32426 32431 +5
+ Misses 2585 2581 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ghcr.io/goauthentik/dev-server:gh-b4c8f81bcc46b662408df4ca0335c5a54567d6f7
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s For arm64, use these values: AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ghcr.io/goauthentik/dev-server:gh-b4c8f81bcc46b662408df4ca0335c5a54567d6f7-arm64
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 KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-ghcr.io/goauthentik/dev-server:gh-b4c8f81bcc46b662408df4ca0335c5a54567d6f7 For arm64, use these values: authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-ghcr.io/goauthentik/dev-server:gh-b4c8f81bcc46b662408df4ca0335c5a54567d6f7-arm64 Afterwards, run the upgrade commands from the latest release notes. |
authentik/api/renderers.py
Outdated
""" | ||
Render object to JSON. | ||
|
||
Adaptation of https://github.com/encode/django-rest-framework/blob/master/rest_framework/utils/encoders.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having all the cases in here, couldn't we just call the upstream function except for types that it isn't needed for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, the main issue is that the upstream one returns super().default(obj)
which we may not want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, actually we could
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I tried, I can't get it to work with generators :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can have a look at (or even just use) https://github.com/brianjbuck/drf_orjson_renderer, since they don't seem to need this (also that repo switches the request parser to orjson too which we might as well do too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's weird they don't implement it
4b2d534
to
8021768
Compare
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
8021768
to
8e827cf
Compare
* main: (179 commits) website/integrations: add offline_access scope to DokuWiki (#10208) api: use custom json renderer for speed (#9977) core: bump github.com/sethvargo/go-envconfig from 1.0.3 to 1.1.0 (#10405) core: bump goauthentik.io/api/v3 from 3.2024060.5 to 3.2024060.6 (#10404) web: bump glob from 10.4.2 to 10.4.3 in /web (#10407) web: bump @swc/core from 1.6.7 to 1.6.13 in /web/sfe (#10408) core: bump ruff from 0.5.0 to 0.5.1 (#10390) web: bump @swc/cli from 0.3.14 to 0.4.0 in /web/sfe (#10394) core: bump certifi from 2024.2.2 to 2024.7.4 (#10398) web: bump @swc/core from 1.6.6 to 1.6.7 in /web/sfe (#10395) web: bump @sentry/browser from 8.14.0 to 8.15.0 in /web in the sentry group across 1 directory (#10388) website/integrations: aws: cleanup (#10355) web: bump API Client version (#10389) web/flows: Simplified flow executor (#10296) website/docs: sources: ldap: remove extra example (#10387) website/docs: add new content from old PR #9524 (#10158) stages/authenticator_validate: fix friendly_name being required (#10382) core: bump go api client (#10383) web: bump API Client version (#10381) outposts: make refresh interval configurable (#10138) ...
* main: api: use custom json renderer for speed (#9977) core: bump github.com/sethvargo/go-envconfig from 1.0.3 to 1.1.0 (#10405) core: bump goauthentik.io/api/v3 from 3.2024060.5 to 3.2024060.6 (#10404) web: bump glob from 10.4.2 to 10.4.3 in /web (#10407) web: bump @swc/core from 1.6.7 to 1.6.13 in /web/sfe (#10408) core: bump ruff from 0.5.0 to 0.5.1 (#10390) web: bump @swc/cli from 0.3.14 to 0.4.0 in /web/sfe (#10394) core: bump certifi from 2024.2.2 to 2024.7.4 (#10398) web: bump @swc/core from 1.6.6 to 1.6.7 in /web/sfe (#10395) web: bump @sentry/browser from 8.14.0 to 8.15.0 in /web in the sentry group across 1 directory (#10388)
Details
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 website
)