Skip to content

api: replace orjson with msgspec - #23528

Merged
rissson merged 3 commits into
mainfrom
orjson-2-msgspec
Jul 6, 2026
Merged

rissson merged 3 commits into
mainfrom
orjson-2-msgspec

Conversation

@rissson

@rissson rissson commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Details

What does this PR change?

Replace orjson with msgspec as a json encoder and parser

Additional note: this also removes the browser api UI from DRF since msgspec always outputs compact json, and that UI makes it unreadable. Let's instead rely on our browser to render json in a readable manner.

Why is this change needed?

orjson doesn't support free threading

How was this tested?

with existing tests

see https://msgspec.dev/benchmarks#json-serialization for upstream benchmarks

Linked issues


Checklist

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

Signed-off-by: Marc 'risson' Schmitt <[email protected]>
@rissson rissson self-assigned this Jun 29, 2026
@rissson
rissson requested a review from a team as a code owner June 29, 2026 16:28
@netlify

netlify Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 53e1180
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6a46833b3cf6950008c33e5d
😎 Deploy Preview https://deploy-preview-23528--authentik-integrations.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

netlify Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 53e1180
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6a46833b639995000858ea0b
😎 Deploy Preview https://deploy-preview-23528--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.

Comment thread authentik/api/renderers.py Fixed
@netlify

netlify Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

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

Comment thread authentik/api/parsers.py Dismissed
@codecov

codecov Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.23%. Comparing base (56061d4) to head (53e1180).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
authentik/api/renderers.py 85.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23528      +/-   ##
==========================================
+ Coverage   93.21%   93.23%   +0.01%     
==========================================
  Files        1039     1041       +2     
  Lines       60865    60907      +42     
  Branches      424      424              
==========================================
+ Hits        56738    56788      +50     
+ Misses       4127     4119       -8     
Flag Coverage Δ
conformance 36.34% <80.00%> (+0.04%) ⬆️
e2e 41.52% <76.00%> (+0.03%) ⬆️
integration 32.75% <46.00%> (+0.01%) ⬆️
rust 0.00% <ø> (ø)
unit 92.30% <92.00%> (+<0.01%) ⬆️
unit-migrate 92.33% <92.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.

@github-actions

github-actions Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
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-53e1180577de9eb12dded48e406973cb7e32f4b8
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-53e1180577de9eb12dded48e406973cb7e32f4b8

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

…mplicit (fall through) returns'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Jens L. <[email protected]>
@rissson rissson moved this from Todo to Needs review in authentik Core Jun 30, 2026
@github-project-automation github-project-automation Bot moved this from Needs review to In Progress in authentik Core Jul 6, 2026
@rissson
rissson merged commit 56bf9c1 into main Jul 6, 2026
220 of 224 checks passed
@rissson
rissson deleted the orjson-2-msgspec branch July 6, 2026 11:23
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants