Skip to content

Fix Falcon Integration #2346

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

Closed
wants to merge 7 commits into from
Closed

Conversation

szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Sep 4, 2023

Fixes #1946

@szokeasaurusrex szokeasaurusrex changed the title Fix #1946 Fix Asyncio Integration Sep 4, 2023
@szokeasaurusrex szokeasaurusrex changed the title Fix Asyncio Integration Fix Falcon Integration Sep 4, 2023
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/falcon-fix branch from c78d918 to 41016c8 Compare September 4, 2023 14:26

class SentryFalconMiddlewareBase(ABC):
@abstractmethod
def process_request(self, req: Any, resp: Any, *args: Any, **kwargs: Any) -> None:
Copy link
Member Author

Choose a reason for hiding this comment

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

Is it okay that I used Python 3-style type hints here? This file should never get loaded in Python 2

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be fine 👀

@szokeasaurusrex
Copy link
Member Author

Should we be adding unit tests for this change? Or is it simple enough for unit tests to be unnecessary?

@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review September 5, 2023 14:45
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

Great job figuring out how to deal with the py2/3 compat issue! 🎖️

Approving as the fix itself looks good, but please don't merge yet -- I think we do need testcases.

Even though the change looks small we're actually adding a major feature, which is support for ASGI Falcon, so I think that warrants some testcases. We could create a dummy ASGI Falcon app and basically check that the tests that work for WSGI also work for the async app. I see that there's a falcon.testing module -- maybe there's a test asgi app that we could use?

@szokeasaurusrex szokeasaurusrex marked this pull request as draft September 6, 2023 08:21
@szokeasaurusrex
Copy link
Member Author

szokeasaurusrex commented Sep 6, 2023

Converting back to a draft to block merging until test cases are completed

@szokeasaurusrex
Copy link
Member Author

This PR has been superseded by #2359

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.

sentry-sdk stopped working with falcon 3+ asgi app
2 participants