Skip to content
Merged
Show file tree
Hide file tree
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 test-ray/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.14

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Python 3.14 may break Ray due to known issues

Medium Severity

The .python-version jumps from 3.10 to 3.14, but Ray has a known open issue (ray-project/ray#62664, April 2026) where it fails to start on Python 3.14 due to a Pydantic dependency conflict. Since ray>=2.46.0 doesn't constrain the Pydantic version tightly enough, uv may resolve to an incompatible Pydantic, causing ray.init() to fail at runtime. This version jump is also not mentioned in the PR description, suggesting it may be unintentional.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9116f3e. Configure here.

13 changes: 13 additions & 0 deletions test-ray/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "test-ray"
version = "0"
requires-python = ">=3.12"

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: The requires-python in pyproject.toml is set to >=3.12, but the .python-version file specifies 3.10, which will cause uv run to fail.
Severity: MEDIUM

Suggested Fix

Update the .python-version file in the test-ray/ directory to a version that satisfies the >=3.12 constraint specified in pyproject.toml, for example, by changing its content to 3.12.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: test-ray/pyproject.toml#L4

Potential issue: The `pyproject.toml` file specifies `requires-python = ">=3.12"`, while
the `.python-version` file in the same directory is set to `3.10`. When a tool like `uv`
is used, it will prioritize the version from `.python-version` (3.10). However, it will
then check this against the `requires-python` constraint from `pyproject.toml` and find
that 3.10 does not satisfy `>=3.12`. This incompatibility will cause the `uv run`
command to fail, preventing the test environment from being set up correctly.

Did we get this right? 👍 / 👎 to inform future reviews.


dependencies = [
"ipdb>=0.13.13",
"ray>=2.46.0",
"sentry-sdk",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
5 changes: 0 additions & 5 deletions test-ray/requirements.txt

This file was deleted.

18 changes: 5 additions & 13 deletions test-ray/run.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
#!/usr/bin/env bash
set -euo pipefail

# exit on first error
set -xe
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

reset

# create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install (or update) requirements
python -m pip install -r requirements.txt

# Run ray app
python main.py
uv run python main.py
Comment on lines +4 to +8

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: The script installs uv but doesn't update the current session's PATH, causing the subsequent uv run command to fail in environments where uv isn't pre-installed.
Severity: LOW

Suggested Fix

After installing uv, update the PATH for the current shell session before attempting to use the uv command. For example, add export PATH="$HOME/.local/bin:$PATH" after the curl installation line to ensure the uv executable can be found.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: test-ray/run.sh#L4-L8

Potential issue: The `run.sh` script installs `uv` via `curl` if it is not already
present, but then immediately attempts to execute it. The `uv` installer modifies shell
profile files (e.g., `.bashrc`) to add itself to the `PATH` for future sessions, but it
does not update the `PATH` for the current, running shell session. Consequently, in a
fresh environment where `uv` is not pre-installed, the subsequent `uv run` command will
fail with a "command not found" error. Because the script uses `set -euo pipefail`, this
error will cause the script to exit immediately.

Loading