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 version comparsion #426

Merged
merged 1 commit into from
May 17, 2022
Merged

Conversation

felixfontein
Copy link
Collaborator

Currently the sanity check for the installed ansible-core version in the build role fails as 2.13.0rc1 > 2.13.0 according to distutils.version.LooseVersion, which is used by ansible-core's version test. (StrictVersion and SemanticVersion do not accept 2.13.0rc1, so they don't help here.)

I've added an internal filter _antsibull_packaging_version to the role that is used for this comparison. It uses packaging.version, which handles the version numbers correctly.

@felixfontein
Copy link
Collaborator Author

https://github.com/ansible-community/antsibull/runs/6455989150?check_suite_focus=true shows how this currently fails (since 2.13.0 has been released).

@felixfontein felixfontein requested a review from dmsimard May 16, 2022 17:59
@felixfontein
Copy link
Collaborator Author

This also makes the tests in ansible-build-data pass again (failure example: https://github.com/ansible-community/ansible-build-data/runs/6458171874?check_suite_focus=true).

@dmsimard
Copy link
Contributor

I've added an internal filter _antsibull_packaging_version to the role that is used for this comparison. It uses packaging.version, which handles the version numbers correctly.

Appreciate the fix, it's short and simple enough.

Currently the sanity check for the installed ansible-core version in the build role fails as 2.13.0rc1 > 2.13.0 according to distutils.version.LooseVersion, which is used by ansible-core's version test. (StrictVersion and SemanticVersion do not accept 2.13.0rc1, so they don't help here.)

Should this be considered an issue in ansible-core, then ?

@felixfontein
Copy link
Collaborator Author

It would definitely nice if ansible-core's filter would support packaging.version as well, but that will not happen before 2.14.0. If I remember I'll create an issue or a PR for that...

@felixfontein felixfontein merged commit e8595b5 into ansible-community:main May 17, 2022
@felixfontein felixfontein deleted the fix-tests branch May 17, 2022 05:08
@felixfontein
Copy link
Collaborator Author

@dmsimard thanks for reviewing!

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