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

fix: Ensure any scope updates do not clobber the initial async scope read #593

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Nov 18, 2022

Closes #585

The initial read from the BufferedWriteStore is async but writes (to the cached value) were synchronous. This meant that modifications to the scope immediately after calling init would overwrite the scope from the previous run.

This PR:

  • Wraps the scope updates in setImmediate so that the initial read will always win the async race
  • Adds a tag to the e2e test to confirm this is working and doesn't get broken again!

@timfish timfish changed the title fix: Ensure any scope updates do not clobber the initial async scope rea fix: Ensure any scope updates do not clobber the initial async scope read Nov 18, 2022
@timfish timfish marked this pull request as ready for review November 18, 2022 19:02
@timfish timfish merged commit 08a526d into getsentry:master Nov 21, 2022
@timfish timfish deleted the test/scope-last-run branch April 26, 2023 14:49
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.

beforeSend is now using the current tags when sending crash dumps from previous sessions
2 participants