-
Notifications
You must be signed in to change notification settings - Fork 6
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: upgraded tokens not being used #2166
Conversation
In the previous implementation, the `SessionManagerImpl` was not properly utilizing updated tokens causing session issues. The code has been updated to not retain the first session instance but construct a new one each time, hence always using the newest token. Tests have been added to verify the proper functioning of this feature.
Datadog ReportBranch report: ❌ ❌ Failed Tests (2)
|
Codecov Report
@@ Coverage Diff @@
## develop #2166 +/- ##
=============================================
- Coverage 57.88% 57.88% -0.01%
Complexity 21 21
=============================================
Files 1059 1059
Lines 40190 40185 -5
Branches 3722 3721 -1
=============================================
- Hits 23265 23261 -4
+ Misses 15314 15313 -1
Partials 1611 1611
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
PR Submission Checklist for internal contributors
The PR Title
The PR Description
What's new in this PR?
Issues
Tokens that are result of token-upgrading (i.e. associating a client ID with the tokens), are not being used right after they are acquired.
Causes
In the previous implementation, the
SessionManagerImpl
was not properly utilizing updated tokens causing session issues.It was keeping a
session
in memory and using it. So when other entities would modify thesession
directly in storage, it would not be updated.Solutions
There was no reason to keep the
session
in memory, as it's something that is rarely used. And as long as theSessionManager
is atomic in its operations, it won't race with itself.The code has been updated to not retain the first session instance but fetch a new one each time, hence always using the newest token. Tests have been added to verify the proper functioning of this feature.
Testing
Test Coverage
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.