The ansible plugin is throwing a NodeStepException with a failureData map that has a null value in a field:
e.getFailureData() == [
"message" : "ERROR: Ansible execution returned with non zero code.",
"ansible-config" : null
]
This is happening because when building failure data in the plugin, it’s trying to use theansible-config-file-path property which isn’t part of the AnsiblePlaybookInlineWorkflowNodeStep description.
This map must not have any null values because:
When the step execution finishes, the context logger tries to create a map<String,String> with the mentioned result data by calling the toString() method on each value. This results in a NullPointerException which isn't catched by the BaseWorkflowExecutor (for not being a StepException) not adding this error to the step result, thus, not running the error handler.
Expected Outcome:
the ansible plugin should not return null values on the StepException failure data map and not use properties that are not part of the plugin description
Proposed Solution:
Use the configuration map for the ansible-config field when an exception is cached in the plugin.
Problem:
The ansible plugin is throwing a
NodeStepException
with afailureData
map that has anull
value in a field:This is happening because when building failure data in the plugin, it’s trying to use the
ansible-config-file-path
property which isn’t part of theAnsiblePlaybookInlineWorkflowNodeStep
description.This map must not have any null values because:
Expected Outcome:
the ansible plugin should not return null values on the
StepException
failure data map and not use properties that are not part of the plugin descriptionProposed Solution:
Use the configuration map for the ansible-config field when an exception is cached in the plugin.