google / oss-rebuild

Securing open-source package ecosystems by originating, validating, and augmenting build attestations.
Apache License 2.0
23 stars 3 forks source link

Separate out AssetStore path API #90

Closed msuozzo closed 1 week ago

msuozzo commented 2 weeks ago

Previously, The reader and writer apis had an ad hoc additional return value which was the ill-defined "resource path" for that asset. This change breaks that out into a more formal API and uses URLs as the medium of exchange.

As for the design choice to split out the URL() method into a separate interface: I found it useful to have users of this function declare in their signatures exactly where they want to "break out" of accessing assets exclusively through the AssetStore.

loosebazooka commented 2 weeks ago

any chance you can add a short summary to the PR description?

msuozzo commented 2 weeks ago

any chance you can add a short summary to the PR description?

Yeah good call. Done.

loosebazooka commented 2 weeks ago

I'm little hesitant to review this, wondering if you're okay waiting for William to get back on this one?

msuozzo commented 2 weeks ago

I'm little hesitant to review this, wondering if you're okay waiting for William to get back on this one?

Happy to reassign. It touches a bunch of files but really only meaningfully in ~3 spots (remoterebuild.go, ui.go, and the no-op interface change in internal/api/apiservice/rebuild.go).