IHS-114: Fix diff url
Closed
SO
3mo ago+2+2+0123456789-1-1-0123456789
Why
The SDK's URL builder was missing a ? separator before query parameters, producing malformed URLs like /api/diff/databranch=test-branch&branch_only=true.
Closes https://github.com/opsmill/infrahub-sdk-python/issues/325
What changed
- Fixed SDK URL bug —
InfraHubBranchManagerBase.generate_diff_data_urlwas concatenating query params without a?separator; now correctly produces/api/diff/data?branch=...&branch_only=....
How to review
python_sdk/infrahub_sdk/branch.py:82— the one-character URL fix (+ "?" +)
Impact & rollout
- Backward compatibility: additive only
- Performance: no impact on existing endpoints
- Config/env changes: none
- Deployment notes: safe to deploy
Checklist
- Tests added/updated
- Changelog entry added (
uv run towncrier create ...) - External docs updated (if user-facing or ops-facing change)
- Internal .md docs updated (internal knowledge and AI code tools knowledge)
Summary by CodeRabbit
- Bug Fixes
- Fixed query parameter formatting in diff data URLs to ensure proper query string construction.