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

Allow to update deprecations/removals #177

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

felixfontein
Copy link
Collaborator

This is needed to generate a consistent changelog if https://forum.ansible.com/t/2811/24 (or similar votes) succeed.

Copy link
Collaborator

@gotmax23 gotmax23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are my initial comments. Thanks for working on this, and I apologize for my delay in reviewing it.

src/antsibull_core/schemas/collection_meta.py Show resolved Hide resolved
if version is None:
# The following line should never be reached:
pass # pragma: no cover
elif version.major != self.major_release:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this means that if a collection was removed in Ansible X.A.0 and then re-added in Ansible X.B.0, we would just remove its removal: metadata when we copy over the collection meta file to the X+1 directory for the next major version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we'd keep the removal metadata, but copy it back from removed_collections to collections and add updates: and move announce_version to removed_version there, and re-add major_version. https://github.com/ansible-community/ansible-build-data/pull/488/files#diff-de27baf579d836d439eb1aa79999d825ae044f35799bb2e89b598bde6791a047 shows how it looks like.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the netapp.storagegrid example where the collection was re-added, I'm asking about what would happen when we create the 12 directory. We would just remove its removal: metadata because it would no longer apply to Ansible 12, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If it later happens to be deprecated again in Ansible 12, a new removal entry can be added.

src/antsibull_core/collection_meta.py Outdated Show resolved Hide resolved
@@ -44,6 +44,44 @@ def _convert_pypi_version(v: t.Any) -> t.Any:
PydanticPypiVersion = Annotated[PypiVer, BeforeValidator(_convert_pypi_version)]


class RemovalUpdate(p.BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should updates be able to have their own reasons? For example, if we are cancelling a deprecation, wouldn't we want the changelog entry for the removal update to reflect why we did that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I thought about it last weekend but didn't have time to implement it then; I'll try to add it tomorrow.

I'm wondering a bit whether this should be free-text, or similar to the reason field in the top-level removal info. Then we'd likely also need a set of more fields (like there). I'll think about it when I have more time...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look at the new version of this when I get a chance. Thanks!

@gotmax23
Copy link
Collaborator

gotmax23 commented Nov 6, 2024

At some point, we should document this all in https://github.com/ansible-community/ansible-build-data/blob/main/docs/policies.md#removal-from-ansible

@felixfontein
Copy link
Collaborator Author

Merging for now as discussed on Matrix.

@felixfontein felixfontein merged commit 6d814fb into ansible-community:main Nov 14, 2024
5 checks passed
@felixfontein felixfontein deleted the cancel-deprecation branch November 14, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants