Skip to content

tasks: add pre_delete for TasksModel to avoid OOM when deleting object with many tasks linked#23664

Merged
rissson merged 1 commit into
mainfrom
tasks-model-pre-delete
Jul 3, 2026
Merged

tasks: add pre_delete for TasksModel to avoid OOM when deleting object with many tasks linked#23664
rissson merged 1 commit into
mainfrom
tasks-model-pre-delete

Conversation

@rissson

@rissson rissson commented Jul 3, 2026

Copy link
Copy Markdown
Member

Details

What does this PR change?

Why is this change needed?

How was this tested?

Linked issues


Checklist

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

…t with many tasks linked

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson self-assigned this Jul 3, 2026
@rissson rissson requested a review from a team as a code owner July 3, 2026 12:38
@rissson rissson moved this from Todo to Needs review in authentik Core Jul 3, 2026
@rissson rissson added the backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 label Jul 3, 2026
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-storybook ready!

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

@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

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

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23664      +/-   ##
==========================================
+ Coverage   93.14%   93.19%   +0.04%     
==========================================
  Files        1039     1039              
  Lines       60860    60868       +8     
  Branches      424      424              
==========================================
+ Hits        56688    56723      +35     
+ Misses       4172     4145      -27     
Flag Coverage Δ
conformance 36.30% <77.77%> (+<0.01%) ⬆️
e2e 41.51% <100.00%> (+0.26%) ⬆️
integration 32.24% <77.77%> (-0.49%) ⬇️
rust 0.00% <ø> (ø)
unit 92.30% <100.00%> (+<0.01%) ⬆️
unit-migrate 92.33% <100.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.

@dewi-tik dewi-tik added this to the Release 2026.5.4 milestone Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 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-16a108723ff07a5c1fa180961677c6e4f6ffc45f
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-16a108723ff07a5c1fa180961677c6e4f6ffc45f

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

@melizeche melizeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. Do you think adding tests for task deletion is worth it here or nah?

@github-project-automation github-project-automation Bot moved this from Needs review to In Progress in authentik Core Jul 3, 2026
@rissson

rissson commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

looks good to me. Do you think adding tests for task deletion is worth it here or nah?

They will be deleted regardless. This is just us doing it a bit earlier to avoid the OOM

@rissson rissson merged commit 2b58939 into main Jul 3, 2026
115 checks passed
@rissson rissson deleted the tasks-model-pre-delete branch July 3, 2026 13:43
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 3, 2026
@authentik-automation

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #23666

rissson added a commit that referenced this pull request Jul 6, 2026
…t with many tasks linked (cherry-pick #23664 to version-2026.5) (#23666)

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants