Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various inline docs are not valid YAML #108

Closed
ktdreyer opened this issue Feb 24, 2020 · 4 comments
Closed

various inline docs are not valid YAML #108

ktdreyer opened this issue Feb 24, 2020 · 4 comments

Comments

@ktdreyer
Copy link
Owner

ktdreyer commented Feb 24, 2020

ansible-doc crashes when we install the Ansible Collection and then try to read the inline docs for koji_tag.

Steps to reproduce:

$ ansible-galaxy collection install ktdreyer-koji_ansible-0.0.0-git.230+9d7258a6.tar.gz
$ ansible-doc -t module ktdreyer.koji_ansible.koji_tag
ERROR! module ktdreyer.koji_ansible.koji_tag missing documentation (or could not parse documentation): while scanning a simple key
  in "<unicode string>", line 50, column 10
could not find expected ':'
  in "<unicode string>", line 51, column 10

This is just a yaml.scanner.ScannerError backtrace from PyYAML, not the full backtrace from ansible-doc. The crash is in ansible/parsing/plugin_docs.py , specifically the read_docstring() method.

@ktdreyer ktdreyer changed the title ansible-doc crashes on Ansible Collection ansible-doc crashes on koji_tag Feb 24, 2020
@ktdreyer
Copy link
Owner Author

ktdreyer commented Feb 24, 2020

The problem is that we have the following line in the docs:

- Note: the order in which you specify architectures 

This is not valid YAML because it interprets "Note: foo" as a key-value pair. We should change that to "Note," instead and add a CI job that runs ansible-doc for every module.

@ktdreyer ktdreyer changed the title ansible-doc crashes on koji_tag various inline docs are not valid YAML Feb 24, 2020
@ktdreyer
Copy link
Owner Author

Many of the other modules do not have valid YAML. I'll add tests for this as part of the upcoming integration test for the Ansible Collection (#107)

@ktdreyer
Copy link
Owner Author

#109 fixes the YAML syntax errors across all the modules.

@ktdreyer
Copy link
Owner Author

ktdreyer commented Feb 25, 2020

#110 adds an integration test to validate each module's YAML syntax going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant