Merge stable into develop#1107
Open
infrahub-github-bot-app[bot] wants to merge 5 commits into
Open
Conversation
…tes (#1106) The ValidationError raised by _validate_upsert claimed the upsert "cannot resolve the HFID without a concrete value", implying a backend crash. Since #312 the SDK no longer sends the HFID in the upsert payload, so that premise is stale. The real problem is different: a CoreNumberPool assigns a new value on every creation, so a pool-sourced HFID attribute is never stable, an upsert can never match an existing node by it, and every run would silently create a duplicate. Reword the error message and docstring to describe this, and point to the idempotent alternatives (look the node up by a stable field and reuse it, or set an explicit id). Update the resource manager guide to match and replace the misleading "two-step pattern" with the lookup-and-reuse pattern that the demo generators actually use. Add an integration test characterising the real backend behaviour (a no-id upsert creates and allocates the pool value; a re-run duplicates) and extend the unit test to cover the new message. Refs #339, #396
Deploying infrahub-sdk-python with
|
| Latest commit: |
4179e7a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://46b82172.infrahub-sdk-python.pages.dev |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chore: upgrade Spec Kit
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #1107 +/- ##
========================================
Coverage 82.15% 82.16%
========================================
Files 138 138
Lines 11896 11896
Branches 1784 1784
========================================
+ Hits 9773 9774 +1
+ Misses 1575 1572 -3
- Partials 548 550 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
chore: add opsmill agentic skills for commit, PR, and issue workflows
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.
Merging stable into develop after merging pull request #1106.
Summary by cubic
Clarified the upsert guard for pool-sourced HFID attributes to prevent non-idempotent
save(allow_upsert=True)calls. Upgraded Spec Kit to0.11.9and added OpsMill agent skills with shared quality gates plus theagent-contextextension to keep coding agent context files in sync after specify/plan.New Features
quality-gatesand a ship-gate check hook to enforce independent verification.agent-contextextension andspeckit.agent-context.updateto refresh managed sections in agent context files (supports multiple files and configurable markers), wired to run after specify and plan; includes bash/powershell scripts.Bug Fixes
_validate_upsertininfrahub_sdk/node/node.pyto explain the non-idempotent behavior ofCoreNumberPool-sourced HFID attributes; updated the resource manager guide; added unit and integration tests capturing backend behavior and the new message.Written for commit 4179e7a. Summary will update on new commits.