Repository navigation
fix: Group is created with duplicate - #51712
nkdengineer wants to merge 9 commits into
Conversation
|
@DylanDylann 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
@nkdengineer I notice that we have a flicker Screen.Recording.2024-10-30.at.17.54.24.mov |
|
@DylanDylann I fixed this bug. The problem, in this case, is the |
|
@nkdengineer Hmmm, I am not sure if your fix is valid |
|
@aldo-expensify While reviewing the PR, I see a problem . The RCA is GetMissingOnyxMessage data is merged before we execute the So, we have these options here:
|
When you say "this bug", are you referring to this flickering #51712 (comment), right? Am I understanding correctly that the changes of this PR are turning the original problem into a short/fast flickering?
Do we know of a way of reproducing the "replay effect" that @nkdengineer 's fix would produce? I guess we could try to assess if it would happen and be visible in real use cases vs and compare to the flickering we are trying to fix. If the "replay effect" is worse, then we shouldn't do this for sure. The flickering is barely noticeable.
How do you think this can be fixed in the backend? by correcting |
| if (numberOfPersistedRequests === 0) { | ||
| flushOnyxUpdatesQueue(); | ||
| } |
There was a problem hiding this comment.
@danieldoglas @tgolen can I have your opinion on this change please. I think you may know more about the possible implications of changing this behaviour in the queue.
You may want to look at here too: #51712 (comment)
There was a problem hiding this comment.
hmm. I'm not 100% sure.
Considering that GetMissingOnyxUpdates is not added to the sequential queue, this might call the flush method while GetMissingOnyxUpdates is being executed.
@chrispader what do you think?
There was a problem hiding this comment.
In case it is of interest... another way of fixing the problem we are trying to fix here would be to stop forwarding the CreateReportAction command here: https://github.com/Expensify/Auth/blob/de9f50789e666b56e0bee0e1658b8fa67a35c742/auth/lib/Report.cpp#L7797-L7805 and do it without command forwarding. The command forwarding is causing the OpenReport to not return the correct lastUpdateID. The command forwarding was done to allow OpenReport to finish faster (optimization).
There was a problem hiding this comment.
I think it's definitely not idea to make OpenReport slower... but it also definitely sounds like a backend bug and the frontend fix is only a bandaid over it. I especially am concerned that the sequential queue is being changed to try and work around this.
I don't know if this is even possible, or what it would do... but what would happen if we changed OpenReport to not return lastUpdateID at all? I think that would be better than returning an incorrect one.
There was a problem hiding this comment.
Considering that GetMissingOnyxUpdates is not added to the sequential queue
The deferred update logic in OnyxUpdateManager is always only triggered after the SequentialQueue has been paused.
this might call the flush method while GetMissingOnyxUpdates is being executed.
Calling flushOnyxUpdatesQueue() while the SequentialQueue is still paused will result in nothing except for a log.
App/src/libs/Network/SequentialQueue.ts
Lines 51 to 54 in 45c7e48
Therefore i don't think the deferred update logic in OnyxUpdateManager would be affected. Though, this means that the QueuedOnyxUpdates won't actually get flushed if there is a GetMissingOnyxUpdates check currently running
Since we don't introduce an extra SequentialQueue.unpause() call in this PR, i don't see a technical problem about this change.
but ... ⬇️
There was a problem hiding this comment.
Looks like Aldo is OOO until Monday. I think this is OK to wait to hear back from him.
There was a problem hiding this comment.
@aldo-expensify Do you have any idea what the practical timing measurements are for not forwarding that command on the backend? Does it significantly slow down OpenReport or not?
This optimization was introduced here https://github.com/Expensify/Auth/pull/8595/files for the command CreateChatReport, so it seems like affecting OpenReport was not the intention.
From the conversations in the issue, it looks like the slow part of creating a new chat is checking if the "participants know each other" in this query: https://github.com/Expensify/Auth/blob/01acb32728415564d4ef0321934433bde38c1462/auth/lib/Account.cpp#L4465-L4484
Removing the command forwarding may help with @DylanDylann 's case here since this code is reused by more than one command and it may be root cause of that issue too.
Maybe one thing we can try is: calculate the Account::isAccountKnownToCurrentUser in prePeek (it is the expensive part we want to avoid in process) and revert the command forwarding.
There was a problem hiding this comment.
Maybe one thing we can try is: calculate the
Account::isAccountKnownToCurrentUserinprePeek(it is the expensive part we want to avoid inprocess) and revert the command forwarding.
I'll start working on a backend PR and assess how feasible this is.
There was a problem hiding this comment.
Started to work on this here: https://github.com/Expensify/Auth/pull/13168
|
Hey all 👋 this fixes a deploy blocker so it would be great to get some movement here - are we planning on a backend fix? Or is there a small frontend fix we can get going to fix the blocker? Or can we call the blocker NAB? |
|
Bumping this PR, what's the next step? |
|
The most active thread is this one here: #51712 (comment) Basically, we need to decide if we want to implement a frontend bandaid over a problem caused by Auth using |
|
@nkdengineer Please mark this PR on hold BE |
|
I'm bringing this conversation to an internal Slack channel to discuss (link). |
|
OK, it sounds like @aldo-expensify is fixing the @nkdengineer once that is fixed, will there still need to be more work done in this PR, or can this PR simply be closed without merging? In other words, I'm confused about if the |
|
I think we can re-test the issue and some other issues that we're holding from this PR to make sure we can close the PR or continue working on this. |
|
All right, sounds good. I'll try to keep this updated to let you know when
the BE thing is fixed.
…On Fri, Nov 15, 2024 at 9:29 AM nkdengineer ***@***.***> wrote:
I think we can re-test the issue and some other issues that we're holding
from this PR to make sure we can close the PR or continue working on this.
—
Reply to this email directly, view it on GitHub
<#51712 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMAB3H5NBQWZUOBUAKFRD2AYONZAVCNFSM6AAAAABQ3IDBYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZZGM3TIMBWHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Daily Update
Next Steps
ETA
|
Daily Update
|
Daily Update
ETA
|
Daily Update
ETA
|
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
|
|
@tgolen The original bug and all related bugs are fixed now. |
|
That's really great! Thank you. I think I'll go ahead and close this then, and I think you should get partial payment for the work you've done on this one, even though the PR wasn't merged. |
Explanation of Change
Fixed Issues
$ #49931
PROPOSAL: #49931 (comment)
Tests
Offline tests
same as above
QA Steps
same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop-resize.mp4