Bug #1655273 “Action error messages are difficult for humans and...” : Bugs : Mistral

Action error messages are difficult for humans and machines to read

Bug #1655273 reported by luong tuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Confirmed
Medium
Unassigned

Bug Description

Hi,

We use Mistral in our cases that ought to use some sophisticated action, the format is somehow below:

"Failed to run action [action_ex_id=29174b23-3d61-496c-ae77-e460ce13e3be,
    action_cls='<class 'abc.EvaluateJavascriptAction'>',
    attributes='{u'SCRIPT_SEPARATOR': u'\n', u'consts': [u'action_name'], u'ACTION_NAME': u'action_name'}',
    params='{u'include': [], u'javascript': u'javascript/assign-zones.js',
            u'context':
                     // Here is quite long information of parameters of context
             } JavaScriptAction failed: There's not enough zones available for this operation! Check instantiation parameters!"

The actual root cause of this failed action is: JavaScriptAction failed: There's not enough zones available for this operation! Check instantiation parameters!". It locates at the end of the error. Suppose that if we have an action with a sophisticated, long params, the root cause is hard to find out.

However, due to the purpose of human-readable content, it is hard for operators those who want to know the actual root cause.

Revision history for this message
Dougal Matthews (d0ugal) wrote :

I actually think the problem here is bigger. The error message from actions needs to be easier for humans and machines to read. The information there is good, and sometimes even useful - but we should make it easier to work with.

One option would be to return JSON (we do this in other cases already). I think we should consider a JSON object with this information - then consumers could easily extract out just the error message or just the input if that is what they need.

Changed in mistral:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → rocky-2
summary: - Human-readable failed action error
+ Failed action formatting not useful
summary: - Failed action formatting not useful
+ Action error messages are difficult for humans and machines to read
tags: added: low-hanging-fruit
Revision history for this message
Dougal Matthews (d0ugal) wrote :

I marked this as low-hanging-fruit because I think the implementation should be quite easy - but first we need to discuss it and decide what to change. That bit might take a little longer.

Dougal Matthews (d0ugal)
Changed in mistral:
milestone: rocky-2 → rocky-rc1
milestone: rocky-rc1 → rocky-3
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: rocky-3 → stein-1
Dougal Matthews (d0ugal)
Changed in mistral:
milestone: stein-1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Loading subscribers...

Remote bug watches

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