Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: DataDog/datadog-sync-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.8.0
Choose a base ref
...
head repository: DataDog/datadog-sync-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.8.1
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 3, 2026

  1. feat(sync_report): emit failure_class on ResourceOutcome for HTTP err…

    …ors (#587)
    
    Extend ResourceOutcome with an optional failure_class field that carries
    a structured error taxonomy. _sanitize_reason returns a (reason,
    failure_class) tuple; every emit call site forwards both values through.
    The field is omitempty in to_dict() so consumers that don't know it see
    no schema change.
    
    Today the only signal an NDJSON consumer has for why an outcome failed
    is the freetext reason string ("HTTP 500", "HTTP 403", "TimeoutError",
    ...). Consumers that want to count, alert, or branch on failure modes
    must pattern-match the string, which is fragile and duplicates
    classification logic that sync-cli already has at exception time. This
    PR exposes that classification directly as a structured enum on the
    outcome record.
    
    Schema change (additive, optional):
    
        {"type": "outcome", "resource_type": "...", "status": "failure",
         "reason": "HTTP 403", "failure_class": "http_4xx_403"}
    
    Canonical failure_class values:
        http_4xx_403   CustomClientHTTPError(403)
        http_4xx_404   CustomClientHTTPError(404)
        http_4xx_429   CustomClientHTTPError(429)
        http_4xx_other CustomClientHTTPError(other 4xx)
        http_5xx       CustomClientHTTPError(5xx)
        http_timeout   TimeoutError
        http_connection ResourceConnectionError
        unknown        generic Exception fallback
    
    The reason string format is unchanged — every value sync-cli emits today
    is still emitted in the same shape, so consumers that don't adopt the
    new field see no behavioral change.
    
    Tests: tests/unit/test_failure_class.py covers every _sanitize_reason
    branch, omitempty round-trips on to_dict, JSON serialisation, and the
    _emit call-site wiring including the dedicated inline except TimeoutError
    branch in _import_get_resources_cb.
    nathantournant authored Jun 3, 2026
    Configuration menu
    Copy the full SHA
    89b9898 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG (#588)

    Co-authored-by: dd-octo-sts[bot] <200755185+dd-octo-sts[bot]@users.noreply.github.com>
    dd-octo-sts[bot] authored Jun 3, 2026
    Configuration menu
    Copy the full SHA
    d84a6f4 View commit details
    Browse the repository at this point in the history
Loading