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

Changelog/porting guide: add a note that removed collections can still be installed manually #647

Merged
merged 2 commits into from
Jan 21, 2025
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
3 changes: 3 additions & 0 deletions changelogs/fragments/647-removal-hint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- "When announcing collection removals and upcoming removals in the changelog, add a note that users can still manually install removed collections
(https://github.com/ansible-community/antsibull-build/pull/647)."
12 changes: 12 additions & 0 deletions src/antsibull_build/build_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,12 @@ def append_removed_collections(
f"(previously included version: {collection_version})",
text_format=TextFormat.RESTRUCTURED_TEXT,
)
section.ensure_paragraph_break()
section.add_text(
"You can still install a removed collection manually with"
" ``ansible-galaxy collection install <name-of-collection>``.",
oraNod marked this conversation as resolved.
Show resolved Hide resolved
text_format=TextFormat.RESTRUCTURED_TEXT,
)
section.close()


Expand Down Expand Up @@ -702,6 +708,12 @@ def append_porting_guide(
f"(previously included version: {collection_version})",
text_format=TextFormat.RESTRUCTURED_TEXT,
)
section.ensure_paragraph_break()
section.add_text(
"You can still install a removed collection manually with"
" ``ansible-galaxy collection install <name-of-collection>``.",
text_format=TextFormat.RESTRUCTURED_TEXT,
)
section.close()

for section_name in ["removed_features", "deprecated_features"]:
Expand Down
6 changes: 6 additions & 0 deletions src/antsibull_build/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,12 @@ def _get_removal_entry( # noqa: C901, pylint:disable=too-many-branches
"community_steering_committee.html#creating-community-topic>`__."
)

if sentences and reason not in ("renamed", "deprecated"):
sentences.append(
"After removal, users can still install this collection with "
samccann marked this conversation as resolved.
Show resolved Hide resolved
f"``ansible-galaxy collection install {collection}``."
)

if not sentences:
return None
return _create_fragment("deprecated_features", sentences), str(announce_version)
Expand Down
Loading