Support #8749
closedPipelineInstance script parameters filling
Description
Lets say we've created a PipelineInstance from the PipelineTemplate with several components, each of them has a set of script parameters (e.g. each of Collection dataclass). From now on we can fill this parameters via Workbench, but I need to do this via native Arvados API call (do a HTTP request). How can I handle this?
The thing here is that parameters path inside the PipelineInstance json body is somethig like this:
/components/one_of_the_components/script_parameters/one_of_the_parameters
And you can't PUT the only parameters like this:
PUT https://qr1hi.arvadosapi.com/arvados/v1/pipeline_instances/xyzzy-ldvyl-vyydjeplwaa6emg?pipeline_instance[components][one_of_the_components][script_parameters][one_of_the_parameters]=<portable_datahash>
This would null all the siblings propreties inside the components.
Something like JSON Patch (https://tools.ietf.org/html/rfc6902) would handle this.
Is there the only way to solve this — PUT whole (filled with parameters) components body?
Updated by Brett Smith over 8 years ago
Alexander Afanasyev wrote:
Is there the only way to solve this — PUT whole (filled with parameters) components body?
Alexander,
At the API level, this is the only method supported today. This is what all the clients do, including Workbench. They fill in new values for each component input, and then update the entire components field. Supporting something richer like JSON Patch is definitely something we can consider.
You aren't limited to Workbench today. We also have a command line client to start a pipeline instance from a template and fill in inputs, arv pipeline run
. Would that maybe meet your needs?
If you need to do this at the API level, and you're comfortable with Ruby, you might like to refer to the code arv pipeline run
uses to fill in an update components.
Updated by Alexander Afanasyev over 8 years ago
- Status changed from New to Closed
Got it.
Thank you, Brett!