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

ansible-doc - account for empty meta/main.yml #73590

Merged
merged 2 commits into from Feb 12, 2021

Conversation

samdoran
Copy link
Contributor

SUMMARY

from_yaml() will return None when encountering an empty file due to an exception from json.loads():

JSONDecodeError('Expecting value: line 1 column 1 (char 0)')
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/cli/doc.py

ADDITIONAL INFORMATION

Existing tests covered this. I just had to add a role with an empty meta/main.yml to trigger the failure.

 from_yaml() will return None when encrounting an empty file.
@samdoran samdoran requested a review from Shrews February 12, 2021 21:29
@ansibot ansibot added affects_2.11 bug This issue/PR relates to a bug. collection Related to Ansible Collections work collection:ktdreyer.errata_tool_ansible core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 12, 2021
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 12, 2021
@Shrews Shrews merged commit 18f7282 into ansible:devel Feb 12, 2021
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Feb 15, 2021
@samdoran samdoran deleted the role-docs-empty-meta-file branch February 15, 2021 15:17
@ansible ansible locked and limited conversation to collaborators Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.11 bug This issue/PR relates to a bug. collection:ktdreyer.errata_tool_ansible collection Related to Ansible Collections work core_review In order to be merged, this PR must follow the core review workflow. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants