build(test-celery-sentry-propagate-traces): Migrate from pip to uv#66
Conversation
Replace requirements.txt with pyproject.toml and update run.sh and run-celery.sh to use uv for dependency management and script execution. Refs PY-2435 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f2352f9. Configure here.
| python -m pip install -r requirements.txt | ||
|
|
||
| python main.py No newline at end of file | ||
| uv run python main.py |
There was a problem hiding this comment.
UV not on PATH after install
Medium Severity
When uv is missing, both scripts install it via curl | sh and then immediately call uv run. The installer updates shell profile files for future sessions but does not put uv on PATH in the current bash process, so the next line often fails with uv: command not found on a first-time machine.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit f2352f9. Configure here.
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
|
|
||
| redis-server --daemonize yes | ||
|
|
||
| celery -A tasks.app worker --loglevel=DEBUG -c 1 | ||
| uv run celery -A tasks.app worker --loglevel=DEBUG -c 1 |
There was a problem hiding this comment.
Bug: The script installs uv but fails to update the current shell's PATH, causing subsequent uv commands to fail with command not found on a fresh system.
Severity: HIGH
Suggested Fix
After the uv installation block, explicitly add the binary's directory to the PATH for the current session. For example, add export PATH="$HOME/.local/bin:$PATH" before the first call to 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-celery-sentry-propagate-traces/run-celery.sh#L4-L10
Potential issue: The script checks if `uv` is installed and, if not, installs it. The
`uv` installer adds its binary directory to the `PATH` in shell profile files, but these
changes only take effect in new shell sessions. The current script, which has `set -euo
pipefail` enabled, immediately attempts to execute `uv run ...` without updating the
current session's `PATH`. This results in a `command not found` error, causing the
script to abort on any system where `uv` is not already installed.
Did we get this right? 👍 / 👎 to inform future reviews.


Summary
requirements.txtwithpyproject.tomlfor dependency managementrun.shandrun-celery.shto useuv runinstead of manual venv/pip workflowTest plan
./run-celery.shand verify the celery worker starts./run.shand verify the app runs correctly🤖 Generated with Claude Code