IHS-114: Fix diff url

Closed
SO
3mo ago
+2-1

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_url was concatenating query params without a ? separator; now correctly produces /api/diff/data?branch=...&branch_only=....

How to review

  1. 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.