getsentry / getsentry/sentry-python

Support multiple major Versions of the Sentry SDK in the Lambda Layer

未關閉
#3,905 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
breaking Breaking change Improvement Integration: AWS Lambda Python Quality Improvement SDK 3.0
主要語言
Python
星號
2.2k
分支
669
平均合併
1 天 1 小時
30 天內合併 PR
213

描述

### Problem Statement

The AWS Lambda Layer version of the Sentry SDK has as version number only an integer (because that is how AWS Lambda Layers are versioned)

![Image](https://github.com/user-attachments/assets/2950ce39-4c6c-4363-818d-88cbf7fd9725)

Right now users have no way of knowing what Version of the AWS Lambda Layer includes what version of the Sentry SDK.

Meaning:
- `arn:aws:lambda:us-east-1:xxx:layer:SentryPythonServerlessSDK:125` could be Sentry SDK version `1.45.0` and
- `arn:aws:lambda:us-east-1:xxx:layer:SentryPythonServerlessSDK:126` could be Sentry SDK version `2.0.0` and
- `arn:aws:lambda:us-east-1:xxx:layer:SentryPythonServerlessSDK:127` could be Sentry SDK version `1.45.1`.

There is also the problem, that the `latest` version in the release registry can be a version of an old major. (in the example above `1.45.1` would be latest, not `2.0.0`.)

### Solution Brainstorm

### Option A)

Include the major version in the AWS Lambda Layers name. (This is what Javascript does). We would have `SentryPythonServerlessSDKv2` and `SentryPythonServerlessSDKv3`.

This means more work, because we need to update the release process to deploy the correctly named version of the SDK and also update the [docs page](https://docs.sentry.io/platforms/python/integrations/aws-lambda/manual-layer/) to display the correct layer name (and also make it possible to select the major version of the SDK to install)

There is also an Issue for changing the release registry for making the major version selection possible: https://github.com/getsentry/sentry-release-registry/issues/176

### Option B) (tracked here: https://github.com/getsentry/sentry-python/issues/3963)

Add the SDK version that is included in the layer in the layers `Description`. As you can see in the screenshot above, the description is currently empty.

This would at least make it visible to the users what version of the SDK she has installed on her Lambda function.

Not as big of a change as Option A.

This would not solve the problem when deploying a bug fix version of an old major, the `latest` version in the release registry will be set to this (outdated) version.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。