OS::Mistral::Workflow "input" property is confusing

Bug #1641218 reported by Zane Bitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned

Bug Description

The OS::Mistral::Workflow resource has a property called "input", which is of type Map and is described as "Dictionary which contains input for workflow."

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.

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.