Skip to content
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

Blueprint error after migration from 2023.10.4 to 2024.2.1 #8681

Closed
vherrlein opened this issue Feb 25, 2024 · 11 comments
Closed

Blueprint error after migration from 2023.10.4 to 2024.2.1 #8681

vherrlein opened this issue Feb 25, 2024 · 11 comments
Assignees
Labels
bug/confirmed Confirmed bugs bug Something isn't working

Comments

@vherrlein
Copy link
Contributor

vherrlein commented Feb 25, 2024

Describe the bug
Blueprint error after migration from 2023.10.4 to 2024.2.

entry invalid: Serializer errors {'default': [ErrorDetail(string='Only a single brand can be set as default.', code='invalid')]}

To Reproduce
Having a single customized Brand as default before doing the migration.

Expected behavior
Having status Successfull

Screenshots
image

Logs
Log output from the worker pod.

{"domain_url": null, "event": "Task started", "level": "info", "logger": "authentik.root.celery", "pid": 58, "schema_name": "public", "task_id": "2c5e3061-1d0d-4034-b413-c135c4668791", "task_name": "apply_blueprint", "timestamp": "2024-02-25T11:33:09.845399"}

{"domain_url": null, "entry": "BlueprintEntry(model='authentik_brands.brand', state=<BlueprintEntryDesiredState.CREATED: 'created'>, conditions=[], identifiers={'domain': 'authentik-default', 'default': True}, attrs={'flow_authentication': <authentik.blueprints.v1.common.Find object at 0x7fa230783d40>, 'flow_invalidation': <authentik.blueprints.v1.common.Find object at 0x7fa230781010>, 'flow_user_settings': <authentik.blueprints.v1.common.Find object at 0x7fa230783ce0>}, id=None, _state=BlueprintEntryState(instance=None))", "error": "EntryInvalidError(\"Serializer errors {'default': [ErrorDetail(string='Only a single brand can be set as default.', code='invalid')]}\")", "event": "entry invalid: Serializer errors {'default': [ErrorDetail(string='Only a single brand can be set as default.', code='invalid')]}", "level": "warning", "log_level": "warning", "logger": "authentik.blueprints.v1.importer", "pid": 58, "schema_name": "public", "task_id": "task-2c5e30611d0d4034b413c135c4668791", "timestamp": "2024-02-25T11:33:12.446877"}

{"domain_url": null, "event": "Task finished", "level": "info", "logger": "authentik.root.celery", "pid": 58, "schema_name": "public", "state": "SUCCESS", "task_id": "2c5e30611d0d4034b413c135c4668791", "task_name": "apply_blueprint", "timestamp": "2024-02-25T11:33:12.470102"}

Version and Deployment (please complete the following information):

  • authentik version: 2024.2.1
  • Deployment: helm

Additional context
Add any other context about the problem here.

@vherrlein vherrlein added the bug Something isn't working label Feb 25, 2024
@vherrlein
Copy link
Contributor Author

For information, whitin the database table authentik_brands_brand, I have only one record.

image

@vherrlein vherrlein changed the title Blueprint error after migration from 2023.10.4 to 2024.2 Blueprint error after migration from 2023.10.4 to 2024.2.1 Feb 25, 2024
@rlowevoiply
Copy link

Same type of error here:

worker_1 | {"domain_url": null, "entry": "BlueprintEntry(model='authentik_brands.brand', state=<BlueprintEntryDesiredState.CREATED: 'created'>, conditions=[], identifiers={'domain': 'authentik-default', 'default': True}, attrs={'flow_authentication': <authentik.blueprints.v1.common.Find object at 0x7fd05120f200>, 'flow_invalidation': <authentik.blueprints.v1.common.Find object at 0x7fd05120cf80>, 'flow_user_settings': <authentik.blueprints.v1.common.Find object at 0x7fd05120f260>}, id=None, _state=BlueprintEntryState(instance=None))", "error": "EntryInvalidError("Serializer errors {'default': [ErrorDetail(string='Only a single brand can be set as default.', code='invalid')]}")", "event": "entry invalid: Serializer errors {'default': [ErrorDetail(string='Only a single brand can be set as default.', code='invalid')]}", "level": "warning", "log_level": "warning", "logger": "authentik.blueprints.v1.importer", "pid": 41748, "schema_name": "public", "task_id": "task-52aa6d281fa142a1820ade6296925445", "timestamp": "2024-02-24T08:07:36.606899"}

@japtain-cack
Copy link

I am also seeing this. I ran the sql mentioned by @vherrlein and I only have one brand as well.

@japtain-cack
Copy link

Actually, I just fixed mine. If you go to your brand and disable it as the default brand, save, then refresh. A new default authentic brand appears. Then you can disable it as the default and re-enable your custom brand as the default.

@vherrlein
Copy link
Contributor Author

Unfortunately it doesn’t work for me

@teambvd
Copy link

teambvd commented Feb 29, 2024

@vherrlein after disabling your custom brand as default, you'll need to ensure the task is re-ran as the next step. Head to System Tasks (under Dashboard), then click the Restart Task action button (that's the help popup text that appears when you hover over it) next to the errored blueprint task. Give it a couple seconds, then refresh the page. You should then see all tasks showing as successful.

Once done there, just navigate back to the Brands page, toggle default for the newly created authentik-default brand, and re-enable / re-toggle your custom brand.

@vherrlein
Copy link
Contributor Author

@teambvd it worked like a charm.
Thank you very much.

@teambvd
Copy link

teambvd commented Feb 29, 2024

@vherrlein glad to hear it, and happy to help!

Hopefully @rissson (or other) can pin this issue or something - I imagine pretty much anyone who's done anything to customize the look and feel of their install is going to see this (however many hundreds/thousands mightve watched the branding walkthrough someone did on YT a year or more back for example lol)

@rissson rissson pinned this issue Feb 29, 2024
@iRaven4522
Copy link

iRaven4522 commented Mar 11, 2024

image
I get the same thing, except with a "This field must be unique" error. Doing the above toggling of the default brand and restarting the task hasn't done anything so far.

@BeryJu
Copy link
Member

BeryJu commented Mar 15, 2024

This shouldn't really be related to the upgrade and more related to the brand blueprint running. We'll change the default brand blueprint to only attempt to set default when no other brand exists (https://github.com/goauthentik/authentik/blob/main/blueprints/default/default-brand.yaml#L29)

@BeryJu BeryJu self-assigned this Mar 15, 2024
@BeryJu BeryJu added the bug/confirmed Confirmed bugs label Mar 15, 2024
@BeryJu
Copy link
Member

BeryJu commented Apr 13, 2024

fixed by #9222

@BeryJu BeryJu closed this as completed Apr 13, 2024
@BeryJu BeryJu unpinned this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed Confirmed bugs bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants