Skip to content

[HOLD for payment 2024-10-14] Debugging feature: Import Onyx State #47786

@TMisiukiewicz

Description

@TMisiukiewicz

Problem

When working with profile traces received from New Expensify users, it’s possible to identify and take some actions based on its analysis. However, since the accounts can contain much more data than the ones we are using on a regular basis, it often makes it difficult to accurately reproduce certain performance issues and later evaluate the efectiveness of our optimizations.

Additionally, some bugs are very hard to reproduce as they happen only on certain accounts.

Solution

To address this problem, we propose to implement an “import Onyx state” feature. This feature would allow to load the previously exported state directly into another account, enabling us to replicate their exact conditions. It should automatically force offline mode, so we are sure it does not make any API calls while using the app. By doing so, we can accurately profile and measure the impact of our changes, ensuring that our performance optimizations are effective in real-world scenarios.

Additionally, it can help to resolve hard to reproduce bugs - we already got this feature working internally and thanks to this we were able to reproduce and fix this issue.


This kind of solution would need an easy way to bring the account back to the original state. I think “Clear cache and restart” should do the work.

Things to consider:

  • review if we need to mask more stuff when exporting state - e.g. report’s lastMessageText, lastMessageHtml, replacing images/videos with dummy placeholders, masking expenses
  • review the way of masking things and how it affects the results - for example, email addresses are masked by replacing them with *** , but it might affect the results for filtering, since we’ll never go into some logic specific for valid emails only
Issue OwnerCurrent Issue Owner: @dylanexpensify

Metadata

Metadata

Labels

AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2InternalRequires API changes or must be handled by Expensify staff

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions