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

dependencies = [
"ipdb>=0.13.13",
"sentry-sdk",
]

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
4 changes: 0 additions & 4 deletions test-plain-python-missing-stack-frames/requirements.txt

This file was deleted.

11 changes: 4 additions & 7 deletions test-plain-python-missing-stack-frames/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/usr/bin/env bash

set -euo pipefail

reset

python -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt
if ! command -v uv &> /dev/null; then
curl -LsSf https://astral.sh/uv/install.sh | sh
fi

python main.py
uv run python main.py
Comment on lines +5 to +9

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 uses uv immediately after installation, but the installer doesn't update the PATH for the current shell session, causing a 'command not found' error.
Severity: HIGH

Suggested Fix

After installing uv, either add its installation directory (e.g., ~/.local/bin) to the PATH for the current session (e.g., export PATH="$HOME/.local/bin:$PATH") or invoke the binary using its absolute path. This ensures the command can be found 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: test-plain-python-missing-stack-frames/run.sh#L5-L9

Potential issue: The script installs `uv` via a piped shell command. The installer
modifies shell profile files (e.g., `.bashrc`) to add the `uv` binary's directory to the
system `PATH`. However, these changes do not affect the `PATH` of the currently running,
non-interactive shell script. As a result, the subsequent call to `uv run python
main.py` will fail with a 'command not found' error because the shell's `PATH`
environment variable has not been updated. This causes the script to fail in any
environment where `uv` is not pre-installed.

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

Loading