Skip to content

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

Merged
infrahub-github-bot-app[bot] merged 1 commit into
infrahub-developfrom
infrahub-release-1.12
Oct 28, 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 Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

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


Summary by cubic

Merges the infrahub-release-1.12 branch into develop, bringing the number pool SDK enhancements and a fix for repeated from_pool requests.

** New Features**

  • attach_to_pool() and detach_from_pool() let a chosen number be tracked by or removed from a number pool on the next save.
  • get_pool_allocations() lists a pool's held resources with provenance, showing whether the pool allocated each number or a user provided it.
  • A CoreNumberPool can be created or upserted with its ranges declared inline instead of as empty objects.

** Bug Fixes**

  • A from_pool request is sent once: after a successful save, the next update no longer sends it again.

Written for commit 4847741. Summary will update on new commits.

View guided diff Turn on auto-fix

…#1463)

* feat(node): attach a held number to a number pool or detach it [IFC-3333]

Number attributes have attach_to_pool() and detach_from_pool(), sent on the
next save. An attribute built with both value and from_pool now sends both,
so the pool tracks the given number instead of allocating a new one. A pool
write is sent once: a pending flag is cleared after a successful mutation,
while _from_pool stays set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(node): list a pool's allocations with their provenance [IFC-3367]

Resource pool nodes have get_pool_allocations(), which returns PoolAllocation
entries: the node id, kind, branch, display label, identifier and whether the
pool allocated the number or a user provided it (None for IP pools). It needs
Infrahub 1.12 or later. get_pool_allocated_resources() shares the paging loop
but still leaves provenance out of its query, so it keeps working on older
servers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(node): declare a number pool's ranges on create and upsert [IFC-3369]

A relationship whose peer kind is CoreNumberPoolRange takes the peer's fields
as mutation input instead of a reference, as Infrahub's NumberPoolRangeInput
does. A CoreNumberPool can therefore be created with ranges given as dicts of
start, end and allocation_weight, and an upsert sets an existing pool's ranges
to the declared list. Before, each range was sent as an empty object, which
Infrahub read as one range without a start or an end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(integration): number pool ranges, attach/detach and provenance on Infrahub 1.12

Covers creating a pool with declared ranges and setting them by upsert,
attaching and detaching numbers (including a detach before the first save),
the provenance get_pool_allocations reports, and the attribute's source after
an attach. The class is skipped unless INFRAHUB_TESTING_IMAGE_VER is 1.12 or
later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): split the from_pool fix and shorten the provenance entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(node): move the detach comment onto the branch it describes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(node): check a detached attribute keeps its number

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Aaron McCarty <19253956+ajtmccarty@users.noreply.github.com>
@infrahub-github-bot-app
infrahub-github-bot-app Bot requested a review from a team as a code owner October 28, 2026 15:23
@github-actions github-actions Bot added the type/documentation Improvements or additions to documentation label Oct 28, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4847741
Status: ✅  Deploy successful!
Preview URL: https://310ff18b.infrahub-sdk-python.pages.dev
Branch Preview URL: https://infrahub-release-1-12.infrahub-sdk-python.pages.dev

View logs

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.61017% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
infrahub_sdk/protocols_base.py 0.00% 0 Missing and 4 partials ⚠️
@@                 Coverage Diff                  @@
##           infrahub-develop    #1464      +/-   ##
====================================================
+ Coverage             87.48%   87.57%   +0.08%     
====================================================
  Files                   155      155              
  Lines                 15350    15431      +81     
  Branches               2064     2078      +14     
====================================================
+ Hits                  13429    13513      +84     
+ Misses                 1362     1358       -4     
- Partials                559      560       +1     
Flag Coverage Δ
integration-tests 42.38% <8.47%> (-0.16%) ⬇️
python-3.10 61.92% <66.94%> (+0.01%) ⬆️
python-3.11 61.92% <66.94%> (+0.01%) ⬆️
python-3.12 61.94% <66.94%> (+0.03%) ⬆️
python-3.13 61.92% <66.94%> (+0.01%) ⬆️
python-3.14 61.92% <66.94%> (+0.01%) ⬆️
python-3.15 61.92% <66.94%> (+0.02%) ⬆️
python-filler-3.12 23.14% <29.66%> (+0.08%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/constants.py 94.44% <100.00%> (+1.11%) ⬆️
infrahub_sdk/node/__init__.py 100.00% <100.00%> (ø)
infrahub_sdk/node/attribute.py 100.00% <100.00%> (ø)
infrahub_sdk/node/constants.py 100.00% <100.00%> (ø)
infrahub_sdk/node/node.py 90.19% <100.00%> (+0.75%) ⬆️
infrahub_sdk/node/related_node.py 95.39% <100.00%> (+0.11%) ⬆️
infrahub_sdk/protocols_base.py 75.18% <0.00%> (-2.27%) ⬇️

... and 5 files 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 7aac211 into infrahub-develop Oct 28, 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