build(test-lambda-container): Migrate to uv and pyproject.toml#32
Conversation
Replace pip/requirements.txt with uv/pyproject.toml for dependency management. Update Dockerfile to use uv for installing dependencies. Refs PY-2459 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bac03ac. Configure here.
| ] | ||
|
|
||
| [tool.uv.sources] | ||
| sentry-sdk = { path = "../../sentry-python", editable = true } |
There was a problem hiding this comment.
Local sentry path breaks Docker build
High Severity
The pyproject.toml defines sentry-sdk as an editable path dependency (../../sentry-python). This path is outside the Docker build context and the source isn't copied into the container, causing uv pip install to fail during the image build.
Reviewed by Cursor Bugbot for commit bac03ac. Configure here.
| dependencies = [ | ||
| "boto3>=1.38.0", | ||
| "sentry-sdk", | ||
| ] |
There was a problem hiding this comment.
Pip sentry-sdk duplicates Lambda layer
Medium Severity
The removed requirements.txt only listed boto3; Sentry for this container test came from the copied serverless layer under /opt/python. The new dependencies list adds sentry-sdk, so uv pip install pulls a second SDK into system site-packages while the image still ships the layer and uses the layer’s sentry_lambda_handler entrypoint, changing which SDK the smoke test exercises.
Reviewed by Cursor Bugbot for commit bac03ac. Configure here.
| [tool.uv.sources] | ||
| sentry-sdk = { path = "../../sentry-python", editable = true } |
There was a problem hiding this comment.
Bug: The pyproject.toml references a local path dependency that is outside the Docker build context, which will either break the build or cause the wrong package version to be tested.
Severity: HIGH
Suggested Fix
Adjust the Docker build process to include the sentry-python source code. This can be achieved by changing the build context to a higher-level directory and adding a COPY instruction in the Dockerfile to bring the ../../sentry-python directory into the container image, allowing the local path dependency to resolve correctly.
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-lambda-container/pyproject.toml#L11-L12
Potential issue: The `pyproject.toml` file defines `sentry-sdk` as a local editable
dependency with a path (`../../sentry-python`) that is outside the Docker build context
(`test-lambda-container/`). During the Docker build, this path is inaccessible. This
will either cause the build to fail when `uv pip install` cannot find the local
directory, or it may cause `uv` to silently install a public version of `sentry-sdk`
from PyPI. The latter would mean the test container is not testing the local development
code, defeating its primary purpose.
Did we get this right? 👍 / 👎 to inform future reviews.


Summary
pip/requirements.txtwithuv/pyproject.tomlfor dependency managementuv pip installinstead ofpip install -r requirements.txtrequirements.txtRefs PY-2459
Test plan
pyproject.tomlincludes all dependencies from the originalrequirements.txtrequirements.txtis removed🤖 Generated with Claude Code