Manual merge stable into develop#1082
Merged
Merged
Conversation
GitRepoManager.initialize_repo() checked for `.git` with `.is_dir()`, which misses git worktrees (`.git` is a file containing `gitdir: ...`). The existing-repo branch was skipped and `Repo.init` then crashed with `FileExistsError` trying to mkdir the gitlink file. This made `infrahubctl transform` (and any other CLI relying on branch auto-detection) unusable from a worktree. Switch the check to `.exists()` — dulwich's `Repo(path)` already resolves the gitlink to the real controldir, and `porcelain.active_branch` returns the worktree's branch correctly.
fix(repository): detect existing repo when .git is a worktree gitlink
…on upsert A node hydrated by `from_graphql` from a partial response would silently null-clear any optional cardinality-one relationship the response did not fetch, because the serialization gate could not distinguish "never loaded" from "explicitly cleared". Add `_peer_has_been_mutated` on `RelatedNodeBase`, flipped by `Node.__setattr__` on explicit assignment, and require it in the gate. Mirrors the existing `value_has_been_mutated` pattern on attributes.
) Bumps [infrahub-testcontainers](https://github.com/opsmill/infrahub) from 1.9.7 to 1.9.8. - [Release notes](https://github.com/opsmill/infrahub/releases) - [Changelog](https://github.com/opsmill/infrahub/blob/stable/CHANGELOG.md) - [Commits](opsmill/infrahub@infrahub-v1.9.7...infrahub-v1.9.8) --- updated-dependencies: - dependency-name: infrahub-testcontainers dependency-version: 1.9.8 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ched-rels fix(node): preserve unfetched optional one-cardinality relationships on upsert
…evelop-20260616 # Conflicts: # infrahub_sdk/node/attribute.py
develop (94559a0) removed the CoreNodeBase import and switched to duck-typed hasattr(self.value, "is_resource_pool") checks. stable added the new is_unresolved_pool_attribute method still using isinstance(self.value, CoreNodeBase). Keep develop's refactored is_from_pool_attribute and port the new method to the hasattr style so it doesn't reference the now-unimported CoreNodeBase. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying infrahub-sdk-python with
|
| Latest commit: |
f7c5109
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b61ef1ab.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://merge-stable-into-develop-20.infrahub-sdk-python.pages.dev |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #1082 +/- ##
===========================================
- Coverage 82.25% 81.88% -0.37%
===========================================
Files 135 135
Lines 11970 11706 -264
Branches 1789 1770 -19
===========================================
- Hits 9846 9586 -260
Misses 1573 1573
+ Partials 551 547 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
ajtmccarty
approved these changes
Jun 16, 2026
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.
Supersedes #1077, which was blocked on merge conflicts.
Summary
Merges
stableintodevelop, bringing in the IHS-119 upsert/numberpool fix, the unfetched optional 1:1 relationship preservation fix, the.gitgitlink worktree detection fix, and theinfrahub-testcontainers1.9.8 dev bump.Conflicts resolved
infrahub_sdk/node/attribute.py—develop(94559a0, IHS-183) removed theCoreNodeBaseimport and switched the pool checks to duck-typedhasattr(self.value, "is_resource_pool");stableadded a newis_unresolved_pool_attributemethod still written againstisinstance(self.value, CoreNodeBase). Kept develop's refactoredis_from_pool_attributeand ported the new method to thehasattrstyle so it doesn't reference the now-unimportedCoreNodeBase. (f7c5109)All other files (
node.py,related_node.py,repository.py, tests,uv.lock, changelog fragments, SDK-ref docs) auto-merged cleanly.Conflicts raised for review
None — the single conflict was a mechanical consistency port of a refactor.
Validation
ruff checkon all changed modulesty+mypyonattribute.pytests/unit/sdk/pool,test_node.py,test_repository.py)attribute.mdxconfirmed in sync (regeneration produced no diff)Not run locally: CLI
docs-generate(pre-existingtyper/clickenv incompatibility, unrelated to this merge) and integration tests (require a running stack) — both will run in CI.🤖 Generated with Claude Code
Summary by cubic
Merge
stableintodevelopto bring in number pool upsert safeguards, preserve unfetched optional 1:1 relationships on save, add worktree-aware repo detection, and bump a dev dependency.Bug Fixes
CoreNumberPoolin HFID: raiseValidationErrorbefore network when HFID depends on an unresolved pool value; supports explicitidor create-then-update flow; updates docs and SDK ref (IHS-119).node.rel = None; prevents silent nulling from partial GraphQL payloads..gitgitlink files to open existing repos instead of re-initializing.Dependencies
infrahub-testcontainersto 1.9.8.Written for commit f7c5109. Summary will update on new commits.