Add MERGE_FAILED to the BranchStatus enum#1123
Open
ajtmccarty wants to merge 1 commit into
Open
Conversation
Mirrors the server-side status so SDK clients can read a branch left in MERGE_FAILED by failed-merge detection instead of crashing on validation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## infrahub-develop #1123 +/- ##
====================================================
+ Coverage 82.15% 82.16% +0.01%
====================================================
Files 138 138
Lines 11897 11899 +2
Branches 1784 1784
====================================================
+ Hits 9774 9777 +3
+ Misses 1575 1572 -3
- Partials 548 550 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
gmazoyer
approved these changes
Jul 2, 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.
Why
The server added a durable
BranchStatus.MERGE_FAILEDfor failed-merge detection (infrahub PR #9783). Any SDK client (branch.get()/branch.all()) that encounters a branch left inMERGE_FAILEDcurrently crashes with a pydanticValidationError, because the SDK'sBranchStatusenum does not include the value.What changed
MERGE_FAILED = "MERGE_FAILED"toinfrahub_sdk.branch.BranchStatus, mirroring the server enum.Notes
Paired with infrahub PR #9783 (US2 failed-merge detection); the infrahub submodule pointer references this commit so its integration test can read a
MERGE_FAILEDbranch.🤖 Generated with Claude Code
Summary by cubic
Added
MERGE_FAILEDtoinfrahub_sdk.branch.BranchStatusso the SDK can read branches left in a failed-merge state without validation errors. Aligns with the server’s durable status for failed-merge detection and supports IFC-2437.Written for commit 30c2bd3. Summary will update on new commits.