Skip to content
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

[Ready for payment][$250] Queue command length log is not displaying correctly #40820

Closed
2 of 6 tasks
kavimuru opened this issue Apr 23, 2024 · 18 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kavimuru
Copy link

kavimuru commented Apr 23, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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:

  1. Open Desktop App
  2. Go to Network > Turn on slow 3g
  3. Open any report and make sure there is no persistent request.
  4. Send any message
  5. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

40619.desktop.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0176305de79a2b01c6
  • Upwork Job ID: 1783010633846906880
  • Last Price Increase: 2024-04-24
  • Automatic offers:
    • ishpaul777 | Reviewer | 0
    • nkdengineer | Contributor | 0
Issue OwnerCurrent Issue Owner: @ishpaul777
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 23, 2024
Copy link

melvin-bot bot commented 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.

@kadiealexander kadiealexander added the External Added to denote the issue can be worked on by a contributor label Apr 24, 2024
@melvin-bot melvin-bot bot changed the title Queue command length log is not displaying correctly [$250] Queue command length log is not displaying correctly Apr 24, 2024
Copy link

melvin-bot bot commented Apr 24, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0176305de79a2b01c6

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 24, 2024
Copy link

melvin-bot bot commented Apr 24, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

@nkdengineer
Copy link
Contributor

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

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
Copy link

its seems that this issue related to this PR #40619

Copy link

melvin-bot bot commented 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:

  1. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot added the Overdue label Apr 26, 2024
@kadiealexander
Copy link
Contributor

Asked for a retest here.

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@kbecciv
Copy link

kbecciv commented Apr 29, 2024

Issue is still reproducible, build 1.4.67.0

SequentialQueue.mp4

@ishpaul777
Copy link
Contributor

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.

Agree with RCA. I dont think there's a "bug" here but we should def. add a "removed from the queue" message for better dubugging. In case we decide to do this Proposal from @nkdengineer LGTM!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 29, 2024

Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Julesssss
Copy link
Contributor

Yeah, I like the additional log

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 30, 2024
Copy link

melvin-bot bot commented 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

Copy link

melvin-bot bot commented 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 30, 2024
@ishpaul777
Copy link
Contributor

@Julesssss @kadiealexander Can we please move this to daily and remove reviewing label, this should be ready for payment

@Julesssss Julesssss added Daily KSv2 and removed Weekly KSv2 labels May 14, 2024
@Julesssss Julesssss changed the title [$250] Queue command length log is not displaying correctly [Ready for payment][$250] Queue command length log is not displaying correctly May 14, 2024
@ishpaul777
Copy link
Contributor

@kadiealexander gentle bump for payment : )

@kadiealexander
Copy link
Contributor

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:

@kadiealexander
Copy link
Contributor

kadiealexander commented May 16, 2024

Payouts due:

Upwork job is here.

@ishpaul777
Copy link
Contributor

  • [@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
Status: No status
Development

No branches or pull requests

7 participants