Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1a12125
Merge pull request #618 from opsmill/develop
petercrocker Nov 10, 2025
ed76b8a
Merge pull request #620 from opsmill/develop
ogenstad Nov 11, 2025
19e87a1
Merge pull request #623 from opsmill/develop
ogenstad Nov 13, 2025
f9633d0
Merge pull request #632 from opsmill/develop
ogenstad Nov 14, 2025
46092e3
Remove support for Python 3.9
ogenstad Nov 17, 2025
5819312
Merge pull request #635 from opsmill/pog-remove-python-3.9
ogenstad Nov 17, 2025
2470982
Upgrade ruff
ogenstad Nov 17, 2025
6060485
Merge pull request #636 from opsmill/pog-upgrade-ruff
ogenstad Nov 17, 2025
fe3e57a
Use ruff version from uv.lock in CI
ogenstad Nov 17, 2025
21d565e
Merge pull request #638 from opsmill/pog-ruff-version-from-uvlock
ogenstad Nov 18, 2025
631f9c4
Allow recursive convertion to InfrahubNode objects
ogenstad May 5, 2025
26d981c
Correct autofixable ruff rules for Optional
ogenstad Nov 18, 2025
acbed66
Simplify dictionary lookups
ogenstad Nov 18, 2025
8d6a51c
Use a `set` literal when testing for membership
ogenstad Nov 18, 2025
93e6929
Prefer `next(iter())` over single element slice
ogenstad Nov 18, 2025
38ac489
Update ruleset for shadowing builtins
ogenstad Nov 18, 2025
3cf549f
Use specific rule codes when using noqa
ogenstad Nov 18, 2025
58dd255
Upgrade uv action version and pin Python version for test matrix
ogenstad Nov 19, 2025
03198b0
Clear out test restrictions for Python 3.9
ogenstad Nov 19, 2025
b93794f
Merge pull request #390 from opsmill/pog-recursive-relationships-IHS-129
ogenstad Nov 19, 2025
7d7ec85
Merge pull request #648 from opsmill/pog-upgrade-uv-action-set-version
ogenstad Nov 19, 2025
678f2d2
Merge pull request #643 from opsmill/pog-RUF015-infrahub-develop-2025…
ogenstad Nov 19, 2025
638974d
Merge pull request #647 from opsmill/pog-sim118-infrahub-develop-2025…
ogenstad Nov 19, 2025
388e418
Merge pull request #649 from opsmill/pog-clear-3.9-test-restrictions
ogenstad Nov 19, 2025
8483c5a
Merge pull request #645 from opsmill/pog-ruff-builtin-filter-infrahub…
ogenstad Nov 19, 2025
a2d9569
Merge pull request #641 from opsmill/pog-pygrep-hooks
ogenstad Nov 19, 2025
1dcbcec
Merge pull request #642 from opsmill/pog-PLR6201-infrahub-develop-202…
ogenstad Nov 19, 2025
0aa08c2
Fix return annotations and changes for early returns
ogenstad Nov 18, 2025
f5ed365
Merge pull request #644 from opsmill/pog-return-annotations-to-infrah…
ogenstad Nov 19, 2025
ea97f40
Remove resolved rule ignores
ogenstad Nov 19, 2025
dd9e82b
Merge pull request #650 from opsmill/pog-resolved-rules
ogenstad Nov 19, 2025
3cddbac
Unnecessary assignment to `data` before `return` statement
ogenstad Nov 19, 2025
6ad9907
Linting: Probable insecure usage of temporary file or directory
ogenstad Nov 19, 2025
24395a4
Prefer `Path.cwd()` over `Path().resolve()` for current-directory loo…
ogenstad Nov 19, 2025
13b3acb
Merge pull request #640 from opsmill/develop
ogenstad Nov 19, 2025
7ebc552
Merge pull request #651 from opsmill/pog-ruff-ret504
ogenstad Nov 20, 2025
a7f3e6a
Merge pull request #653 from opsmill/pog-FURB177
ogenstad Nov 20, 2025
b2c7649
Merge pull request #652 from opsmill/pog-ruff-S108
ogenstad Nov 20, 2025
92b6a82
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 24, 2025
e3f5169
Infrahub SDK 1.16.0 beta0
ogenstad Nov 24, 2025
b199ef6
Merge pull request #660 from opsmill/pog-sdk-1.16.0b0
ogenstad Nov 25, 2025
1f4f5a0
add optional graphql variable types and add datetime
wvandeun Nov 14, 2025
16fe512
add get_diff_tree method to SDK client to get a diff object
wvandeun Nov 14, 2025
ab9ae5b
add updated_at meta data property for attributes and relationships
wvandeun Nov 16, 2025
a1e9b7f
add branch report command to infrahubctl
wvandeun Nov 16, 2025
b1040bd
fix
wvandeun Nov 17, 2025
ab8df56
add tests
wvandeun Nov 17, 2025
5c4aca9
ruff
wvandeun Nov 17, 2025
d98a7c4
update documentation
wvandeun Nov 17, 2025
0b48ff7
fix mypy
wvandeun Nov 17, 2025
b3f9a2f
fix: replace | union syntax with Union for Python 3.9 compatibility
wvandeun Nov 17, 2025
22a5de6
fix tests
wvandeun Nov 21, 2025
78c71b3
fail branch report command on main branch
wvandeun Nov 25, 2025
a75c77e
linting
wvandeun Nov 25, 2025
634d2d2
linting
wvandeun Nov 25, 2025
101f45a
remove deprecated raise_for_error argument
wvandeun Nov 26, 2025
e39957b
merge develop to infrahub-develop (#662)
solababs Nov 27, 2025
c850da3
Merge remote-tracking branch 'origin/infrahub-develop' into wvd-20251…
wvandeun Nov 27, 2025
2cf9c3b
Merge pull request #646 from opsmill/pog-ruff-up045-20251118-to-infra…
ogenstad Nov 28, 2025
085e87b
Merge pull request #658 from opsmill/dependabot/github_actions/stable…
dgarros Nov 29, 2025
32db310
remove excpetion handling in format_timestamp
wvandeun Dec 1, 2025
b997e3a
remove typing ignore statements
wvandeun Dec 1, 2025
c1ce7df
refactor creating branch report tables
wvandeun Dec 1, 2025
d5ff419
fix created_at metadata for proposed change in branch report
wvandeun Dec 1, 2025
898819d
update tests
wvandeun Dec 1, 2025
665eb4c
update tests
wvandeun Dec 1, 2025
b38fa29
update tests
wvandeun Dec 1, 2025
dc1e1b7
Merge pull request #637 from opsmill/wvd-20251114-infp388-branch-clea…
wvandeun Dec 1, 2025
550fdf7
Merge remote-tracking branch 'origin/stable' into wvd-20251201-releas…
wvandeun Dec 1, 2025
0ac542c
prepare release v1.16.0
wvandeun Dec 1, 2025
4952028
update CHANGELOG
wvandeun Dec 1, 2025
d51e287
Merge pull request #671 from opsmill/wvd-20251201-release-1.16
wvandeun Dec 1, 2025
b5b3347
Fix markdownlint MD060 table column style errors
petercrocker Dec 1, 2025
89c5b0a
Bump markdownlint-cli2-action from v20 to v21
petercrocker Dec 1, 2025
f819466
Merge pull request #673 from opsmill/pmc-20251201-docs
petercrocker Dec 1, 2025
6daaf83
Resolve merge conflicts
ogenstad Dec 2, 2025
17cf122
Fix table
ogenstad Dec 2, 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
52 changes: 30 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
github_workflows: ${{ steps.changes.outputs.github_workflows }}
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Check for file changes
uses: dorny/paths-filter@v3
id: changes
Expand All @@ -63,26 +63,34 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: "Setup environment"
run: "pip install yamllint==1.35.1"
- name: "Linting: yamllint"
run: "yamllint -s ."

python-lint:
if: needs.files-changed.outputs.python == 'true'
needs: ["files-changed"]
needs: ["files-changed", "prepare-environment"]
runs-on: "ubuntu-latest"
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
- name: "Setup environment"
run: "pip install ruff==0.11.0"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
- name: Install dependencies
run: uv sync --group lint
- name: "Linting: ruff check"
run: "ruff check ."
run: "uv run ruff check ."
- name: "Linting: ruff format"
run: "ruff format --check --diff ."
run: "uv run ruff format --check --diff ."


markdown-lint:
Expand All @@ -94,9 +102,9 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: "Linting: markdownlint"
uses: DavidAnson/markdownlint-cli2-action@v20
uses: DavidAnson/markdownlint-cli2-action@v21
with:
config: .markdownlint.yaml
globs: |
Expand All @@ -110,7 +118,7 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Check workflow files
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Expand Down Expand Up @@ -156,7 +164,7 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true
- name: Install NodeJS
Expand All @@ -172,7 +180,7 @@ jobs:
with:
python-version: "3.12"
- name: Install UV
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v7
with:
version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
- name: Install dependencies
Expand All @@ -191,15 +199,15 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install UV
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v7
with:
version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
- name: Install dependencies
Expand All @@ -217,7 +225,7 @@ jobs:
timeout-minutes: 5
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true

Expand All @@ -239,7 +247,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand All @@ -254,15 +261,16 @@ jobs:
timeout-minutes: 30
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install UV
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v7
with:
version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-groups --all-extras
- name: Mypy Tests
Expand Down Expand Up @@ -301,7 +309,7 @@ jobs:
timeout-minutes: 30
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
- name: Set up Python
uses: actions/setup-python@v6
with:
Expand All @@ -311,7 +319,7 @@ jobs:
RUNNER_NAME=$(echo "${{ runner.name }}" | grep -o 'ghrunner[0-9]\+' | sed 's/ghrunner\([0-9]\+\)/ghrunner_\1/')
echo "PYTEST_DEBUG_TEMPROOT=/var/lib/github/${RUNNER_NAME}/_temp" >> $GITHUB_ENV
- name: Install UV
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v7
with:
version: "${{ needs.prepare-environment.outputs.UV_VERSION }}"
- name: Install dependencies
Expand Down Expand Up @@ -339,14 +347,14 @@ jobs:
# timeout-minutes: 30
# steps:
# - name: "Check out repository code"
# uses: "actions/checkout@v5"
# uses: "actions/checkout@v6"

# - name: "Extract target branch name"
# id: extract_branch
# run: echo "TARGET_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV

# - name: "Checkout infrahub repository"
# uses: "actions/checkout@v5"
# uses: "actions/checkout@v6"
# with:
# repository: "opsmill/infrahub"
# path: "infrahub-server"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
with:
version: ${{ needs.prepare-environment.outputs.UV_VERSION }}

- name: Check out repository code
uses: "actions/checkout@v5"
- name: "Check out repository code"
uses: "actions/checkout@v6"
Comment on lines +49 to +50
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

actions/checkout v6 breaking changes from v5 GitHub Actions

💡 Result:

Short summary of breaking changes from actions/checkout v5 → v6

  • persist-credentials behavior changed: credentials are no longer written directly into the checked-out repo’s .git/config; they are persisted to a file under $RUNNER_TEMP and referenced from .git/config. This is a security hardening to avoid accidental credential exfiltration. [1][2]

  • Minimum runner requirement for scenarios that read the persisted credentials from containerized actions: Actions Runner v2.329.0. (v5 required v2.327.1 for its node runtime change; v6’s new persist-credentials behavior is the primary compatibility change.) [1][3]

Notes: if your workflows (or custom scripts/docker builds) previously relied on the token being stored directly in the repo tree, update them to use the new persisted-credentials location or disable persist-credentials. [2]

Sources: [1] actions/checkout README (v6 notes), [2] GitHub Community discussion on v6 security changes, [3] v6 release notes summary.


Validate actions/checkout@v6 compatibility and update handling of persisted credentials.

There is a breaking change between v5 and v6: credential persistence behavior changed for security hardening. In v5, credentials are written directly to .git/config; in v6, they are persisted to a file under $RUNNER_TEMP and referenced from .git/config. If any custom scripts or Docker builds in this workflow (or dependent actions) access git credentials directly from the repository tree, they must be updated to use the new persisted-credentials location or explicitly set persist-credentials: false. Additionally, ensure the runner version is at least v2.329.0 to support the new persist-credentials behavior.

🤖 Prompt for AI Agents
.github/workflows/publish-pypi.yml lines 49-50: the workflow uses
actions/checkout@v6 which changed credential persistence; update the workflow to
either explicitly set persist-credentials: false on the checkout step if your
jobs/tools expect credentials in .git/config, or update any custom
scripts/Docker builds to read credentials from the new persisted-credentials
file under $RUNNER_TEMP; also ensure the GitHub-hosted runner is at least
v2.329.0 (or pin a compatible runner) so the new persist-credentials behavior
works correctly.

with:
submodules: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
latest_tag: ${{ steps.release.outputs.latest_tag }}
steps:
- name: "Check out repository code"
uses: "actions/checkout@v5"
uses: "actions/checkout@v6"
with:
submodules: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
path: source-repo

- name: Checkout target repository
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
repository: opsmill/infrahub-docs
token: ${{ secrets.PAT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-submodule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Trigger submodule update
run: |
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang

<!-- towncrier release notes start -->

## [1.16.0](https://github.com/opsmill/infrahub-sdk-python/tree/v1.16.0) - 2025-12-01

### Added

- Added infrahubctl branch report command to help with cleaning up branches in Infrahub.

### Changed

- Updated behaviour for recursive lookups for the conversion of nested relationships. Note that this change could cause issues in transforms or generators that use the convert_query_response feature if "id" or "__typename" isn't requested for nested related objects. ([#389](https://github.com/opsmill/infrahub-sdk-python/issues/389))
- The project now uses `uv` instead of `poetry` for package and dependency management.

### Removed

- Remove `is_visible` property from infrahub
- Removed support for Python 3.9 (end of life)

## [1.15.1](https://github.com/opsmill/infrahub-sdk-python/tree/v1.15.1) - 2025-11-13

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions docs/_templates/sdk_template_reference.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following filters are those that are [shipped with Jinja2](https://jinja.pal

<!-- vale off -->
| Name | Trusted |
|----------|----------|
| ---- | ------- |
{% for filter in builtin %}
| {{ filter.name }} | {% if filter.trusted %}✅{% else %}❌{% endif %} |
{% endfor %}
Expand All @@ -20,7 +20,7 @@ The following filters are those that are [shipped with Jinja2](https://jinja.pal
The following Jinja2 filters from <a href="https://netutils.readthedocs.io">Netutils</a> are included within Infrahub.
<!-- vale off -->
| Name | Trusted |
|----------|----------|
| ---- | ------- |
{% for filter in netutils %}
| {{ filter.name }} | {% if filter.trusted %}✅{% else %}❌{% endif %} |
{% endfor %}
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/infrahubctl/infrahubctl-branch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $ infrahubctl branch [OPTIONS] COMMAND [ARGS]...
* `list`: List all existing branches.
* `merge`: Merge a Branch with main.
* `rebase`: Rebase a Branch with main.
* `report`: Generate branch cleanup status report.
* `validate`: Validate if a branch has some conflict and...

## `infrahubctl branch create`
Expand Down Expand Up @@ -118,6 +119,26 @@ $ infrahubctl branch rebase [OPTIONS] BRANCH_NAME
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch report`

Generate branch cleanup status report.

**Usage**:

```console
$ infrahubctl branch report [OPTIONS] BRANCH_NAME
```

**Arguments**:

* `BRANCH_NAME`: Branch name to generate report for [required]

**Options**:

* `--update-diff`: Update diff before generating report
* `--config-file TEXT`: [env var: INFRAHUBCTL_CONFIG; default: infrahubctl.toml]
* `--help`: Show this message and exit.

## `infrahubctl branch validate`

Validate if a branch has some conflict and is passing all the tests (NOT IMPLEMENTED YET).
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/python-sdk/reference/templating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following filters are those that are [shipped with Jinja2](https://jinja.pal

<!-- vale off -->
| Name | Trusted |
|----------|----------|
| ---- | ------- |
| abs | ✅ |
| attr | ❌ |
| batch | ❌ |
Expand Down Expand Up @@ -71,7 +71,7 @@ The following filters are those that are [shipped with Jinja2](https://jinja.pal
The following Jinja2 filters from <a href="https://netutils.readthedocs.io">Netutils</a> are included within Infrahub.
<!-- vale off -->
| Name | Trusted |
|----------|----------|
| ---- | ------- |
| abbreviated_interface_name | ✅ |
| abbreviated_interface_name_list | ✅ |
| asn_to_int | ✅ |
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/python-sdk/topics/object_file.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ spec:

The `parameters` field controls how the data in the object file is processed before loading into Infrahub:

| Parameter | Description | Default |
|-----------|-------------|---------|
| Parameter | Description | Default |
| -------------- | ------------------------------------------------------------------------------------------------------- | ------- |
| `expand_range` | When set to `true`, range patterns (e.g., `[1-5]`) in string fields are expanded into multiple objects. | `false` |

When `expand_range` is not specified, it defaults to `false`.
Expand Down
3 changes: 2 additions & 1 deletion infrahub_sdk/async_typer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import asyncio
import inspect
from collections.abc import Callable
from functools import partial, wraps
from typing import Any, Callable
from typing import Any

from typer import Typer

Expand Down
4 changes: 2 additions & 2 deletions infrahub_sdk/batch.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from __future__ import annotations

import asyncio
from collections.abc import AsyncGenerator, Awaitable, Generator
from collections.abc import AsyncGenerator, Awaitable, Callable, Generator
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from .node import InfrahubNode, InfrahubNodeSync
Expand Down
Loading