Repository navigation
ci(beta): rebuild a broken ASC venv instead of failing - #923
Merged
Merged
Conversation
The nightly self-hosted Beta failed Oct 28 - Nov 2 at its venv step with "No such file or directory: ~/.raymol-beta-venv/bin/python3". The venv was first built with Homebrew Python 3.14. Each run then re-ran `python3 -m venv` (Xcode 3.9) over it, which left a mixed venv: a 3.9 pyvenv.cfg with bin/python3 pointing at Homebrew 3.14. The venv broke as soon as Homebrew's python@3.14 opt link went missing. The step now pins the interpreter to /usr/bin/python3. It reuses the venv only if bin/python runs and reports that interpreter's base_prefix. Otherwise it rebuilds the venv from scratch with `venv --clear`. pip runs as `python -m pip`, so a stale absolute shebang in bin/pip can't hit a dead interpreter. The runner doc describes the behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
The nightly Beta (self-hosted, puma) run failed every night from Oct 28 to Nov 2 at "Python venv for the ASC client" with:
~/.raymol-beta-venvwas first built Oct 14 with Homebrew Python 3.14. After that, every run re-ranpython3 -m venvwith Xcode's 3.9 over the existing venv. That left a mixed venv: a 3.9pyvenv.cfg, withbin/python3 -> python3.14 -> /opt/homebrew/opt/python@3.14/bin/python3.14. The venv broke as soon as Homebrew's opt link went missing. Homebrew relinked it Nov 2, so the step runs again for now, but the next Homebrew upgrade or cleanup would break it the same way.What
/usr/bin/python3, which is whatpython3already resolves to on the runner PATH (Xcode 3.9.6).bin/pythonruns and reports that interpreter'ssys.base_prefix. Otherwise it rebuilds the venv withpython3 -m venv --clear. A dangling link, a missing venv, or a venv on another Python all lead to a clean rebuild, so the venv can't end up mixed again."$VENV/bin/python" -m pip. The oldbin/pipcall went through an absolute shebang (#!…/bin/python3.14) that fails the same way when its target dies.docs/ci/selfhosted-beta-runner.mdgains a bullet on how the venv heals itself.On the first run after merge, the step will rebuild the real venv once, because it is currently on Homebrew 3.14. After that it stays on the happy path.
Testing
I did not dispatch the Beta workflow, and
~/actions-runnerand the real venv were not touched. I pulled the step'srun:block out of the YAML with Ruby's YAML parser and ran it underenv -iwithHOMEset to a temp dir and the runner's PATH:bin/python3.14(bin/python3fails with rc 127)In every case the venv then imports
jwt2.15.1 andcryptography50.0.2 on Xcode 3.9.6. With the rebuilt 3.9 venv:scripts/asc_next_build_number.pyran end to end. It signed the JWT and made a read-only ASC GET, which printed375.scripts/asc_wait_build_valid.py --helpandscripts/xcode_cloud_beta_workflows.pyboth load.All
scripts/asc_*.pyfiles parse withfeature_version=(3,9)and use no syntax newer than 3.9. Afterwards the real~/.raymol-beta-venvwas unchanged.🤖 Generated with Claude Code