-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Rename PersistedRequestsQueue
make sequential
#8650
Conversation
PersistedRequestsQueue
make sequentialPersistedRequestsQueue
make sequential
I still need to do some testing here. Gonna take out of draft, but leave the WIP label to get some initial reviews rolling in. |
Fix test undo changes to test Fix queue logic and ReimbursementAccountTest add test fix comment
23c9514
to
ea4b185
Compare
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 good to me
I'm trying to test these changes on iOS simulator but it seems like the networking library can't detect offline features. Gonna create an issue for this and try with a physical device. Edit: ✅ |
PersistedRequestsQueue
make sequentialPersistedRequestsQueue
make sequential
@@ -16,6 +16,8 @@ import positioning from './utilities/positioning'; | |||
import codeStyles from './codeStyles'; | |||
import visibility from './utilities/visibility'; | |||
import optionAlternateTextPlatformStyles from './optionAlternateTextPlatformStyles'; | |||
import pointerEventsNone from './pointerEventsNone'; | |||
import overflowXHidden from './overflowXHidden'; |
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.
P.S. adding this stuff just because I noticed it was throwing warnings on iOS.
It doesn't really belong in this PR, but shouldn't hurt anything.
Ok ready for review now. Seems to be working well on all platforms. |
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.
An issue would be good. I don't really understand what is happening though. It looks like Pusher events:
So probably we are looking at two separate issues, but I will create the follow up now. |
@marcaaron looks like this was merged without passing tests. Please add a note explaining why this was done and remove the |
Tests passed here. No |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @marcaaron in version: 1.1.56-0 🚀
|
🚀 Deployed to staging by @marcaaron in version: 1.1.56-0 🚀
|
🚀 Deployed to production by @francoisl in version: 1.1.56-0 🚀
|
Details
This upgrades our existing "parallel" queue for persisted requests (report comments) and makes it "sequential".
Weird stuff I ran into while testing:
2022-04-14_14-48-20.mp4
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/206794
Tests
Test 2
Report_AddComment
andLog
,Push_Authenticate
orAuthenticate
(as these do not wait for the sequential queue)Report_AddComment
calls should each block the next one. They should happen one at a time. We can verify this by looking at the request payloadNote: See the Details section about potential wonkiness with jumping comments. This issue already exists and we are not addressing it here.
Test 2
Repeat the above test, but add the following steps before the "go online" step
Note: For this second test it is possible for a few
Get
requests and other things to happen before the queued comments start to run. This isn't bad, but it's something that we can improve in a future issue. Ideally, only the queued write requests occur when the app starts up.PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)QA Steps
See main test steps above
Screenshots
N/A