arcade-services
arcade-services copied to clipboard
Add darc get-asset support for filtering by build/commit digest
Usage Scenario:
I have asset A from a particular build that I can lookup with get-asset. I know that same build produced asset B as well. How can I use darc to find the version of asset B from the same build?
Today, the only way I know how to do this is to lookup asset B without a filter and then search the results/output locally. This is inconvenient especially when the build in requestion exceeds the default age range. get-assets can be extremely slow in this scenario. What I would like is an option that lets me apply a filter on the build or commit digest.
cc @mmitche
+1 to this
I have asset A from a particular build that I can lookup with get-asset. I know that same build produced asset B as well. How can I use darc to find the version of asset B from the same build?
I don't follow - wouldn't asset A and B from the same build have the same version?
However, I think I understand the ask, it would be these new options:
darc get-asset --build [ID] # Something like SELECT asset WHERE build_id = [ID]
and
darc get-asset --commit [ID]] # Something like SELECT asset JOIN builds ON build_id WHERE builds.commit = [ID]
(I don't know the exact SQL schema yet but I imagine something like this)
I have a PR for half of this - the build ID is already implemented on the server side - https://github.com/dotnet/arcade-services/pull/2722
The SHA filter will be more complicated
I don't follow - wouldn't asset A and B from the same build have the same version?
No - several repos have multiple versioning schemes for their assets. For example command-line-api versions things differently based on if they are a shipping or non-shipping asset.
This fell through the cracks but starting Wednesday, it should be possible to do darc get-asset --build 202035