OS::Mistral::Workflow "input" property is confusing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
New
|
Undecided
|
Unassigned |
Bug Description
The OS::Mistral:
You'd be forgiven for thinking that the values thus provided would be used as inputs to the workflow when it is run.
In fact, the values are never passed to Mistral at all. The "input" field in the Mistral API is a list, not a dict, and contains only the names of inputs. Heat passes the dictionary keys for this list. Starting an execution of the workflow via the Mistral API without providing the values again will fail due to missing inputs. This breaches the basic Heat design principle that resource types should reflect the underlying APIs as closely as possible.
(I believe that you can trigger the workflow by signalling the resource in Heat, and in this case the input values *are* used. So the design is intentional, but unusable.)
It's difficult to know how to fix this without breaking backwards compatibility. However, it's also worth noting that it's currently impossible to simply include a workflow definition YAML file in a Heat template using get_file due to subtle differences such as this, and to the fact that the entire properties dict (as opposed to individual property values) of a resource cannot be supplied by get_file. So it might be worth creating a separate resource type that simply accepts a workflow definition YAML file as a property.
Changed in heat: | |
milestone: | none → no-priority-tag-bugs |