Skip to content

build(tmp-celery-flush): Migrate from pip to uv#55

Merged
ericapisani merged 1 commit into
mainfrom
PY-2482-tmp-celery-flush
May 21, 2026
Merged

build(tmp-celery-flush): Migrate from pip to uv#55
ericapisani merged 1 commit into
mainfrom
PY-2482-tmp-celery-flush

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace requirements.txt with pyproject.toml for dependency management
  • Update run-celery.sh and start-task.sh to use uv run instead of manual venv/pip workflow
  • Part of PY-2428 migration effort

Test plan

  • Run ./run-celery.sh and verify the celery worker starts correctly
  • Run ./start-task.sh and verify the task is dispatched

🤖 Generated with Claude Code

Replace requirements.txt with pyproject.toml and update run-celery.sh
and start-task.sh to use uv for dependency management and execution.

Refs PY-2482
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit af7a7b1. Configure here.

redis-server --daemonize yes

celery -A tasks.app worker \
uv run celery -A tasks.app worker \

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 unavailable after inline install

Medium Severity

When uv is not already on PATH, the scripts run Astral’s installer and then immediately invoke uv run. The installer does not expose uv to the current shell session, so the next line fails with “command not found” under set -euo pipefail, breaking the PR test plan on a fresh environment.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit af7a7b1. Configure here.

@linear-code

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2482

PY-2428

Comment on lines +4 to +6
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

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 PATH for the current session, causing subsequent uv commands to fail with "command not found".
Severity: HIGH

Suggested Fix

After the uv installation block, add a line to update the PATH for the current shell session, for example: export PATH="$HOME/.local/bin:$PATH". This will ensure the uv binary is discoverable in subsequent commands within the same script execution.

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: tmp-celery-flush/run-celery.sh#L4-L6

Potential issue: After installing `uv` via a curl script, the shell script immediately
attempts to use the `uv` command. The installer places the `uv` binary in `~/.local/bin`
and updates shell profile files, but these changes do not affect the current, running
shell session. Because the `PATH` is not updated for the current session, the `uv`
command is not found. As the script is configured with `set -euo pipefail`, this
"command not found" error will cause the script to exit immediately, preventing it from
completing its task. This failure occurs precisely in the scenario the installation
block is meant to handle—when `uv` is not already present.

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

@ericapisani ericapisani merged commit e21b464 into main May 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant