Skip to content

Commit

Permalink
test: Constraints upgrades: sentry-sdk and fix tests (#1182)
Browse files Browse the repository at this point in the history
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 <3826210+Czaki@users.noreply.github.com>
  • Loading branch information
Czaki and Czaki authored Aug 14, 2024
1 parent 0e94077 commit 7a66801
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 25 deletions.
21 changes: 17 additions & 4 deletions package/tests/test_PartSeg/test_sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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://aaa@test.pl/77")
Hub.current.bind_client(client)
sentry_sdk.capture_event(event, hint=hint)
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.10_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.11.txt
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints_py3.11_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.11_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.12_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,11 @@ scipy==1.14.0
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ scipy==1.10.1
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.8_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ scipy==1.10.1
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ scipy==1.13.1
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down
4 changes: 2 additions & 2 deletions requirements/constraints_py3.9_pydantic_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ scipy==1.13.1
# partseg (pyproject.toml)
# napari
# scikit-image
sentry-sdk==2.12.0
sentry-sdk==2.13.0
# via
# -r requirements/version_denylist.txt
# partseg (pyproject.toml)
setuptools==72.1.0
setuptools==72.2.0
# via
# pyinstaller
# pyinstaller-hooks-contrib
Expand Down

0 comments on commit 7a66801

Please sign in to comment.