Skip to content

IHS-88: Fix sync_with_git default, set to False#1025

Open
solababs wants to merge 1 commit into
stablefrom
sb-15052026-fix-sync-with-git-default-ihs-88
Open

IHS-88: Fix sync_with_git default, set to False#1025
solababs wants to merge 1 commit into
stablefrom
sb-15052026-fix-sync-with-git-default-ihs-88

Conversation

@solababs
Copy link
Copy Markdown
Contributor

@solababs solababs commented May 15, 2026

Why

client.branch.create() defaulted sync_with_git to True, while the UI and the infrahubctl branch create CLI both default to False.

This PR aligns the programmatic SDK API with the UI default.

Closes #224

What changed

  • Behavioral change: InfrahubBranchManager.create() and InfrahubBranchManagerSync.create() now default sync_with_git to False. Callers that already pass the argument explicitly are unaffected.

Impact & rollout

  • Backward compatibility: Breaking change for callers relying on the implicit True default. Changelog entry added (changelog/224.changed.md).

Checklist

  • Tests added/updated
  • Changelog entry added (changelog/224.changed.md)

Summary by cubic

Aligns SDK branch creation default with the UI and CLI by setting sync_with_git to False. Addresses IHS-88 and prevents unexpected Git syncs when creating branches via the SDK.

  • Bug Fixes

    • Default sync_with_git=False in InfrahubBranchManager.create() and InfrahubBranchManagerSync.create().
  • Migration

    • If you relied on the old implicit True default, pass sync_with_git=True explicitly.

Written for commit 876c9d0. Summary will update on new commits.

@solababs solababs requested a review from a team as a code owner May 15, 2026 07:43
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

No issues found across 2 files

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable    #1025   +/-   ##
=======================================
  Coverage   81.54%   81.54%           
=======================================
  Files         134      134           
  Lines       11467    11467           
  Branches     1735     1735           
=======================================
  Hits         9351     9351           
  Misses       1569     1569           
  Partials      547      547           
Flag Coverage Δ
integration-tests 41.71% <ø> (ø)
python-3.10 54.59% <ø> (+0.01%) ⬆️
python-3.11 54.59% <ø> (ø)
python-3.12 54.59% <ø> (+0.01%) ⬆️
python-3.13 54.59% <ø> (+0.01%) ⬆️
python-3.14 54.57% <ø> (ø)
python-filler-3.12 22.66% <ø> (ø)

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.53% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@ajtmccarty ajtmccarty left a comment

Choose a reason for hiding this comment

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

I think this is technically a breaking change, so would be good to make that a little more clear in the changelog. in the infrahub release notes we have a Breaking Changes section for a release

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.

bug: Change sync_with_git default to True

2 participants