Add SequentialQueue.push(). Fix up tests. - #8857
Conversation
| message: error.message, | ||
| status: error.status, | ||
| }); | ||
| }, false); |
There was a problem hiding this comment.
Added this because the stack trace isn't necessary and was creating extra noise while debugging tests.
marcochavezf
left a comment
There was a problem hiding this comment.
Looks great! It took me a bit of time to figure out some details of the context, but I like how the network logic is being improved!
|
@sketchydroide I'm going to merge this so we can keep moving through the Network Improvements changes, but let me know if there's anything you have questions about. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by @sketchydroide in version: 1.1.57-8 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
|
🚀 Deployed to production by @chiragsalian in version: 1.1.57-17 🚀
|
Details
This is a fairly small, but significant change since it means that all
Report_AddCommentrequests are now blocking and move through theSequentialQueueexclusively. Here's a rough overview of what is happening now...Before:
Report_AddCommentcommand is made and gets put into the main queueAfter:
Report_AddCommentcommand is made and gets immediately persisted and placed directly in the "sequential" queue and will also process immediately if not already processingFixed Issues
$ https://github.com/Expensify/Expensify/issues/208283
Tests
Test blocking behavior of the sequential queue
Report_AddCommentrequests happen after theReport_AddCommentones (except forLog)Test that new comments get pushed to the bottom of the queue if it is processing
Report_AddCommentrequest can be seen (Tip use the "Slow 3G" option to make the timing easier)Report_AddCommentcallPR Review Checklist
PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
See Test Steps
Screenshots
No UI Changes