validate_upgrade_tasks_duplicate_whens detects false positive.
Bug #1910418 reported by
Sofer Athlan-Guyot
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Triaged
|
Medium
|
Sofer Athlan-Guyot |
Bug Description
Hi,
if you setup some output tasks in a template like this:
upgrade_tasks:
- block:
- debug: "bar"
when: 1 == 1
when: 0 == 0
then we get:
ERROR: found duplicate when statements in ./puppet/
that's because the check in validate_
there are other flaws in that function, like it start at upgrade_tasks and include everything till the end of the file, even if that's not upgrade_tasks definition anymore.
To post a comment you must log in.
Fun facts.
if you have this
upgrade_tasks:
- block:
- name: funny
when: 1 == 1
shell: "bar --like foo"
when: 0 == 0
then it works because " -" is seen as the beginning of a new task and reset counters.