Repository navigation
ci_setup: pin ansible-core for local controller tools - #4304
Valkyrie00 wants to merge 1 commit into
Conversation
The task used ansible_version.full to install the same ansible-core version as the running controller. In premetal the controller is the hypervisor, so that value is the host RHEL ansible-core 2.14.14. The pip install then puts 2.14.14 in ~/.local under Python 3.12, where it shadows the 2.15.13 that dev-scripts installs in /usr/local/bin and breaks the devscripts collection command. Pin the local tool install to the migration 2.16.19 instead, keeping it in sync with common-requirements.txt.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
PR Summary by QodoPin local controller Ansible tools to 2.16.19
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can describe a rule in plain language on the Rules page and Qodo drafts it for you |
Problem
Install Ansible tools for local controller operationsusedansible-core=={{ ansible_version.full }}.In the premetal topology the controller is the hypervisor, so
ansible_version.fullis the host's RHELansible-core 2.14.14, not themigration's
2.16.19. The task then installs2.14.14into~/.localwith
/usr/bin/pip3.12 --user(Python 3.12).dev-scriptsputs~/.local/binbefore/usr/local/bin, so this shadows the2.15.13thatdev-scriptsinstalls and breaks:Fix
Pin the task to
ansible-core==2.16.19, matchingcommon-requirements.txt, instead of trusting the running controllerversion. This installs a Python 3.12-compatible Ansible into
~/.localand keeps the devscripts collection command working.
Validation
The
ansible-version-shadow-checkTP (testproject MR 2861) reproduces the2.14.14/Python 3.12 state in an isolated HOME:
2.14.14: the devscripts command fails withCould not find ansible.netcommon<8.0.0.(rc=1);2.16.19: the same command succeeds (rc=0) and installsansible.posix,ansible.utils,ansible.netcommonandcommunity.general.A full premetal job with this change is the remaining integration check.