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

[HOLD for payment 2024-11-11] Web - Search - Console error shows up when entering comma in the search router #51661

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 29, 2024 · 17 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 29, 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!


Version Number: 9.0.55-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh1610015@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click Search router icon
  3. Enter a comma

Expected Result:

No console error when entering comma in the search router

Actual Result:

Console error shows up when entering comma in the search router

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6649388_1730208661473.20241029_212727.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

Triggered auto assignment to @dangrous (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Oct 29, 2024

💬 A slack conversation has been started in #expensify-open-source

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@lanitochka17
Copy link
Author

Production:

bandicam.2024-10-29.15-33-47-678.mp4

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-control

@dangrous dangrous mentioned this issue Oct 29, 2024
50 tasks
@Kicu
Copy link
Contributor

Kicu commented Oct 29, 2024

@dangrous @lanitochka17 I can verify that this bug is not a thing on newest main, specifically after this PR: #51555 which is merged. It also introduces unit tests, so as part of this issue we can add a test case with just the ,.

I can confirm that this error appears right now both in staging and in prod, but on newest main it should not be there.

@Kicu
Copy link
Contributor

Kicu commented Oct 29, 2024

my local dev

Screen.Recording.2024-10-29.at.15.23.53.mov

@dangrous
Copy link
Contributor

hmm @Kicu I still see the error on main, and also I don't see it on production... Can you check again? If it's truly fixed on main (and/or production) we can move this through as not a blocker since it's an edge case, but that's not what I'm seeing with my testing. Thanks!

And it's definitely from #50883 (d3f99c1)

The error is:

SearchQueryUtils.ts:223 Error when parsing SearchQuery: "," SyntaxError: Expected default key, end of input, key, quote, whitespace, or word but "," found. (at searchParser.js:20:1)
    at new peg$SyntaxError (searchParser.js:20:1)
    at peg$buildStructuredError (searchParser.js:415:1)
    at Module.peg$parse (searchParser.js:1195:1)
    at Module.buildSearchQueryJSON (SearchQueryUtils.ts:214:20)
    at eval (SearchRouter.tsx:118:23)
    at invokeFunc (debounce.js:102:19)
    at trailingEdge (debounce.js:151:14)
    at timerExpired (debounce.js:139:14)

@luacmartins
Copy link
Contributor

I also see it on main and agree it comes from #50883. That being said, I don't think this is a blocker since it only breaks the syntax in a few edge cases

@dangrous
Copy link
Contributor

yeah i think that's fine - I'll switch to daily. Do you want to take over? I can also continue to shepherd, whichever you prefer.

@dangrous dangrous added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Oct 29, 2024
@luacmartins
Copy link
Contributor

I can take over

@luacmartins luacmartins assigned Kicu and luacmartins and unassigned dangrous Oct 29, 2024
@Kicu
Copy link
Contributor

Kicu commented Oct 29, 2024

I think I was imprecise in my previous message 😅

What I believe is not a bug right now is just typing the , in the input. If you type it, we will parse it with the new/lighter autocomplete parser which now (after #51555) correctly handles a single comma query.
That is the error that was presented in the original video in the issue and that is something that I verified on main that is not a bug anymore. It is a bug on staging - you can check yourself, open devtools, open Router, type a , and see the error as in the video.

However I can see that the error @dangrous described here: #51661 (comment) is after typing , and then hitting ENTER I think.
I'm believe that's the case, because I see in the stack trace: (searchParser.js:20:1) which is the main/heavier parser.

tl;dr:
If you just type a character we parse it with a different parser and it works. But if you type and then submit/hit enter we get the error.

@289Adam289 if you find some time you can take a look, perhaps we should allow a single comma in the main parser as well 🤔

@289Adam289
Copy link
Contributor

Sure we can allow commas in the main parser. I will work on that.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 30, 2024
@luacmartins luacmartins assigned 289Adam289 and unassigned Kicu Oct 30, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 4, 2024
@melvin-bot melvin-bot bot changed the title Web - Search - Console error shows up when entering comma in the search router [HOLD for payment 2024-11-11] Web - Search - Console error shows up when entering comma in the search router Nov 4, 2024
Copy link

melvin-bot bot commented Nov 4, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 4, 2024
Copy link

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

Copy link

melvin-bot bot commented Nov 11, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@melvin-bot melvin-bot bot added the Overdue label Nov 13, 2024
@luacmartins
Copy link
Contributor

This is done and no payment is needed here.

@melvin-bot melvin-bot bot removed the Overdue label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants