fix(scripts): ./infra and common-vault.sh scripts use the repo's .venv without activating it #189

Merged
jfraeys merged 1 commit from jfraeys/fix/scripts-use-repo-venv into main 2026-10-15 13:34:35 -04:00
Owner

Several scripts run a bare python3 -c 'import yaml ...' (rotate-ovh-s3-credentials.sh, init-secrets.sh, rotate-secret.sh's diff step) and relied on the operator having activated .venv; with the Homebrew python3 first on PATH they die with ModuleNotFoundError: No module named 'yaml'. ./infra and anything sourcing scripts/lib/common-vault.sh now put .venv/bin first on PATH when it exists. Test: scripts/tests/test-venv-path.sh (in lint.yml).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ

Several scripts run a bare `python3 -c 'import yaml ...'` (rotate-ovh-s3-credentials.sh, init-secrets.sh, rotate-secret.sh's diff step) and relied on the operator having activated .venv; with the Homebrew python3 first on PATH they die with `ModuleNotFoundError: No module named 'yaml'`. `./infra` and anything sourcing `scripts/lib/common-vault.sh` now put `.venv/bin` first on PATH when it exists. Test: scripts/tests/test-venv-path.sh (in lint.yml). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ
fix(scripts): ./infra and common-vault.sh scripts use the repo's .venv without activating it
All checks were successful
Lint / lint (pull_request) Successful in 1m58s
Secret scan / scan (pull_request) Successful in 14s
7273e90d5d
Fixes ModuleNotFoundError: No module named 'yaml' in scripts that run a bare python3 (rotate-ovh-s3-credentials.sh, init-secrets.sh, ...).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ge5tovcwdEUBtPwUktsZZZ
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!189
No description provided.