Skip to content

core: only prefetch related objects when required (cherry-pick #9476)#9510

Merged
BeryJu merged 1 commit intoversion-2024.4from
cherry-pick-250ab7-version-2024.4
Apr 29, 2024
Merged

core: only prefetch related objects when required (cherry-pick #9476)#9510
BeryJu merged 1 commit intoversion-2024.4from
cherry-pick-250ab7-version-2024.4

Conversation

@gcp-cherry-pick-bot
Copy link
Contributor

Cherry-picked core: only prefetch related objects when required (#9476)

  • core: only prefetch related objects when required

Signed-off-by: Jens Langhammer jens@goauthentik.io

  • add tests

Signed-off-by: Jens Langhammer jens@goauthentik.io

  • add tests to assert query count

Signed-off-by: Jens Langhammer jens@goauthentik.io

  • "optimize" another query away

Signed-off-by: Jens Langhammer jens@goauthentik.io

  • prefetch parent and roles

Signed-off-by: Jens Langhammer jens@goauthentik.io

  • whops that needs to be pre-fetched

Signed-off-by: Jens Langhammer jens@goauthentik.io


Signed-off-by: Jens Langhammer jens@goauthentik.io

* core: only prefetch related objects when required

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add tests

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* add tests to assert query count

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* "optimize" another query away

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* prefetch parent and roles

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* whops that needs to be pre-fetched

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
@gcp-cherry-pick-bot gcp-cherry-pick-bot bot requested a review from a team as a code owner April 29, 2024 11:00
@netlify
Copy link

netlify bot commented Apr 29, 2024

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 7deca7e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/662f7db9f4dbcf0008cd2777
😎 Deploy Preview https://deploy-preview-9510--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 site configuration.

@codecov
Copy link

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 52.09%. Comparing base (e034f5e) to head (7deca7e).

Files Patch % Lines
authentik/core/tests/test_groups_api.py 0.00% 6 Missing ⚠️
authentik/core/tests/test_users_api.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           version-2024.4    #9510       +/-   ##
===================================================
- Coverage           92.44%   52.09%   -40.35%     
===================================================
  Files                 669      669               
  Lines               32695    32712       +17     
===================================================
- Hits                30224    17042    -13182     
- Misses               2471    15670    +13199     
Flag Coverage Δ
e2e 50.64% <54.54%> (+0.01%) ⬆️
integration 25.99% <4.54%> (-0.02%) ⬇️
unit ?

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.

@BeryJu BeryJu merged commit d0b3cc5 into version-2024.4 Apr 29, 2024
@BeryJu BeryJu deleted the cherry-pick-250ab7-version-2024.4 branch April 29, 2024 11:10
@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-ghcr.io/goauthentik/dev-server:gh-7deca7e2be92b13e53518bad0b18aab8350358f5
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-7deca7e2be92b13e53518bad0b18aab8350358f5-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 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
image:
    repository: ghcr.io/goauthentik/dev-server
    tag: gh-ghcr.io/goauthentik/dev-server:gh-7deca7e2be92b13e53518bad0b18aab8350358f5

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-7deca7e2be92b13e53518bad0b18aab8350358f5-arm64

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant