[CI] Fix CI script test subprocess environment#19713
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
tqchen
approved these changes
Jun 10, 2026
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.
This fixes CI script tests that accidentally run helper scripts with the wrong Python interpreter.
Some tests call
run_script(..., env={...})to pass test-specific environment variables.subprocess.runtreatsenvas a full environment replacement, so the subprocess lost the currentPATH. Since these scripts use a shebang like:#!/usr/bin/env python3they could fall back to the system Python instead of the active test Python.
In the wheel test environment this caused the CI helper scripts to run under Python 3.8, even though TVM requires Python >=3.10. Importing
ci/scripts/jenkins/git_utils.pythen failed on PEP 604 annotations such as:with:
This patch updates
tests/python/ci/test_utils.py::run_scriptto merge test-provided environment variables intoos.environinstead of replacing the entire environment. This preserves the active Python/PATH while still allowing each test to override or add variables.