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

[Bug]: Modules docs don't render properly in Ansible Galaxy web #32

Open
t0mk opened this issue Feb 28, 2024 · 2 comments
Open

[Bug]: Modules docs don't render properly in Ansible Galaxy web #32

t0mk opened this issue Feb 28, 2024 · 2 comments
Labels
bug issues that report a bug

Comments

@t0mk
Copy link

t0mk commented Feb 28, 2024

Expected Behavior

The generated dostrings should be in proper format for Ansible Galaxy. The Galaxy website should parse the DOCUMENTATION etc markdown and render nice html.

Basically, it seems that with the currecnt version of Galaxy web, the format changed and ansible-specdoc-generated docs are somehow wrong.

Thanks for your work on this useful project!

Actual Behavior

Only "Synopsis" is rendered.

https://galaxy.ansible.com/ui/repo/published/linode/cloud/content/module/instance/

Steps to Reproduce

No response

Error Output

No response

@jriddle-linode
Copy link
Collaborator

Thanks for reporting this, I've created a critical ticket internally and we'll tag this issue in the PR.

@t0mk
Copy link
Author

t0mk commented Feb 29, 2024

@jriddle-linode

I looked at it a bit and in our case the problem was rendered RETURN - it was quoted a lot, quite messy and maybe wasn't valid YAML.
https://github.com/equinix-labs/ansible-collection-equinix/blob/main/plugins/modules/metal_project.py#L76

ansible-docs tests the DOCUMENTATION and RETURN by loading it as an Ansible yaml:
https://github.com/ansible/ansible/blob/devel/lib/ansible/parsing/plugin_docs.py#L156

We had quite a mess rendered there, so I'm guessing ansible-doc was silently failing and skipping the galaxy docs render. I am not sure why your module documentation isn't rendered. I noticed you don't have DOCUMENTATION etc even injected in commited code in ansible_linode.

I think this bug is a bit invalid, but it would be a nice touch if ansible-specdoc validated that injected DOCUMENTAION, EXAMPLES and RETURN are valid yaml.

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

No branches or pull requests

2 participants