Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

botmeta: failure when a team name contains hyphen #1088

Open
mkrizek opened this issue Oct 26, 2018 · 3 comments
Open

botmeta: failure when a team name contains hyphen #1088

mkrizek opened this issue Oct 26, 2018 · 3 comments
Assignees
Labels

Comments

@mkrizek
Copy link
Collaborator

mkrizek commented Oct 26, 2018

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'
@mkrizek
Copy link
Collaborator Author

mkrizek commented Oct 26, 2018

ansible/ansible#47687

@webknjaz
Copy link
Member

webknjaz commented Nov 2, 2018

botmeta validator should probably catch this. I can only remember YAML anchors supporting dashes in names, normally vars in other languages don't.

@gundalow gundalow added the bug label Mar 6, 2019
@gundalow
Copy link
Collaborator

gundalow commented Mar 6, 2019

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.

@gundalow gundalow self-assigned this Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants