Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/run_performance_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_pre_commands(
# Run inside a python venv
if os_group == "windows":
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fallback to py -3.13 assumes that a non-free-threaded Python 3.13 is available on the system. While the Windows Python launcher will provide an error if 3.13 is not installed, consider adding a comment to document this assumption and the expected Helix environment configuration.

Suggested change
if os_group == "windows":
if os_group == "windows":
# Assumes a non-free-threaded Python 3.13 is installed and available via the
# Windows Python launcher as `py -3.13` on Helix Windows queues. The `py -3`
# invocation first checks whether it is a free-threaded 3.13 build and avoids
# using it; if so, we fall back to `py -3.13` which must be present in the
# Helix environment.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This complex one-liner command is difficult to read and maintain. The command combines detection logic, conditional execution, and fallback behavior all in a single line. Consider breaking this into multiple commands with clear comments explaining each step, or at minimum, add an inline comment explaining the logic: "Detect if running 3.13t (free-threaded), and if so, use py -3.13 instead to avoid CFFI compatibility issues".

Suggested change
if os_group == "windows":
if os_group == "windows":
# Detect if `py -3` is Python 3.13 in experimental free-threaded mode; if so, avoid using it
# to create the venv (due to CFFI compatibility issues) and instead fall back to `py -3.13`.

Copilot uses AI. Check for mistakes.
install_prerequisites += [
"py -3 -m venv %HELIX_WORKITEM_ROOT%\\.venv",
"py -3 -c \"exit(1 if __import__('sys').version_info[:2] == (3, 13) and 'experimental free-threading' in __import__('sys').version.lower() else 0)\" && py -3 -m venv %HELIX_WORKITEM_ROOT%\\.venv || py -3.13 -m venv %HELIX_WORKITEM_ROOT%\\.venv",
"call %HELIX_WORKITEM_ROOT%\\.venv\\Scripts\\activate.bat",
"echo on" # venv activate script turns echo off, so turn it back on
]
Expand Down
Loading