v1.23.0
1.23.0 - 2026-08-19
Removed
- Removed
client.branch.diff_data()from both the async and sync clients. The method relied on aGET /api/diff/dataREST endpoint that does not exist in Infrahub, so every call returned a 404. Useclient.get_diff_tree()to retrieve the full diff of a branch against its base branch, orclient.get_diff_summary()for the list of changed nodes; both use theDiffTreeGraphQL query. (#325)
Added
- Added the Infrahub deployment ID to the
infrahubctl infocommand output and aget_server_information()method (returning the server version and deployment ID) on the async and sync clients. (#1017) - Added transparent retry of HTTP 429 (rate-limited) responses on both
InfrahubClientandInfrahubClientSync. Retries use jittered exponential backoff and honour a server-providedRetry-Afterheader (delta-seconds or HTTP-date). The behaviour is tunable through four newConfigfields (rate_limit_retry_enabled,rate_limit_max_retries,rate_limit_backoff_base,rate_limit_backoff_max), and a newRateLimitErrorexception is raised when retries are exhausted. (#1124) - Added support for tagging SDK requests with a priority via a new
X-Priorityheader. APriorityenum (high,medium,low) is available frominfrahub_sdk.constants; setConfig.priority(env varINFRAHUB_PRIORITY) for a client-wide default emitted on every request, or passpriority=to individual operations to override it per request. When unset, no header is sent. Works identically onInfrahubClientandInfrahubClientSync. (#1151) - Add
infrahubctl schema formatcommand, an opinionated offline formatter that normalises the key ordering of schema files. Optional flags can also strip redundant default values (--strip-defaults), sort attributes/relationships byorder_weight(--sort-by-order-weight), and backfill a missingorder_weight(--backfill-order-weight). - Added
retry()andcancel()methods to the task manager. TheTaskmodel now exposesavailable_actionsalong withcan_retry/can_cancelhelpers. - Added an opt-in
include_diagnosticsflag to the task manager'sall(),filter(), andget()methods. When enabled, tasks expose anerrorfield, andwebhook-sendtasks are returned asWebhookDeliveryTaskinstances carryinghttp_request/http_responsedelivery details. - Added support for the new
IPAddressattribute kind. Values are exposed as bareipaddress.IPv4Address/IPv6Addressobjects (no prefix) and serialized to a bare-address string when writing, alongside the existingIPHostandIPNetworkkinds. - The JSON schema generated for
.infrahub.ymlnow warns when a definition has not said what it depends on, so YAML language servers flag it while the file is being edited. A Python transform or generator definition with nowatchblock is flagged, and so is awatchvalue that is not a mapping, including the barewatch:that parses as null and records nothing. Both warnings are advisory only: the models still accept every one of those forms. An emptywatch: {}orfiles: []stays clean, since either one records that the author checked and nothing beyond what Infrahub detects needs watching. The generated schema also picks up thewatchblock on generator definitions, which it was previously rejecting as an unknown property. - The request priority (
X-Priorityheader) can now be carried on the client'sRequestContextvia a newpriorityfield, alongside the existing client-wideConfig.prioritydefault and per-callpriority=override. Resolution precedence is per-callpriority=>request_context.priority>Config.priority> no header. The priority is emitted as a header only and is never included in the mutation body. Works identically onInfrahubClientandInfrahubClientSync. - Import
pyarrowlazily in the line-delimited JSON importer so thatinfrahubctlcommands other thanobject loadno longer require thectlextra (and its heavypyarrowdependency) to be installed.
Changed
-
Paginated queries generated by
all(),filters(),get()and resource pool allocation lookups now passoffsetandlimitas GraphQL variables instead of inlining them in the query text. The query document stays identical across pages, allowing the Infrahub server to reuse its cached query analysis, and the query is now rendered once per call instead of once per page.generate_query_dataalso accepts variable placeholder strings (for example"$offset") for itsoffsetandlimitarguments. -
Raised the default
Config.rate_limit_max_retriesfrom 5 to 10, so a request shed with HTTP 429 keeps retrying (honouringRetry-After) for longer before raisingRateLimitError. This lets background work ride out a longer burst of server-side backpressure. Callers that prefer to give up sooner can lower the value. -
The hand-maintained schema models in
infrahub_sdk.schemaare now backed by the generated write/read contract (infrahub_sdk.schema.generated). Public names, import paths, and behavior methods are unchanged, but a few defaults and constraints now match the server contract:AttributeKind.STRINGhas been removed. It was deprecated andkind="String"was already rejected server-side; useAttributeKind.TEXTinstead.- Write and read models drop unknown fields silently (
extra="ignore"). A submitted field that is not part of the write contract — read-level, internal, or a typo — is dropped rather than rejected, and a read model tolerates additional fields returned by a newer server. - Write-model defaults now match the server contract: relationship
min_count/max_countdefault to0(wasNone), nodebranchdefaults to"aware",generate_profiledefaults toTrue, andgenerate_templatedefaults toFalse. This changes the round-trip output of programmatically-built schemas.
Constructing
AttributeSchema(name=..., kind=AttributeKind.TEXT, ...),NodeSchema,GenericSchema,RelationshipSchema,SchemaRoot, and the read-side*APImodels continues to work unchanged.