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-threading-logger/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "test-threading-logger"
version = "0"
requires-python = ">=3.12"

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

[tool.uv.sources]
sentry-sdk = { path = "../../sentry-python", editable = true }
5 changes: 0 additions & 5 deletions test-threading-logger/requirements.txt

This file was deleted.

12 changes: 4 additions & 8 deletions test-threading-logger/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/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 +4 to +8

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 current shell's $PATH. The subsequent call to uv fails because the command cannot be found, causing the script to exit.
Severity: MEDIUM

Suggested Fix

After installing uv, source the relevant shell configuration file (e.g., source ~/.bashrc) or find the uv binary and call it using its absolute path (e.g., ~/.cargo/bin/uv run ...) to ensure it's available in the current script's environment.

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-threading-logger/run.sh#L4-L8

Potential issue: The `run.sh` script attempts to install the `uv` tool if it's not
present. The installer adds the `uv` binary's location to the `$PATH` by modifying shell
configuration files (e.g., `~/.bashrc`). However, these changes are not sourced by the
currently running script. Consequently, when the script immediately calls `uv run python
main.py`, the shell cannot find the `uv` command because its `$PATH` is not updated.
Since the script uses `set -euo pipefail`, this 'command not found' error causes the
script to exit prematurely on its first run on a clean system.

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

Loading