You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-11-11] [HOLD for payment 2024-11-05] [$250] De-dupe AddComment, EditComment, and DeleteComment requests #50074
When we make unnecessary network requests, it slows down the app and contributes to higher traffic on our servers. In particular:
if you are offline and you serialize multiple EditComment requests, only the last one will take effect
if you serialize both an AddComment and any number of EditComment requests, the result would be the same as one AddComment with the content of the final EditComment
if you serialize an AddComment followed by a DeleteComment, the end result is the same as not sending any network requests at all
if you serialize an EditComment request followed by a DeleteComment, the end result is the same as only sending the DeleteComment
Going on parental leave. @gedu@mountiny@shubham1206agra I leave this in your capable hands. My parting note is to please use as many automated tests to cover this change as possible 👍🏼
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@c3024 / @dukenv0307] The PR that introduced the bug has been identified. Link to the PR:
[@c3024 / @dukenv0307] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@c3024 / @dukenv0307] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@c3024 / @dukenv0307] Determine if we should create a regression test for this bug.
[@c3024 / @dukenv0307] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
changed the title [-][HOLD for payment 2024-11-05] [$250] De-dupe AddComment, EditComment, and DeleteComment requests[/-][+][HOLD for payment 2024-11-11] [HOLD for payment 2024-11-05] [$250] De-dupe AddComment, EditComment, and DeleteComment requests[/+]on Nov 4, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.56-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@c3024 / @dukenv0307@bfitzexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
The PR that introduced the bug has been identified. Link to the PR: This is the new implementation so there's no offending PR here
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug. Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression test:
Delete No requests:
Go to offline
send a message
edit the message
add a emoji reaction
delete the message
Go to online
No requests should be sent
No delete Threads
Go to offline
Send a message
create a thread
delete that message
Go to online
All the request must be sent
Add + Update:
Go offline
Send a new message
Edit that new message
Go back online
Only AddComment request with the Edited text should be sent
Activity
roryabraham commentedon Oct 2, 2024
cc @gedu
gedu commentedon Oct 2, 2024
Hey, I'm Edu from Callstack, I can take this one
shubham1206agra commentedon Oct 2, 2024
There are several obstacles to achieve this.
The obstacle here is that if the request fails after replace call, it will show wrong comment.
This is tricky as we are now reducing the queue size.
roryabraham commentedon Oct 2, 2024
isn't that the case today with any
EditCommentrequest? Or is there something I'm missing?roryabraham commentedon Oct 4, 2024
Going on parental leave. @gedu @mountiny @shubham1206agra I leave this in your capable hands. My parting note is to please use as many automated tests to cover this change as possible 👍🏼
gedu commentedon Oct 7, 2024
I just made a PR for
OpenApp, I will start taking a look at this70 remaining items
melvin-bot commentedon Oct 29, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
mountiny commentedon Oct 30, 2024
2 PRs been tested (#50919, #51422) and we merged the one that had more stuff in it. As a result we will pay $250 to both @c3024 and to @dukenv0307
[-][HOLD for payment 2024-11-05] [$250] De-dupe AddComment, EditComment, and DeleteComment requests[/-][+][HOLD for payment 2024-11-11] [HOLD for payment 2024-11-05] [$250] De-dupe AddComment, EditComment, and DeleteComment requests[/+]melvin-bot commentedon Nov 4, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.56-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-11-11. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 4, 2024
@c3024 / @dukenv0307 @bfitzexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
dukenv0307 commentedon Nov 5, 2024
BugZero Checklist:
Regression test:
Do we 👍 or 👎
bfitzexpensify commentedon Nov 8, 2024
Thanks all - payments complete.