diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index c3b793eb74..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,4 +0,0 @@ -/backend/ @opsmill/backend -/frontend/ @opsmill/frontend -/docs/ @opsmill/customer-success @opsmill/backend @opsmill/frontend -/docker-compose.yml @opsmill/cloud \ No newline at end of file diff --git a/backend/infrahub/core/branch/tasks.py b/backend/infrahub/core/branch/tasks.py index bf77e0b136..354390acf2 100644 --- a/backend/infrahub/core/branch/tasks.py +++ b/backend/infrahub/core/branch/tasks.py @@ -98,7 +98,7 @@ async def rebase_branch(branch: str) -> None: # NOTE there is a bit additional work in order to calculate a proper diff that will # allow us to pull only the part of the schema that has changed, for now the safest option is to pull # Everything - # schema_diff = await merger.has_schema_changes()a + # schema_diff = await merger.has_schema_changes() # TODO Would be good to convert this part to a Prefect Task in order to track it properly updated_schema = await registry.schema.load_schema_from_db( db=service.database, diff --git a/backend/infrahub/workflows/catalogue.py b/backend/infrahub/workflows/catalogue.py index 6423272f66..79e9d8c334 100644 --- a/backend/infrahub/workflows/catalogue.py +++ b/backend/infrahub/workflows/catalogue.py @@ -392,6 +392,9 @@ BRANCH_VALIDATE, COMPUTED_ATTRIBUTE_SETUP, COMPUTED_ATTRIBUTE_SETUP_PYTHON, + DIFF_REFRESH, + DIFF_REFRESH_ALL, + DIFF_UPDATE, GIT_REPOSITORIES_CREATE_BRANCH, GIT_REPOSITORIES_DIFF_NAMES_ONLY, GIT_REPOSITORIES_IMPORT_OBJECTS, diff --git a/backend/tests/helpers/constants.py b/backend/tests/helpers/constants.py index bd9ec136ee..5f61e866db 100644 --- a/backend/tests/helpers/constants.py +++ b/backend/tests/helpers/constants.py @@ -2,7 +2,7 @@ from infrahub_sdk.utils import str_to_bool -INFRAHUB_USE_TEST_CONTAINERS = str_to_bool(os.getenv("INFRAHUB_USE_TEST_CONTAINERS", "false")) +INFRAHUB_USE_TEST_CONTAINERS = str_to_bool(os.getenv("INFRAHUB_USE_TEST_CONTAINERS", "true")) PORT_NATS = 4222 PORT_REDIS = 6379 PORT_CLIENT_RABBITMQ = 5672 diff --git a/backend/tests/helpers/test_app.py b/backend/tests/helpers/test_app.py index 9b25f7c3d8..0b8e25022e 100644 --- a/backend/tests/helpers/test_app.py +++ b/backend/tests/helpers/test_app.py @@ -78,24 +78,20 @@ async def workflow_local(self) -> AsyncGenerator[WorkflowLocalExecution, None]: @pytest.fixture(scope="class") async def register_internal_schema(self, db: InfrahubDatabase, default_branch: Branch) -> SchemaBranch: - print(f"start of register_internal_schema: {id(default_branch)=} and {id(registry.branch["main"])=}") schema = SchemaRoot(**internal_schema) schema_branch = registry.schema.register_schema(schema=schema, branch=default_branch.name) default_branch.update_schema_hash() await default_branch.save(db=db) - print(f"end of register_internal_schema: {id(default_branch)=} and {id(registry.branch["main"])=}") return schema_branch @pytest.fixture(scope="class") async def register_core_schema( self, db: InfrahubDatabase, default_branch: Branch, register_internal_schema: SchemaBranch ) -> SchemaBranch: - print(f"start of register_core_schema: {id(default_branch)=} and {id(registry.branch["main"])=}") schema = SchemaRoot(**core_models) schema_branch = registry.schema.register_schema(schema=schema, branch=default_branch.name) default_branch.update_schema_hash() await default_branch.save(db=db) - print(f"end of register_core_schema: {id(default_branch)=} and {id(registry.branch["main"])=}") return schema_branch @pytest.fixture(scope="class") @@ -139,7 +135,6 @@ async def client( async def initialize_registry( self, db: InfrahubDatabase, register_core_schema: SchemaBranch, bus_simulator: BusSimulator, api_token: str ) -> None: - print(f"start of initialize_registry:{id(registry.branch["main"])=}") admin_account = await create_account( db=db, name="admin", password=config.SETTINGS.initial.admin_password, token_value=api_token ) @@ -147,4 +142,4 @@ async def initialize_registry( await create_super_administrators_group(db=db, role=administrator_role, admin_accounts=[admin_account]) # This call emits a warning related to the fact database index manager has not been initialized. - await initialization(db=db) + await initialization(db=db)aa diff --git a/backend/tests/integration/ipam/base.py b/backend/tests/integration/ipam/base.py index 120b58a87d..9243a178c5 100644 --- a/backend/tests/integration/ipam/base.py +++ b/backend/tests/integration/ipam/base.py @@ -19,7 +19,7 @@ from infrahub.database import InfrahubDatabase -class TestIpamReconcileBase(TestInfrahubApp): +class TestIpam(TestInfrahubApp): @pytest.fixture(scope="class") async def register_ipam_schema( self, initialize_registry, ipam_schema: SchemaRoot, client: InfrahubClient @@ -32,6 +32,8 @@ async def register_ipam_schema( registry.get_branch_from_registry(default_branch_name).update_schema_hash() return schema_branch + +class TestIpamReconcileBase(TestIpam): @pytest.fixture(scope="class") async def initial_dataset( self, diff --git a/backend/tests/integration/ipam/test_ipam_utilization.py b/backend/tests/integration/ipam/test_ipam_utilization.py index 8baf35bd69..7f404e9016 100644 --- a/backend/tests/integration/ipam/test_ipam_utilization.py +++ b/backend/tests/integration/ipam/test_ipam_utilization.py @@ -11,7 +11,7 @@ from infrahub.core.node import Node from infrahub.graphql.initialization import prepare_graphql_params from tests.helpers.graphql import graphql -from tests.helpers.test_app import TestInfrahubApp +from tests.integration.ipam.base import TestIpam if TYPE_CHECKING: from infrahub.core.branch import Branch @@ -56,7 +56,7 @@ }""" -class TestIpamUtilization(TestInfrahubApp): +class TestIpamUtilization(TestIpam): @pytest.fixture(scope="class") async def initial_dataset( self, diff --git a/changelog/+schema-rename-diff.fixed.md b/changelog/+schema-rename-diff.fixed.md deleted file mode 100644 index a8b1423249..0000000000 --- a/changelog/+schema-rename-diff.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fix issue that could cause diff generation to crash if a schema was renamed \ No newline at end of file