Skip to content

build(test-long-running-transaction): Migrate to uv and pyproject.toml#42

Merged
ericapisani merged 1 commit into
mainfrom
PY-2469-test-long-running-transaction
May 21, 2026
Merged

build(test-long-running-transaction): Migrate to uv and pyproject.toml#42
ericapisani merged 1 commit into
mainfrom
PY-2469-test-long-running-transaction

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Summary

  • Replace pip/requirements.txt with uv/pyproject.toml for dependency management
  • Update run.sh to use uv run
  • Remove legacy requirements.txt

Refs PY-2469

🤖 Generated with Claude Code

Replace pip/requirements.txt with uv/pyproject.toml for dependency
management. Update run.sh to use uv run.

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

linear-code Bot commented May 21, 2026

Copy link
Copy Markdown

PY-2469

@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 89a8ee7. Configure here.

fi

python main.py No newline at end of file
uv run python main.py

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 missing after install

Medium Severity

When uv is not on PATH, the script installs it via the official installer but never loads the installer’s env into the current shell. The next uv run still runs in a session where command -v uv fails, so the first run can exit with “command not found” even though installation succeeded.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 89a8ee7. Configure here.

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

python main.py No newline at end of file
uv run python main.py

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 PATH for the current session, causing the uv run command to fail in clean environments.
Severity: MEDIUM

Suggested Fix

After the uv installation command, update the PATH for the current session before calling uv. For example, add export PATH="$HOME/.local/bin:$PATH" to make the uv binary available to the script.

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-long-running-transaction/run.sh#L5-L9

Potential issue: In a clean environment where `uv` is not pre-installed, the `run.sh`
script attempts to install it. The `uv` installer modifies shell configuration files for
future sessions but does not update the `PATH` for the currently executing script.
Consequently, the subsequent `uv run python main.py` command fails with a "command not
found" error. Because the script has `set -euo pipefail` enabled, this failure will
cause the script to abort, preventing the test from running. This issue will likely only
surface in CI/CD environments or on machines that do not already have `uv` installed.

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

@ericapisani ericapisani merged commit b186bb3 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