Skip to content

fix(monitoring): replace push_scope removed in sentry-sdk 3.0 - #164

Open
itzzdev09 wants to merge 2 commits into
cnumr:mainfrom
itzzdev09:fix/sentry-sdk-3
Open

itzzdev09 wants to merge 2 commits into
cnumr:mainfrom
itzzdev09:fix/sentry-sdk-3

Conversation

@itzzdev09

Copy link
Copy Markdown

sentry-sdk>=2.8.0 has no upper bound and 3.0 removed push_scope, so capture_internal_error and capture_task_failure raise AttributeError instead of reporting.

Replaced with new_scope and updated the test patches.

test/components/ecoindex/config/test_sentry.py: on 3.0.1, 2 tests fail before this change and all 8 pass after; all 8 pass on 2.77.0.

@vvatelot

vvatelot commented Dec 2, 2026

Copy link
Copy Markdown
Member

Can you update the uv.lock ?

@itzzdev09

Copy link
Copy Markdown
Author

Done in 075e96b. uv lock --upgrade-package sentry-sdk moves sentry-sdk to 3.0.2. The lock on main was already out of date with the bumped workspace versions (uv lock --check failed there), so ecoindex-api, ecoindex-cli, ecoindex-scraper and a few markers changed as well. With uv sync --locked, the tests give 91 passed. The 2 failures are in test_screenshot_storage.py, which compares POSIX paths; I ran on Windows, and they fail the same way with the old lock.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants