Skip to content

packages/django-postgres-cache: use upsert instead of select/update in a transaction#17760

Merged
rissson merged 4 commits intomainfrom
cache-upsert
Oct 28, 2025
Merged

packages/django-postgres-cache: use upsert instead of select/update in a transaction#17760
rissson merged 4 commits intomainfrom
cache-upsert

Conversation

@rissson
Copy link
Member

@rissson rissson commented Oct 28, 2025

…n a transaction

Details

should fix the integrity error from #17749

Further improvements can be made in this package, like re-implementing set_many to do it in a single query.


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)

…n a transaction

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson self-assigned this Oct 28, 2025
@rissson rissson requested a review from a team as a code owner October 28, 2025 13:48
@rissson rissson added the backport/version-2025.10 Add this label to PRs to backport changes to version-2025.10 label Oct 28, 2025
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit 6cc1843
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/6900d33fd8e78b0008479be1

@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 6cc1843
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6900d33f52558e00082f873f

@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for authentik-integrations canceled.

Name Link
🔨 Latest commit 6cc1843
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/6900d33fccb46f0008608b8d

@rissson rissson added this to the Release 2025.10.1 milestone Oct 28, 2025
@rissson rissson moved this from Todo to Needs review in authentik Core Oct 28, 2025
@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Oct 28, 2025
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.93%. Comparing base (3408032) to head (6cc1843).
⚠️ Report is 6 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17760      +/-   ##
==========================================
- Coverage   92.98%   92.93%   -0.05%     
==========================================
  Files         869      869              
  Lines       47949    47949              
==========================================
- Hits        44584    44563      -21     
- Misses       3365     3386      +21     
Flag Coverage Δ
e2e 45.19% <ø> (-0.07%) ⬇️
integration 23.18% <ø> (+<0.01%) ⬆️
unit 91.07% <ø> (+<0.01%) ⬆️
unit-migrate 91.12% <ø> (+<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.

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson requested a review from BeryJu October 28, 2025 14:08
@rissson rissson moved this from In Progress to Needs review in authentik Core Oct 28, 2025
@github-project-automation github-project-automation bot moved this from Needs review to In Progress in authentik Core Oct 28, 2025
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson enabled auto-merge (squash) October 28, 2025 14:57
@rissson rissson merged commit 27ceb3c into main Oct 28, 2025
101 of 103 checks passed
@rissson rissson deleted the cache-upsert branch October 28, 2025 15:00
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Oct 28, 2025
authentik-automation bot pushed a commit that referenced this pull request Oct 28, 2025
@authentik-automation
Copy link
Contributor

🍒 Cherry-pick to version-2025.10 created: #17767

@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-6cc1843e8752835cb552eb33555ec22d069f8d15
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-6cc1843e8752835cb552eb33555ec22d069f8d15

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

rissson added a commit that referenced this pull request Oct 28, 2025
…n a transaction (cherry-pick #17760 to version-2025.10) (#17767)

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
kensternberg-authentik added a commit that referenced this pull request Nov 10, 2025
* main: (28 commits)
  ci: use hashes for actions everywhere (#17803)
  website/integrations: fixed paperless-ngx yml syntax issue and added additional info (#17739)
  core, web: update translations (#17782)
  ci: rework internal repo (#17797)
  root: use hashes for dockerfile FROM (#17795)
  web: bump validator from 13.15.15 to 13.15.20 in /packages/prettier-config (#17776)
  tasks: delay startup signals (#17769)
  website: bump the build group in /website with 6 updates (#17712)
  core, web: update translations (#17660)
  web: bump vite from 7.1.11 to 7.1.12 in /web (#17689)
  website: bump validator from 13.15.15 to 13.15.20 in /website (#17741)
  web: bump eslint-plugin-react-hooks from 7.0.0 to 7.0.1 in /packages/eslint-config in the eslint group across 1 directory (#17714)
  web: bump validator from 13.15.15 to 13.15.20 in /packages/eslint-config (#17742)
  packages/django-postgres-cache: use upsert instead of select/update in a transaction (#17760)
  providers/radius: fix panic when no cert is configured (#17762)
  sources/oauth: Make PKCE verifier 128 characters (#17763)
  providers/proxy: fix missing JWT/claims header (#17759)
  providers/proxy: add gorm logging (#17758)
  web: bump the sentry group across 1 directory with 2 updates (#17743)
  root: Add Dockerfile label org.opencontainers.image.source (#17756)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/version-2025.10 Add this label to PRs to backport changes to version-2025.10

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants