Releases: opsmill/infrahub-sdk-python
Releases · opsmill/infrahub-sdk-python
Version 1.6.1
1.6.1 - 2025-01-16
Note This release resolves an issues with the 1.6.0 release that targeted an incorrect commit in the tree.
Added
- Replace GitPython with dulwich (#130)
Changed
- Added possibility to use filters for the SDK client's count method
Fixed
- Fixes issue where using
parallel
query execution could lead to excessive and unneeded GraphQL queries
Version 1.6.0
Version 1.5.0
1.5.0 - 2025-01-09
Added
- Adds
infrahubctl info
command to display information of the connectivity status of the SDK. (#109) - Add
count
method to both sync and async clients to retrieve the number of objects of a given kind (#158) - Add the ability to batch API queries for
all
andfilter
functions. (#159) client.all
andclient.filters
now supportorder
parameter allowing to disable order of retrieve nodes in order to enhance performances
Version 1.4.1
1.4.1 - 2025-01-05
Fixed
- Fixes an issue introduced in 1.4 that would prevent a node with relationship of cardinality one from being updated.
Version 1.4.0
1.4.0 - 2025-01-03
Changed
- The inclusion of properties for Attribute and Relationships by default has been disabled when querying nodes from Infrahub.
it can be enabled by using the parameterproperty
inclient.get|all|filters
method (#191) - Fix an issue with python-transform-unit-process failing to run (#198)
- Add processing of nodes when no variable are passed into the command to run generators (#176)
Version 1.3.0
1.3.0 - 2024-12-30
Added
Testing library (Alpha)
A new collection of tools and utilities to help with testing is available under infrahub_sdk.testing
.
The first component available is a TestInfrahubDockerClient
, a pytest Class designed to help creating integration tests based on Infrahub. See a simple example below to help you get started.
the installation of
infrahub-testcontainers
is required
import pytest
from infrahub_sdk import InfrahubClient
from infrahub_sdk.testing.docker import TestInfrahubDockerClient
class TestInfrahubNode(TestInfrahubDockerClient):
@pytest.fixture(scope="class")
def infrahub_version(self) -> str:
"""Required (for now) to define the version of infrahub to use."""
return "1.0.10"
@pytest.fixture(scope="class")
async def test_create_tag(self, default_branch: str, client: InfrahubClient) -> None:
obj = await client.create(kind="BuiltinTag", name="Blue")
await obj.save()
assert obj.id
Changed
- The Pydantic models for the schema have been split into multiple versions to align better with the different phase of the lifecycle of the schema.
- User input: includes only the options available for a user to define (NodeSchema, AttributeSchema, RelationshipSchema, GenericSchema)
- API: Format of the schema as exposed by the API in infrahub with some read only settings (NodeSchemaAPI, AttributeSchemaAPI, RelationshipSchemaAPI, GenericSchemaAPI)
Fixed
- Fix behaviour of attribute value coming from resource pools for async client (#66)
- Convert import_root to a string if it was submitted as a Path object to ensure that anything added to sys.path is a string
- Fix relative imports for the pytest plugin, note that the relative imports can't be at the top level of the repository alongside .infrahub.yml. They have to be located within a subfolder. (#166)
Version 1.2.0
1.2.0 - 2024-12-19
Added
- Add batch feature, that uses threading, to sync client (#168)
- Added
InfrahubClient.schema.in_sync
method to indicate if a specific branch is in sync across all worker types - Added Python 3.13 to the list of supported versions
Fixed
- Fix an issue with with
infrahubctl menu load
that would fail while loading the menu
Version 1.1.0
1.1.0 - 2024-11-28
Added
- Added InfrahubClient.schema.wait_until_converged() which allows you to wait until the schema has converged across all Infrahub workers before proceeding with an operation. The InfrahubClient.schema.load() method has also been updated with a new parameter "wait_until_converged".
Fixed
Version 1.1.0rc0
Version 1.0.1
1.0.1 - 2024-11-12
Removed
- Removed previously deprecated InfrahubTransform.init() method
Deprecated
- Marked InfrahubCheck.init() as deprecated and scheduled to be removed in Infrahub SDK 2.0.0
Added
- Adds
groups.group_add_subscriber
function to add a subscriber to a group. - Adds order_weight property to AttributeSchema and RelationSchema classes.
Fixed
- Fix generated GraphQL query when having a relationship to a pool node (#27)
- CTL: Fix support for relative imports for transforms and generators (#81)
- Fixes issues where InfrahubClient was not properly configured for a branch when running the
infrahubctl transform
,infrahubctl check
andinfrhubctl generator
commands. (#133) - Fixes an issue where a generator would not return any output if there are no members in the generator's target group.
Detailed Changelog
- stable to develop mergeback by @lykinsbd in #119
- bump version for next release by @lykinsbd in #120
- Rework ignore rules for mypy by @ogenstad in #121
- When using only the values of a dict use the
values()
method by @ogenstad in #122 - Move test from integration -> unit by @ogenstad in #123
- Add return type to generator run() by @ogenstad in #124
- Fix setting value of relationship of type pool by @gmazoyer in #118
- Add groups.group_add_subscriber by @LucasG0 in #125
- Fix relative module imports by @ogenstad in #128
- Change ctl check to not use InfrahubCheck.init() by @ogenstad in #126
- Fix relative imports for Python checks by @ogenstad in #131
- Make infrahubctl generator more verbose by @gmazoyer in #116
- Add order_weight by @ogenstad in #132
- sets branch on InfrahubClient when running
infrahubctl transform
infahubctl check
andinfrahubctl generator
by @wvandeun in #134
Full Changelog: v1.0.0...v1.0.1