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

Fix duplicate detection for latest ansible-core devel; update test data #257

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/257-duplicates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "Fix duplicate docs detection (for aliases) for latest ansible-core devel (https://github.com/ansible-community/antsibull-docs/pull/257)."
4 changes: 2 additions & 2 deletions src/antsibull_docs/docs_parsing/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def _remove_redirect_duplicates(
# remove this plugin's docs and generate a redirect stub instead.
a = plugin_record.get("doc")
b = plugin_map[destination].get("doc")
if a and b and compare_all_but(a, b, ["filename"]):
if a and b and compare_all_but(a, b, ["filename", "plugin_name"]):
del plugin_map[plugin_name]


Expand All @@ -389,7 +389,7 @@ def _remove_other_duplicates(
if full_name and full_name != plugin_name and full_name in plugin_map:
a = plugin_record.get("doc")
b = plugin_map[full_name].get("doc")
if a and b and compare_all_but(a, b, ["name", "filename"]):
if a and b and compare_all_but(a, b, ["name", "filename", "plugin_name"]):
del plugin_map[plugin_name]
if plugin_name not in plugin_routing:
plugin_routing[plugin_name] = {}
Expand Down
Loading
Loading