Fix broken CI -- update python command for Linux Helix work items#5179
Fix broken CI -- update python command for Linux Helix work items#5179DrewScoggins merged 1 commit intodotnet:mainfrom
Conversation
The Ubuntu 22.04 Helix image was updated and no longer provides a
'python' command (only 'python3'). This broke all Linux Helix work
items in public CI with 'python: not found' (exit code 127).
- Change the non-Windows work item command from 'python' to 'python3'
- Use the existing 'agent_python' variable ('python3' on Linux,
'py -3' on Windows) for the Python env var passed to .proj files,
instead of unconditionally using 'python'
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@caaavik-msft as an aside, how about enabling copilot review on new PR's (repo settings). either on first push only, or all. but I think first push only is a definite good thing. |
There was a problem hiding this comment.
Pull request overview
Updates the Helix work item Python invocation to match modern Linux images where python is no longer available, restoring Linux Helix CI reliability.
Changes:
- Switch non-Windows Helix work item command execution from
pythontopython3. - Pass the platform-correct
agent_pythonvalue intoPerfSendToHelixArgs.pythonso.projscenario work items use the correct Python launcher via$(Python).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Note This comment was AI/Copilot-generated. Why is Windows OK with just What is if args.os_group == "windows":
agent_python = "py -3"
else:
agent_python = "python3"
|
|
CI passed! |
|
Going to do a quick test to make sure that all of our internal machines have the python3 alias. Once that looks good we can get this merged. |
LoopedBard3
left a comment
There was a problem hiding this comment.
Looks good to me once we have a regular test run .👍
Note
This PR description was AI/Copilot-generated.
Fix
python: not foundon Linux Helix work itemsThe updated Ubuntu 22.04 Helix image (
Helix-Ubuntu-2204-2026-03-23) no longer provides apythoncommand — onlypython3is available. This broke all Linux Helix work items in public CI with exit code 127.Main branch has been red since March 26 (build 1354108 onward; last green was 1353009 on March 25).
Changes
get_work_item_command(): Change the non-Windows command frompythontopython3(line 598). The Windows path (python, line 593) is correct as-is.PerfSendToHelixArgs: Use the existingagent_pythonvariable (python3on Linux,py -3on Windows) for the$(Python)env var passed to.projfiles, instead of unconditionally using"python".Internal builds were unaffected because they create a Python venv first, which provides a
pythonsymlink.Why this is safe
$(Python)is consumed by all the scenario.projfiles (pre.py,test.py,post.py, etc.). The new values (python3on Linux,py -3on Windows) are the same values already used by the agent itself — see line 1157 (os.environ["Python"] = agent_python) andrun-performance-job-script-step.ymlline 6. Python venvs create bothpythonandpython3symlinks, so internal builds (which use a venv) are also unaffected. The hardcoded"python"was the oddball; this change makes the Helix work item value consistent with the rest of the infrastructure.