fix(ansible): ai-stack role uses python3.12 for venv + fix pip cache (#3534)#3536
Merged
mrveiss merged 1 commit intoDev_new_guifrom Apr 5, 2026
Merged
fix(ansible): ai-stack role uses python3.12 for venv + fix pip cache (#3534)#3536mrveiss merged 1 commit intoDev_new_guifrom
mrveiss merged 1 commit intoDev_new_guifrom
Conversation
…3534) - Change venv creation from python3 (3.10) to python3.12 — required by numpy>=2.4.3 in requirements-ai.txt (numpy 2.3+ needs Python 3.11+) - Add stale-venv detection: check existing venv Python version and remove if not 3.12, so the creates: guard does not silently skip re-creation - Create pip cache dir under ai_data_dir and set HOME env var for all pip tasks — autobot-ai has create_home:false so ~/.cache/pip never exists (#3535) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ SSOT Configuration Compliance: Passing🎉 No hardcoded values detected that have SSOT config equivalents! |
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This was referenced Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai-stackAnsible role created the venv withpython3(resolves to Python 3.10 on target hosts), butrequirements-ai.txtrequiresnumpy>=2.4.3which only exists for Python 3.11+. The backend role correctly usespython3.12; the ai-stack role did not.creates:guard would otherwise skip re-creation).autobot-aiservice account hascreate_home: falseso~/.cache/pipnever exists. Added pip cache dir underai_data_dirand setHOMEenv var on all pip tasks to suppress the warning and enable caching. Closes bug(ansible): autobot-ai pip cache dir not owned by autobot-ai — cache disabled on every AI stack install #3535.Changes
autobot-slm-backend/ansible/roles/ai-stack/tasks/main.yml:failed_when: falseso it's a no-op on first deploypython3 -m venv→python3.12 -m venvai_data_dir/.cache/pipHOME: "{{ ai_data_dir }}"to all threepiptasks (upgrade pip, install from requirements, fallback install)Test plan
ai-stackrole — Phase 5a should succeed.../venv/lib/python3.12/site-packageson target hostCloses #3534
Closes #3535
🤖 Generated with Claude Code