Parameters have to have only different names

Bug #1308400 reported by Sergey Kraynev
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Low
Sergey Kraynev
Pyyaml
New
Unknown

Bug Description

Currently you could define template with parameters, which have same names.
However as result you will get only second definition of this parameter.
I think that it's incorrect behavior and should be caught during validation.

Changed in heat:
assignee: nobody → Sergey Kraynev (skraynev)
summary: - Parameters have to only different names
+ Parameters have to have only different names
Changed in heat:
importance: Undecided → Low
milestone: none → juno-1
status: New → Triaged
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

http://pyyaml.org/ticket/128

Detecting duplicate map keys is non-trivial.. I'm not sure it is appropriate to target this as something we can handle soon.

Revision history for this message
Sergey Kraynev (skraynev) wrote :

Clint, I have looked this issue. It's very long time problem. However now it has high status for fixing.
From other side JSON has same problem and according to rfc " ...The names within an object SHOULD be unique..."
If in the first case (yaml) problem will be fixed "soon", we still have problem with second case (json).
I think, that will be good to make some workaround when we parse template:

 - For JSON, we could use such approach https://mail.python.org/pipermail/python-list/2013-May/647954.html
 - For YAML, it does not work, unfortunately. So we could use weird hack:
parse yaml template -> take first name of resource (or parameter, or output) and count the numbers of this name in parsed template (just transform it in string) and repeat it for unparsed template -> compare numbers in both cases.
But IMO, I prefer to wait fix from yaml project =)

Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → juno-2
Revision history for this message
Steven Hardy (shardy) wrote :

No fix proposed so bumping to J3

Changed in heat:
milestone: juno-2 → juno-3
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Removing milestone altogether. Sergey has said he'd like to wait for a proper fix from pyyaml, and I agree. The auto-link _might_ actually work and tell us if that bug is fixed upstream.

Changed in heat:
milestone: juno-3 → none
Changed in pyyaml:
status: Unknown → New
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.