Repository navigation
Merge infrahub-release-1.12 into infrahub-develop - #1474
Merged
infrahub-github-bot-app[bot] merged 1 commit intoNov 3, 2026
Merged
Conversation
…pool (#1469) * fix(node): refuse every edit of a relationship that takes its peers as fields The mutation of such a relationship takes the fields of a peer, not a reference to one, so add(), extend() and remove() could not reach Infrahub: add() and extend() dropped the peer without an error, and remove() sent the remaining peers as references, which Infrahub refused. They now raise FeatureNotSupportedError and name the ways out that work. The relationships concerned are listed as (name, peer) pairs, so another relationship to the same kind of node stays editable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(docs): regenerate the relationship reference Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ctl): tell --set apart on object create and object update A relationship whose mutation takes the peers' fields does reach Infrahub on a create, so object create refuses only a value that names peers by reference and lets a JSON list of their fields through. An update sends the peers the node was fetched with, so object update refuses every value and names the create that upserts the node. Both report the refusal before any change is applied, and the reason they give comes from the constant the SDK message is built from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(spec): reproduce the ranges an object file declares being created on their own The two tests fail: loading the file sends a CoreNumberPoolRange mutation of its own next to the pool, which Infrahub refuses as overlapping the range the pool holds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(spec): send the ranges an object file declares with the pool itself A relationship whose mutation takes the peers' fields now travels in the payload of the node that declares it, in both forms an object file accepts for a list of objects. A list of references stays a list of references. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(spec): expand the peers a file's parameters expand before sending them The branch that sends the peers' fields with their node read the list under `data` as it stands, while the validation pass runs it through the processors first. A file with `parameters: {expand_range: true}` was therefore validated expanded and saved unexpanded. Both passes now read the same peers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix(ctl): refuse an object that names a peer in --set The create guard read a list of objects as the fields of the peers, so an object holding an id, an hfid or a node went through and failed against the server instead of reporting the refusal. The keys that name a peer now have one definition, which the node side reads as well. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(spec): expand the peers with the parameters of the whole file The branch that sends the peers' fields read the parameters of the relationship alone, while the validation pass falls back to the parameters of the file. A file that sets expand_range for everything it holds was therefore validated expanded and saved unexpanded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs(python-sdk): state that editing the peer list is not supported Describing what each save path does with an edit invited readers to rely on one of them. The guide and the docstring now name the complete list as the way to set the ranges. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(docs): regenerate the relationship reference Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(spec): shorten the comments on the inline-peer branch Each one now carries only what the code does not say: why these peers do not go through the deferred branch, and why the parameters fall back to the file's. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor(node): move the inline-peer rule out of the constants The table, the message and the predicate that reads them now live in a module of their own, keyed by peer kind so a kind can have more than one such relationship. The predicate loses its leading underscore: four modules in three packages read it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor(ctl): give the --set refusals their own module Both guards sat in a module named for everything the object commands share, and their tests in a test module named after it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(changelog): fold the object file into the entry that adds the ranges Nothing was released without it, so it is part of what the release adds rather than a fix. The integration test says why it processes the same file twice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * test(spec): drop the range expansion tests on a number pool Expansion turns a start into a string, which the Number attribute of a range does not take, so the tests pinned a payload Infrahub has no reason to accept. The parameters still travel, so validating and saving read the same peers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Deploying infrahub-sdk-python with
|
| Latest commit: |
c1cf8e2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0b4bf756.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://infrahub-release-1-12.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #1474 +/- ##
====================================================
+ Coverage 87.74% 87.81% +0.07%
====================================================
Files 155 157 +2
Lines 15517 15575 +58
Branches 2085 2094 +9
====================================================
+ Hits 13615 13677 +62
+ Misses 1345 1341 -4
Partials 557 557
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
infrahub-github-bot-app
Bot
merged commit Nov 3, 2026
04a9322
into
infrahub-develop
30 checks passed
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.
Merging infrahub-release-1.12 into infrahub-develop after merging pull request #1469.