feat: Add asynchronous SBOM support - #4543
tunztunztunz wants to merge 8 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4543 +/- ##
=======================================
Coverage 98.57% 98.57%
=======================================
Files 197 197
Lines 18252 18291 +39
=======================================
+ Hits 17991 18030 +39
Misses 261 261 ☔ 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 |
OK, so yes, I think it makes sense to officially deprecate the existing
Honestly, I'm fine either way, @Not-Dhananjay-Mishra might have some opinions about this. Please go ahead and address the earlier comments and add the deprecation comment and then I think we can continue with this PR. |
|
I think both designs are reasonable. But I am more inclined toward keeping only
|
|
@gmlewis Okay. I believe I addressed your comments.
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @tunztunztunz!
LGTM.
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.