-
Notifications
You must be signed in to change notification settings - Fork 263
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
[Bug] The user executor needs to uncache before other executors #1465
Conversation
* Primary Motivation: After a dispatch queue was added to the user executor, it's uncaching can happen on a background thread. However, when the User Manager starts, the user executor needs to finish uncaching first before other executors begin uncaching. This is because their uncached requests rely on the identity models organized by the user executor. By happening on a background thread, this order is not guaranteed. By making the User Executor an instance instead of a static class, it can uncache in its initializer without concurrency dangers. * Additional motivations include Identity Verification work that allows the user executor to conform to the same listener protocol as other executors. * All other executors are instances owned by the User Manager. * Make the User Executor also an instance owned by the User Manager, as it is the only class that calls it. * Access to user executor is force unwrapped because everything is guarded behind the User Manager's `start()` call. This will surface any issues or wrong usages early.
* Fix the string description of OSRequestCreateUser to be uniform
* No logic changes here, just break up executor code into digestible functions
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.
Looks like some of the switch user integration tests failed in the CI. When I ran it locally they didn't fail but other tests are failing every time
A live activity executor test, right? |
No it is a notification enters foreground test. It seems like they are probably all unrelated to this PR and are just flaky |
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.
Reviewed 9 of 9 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jkasten2)
Description
One Line Summary
The User Executor is no longer a static class, and will finish uncaching before other executors uncache.
Details
User executor is no longer a static class
start()
call. This will surface any issues or wrong usages early.Motivation
Bug Fix
Scope
Testing
Unit testing
Manual testing
Device: iPhone 13 on iOS 17.5.1
Reproduce original wrong behavior:
userA
and add tag for userAuserB
and add tag for userBIdentifyUser userA
,CreateUser userB
in the user executorUpdateUser
in the property executorUpdateUser userA
is dropped as the property executor cannot connect the Identity model reference (needed to know when the OSID is hydrated)After changes in this PR:
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is