From 94180950241cf7f45a78a673dfb13fbffa298335 Mon Sep 17 00:00:00 2001 From: Patrick Ogenstad Date: Mon, 9 Dec 2024 16:39:03 +0100 Subject: [PATCH] Add CoreProfile to database --- backend/infrahub/core/schema/manager.py | 5 ----- changelog/+f91354a0.fixed.md | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) create mode 100644 changelog/+f91354a0.fixed.md diff --git a/backend/infrahub/core/schema/manager.py b/backend/infrahub/core/schema/manager.py index abafd790bf..b6e04b024d 100644 --- a/backend/infrahub/core/schema/manager.py +++ b/backend/infrahub/core/schema/manager.py @@ -3,9 +3,6 @@ from typing import TYPE_CHECKING, Any, Optional, Union from infrahub import lock -from infrahub.core.constants import ( - InfrahubKind, -) from infrahub.core.manager import NodeManager from infrahub.core.models import ( HashableModelDiff, @@ -234,8 +231,6 @@ async def load_schema_to_db( branch = await registry.get_branch(branch=branch, db=db) for item_kind in schema.node_names + schema.generic_names: - if item_kind == InfrahubKind.PROFILE: - continue if limit and item_kind not in limit: continue item = schema.get(name=item_kind, duplicate=False) diff --git a/changelog/+f91354a0.fixed.md b/changelog/+f91354a0.fixed.md new file mode 100644 index 0000000000..fe84855f4e --- /dev/null +++ b/changelog/+f91354a0.fixed.md @@ -0,0 +1 @@ +Store CoreProfile in database to ensure consistent initial schema hash. Prior to this the schema was reported as being out of sync when starting the application for the first time. This error wouldn't have hade any impact but was confusing. The workaround would be to load a schema or restart the application at least once after first time initialization.