-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
After revert: Defer local updates if there are missing updates and only call GetMissingOnyxMessages
once
#39683
After revert: Defer local updates if there are missing updates and only call GetMissingOnyxMessages
once
#39683
Conversation
@ Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
This comment has been minimized.
This comment has been minimized.
Taking a look on test build 👀 |
@chrispader Could you kindly elaborate how this PR fixes those deploy blocker issues? Thanks! |
BUG: It always redirects to NotFound page after refreshing a page. Screen.Recording.2024-04-05.at.17.54.16.mov |
I cannot say if the change fixes the problem, because this seems to only happen on very-high traffic accounts. I removed this check for invalid update formats, which unpauses the |
@hungvu193 I think that's an issue unrelated to this PR, it happens on the PR testing domain |
@eh2077 @hungvu193 You'll need to try to simulate a situation with a lot of data going on between you. sending lots of messages on groups both of you are and etc. It's gonna be a tough one to test. |
@danieldoglas Can you create a slack thread to discuss about testing this PR? It would be better |
i asked about that here: https://expensify.slack.com/archives/C049HHMV9SM/p1712330961862649?thread_ts=1712264151.436019&cid=C049HHMV9SM @danieldoglas could you check if there are (other) people that have time and can test this with their accounts? |
I did few tests over the weekend, I'll test again today with @eh2077 |
I tried to reproduce this DB issue #39650 but failed to dupe it. I use high traffic accounts. |
@chrispader I managed to reproduce #39650 using two high traffic accounts. It's not stable but I reproduced it by following steps
|
you reproduced this with the current branch still? |
@hungvu193 i'm also not 100% sure if this isn't somehow caused by my changes in the testing branch by the way i intentionally drop updates and delay them. |
JFYI @danieldoglas @hungvu193 @arosiclair |
Can you try these steps?
I saw the timeout, however I waited for few minutes and still didn't see the updated. |
Ahh i see now what the problem is. It's not the actual implementation, but just the testing branch. I basically drop every third and fourth update, to simulate missing updates. If one or both of these (omitted) updates are at the end of all the updates (like the last emoji reaction), they will never be applied, because there is no later update that triggers the In the testing branch in |
Oh I saw it 🤦 I checked out this branch instead of testing branch. |
…updates-after-revert
Nice. Seems like this is almost there... @hungvu193 @eh2077 you think we're good to merge this? |
Sounds good to me 😄 |
i'm not sure i understand what you mean. what scneria would resetting deferred updates after The deferred updates should/can only be reset by the Do you mean we should protect this export, so manipulation from the outside is not possible? |
@chrispader thanks for your comment. Sorry, please omit my comments as I overlooked and misunderstood something. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeNA iOS: NativeNA iOS: mWeb SafariNA MacOS: Chrome / SafariScreen.Recording.2024-04-25.at.17.50.04.mp40-test-2.mp4MacOS: DesktopNA |
✋ 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 https://github.com/danieldoglas in version: 1.4.69-0 🚀
|
@chrispader @danieldoglas QA team is blocked to verify this PR, having the following error when trying to run the code snippet in console. Can you please verify internally? |
The QA steps shouldn't involve commenting code out, can you guys think of an alternative way to QA this internally please? |
@kbecciv Updated the tests |
This PR is failing because of issue #38748 - there are multiple GetMissingOnyxMessages requests in request tab. The issue is checked in: Web and Desktop 1714647274460.Screen_Recording_2024-05-02_at_1.46.33_in_the_afternoon.mp4 |
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.69-2 🚀
|
That actually seems correct - it did 3, but one at a time, not 3 at the same time. |
@danieldoglas i didn't follow recent conversations 100%, but i think the implementation in this PR is still valid and there's no need to fix anything right now, right? |
Yep, this is all correct. |
@danieldoglas
Details
This PR applies back the changes from #38997 after the revert in #39668
This PR adds unit and E2E tests covering the
OnyxUpdateManager
and the new update deferral logic.Fixed Issues
$ #38748
PROPOSAL:
Tests
Test 1
I created a testing branch that prevents some updates from being applied (therefore
GetMissingOnyxUpdates
will be triggered) and has some useful logs.Either test in this branch or on your own. In
OnyxUpdateManager
do the following:applyDeferredUpdates
with asetTimeout
GetMissingOnyxUpdates
is triggereddeferredUpdates
objectGetMissingOnyxUpdates
are performedTest 2
App/src/libs/actions/Report.ts
Lines 769 to 789 in a4d01a8
Offline tests
Not needed.
QA Steps
GetMissingOnyxMessages
request should be executed at the same timePR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Tested deferring logic on web, iOS and Android. mWeb behavior is the same as in web...