Skip to content

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

Closed

Description

@kavimuru

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Apr 23, 2024
  2. melvin-bot commented on Apr 23, 2024

    @melvin-bot

    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.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 24, 2024
  4. changed the title [-]Queue command length log is not displaying correctly[/-] [+][$250] Queue command length log is not displaying correctly[/+] on Apr 24, 2024
  5. melvin-bot commented on Apr 24, 2024

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 24, 2024
  7. melvin-bot commented on Apr 24, 2024

    @melvin-bot

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

  8. nkdengineer commented on Apr 24, 2024

    @nkdengineer
    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}"
    ...

  9. hayes102 commented on Apr 24, 2024

    @hayes102

    its seems that this issue related to this PR #40619

  10. melvin-bot commented on Apr 24, 2024

    @melvin-bot

    📣 @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>
    
  11. 8 remaining items

  12. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Apr 30, 2024
  13. melvin-bot commented on Apr 30, 2024

    @melvin-bot

    📣 @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

  14. melvin-bot commented on Apr 30, 2024

    @melvin-bot

    📣 @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 📖

  15. ishpaul777 commented on May 13, 2024

    @ishpaul777
    Contributor

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

  16. 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
  17. ishpaul777 commented on May 15, 2024

    @ishpaul777
    Contributor

    @kadiealexander gentle bump for payment : )

  18. kadiealexander commented on May 16, 2024

    @kadiealexander
    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:
  19. kadiealexander commented on May 16, 2024

    @kadiealexander
    Contributor

    Payouts due:

    Upwork job is here.

  20. ishpaul777 commented on May 16, 2024

    @ishpaul777
    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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions