Skip to content

Commit 49ccee3

Browse files
committed
Merge branch 'stable' into stable-to-develop
2 parents 281aeab + 4217f0f commit 49ccee3

File tree

82 files changed

+2192
-5671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2192
-5671
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ jobs:
125125
publish: true
126126

127127
repository-dispatch:
128-
needs: check_release
128+
needs:
129+
- check_release
130+
- publish-docker-image
129131
uses: ./.github/workflows/repository-dispatch.yml
130132
secrets: inherit
131133
with:

.github/workflows/repository-dispatch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
- "opsmill/infrahub-demo-dc-fabric"
3939
- "INFRAHUB_ENTERPRISE_REPOSITORY"
4040
- "INFRAHUB_CUSTOMER1_REPOSITORY"
41+
- "INFRAHUB_CUSTOMER2_REPOSITORY"
42+
- "INFRAHUB_CUSTOMER3_REPOSITORY"
4143

4244
steps:
4345
- name: Checkout code

.github/workflows/sync-docs.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ on:
1010
- '.vale/**'
1111
- 'docs/docs/**'
1212
- 'docs/sidebars.ts'
13-
pull_request:
14-
branches:
15-
- stable
1613

1714
jobs:
1815
sync:
19-
if: github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]'
2016
runs-on: ubuntu-latest
2117
steps:
2218
- name: Checkout source repository

CHANGELOG.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,40 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang
1111

1212
<!-- towncrier release notes start -->
1313

14+
## [Infrahub - v1.2.9](https://github.com/opsmill/infrahub/tree/infrahub-v1.2.9) - 2025-05-07
15+
16+
### Added
17+
18+
- Added the `INFRAHUB_TESTING_SCHEMA_STRICT_MODE` environment variable to allow users to control `INFRAHUB_SCHEMA_STRICT_MODE` when using `infrahub-testcontainers`.
19+
- Improved the performance of the core database class used throughout the backend by factoring out the classes used for creating and removing indexes.
20+
21+
### Changed
22+
23+
- Sped up computed attribute mutation by changing the node query to only request the required attributes from the database. This change will provide performance improvements for the background processing of computed attributes. ([#6403](https://github.com/opsmill/infrahub/issues/6403))
24+
25+
### Fixed
26+
27+
- Deleting a branch now correctly deletes nodes with agnostic relationships. This typically fixes an issue after deleting a branch where an object had been created on this branch through a ResourceManager ([#5463](https://github.com/opsmill/infrahub/issues/5463))
28+
- Fixed `textarea` values display in the object details view. ([#6400](https://github.com/opsmill/infrahub/issues/6400))
29+
- Added inherited kinds of a node as templates to fix GraphQL schema when inheritance is involved. ([#6415](https://github.com/opsmill/infrahub/issues/6415))
30+
- Fixed an issue with computed attribute that would trigger multiple updates after a schema change if the attribute reference multiple kind of nodes.
31+
- Updated the date formatting to include the year for dates before the current year, and ensure consistency between the list and detail views.
32+
1433
## [Infrahub - v1.2.8](https://github.com/opsmill/infrahub/tree/infrahub-v1.2.8) - 2025-05-01
1534

1635
### Added
1736

1837
- Added support for "convert_query_response" for Python transforms. The feature works the same was as with Generators. Note any non default branch will need to be rebased after this upgrade. ([#6383](https://github.com/opsmill/infrahub/issues/6383))
19-
- Enable HCL syntax highlighting for artifacts
38+
- Enabled HCL syntax highlighting for artifacts.
2039

2140
### Fixed
2241

23-
- Improve performance when retrieving nodes that have thousands of relationships
24-
- Improve performance of git credential helper
42+
- Improved performance when retrieving nodes that have thousands of relationships.
43+
- Improved performance of the Git credential helper.
2544

2645
### Housekeeping
2746

28-
- Background performance improvements due to Prefect 3.3.7 upgrade
47+
- Background performance improvements due to Prefect 3.3.7 upgrade.
2948

3049
## [Infrahub - v1.2.7](https://github.com/opsmill/infrahub/tree/infrahub-v1.2.7) - 2025-04-28
3150

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
Infrahub from [OpsMill](https://opsmill.com) 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. Infrahub offers a central hub to manage the data, templates and playbooks that powers your infrastructure by combining the version control and branch management capabilities similar to Git with the flexible data model and UI of a graph database.
1616

17-
If you just want to try Infrahub out, you can use our [Always-On Sandbox](https://demo.infrahub.app/) to get started.
17+
If you just want to try Infrahub out, you can use our [Infrahub Sandbox](https://demo.infrahub.app/) to get started.
1818

1919
![infrahub screenshot](docs/docs/media/infrahub-readme.gif)
2020

@@ -40,7 +40,7 @@ If you just want to try Infrahub out, you can use our [Always-On Sandbox](https:
4040

4141
## Quick Start
4242

43-
[Always-On Sandbox](https://demo.infrahub.app/) - Instantly login to the UI of a demo environment of Infrahub with sample data pre-loaded.
43+
[Infrahub Sandbox](https://demo.infrahub.app/) - Instantly login to the UI of a demo environment of Infrahub with sample data pre-loaded.
4444

4545
[Getting Started Environment & Tutorial](https://opsmill.instruqt.com/pages/labs) - It spins up an instance of Infrahub on our cloud, provides a browser, terminal, code editor and walks you through the basic concepts:
4646

backend/infrahub/core/branch/models.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ def get_query_filter_path(
295295
is_isolated: bool = True,
296296
branch_agnostic: bool = False,
297297
variable_name: str = "r",
298+
params_prefix: str = "",
298299
) -> tuple[str, dict]:
299300
"""
300301
Generate a CYPHER Query filter based on a path to query a part of the graph at a specific time and on a specific branch.
@@ -306,30 +307,28 @@ def get_query_filter_path(
306307
307308
There is a currently an assumption that the relationship in the path will be named 'r'
308309
"""
309-
310+
pp = params_prefix
310311
params: dict[str, Any] = {}
311312
at = Timestamp(at)
312313
at_str = at.to_string()
313314
if branch_agnostic:
314-
filter_str = (
315-
f"{variable_name}.from <= $time1 AND ({variable_name}.to IS NULL or {variable_name}.to >= $time1)"
316-
)
317-
params["time1"] = at_str
315+
filter_str = f"{variable_name}.from <= ${pp}time1 AND ({variable_name}.to IS NULL or {variable_name}.to >= ${pp}time1)"
316+
params[f"{pp}time1"] = at_str
318317
return filter_str, params
319318

320319
branches_times = self.get_branches_and_times_to_query_global(at=at_str, is_isolated=is_isolated)
321320

322321
for idx, (branch_name, time_to_query) in enumerate(branches_times.items()):
323-
params[f"branch{idx}"] = list(branch_name)
324-
params[f"time{idx}"] = time_to_query
322+
params[f"{pp}branch{idx}"] = list(branch_name)
323+
params[f"{pp}time{idx}"] = time_to_query
325324

326325
filters = []
327326
for idx in range(len(branches_times)):
328327
filters.append(
329-
f"({variable_name}.branch IN $branch{idx} AND {variable_name}.from <= $time{idx} AND {variable_name}.to IS NULL)"
328+
f"({variable_name}.branch IN ${pp}branch{idx} AND {variable_name}.from <= ${pp}time{idx} AND {variable_name}.to IS NULL)"
330329
)
331330
filters.append(
332-
f"({variable_name}.branch IN $branch{idx} AND {variable_name}.from <= $time{idx} AND {variable_name}.to >= $time{idx})"
331+
f"({variable_name}.branch IN ${pp}branch{idx} AND {variable_name}.from <= ${pp}time{idx} AND {variable_name}.to >= ${pp}time{idx})"
333332
)
334333

335334
filter_str = "(" + "\n OR ".join(filters) + ")"

backend/infrahub/core/branch/tasks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ async def merge_branch(
212212

213213
merger: BranchMerger | None = None
214214
async with lock.registry.global_graph_lock():
215-
# await update_diff(model=RequestDiffUpdate(branch_name=obj.name))
216-
217215
diff_repository = await component_registry.get_component(DiffRepository, db=db, branch=obj)
218216
diff_coordinator = await component_registry.get_component(DiffCoordinator, db=db, branch=obj)
219217
diff_merger = await component_registry.get_component(DiffMerger, db=db, branch=obj)

backend/infrahub/core/diff/calculator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from infrahub.database import InfrahubDatabase
1515
from infrahub.log import get_logger
1616

17+
from .model.field_specifiers_map import NodeFieldSpecifierMap
1718
from .model.path import CalculatedDiffs
1819

1920
log = get_logger()
@@ -26,8 +27,8 @@ class DiffCalculationRequest:
2627
branch_from_time: Timestamp
2728
from_time: Timestamp
2829
to_time: Timestamp
29-
current_node_field_specifiers: dict[str, set[str]] | None = field(default=None)
30-
new_node_field_specifiers: dict[str, set[str]] | None = field(default=None)
30+
current_node_field_specifiers: NodeFieldSpecifierMap | None = field(default=None)
31+
new_node_field_specifiers: NodeFieldSpecifierMap | None = field(default=None)
3132

3233

3334
class DiffCalculator:
@@ -75,7 +76,7 @@ async def calculate_diff(
7576
from_time: Timestamp,
7677
to_time: Timestamp,
7778
include_unchanged: bool = True,
78-
previous_node_specifiers: dict[str, set[str]] | None = None,
79+
previous_node_specifiers: NodeFieldSpecifierMap | None = None,
7980
) -> CalculatedDiffs:
8081
if diff_branch.name == registry.default_branch:
8182
diff_branch_from_time = from_time

backend/infrahub/core/diff/combiner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,7 @@ def _combine_nodes(self, node_pairs: list[NodePair]) -> set[EnrichedDiffNode]:
384384
):
385385
combined_nodes.add(
386386
EnrichedDiffNode(
387-
uuid=node_pair.later.uuid,
388-
kind=node_pair.later.kind,
387+
identifier=node_pair.later.identifier,
389388
label=node_pair.later.label,
390389
changed_at=node_pair.later.changed_at or node_pair.earlier.changed_at,
391390
action=combined_action,

0 commit comments

Comments
 (0)