Skip to content

[HOLD for payment 2024-03-14] HIGH: Onyx updates from push notifications can get applied out of order #33191

@arosiclair

Description

@arosiclair

Note: Waiting for #34082 to build the troubleshooting tools

Problem

When a user receives a report comment, we send them a push notification for it. The notification payload contains Onyx updates for the report and the new report action. We apply those onyx updates here and call ReconnectApp in the background using backgroundRefresh.

There is a chance this update gets applied out of order eg:

  1. User A sends a message and edits it quickly
  2. User B applies updates for the new message and edit from Pusher
  3. User B receives a delayed push notification for the message and applies the update for the original un-edited message

Why is this important?

If this happens, the report and report action data will stay out of date until the next updates are received

Solution

Start including lastUpdateID and previousUpdateID in the notification payload and use those to apply the update like we do for reliable updates here so those updates always get applied in order.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018a77e81664929acf
  • Upwork Job ID: 1735753015692898304
  • Last Price Increase: 2023-12-15
Issue OwnerCurrent Issue Owner: @JmillsExpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringInternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions