Support for passing variables and resources in shell executor
Hi there, was wondering if there was any plan to support windmill's variable and resource types as script input arguments.
Currently using a variable as an argument doesn't expand it, instead it displays the the path of the variable.
Also I didn't find a way to specify a type for a resource argument, even using the
customize
pane.
I know bash does not have types but I think expanding either the string value of the variable or the JSON of the resource as a string should be the behaviour. We can always leverage cli tools such as jq
to extract the data we want.
I'm well aware that it's possible to get specific variables and resources from inside a shell script but I'm truly looking for parametrisation here.15 Replies
Currently using a variable as an argument doesn't expand it, instead it displays the the path of the variable.Just so you know, if you pass $var:path or $res:path it will work as you expect so we actually have a way to do this that I think is somewhat clean, to use customize with the format Resource and inside the body you use the path to fetch it this way, this is still legit bash and the UI has a nice resource select box
well thing is couldn't find it here. Or that's just not where it is.
yeah it's missing
as for the variable I get this
But I'm on the old EE version so that might have been fixed in fact.
Pretty sure I had still the variable issue on latest CE let me check
hm thatt looks like a bug
I get the exact same variable issue on CE
yes, it's a bug specific to bash
TODO fix variable not being interpolated in bash as arg
TODO add back for string: resource-path format
And same issue for the resource type missing apparently
I think resources is gonna be a wontdo
or maybe we should do resources
it's just that i'm not sure how to assign them to variables
we could do that as plaintext of the json I guess
imo raw json is okay
ok fair
jq to extract data from it
then TODO resources as well
I will give it a pass today if I finish everything
Yep no problem
I can satisfy my use case by making an http request from any other programming language anyway so