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
27 changes: 27 additions & 0 deletions test-overhaul-of-docs/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[project]
name = "test-overhaul-of-docs"
version = "0"
requires-python = ">=3.12"

dependencies = [
"aiohttp>=3.11.14",
"arq>=0.26.1",
"bottle>=0.13.2",
"falcon>=4.0.2",
"flask>=3.1.1",
"gunicorn>=23.0.0",
"ipdb>=0.13.13",
"pymongo>=4.12.0",
"pyramid>=2.0.2",
"quart>=0.20.0",
"redis>=5.2.1",
"rq>=2.3.0",
"sanic>=24.12.0",
"sentry-sdk[flask,aiohttp,bottle,falcon,pyramid,tornado,rq]",
"sqlalchemy>=2.0.38",
"psycopg2-binary>=2.9.10",
"tornado>=6.4.2",
]

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

This file was deleted.

26 changes: 5 additions & 21 deletions test-overhaul-of-docs/run.sh
Original file line number Diff line number Diff line change
@@ -1,24 +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

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

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


# uvicorn main:app --port 8000
# gunicorn main:app
python main.py
# sanic main:app
# flask --app main run

# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"

# arq demo.WorkerSettings
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 fails to update the current shell's PATH, causing the subsequent uv command to fail on systems where it wasn't pre-installed.
Severity: HIGH

Suggested Fix

After the uv installation command, source the appropriate environment file to update the PATH for the current session (e.g., source "$HOME/.cargo/env"). Alternatively, invoke uv using its full installation path, such as $HOME/.cargo/bin/uv.

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-overhaul-of-docs/run.sh#L4-L8

Potential issue: The `run.sh` script attempts to install `uv` if it is not found.
However, the installer (`curl -LsSf https://astral.sh/uv/install.sh | sh`) only updates
shell configuration files like `.bashrc` and does not modify the `PATH` of the currently
running script session. Consequently, the subsequent command `uv run python main.py`
fails with a "command not found" error. Because the script uses `set -euo pipefail`,
this error will cause the script to terminate immediately on any clean environment, such
as a CI runner or a new developer setup, that does not have `uv` pre-installed.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

uv not on PATH after install

Medium Severity

When uv is missing, run.sh installs it via curl | sh, but the installer runs in a subshell and does not update PATH in the current script. The next uv run line often fails with “command not found” on a first run without uv already installed.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 440d644. Configure here.

Loading