Skip to content

Commit

Permalink
Merge pull request #5170 from opsmill/pog-store-coreprofile-in-db
Browse files Browse the repository at this point in the history
Add CoreProfile to database
  • Loading branch information
ogenstad authored Dec 10, 2024
2 parents 46d3a18 + 9418095 commit e19331e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions backend/infrahub/core/schema/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions changelog/+f91354a0.fixed.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit e19331e

Please sign in to comment.