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 pip-managed ansible on pip < 23.0.1 #4403

Merged
merged 6 commits into from
Sep 18, 2023

Conversation

holmanb
Copy link
Member

@holmanb holmanb commented Sep 1, 2023

Fix pip-managed ansible on pip < 23.0.1

Commit b417b218 broke pip-managed ansible with
pip < 23.0.1 and fixed pip-managed ansible with
pip >= 23.0.1. Gate change by pip version to
correctly operate on both versions.

Additional Context

https://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-focal-lxd_vm/303/testReport/junit/tests.integration_tests.modules/test_ansible/test_ansible_controller/

tests/unittests/util.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Hey @holmanb what o you think about an alternative approach to only append --break-system-packages if that EXTERNALLY-MANAGED marker file is present? This would work on all flavors of Ubuntu back to focal as we'd avoid adding the param unless the distro itself implements the PEP668 marker.

cloudinit/config/cc_ansible.py Outdated Show resolved Hide resolved
@blackboxsw blackboxsw self-assigned this Sep 1, 2023
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

Ran through jammy, focal and mantic with the suggested changeset.

Co-authored-by: Chad Smith <chad.smith@canonical.com>
@holmanb
Copy link
Member Author

holmanb commented Sep 18, 2023

Thanks for the review @blackboxsw. Fixed according to your comment.

Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

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

LGTM!

@holmanb holmanb merged commit 13938f7 into canonical:main Sep 18, 2023
26 checks passed
TheRealFalcon pushed a commit to TheRealFalcon/cloud-init that referenced this pull request Oct 24, 2023
Commit b417b21 broke pip-managed ansible with
pip < 23.0.1 and fixed pip-managed ansible with
pip >= 23.0.1. Gate the change by a filesystem artifact
only found on newer pip versions.
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.

None yet

2 participants