-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: upgrade to @sentry/browser
8
#467
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figuring out how to fix some tests here still ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not familiar with this sentry-testkit
thing but it seems that whilst all tests pass individually, when the whole suite runs they conflict with each other as testkit.reports
contains data from other tests.
@spawnia would you know anything about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that their API has not changed, see https://zivl.github.io/sentry-testkit/docs/getting-started#reset-between-tests. Perhaps we need to upgrade to the latest version, see https://github.com/zivl/sentry-testkit/tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea that was the first place I looked. I tried it locally, as it did not have an effect I did not commit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no other ideas. Let me know when you have a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed an issue with them zivl/sentry-testkit#200
I assume that is the problem
@sentry/browser:^8.0.0
as peer dependency@sentry/browser
8
tests/SentryLink.test.ts
Outdated
}); | ||
const scope = Sentry.getCurrentScope(); | ||
|
||
scope.clearBreadcrumbs(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addBreadcrumb
function adds breadcrumbs to the isolation scope so you'll need clear them from there instead
Sentry.getIsolationScope().clearBreadcrumbs();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well that was non-obvious, but seems to fix the tests, nice
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #466
https://docs.sentry.io/platforms/javascript/migration/v7-to-v8/#removal-of-sentryconfigurescope-method