Skip to content

Stable to develop #6443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a98642f
Deleting branch correctly deletes nodes with agnostic relationships (…
LucasG0 May 5, 2025
09c4f99
fix(ci): repository dispatch after image is published
fatih-acar May 5, 2025
e563e1f
fix: neo4j docker healthcheck fills storage
fatih-acar Apr 15, 2025
b24d4ce
ci: add INFRAHUB_CUSTOMER2_REPOSITORY to repository-dispatcher
wvandeun May 6, 2025
718f511
Merge pull request #6412 from opsmill/wvd-add-customer-2-to-repositor…
wvandeun May 6, 2025
21d0b22
Fix textarea UI display in object details view (#6414)
pa-lem May 6, 2025
c55c973
logic for deleting nodes removed from a diff (#6391)
ajtmccarty May 6, 2025
e1bce6b
add node kind to node field specifiers (#6359)
ajtmccarty May 6, 2025
7f8b7f9
Add changelog for deleting agnostic relationships (#6409)
LucasG0 May 6, 2025
c3e7563
change wording
petercrocker May 7, 2025
f1f0a68
Update date display to include year and fix consistency across list a…
pa-lem May 7, 2025
acae3cd
Generate templates for inherited kinds (#6423)
gmazoyer May 7, 2025
c50df9b
fix(backend): improve NodeGetHierarchyQuery performance on default br…
fatih-acar May 6, 2025
197f7ed
fix(backend): make sure filter subqueries start from the node
fatih-acar May 6, 2025
dae2057
v1.2.9 release prep
lykinsbd May 7, 2025
7745e6a
fix bug in rel create for migrated kind nodes (#6421)
ajtmccarty May 8, 2025
b2f89a1
Merge pull request #6422 from opsmill/pmc-20250507-docs
dgarros May 8, 2025
75baee0
ci: add INFRAHUB_CUSTOMER3_REPOSITORY to repository-dispatcher
wvandeun May 8, 2025
5420339
Break apart ignored mypy rules to individual error codes
ogenstad May 8, 2025
0c02925
fix: calculate webhook signature on json serialized payload
wvandeun May 8, 2025
8edfae7
Merge pull request #6431 from opsmill/pog-mypy-ruleset
ogenstad May 9, 2025
ae7b246
fix webhook receiver example in docs to calculate signature from json…
wvandeun May 8, 2025
decc592
correct filename of webhook receiver example
wvandeun May 8, 2025
47525b8
add changelog fragment
wvandeun May 8, 2025
75b251c
fix(testcontainers): change json format to JS compatible
fatih-acar Apr 18, 2025
3cfeda9
fix(testcontainers): rename deprecated neo4j config
fatih-acar Apr 24, 2025
7e0af34
Merge pull request #6430 from opsmill/wvd-add-customer-3-to-repositor…
wvandeun May 9, 2025
9db6786
Make sure doc sync only runs on commit to stable (#6429)
BaptisteGi May 9, 2025
d567372
Add 'List' kinds to LARGE_ATTRIBUTE_TYPES
ogenstad May 9, 2025
2ec0f39
Merge pull request #6438 from opsmill/pog-allow-large-dropdown-choice…
ogenstad May 10, 2025
968b3c5
Merge pull request #6432 from opsmill/wvd-2025008-fix-webhook-signature
wvandeun May 10, 2025
4217f0f
Display "dissociate" action only if possible on relationships table's…
pa-lem May 12, 2025
49ccee3
Merge branch 'stable' into stable-to-develop
ajtmccarty May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ jobs:
publish: true

repository-dispatch:
needs: check_release
needs:
- check_release
- publish-docker-image
uses: ./.github/workflows/repository-dispatch.yml
secrets: inherit
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
- "opsmill/infrahub-demo-dc-fabric"
- "INFRAHUB_ENTERPRISE_REPOSITORY"
- "INFRAHUB_CUSTOMER1_REPOSITORY"
- "INFRAHUB_CUSTOMER2_REPOSITORY"
- "INFRAHUB_CUSTOMER3_REPOSITORY"

steps:
- name: Checkout code
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ on:
- '.vale/**'
- 'docs/docs/**'
- 'docs/sidebars.ts'
pull_request:
branches:
- stable

jobs:
sync:
if: github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
Expand Down
27 changes: 23 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,40 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang

<!-- towncrier release notes start -->

## [Infrahub - v1.2.9](https://github.com/opsmill/infrahub/tree/infrahub-v1.2.9) - 2025-05-07

### Added

- Added the `INFRAHUB_TESTING_SCHEMA_STRICT_MODE` environment variable to allow users to control `INFRAHUB_SCHEMA_STRICT_MODE` when using `infrahub-testcontainers`.
- Improved the performance of the core database class used throughout the backend by factoring out the classes used for creating and removing indexes.

### Changed

- 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))

### Fixed

- 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))
- Fixed `textarea` values display in the object details view. ([#6400](https://github.com/opsmill/infrahub/issues/6400))
- Added inherited kinds of a node as templates to fix GraphQL schema when inheritance is involved. ([#6415](https://github.com/opsmill/infrahub/issues/6415))
- Fixed an issue with computed attribute that would trigger multiple updates after a schema change if the attribute reference multiple kind of nodes.
- Updated the date formatting to include the year for dates before the current year, and ensure consistency between the list and detail views.

## [Infrahub - v1.2.8](https://github.com/opsmill/infrahub/tree/infrahub-v1.2.8) - 2025-05-01

### Added

- 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))
- Enable HCL syntax highlighting for artifacts
- Enabled HCL syntax highlighting for artifacts.

### Fixed

- Improve performance when retrieving nodes that have thousands of relationships
- Improve performance of git credential helper
- Improved performance when retrieving nodes that have thousands of relationships.
- Improved performance of the Git credential helper.

### Housekeeping

- Background performance improvements due to Prefect 3.3.7 upgrade
- Background performance improvements due to Prefect 3.3.7 upgrade.

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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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.

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

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

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

## Quick Start

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

[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:

Expand Down
17 changes: 8 additions & 9 deletions backend/infrahub/core/branch/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ def get_query_filter_path(
is_isolated: bool = True,
branch_agnostic: bool = False,
variable_name: str = "r",
params_prefix: str = "",
) -> tuple[str, dict]:
"""
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.
Expand All @@ -306,30 +307,28 @@ def get_query_filter_path(

There is a currently an assumption that the relationship in the path will be named 'r'
"""

pp = params_prefix
params: dict[str, Any] = {}
at = Timestamp(at)
at_str = at.to_string()
if branch_agnostic:
filter_str = (
f"{variable_name}.from <= $time1 AND ({variable_name}.to IS NULL or {variable_name}.to >= $time1)"
)
params["time1"] = at_str
filter_str = f"{variable_name}.from <= ${pp}time1 AND ({variable_name}.to IS NULL or {variable_name}.to >= ${pp}time1)"
params[f"{pp}time1"] = at_str
return filter_str, params

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

for idx, (branch_name, time_to_query) in enumerate(branches_times.items()):
params[f"branch{idx}"] = list(branch_name)
params[f"time{idx}"] = time_to_query
params[f"{pp}branch{idx}"] = list(branch_name)
params[f"{pp}time{idx}"] = time_to_query

filters = []
for idx in range(len(branches_times)):
filters.append(
f"({variable_name}.branch IN $branch{idx} AND {variable_name}.from <= $time{idx} AND {variable_name}.to IS NULL)"
f"({variable_name}.branch IN ${pp}branch{idx} AND {variable_name}.from <= ${pp}time{idx} AND {variable_name}.to IS NULL)"
)
filters.append(
f"({variable_name}.branch IN $branch{idx} AND {variable_name}.from <= $time{idx} AND {variable_name}.to >= $time{idx})"
f"({variable_name}.branch IN ${pp}branch{idx} AND {variable_name}.from <= ${pp}time{idx} AND {variable_name}.to >= ${pp}time{idx})"
)

filter_str = "(" + "\n OR ".join(filters) + ")"
Expand Down
2 changes: 0 additions & 2 deletions backend/infrahub/core/branch/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ async def merge_branch(

merger: BranchMerger | None = None
async with lock.registry.global_graph_lock():
# await update_diff(model=RequestDiffUpdate(branch_name=obj.name))

diff_repository = await component_registry.get_component(DiffRepository, db=db, branch=obj)
diff_coordinator = await component_registry.get_component(DiffCoordinator, db=db, branch=obj)
diff_merger = await component_registry.get_component(DiffMerger, db=db, branch=obj)
Expand Down
7 changes: 4 additions & 3 deletions backend/infrahub/core/diff/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from infrahub.database import InfrahubDatabase
from infrahub.log import get_logger

from .model.field_specifiers_map import NodeFieldSpecifierMap
from .model.path import CalculatedDiffs

log = get_logger()
Expand All @@ -26,8 +27,8 @@ class DiffCalculationRequest:
branch_from_time: Timestamp
from_time: Timestamp
to_time: Timestamp
current_node_field_specifiers: dict[str, set[str]] | None = field(default=None)
new_node_field_specifiers: dict[str, set[str]] | None = field(default=None)
current_node_field_specifiers: NodeFieldSpecifierMap | None = field(default=None)
new_node_field_specifiers: NodeFieldSpecifierMap | None = field(default=None)


class DiffCalculator:
Expand Down Expand Up @@ -75,7 +76,7 @@ async def calculate_diff(
from_time: Timestamp,
to_time: Timestamp,
include_unchanged: bool = True,
previous_node_specifiers: dict[str, set[str]] | None = None,
previous_node_specifiers: NodeFieldSpecifierMap | None = None,
) -> CalculatedDiffs:
if diff_branch.name == registry.default_branch:
diff_branch_from_time = from_time
Expand Down
3 changes: 1 addition & 2 deletions backend/infrahub/core/diff/combiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ def _combine_nodes(self, node_pairs: list[NodePair]) -> set[EnrichedDiffNode]:
):
combined_nodes.add(
EnrichedDiffNode(
uuid=node_pair.later.uuid,
kind=node_pair.later.kind,
identifier=node_pair.later.identifier,
label=node_pair.later.label,
changed_at=node_pair.later.changed_at or node_pair.earlier.changed_at,
action=combined_action,
Expand Down
Loading