You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
I am using a pipeline parameter, and would like to use a Condition to switch on it existing / not existing. The condition I used is of the form parameter != '""'. When the parameter contains spaces (say parameter = "a b c"), it fails with:
This step is in Error state with this message: Invalid 'when' expression 'a b c != ""': Cannot transition token types from VARIABLE [a] to VARIABLE [b]
Another attempt with a, b, c results in:
This step is in Error state with this message: Expected boolean evaluation for 'a, b, c != ""'. Got [a b true]
A quick look at the generated yaml shows that the parameter is compared unquoted which means that comparing it to a single string breaks...
What did you expect to happen:
I expect one of two things:
There is a simple way to check for a single parameter to be set / not set that does not depend on the input containing strings
There is a way to sanitize (quote) the input parameters before comparison
Anything else you would like to add:
I think this might be related to #1933 as this parameter is for all intents and purposes a list that I then pass to a shell script. I don't mind doing bits of parsing myself for the time being, but I'd like to not have the pipeline crash when spaces are passed in.
The text was updated successfully, but these errors were encountered:
No, it seems like for most purposes, the value is interpreted literally. Stopgap fix I used is to replace spaces with underscores (most other separators won't work, as -/%& are numerical operators, ,;: are also argo operators).
I think this problem is related to the more general problem of having typed parameters in Kubeflow but for the moment, quoting predicate operators should be a good fix!
What happened:
I am using a pipeline parameter, and would like to use a Condition to switch on it existing / not existing. The condition I used is of the form
parameter != '""'
. When the parameter contains spaces (sayparameter = "a b c"
), it fails with:Another attempt with
a, b, c
results in:A quick look at the generated yaml shows that the parameter is compared unquoted which means that comparing it to a single string breaks...
What did you expect to happen:
I expect one of two things:
What steps did you take:
The pseudo-code:
Anything else you would like to add:
I think this might be related to #1933 as this parameter is for all intents and purposes a list that I then pass to a shell script. I don't mind doing bits of parsing myself for the time being, but I'd like to not have the pipeline crash when spaces are passed in.
The text was updated successfully, but these errors were encountered: