YAQL function len() doesn't work in Mistral

Bug #1451754 reported by Nikolay Makhotkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Critical
Nikolay Makhotkin
Kilo
Fix Released
Critical
Nikolay Makhotkin
Liberty
Fix Released
Critical
Nikolay Makhotkin

Bug Description

YAQL function len() works fine only for lists and strings and exception will be raised when YAQL evaluates expression like:

  <% $.some[$.thing = 2].len() %>

, where data = {"some": [ {'thing': 2} ] }

TypeError: object of type 'generator' has no len()

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/180086

Changed in mistral:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/180086
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=1d80a89632294393394f7e4351405790a4d063bd
Submitter: Jenkins
Branch: master

commit 1d80a89632294393394f7e4351405790a4d063bd
Author: Nikolay Mahotkin <email address hidden>
Date: Tue May 5 13:04:21 2015 +0300

    Fixing YAQL len() function in Mistral

    Closes-Bug: #1451754

    Change-Id: Ie6782d35fb3c856fe73da4936efdcd222314d2da

Changed in mistral:
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/180424

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/kilo)

Reviewed: https://review.openstack.org/180424
Committed: https://git.openstack.org/cgit/stackforge/mistral/commit/?id=2e9661deff7ef30275a5c82106f025a448644b8e
Submitter: Jenkins
Branch: stable/kilo

commit 2e9661deff7ef30275a5c82106f025a448644b8e
Author: Nikolay Mahotkin <email address hidden>
Date: Tue May 5 13:04:21 2015 +0300

    Fixing YAQL len() function in Mistral

    Closes-Bug: #1451754

    Change-Id: Ie6782d35fb3c856fe73da4936efdcd222314d2da
    (cherry picked from commit 1d80a89632294393394f7e4351405790a4d063bd)

Changed in mistral:
milestone: 1.0.0 → none
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.