-
Notifications
You must be signed in to change notification settings - Fork 1
build(test-lambda-function): Migrate to uv and pyproject.toml #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,15 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| set -ex | ||
| if ! command -v uv &> /dev/null; then | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| fi | ||
|
|
||
| rm -rf lambda_function_package.zip | ||
| rm -rf ./python_with_sentry/package/* | ||
|
|
||
| pip install --target ./python_with_sentry/package -r requirements.txt | ||
| uv pip install --target ./python_with_sentry/package -r pyproject.toml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Editable SDK breaks Lambda zipHigh Severity
Additional Locations (1)Reviewed by Cursor Bugbot for commit b1aff78. Configure here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uv not on PATH after installMedium Severity When Reviewed by Cursor Bugbot for commit b1aff78. Configure here. |
||
|
|
||
| cd ./python_with_sentry/package && zip -x "**/__pycache__/*" -r ../../lambda_function_package.zip . && cd - | ||
|
|
||
| cd ./python_with_sentry && zip -g ../lambda_function_package.zip lambda_function.py && cd - | ||
| cd ./python_with_sentry && zip -g ../lambda_function_package.zip lambda_function.py && cd - | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [project] | ||
| name = "test-lambda-function" | ||
| version = "0" | ||
| requires-python = ">=3.12" | ||
|
|
||
| dependencies = [ | ||
| "sentry-sdk", | ||
| ] | ||
|
|
||
| [tool.uv.sources] | ||
| sentry-sdk = { path = "../../sentry-python", editable = true } |
This file was deleted.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The command
uv pip install -r pyproject.tomlis invalid. The-rflag expects a requirements file, not a TOML file, which will cause the build script to fail.Severity: CRITICAL
Suggested Fix
Replace
uv pip install -r pyproject.tomlwith the correct command to install dependencies from the current project'spyproject.toml. The suggested command isuv pip install --target ./python_with_sentry/package .. This correctly reads the project definition and installs dependencies into the specified target directory.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.