feat: Add asynchronous SBOM support - #4543
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4543 +/- ##
==========================================
- Coverage 98.54% 98.54% -0.01%
==========================================
Files 196 196
Lines 17938 17981 +43
==========================================
+ Hits 17677 17719 +42
- Misses 261 262 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No, in general we do not attempt to anticipate what users of these methods wish to do with the responses.
No, for the same reason stated above.
I find having a I'm thinking that either we don't need both or we need better names for both and maybe much clearer documentation as to WHEN to use one method over another. |
I agree. I was a little worried about submitting a PR that removes existing functionality 😅 On November 13 GitHub plans to replace the synchronous workflow used by I'm now wondering if it would be clearer to split |
Adds
GenerateSBOMandFetchSBOMto generate and retrieve SBOMs asynchronously.x-ratelimit-resourceon live requests.sbomwrapper. I compared both responses from one repository and found the same fields, soFetchSBOMwraps the download to return the existingSBOMtype.Testing
Tests cover generation, polling, redirects, downloads, errors, and rate-limit selection. Manually tested generation and download with a scratch program against large public repositories and private repositories.
Questions
SBOMGeneration.UUID()worth keeping? Generation and fetching are usually called together, so I figured this would save callers the trouble of extracting the UUID themselves.FetchSBOMreturn the existingSBOMtype for consistency withGetSBOM, or returnSBOMInfodirectly to match the unwrapped download?AI disclosure: assisted with implementation, tests, and this PR body.