Repository navigation
Manual merge develop into infrahub-develop - #1450
Merged
polmichel merged 29 commits intoOct 26, 2026
Merged
Conversation
fetch() on the ancestors or descendants of a node that was retrieved without them raises ValueError before any request is sent. Cover the async and the sync managers, from the reload to the resolved peers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fetch() on a cardinality-many relationship that was not loaded reloads the node and removed the relationship's name from a list of the schema's relationship and attribute names. ancestors and descendants are not schema relationships, so the removal raised ValueError before any request was sent. Build the list without that name instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fetch() on a cardinality-many relationship that was not loaded reloads the parent node with only that relationship. The reload wrote that copy to the client store, replacing the stored node with one that has no attribute values. The reload now passes populate_store=False. fetch() on a node without an id now raises UninitializedError instead of "At least one filter must be provided to get()". The arguments of the reload move to _reload_kwargs() on RelationshipManagerBase, shared by the async and the sync manager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Config.clone(branch=...) and infrahubctl --branch wrote the branch into default_branch, which the flag ignores, so the client fell back to the local Git branch. A generator run with --branch then read from the requested branch and created or updated nodes on the Git branch. When a branch is requested, the config now turns the flag off. Fixes #1295
feat: add Python 3.15 support
Merge stable into develop
Passing a RelatedNode (for example a peer taken from another node's relationship) to a cardinality-many list, RelationshipManager.add(), RelationshipManager.remove() or a cardinality-one assignment stored the RelatedNode object itself as the peer ID. Saving then sent invalid GraphQL and remove() matched nothing. RelatedNodeBase now copies only the peer identifiers (id, hfid, __typename, kind, display_label) from another RelatedNodeBase, which replaces the cardinality-one special case in _init_relationships. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Both callers passed self.node, so _reload_kwargs() now reads it and no caller can pass a different node. The check that the node has an id moves into the method from both fetch() methods; fetch() still raises UninitializedError before any request. Declare node on RelationshipManagerBase as optional, and with the specific node type on each subclass, the same way as infrahub-develop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge stable into develop
…1427) * chore(agents): suggest running Infrahub CI for changes Infrahub uses The CI of this repository does not run Infrahub's own tests, which use the SDK from the python_sdk submodule. A rule for files under infrahub_sdk/ asks the agent to suggest a draft, do-not-merge pull request in opsmill/infrahub before such a change is merged, and a guide lists the steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(agents): fix the commands and scope of the Infrahub CI guide The guide's gh pr create command had no body, so it failed outside a terminal. The up-to-date check read the submodule HEAD instead of the pinned commit, and the rule for other base branches matched Infrahub stable for every SDK branch. The rule now also loads for pyproject.toml, whose dependencies Infrahub resolves, and AGENTS.md keeps only the ask-first entry so the when-to-suggest text lives in the rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(agents): say to check huge-runner-gate before reading backend results Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merge stable into develop
…-iprqa fix: honour a requested branch when default_branch_from_git is enabled
…7b9d4 fix(sdk): fix fetch() on relationships that were not loaded
Merge stable into develop
…infrahub-develop-1440 # Conflicts: # docs/docs/python-sdk/sdk_ref/infrahub_sdk/node/relationship.mdx # infrahub_sdk/node/node.py # infrahub_sdk/node/relationship.py # tests/unit/sdk/test_client.py # uv.lock
`develop` moved the cardinality-one peer identifier stripping out of `_init_relationships` and into `RelatedNodeBase.__init__`, where it also covers cardinality-many lists, `add()` and `remove()`. `infrahub-develop` kept the old block and added the `present` flag and the `_bind()` call around it. Take the removal from `develop` and keep the binding from `infrahub-develop`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each branch added `RelationshipManagerBase._reload_kwargs` on its own, so the merge left two definitions of it and the second shadowed the first. The merged method keeps all three behaviours: - It reads `self.node` and raises `UninitializedError` when the manager has no node or the node has no `id`, from `develop`. - It reloads with `only` when the node itself was read with `only`, from `infrahub-develop`. - It passes `populate_store=False` on both paths, so the narrow copy it reads does not replace the stored node, from `develop`. Both call sites now read the hoisted `reload_kwargs` local and no longer pass the node. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both branches added statements to `__init__`, and together they put it over the 50 statement limit ruff enforces. `_peer_input()` now narrows another related node to its peer identifiers and `_is_peer_node()` holds the lazy import that detects a peer node instance. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`infrahub-develop` added `read_fixture` and `develop` added `GitRepoManager` and `change_directory`, each on the same import line. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both branches resolved the lockfile against a different `requires-python` and a different set of extras. Regenerated from the merged `pyproject.toml`, which widens `requires-python` to `<3.16` and keeps the extras `infrahub-develop` restructured. No package version changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Each branch documented a different exception under `fetch`. Regenerated from the merged docstrings, which list both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Deploying infrahub-sdk-python with
|
| Latest commit: |
021597e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1367f525.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://pmi-merge-develop-infrahub-d-0i6s.infrahub-sdk-python.pages.dev |
`develop` widened `requires-python` to `<3.16` and added 3.15 to the unit test matrix. The lockfile kept the versions `infrahub-develop` had resolved against `<3.15`, and they still satisfied the constraints in `pyproject.toml`, so regenerating it did not move them. `uv sync` on 3.15 then had to build them from source and `pyarrow` 23.0.1 failed on cmake. Upgrade the packages that publish no cp315 wheel to the versions `develop` already locks: pyarrow, markupsafe, orjson, pydantic, pydantic-core, regex, rpds-py and ujson, and psutil with them. The versions left without a cp315 wheel are not built on 3.15: pyarrow 25.0.1 and rpds-py 0.30.0 are marked for Python below 3.11, pywin32 is Windows only, and pyyaml and ruamel-yaml-clib build from their sdist at the same versions `develop` runs green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #1450 +/- ##
====================================================
+ Coverage 87.38% 87.44% +0.05%
====================================================
Files 154 154
Lines 15257 15266 +9
Branches 2058 2059 +1
====================================================
+ Hits 13332 13349 +17
+ Misses 1369 1359 -10
- Partials 556 558 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The previous commit also upgraded markupsafe, orjson, pydantic, pydantic-core, regex, rpds-py, ujson and psutil, on the grounds that they publish no cp315 wheel. Lacking a wheel only means uv builds them from their sdist, which pyyaml and ruamel-yaml-clib already do on 3.15 without failing, so those upgrades were never shown to be needed. Keep the pyarrow upgrade, which the CI log named as the build that failed, and let CI say whether anything else has to move. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Upgrading pyarrow alone was not enough: CI then failed on rpds-py 0.28.0, whose PyO3 0.27.1 refuses to build against a Python newer than 3.14. The packages that have to move are the ones binding Python through PyO3, not every package without a cp315 wheel. The same log shows markupsafe, regex, ujson, pyyaml and ruamel-yaml-clib compiling from their sdist on 3.15 without complaint, so they stay where they are. Upgrade rpds-py, orjson and pydantic with pydantic-core, alongside the pyarrow upgrade of the previous commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolving the uv.lock conflict by taking the destination version and regenerating kept the versions infrahub-develop had pinned and dropped the ones develop had moved. `uv lock` reads pyproject.toml and the lockfile it is given, so regenerating from one side reproduces that side's decisions rather than merging both. Bring the merged lockfile up to the versions develop locks, for the packages where develop is ahead: infrahub-testcontainers, markupsafe, psutil, pywin32, regex and ujson. Two versions stay off develop's. `ty` 0.0.74 is infrahub-develop's own upgrade and is newer than develop's 0.0.14. `infrahub-testcontainers` lands on 1.11.9, a patch released after both branches locked it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
polmichel
marked this pull request as ready for review
October 26, 2026 09:49
gmazoyer
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #1440, which was blocked on merge conflicts.
Merges
developintoinfrahub-develop. The merge commit keeps the conflict markers, so each resolution below is a reviewable diff of its own.Conflicts resolved
infrahub_sdk/node/node.py—developmoved the peer identifier stripping intoRelatedNodeBase.__init__, where it also coversadd()andremove();infrahub-developkept the old block and added thepresentflag and the_bind()call. Took the removal, kept the binding. (d4bd613c)infrahub_sdk/node/relationship.py— both branches added_reload_kwargs; see the next section. (fc1e5d8d)tests/unit/sdk/test_client.py— each branch added imports on the same line. Kept both. (1b2aacc8)uv.lockanddocs/.../node/relationship.mdx— generated, regenerated rather than hand-merged._reload_kwargs needs a reviewer
Each branch added this method on its own, so the merge left two definitions with no conflict marker on them and the second shadowed the first.
infrahub-develop'sonly=handling would have shipped as dead code.The merged method, in
fc1e5d8d, keeps all three behaviours:self.nodeand raisesUninitializedErroron an unsaved node, fromdevelop.onlywhen the node itself was read withonly, frominfrahub-develop.populate_store=Falseon both paths, fromdevelop.Changes beyond the conflicts
Two changes were needed that no conflict marker pointed at.
infrahub_sdk/node/related_node.py(ba9b26b9) merged cleanly, but both branches had added statements toRelatedNodeBase.__init__and together they crossed the 50 statement limit ruff enforces. Split out_peer_input()and_is_peer_node().uv.lock(2cd998de,8fdea99f,461372f2,021597e2) needed more than a regeneration, becausedevelopadds Python 3.15 andinfrahub-develophad never built against it:developalready locks.pyarrowpublishes no cp315 wheel and fails to build from its sdist, and the PyO3 extensionsrpds-py,orjsonandpydantic-coreare refused by PyO3 itself, which accepts no Python newer than 3.14 at those versions.develophad locked are carried over. Regenerating the lockfile keeps the pins of whichever side it starts from, sodevelop's had to be restored package by package.The lockfile now matches
developeverywhere exceptty, whichinfrahub-developupgraded further, andinfrahub-testcontainers, where a patch newer than both branches exists.Checks
ruff, ty and mypy pass locally,
docs-validateexits 0, and 2954 unit tests pass. CI covers the matrix from 3.10 to 3.15 and the integration tests against a running Infrahub, which are not run locally.🤖 Generated with Claude Code