Skip to content

web: Docker versioning compatibility #16139

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rissson
Copy link
Member

@rissson rissson commented Aug 12, 2025

Details

This PR updates the frontend only setup to be compatible with the latest changes to our versioning. This achieved with a combination of more accurate version parsing, and fixing an edge case where the ESBuild's versioned assets can't align with the version embedded in Docker images.

  • Update frontend dev docs to always use latest dev images
  • Update static assets to use query params for cache busting

@rissson rissson self-assigned this Aug 12, 2025
@rissson rissson requested a review from a team as a code owner August 12, 2025 16:53
Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 2d34514
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/689ca8d9320ca300086b0f56
😎 Deploy Preview https://deploy-preview-16139--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.

Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 2d34514
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/689ca8d9614b780008ae5c3c
😎 Deploy Preview https://deploy-preview-16139--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.

@rissson
Copy link
Member Author

rissson commented Aug 12, 2025

/cherry-pick version-2025.6

Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 2d34514
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/689ca8d97c65a20008b04ce9
😎 Deploy Preview https://deploy-preview-16139--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.

Copy link

codecov bot commented Aug 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.81%. Comparing base (4d2d020) to head (2d34514).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16139      +/-   ##
==========================================
- Coverage   92.82%   92.81%   -0.01%     
==========================================
  Files         836      836              
  Lines       45166    45167       +1     
==========================================
- Hits        41926    41923       -3     
- Misses       3240     3244       +4     
Flag Coverage Δ
e2e 46.67% <100.00%> (-0.01%) ⬇️
integration 23.59% <0.00%> (+<0.01%) ⬆️
unit 90.91% <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 Sentry.
📢 Have feedback on the report? Share it here.

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-49590ef1a9f2fa8a4b81f2941143470b1f36ae46
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-49590ef1a9f2fa8a4b81f2941143470b1f36ae46

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

@GirlBossRush GirlBossRush requested review from a team as code owners August 12, 2025 18:19
return static_loader(path.replace("%v", authentik_full_version()))
"""Wrapper around {% static %} tag that appends a version query parameter to the URL"""

return static_loader(path) + "?v=" + authentik_full_version()
Copy link
Contributor

Choose a reason for hiding this comment

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

This change in particular is the crux of it. The value of authentik_full_version within the Docker image isn't accessible from ESBuild, but all we're hoping to achieve here is ensure that static assets have cache busting between version upgrades.

This function might be a good candidate for Django path objects, making it possible to do thing like subresource integrity and CSP nonces

@GirlBossRush GirlBossRush force-pushed the docs-fix-frontend-dev-env-image branch from 0a390fa to 47e5beb Compare August 12, 2025 18:34
@GirlBossRush GirlBossRush changed the title website/docs: update frontend dev docs to always use latest dev images web: Docker versioning compatibility Aug 12, 2025
@GirlBossRush GirlBossRush force-pushed the docs-fix-frontend-dev-env-image branch from 47e5beb to 2d34514 Compare August 13, 2025 15:01
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.

2 participants