MuranoPL treats iterator as single object instead of list for list contract

Bug #1596007 reported by Konstantin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Konstantin
Liberty
Won't Fix
High
Konstantin
Mitaka
Won't Fix
High
Konstantin
Newton
Fix Released
High
Konstantin

Bug Description

How to reproduce
Create following classes

Name: T

Properties:
  prop:
    Contract:
      - $.string()
    Default: null
    Usage: InOut

---

Name: TestReal
Methods:
  test:
    Body:
      - $t: new(T, $this, prop => ['1', '1', '1'].where($))
      - Return: $t.prop[1]

Run TestReal::test() method

Expected result
> '1'

Observed result:
IndexError: tuple index out of range

Konstantin (ksnihyr)
Changed in murano:
importance: Undecided → High
assignee: nobody → Konstantin (ksnihyr)
assignee: Konstantin (ksnihyr) → nobody
milestone: none → 2.0.x
assignee: nobody → Konstantin (ksnihyr)
Changed in murano:
milestone: 2.0.x → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (master)

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

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

Reviewed: https://review.openstack.org/334591
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=6aedcda8979f0db66aa4c31119029b9c599188a7
Submitter: Jenkins
Branch: master

commit 6aedcda8979f0db66aa4c31119029b9c599188a7
Author: Konstantin Snihyr <email address hidden>
Date: Mon Jun 27 20:41:42 2016 +0300

    Allows Spec::transform treat generators as list

    This patch extend list mapping for TypeSpec.
    Now contracts can transform generator expression to list.

    Change-Id: I9d8614ee53021b96e8a99f93c2e12710f0b30983
    Closes-bug: 1596007

Changed in murano:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/murano 3.0.0.0b2

This issue was fixed in the openstack/murano 3.0.0.0b2 development milestone.

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.