Skip to content

Makefile: Fix kerberos tests for brew users#17223

Merged
PeshekDotDev merged 1 commit intomainfrom
fix-kerberos-tests
Nov 19, 2025
Merged

Makefile: Fix kerberos tests for brew users#17223
PeshekDotDev merged 1 commit intomainfrom
fix-kerberos-tests

Conversation

@PeshekDotDev
Copy link
Contributor

Details

We tell people to install krb5 with brew on dev env setup. The output from running brew install krb5 tells people they have to update their path to add krb5 manually. This is very easy to miss, and without it in your path, the tests in authentik/sources/kerberos will hang infinitely.

This PR automatically updates your path to add the brew install of krb5 when the test suite is run via make test or make all


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)

@PeshekDotDev PeshekDotDev requested a review from a team as a code owner October 2, 2025 16:41
@netlify
Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 9856e34
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/690f060f6d2f9100081582d8
😎 Deploy Preview https://deploy-preview-17223--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.

@netlify
Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 9856e34
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/690f060f52145e000836f5a4
😎 Deploy Preview https://deploy-preview-17223--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
Copy link

netlify bot commented Oct 2, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit 9856e34
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/690f060fe077450008709498
😎 Deploy Preview https://deploy-preview-17223--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.

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.97%. Comparing base (ba331a0) to head (9856e34).
⚠️ Report is 147 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17223   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files         869      869           
  Lines       48040    48040           
=======================================
  Hits        44665    44665           
  Misses       3375     3375           
Flag Coverage Δ
e2e 45.26% <ø> (+0.03%) ⬆️
integration 23.19% <ø> (+<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.

Makefile Outdated
Comment on lines +55 to +56
ifdef KRB5_EXISTS
PATH="$(shell brew --prefix krb5)/sbin:$(shell brew --prefix krb5)/bin:$$PATH" uv run coverage run manage.py test --keepdb authentik
Copy link
Member

Choose a reason for hiding this comment

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

I think you could probably just export the changed path and not need to duplicate command

Copy link
Contributor Author

Choose a reason for hiding this comment

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

each physical line in a Makefile recipe is executed in a separate shell instance, so we can't export, but I did find a way to inject the path in that is much cleaner

@PeshekDotDev
Copy link
Contributor Author

@BeryJu I made an additional minor update with this — you can now run make test path/to/tests to run specific folders tests. Let me know what you think of that. make test will still default to running all tests

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

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-9856e3478a55578abfc4b86f2dcc69b687749fac
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-9856e3478a55578abfc4b86f2dcc69b687749fac

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

@PeshekDotDev PeshekDotDev self-assigned this Oct 28, 2025
@PeshekDotDev
Copy link
Contributor Author

Using := causes the variable to be given a value ever time a make command is ran. Using = means the variable only gets a value when it is referenced, meaning that the brew commands no longer run every time a command such as make help is ran

@rissson
Copy link
Member

rissson commented Nov 5, 2025

Some of this won't be necessary anymore after we fix krb5 for Heimdal, as the lib discovery has been improved to find the correct paths on Linux and macos

@PeshekDotDev
Copy link
Contributor Author

Ah glad to hear. What are your thoughts @rissson ? Should we merge this for now and remove it after? or just remove the krb5 parts?

@rissson
Copy link
Member

rissson commented Nov 6, 2025

The kerberos PR should be ready soon, I'll edit this PR once that is merged

@PeshekDotDev
Copy link
Contributor Author

Awesome, much appreciated

@rissson
Copy link
Member

rissson commented Nov 7, 2025

actually no, it won't fix them, we can go ahead with this.

@PeshekDotDev
Copy link
Contributor Author

Do you have time for a review on this @rissson ?

@PeshekDotDev PeshekDotDev changed the title Makefile: Fix kerberos tests on mac Makefile: Fix kerberos tests for brew users Nov 19, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in authentik Core Nov 19, 2025
@PeshekDotDev PeshekDotDev merged commit 64965e3 into main Nov 19, 2025
136 of 138 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in authentik Core Nov 19, 2025
@PeshekDotDev PeshekDotDev deleted the fix-kerberos-tests branch November 19, 2025 17:52
dominic-r pushed a commit that referenced this pull request Nov 20, 2025
Makefile: Fix kerberos tests for brew users

Co-authored-by: connor peshek <connorpeshek@connors-MacBook-Pro.local>
kensternberg-authentik added a commit that referenced this pull request Dec 11, 2025
* main: (55 commits)
  Makefile: Fix kerberos tests for brew users (#17223)
  website/docs: add 2025.8.5 and 2025.10.2 release notes (#18268)
  internal: Automated internal backport: 5000-sidebar.sec.patch to authentik-main (#18266)
  internal: Automated internal backport: 1498-oauth2-cc-user-active.sec.patch to authentik-main (#18265)
  internal: Automated internal backport: 1487-invitation-expiry.sec.patch to authentik-main (#18264)
  core, web: update translations (#18241)
  web: bump ts-pattern from 5.8.0 to 5.9.0 in /web (#18247)
  web: bump the react group across 2 directories with 1 update (#18244)
  web: bump knip from 5.66.2 to 5.70.0 in /web (#18245)
  core: bump library/nginx from `b5b9e01` to `553f64a` in /website (#18253)
  core: bump library/golang from `27e1c92` to `728cbef` (#18252)
  core: bump goauthentik/fips-debian from `65a9f1f` to `55c1514` (#18251)
  web: Bump Vitest, TypeScript config (#18238)
  web: bump js-yaml from 4.1.0 to 4.1.1 in /packages/esbuild-plugin-live-reload (#18237)
  web/i18n: Remove English Locale (#18164)
  web: bump js-yaml from 3.14.1 to 3.14.2 in /packages/docusaurus-config (#18239)
  web/i18n: Clean up locale scripts (#18163)
  stages/prompt: fix choices with labels causing error on submit (#18183)
  web: Patternfly 5 Prep: Part 2 (#18085)
  lifecycle/aws: bump aws-cdk from 2.1031.2 to 2.1032.0 in /lifecycle/aws (#18218)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants