Skip to content

[doc] add doc build env var signal#57170

Merged
aslonnie merged 1 commit intomasterfrom
lonnie-251003-docbuild
Oct 4, 2025
Merged

[doc] add doc build env var signal#57170
aslonnie merged 1 commit intomasterfrom
lonnie-251003-docbuild

Conversation

@aslonnie
Copy link
Copy Markdown
Collaborator

@aslonnie aslonnie commented Oct 3, 2025

so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by #56918

so that logic can conditionally execute or skip for doc building

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
@aslonnie aslonnie requested review from a team as code owners October 3, 2025 21:15
global _PYARROW_VERSION_VALIDATED

if os.environ.get("RAY_DOC_BUILD", "0") == "1":
return
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: PyArrow Version Check Skips Validation

When RAY_DOC_BUILD=1, _check_pyarrow_version() returns early without setting _PYARROW_VERSION_VALIDATED. This causes the PyArrow version check to re-execute on subsequent calls during doc builds, despite the intention to skip validation after the initial check.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
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 introduces a RAY_DOC_BUILD environment variable to conditionally skip logic during documentation builds. This is used to bypass pyarrow version checks. However, the removal of ray.air.util.tensor_extensions and ray.data._internal.arrow_ops from autodoc_mock_imports is premature, as these modules still contain code that will fail if pyarrow is not installed. I've left a comment with a suggestion to revert this part of the change.

"ray.serve.generated",
"ray.air.util.tensor_extensions",
"ray.data._internal.arrow_ops",
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

Removing ray.air.util.tensor_extensions and ray.data._internal.arrow_ops from autodoc_mock_imports is premature. While _check_pyarrow_version is patched to not run during doc builds, other functions like get_pyarrow_version are not, and they are used in these modules. This will cause a TypeError during doc builds when pyarrow is not installed, as get_pyarrow_version will return None which cannot be compared to a Version object.

A more complete fix would be to also make get_pyarrow_version in ray/_private/arrow_utils.py aware of the RAY_DOC_BUILD environment variable. For now, I suggest re-adding these modules to the mock list to prevent breaking the doc build.

    "ray.air.util.tensor_extensions",
    "ray.data._internal.arrow_ops",
]

@aslonnie aslonnie added the go add ONLY when ready to merge, run all tests label Oct 3, 2025
@ray-gardener ray-gardener bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Oct 4, 2025
@aslonnie aslonnie requested a review from a team October 4, 2025 03:43
@aslonnie
Copy link
Copy Markdown
Collaborator Author

aslonnie commented Oct 4, 2025

I am merging this... will ask for forgiveness laster.

@aslonnie aslonnie merged commit 70762d6 into master Oct 4, 2025
6 checks passed
@aslonnie aslonnie deleted the lonnie-251003-docbuild branch October 4, 2025 14:37
dstrodtman pushed a commit to dstrodtman/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
eicherseiji pushed a commit to eicherseiji/ray that referenced this pull request Oct 6, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
liulehui pushed a commit to liulehui/ray that referenced this pull request Oct 9, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
joshkodi pushed a commit to joshkodi/ray that referenced this pull request Oct 13, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Signed-off-by: Josh Kodi <joshkodi@gmail.com>
justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
so that logic can conditionally execute or skip for doc building

fixes doc build failure introduced by
ray-project#56918

Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
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 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.

1 participant