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

Add an exclusion for the exception type found in the latest core output. #7722

Merged
merged 4 commits into from
Nov 27, 2023

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Nov 27, 2023

This PR adds an exclusion for the exception type found in the latest core output. Specifically, it includes the word 'warning' in the list of exclusions.

  • Refactored the parse_last_core_output function to improve readability and maintainability.
  • Added a regular expression pattern _re_search_exception_exclusions to exclude specific exception types from being parsed.
  • Modified the parse_last_core_output function to skip parsing if an excluded exception type is found.

Fixes #7713

Specifically, it includes the word 'warning' in the list of exclusions.

Refactored the parse_last_core_output function to improve readability and maintainability.
Added a regular expression pattern _re_search_exception_exclusions to exclude specific exception types from being parsed.
Modified the parse_last_core_output function to skip parsing if an excluded exception type is found.
@drew2a drew2a marked this pull request as ready for review November 27, 2023 11:00
@drew2a drew2a requested review from a team, egbertbouman and kozlovsky and removed request for a team and egbertbouman November 27, 2023 11:00
…entry_tools.py

- Fix the regex pattern in `_re_search_exception` to properly match exception strings.
- Add new test cases to `test_sentry_tools.py` for handling additional exception strings.

This commit improves the accuracy of matching exception strings and expands the test coverage for handling different types of exceptions.
The regular expression for finding exceptions in the string has been fixed to correctly capture the exception name and message. Additionally, the exclusion pattern for warnings has been updated. The test cases have also been modified to reflect these changes.
…rs and underscores in sentry_tools.py

The regular expression pattern used to find exceptions in strings has been updated to include alphanumeric characters and underscores. This ensures that exceptions with names like "pony_orm.core.TransactionIntegrityError" are correctly matched.

Also, added test cases for strings that should not be matched in test_sentry_tools.py.
@drew2a drew2a merged commit 17a5783 into Tribler:release/7.13 Nov 27, 2023
16 checks passed
@drew2a drew2a deleted the fix/7713_1 branch November 27, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants