Skip to content

Conversation

@aslonnie
Copy link
Collaborator

new cli/sdk does not have cluster env runtime env any more

@aslonnie aslonnie requested a review from a team as a code owner December 31, 2025 19:51
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 refactors how default environment variables for release tests are handled by moving them from the Python test runner code into the byod.Dockerfile. This is a positive change as it makes these environment variables a fundamental part of the test image. The related changes in the Python code and tests are correct. My feedback focuses on improving the Dockerfile by consolidating the new ENV instructions to reduce image layers, following Docker best practices.

Comment on lines 60 to 67
ENV RAY_BACKEND_LOG_JSON=1

# Logs the full stack trace from Ray Data in case of exception,
# which is useful for debugging failures.
ENV RAY_DATA_LOG_INTERNAL_STACK_TRACE_TO_STDOUT=1

# To make ray data compatible across multiple pyarrow versions.
ENV RAY_DATA_AUTOLOAD_PYEXTENSIONTYPE=1
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To reduce the number of layers in the Docker image and improve maintainability, it's a good practice to group related ENV instructions into a single one. This also allows for a consolidated comment block explaining all the variables. I've also added a comment for RAY_BACKEND_LOG_JSON for clarity and consistency.

# Enable JSON formatted logs for the Ray backend.
# Logs the full stack trace from Ray Data in case of exception for debugging.
# Makes Ray Data compatible across multiple pyarrow versions.
ENV RAY_BACKEND_LOG_JSON=1 \
    RAY_DATA_LOG_INTERNAL_STACK_TRACE_TO_STDOUT=1 \
    RAY_DATA_AUTOLOAD_PYEXTENSIONTYPE=1

@aslonnie aslonnie force-pushed the lonnie-251231-byodhash branch 2 times, most recently from 17c7947 to 5cc509b Compare December 31, 2025 23:05
)

return default
return _convert_env_list_to_dict(self["cluster"]["byod"].get("runtime_env", []))
Copy link

Choose a reason for hiding this comment

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

Tests using anyscale/ray images lose default ENV vars

Moving default environment variables from get_byod_runtime_env() to byod.Dockerfile causes a regression for tests using anyscale/ray images (when ray_version is specified). These tests previously received RAY_BACKEND_LOG_JSON, RAY_DATA_LOG_INTERNAL_STACK_TRACE_TO_STDOUT, and RAY_DATA_AUTOLOAD_PYEXTENSIONTYPE via the runtime env mechanism, but now won't have them since those official Anyscale images aren't built from byod.Dockerfile. The RAY_DATA_AUTOLOAD_PYEXTENSIONTYPE variable in particular could cause PyArrow compatibility issues in affected tests.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the change is actually a good change. test using ray_version are mostly templates, and should not use these feature-flag-ish env vars.

@ray-gardener ray-gardener bot added core Issues that should be addressed in Ray Core release-test release test labels Jan 1, 2026
new cli/sdk does not have cluster env runtime env any more

Signed-off-by: Lonnie Liu <[email protected]>
@aslonnie aslonnie force-pushed the lonnie-251231-byodhash branch from 5cc509b to b4d718a Compare January 1, 2026 02:46
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 release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant