Repository navigation
Add the cost attributes to the GraphQL query protocols [INFP-739] - #1414
Draft
fatih-acar wants to merge 1 commit into
Draft
fatih-acar wants to merge 1 commit into
fatih-acar wants to merge 1 commit into
Conversation
… protocols [INFP-739] Infrahub adds two read-only, optional attributes to CoreGraphQLQuery: cost_level (unknown, low or high) and cost_estimate (JSON), in opsmill/infrahub#11004. This file is generated from that schema by `invoke backend.generate` in the Infrahub repository, so it carries the same attributes on CoreGraphQLQuery and CoreGraphQLQuerySync. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying infrahub-sdk-python with
|
| Latest commit: |
b92578a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://51c95360.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://fac-graphql-query-cost-proto.infrahub-sdk-python.pages.dev |
fatih-acar
added a commit
to opsmill/infrahub
that referenced
this pull request
Oct 11, 2026
INFP-739] opsmill/infrahub-sdk-python#1414 adds cost_level and cost_estimate to the CoreGraphQLQuery protocols, so `invoke backend.validate-generated` finds the SDK protocols up to date. The commit is on top of the SDK stable branch, which also brings dependency bumps and the fix that makes generators, transforms and checks use the configured default branch (opsmill/infrahub-sdk-python#1293). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Draft
4 of 5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## stable #1414 +/- ##
=======================================
Coverage 85.06% 85.06%
=======================================
Files 148 148
Lines 13303 13286 -17
Branches 1960 1950 -10
=======================================
- Hits 11316 11302 -14
+ Misses 1422 1421 -1
+ Partials 565 563 -2
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:
|
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.
Why
In opsmill/infrahub#11004, Infrahub adds two read-only, optional attributes to
CoreGraphQLQuery:cost_level:unknown,loworhighcost_estimate: JSON with the estimated database rows of one run of the stored queryThis file is generated from that schema, so it has to carry the same attributes. Without them,
invoke backend.generatein the Infrahub repository leaves this file changed, and thebackend-validate-generatedjob fails on opsmill/infrahub#11004.Needed by opsmill/infrahub#11004, part of INFP-739.
What changed
cost_levelandcost_estimateare added toCoreGraphQLQueryandCoreGraphQLQuerySync.Nothing else.
invoke backend.generatein the Infrahub repository renders the file; it is not written by hand.How to review
One commit on top of
stable, four added lines. The Infrahub submodule on opsmill/infrahub#11004 pinsde03cbf, which is 12 commits behindstable.infrahub_sdk/protocols.pyis the same in both.How to test
In opsmill/infrahub, on the branch of opsmill/infrahub#11004, with
python_sdkat this branch:Local result: the file on this branch is the output of
invoke backend.generateon that branch.ruff checkandruff format --checkreport no errors.Impact & rollout
Assisted-by: opsmill-dev-pr 0.2.0
🤖 Generated with Claude Code
Summary by cubic
Adds the
cost_levelandcost_estimateattributes toCoreGraphQLQueryandCoreGraphQLQuerySyncin the Python SDK protocols.infrahub_sdk/protocols.pyis generated from the Infrahub schema viainvoke backend.generatein the Infrahub repository. Infrahub (opsmill/infrahub#11004) adds these two read-only, optional attributes toCoreGraphQLQuery, so the generated protocols must carry them or thebackend-validate-generatedjob fails. This PR adds only the two missing attributes, with no other changes.Written for commit b92578a. Summary will update on new commits.