getsentry / getsentry/sentry-python

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

Aperta
#3,905 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
breaking Breaking change Improvement Integration: AWS Lambda Python Quality Improvement SDK 3.0
Lingua principale
Python
Stelle
2.2k
Fork
669
Merge medio
1g 1h
PR unite (30g)
213

Descrizione

### 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.