-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Constraints upgrades:
sentry-sdk
and fix tests (#1182)
This PR is automatically created and updated by PartSeg GitHub action cron to keep bundle dependencies modules up to date. The updated packages are: * sentry-sdk * setuptools <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Updated the `sentry-sdk` to version `2.13.0` across multiple requirements files, which may include enhancements and new features. - Upgraded `setuptools` to version `72.2.0` in various requirements files, potentially improving package management and build processes. - Introduced a new test function to enhance test coverage for Sentry's variable serialization behavior under different configurations. - **Bug Fixes** - The updated libraries may include important bug fixes that enhance the stability and performance of the application. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Czaki <[email protected]>
- Loading branch information
Showing
12 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,22 @@ def test_sentry_serialize_clip(monkeypatch): | |
|
||
|
||
def test_sentry_variables_clip(monkeypatch): | ||
letters = "abcdefghijklmnoprst" | ||
for letter in letters: | ||
locals()[letter] = 1 | ||
try: | ||
raise ValueError("eeee") | ||
except ValueError as ee: | ||
event, _hint = sentry_sdk.utils.event_from_exception(ee) | ||
clipped = serialize(event) | ||
assert ( | ||
len(clipped["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]) | ||
== sentry_sdk.serializer.MAX_DATABAG_BREADTH | ||
) | ||
|
||
|
||
def test_sentry_variables_clip_change_breadth(monkeypatch): | ||
monkeypatch.setattr(sentry_sdk.serializer, "MAX_DATABAG_BREADTH", 100) | ||
letters = "abcdefghijklmnoprst" | ||
for letter in letters: | ||
locals()[letter] = 1 | ||
|
@@ -57,13 +73,10 @@ def test_sentry_variables_clip(monkeypatch): | |
vars_dict = event["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"] | ||
for letter in letters: | ||
assert letter in vars_dict | ||
clipped = serialize(event) | ||
assert len(clipped["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]) == 10 | ||
monkeypatch.setattr(sentry_sdk.serializer, "MAX_DATABAG_BREADTH", 100) | ||
|
||
clipped = serialize(event) | ||
assert len(clipped["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]) == len(vars_dict) | ||
assert len(clipped["exception"]["values"][0]["stacktrace"]["frames"][0]["vars"]) > 10 | ||
|
||
client = Client("https://[email protected]/77") | ||
Hub.current.bind_client(client) | ||
sentry_sdk.capture_event(event, hint=hint) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters