input of workflow-get API is ambiguous
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
ali abdelal |
Bug Description
The input field returned by the workflow-get definition is a string in a certain format that can be read in different ways.
Consider the following two input sections:
input:
- first
- second: "value, third"
and:
input:
- first
- second: "value"
- third
In both cases the "input" field will be "first, second=value, third" - there is no way to distinguish between the input and its default value.
I believe "input" should not be a string but a list.
Each element in the list should be either a string (representing an input with no default value) or a one entry map.
API backward comparability should be considered obviously. Maybe there should be a new field called "input_list" or something.
Changed in mistral: | |
importance: | Undecided → High |
Changed in mistral: | |
status: | New → Triaged |
Changed in mistral: | |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
Changed in mistral: | |
milestone: | none → ussuri-2 |
assignee: | Renat Akhmerov (rakhmerov) → ali abdelal (alielal) |
Since this is an obvious bug in the initial design I tend to think we don't need to make a backwards compatible change. Additionally, this "input" field returned by the API is typically used as a hint for a human on what to provide to the workflow when it starts. For making a decision on what should be passed programatically (e.g. to prepare data sets for testing) this info is not enough anyway, it also needs to include at least data types.
So my suggestion is to keep representing "input" as a string but formatted a bit differently, so that the first example above will give:
'first, second="value, third"', so "second" should be represented the same way as it was initially, with quotes.