diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 671bcfa913..2482cc49d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,15 +270,15 @@ jobs: with: flag-name: backend-unit parallel: true - - name: Generate tracing spans - if: always() && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' - uses: inception-health/otel-upload-test-artifact-action@v1 - with: - jobName: "backend-tests-unit" - stepName: "Unit Tests" - path: "pytest-junit.xml" - type: "junit" - githubToken: ${{ secrets.GH_TRACING_REPO_TOKEN }} + # - name: Generate tracing spans + # if: always() && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' + # uses: inception-health/otel-upload-test-artifact-action@v1 + # with: + # jobName: "backend-tests-unit" + # stepName: "Unit Tests" + # path: "pytest-junit.xml" + # type: "junit" + # githubToken: ${{ secrets.GH_TRACING_REPO_TOKEN }} backend-tests-integration: if: | @@ -797,15 +797,15 @@ jobs: - name: Run Playwright tests run: npm run ci:test:e2e - - name: Generate tracing spans - if: always() && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' - uses: inception-health/otel-upload-test-artifact-action@v1 - with: - jobName: "E2E-testing-playwright" - stepName: "Run Playwright tests" - path: "frontend/app/playwright-junit.xml" - type: "junit" - githubToken: ${{ secrets.GH_TRACING_REPO_TOKEN }} + # - name: Generate tracing spans + # if: always() && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' + # uses: inception-health/otel-upload-test-artifact-action@v1 + # with: + # jobName: "E2E-testing-playwright" + # stepName: "Run Playwright tests" + # path: "frontend/app/playwright-junit.xml" + # type: "junit" + # githubToken: ${{ secrets.GH_TRACING_REPO_TOKEN }} - name: playwright-report if: always() diff --git a/CHANGELOG.md b/CHANGELOG.md index 929e51ea60..b41806bfd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,37 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang +## [Infrahub - v1.1.6](https://github.com/opsmill/infrahub/tree/infrahub-v1.1.6) - 2025-01-30 + +### Artifact improvements + +As part of our ongoing efforts to enhance the integrations and capabilities of Infrahub, the Artifact detail page has been redesigned. + +This redesign focused on allowing a richer and more powerful Artifact experience. +Enhancements include support for additional content-types (as listed below), colorized syntax highlighting, and easier access to download or copy artifacts. + +**Supported Artifact Content Types**: + +- Markdown +- YAML +- JSON +- Text +- SVG + +### Added + +- Allow Default Address Type quick selection in the Resource Manager form ([#3489](https://github.com/opsmill/infrahub/issues/3489)) +- Added code viewer for new content-types, preview of raw markdown content, one-click file download or cop, and redesign of artifact details view ([#5452](https://github.com/opsmill/infrahub/issues/5452)) + +### Fixed + +- Automatically mark hierarchical nodes `parent` relationship as optional if the parent is of the same kind or mandatory if the parent is of a different kind ([#3682](https://github.com/opsmill/infrahub/issues/3682)) +- Revert back to `state=open` from `state=merging` if the merge of a proposed change fails. + This fixes the possibility of leaving a proposed change in an unexpected state. ([#5563](https://github.com/opsmill/infrahub/issues/5563)) +- Fixes an issue with retrieving object from S3 storage backend. ([#5573](https://github.com/opsmill/infrahub/issues/5573)) +- Loosened requirement for group discovery using OIDC and id_token. This will probably be reverted or presented as a configuration option in the future. ([#5623](https://github.com/opsmill/infrahub/issues/5623)) +- Significant improvements to diff calculation performance. + ## [Infrahub - v1.1.5](https://github.com/opsmill/infrahub/tree/infrahub-v1.1.5) - 2025-01-24 ### Added diff --git a/backend/infrahub/api/oidc.py b/backend/infrahub/api/oidc.py index 338b9c45ce..e8f8a11399 100644 --- a/backend/infrahub/api/oidc.py +++ b/backend/infrahub/api/oidc.py @@ -210,6 +210,7 @@ async def _get_id_token_groups( algorithms=oidc_config.id_token_signing_alg_values_supported, audience=client_id, issuer=str(oidc_config.issuer), + options={"verify_signature": False, "verify_aud": False, "verify_iss": False}, ) return decoded_token.get("groups", []) diff --git a/backend/infrahub/core/diff/model/path.py b/backend/infrahub/core/diff/model/path.py index 7aae586060..3dbb94c63e 100644 --- a/backend/infrahub/core/diff/model/path.py +++ b/backend/infrahub/core/diff/model/path.py @@ -739,6 +739,10 @@ def root_id(self) -> str: def node_id(self) -> str: return str(self.node_node.get("uuid")) + @property + def node_db_id(self) -> str: + return self.node_node.element_id + @property def node_kind(self) -> str: return str(self.node_node.get("kind")) diff --git a/backend/infrahub/core/diff/query_parser.py b/backend/infrahub/core/diff/query_parser.py index 7d4b597785..184968f6e4 100644 --- a/backend/infrahub/core/diff/query_parser.py +++ b/backend/infrahub/core/diff/query_parser.py @@ -397,6 +397,9 @@ class DiffNodeIntermediate(TrackedStatusUpdates): force_action: DiffAction | None uuid: str kind: str + db_id: str + from_time: Timestamp + status: RelationshipStatus attributes_by_name: dict[str, DiffAttributeIntermediate] = field(default_factory=dict) relationships_by_name: dict[str, DiffRelationshipIntermediate] = field(default_factory=dict) @@ -567,11 +570,27 @@ def _get_diff_node(self, database_path: DatabasePath, diff_root: DiffRootInterme diff_root.nodes_by_id[node_id] = DiffNodeIntermediate( uuid=node_id, kind=database_path.node_kind, + db_id=database_path.node_db_id, + from_time=database_path.node_changed_at, + status=database_path.node_status, force_action=DiffAction.UPDATED if database_path.node_branch_support is BranchSupportType.AGNOSTIC else None, ) diff_node = diff_root.nodes_by_id[node_id] + # special handling for nodes that have their kind updated, which results in 2 nodes with the same uuid + if diff_node.db_id != database_path.node_db_id and ( + database_path.node_changed_at > diff_node.from_time + or ( + database_path.node_changed_at >= diff_node.from_time + and (diff_node.status, database_path.node_status) + == (RelationshipStatus.DELETED, RelationshipStatus.ACTIVE) + ) + ): + diff_node.kind = database_path.node_kind + diff_node.db_id = database_path.node_db_id + diff_node.from_time = database_path.node_changed_at + diff_node.status = database_path.node_status diff_node.track_database_path(database_path=database_path) return diff_node diff --git a/backend/infrahub/core/query/diff.py b/backend/infrahub/core/query/diff.py index 0c478319d7..f2579324bf 100644 --- a/backend/infrahub/core/query/diff.py +++ b/backend/infrahub/core/query/diff.py @@ -137,6 +137,14 @@ def __init__( r in relationships(latest_base_path) WHERE r.from < $branch_from_time ) + // ------------------------ + // special handling for nodes that had their kind updated, + // the migration leaves two nodes with the same UUID linked to the same Relationship + // ------------------------ + AND ( + n.uuid IS NULL OR base_prop.uuid IS NULL OR n.uuid <> base_prop.uuid + OR type(base_r_node) <> "IS_RELATED" OR type(base_r_prop) <> "IS_RELATED" + ) WITH latest_base_path, base_r_root, base_r_node, base_r_prop ORDER BY base_r_prop.from DESC, base_r_node.from DESC, base_r_root.from DESC LIMIT 1 @@ -175,8 +183,13 @@ def __init__( OR peer_r_node.to IS NULL OR peer_r_node.to >= r_peer.from ) + // ------------------------ + // special handling for nodes that had their kind updated, + // the migration leaves two nodes with the same UUID linked to the same Relationship + // ------------------------ + AND (n.uuid IS NULL OR peer.uuid IS NULL OR n.uuid <> peer.uuid) WITH peer_path, r_peer, r_prop - ORDER BY r_peer.branch = r_prop.branch DESC, r_peer.from DESC + ORDER BY r_peer.branch = r_prop.branch DESC, r_peer.from DESC, r_peer.status ASC LIMIT 1 RETURN peer_path } @@ -309,6 +322,14 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: AND [%(id_func)s(p), type(r_node)] <> [%(id_func)s(prop), type(r_prop)] AND top_diff_rel.status = r_node.status AND top_diff_rel.status = r_prop.status + // ------------------------ + // special handling for nodes that had their kind updated, + // the migration leaves two nodes with the same UUID linked to the same Relationship + // ------------------------ + AND ( + p.uuid IS NULL OR prop.uuid IS NULL OR p.uuid <> prop.uuid + OR type(r_node) <> "IS_RELATED" OR type(r_prop) <> "IS_RELATED" + ) WITH path, p, node, prop, r_prop, r_node, type(r_node) AS rel_type, row_from_time // ------------------------------------- // Exclude attributes/relationships added then removed on branch within timeframe @@ -483,6 +504,14 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: AND [%(id_func)s(p), type(mid_diff_rel)] <> [%(id_func)s(prop), type(r_prop)] // exclude paths where an active edge is below a deleted edge AND (mid_diff_rel.status = "active" OR r_prop.status = "deleted") + // ------------------------ + // special handling for nodes that had their kind updated, + // the migration leaves two nodes with the same UUID linked to the same Relationship + // ------------------------ + AND ( + p.uuid IS NULL OR prop.uuid IS NULL OR p.uuid <> prop.uuid + OR type(mid_diff_rel) <> "IS_RELATED" OR type(r_prop) <> "IS_RELATED" + ) WITH path, prop, r_prop, mid_r_root ORDER BY type(r_prop), @@ -493,7 +522,7 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: RETURN latest_prop_path } // ------------------------------------- -// Exclude properties within the timeframe +// Exclude properties added and deleted within the timeframe // ------------------------------------- WITH q, nodes(latest_prop_path)[3] AS prop, type(relationships(latest_prop_path)[2]) AS rel_type, latest_prop_path, has_more_data, row_from_time CALL { @@ -594,6 +623,14 @@ async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: ) ) ) +// ------------------------ +// special handling for nodes that had their kind updated, +// the migration leaves two nodes with the same UUID linked to the same Relationship +// ------------------------ +AND ( + n.uuid IS NULL OR q.uuid IS NULL OR n.uuid <> q.uuid + OR type(r_node) <> "IS_RELATED" OR type(diff_rel) <> "IS_RELATED" +) AND ALL( r_pair IN [[r_root, r_node], [r_node, diff_rel]] // filter out paths where a base branch edge follows a branch edge diff --git a/backend/tests/unit/api/test_oidc.py b/backend/tests/unit/api/test_oidc.py index 65a4eac409..810be0b29b 100644 --- a/backend/tests/unit/api/test_oidc.py +++ b/backend/tests/unit/api/test_oidc.py @@ -1,6 +1,7 @@ import json import time import uuid +from copy import deepcopy from typing import Any import httpx @@ -40,6 +41,36 @@ async def test_get_id_token_groups_for_oidc() -> None: assert groups == ["operators"] +async def test_get_id_token_groups_for_oidc_invalid_issuer() -> None: + memory_http = MemoryHTTP() + service = InfrahubServices(http=memory_http) + client_id = "testing-oicd-1234" + + helper = OIDCTestHelper() + token_response = helper.generate_token_response( + username="testuser", + groups=["operators"], + client_id=client_id, + issuer=str(OIDC_CONFIG.issuer), + ) + + memory_http.add_get_response( + url=str(OIDC_CONFIG.jwks_uri), + response=httpx.Response(status_code=200, content=json.dumps(helper.jwks_payload)), + ) + config = deepcopy(OIDC_CONFIG) + config.issuer = Url("https://something-incorrect.example.com") + + groups = await _get_id_token_groups( + oidc_config=config, + service=service, + payload=token_response, + client_id=client_id, + ) + + assert groups == ["operators"] + + async def test_get_id_token_groups_for_oidc_no_id_token() -> None: memory_http = MemoryHTTP() service = InfrahubServices(http=memory_http) diff --git a/backend/tests/unit/core/diff/test_diff_calculator.py b/backend/tests/unit/core/diff/test_diff_calculator.py index aaa8dc1866..95df40d45c 100644 --- a/backend/tests/unit/core/diff/test_diff_calculator.py +++ b/backend/tests/unit/core/diff/test_diff_calculator.py @@ -3,12 +3,14 @@ from infrahub import config from infrahub.core import registry from infrahub.core.branch import Branch -from infrahub.core.constants import DiffAction, InfrahubKind, RelationshipCardinality +from infrahub.core.constants import DiffAction, InfrahubKind, RelationshipCardinality, SchemaPathType from infrahub.core.constants.database import DatabaseEdgeType from infrahub.core.diff.calculator import DiffCalculator from infrahub.core.initialization import create_branch from infrahub.core.manager import NodeManager +from infrahub.core.migrations.schema.node_kind_update import NodeKindUpdateMigration from infrahub.core.node import Node +from infrahub.core.path import SchemaPath from infrahub.core.schema.schema_branch import SchemaBranch from infrahub.core.timestamp import Timestamp from infrahub.database import InfrahubDatabase @@ -1308,7 +1310,6 @@ async def test_relationship_property_owner_conflicting_updates( # check branch branch_root_path = calculated_diffs.diff_branch_diff assert branch_root_path.branch == branch.name - assert len(branch_root_path.nodes) == 2 nodes_by_id = {n.uuid: n for n in branch_root_path.nodes} assert set(nodes_by_id.keys()) == {person_john_main.get_id(), car_accord_main.get_id()} # john node on branch @@ -3077,3 +3078,72 @@ async def test_diff_relationship_property_update_on_main( assert diff_rel.name == "owner" assert diff_rel.action is DiffAction.UPDATED assert {elem.action for elem in diff_rel.relationships} == {DiffAction.ADDED, DiffAction.REMOVED} + + +async def test_calculate_with_migrated_kind_node( + db: InfrahubDatabase, default_branch: Branch, car_accord_main, car_camry_main, person_john_main, person_jane_main +): + """Test that the diff can correctly handle a schema kind migration, which results in 2 nodes with the same UUID""" + branch = await create_branch(db=db, branch_name="branch") + branch_car = await Node.init(db=db, schema="TestCar", branch=branch) + await branch_car.new(db=db, name="nova", nbr_seats=2, is_electric=False, owner=person_jane_main.id) + await branch_car.save(db=db) + schema = registry.schema.get_schema_branch(name=default_branch.name) + car_schema = schema.get(name="TestCar") + car_schema.name = "NewCar" + car_schema.namespace = "Test2" + assert car_schema.kind == "Test2NewCar" + owner_rel_schema = car_schema.get_relationship(name="owner") + registry.schema.set(name="Test2NewCar", schema=car_schema, branch=branch.name) + + migration = NodeKindUpdateMigration( + previous_node_schema=schema.get(name="TestCar"), + new_node_schema=car_schema, + schema_path=SchemaPath(path_type=SchemaPathType.ATTRIBUTE, schema_kind="Test2NewCar", field_name="namespace"), + ) + execution_result = await migration.execute(db=db, branch=branch) + assert not execution_result.errors + + diff_calculator = DiffCalculator(db=db) + + calculated_diffs = await diff_calculator.calculate_diff( + base_branch=default_branch, + diff_branch=branch, + from_time=Timestamp(branch.get_branched_from()), + to_time=Timestamp(), + previous_node_specifiers={ + car_accord_main.id: {owner_rel_schema.get_identifier()}, + car_camry_main.id: {owner_rel_schema.get_identifier()}, + }, + include_unchanged=True, + ) + + branch_diff = calculated_diffs.diff_branch_diff + assert len(branch_diff.nodes) == 2 + nodes_by_id = {n.uuid: n for n in branch_diff.nodes} + assert set(nodes_by_id.keys()) == {branch_car.id, person_jane_main.id} + # validate relationship on person is correct + jane_diff = nodes_by_id[person_jane_main.id] + assert jane_diff.action is DiffAction.UPDATED + assert len(jane_diff.attributes) == 0 + rels_by_name = {r.name: r for r in jane_diff.relationships} + assert set(rels_by_name.keys()) == {"cars"} + cars_rel_diff = rels_by_name["cars"] + assert cars_rel_diff.action is DiffAction.UPDATED + elements_by_peer_id = {e.peer_id: e for e in cars_rel_diff.relationships} + assert set(elements_by_peer_id) == {branch_car.id} + element_diff = elements_by_peer_id[branch_car.id] + assert element_diff.action is DiffAction.ADDED + props_by_type = {p.property_type: p for p in element_diff.properties} + for property_type, value in ( + (DatabaseEdgeType.IS_RELATED, branch_car.id), + (DatabaseEdgeType.IS_VISIBLE, True), + (DatabaseEdgeType.IS_PROTECTED, False), + ): + property_diff = props_by_type[property_type] + assert property_diff.action is DiffAction.ADDED + assert property_diff.new_value == value + assert property_diff.previous_value is None + + base_diff = calculated_diffs.base_branch_diff + assert len(base_diff.nodes) == 0 diff --git a/changelog/+diff-perf.fixed.md b/changelog/+diff-perf.fixed.md deleted file mode 100644 index ea9a3b5b0c..0000000000 --- a/changelog/+diff-perf.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Significant improvements to diff calculation performance \ No newline at end of file diff --git a/changelog/3489.added.md b/changelog/3489.added.md deleted file mode 100644 index 62a1aeb3c5..0000000000 --- a/changelog/3489.added.md +++ /dev/null @@ -1 +0,0 @@ -Allow Default Address Type quick selection in the Resource Manager form \ No newline at end of file diff --git a/changelog/3682.fixed.md b/changelog/3682.fixed.md deleted file mode 100644 index e4e57d996c..0000000000 --- a/changelog/3682.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Automatically mark hierarchical nodes `parent` relationship as optional if the parent is of the same kind or mandatory if the parent is of a different kind \ No newline at end of file diff --git a/changelog/5452.added.md b/changelog/5452.added.md deleted file mode 100644 index 4a4fac0e2d..0000000000 --- a/changelog/5452.added.md +++ /dev/null @@ -1 +0,0 @@ -Add code viewer for new content-types, preview the raw markdown content, allow file download + copy and redesign artifact details view \ No newline at end of file diff --git a/changelog/5563.fixed.md b/changelog/5563.fixed.md deleted file mode 100644 index 19185ddf79..0000000000 --- a/changelog/5563.fixed.md +++ /dev/null @@ -1,3 +0,0 @@ -Revert back to state=open from state=merging if the merge of a proposed change fails - -Fixes #5563 diff --git a/changelog/5573.fixed.md b/changelog/5573.fixed.md deleted file mode 100644 index be619bc941..0000000000 --- a/changelog/5573.fixed.md +++ /dev/null @@ -1 +0,0 @@ -Fixes an issue with retrieving object from S3 storage backend diff --git a/docker-compose.yml b/docker-compose.yml index e8d4ce1d06..6fc7253d8d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -205,7 +205,7 @@ services: retries: 5 infrahub-server: - image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.5}" + image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.6}" restart: unless-stopped command: > gunicorn --config backend/infrahub/serve/gunicorn_config.py @@ -251,7 +251,7 @@ services: deploy: mode: replicated replicas: 2 - image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.5}" + image: "${INFRAHUB_DOCKER_IMAGE:-registry.opsmill.io/opsmill/infrahub}:${VERSION:-1.1.6}" command: prefect worker start --type infrahubasync --pool infrahub-worker --with-healthcheck restart: unless-stopped depends_on: diff --git a/docs/docs/faq/faq.mdx b/docs/docs/faq/faq.mdx index 947f86fe0f..05b2ff37bb 100644 --- a/docs/docs/faq/faq.mdx +++ b/docs/docs/faq/faq.mdx @@ -122,8 +122,6 @@ Yes! Infrahub Enterprise is deployed in diverse infrastructure environments with Infrahub is designed to be the source of truth for your infrastructure data and configurations. It does not directly connect to or deploy configurations to your infrastructure devices. Instead, Infrahub integrates with tools like Nornir, Terraform and Ansible, which can be used to deploy the generated configurations to your infrastructure. -Please see the documentation on [integrations](../integrations) for more information. - ### Does Infrahub send telemetry? And how can I disable it? Infrahub collects anonymous usage metrics and sends them to OpsMill servers for analysis and improvement purposes. No personally identifiable information is collected. If you prefer to opt-out of telemetry collection, you can do so by setting the `INFRAHUB_TELEMETRY_OPTOUT` environment variable to `true`: diff --git a/docs/docs/integrations/infrahub-ansible/readme.mdx b/docs/docs/integrations/infrahub-ansible/readme.mdx deleted file mode 100644 index e17cfd7e97..0000000000 --- a/docs/docs/integrations/infrahub-ansible/readme.mdx +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Infrahub Ansible collection ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Infrahub Ansible collection - - -OpsMill maintains the [opsmill.infrahub Ansible Collection](https://galaxy.ansible.com/ui/repo/published/opsmill/infrahub/). - - -Please see the [infrahub-ansible documentation](https://infrahub-ansible.readthedocs.io/en/latest/) for installation and usage details. diff --git a/docs/docs/integrations/nornir-infrahub/readme.mdx b/docs/docs/integrations/nornir-infrahub/readme.mdx deleted file mode 100644 index 5889215060..0000000000 --- a/docs/docs/integrations/nornir-infrahub/readme.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Nornir plugin for Infrahub ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Nornir plugin for Infrahub - - -OpsMill maintains the [nornir-infrahub](https://github.com/opsmill/nornir-infrahub) plugin for Infrahub. Infrahub can be used as an inventory source for Nornir. - \ No newline at end of file diff --git a/docs/docs/integrations/readme.mdx b/docs/docs/integrations/readme.mdx deleted file mode 100644 index 73b9916f59..0000000000 --- a/docs/docs/integrations/readme.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Infrahub integrations ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - -# Infrahub integrations - -OpsMill maintains multiple integrations with other infrastructure systems. In addition, other companies maintain integrations with Infrahub. - -## Integrations - - -### OpsMill Maintained - -- [infrahub-ansible](./infrahub-ansible/) -- [infrahub-sync](./sync/) -- [nornir-infrahub](./nornir-infrahub/) - -### 3rd Party or Community Maintained - -- [IP Fabric Integration](https://ipfabric.io/) -- [NetPicker Integration](https://www.opsmill.com/webinar-recap-bringing-production-validation-into-network-automation-ci-cd/) -- [Slurp'it Integration](https://www.youtube.com/watch?v=oW6o-fZHZ2w&list=PLxv8A8sCq4EDgz_R34_RxwDHFdG5RzkYM) - - \ No newline at end of file diff --git a/docs/docs/integrations/sync/guides/creation.mdx b/docs/docs/integrations/sync/guides/creation.mdx deleted file mode 100644 index 250ac1e76c..0000000000 --- a/docs/docs/integrations/sync/guides/creation.mdx +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: Creating a new sync instance ---- - -# Creating a new sync instance - -This guide will walk you through the steps to create a new sync instance for infrahub-sync, allowing you to synchronize data between your source and destination systems efficiently. - -## Step 1: Define your configuration - -Start by defining your synchronization requirements in a YAML configuration file. - -Here's an example configuration for syncing data from Nautobot to Infrahub: -In this example, consider that `device_type` and `manufacturer` are Attribute of InfraDevice. If you are using another object with a Relationship, you would need to first import those objects and then referenced them (like InfraDevice in InfraInterface) - -```yaml ---- -name: example-sync-task - -source: - name: nautobot - settings: - url: "https://nautobot.example.com" - token: "NAUTOBOT_TOKEN" # This can also be loaded from environment variables - -destination: - name: infrahub - settings: - url: "https://infrahub.example.com" - token: "INFRAHUB_API_TOKEN" # This can also be loaded from environment variables - - -order: - - "InfraDevice" - - "InfraInterface" - -schema_mapping: - - name: InfraDevice - mapping: "dcim.devices" - identifiers: ["name"] - fields: - - name: "name" - mapping: "name" - - name: "device_type" - mapping: "device_type.display_name" - - name: "manufacturer" - mapping: "device_type.manufacturer.name" - - - name: InfraInterface - mapping: "dcim.interfaces" - identifiers: ["device", "name"] - fields: - - name: "name" - mapping: "name" - - name: "interface_type" - static: "10gbe" - - name: "description" - mapping: "description" - - name: "device" - reference: "InfraDevice" -``` - -For more information on customizing your sync configuration and troubleshooting, see the [Sync Instance configuration reference](../reference/config) diff --git a/docs/docs/integrations/sync/guides/custom-certificates.mdx b/docs/docs/integrations/sync/guides/custom-certificates.mdx deleted file mode 100644 index 5dfc0ad365..0000000000 --- a/docs/docs/integrations/sync/guides/custom-certificates.mdx +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: Support adapters with custom CA certificates ---- - -# Support adapters with custom CA certificates - -This guide will walk you through the steps to support adapters with custom CA certificates for infrahub-sync. - -## Step 1: Create a subdirectory for your custom CA certificates - -```shell - -sudo mkdir /usr/local/share/ca-certificates/custom-ca - -``` - -## Step 2: Copy your root CA custom certificate into the folder you just created - -```shell - -cp customRCA.crt /usr/local/share/ca-certificates/custom-ca/ - -``` - -## Step 3: Run the following command to load the certificates on your system trusted root certificate store - -```shell - -sudo update-ca-certificates - -``` - -## Step 4: Use the following command to set `REQUESTS_CA_BUNDLE` environment variable - -```shell - -export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt - -``` diff --git a/docs/docs/integrations/sync/guides/installation.mdx b/docs/docs/integrations/sync/guides/installation.mdx deleted file mode 100644 index 6bc2a420c9..0000000000 --- a/docs/docs/integrations/sync/guides/installation.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Installing Infrahub sync ---- -# Installing Infrahub sync - -Infrahub Sync is available on [PyPI](https://pypi.org/project/infrahub-sync/) and can be installed using the pip package installer. It is recommended to install the Sync into a virtual environment. - -```shell -python3 -m venv .venv -source .venv/bin/activate -pip install infrahub-sync -``` diff --git a/docs/docs/integrations/sync/guides/run.mdx b/docs/docs/integrations/sync/guides/run.mdx deleted file mode 100644 index 07168253c7..0000000000 --- a/docs/docs/integrations/sync/guides/run.mdx +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: Running sync tasks ---- - -# Running sync tasks with Infrahub Sync - -Learn how to use Infrahub Sync's commands to generate sync adapters, calculate differences, and synchronize data between your source and destination systems. - -![Infrahub-Sync process](../../../media/infrahub_sync_process.excalidraw.svg) - - -## Generating sync adapters and models - - -Before you can run a synchronization task, you need to generate the necessary Python code for your sync adapters and models based on your configuration. -To create a new configuration, please refer to the guide [Creating a new Sync Instance](./creation) - -### Command - -```shell -infrahub-sync generate --name --directory -``` - -### Parameters - -- `--name`: The name of the sync project you want to generate code for. -- `--directory`: The directory where your sync configuration files are located. - -This command reads your configuration file and generates Python code for the sync adapters and models required for the synchronization task. - -## Calculating differences - -The `diff` command lets you see the differences between your source and destination before actually performing the synchronization. This is useful for verifying what will be synchronized. - -### Command - -```shell -infrahub-sync diff --name --directory -``` - -### Parameters - -- `--name`: Specifies the sync project for which you want to calculate differences. -- `--directory`: The directory where your sync configuration files are located. - -Running this command will output the differences detected based on the current state of your source and destination systems. - -## Synchronizing data - -Once you're ready to synchronize the data between your source and destination, you can use the `sync` command. - -### Command - -```shell -infrahub-sync sync --name --directory -``` - -### Parameters - -- `--name`: The name of the sync project you wish to run. -- `--directory`: The directory where your sync configuration files are located. - -This command performs the synchronization, applying the changes from the source to the destination based on the differences calculated by the `diff` command. - -### Progress and logging - -The `sync` command also supports additional flags for displaying progress and managing logging: - -- `--show-progress`: Displays a progress bar during synchronization. -- `--diff`: Print the differences between the source and the destination before syncing. - -For example: - -```shell -infrahub-sync sync --name my_project --directory configs --diff --show-progress -``` \ No newline at end of file diff --git a/docs/docs/integrations/sync/readme.mdx b/docs/docs/integrations/sync/readme.mdx deleted file mode 100644 index c0e307d566..0000000000 --- a/docs/docs/integrations/sync/readme.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: Infrahub Sync ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - - -# Infrahub Sync - -Infrahub Sync is a versatile Python package that synchronizes data between a source and a destination system. It builds on the robust capabilities of `diffsync` to offer flexible and efficient data synchronization across different platforms, including Netbox, Nautobot, and Infrahub. This package features a Typer-based CLI for ease of use, supporting operations such as listing available sync projects, generating diffs, and executing sync processes. - -## Guides - -- [Installing Infrahub Sync](./guides/installation) -- [Creating a new sync instance](./guides/creation) -- [Support adapters with custom CA certificates](./guides/custom-certificates) -- [Run a sync instance](./guides/run) - -## Reference - -- [Sync instance configuration](./reference/config) diff --git a/docs/docs/integrations/sync/reference/cli.mdx b/docs/docs/integrations/sync/reference/cli.mdx deleted file mode 100644 index 8bc3c284c1..0000000000 --- a/docs/docs/integrations/sync/reference/cli.mdx +++ /dev/null @@ -1,91 +0,0 @@ -# `infrahub-sync` - -**Usage**: - -```shell -$ infrahub-sync [OPTIONS] COMMAND [ARGS]... -``` - -**Options**: - -* `--install-completion`: Install completion for the current shell. -* `--show-completion`: Show completion for the current shell, to copy it or customize the installation. -* `--help`: Show this message and exit. - -**Commands**: - -* `diff`: Calculate and print the differences... -* `generate`: Generate all the python files for a given... -* `list`: List all available SYNC projects. -* `sync`: Synchronize the data between source and... - -## `infrahub-sync diff` - -Calculate and print the differences between the source and the destination systems for a given project. - -**Usage**: - -```shell -$ infrahub-sync diff [OPTIONS] -``` - -**Options**: - -* `--name TEXT`: Name of the sync to use -* `--config-file TEXT`: File path to the sync configuration YAML file -* `--directory TEXT`: Base directory to search for sync configurations -* `--branch TEXT`: Branch to use for the diff. -* `--show-progress / --no-show-progress`: Show a progress bar during diff [default: show-progress] -* `--help`: Show this message and exit. - -## `infrahub-sync generate` - -Generate all the python files for a given sync based on the configuration. - -**Usage**: - -```shell -$ infrahub-sync generate [OPTIONS] -``` - -**Options**: - -* `--name TEXT`: Name of the sync to use -* `--config-file TEXT`: File path to the sync configuration YAML file -* `--directory TEXT`: Base directory to search for sync configurations -* `--help`: Show this message and exit. - -## `infrahub-sync list` - -List all available SYNC projects. - -**Usage**: - -```shell -$ infrahub-sync list [OPTIONS] -``` - -**Options**: - -* `--directory TEXT`: Base directory to search for sync configurations -* `--help`: Show this message and exit. - -## `infrahub-sync sync` - -Synchronize the data between source and the destination systems for a given project or configuration file. - -**Usage**: - -```shell -$ infrahub-sync sync [OPTIONS] -``` - -**Options**: - -* `--name TEXT`: Name of the sync to use -* `--config-file TEXT`: File path to the sync configuration YAML file -* `--directory TEXT`: Base directory to search for sync configurations -* `--branch TEXT`: Branch to use for the sync. -* `--diff / --no-diff`: Print the differences between the source and the destination before syncing [default: diff] -* `--show-progress / --no-show-progress`: Show a progress bar during syncing [default: show-progress] -* `--help`: Show this message and exit. diff --git a/docs/docs/integrations/sync/reference/config.mdx b/docs/docs/integrations/sync/reference/config.mdx deleted file mode 100644 index c348e79561..0000000000 --- a/docs/docs/integrations/sync/reference/config.mdx +++ /dev/null @@ -1,102 +0,0 @@ ---- -title: Sync configuration file ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Sync instance configuration file - -The configuration file allows you to define the resources needs for the sync. -The file should be formatted as a Yaml file, have the filename `config.yml`. During the generation phase, the Sync adapters, and models will be generated in the same folder. - -The following settings can be defined: - -## Configuration fields - -Describes the overall synchronization configuration. - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| name | string | Unique identifier for the sync instance. | Yes | -| store | SyncStore | Configuration for the optional storage mechanism. | No | -| source | SyncAdapter | Configuration for the source adapter. | Yes | -| destination | SyncAdapter | Configuration for the destination adapter. | Yes | -| order | List of strings | Specifies the order in which objects should be synchronized. | Yes | -| schema_mapping | List of SchemaMappingModel | Defines how data is mapped from source to destination. | Yes | - -### Sync store - -Optional configuration for a storage mechanism used for stateful synchronization. - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| type | string | Type of the store (for example `redis`). | Yes | -| settings | Dictionary | Connection details and other settings for the store. | No | - - -### Source and Destination - -Configuration for source and destination adapters. - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| name | string | Identifier for the adapter. | Yes | -| settings | Dictionary | Adapter-specific settings like `url` and `token`. If not provided, values will be loaded from environment variables. | No | - -### Schema Mapping - -Defines the mappings from source to destination schemas. - -#### Mapping models - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| name | string | Infrahub model name to be mapped. | Yes | -| mapping | string | The source's schema mapping (API) path. | Yes | -| identifiers | List of strings | Fields used to uniquely identify an object. | Yes | -| fields | List of SchemaMappingField | Describes individual field mappings or transformations. | Yes | -| filters | List of SchemaMappingFilter | Filters you want to apply during the sync. | No | -| transforms | List of SchemaMappingTransform | Transforms you want to apply during the sync. | No | - -##### Mapping field - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| name | string | Name of the field. | Yes | -| mapping | string | How the field is mapped from source to destination. | No | -| static | Any | A static value to assign to the field, used if `mapping` is not provided. | No | -| reference | string | Reference to another object in the configuration, used if direct mapping is not applicable. | No | - -##### Mapping filters - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| field | string | Name of the source field to filter on. | Yes | -| operation | string | Which filters will be applied on the field. Available operations are described below. | No | -| value | string | The expected value linked to the operation. | Yes except for both is_empty and is_not_empty operation | - -###### Available filter operations - -| Operation | Description | -| --------- | ----------- | -| `==` | Checks if the field value is equal to the provided value. | -| `!=` | Checks if the field value is not equal to the provided value. | -| `>` | Checks if the field value is greater than the provided value (after converting both to integers if necessary). | -| `<` | Checks if the field value is less than the provided value (after converting both to integers if necessary). | -| `>=` | Checks if the field value is greater than or equal to the provided value (after converting both to integers if necessary). | -| `<=` | Checks if the field value is less than or equal to the provided value (after converting both to integers if necessary). | -| `in` | Checks if the field value is within the provided list or string. | -| `not in` | Checks if the field value is not within the provided list or string. | -| `contains` | Checks if the provided value is contained within the field value. | -| `not contains` | Checks if the provided value is not contained within the field value. | -| `is_empty` | Checks if the field value is `None` or empty. Does not require a `value` argument. | -| `is_not_empty` | Checks if the field value is not `None` and not empty. Does not require a `value` argument. | -| `regex` | Checks if the field value matches the provided regular expression pattern. | -| `is_ip_within` | Checks if the field value (an IP address) is within the provided IP range using `netutils`. | - -##### Mapping transforms - -| Property | Type | Description | Mandatory | -| -------- | ---- | ----------- | --------- | -| field | string | Name of the target field. | Yes | -| expression | string | A Jinja filter compatible expression. | Yes | diff --git a/docs/docs/media/infrahub_sync_process.excalidraw.svg b/docs/docs/media/infrahub_sync_process.excalidraw.svg deleted file mode 100644 index 61ac0cbec9..0000000000 --- a/docs/docs/media/infrahub_sync_process.excalidraw.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - Infrahub SyncSoT & CMDBInfrahubFetchPush14UserWrite config.ymlGeneratepython files23 \ No newline at end of file diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/json_artifact.png b/docs/docs/media/release_notes/infrahub_1_1_6/json_artifact.png new file mode 100644 index 0000000000..5ba89eba30 Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/json_artifact.png differ diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_preview.png b/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_preview.png new file mode 100644 index 0000000000..17e8f67519 Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_preview.png differ diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_raw.png b/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_raw.png new file mode 100644 index 0000000000..4c0641f59d Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/markdown_artifact_raw.png differ diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/svg_artifact.png b/docs/docs/media/release_notes/infrahub_1_1_6/svg_artifact.png new file mode 100644 index 0000000000..fa4b240e0c Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/svg_artifact.png differ diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/text_artifact.png b/docs/docs/media/release_notes/infrahub_1_1_6/text_artifact.png new file mode 100644 index 0000000000..24aaeee801 Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/text_artifact.png differ diff --git a/docs/docs/media/release_notes/infrahub_1_1_6/yaml_artifact.png b/docs/docs/media/release_notes/infrahub_1_1_6/yaml_artifact.png new file mode 100644 index 0000000000..4c93f93af1 Binary files /dev/null and b/docs/docs/media/release_notes/infrahub_1_1_6/yaml_artifact.png differ diff --git a/docs/docs/overview/data.mdx b/docs/docs/overview/data.mdx index cbc7845fb1..bb283ab568 100644 --- a/docs/docs/overview/data.mdx +++ b/docs/docs/overview/data.mdx @@ -9,7 +9,7 @@ title: Data input and sync When a schema has been loaded in to Infrahub, data can be populated or synced through multiple methods: - Via the WebUI: users can add, modify, and delete objects -- Via [infrahub-sync](../integrations/sync/) +- Via [infrahub-sync](https://docs.infrahub.app/sync/sync/) - Via the [Infrahub SDK](../python-sdk/), which simplifies working with the GraphQL API: - One-time imports can done similar to this [python example](https://github.com/opsmill/infrahub-demo-dc-fabric/blob/main/generators/create_basic.py) - Integration with other systems diff --git a/docs/docs/overview/integrations.mdx b/docs/docs/overview/integrations.mdx index 361fbed1cb..1e1d17c49e 100644 --- a/docs/docs/overview/integrations.mdx +++ b/docs/docs/overview/integrations.mdx @@ -11,18 +11,14 @@ These integrations elevate Infrahub's functionality, transforming it into a cent ## Ansible integration -This integration is provided through the `opsmill.infrahub` Ansible Collection. It allows Infrahub to be used as a dynamic inventory source for Ansible, enabling management of infrastructure based on data stored in Infrahub. +This integration is provided through the [`opsmill.infrahub` Ansible Collection](https://docs.infrahub.app/ansible/ansible/). It allows Infrahub to be used as a dynamic inventory source for Ansible, enabling management of infrastructure based on data stored in Infrahub. ## Nornir integration -Nornir is a Python-based automation framework primarily used for network automation. The Infrahub plugin for Nornir enables Infrahub to serve as an inventory source, providing a streamlined solution for managing network devices and configurations. +Nornir is a Python-based automation framework primarily used for network automation. The [Infrahub plugin for Nornir](https://docs.infrahub.app/nornir/nornir/) enables Infrahub to serve as an inventory source, providing a streamlined solution for managing network devices and configurations. ## Key features - **Inventory Management**: Infrahub can dynamically generate and update inventories for Ansible and Nornir, ensuring that the latest state of infrastructure is always used. - **Automation**: By leveraging each framework's automation capabilities, users can execute complex infrastructure management tasks directly from Infrahub data. - **Configuration Deployment**: These integrations ensure that configurations managed by Infrahub are consistent across the infrastructure by applying them through Ansible or Nornir. - -## More information - -For more details, you can refer to the [integrations](../integrations/) documentation. diff --git a/docs/docs/overview/readme.mdx b/docs/docs/overview/readme.mdx index aa88ef332e..a09371fd79 100644 --- a/docs/docs/overview/readme.mdx +++ b/docs/docs/overview/readme.mdx @@ -21,4 +21,4 @@ This overview will explore the design and components of Infrahub and how the pla - [Data Transformations](./transformations.mdx) - [Version Control, CI and Checks](./versioning.mdx) - [Generators & Design-Driven Automation](./generators.mdx) -- [External integrations with automation frameworks (Ansible, Nornir)](./integrations.mdx) +- External integrations with automation frameworks ([Ansible](https://docs.infrahub.app/ansible/ansible/), [Nornir](https://docs.infrahub.app/nornir/nornir/)) diff --git a/docs/docs/release-notes/infrahub/release-1_1_6.mdx b/docs/docs/release-notes/infrahub/release-1_1_6.mdx new file mode 100644 index 0000000000..09a132aa60 --- /dev/null +++ b/docs/docs/release-notes/infrahub/release-1_1_6.mdx @@ -0,0 +1,136 @@ +--- +title: Release 1.1.6 +--- + + + + + + + + + + + + + + + + + + + +
Release Number1.1.6
Release DateJanuary 30th, 2025
Release CodenameLyon, Patch #6
Tag[infrahub-v1.1.6](https://github.com/opsmill/infrahub/releases/tag/infrahub-v1.1.6)
+ +# Release 1.1.6 + +This release brings exciting new features to Infrahub's Artifact capability, as well as bug-fixes to resolve issues found in Infrahub v1.1.5 and prior. + +## Main changes + +The complete list of changes can always be found in the `CHANGELOG.md` file in the Infrahub Git repository. + +### Artifact improvements + +As part of our ongoing efforts to enhance the integrations and capabilities of Infrahub, the Artifact detail page has been redesigned. + +This redesign focused on allowing a richer and more powerful Artifact experience. +Enhancements include support for additional content-types (as listed below), colorized syntax highlighting, and easier access to download or copy artifacts. + +**Supported Artifact Content Types**: + +- Markdown +- YAML +- JSON +- Text +- SVG + +#### Examples + +Markdown with syntax highlighting: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of Markdown type with syntax highlighting."](../../media/release_notes/infrahub_1_1_6/markdown_artifact_raw.png) + +Markdown rendered for preview: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of Markdown type rendered for preview."](../../media/release_notes/infrahub_1_1_6/markdown_artifact_preview.png) + +Text: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of text type."](../../media/release_notes/infrahub_1_1_6/text_artifact.png) + +YAML: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of YAML type with syntax highlighting."](../../media/release_notes/infrahub_1_1_6/yaml_artifact.png) + +JSON: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of JSON type with syntax highlighting."](../../media/release_notes/infrahub_1_1_6/json_artifact.png) + +SVG: + +!["Example screenshot of Infrahub 1.1.6 showing an Artifact of SVG type."](../../media/release_notes/infrahub_1_1_6/svg_artifact.png) + +### Added + +- Allow Default Address Type quick selection in the Resource Manager form ([#3489](https://github.com/opsmill/infrahub/issues/3489)) +- Added code viewer for new content-types, preview of raw markdown content, one-click file download or cop, and redesign of artifact details view ([#5452](https://github.com/opsmill/infrahub/issues/5452)) + +### Fixed + +- Automatically mark hierarchical nodes `parent` relationship as optional if the parent is of the same kind or mandatory if the parent is of a different kind ([#3682](https://github.com/opsmill/infrahub/issues/3682)) +- Revert back to `state=open` from `state=merging` if the merge of a proposed change fails. + This fixes the possibility of leaving a proposed change in an unexpected state. ([#5563](https://github.com/opsmill/infrahub/issues/5563)) +- Fixes an issue with retrieving object from S3 storage backend. ([#5573](https://github.com/opsmill/infrahub/issues/5573)) +- Loosened requirement for group discovery using OIDC and id_token. This will probably be reverted or presented as a configuration option in the future. ([#5623](https://github.com/opsmill/infrahub/issues/5623)) +- Significant improvements to diff calculation performance. + +## Migration guide + +The process to migrate your instance of Infrahub to the latest version may vary depending on your deployment of Infrahub. +However, at a high-level, it will involve getting the latest version of the Infrahub code, and then performing any needed Database Migrations and Schema updates. + +Please ensure you have a **backup of your Infrahub environment** prior to attempting any migration or upgrade activities. + +### Migration of an Infrahub instance + +**First**, update the Infrahub version running in your environment. + +Below are some example ways to get the latest version of Infrahub in your environment. + +- For deployments via Docker Compose, update your container version by updating the `VERSION` environment variable and relaunch: + - `export VERSION="1.1.6"; docker compose pull && docker compose up -d` +- For deployments via Kubernetes, utilize the latest version of the Helm chart supplied with this release + +**Second**, once you have gotten the desired version of Infrahub in your environment, please run the following commands. + +> Note: If you are running Infrahub in Docker/K8s, these commands need to run from a container where Infrahub is installed. + +```shell +infrahub db migrate +infrahub db update-core-schema +``` + +**Finally**, restart all instances of Infrahub. + +### Migration of a dev or demo instance + +If you are using the `dev` or `demo` environments, we have provided `invoke` commands to aid in the migration to the latest version. +The below examples provide the `demo` version of the commands, however similar commands can be used for `dev` as well. + +```shell +invoke demo.stop +invoke demo.build +invoke demo.migrate +invoke demo.start +``` + +If you don't want to keep your data, you can start a clean instance with the following command. + +> **Warning: All data will be lost, please make sure to backup everything you need before running this command.** + +```shell +invoke demo.destroy demo.build demo.start demo.load-infra-schema demo.load-infra-data +``` + +The repository https://github.com/opsmill/infrahub-demo-edge has also been updated, it's recommended to pull the latest changes into your fork. \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index 2cb9afeae7..8fbd88b7ff 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -5532,9 +5532,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001612", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", - "integrity": "sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g==", + "version": "1.0.30001696", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001696.tgz", + "integrity": "sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==", "funding": [ { "type": "opencollective", @@ -5548,7 +5548,8 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ] + ], + "license": "CC-BY-4.0" }, "node_modules/ccount": { "version": "2.0.1", diff --git a/docs/sidebars.ts b/docs/sidebars.ts index 9609b64845..7b5ab84d12 100644 --- a/docs/sidebars.ts +++ b/docs/sidebars.ts @@ -214,67 +214,6 @@ const sidebars: SidebarsConfig = { link: { type: 'doc', id: 'infrahubctl' }, items: [{ type: 'autogenerated', dirName: 'infrahubctl' }], }, - { - type: 'category', - label: 'Integrations', - link: { - type: 'doc', - id: 'integrations/readme' - }, - items: [ - { - type: 'category', - label: 'Infrahub Ansible Collection', - link: { - type: 'doc', - id: 'integrations/infrahub-ansible/readme' - }, - items: [ - { - }, - ], - }, - { - type: 'category', - label: 'Infrahub Sync', - link: { - type: 'doc', - id: 'integrations/sync/readme' - }, - items: [ - { - type: 'category', - label: 'Guides', - items: [ - 'integrations/sync/guides/installation', - 'integrations/sync/guides/creation', - 'integrations/sync/guides/run', - ], - }, - { - type: 'category', - label: 'Reference', - items: [ - 'integrations/sync/reference/config', - 'integrations/sync/reference/cli', - ], - }, - ], - }, - { - type: 'category', - label: 'Nornir plugin for Infrahub', - link: { - type: 'doc', - id: 'integrations/nornir-infrahub/readme' - }, - items: [ - { - }, - ], - }, - ] - }, { type: 'category', label: 'Development', @@ -315,6 +254,7 @@ const sidebars: SidebarsConfig = { slug: 'release-notes/infrahub', }, items: [ + 'release-notes/infrahub/release-1_1_6', 'release-notes/infrahub/release-1_1_5', 'release-notes/infrahub/release-1_1_4', 'release-notes/infrahub/release-1_1_3', diff --git a/frontend/app/src/entities/proposed-changes/ui/diff-filter.tsx b/frontend/app/src/entities/proposed-changes/ui/diff-filter.tsx index 8bf27f37d3..a9a63a0e7c 100644 --- a/frontend/app/src/entities/proposed-changes/ui/diff-filter.tsx +++ b/frontend/app/src/entities/proposed-changes/ui/diff-filter.tsx @@ -128,6 +128,7 @@ const FilterButton = ({ status, count, currentFilter, onFilter, ...props }: Filt className={classNames("relative rounded-full p-0 h-auto", isMuted && "opacity-60")} onClick={() => onFilter(status)} disabled={isDisabled} + data-testid={`diff-filters-button-${status.toLowerCase()}`} > {count} {currentFilter === status && CloseBadge && } diff --git a/frontend/app/src/entities/proposed-changes/ui/diff-summary.tsx b/frontend/app/src/entities/proposed-changes/ui/diff-summary.tsx index 38dbdc63f4..e1faf42b67 100644 --- a/frontend/app/src/entities/proposed-changes/ui/diff-summary.tsx +++ b/frontend/app/src/entities/proposed-changes/ui/diff-summary.tsx @@ -37,6 +37,7 @@ const BadgeLink: React.FC<{ tabSearchParam, { name: QSP.STATUS, value: status }, ])} + data-testid={`diff-${status.toLowerCase()}-count`} > {count} diff --git a/frontend/app/src/pages/homepage.tsx b/frontend/app/src/pages/homepage.tsx index 0d6461b5a6..897b886a6b 100644 --- a/frontend/app/src/pages/homepage.tsx +++ b/frontend/app/src/pages/homepage.tsx @@ -81,7 +81,7 @@ const Homepage = () => { title="Nornir" description="Nornir plugin for Infrahub" docLabel="About Nornir plugin" - docTo="https://pypi.org/project/nornir-infrahub/" + docTo="https://docs.infrahub.app/nornir/nornir/" /> { title="Infrahub Ansible Collection" description="Infrahub Collection for Ansible Galaxy" docLabel="About Infrahub Ansible collection" - docTo="https://infrahub-ansible.readthedocs.io/en/latest/" + docTo="https://docs.infrahub.app/ansible/ansible/" /> diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 37ca252867..6fb5690515 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -15,12 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 4.1.5 +version: 4.1.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.1.5" +appVersion: "1.1.6" dependencies: - name: neo4j diff --git a/pyproject.toml b/pyproject.toml index a7a6fb388b..b64a5362c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "infrahub-server" -version = "1.1.5" +version = "1.1.6" description = "Infrahub is taking a new approach to Infrastructure Management by providing a new generation of datastore to organize and control all the data that defines how an infrastructure should run." authors = ["OpsMill "] readme = "README.md" diff --git a/python_testcontainers/pyproject.toml b/python_testcontainers/pyproject.toml index 7b1e50915b..f39e66f6d3 100644 --- a/python_testcontainers/pyproject.toml +++ b/python_testcontainers/pyproject.toml @@ -1,11 +1,11 @@ [project] name = "infrahub-testcontainers" -version = "1.1.5" +version = "1.1.6" requires-python = ">=3.9" [tool.poetry] name = "infrahub-testcontainers" -version = "1.1.5" +version = "1.1.6" description = "Testcontainers instance for Infrahub to easily build integration tests" authors = ["OpsMill "] readme = "README.md"