hot-package-deploy-fails-on-ambiguous-function-id

Bug #1501367 reported by Michal Gershenzon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Critical
Stan Lagun
Liberty
Fix Released
Critical
Serg Melikyan
Mitaka
Fix Released
Critical
Stan Lagun

Bug Description

The hot template used to create the package: http://paste.openstack.org/show/474854/

The error from the log:
yaql.language.exceptions.AmbiguousFunctionException: Ambiguous function "id"
  Traceback (most recent call last):
    File "/tmp/murano-packages-cache/81d29d7991bd4a82b7bb6f8282f4b9e9/080fd2469341482e88e24370cd16be67/Classes/Environment.yaml", line 70:9 in method deploy of class io.murano.Environment
        $.applications.pselect($.deploy())
    File "/home/fervent/Projects/murano/<generated code>", line 17:14 in method deploy of class io.murano.apps.generated.Test
        $.setAttr(generatedHeatStackName, '{0}_{1}'.format(randomName(), id($environment)))

(more of the log: http://paste.openstack.org/show/474860/)

Revision history for this message
Michal Gershenzon (michal-gershenzon) wrote :

The code line "{0}_{1}'.format(randomName(), id($environment))" can be find in HotPackage line 276

Revision history for this message
Michal Gershenzon (michal-gershenzon) wrote :

Also, after this happens, if one tries again without deleting /tmp/murano-packages-cache there will be a problem with a manifest file (generated at runtime from Core library). It looks like this:
Unable to load due to 'could not determine a constructor for the tag '!yaql' in "/tmp/murano-packages-cache/9583c3b828304e4d968c01df53bc4873/080fd2469341482e88e24370cd16be67/manifest.yaml", line 54, column 31'

Stan Lagun (slagun)
Changed in murano:
importance: Undecided → Critical
assignee: nobody → Stan Lagun (slagun)
milestone: none → liberty-rc2
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/229550

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

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

commit c3aa79590890882dfa4b561f5c50bc03f6a66978
Author: Stan Lagun <email address hidden>
Date: Wed Sep 30 20:52:22 2015 +0300

    Number of yaql functions caused AmbiguousFunctionException

    There are several commonly used MuranoPL-specific yaql functions
    that were extension methods (i.e. those that can be called as both as functions
    (foo($x)) and as methods ($x.foo())) before Murano switched to yaql 1.0
    (because this was the only option for yaql 0.2). To keep backward compatibility
    they remain such after migration to 1.0 but only for MuranoPL/1.0 format.
    The new approach was to make them pure functions and auto convert to
    extension methods for MuranoPL/1.0. However due to error both original
    and auto-generated versions of the same functions were placed in the same
    yaql context. As a result when attempts to call them as a functions
    (say id($this)) caused AmbiguousFunctionException to be thrown because
    both function versions would satisfy this syntax.

    Change-Id: Ib58c64b999a309e51a7d4a86f5de4cdce84a86d6
    Closes-Bug: #1501367

Changed in murano:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/229848

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

Reviewed: https://review.openstack.org/229848
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=c4f1f14692ac07dd56aa32575d385ec711f440d8
Submitter: Jenkins
Branch: stable/liberty

commit c4f1f14692ac07dd56aa32575d385ec711f440d8
Author: Stan Lagun <email address hidden>
Date: Wed Sep 30 20:52:22 2015 +0300

    Number of yaql functions caused AmbiguousFunctionException

    There are several commonly used MuranoPL-specific yaql functions
    that were extension methods (i.e. those that can be called as both as functions
    (foo($x)) and as methods ($x.foo())) before Murano switched to yaql 1.0
    (because this was the only option for yaql 0.2). To keep backward compatibility
    they remain such after migration to 1.0 but only for MuranoPL/1.0 format.
    The new approach was to make them pure functions and auto convert to
    extension methods for MuranoPL/1.0. However due to error both original
    and auto-generated versions of the same functions were placed in the same
    yaql context. As a result when attempts to call them as a functions
    (say id($this)) caused AmbiguousFunctionException to be thrown because
    both function versions would satisfy this syntax.

    Change-Id: Ib58c64b999a309e51a7d4a86f5de4cdce84a86d6
    Closes-Bug: #1501367
    (cherry picked from commit c3aa79590890882dfa4b561f5c50bc03f6a66978)

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