From dbfe2dc527f16d8e7cdeb37dde466d39cc7be930 Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 15:01:01 -0400 Subject: [PATCH 1/3] build(test-checkin-in-trace-id): Migrate to uv and pyproject.toml Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update run.sh and run-celery.sh to use uv instead of manual venv creation and pip install. Refs PY-2437 Co-Authored-By: Claude Opus 4.6 --- test-checkin-in-trace-id/pyproject.toml | 14 ++++++++++++++ test-checkin-in-trace-id/requirements.txt | 7 ------- test-checkin-in-trace-id/run-celery.sh | 11 ++++++----- test-checkin-in-trace-id/run.sh | 12 ++++++------ 4 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 test-checkin-in-trace-id/pyproject.toml delete mode 100644 test-checkin-in-trace-id/requirements.txt diff --git a/test-checkin-in-trace-id/pyproject.toml b/test-checkin-in-trace-id/pyproject.toml new file mode 100644 index 0000000..b2425ed --- /dev/null +++ b/test-checkin-in-trace-id/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "test-checkin-in-trace-id" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "celery[redis]>=5.4.0", + "ipdb>=0.13.13", + "requests>=2.32.3", + "sentry-sdk[celery]", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-checkin-in-trace-id/requirements.txt b/test-checkin-in-trace-id/requirements.txt deleted file mode 100644 index 17c804b..0000000 --- a/test-checkin-in-trace-id/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -ipdb - -requests - -celery[redis] - --e ../../../code/sentry-python \ No newline at end of file diff --git a/test-checkin-in-trace-id/run-celery.sh b/test-checkin-in-trace-id/run-celery.sh index 448d9f7..717553e 100755 --- a/test-checkin-in-trace-id/run-celery.sh +++ b/test-checkin-in-trace-id/run-celery.sh @@ -1,9 +1,10 @@ -python -m venv .venv +#!/usr/bin/env bash +set -euo pipefail -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 redis-server & -celery -A tasks worker --loglevel=DEBUG \ No newline at end of file +uv run celery -A tasks worker --loglevel=DEBUG diff --git a/test-checkin-in-trace-id/run.sh b/test-checkin-in-trace-id/run.sh index 548c353..f283b88 100755 --- a/test-checkin-in-trace-id/run.sh +++ b/test-checkin-in-trace-id/run.sh @@ -1,8 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail -python -m venv .venv +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi -source .venv/bin/activate - -pip install -r requirements.txt - -python main.py \ No newline at end of file +uv run python main.py From 30f59ea8f28a84e182e90c72e92a833af4bc723d Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 15:09:21 -0400 Subject: [PATCH 2/3] fix(test-checkin-in-trace-id): Use explicit venv creation and activation in scripts Create .venv with uv venv if missing, activate it, and install deps with uv pip install -e . before running the app commands. Refs PY-2437 Co-Authored-By: Claude Opus 4.6 --- test-checkin-in-trace-id/run-celery.sh | 9 ++++++++- test-checkin-in-trace-id/run.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test-checkin-in-trace-id/run-celery.sh b/test-checkin-in-trace-id/run-celery.sh index 717553e..1926552 100755 --- a/test-checkin-in-trace-id/run-celery.sh +++ b/test-checkin-in-trace-id/run-celery.sh @@ -5,6 +5,13 @@ if ! command -v uv &> /dev/null; then curl -LsSf https://astral.sh/uv/install.sh | sh fi +if [ ! -d ".venv" ]; then + uv venv +fi + +source .venv/bin/activate +uv pip install -e . + redis-server & -uv run celery -A tasks worker --loglevel=DEBUG +celery -A tasks worker --loglevel=DEBUG diff --git a/test-checkin-in-trace-id/run.sh b/test-checkin-in-trace-id/run.sh index f283b88..61e968e 100755 --- a/test-checkin-in-trace-id/run.sh +++ b/test-checkin-in-trace-id/run.sh @@ -5,4 +5,11 @@ if ! command -v uv &> /dev/null; then curl -LsSf https://astral.sh/uv/install.sh | sh fi -uv run python main.py +if [ ! -d ".venv" ]; then + uv venv +fi + +source .venv/bin/activate +uv pip install -e . + +python main.py From f0a2b6fb388073b65bc758cc40e7f34799313e9a Mon Sep 17 00:00:00 2001 From: Erica Pisani Date: Thu, 21 May 2026 15:16:43 -0400 Subject: [PATCH 3/3] Revert "fix(test-checkin-in-trace-id): Use explicit venv creation and activation in scripts" This reverts commit 30f59ea8f28a84e182e90c72e92a833af4bc723d. --- test-checkin-in-trace-id/run-celery.sh | 9 +-------- test-checkin-in-trace-id/run.sh | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/test-checkin-in-trace-id/run-celery.sh b/test-checkin-in-trace-id/run-celery.sh index 1926552..717553e 100755 --- a/test-checkin-in-trace-id/run-celery.sh +++ b/test-checkin-in-trace-id/run-celery.sh @@ -5,13 +5,6 @@ if ! command -v uv &> /dev/null; then curl -LsSf https://astral.sh/uv/install.sh | sh fi -if [ ! -d ".venv" ]; then - uv venv -fi - -source .venv/bin/activate -uv pip install -e . - redis-server & -celery -A tasks worker --loglevel=DEBUG +uv run celery -A tasks worker --loglevel=DEBUG diff --git a/test-checkin-in-trace-id/run.sh b/test-checkin-in-trace-id/run.sh index 61e968e..f283b88 100755 --- a/test-checkin-in-trace-id/run.sh +++ b/test-checkin-in-trace-id/run.sh @@ -5,11 +5,4 @@ if ! command -v uv &> /dev/null; then curl -LsSf https://astral.sh/uv/install.sh | sh fi -if [ ! -d ".venv" ]; then - uv venv -fi - -source .venv/bin/activate -uv pip install -e . - -python main.py +uv run python main.py