Skip to content

Conversation

bukzor
Copy link
Contributor

@bukzor bukzor commented Sep 2, 2025

  • 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

Co-Authored-By: Claude noreply@anthropic.com

- 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>
@bukzor bukzor requested a review from kenzoengineer September 2, 2025 18:33
Copy link

linear bot commented Sep 2, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 2, 2025
Copy link

codecov bot commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

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
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 2, 2025
Copy link
Contributor

github-actions bot commented Sep 2, 2025

🚨 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 #discuss-dev-infra channel.

@bukzor bukzor marked this pull request as ready for review September 2, 2025 23:29
@bukzor bukzor requested a review from a team as a code owner September 2, 2025 23:29
@bukzor bukzor enabled auto-merge (squash) September 2, 2025 23:29
cursor[bot]

This comment was marked as outdated.

@kenzoengineer kenzoengineer self-requested a review September 2, 2025 23:34
Copy link
Member

@kenzoengineer kenzoengineer left a 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
cursor[bot]

This comment was marked as outdated.

The thread_leak_allowlist.issue tag value must be a string to match the MutableMapping[str, str] type of tags.
@ryan953 ryan953 requested review from ryan953 and removed request for ryan953 September 3, 2025 18:04
@ryan953 ryan953 removed the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 3, 2025
@bukzor bukzor merged commit bf3b81e into master Sep 3, 2025
64 checks passed
@bukzor bukzor deleted the bukzor/di-1008-thread-leak-improvements branch September 3, 2025 18:07
Copy link

sentry-io bot commented Sep 3, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎

armenzg pushed a commit that referenced this pull request Sep 5, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants