Skip to content

Merge infrahub-release-1.12 into infrahub-develop - #1474

Merged
infrahub-github-bot-app[bot] merged 1 commit into
infrahub-developfrom
infrahub-release-1.12
Nov 3, 2026
Merged

infrahub-github-bot-app[bot] merged 1 commit into
infrahub-developfrom
infrahub-release-1.12

Conversation

@infrahub-github-bot-app

@infrahub-github-bot-app infrahub-github-bot-app Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Merging infrahub-release-1.12 into infrahub-develop after merging pull request #1469.

View guided diff Turn on auto-fix

…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>
@infrahub-github-bot-app
infrahub-github-bot-app Bot requested a review from a team as a code owner November 3, 2026 10:06
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label Nov 3, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

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

View logs

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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              
Flag Coverage Δ
integration-tests 42.52% <38.70%> (+<0.01%) ⬆️
python-3.10 62.71% <74.19%> (+0.17%) ⬆️
python-3.11 62.71% <74.19%> (+0.17%) ⬆️
python-3.12 62.71% <74.19%> (+0.17%) ⬆️
python-3.13 62.70% <74.19%> (+0.17%) ⬆️
python-3.14 62.71% <74.19%> (+0.17%) ⬆️
python-3.15 62.70% <74.19%> (+0.15%) ⬆️
python-filler-3.12 23.15% <24.19%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/ctl/object/create.py 97.72% <100.00%> (+0.10%) ⬆️
infrahub_sdk/ctl/object/inline_peers.py 100.00% <100.00%> (ø)
infrahub_sdk/ctl/object/update.py 76.28% <100.00%> (+0.49%) ⬆️
infrahub_sdk/node/constants.py 100.00% <100.00%> (ø)
infrahub_sdk/node/inline_peers.py 100.00% <100.00%> (ø)
infrahub_sdk/node/related_node.py 95.41% <100.00%> (+0.01%) ⬆️
infrahub_sdk/node/relationship.py 93.82% <100.00%> (+0.34%) ⬆️
infrahub_sdk/spec/object.py 86.39% <100.00%> (+0.44%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@infrahub-github-bot-app
infrahub-github-bot-app Bot merged commit 04a9322 into infrahub-develop Nov 3, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant