Skip to content

chore: regenerate protocols for the number pool range kind - #1371

Merged
ajtmccarty merged 2 commits into
feature-number-pools-1.12from
pmi-number-pool-range-protocols
Oct 8, 2026
Merged

ajtmccarty merged 2 commits into
feature-number-pools-1.12from
pmi-number-pool-range-protocols

Conversation

@polmichel

@polmichel polmichel commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

Infrahub gains a CoreNumberPoolRange core kind, and CoreNumberPool gains a ranges
relationship while its start_range and end_range become optional.

Needed by opsmill/infrahub#10682.

What changed

infrahub_sdk/protocols.py only, regenerated.

Relates to

Infrahub companion PR: opsmill/infrahub#10682


🤖 Generated with Claude Code

https://claude.ai/code/session_01TgXERZQRu7W5V8zCyUEAVA


Summary by cubic

Aligns the SDK with Infrahub's new number pool range kind. CoreNumberPool gains a ranges relationship, its start_range/end_range become optional, and the new CoreNumberPoolRange kind is added to infrahub_sdk/protocols.py.

  • Golden generator fixtures are regenerated to import the new CoreNumberPoolRange and CoreNumberPoolRangeSync symbols.

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

View guided diff Turn on auto-fix

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: d68a764
Status: ✅  Deploy successful!
Preview URL: https://b8e06980.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pmi-number-pool-range-protoc.infrahub-sdk-python.pages.dev

View logs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                     Coverage Diff                      @@
##             feature-number-pools-1.12    #1371   +/-   ##
============================================================
  Coverage                             ?   86.82%           
============================================================
  Files                                ?      152           
  Lines                                ?    14759           
  Branches                             ?     1982           
============================================================
  Hits                                 ?    12815           
  Misses                               ?     1381           
  Partials                             ?      563           
Flag Coverage Δ
integration-tests 42.41% <100.00%> (?)
python-3.10 60.96% <100.00%> (?)
python-3.11 60.96% <100.00%> (?)
python-3.12 60.96% <100.00%> (?)
python-3.13 60.95% <100.00%> (?)
python-3.14 60.96% <100.00%> (?)
python-filler-3.12 22.87% <0.00%> (?)

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

Files with missing lines Coverage Δ
infrahub_sdk/protocols.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polmichel
polmichel marked this pull request as ready for review September 20, 2026 10:53
@polmichel
polmichel requested a review from a team as a code owner September 20, 2026 10:53

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="changelog/+number-pool-ranges-schema-models.added.md">

<violation number="1" location="changelog/+number-pool-ranges-schema-models.added.md:1">
P3: This is the only newsfragment in the PR, but it covers only the schema-model side. The headline user-visible change — regenerate `infrahub_sdk/protocols.py` to add the `CoreNumberPoolRange`/`CoreNumberPoolRangeSync` kinds and the `ranges` relationship on `CoreNumberPool` — has no release note, so SDK users won't learn that a new node kind is queryable/creatable through protocols. The repo already release-notes protocol surface changes (`+protocols-peer-types.changed.md`, `+protocols-sort-by-class-name.changed.md`). Mention the protocol addition here, or add a second fragment for it.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@@ -0,0 +1 @@
The schema models accept `parameters.ranges` on NumberPool attributes, a list of `start`/`end` ranges with an optional `weight`. The `start_range`/`end_range` shorthand is now optional and deprecated: a NumberPool attribute declared without any range is submitted as such instead of receiving a default range.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: This is the only newsfragment in the PR, but it covers only the schema-model side. The headline user-visible change — regenerate infrahub_sdk/protocols.py to add the CoreNumberPoolRange/CoreNumberPoolRangeSync kinds and the ranges relationship on CoreNumberPool — has no release note, so SDK users won't learn that a new node kind is queryable/creatable through protocols. The repo already release-notes protocol surface changes (+protocols-peer-types.changed.md, +protocols-sort-by-class-name.changed.md). Mention the protocol addition here, or add a second fragment for it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At changelog/+number-pool-ranges-schema-models.added.md, line 1:

<comment>This is the only newsfragment in the PR, but it covers only the schema-model side. The headline user-visible change — regenerate `infrahub_sdk/protocols.py` to add the `CoreNumberPoolRange`/`CoreNumberPoolRangeSync` kinds and the `ranges` relationship on `CoreNumberPool` — has no release note, so SDK users won't learn that a new node kind is queryable/creatable through protocols. The repo already release-notes protocol surface changes (`+protocols-peer-types.changed.md`, `+protocols-sort-by-class-name.changed.md`). Mention the protocol addition here, or add a second fragment for it.</comment>

<file context>
@@ -0,0 +1 @@
+The schema models accept `parameters.ranges` on NumberPool attributes, a list of `start`/`end` ranges with an optional `weight`. The `start_range`/`end_range` shorthand is now optional and deprecated: a NumberPool attribute declared without any range is submitted as such instead of receiving a default range.
</file context>
Suggested change
The schema models accept `parameters.ranges` on NumberPool attributes, a list of `start`/`end` ranges with an optional `weight`. The `start_range`/`end_range` shorthand is now optional and deprecated: a NumberPool attribute declared without any range is submitted as such instead of receiving a default range.
The generated `infrahub_sdk/protocols.py` now exposes the `CoreNumberPoolRange` node kind and a `ranges` relationship on `CoreNumberPool`. The schema models accept `parameters.ranges` on NumberPool attributes, a list of `start`/`end` ranges with an optional `weight`. The `start_range`/`end_range` shorthand is now optional and deprecated: a NumberPool attribute declared without any range is submitted as such instead of receiving a default range.

@polmichel
polmichel changed the base branch from infrahub-develop to stable October 7, 2026 08:10
@polmichel
polmichel added this pull request to stack #1403 October 7, 2026 08:10
@polmichel
polmichel removed this pull request from stack #1403 October 7, 2026 08:11
@polmichel
polmichel changed the base branch from stable to infrahub-develop October 7, 2026 08:11
@polmichel
polmichel added this pull request to stack #1404 October 7, 2026 08:11
polmichel and others added 2 commits October 8, 2026 08:30
CoreNumberPool gains a ranges relationship and its start_range and end_range
become optional; the new CoreNumberPoolRange kind is added.

Generated from the Infrahub core models, not written by hand.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TgXERZQRu7W5V8zCyUEAVA
… kind

The generator builds its import line by introspecting infrahub_sdk.protocols,
so regenerating that module in 100d6b3 to add CoreNumberPoolRange changed the
output for every user schema. The golden fixtures still carried the previous
import line, failing test_render_user_schema_matches_golden.

Only line 9 changes in each fixture, gaining CoreNumberPoolRange and
CoreNumberPoolRangeSync.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ajtmccarty
ajtmccarty force-pushed the pmi-number-pool-range-protocols branch from 046c20d to d68a764 Compare October 8, 2026 15:30
@ajtmccarty
ajtmccarty removed this pull request from stack #1404 October 8, 2026 15:31
@ajtmccarty
ajtmccarty changed the base branch from infrahub-develop to feature-number-pools-1.12 October 8, 2026 15:31
@ajtmccarty
ajtmccarty added this pull request to stack #1411 October 8, 2026 15:48
@ajtmccarty
ajtmccarty merged commit 1c3277b into feature-number-pools-1.12 Oct 8, 2026
30 checks passed
@ajtmccarty
ajtmccarty deleted the pmi-number-pool-range-protocols branch October 8, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants