Open dsabsay opened 5 years ago
I've discovered the workaround: Default parameter evaluation seems to work if I change the parameter type from "array" to "string", like so:
---
name: test_config_default
pack: ers
runner_type: mistral-v2
description: test
enabled: true
entry_point: workflows/test_config_default.yaml
parameters:
hosts:
type: string
required: true
default: "{{ config_context.install_pack.environment }}"
In this case, the ActionChain which calls test_config_default
passes the correct value to test_config_default
from the pack configuration.
So, the above issue applies to parameters of type "array" but not those of type "string".
SUMMARY
In an ActionChain, when calling a Mistral workflow that has a default parameter defined from the pack configuration, the parameter default is not loaded from configuration, resulting in an error when trying to run the Mistral workflow. It appears like the Jinja expression defining the default parameter is not being rendered:
STACKSTORM VERSION
st2 2.8.1, on Python 2.7.6
OS, environment, install method
StackStorm Docker on macOS.
Steps to reproduce the problem
First, a Mistral workflow with a default parameter from the pack configuration:
Now, an ActionChain that calls this Mistral workflow:
Run the test_config_default Mistral workflow:
Great, the default param was loaded from the pack config. But now run the test_action_chain:
Again, appears as the the Jinja expression is not even being evaluated before being passed as an input to the test_config_default action.
Notably, the test_config_default action (with the param default from config) can be called from a Mistral workflow:
Run test_mistral:
Expected Results
I would expect calling test_config_default from the ActionChain above to be successful, as it is when calling it from a Mistral workflow.
Actual Results
Calling test_config_default from an ActionChain does not work. Calling it from a Mistral workflow does work.