Skip to content

Added AWS Lambda Python 3.9 runtime support#1174

Closed
razumeiko wants to merge 4 commits into
getsentry:masterfrom
razumeiko:master
Closed

Added AWS Lambda Python 3.9 runtime support#1174
razumeiko wants to merge 4 commits into
getsentry:masterfrom
razumeiko:master

Conversation

@razumeiko

Copy link
Copy Markdown
Contributor

AWS changed bootstrap location in Python 3.9 runtime.
Tested on next runtimes: 3.7, 3.8, 3.9
Issue: #1170

@ahmedetefy

Copy link
Copy Markdown
Contributor

Hey @razumeiko
Thanks for the PR, can you add some test that verifies that behaviour?

@aahung

aahung commented Sep 8, 2021

Copy link
Copy Markdown

@razumeiko Any plan to push forward this PR?

@aahung

aahung commented Sep 29, 2021

Copy link
Copy Markdown

I tried to use this PR code, but unhandled exceptions are not captured.

@razumeiko

Copy link
Copy Markdown
Contributor Author

I'll try to write tests in the next couple of days. @aahung can you clarify please what exceptions are you faced with?

@razumeiko

razumeiko commented Sep 29, 2021

Copy link
Copy Markdown
Contributor Author

I was going to write some tests but when i run tests locally on clean repo i have weird errors
..F..........FFs..........F...............F........e.....FFFF

3.8 Runtime
tests/integrations/aws_lambda/test_aws.py:177: in test_basic
E ValueError: not enough values to unpack (expected 1, got 0)

3.7 Runtime
tests/integrations/aws_lambda/test_aws.py:299: in test_init_error
(event,) = events
E ValueError: too many values to unpack (expected 1)

E subprocess.CalledProcessError: Command '['pip', 'install', '--no-cache-dir', '-q', 'dist/sentry_sdk-1.3.1-py2.py3-none-any.whl', '-t', '/var/folders/yd/mnqmxwr9211bqxc60qtbvgzc0000gn/T/tmp4eb2v42d/python']' returned non-zero exit status 1.

test_non_dict_event[python3.8-"Good dog!"-False-1]
tests/integrations/aws_lambda/test_aws.py:486: in test_non_dict_event
envelope = envelopes[0]
E IndexError: list index out of range

And so on.
I spend a couple of hours trying to play with local python version checking test code but unfortunately no luck. And this is on clean sentry without my changes. If someone knows what's the problem, let me know, i can't really work on tests without running it locally.

@razumeiko

Copy link
Copy Markdown
Contributor Author

I added runtime 3.9 to tests and fixed a small bug in the code. I am not sure if tests will pass but let's try it.

@iker-barriocanal

Copy link
Copy Markdown
Contributor

The runtime should also be added as a compatible runtime in the Craft config, see https://github.com/getsentry/sentry-python/blob/master/.craft.yml#L13.

@tomscytale

Copy link
Copy Markdown
Contributor

I attempted to open a pr against razumeiko:master to fix the lint issue, but accidentally created a new PR here - #1239

May as well leave it open - razumeiko doesn't appear to be active recently.

@AbhiPrasad

Copy link
Copy Markdown
Contributor

Closing as #1239 was merged.

@AbhiPrasad AbhiPrasad closed this Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants