-
Notifications
You must be signed in to change notification settings - Fork 1
build(test-celery-beat-parent-span-id): Migrate from pip to uv #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| [project] | ||
| name = "test-celery-beat-parent-span-id" | ||
| version = "0" | ||
| requires-python = ">=3.12" | ||
|
|
||
| dependencies = [ | ||
| "celery>=5.4.0", | ||
| "flask>=3.1.0", | ||
| "ipdb>=0.13.13", | ||
| "redis>=5.2.1", | ||
| "sentry-sdk[celery,flask]", | ||
| ] | ||
|
|
||
| [tool.uv.sources] | ||
| sentry-sdk = { path = "../../sentry-python", editable = true } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,11 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # exit on first error | ||
| set -euo pipefail | ||
|
|
||
| reset | ||
|
|
||
| # create and activate virtual environment | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
|
|
||
| # Install (or update) requirements | ||
| pip install -r requirements.txt | ||
| 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 beat \ | ||
| uv run celery -A tasks.app beat \ | ||
| --loglevel=INFO | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # exit on first error | ||
| set -euo pipefail | ||
|
|
||
| reset | ||
|
|
||
| # create and activate virtual environment | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
|
|
||
| # Install (or update) requirements | ||
| pip install -r requirements.txt | ||
| 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 \ | ||
| uv run celery -A tasks.app worker \ | ||
| --loglevel=INFO \ | ||
| -c 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,10 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # exit on first error | ||
| set -euo pipefail | ||
|
|
||
| reset | ||
|
|
||
| # create and activate virtual environment | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
|
|
||
| # Install (or update) requirements | ||
| pip install -r requirements.txt | ||
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
|
|
||
| redis-server --daemonize yes | ||
|
|
||
| flask --app main run | ||
| uv run flask --app main run | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same-shell uv PATH not updatedMedium Severity The scripts install Additional Locations (1)Reviewed by Cursor Bugbot for commit dcb02bd. Configure here. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,4 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # exit on first error | ||
| set -euo pipefail | ||
|
|
||
| # create and activate virtual environment | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
|
|
||
| # Start task | ||
| curl -i -X GET http://localhost:5000/ |


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The script installs
uvbut doesn't update the current shell'sPATH, causing the subsequentuv runcommand to fail ifuvwasn't already installed.Severity: HIGH
Suggested Fix
After the
uvinstallation command, source the appropriate shell profile file (e.g.,source ~/.bashrc) or explicitly add theuvbinary's directory to thePATHenvironment variable for the current script session. For example:export PATH="$HOME/.cargo/bin:$PATH".Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.