Skip to content

website/docs: Add steps for fixing xml python errors, clean up - #16223

Merged
tanberry merged 2 commits into
goauthentik:mainfrom
PeshekDotDev:dev-docs
Aug 26, 2025
Merged

tanberry merged 2 commits into
goauthentik:mainfrom
PeshekDotDev:dev-docs

Conversation

@PeshekDotDev

@PeshekDotDev PeshekDotDev commented Aug 18, 2025 •

Copy link
Copy Markdown
Contributor

Details

There is a bug with the SAML tests i've been able to reproduce across 3 macs. I have found the solution and fixed it across 3 macs as well. I added the steps to fix this into the dev documentation, as if this isn't fixed, when someone runs make all, their tests will never pass.

I did some cleanup as well in the docs while I was in there.

I made a change to the order that make all fires for sanity, tests at the end feels a bit better because failing on gen or web afterwards can feel frustrating


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 review from a team as code owners August 18, 2025 08:58
@netlify

netlify Bot commented Aug 18, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit d181e77
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/68ad3f91f712670008866f85
😎 Deploy Preview https://deploy-preview-16223--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

netlify Bot commented Aug 18, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit d181e77
🔍 Latest deploy log https://app.netlify.com/projects/authentik-storybook/deploys/68ad3f9119869a0008871c82
😎 Deploy Preview https://deploy-preview-16223--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 Aug 18, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit d181e77
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/68ad3f91637e0c000814c698
😎 Deploy Preview https://deploy-preview-16223--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

codecov Bot commented Aug 18, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.73%. Comparing base (197f4c5) to head (d181e77).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16223      +/-   ##
==========================================
- Coverage   92.78%   92.73%   -0.06%     
==========================================
  Files         838      838              
  Lines       45290    45290              
==========================================
- Hits        42023    41999      -24     
- Misses       3267     3291      +24     
Flag Coverage Δ
e2e 46.57% <ø> (+<0.01%) ⬆️
integration 23.47% <ø> (-0.06%) ⬇️
unit 90.93% <ø> (+<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.

## End-to-End (E2E) Setup

To run E2E tests, navigate to the `/tests/e2e` directory in your local copy of the authentik git repo, and start the services by running `docker compose up -d`.
Start the e2e test services with the following command:

@tanberry tanberry Aug 18, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ConzorKingKong I'm a big fan of telling people where they need to be when they run a command, so at first I was wondering why you removed that, but I see it is part of the command itself, so they can run it from wherever, right?

@PeshekDotDev PeshekDotDev Aug 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technically the command has to be ran from the root of the folder that the app is in. But this fits better with how we handle the other docker compose script in the initial steps and all the make commands. Basically every other command is set to run in the root of the project and this change makes this fit that pattern

Don't forget to add `krb5` to your path or else you may run into problems with Kerberos functionality:

```shell
echo 'export PATH="$(brew --prefix krb5)/bin:$PATH"' >> ~/.bashrc

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.

default mac shell is zsh not bash

@PeshekDotDev PeshekDotDev Aug 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I remember having to install zsh on (i think linux) many moons ago, never clicked that its default on mac

Install the required dependencies on macOS using Homebrew:

```shell
xcode-select --install

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.

i dont think we need this for docs only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This installs make. we could say brew install it, but ive never installed make that way

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.

Creates an unneeded dependency on xcode, brew is easier

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.

nvm doesn't look like it, but it's an extra program one needs to install

@PeshekDotDev PeshekDotDev Aug 19, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I mean it's pretty benign overall. If someone runs it and they already have x-code installed, it skips it. and if they dont have it installed, they probably should. but its a long install.

currently we list javascript and make as pre-reqs. however, we add installing node to our scripts on the full dev setup. I added make just because it made the installs bulletproof, but adding pre-reqs to the install scripts kind of breaks the pattern that we usually hold which is "prereqs are pre requirements, install them on your own beforehand".

So I think if I'm removing xcode, I should remove nodejs from the install scripts. or remove them both from the pre-reqs.

To be honest I'm not very strongly held to any option. we can

  1. remove nodejs and make from the prereqs and keep the install scripts
  2. keep nodejs and make in the prereqs and remove them from both docs pages install scripts (meaning docs page has no install scripts)
  3. keep them both in the prereqs and the install to both guarantee the user has the proper things installed and the user has context of what is being installed by it being in the prereqs (currently implemented in the PR)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For now, I removed xcode install from install steps and left everything else as is. The prereqs wording is a minor but notable thing. I'm willing to come to an answer on it or just leave it for another PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you. Having fought with Xcode and all those gems and jewels, yeah, I am not a fan.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Node is a requirement for Docs too, I am pretty sure. I vote for #3 of those choices above, but I would like @GirlBossRush to take a look too please.


## 2. Instructions

### Clone the repo

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.

do we really need headers? it's just codeblocked commands with no text and takes up unneeded space imo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

changed to sentences

make docs
```

Now you can push up your changes and send us a pull request.

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.

I feel like this lacks description compared to the rest. I'd suggest looking at our other guides for reference

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Since macOS includes a default installation of `libxml2`, Python may fail to build `xmlsec` and `lxml` correctly when using the `libxml2` version provided by `libxmlsec1`, unless you update your build flags.

```shell
echo 'export LDFLAGS="-L$(brew --prefix libxml2)/lib $LDFLAGS"' >> ~/.zshrc

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.

also, do we really want to define LDFLAGS on our entire system just for this singular xml thing? Seems like a bad idea

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.

ldflags and the 2 below as well*

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can try and add them manually to the makefile. its a bad idea for the user to not have them set imo. they'll just get stuck using the old version. but we can ignore giving the user instructions and try to update the makefile directly. May need someone like jens to check this pr out now though, I'm not a make expert or anything, could be unintended side effects, but it should be fine

@BeryJu BeryJu 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.

👍 also good idea with adding it to the makefile

Comment thread Makefile Resolved
```shell
sudo apt-get install -y \
build-essential \
nodejs

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.

@tanberry tanberry Aug 20, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

True, @ConzorKingKong since we require v.24, we should make it clear that whatever tool installs Node, it needs to be v 24.

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.

basically

@dominic-r dominic-r 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.

LTGM

@tanberry

Copy link
Copy Markdown
Contributor

Hiya @ConzorKingKong I think the only thing that needs to be done still for this PR is to modify the section that installs node without enforcing v 24. Let me know when that's done and let's get this merged. Thanks!

@PeshekDotDev

Copy link
Copy Markdown
Contributor Author

@tanberry alright, I can do that. The only good way to really do this on linux is to have people install a version manager and install through that. Let me try to make a combination that is straightforward and clean for this

@PeshekDotDev

Copy link
Copy Markdown
Contributor Author

I asked them to download the latest version from the nodejs website and linked to it


## Prerequisites

- [Node.js](https://nodejs.org/en) (24 or later)

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.

Suggested change
- [Node.js](https://nodejs.org/en) (24 or later)
- [Node.js v24](https://nodejs.org/en)

First of all 24 is the latest, but also with all the javascript world changes and compatibility/reqs it's best to pin to a specific major version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The version "24 or later" was written like that because it was written that way in the full development environment and frontend development environment pages. If we change this, then we have to update those locations and all of our other prereqs to change their version location. For now, I'd like to focus on getting this PR in for the Makefile changes and then circle back to this later

The frontend development environment page needs some refreshing to match these pages, so we could make a PR later for that page and spruce this up in that PR

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.

sure. if you want

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can come back to it after this is all merged in it's nbd

import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

If you want to only make changes to the documentation, you only need Node.js.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does one also need Make, as the current docs say? @ConzorKingKong

@tanberry tanberry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's merge it @ConzorKingKong !

@tanberry
tanberry merged commit a8ecc9b into goauthentik:main Aug 26, 2025
kensternberg-authentik added a commit that referenced this pull request Aug 26, 2025
* main:
  web: Automatic reload during server start up. (#16030)
  website/docs: Add steps for fixing xml python errors, clean up (#16223)
@PeshekDotDev
PeshekDotDev deleted the dev-docs branch October 24, 2025 04:49
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.

4 participants