Repository navigation
Merge infrahub-release-1.12 into infrahub-develop - #1465
Merged
infrahub-github-bot-app[bot] merged 2 commits intoOct 29, 2026
Merged
Conversation
update_group() returned early whenever a run tracked zero members, so it never diffed the previous membership against the empty set. A generator that legitimately produced nothing, or a repository whose last object file was removed, left every previously tracked node behind as an orphan. With delete_unused_nodes=True a run that tracks nothing now prunes an existing group; one with no group creates none, and an already-empty group is not re-saved. A context reused without finding a group has nothing to reap. The reap deletes on the tracking context's branch rather than the client's default branch, and both context-manager exits reset the client mode in a finally block so a raising update_group() cannot leave the client tracking. delete_unused() attempts every candidate and returns a ReapResult instead of raising. A failure about the member is recorded against it and the rest are still attempted; the refused members stay in the group so a later run retries them, and update_group() reports them together as TrackingGroupCleanupError, again on every run until whatever blocks the deletion is removed. A failure about the request stops the reap and is re-raised as itself rather than recorded against each remaining member. That includes a timeout and an unreachable server, and also the coded failures the GraphQL path raises as a GraphQLError: an expired or missing token, and a branch that is gone, merged, needs a rebase or is locked by a merge. The group write is attempted first, listing this run's nodes plus the refused members and the ones never reached, so an interrupted reap cannot leave the nodes the run created in no group at all. The member whose delete was interrupted is kept only when the server answered: without an answer the delete may have gone through, and a write naming a node that no longer exists is rejected. When the write fails too, the error that stopped the reap is raised with the write's failure as its cause. A member already removed by another member's cascade is tolerated through the catalogue's NodeNotFoundError, with the legacy message check kept only for servers that report no code. The async and sync contexts share the decisions around the reap and the write, keeping only their own calls. TrackingGroupCleanupError is exported from infrahub_sdk.exceptions, survives pickling, and infrahubctl renders it as a table of each member and the server's reason rather than a traceback. The changed contract of delete_unused() and the new exception type get a changed fragment of their own.
fix(tracking): reconcile tracking groups on runs that save no nodes
Deploying infrahub-sdk-python with
|
| Latest commit: |
23386bd
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1d7bd873.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://infrahub-release-1-12.infrahub-sdk-python.pages.dev |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## infrahub-develop #1465 +/- ##
====================================================
+ Coverage 87.57% 87.74% +0.17%
====================================================
Files 155 155
Lines 15431 15518 +87
Branches 2078 2085 +7
====================================================
+ Hits 13513 13616 +103
+ Misses 1358 1345 -13
+ Partials 560 557 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
infrahub-github-bot-app
Bot
merged commit Oct 29, 2026
1444d2f
into
infrahub-develop
30 checks passed
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 infrahub-release-1.12 into infrahub-develop after merging pull request #1278.
Summary by cubic
Merges
infrahub-release-1.12intoinfrahub-develop, bringing in the tracking group reconciliation fixes after PR #1278.Written for commit 23386bd. Summary will update on new commits.