Feature #17187
closed[costanalyzer] feature improvements
Description
- specify UUIDs on command line without having to insert the word "--uuid" before each one
- specify collection UUID, meaning look up collection.properties.container_request and look up the cost of that CR
- output the total dollar amount on stdout
Updated by Ward Vandewege almost 4 years ago
- Status changed from New to In Progress
Updated by Ward Vandewege almost 4 years ago
Ready for review at 6f5431413448f52f3ae5c88553b7f7ee1532b9fd on branch 17187-costanalyzer-updates.
Updated by Tom Clegg almost 4 years ago
This is way more convenient, thanks.
$ arvados-client costanalyzer -output /tmp/ca --uuid su92l-4zz18-hry71275jl44dui ... 8.95688399
Specifying multiple collections/containers would be even more convenient if I could do this:
$ arvados-client costanalyzer -output /tmp/ca su92l-4zz18-a5a0ydd2feqcobz su92l-4zz18-2fmt581375q8tv6 su92l-4zz18-w1usu1jeq0jc1wm su92l-4zz18-4g3kijra6qx19k4
(Seems like we could treat everything in flag.Args() as a UUID after parsing other flags, unless we're reserving those positional args for something else?)
After accidentally testing collection UUIDs on an older version I noticed bogus --uuid
args are silently ignored:
$ arvados-client costanalyzer -output /tmp/ca --uuid bogus --uuid su92l-4zz18-hry71275jl44dui ... 8.95688399 $ echo $? 0 $ arvados-client costanalyzer -output /tmp/ca --uuid bogus Nothing to do! $ echo $? 0
Both of those cases should probably be considered errors.
This type assertion will panic on {"properties":{"container_request":["foo"]}}
-- should do a 2-value type assertion and return an error instead.
crUUID = value.(string)
Yet another feature request: now that I get total cost on stdout, I often don't even care about the details that get saved in the output dir, so it would be nice if -output=/dev/null
or -output=""
meant "don't bother writing any csv files" and I didn't need to create/specify a superfluous output dir -- perhaps that could even be the default?
Updated by Ward Vandewege almost 4 years ago
Ready for another look at 856fd8070951c570464dbcc2785c9be689d315b9 on the 17187-costanalyzer-updates branch.
Tom Clegg wrote:
Specifying multiple collections/containers would be even more convenient if I could do this:
(Seems like we could treat everything in flag.Args() as a UUID after parsing other flags, unless we're reserving those positional args for something else?)
I've changed it that way; uuids must now be listed at the end of the option list (and no more need to say '-uuid' first).
After accidentally testing collection UUIDs on an older version I noticed bogus
--uuid
args are silently ignored:
Both of those cases should probably be considered errors.
Done.
This type assertion will panic on
{"properties":{"container_request":["foo"]}}
-- should do a 2-value type assertion and return an error instead.
Done, nice catch!
Yet another feature request: now that I get total cost on stdout, I often don't even care about the details that get saved in the output dir, so it would be nice if
-output=/dev/null
or-output=""
meant "don't bother writing any csv files" and I didn't need to create/specify a superfluous output dir -- perhaps that could even be the default?
Sure, done. The '-output' argument is now optional.
Updated by Ward Vandewege almost 4 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Resolved
Applied in changeset arvados|01787232bc50632417b3e4bb9acea09e70472177.