-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
ref(thread-leaks): simplify assertion API and improve error handling #98632
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
Conversation
- Remove unused parameters from assert_none() - Store thread_leaks in ThreadLeakAssertionError for proper handling - Move Sentry reporting logic to pytest plugin where context is available - Improve event structure with pytest and allowlist contexts - Remove redundant sentry import from assertion module This creates cleaner separation of concerns with assertion logic separate from reporting logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #98632 +/- ##
==========================================
- Coverage 81.07% 81.02% -0.06%
==========================================
Files 8530 8532 +2
Lines 376444 379379 +2935
Branches 23853 23853
==========================================
+ Hits 305207 307395 +2188
- Misses 70870 71617 +747
Partials 367 367 |
- Create test_pytest.py to test Sentry event capture functionality - Update test_assertion.py to remove Sentry event checks (moved to test_pytest.py) - Fix test_sentry.py to handle pytest.Mark objects and new event structure - Fix bug: mechanism_data allowlisted should be boolean, not pytest.Mark object
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think its good as long as tests/ci pass and ryan's concern about package.json
is addressed
- Filter None values from tags dict to satisfy MutableMapping[str, str] - Add type: ignore comments for Thread._where dynamic attributes
The thread_leak_allowlist.issue tag value must be a string to match the MutableMapping[str, str] type of tags.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
…98632) - Remove unused parameters from assert_none() - Store thread_leaks in ThreadLeakAssertionError for proper handling - Move Sentry reporting logic to pytest plugin where context is available - Improve event structure with pytest and allowlist contexts - Remove redundant sentry import from assertion module This creates cleaner separation of concerns with assertion logic separate from reporting logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: kenzoengineer <kenzoengineer@gmail.com>
This creates cleaner separation of concerns with assertion logic separate
from reporting logic.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com