Skip to content
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

Added AWS Lambda Python 3.9 runtime support #1174

Closed
wants to merge 4 commits into from

Conversation

razumeiko
Copy link
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
Contributor

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

@aahung
Copy link

aahung commented Sep 8, 2021

@razumeiko Any plan to push forward this PR?

@aahung
Copy link

aahung commented Sep 29, 2021

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

@razumeiko
Copy link
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
Copy link
Contributor Author

razumeiko commented Sep 29, 2021

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
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
Member

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
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
Member

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.

None yet

6 participants