ansibullbot
ansibullbot copied to clipboard
botmeta: failure when a team name contains hyphen
e.g. team_e-spirit
.
Traceback (most recent call last):
File "/home/ansibot/ansibullbot/triage_ansible.py", line 42, in
main()
File "/home/ansibot/ansibullbot/triage_ansible.py", line 38, in main
AnsibleTriage().start()
File "/home/ansibot/ansibullbot/ansibullbot/triagers/ansible.py", line 225, in __init__
gitrepo=gitrepo
File "/home/ansibot/ansibullbot/ansibullbot/utils/file_tools.py", line 41, in __init__
self.update(force=True)
File "/home/ansibot/ansibullbot/ansibullbot/utils/moduletools.py", line 126, in update
self.parse_metadata()
File "/home/ansibot/ansibullbot/ansibullbot/utils/file_tools.py", line 53, in parse_metadata
self.botmeta = BotMetadataParser.parse_yaml(rdata)
File "/home/ansibot/ansibullbot/ansibullbot/parsers/botmetadata.py", line 202, in parse_yaml
ydata = fix_lists(ydata)
File "/home/ansibot/ansibullbot/ansibullbot/parsers/botmetadata.py", line 62, in fix_lists
newv2 = tmpl.substitute(**string_macros)
File "/usr/lib64/python2.7/string.py", line 172, in substitute
return self.pattern.sub(convert, self.template)
File "/usr/lib64/python2.7/string.py", line 162, in convert
val = mapping[named]
KeyError: u'team_e'
https://github.com/ansible/ansible/pull/47687
botmeta validator should probably catch this. I can only remember YAML anchors supporting dashes in names, normally vars in other languages don't.
Needs checking in https://github.com/ansible/ansible/blob/devel/test/sanity/code-smell/botmeta.py had another similar problem. I'll update the validator to detect this.