Skip to content

Add MERGE_FAILED to the BranchStatus enum#1123

Open
ajtmccarty wants to merge 1 commit into
infrahub-developfrom
ifc-2437-add-merge-failed-branch-status
Open

Add MERGE_FAILED to the BranchStatus enum#1123
ajtmccarty wants to merge 1 commit into
infrahub-developfrom
ifc-2437-add-merge-failed-branch-status

Conversation

@ajtmccarty

@ajtmccarty ajtmccarty commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Why

The server added a durable BranchStatus.MERGE_FAILED for failed-merge detection (infrahub PR #9783). Any SDK client (branch.get() / branch.all()) that encounters a branch left in MERGE_FAILED currently crashes with a pydantic ValidationError, because the SDK's BranchStatus enum does not include the value.

What changed

  • Added MERGE_FAILED = "MERGE_FAILED" to infrahub_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_FAILED branch.

🤖 Generated with Claude Code


Summary by cubic

Added MERGE_FAILED to infrahub_sdk.branch.BranchStatus so 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.

Review in cubic

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>
@ajtmccarty ajtmccarty requested a review from a team as a code owner July 2, 2026 03:50

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

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     
Flag Coverage Δ
integration-tests 41.17% <0.00%> (+0.06%) ⬆️
python-3.10 55.25% <0.00%> (+<0.01%) ⬆️
python-3.11 55.23% <0.00%> (-0.03%) ⬇️
python-3.12 55.25% <0.00%> (-0.01%) ⬇️
python-3.13 55.25% <0.00%> (-0.01%) ⬇️
python-3.14 55.23% <0.00%> (-0.01%) ⬇️
python-filler-3.12 22.76% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
infrahub_sdk/branch.py 68.96% <100.00%> (+0.21%) ⬆️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants