Using yaql task function with non existing task results in IndexError

Bug #1520930 reported by Moshe Elisha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Medium
Moshe Elisha

Bug Description

Using the "task" YAQL function and passing a non existing task name should result in a better user facing error message.

Executing the following workflow:

---
version: '2.0'

wf:
  type: direct
  output:
    task_name: <% task(non_existing_task).name %>

  tasks:
    task1:
      action: std.noop

Will result in:

  File "/usr/lib/python2.7/site-packages/mistral/utils/yaql_utils.py", line 69, in task_
    task_ex = task_execs[-1]
IndexError: list index out of range

Moshe Elisha (melisha)
Changed in mistral:
assignee: nobody → Moshe Elisha (melisha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/251130

Changed in mistral:
status: New → In Progress
Changed in mistral:
importance: Undecided → Medium
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/251130
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=255fb91ad507c4f5234559ae62fb5325c2ed90c8
Submitter: Jenkins
Branch: master

commit 255fb91ad507c4f5234559ae62fb5325c2ed90c8
Author: Moshe Elisha <email address hidden>
Date: Sun Nov 29 13:40:23 2015 +0000

    Improve error message for YAQL task function

    Improve the error message in case a non existing task name is passed
    to the "task" YAQL function

    Change-Id: I93a33365779ba2a5301431c6769697d8b4861fae
    Closes-Bug: 1520930

Changed in mistral:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/mistral 2.0.0.0b1

This issue was fixed in the openstack/mistral 2.0.0.0b1 development milestone.

Changed in mistral:
status: Fix Committed → Fix Released
Changed in mistral:
milestone: mitaka-1 → 2.0.0
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.