docs(identity): record why a new blueprint errors between pull and converge - #406
Merged
Conversation
…nverge Learned deploying #399 and #404, and it applies to every future blueprint rather than just those, so it belongs in the plan and not in a chat thread. The worker re-applies a blueprint the moment the file changes, and git pull is what changes it - so the file is applied against the environment the containers were STARTED with, seconds before deploy.yml recreates them. Any !Env naming a variable added in the same PR resolves to None, and the blueprint sits in error until the converge. That is a normal transient, and somebody who reads the status in that window and reverts a working change has been misled by it. Two corollaries about the status line, both hit the same day. A blueprint only re-applies when the FILE changes, so a converge that touched only compose.yaml leaves a STALE status still showing the old error; touch the file to force it. And a blueprint can read successful while an object still differs from the file, because the role serializer only ever adds permissions. Both are why verification is a Postgres read of the objects. Also records the underlying bug and the check that now prevents it: !Env reads the CONTAINER environment, compose.yaml does not always pass a variable through under its own name, and the test that caught the second instance (LDAP_BASE_DN unguarded, which would silently stop the whole directory syncing). Status line updated: 6e's machinery is deployed and verified on the host, with nothing member-facing moved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation only. Records what deploying #399 and #404 taught, because it applies to every future blueprint and not just those two, and because the failure mode actively misleads whoever sees it.
The transient
The worker re-applies a blueprint the moment the file changes, and
git pullis what changes it. So the file is applied against the environment the containers were started with, seconds beforedeploy.ymlrecreates them. Any!Envnaming a variable added in the same PR resolves toNone, and the blueprint sits inerroruntil the converge.That is normal. Someone who reads the status in that window, panics, and reverts a working change has been misled by a transient. The only meaningful read is after the converge.
Two corollaries about the status line, both hit the same day
compose.yaml, the status is stale and still shows the old error.touchthe file to force a re-apply, then read it. This is what happened deploying fix(identity): pass LOGIN_URL into authentik so the proxy gates can apply #404: the variable was correct in the container and the status still saiderror.successfulwhile an object still differs from the file, because the role serializer only ever adds permissions and never removes them (hit for real in fix(identity): send the welcome mail without a token that could take over an account #395).Both are why verification is a Postgres read of the objects, never the status line.
The underlying bug, and the check that now prevents it
!Envreads the container's environment, andcompose.yamldoes not always pass a variable through under its own name.LOGIN_URLis set asAUTHENTIK_WEB__BASE_URL, so!Env LOGIN_URLresolved toNonewhile every other signal was green.tests/test-authentik-blueprints.shnow checks the whole chain per variable, and the second instance it found (LDAP_BASE_DNunguarded, which would let the entire directory stop syncing with nothing reporting it) is recorded too.Status line
Updated: 6e's machinery is deployed and verified on the host, with nothing member-facing moved. Three proxy providers in
forward_single,media-usersbound to the apex and music and deliberately not to MTG, the embedded outpost'sauthentik_hostnow the public login URL rather than a LAN address, and all three gates still redirecting to the Authelia portal.Gates
tests/run.sh39 suites / 0 failures;check-doc-links.shall links resolve. Rebased onto #403.