Repository navigation
chore: regenerate protocols for the number pool range kind - #1371
Conversation
Deploying infrahub-sdk-python with
|
| 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 |
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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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. | |||
There was a problem hiding this comment.
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>
| 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. |
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>
046c20d to
d68a764
Compare
Why
Infrahub gains a
CoreNumberPoolRangecore kind, andCoreNumberPoolgains arangesrelationship while its
start_rangeandend_rangebecome optional.Needed by opsmill/infrahub#10682.
What changed
infrahub_sdk/protocols.pyonly, 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.
CoreNumberPoolgains arangesrelationship, itsstart_range/end_rangebecome optional, and the newCoreNumberPoolRangekind is added toinfrahub_sdk/protocols.py.CoreNumberPoolRangeandCoreNumberPoolRangeSyncsymbols.Written for commit d68a764. Summary will update on new commits.