You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ce03d4c
Browse filesBrowse the repository at this point in the historyBrowse files
Fail scan comparisons with missing or invalid package lists (#461)
* Fail with exit 3 when a scan comparison returns no artifacts
When the diff-scan poll returned a finished comparison whose artifacts
were null and whose incomplete flag was unset, get_diff_scan_artifacts
raised a plain Exception. get_added_and_removed_packages treated that
like any other failure of the diff-scans flow and fell back to the
streaming comparison, whose response has no incomplete flag. The run
then reported on a comparison nobody had checked for completeness.
A finished comparison without an artifacts object now raises
IncompleteComparisonError, which skips the fallback and maps to the
infrastructure exit code (3, --exit-code-on-api-error, or 0 under
--disable-blocking). Failures of the flow itself (missing token scopes,
transient errors, the polling timeout, a truncated response) still fall
back to streaming as before.
* Keep the streaming fallback when the response has no diff_scan object
The SDK's diffscans.get returns {} for statuses it doesn't raise on (204, an
unfollowed 3xx). That response says nothing about the comparison, so it falls
back to streaming as it did in 2.13.0 instead of exiting 3 with a message
claiming the API finished the comparison. Only a returned diff_scan whose
artifacts are null, missing or not an object raises the incomplete-comparison
error, and its message now says that.
* Bump version to 2.13.3
2.13.2 was released from main, so this change needs the next patch version.
---------
Co-authored-by: lelia <2418071+lelia@users.noreply.github.com>
0 commit comments