Skip to content

Conversation

@aslonnie
Copy link
Collaborator

It is technically still using the resolved dependencies of python
3.9, but all libraries used are version agnostic, it should run.

this makes it possible to run on a different python version
than the CI wrapper code.

Signed-off-by: Lonnie Liu <[email protected]>
It is technically still using the resolved dependencies of python
3.9, but all libraries used are version agnostic, it should run.

Signed-off-by: Lonnie Liu <[email protected]>
@aslonnie aslonnie requested a review from a team as a code owner November 11, 2025 02:56
@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Nov 11, 2025
@aslonnie
Copy link
Collaborator Author

this is built on top of #58516

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Python version for the policy check to 3.12 and refactors several scripts to remove dependencies on ray_ci.utils and ray_release. The changes replace a custom logger with standard print statements to sys.stderr, which is a reasonable simplification for CI scripts. The logic for determining when to perform a dry run in cmd_build.py has also been simplified. I've suggested a small refactoring to make the dry_run logic even cleaner. Overall, the changes are well-aligned with the goal of updating the Python environment and reducing dependencies.

Comment on lines 28 to 40
dry_run = False
if (
os.environ.get("BUILDKITE_PIPELINE_ID")
not in get_global_config()["ci_pipeline_postmerge"]
):
if os.environ.get("RAYCI_STAGE", "") != "postmerge":
dry_run = True
logger.info(
"Not uploading build artifacts because this is not a postmerge pipeline."
print(
"Not uploading build artifacts because this is not a postmerge pipeline.",
file=sys.stderr,
)

if os.environ.get("BUILDKITE_BRANCH") != "master":
elif os.environ.get("BUILDKITE_BRANCH") != "master":
dry_run = True
logger.info(
"Not uploading build artifacts because this is not the master branch."
print(
"Not uploading build artifacts because this is not the master branch.",
file=sys.stderr,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The logic to determine dry_run can be simplified. By setting dry_run to True by default and only changing it to False when the conditions for an upload are met, you can make the code more concise and avoid repeating dry_run = True.

Suggested change
dry_run = False
if (
os.environ.get("BUILDKITE_PIPELINE_ID")
not in get_global_config()["ci_pipeline_postmerge"]
):
if os.environ.get("RAYCI_STAGE", "") != "postmerge":
dry_run = True
logger.info(
"Not uploading build artifacts because this is not a postmerge pipeline."
print(
"Not uploading build artifacts because this is not a postmerge pipeline.",
file=sys.stderr,
)
if os.environ.get("BUILDKITE_BRANCH") != "master":
elif os.environ.get("BUILDKITE_BRANCH") != "master":
dry_run = True
logger.info(
"Not uploading build artifacts because this is not the master branch."
print(
"Not uploading build artifacts because this is not the master branch.",
file=sys.stderr,
)
dry_run = True
if os.environ.get("RAYCI_STAGE", "") != "postmerge":
print(
"Not uploading build artifacts because this is not a postmerge pipeline.",
file=sys.stderr,
)
elif os.environ.get("BUILDKITE_BRANCH") != "master":
print(
"Not uploading build artifacts because this is not the master branch.",
file=sys.stderr,
)
else:
dry_run = False

@ray-gardener ray-gardener bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core devprod labels Nov 11, 2025
@aslonnie aslonnie closed this Nov 13, 2025
@aslonnie
Copy link
Collaborator Author

going to use python 3.10 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core devprod docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants