From 00bf1822f96bc18e576cc3ccf538965240861112 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 22 Feb 2022 09:44:02 -0500 Subject: [PATCH 1/4] Fix anstibull error if expected diff plugin list --- src/antsibull/docs_parsing/ansible_internal.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/antsibull/docs_parsing/ansible_internal.py b/src/antsibull/docs_parsing/ansible_internal.py index 9ffc1494..b3175a62 100644 --- a/src/antsibull/docs_parsing/ansible_internal.py +++ b/src/antsibull/docs_parsing/ansible_internal.py @@ -8,6 +8,7 @@ import tempfile import typing as t +from ..constants import DOCUMENTABLE_PLUGINS from ..logging import log from ..utils.get_pkg_data import get_antsibull_data from ..vendored.json_utils import _filter_non_json_lines @@ -65,6 +66,10 @@ async def get_ansible_plugin_info(venv: t.Union['VenvRunner', 'FakeVenvRunner'], plugin_map = {} for plugin_type, plugins in result['plugins'].items(): + if plugin_type not in DOCUMENTABLE_PLUGINS: + # avoid keyerrors down the line when we cannot match types + flog.debug('Skipping unknown plugin type: {0}'.format(plugin_type)) + continue plugin_map[plugin_type] = {} for plugin_name, plugin_data in plugins.items(): if '.' not in plugin_name: From 5a0e1740b4f76bd4901501e4cd4f821c080188d9 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 22 Feb 2022 12:14:12 -0500 Subject: [PATCH 2/4] F it --- src/antsibull/docs_parsing/ansible_internal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/antsibull/docs_parsing/ansible_internal.py b/src/antsibull/docs_parsing/ansible_internal.py index b3175a62..f8a0945c 100644 --- a/src/antsibull/docs_parsing/ansible_internal.py +++ b/src/antsibull/docs_parsing/ansible_internal.py @@ -68,7 +68,7 @@ async def get_ansible_plugin_info(venv: t.Union['VenvRunner', 'FakeVenvRunner'], for plugin_type, plugins in result['plugins'].items(): if plugin_type not in DOCUMENTABLE_PLUGINS: # avoid keyerrors down the line when we cannot match types - flog.debug('Skipping unknown plugin type: {0}'.format(plugin_type)) + flog.debug(f'Skipping unknown plugin type: {plugin_type}') continue plugin_map[plugin_type] = {} for plugin_name, plugin_data in plugins.items(): From 131b156359bbc1d7803c60a25c8f2c7b956f9cc7 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 22 Feb 2022 17:04:01 -0500 Subject: [PATCH 3/4] clog --- changelogs/fragments/404_not_found.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/404_not_found.yml diff --git a/changelogs/fragments/404_not_found.yml b/changelogs/fragments/404_not_found.yml new file mode 100644 index 00000000..508a11e9 --- /dev/null +++ b/changelogs/fragments/404_not_found.yml @@ -0,0 +1,2 @@ +bugfixes: + - anstibull will not traceback anymore when it tries to process plugins not found in it's own constant but are available in ansible. From 98b3678897d56774fe8409efaf3ac4ae32e45f8f Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 22 Feb 2022 23:19:44 +0100 Subject: [PATCH 4/4] Update changelogs/fragments/404_not_found.yml --- changelogs/fragments/404_not_found.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/404_not_found.yml b/changelogs/fragments/404_not_found.yml index 508a11e9..6d4903b3 100644 --- a/changelogs/fragments/404_not_found.yml +++ b/changelogs/fragments/404_not_found.yml @@ -1,2 +1,2 @@ bugfixes: - - anstibull will not traceback anymore when it tries to process plugins not found in it's own constant but are available in ansible. + - anstibull-docs will no longer traceback when it tries to process plugins not found in its own constant but are available in ansible-core (https://github.com/ansible-community/antsibull/pull/404).