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 2023-08-01] [HOLD for payment 2023-07-28] Room - Deleted message and broken avatar displayed in header for threaded reply in public room #23195

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 19, 2023 · 28 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 19, 2023

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 executing PR #23098

Action Performed:

Prerequisite: user A created a public room

  1. User A send a message to the public room
  2. User A add a reply to the message to create a thread

Expected Result:

Message is displayed as header ( in this case Hello) and no broken avatar image

Actual Result:

Deleted message and broken avatar displayed as header

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.43.0
Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6134457_Screen_Shot_2023-07-19_at_3 24 09_PM

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jul 19, 2023
@OSBotify
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.

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

Triggered auto assignment to @stitesExpensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@mountiny
Copy link
Contributor

@hannojg @0xmiroslav @fedirjh I think this might be related to the #21406

@b4s36t4
Copy link
Contributor

b4s36t4 commented Jul 19, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Deleted message and broken avatar displayed in header for threaded reply in public room

What is the root cause of that problem?

RCA for this issue lies here on this block.

function getParentReportAction(report, allReportActionsParam = {}) {
if (!report || !report.parentReportID || !report.parentReportActionID) {
return {};
}
return lodashGet(allReportActionsParam || allReportActions, [report.parentReportID, report.parentReportActionID], {});
}

If we observe the last line which we're using lodash to get particular report action but the items which we're getting is always gonna be empty.

{} || {"key":"value"}

will always be {} same happening here.

function getParentReportAction(report, allReportActionsParam = {}) {

We're defining empty object here which is always the case lodash search on.

Means we're basically checking for parent Report action on an empty object {} which is resulting the following issue.

What changes do you think we should make in order to solve the problem?

  1. We can make allReportActionsParam as null or undefined.
  2. We can use isEmpty function to determine on which object we're going to get parent report action.
  3. We can pass parentReportActions from HeaderView component to here
    function getReportName(report) {
    and then pass it here
    const parentReportAction = ReportActionsUtils.getParentReportAction(report);
    so that everything works seamlessly.

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added Daily KSv2 and removed Hourly KSv2 labels Jul 19, 2023
@0xmiros
Copy link
Contributor

0xmiros commented Jul 19, 2023

@hannojg @0xmiroslav @fedirjh I think this might be related to the #21406

yes, this is the bug I mentioned in #21406 (comment)

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Jul 19, 2023

This appears to be a regression from @hannojg's PR #21406.

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@jasperhuangg
Copy link
Contributor

It looks like this is also affecting IOU reports: #23202

@luacmartins
Copy link
Contributor

The issue seems to come from this line. We pass allReportActionsParam = {} which is always truthy, so allReportActionsParam || allReportActions resolves to {} and we fail to get the correct action.

@jasperhuangg
Copy link
Contributor

@luacmartins it seems this is already going to be fixed in #23206

@aldo-expensify
Copy link
Contributor

Yes, confirmed that it fixes that too:
image

@aldo-expensify
Copy link
Contributor

Confirmed it is working now in staging:

image

@situchan
Copy link
Contributor

I first reported this bug in slack - https://expensify.slack.com/archives/C049HHMV9SM/p1689789076748419
Am I eligible for reporting bonus?

@aldo-expensify
Copy link
Contributor

@situchan confirmed. I'm not sure how it works in the case of deploy blockers, so I'll add bug to get a Bugzero team member to help out.

@aldo-expensify aldo-expensify added Bug Something is broken. Auto assigns a BugZero manager. and removed DeployBlockerCash This issue or pull request should block deployment labels Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@aldo-expensify
Copy link
Contributor

@conorpendergrast I reopened this because they may be a bug reporting compensation to handle: #23195 (comment)

@fedirjh
Copy link
Contributor

fedirjh commented Jul 20, 2023

I think this was firstly reported by @0xmiroslav #21406 (comment) .

@situchan
Copy link
Contributor

@fedirjh #14816 (comment)

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Jul 20, 2023
@melvin-bot melvin-bot bot changed the title Room - Deleted message and broken avatar displayed in header for threaded reply in public room [HOLD for payment 2023-07-28] Room - Deleted message and broken avatar displayed in header for threaded reply in public room Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.43-7 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 2023-07-28. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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:

  • [@stitesExpensify] The PR that introduced the bug has been identified. Link to the PR:
  • [@stitesExpensify] 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:
  • [@stitesExpensify] 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:
  • [@stitesExpensify] Determine if we should create a regression test for this bug.
  • [@stitesExpensify] 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.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 25, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-07-28] Room - Deleted message and broken avatar displayed in header for threaded reply in public room [HOLD for payment 2023-08-01] [HOLD for payment 2023-07-28] Room - Deleted message and broken avatar displayed in header for threaded reply in public room Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.44-2 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 2023-08-01. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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:

  • [@stitesExpensify] The PR that introduced the bug has been identified. Link to the PR:
  • [@stitesExpensify] 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:
  • [@stitesExpensify] 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:
  • [@stitesExpensify] Determine if we should create a regression test for this bug.
  • [@stitesExpensify] 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.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/304226

@conorpendergrast
Copy link
Contributor

@stitesExpensify Looks like there's nothing to pay here; can you fill out the C+ checklist and we'll close this out?

@stitesExpensify
Copy link
Contributor

Regression steps:

  1. Create a public room
  2. Send a message to the public room
  3. Add a reply to the message to create a thread
  4. In the thread, make sure the header has the correct title (the message that you threaded off of) and that the avatar shows correctly

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 27, 2023
@situchan
Copy link
Contributor

Based on #23195 (comment), I might still be eligible for reporting

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@conorpendergrast
Copy link
Contributor

From the discussion in this issue, that does not seem to be the case.

Regression test created: https://github.com/Expensify/Expensify/issues/304226

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
None yet
Development

No branches or pull requests