Skip to content

feat: Integration for Chalice #779

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

Merged
merged 28 commits into from
Sep 9, 2020
Merged

Conversation

Gleekzone
Copy link
Contributor

This is a proposal for the integration of Chalice in Sentry

@Gleekzone Gleekzone marked this pull request as draft August 10, 2020 23:19
Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I notice that some stuff here is duplicated from aws lambda integration, that should not be necessary

tox.ini Outdated
@@ -69,8 +69,9 @@ envlist =
{py2.7,py3.7,py3.8}-sqlalchemy-{1.2,1.3}

py3.7-spark

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@Gleekzone Gleekzone marked this pull request as ready for review August 20, 2020 23:17
Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you resolve the last issue about copypasted code from chalice, and add a __init__ in tests/integrations/chalice that calls importorskip (like in other integrations), otherwise the base testsuite does not pass (see travis CI)

reraise(*exc_info)


old_get_view_function_response = Chalice._get_view_function_response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't have a global backup of the view function response, this will break if multiple libraries monkeypatch chalice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add this in setup_once().

Copy link
Contributor Author

@Gleekzone Gleekzone Sep 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the tests, these fail because the parameters of the context '_max_runtime' arrive null, so this line

is not executed, the response if it contains the status_code '500' and the json, I don't understand why it fails in travis.

Copy link
Member

@untitaker untitaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there, please fix the linting errors (run make lint locally)

@matin
Copy link

matin commented Sep 9, 2020

@untitaker you now have permissions to push to our fork.

We're already using sentry-chalice in multiple projects. It'll be great switch to the official sentry_sdk library!

@matin
Copy link

matin commented Sep 9, 2020

fwiw, Chalice does have a stub file for type hinting, app.pyi, and includes py.typed.

It shouldn't be necessary to ignore the import to resolve this error: https://travis-ci.com/github/getsentry/sentry-python/jobs/382832642#L249-L251

@untitaker
Copy link
Member

untitaker commented Sep 9, 2020 via email

@untitaker untitaker changed the title Chalice feat: Integration for Chalice Sep 9, 2020
@untitaker untitaker merged commit 3f206c2 into getsentry:master Sep 9, 2020
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.

3 participants