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
[Ready for payment][$250] Queue command length log is not displaying correctly #40820
Issue found when validating #40619 Version Number: 1.4.64-1 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: applause internal team Slack conversation:
Action Performed:
Open Desktop App
Go to Network > Turn on slow 3g
Open any report and make sure there is no persistent request.
Send any message
Send 2nd and 3rd messages
Expected Result:
Verify that there is a log [info] [SequentialQueue] 'AddComment' command queued. Queue length is 1 - "" is shown for the 1st message and for 2nd and 3rd messages it should show
log [info] [SequentialQueue] 'AddComment' command queued. Queue length is 2 - ""
a log [info] [SequentialQueue] 'AddComment' command queued. Queue length is 3 - ""
Actual Result:
A log [info] [SequentialQueue] 'AddComment' command queued. Queue length is 1 - is shown when sending 2nd and 3rd messages also
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Queue command length log is not displaying correctly[/-][+][$250] Queue command length log is not displaying correctly[/+]on Apr 24, 2024
Please re-state the problem that we are trying to solve in this issue.
When sending multiple. 'AddComment' command. Queue length is 1 - is shown when sending 2nd and 3rd messages also.
What is the root cause of that problem?
After the first log for [info] [SequentialQueue] 'AddComment' command queued. Queue length is 1. The request was already successful, so the request is removed from the queue.
When we send another 'AddComment' command after that, the queue length now is actually still 1, which misleads that the queue length didn't increase after the first AddComment, while the fact is that it was queued just fine, but was removed from the queue after the request is successful.
So the problem here is that when we remove the command from the queue, we're not logging anything to indicate that the request is removed and not tell the new length of the queue.
What changes do you think we should make in order to solve the problem?
When we remove the command from the queue, add logs to indicate that the request is removed and tell the new length of the queue.
Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, requests).then(() => {
Log.info(`[SequentialQueue] '${requestToRemove.command}' removed from the queue. Queue length is ${getLength()}`);
});
We can even be more specific by passing into PersistedRequests.remove the reason for removal (request succeeded/failed/cancelled), the reason is clear from its usage here, here and here, then log that reason too when we log the "request removed from queue" message.
What alternative solutions did you explore? (Optional)
We can add logs into any other places that changes the persistedRequests queue in anyway, so it's extra clear when debugging.
Clearing: "[info] [SequentialQueue] Cleared all x requests from the queue" Updating a request: "[info] [SequentialQueue] Updating request {Command name} in the queue to: {New request data}"
...
📣 @hayes102! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
changed the title [-][$250] Queue command length log is not displaying correctly[/-][+][Ready for payment][$250] Queue command length log is not displaying correctly[/+]on May 14, 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:
[@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
[@ishpaul777] 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:
[@ishpaul777] 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:
[@ishpaul777] Determine if we should create a regression test for this bug.
[@ishpaul777] 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.
[@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@ishpaul777] The PR that introduced the bug has been identified. - In my opinion this was never a bug, but a new debugging feature. No specific PR introduced this.
[@ishpaul777] 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
[@ishpaul777] 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
[@ishpaul777] Determine if we should create a regression test for this bug.- No, this is not a app feature real life user will ever user.
[@ishpaul777] 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. N/A
Activity
melvin-bot commentedon Apr 23, 2024
Triggered auto assignment to @kadiealexander (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.[-]Queue command length log is not displaying correctly[/-][+][$250] Queue command length log is not displaying correctly[/+]melvin-bot commentedon Apr 24, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0176305de79a2b01c6
melvin-bot commentedon Apr 24, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (
External)nkdengineer commentedon Apr 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When sending multiple. 'AddComment' command. Queue length is 1 - is shown when sending 2nd and 3rd messages also.
What is the root cause of that problem?
After the first log for
[info] [SequentialQueue] 'AddComment' command queued. Queue length is 1. The request was already successful, so the request is removed from the queue.When we send another 'AddComment' command after that, the queue length now is actually still 1, which misleads that the queue length didn't increase after the first
AddComment, while the fact is that it was queued just fine, but was removed from the queue after the request is successful.So the problem here is that when we remove the command from the queue, we're not logging anything to indicate that the request is removed and not tell the new length of the queue.
What changes do you think we should make in order to solve the problem?
When we remove the command from the queue, add logs to indicate that the request is removed and tell the new length of the queue.
So in here we can update to
We can even be more specific by passing into
PersistedRequests.removethe reason for removal (request succeeded/failed/cancelled), the reason is clear from its usage here, here and here, then log that reason too when we log the "request removed from queue" message.What alternative solutions did you explore? (Optional)
We can add logs into any other places that changes the
persistedRequestsqueue in anyway, so it's extra clear when debugging.Clearing: "[info] [SequentialQueue] Cleared all x requests from the queue"
Updating a request: "[info] [SequentialQueue] Updating request {Command name} in the queue to: {New request data}"
...
hayes102 commentedon Apr 24, 2024
its seems that this issue related to this PR #40619
melvin-bot commentedon Apr 24, 2024
📣 @hayes102! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
8 remaining items
melvin-bot commentedon Apr 30, 2024
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
melvin-bot commentedon Apr 30, 2024
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
ishpaul777 commentedon May 13, 2024
@Julesssss @kadiealexander Can we please move this to daily and remove reviewing label, this should be ready for payment
[-][$250] Queue command length log is not displaying correctly[/-][+][Ready for payment][$250] Queue command length log is not displaying correctly[/+]ishpaul777 commentedon May 15, 2024
@kadiealexander gentle bump for payment : )
kadiealexander commentedon May 16, 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:
kadiealexander commentedon May 16, 2024
Payouts due:
Upwork job is here.
ishpaul777 commentedon May 16, 2024