Conversation
run-task normalizes MOZ_PYTHON_HOME and MOZ_UV_HOME but never uses
them, so tasks that fetch a python toolchain still resolve python3 (and
pip) to the system interpreter, which has no pip in minimal images:
+ python3 -m pip install -r ci-scripts/requirements.txt
/usr/bin/python3: No module named pip
Port the post-fetch environment setup from gecko run-task: prepend the
fetched python bindir to PATH, set MOZPYTHONHOME to relocate the
binaries (PYTHONHOME would conflict with system python), use certifi
certificates on macOS, and add MOZ_UV_HOME to PATH when present.
This is a step toward taskcluster#381 (stop using system python) and fixes
Mozilla Bug 2066119 for git-backed pushes.
Author
|
Local end-to-end check of the new path (macOS, Unpatched run-task — variable is normalized but unused; the task gets system python: With this PR:
One note for review: the macOS branch assumes the fetched python ships |
This branch has not been deployed
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.
run-task normalizes
MOZ_PYTHON_HOMEandMOZ_UV_HOMEbut never uses them, so tasks that fetch a python toolchain still resolvepython3(and pip) to the system interpreter, which has no pip in minimal images:(e.g. https://firefox-ci-tc.services.mozilla.com/tasks/BEzQdzYjTqGtuw7ZMfBzYA on a git-backed firefox-dev push)
This ports the post-fetch environment setup from gecko run-task: prepend the fetched python bindir to
PATH, setMOZPYTHONHOMEto relocate the binaries (PYTHONHOMEwould conflict with system python, e.g. the one hg uses), use certifi certificates on macOS, and addMOZ_UV_HOMEtoPATHwhen present.A step toward #381 (stop using system python). Fixes Bug 2066119 for git-backed pushes — currently blocking the
run-on-repo-typeguard removal for webrender, source-test python and wpt-unittest (Bug 1986768 migration work).Tested:
test_scripts_run_task.py28/28 andtest_transforms_run_run_task.py9/9 pass; ruff clean on the added block.