Skip to content
Merged
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
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
description: "SDK language to test. One of: js, py, or leave empty for both"
required: false
default: ""
sentry-python-path:
description: "Path to local sentry-python repository"
required: false
default: "../../../sentry-python/sentry-python"

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 default value for sentry-python-path in action.yml is ../../../sentry-python/sentry-python, which contains an extra, incorrect /sentry-python suffix, causing path validation to fail.
Severity: HIGH

Suggested Fix

In action.yml, change the default value for the sentry-python-path input from ../../../sentry-python/sentry-python to ../../../sentry-python. This will align the default path with the validation logic's expectation that setup.py exists at the root of the specified directory.

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: action.yml#L17

Potential issue: The default path for the `sentry-python-path` input in `action.yml` is
set to `../../../sentry-python/sentry-python`. This path is incorrect because it
contains a redundant `/sentry-python` suffix. The validation logic in
`shared/orchestration/src/setup.ts` expects to find a `setup.py` file and a
`sentry_sdk/` directory at the root of the provided path. Due to the incorrect default,
the validation fails because it looks for these files in a non-existent nested
directory, leading to a `"✗ Local Sentry SDK path missing setup.py"` error. This breaks
the local Python SDK setup feature for any user relying on the default path.

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

openai-api-key:
description: "OpenAI API key"
required: true
Expand Down Expand Up @@ -50,7 +54,7 @@ runs:
working-directory: ${{ github.action_path }}
run: |
if [ "${{ inputs.language }}" = "py" ]; then
npm run cli setup -- --local-sentry-python ../../sentry-python
npm run cli setup -- --local-sentry-python ${{ inputs.sentry-python-path }}
elif [ -z "${{ inputs.language }}" ]; then
npm run cli setup
else
Expand Down
Loading