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-10-14] Debugging feature: Import Onyx State #47786

Open
TMisiukiewicz opened this issue Aug 21, 2024 · 36 comments
Open

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

TMisiukiewicz opened this issue Aug 21, 2024 · 36 comments
Assignees
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2

Comments

@TMisiukiewicz
Copy link
Contributor

TMisiukiewicz commented Aug 21, 2024

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
@TMisiukiewicz TMisiukiewicz added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Aug 21, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

Triggered auto assignment to @dylanexpensify (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.

Copy link

melvin-bot bot commented Aug 26, 2024

@dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

@dylanexpensify dylanexpensify added the Internal Requires API changes or must be handled by Expensify staff label Aug 28, 2024
@dylanexpensify
Copy link
Contributor

@TMisiukiewicz will you be working on this one?

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2024
@TMisiukiewicz
Copy link
Contributor Author

@dylanexpensify I can see here on Slack @muttmuure was discussing this proposal internally, do we already have a decision if we're going to work on this one? If yes, feel free to assign me 👍

Copy link

melvin-bot bot commented Sep 2, 2024

@TMisiukiewicz, @dylanexpensify Eep! 4 days overdue now. Issues have feelings too...

@TMisiukiewicz
Copy link
Contributor Author

Back to work on this 👍

@melvin-bot melvin-bot bot removed the Overdue label Sep 3, 2024
@dylanexpensify
Copy link
Contributor

TY!

Copy link

melvin-bot bot commented Sep 4, 2024

@TMisiukiewicz @dylanexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Sep 6, 2024
@TMisiukiewicz
Copy link
Contributor Author

not overdue, I did not have much time to move forward with it due to React Universe Conf, but I am back now. I already have web implementation ready, now adjusting mobile.

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@dylanexpensify
Copy link
Contributor

Sounds great!

@muttmuure muttmuure added the AutoAssignerNewDotQuality Used to assign quality issues to engineers label Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

Triggered auto assignment to @yuwenmemon (AutoAssignerNewDotQuality)

@melvin-bot melvin-bot bot added the Weekly KSv2 label Sep 10, 2024
@muttmuure
Copy link
Contributor

Sorry thought this needed a review

@muttmuure
Copy link
Contributor

will reapply when we're ready

@TMisiukiewicz
Copy link
Contributor Author

TMisiukiewicz commented Sep 11, 2024

@muttmuure quick question, would it be beneficial to display some kind of an information about using the app in the "imported" mode? It could be e.g. a button displayed in every screen of the app allowing to get back to original state after pressing. Something like this:
image

@shawnborton
Copy link
Contributor

Hmm yeah that's a fair point. I think if we removed the extra SafeArea that I am seeing under the tabs, it wouldn't eat as much vertical space and thus I think it could be okay? Again, this is a dev-only feature and something that I hope we don't expose to "real users".

@TMisiukiewicz
Copy link
Contributor Author

@shawnborton how about using absolute positioning? It's much easier as i don't have to care about removing safearea from each screen when it's displayed. It covers the bottom of an app just a bit, but doesn't block from doing any actions from bottom sheet.

ios
android
web

@shawnborton
Copy link
Contributor

Definitely not a big fan of that personally, it feels broken to me.

@TMisiukiewicz
Copy link
Contributor Author

Yeah I was able to easily align it on mobile but it is very difficult to actually make it display properly on web and desktop. One more idea is displaying it similarly to offline indicator. With this solution there is no need to play around safe area and it does not take much vertical space of the screen. It works on all platforms without any additional work with the layout. Let me know your thoughts.

image image

@dannymcclain
Copy link
Contributor

One more idea is displaying it similarly to offline indicator.

I like this better than overlapping the bottom of the app.

@shawnborton
Copy link
Contributor

Same, I like that better. I think I would just use a regular weight font though, something like this:

CleanShot 2024-09-14 at 08 33 20@2x

@dubielzyk-expensify
Copy link
Contributor

Yeah that feels right 👍

@melvin-bot melvin-bot bot added the Overdue label Sep 16, 2024
@TMisiukiewicz
Copy link
Contributor Author

Thanks for the input everyone, I'll proceed with opening a PR 👍

@melvin-bot melvin-bot bot removed the Overdue label Sep 16, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Weekly KSv2 labels Sep 16, 2024
@dylanexpensify
Copy link
Contributor

In progress

@TMisiukiewicz
Copy link
Contributor Author

PR is waiting for a review #49255

@dylanexpensify
Copy link
Contributor

Nice! In review still!

Copy link

melvin-bot bot commented Sep 30, 2024

Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@dylanexpensify
Copy link
Contributor

pending deploy!

@dylanexpensify
Copy link
Contributor

on staging, pending prod deply

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 7, 2024
@melvin-bot melvin-bot bot changed the title Debugging feature: Import Onyx State [HOLD for payment 2024-10-14] Debugging feature: Import Onyx State Oct 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

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

Copy link

melvin-bot bot commented Oct 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.45-4 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-10-14. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Oct 7, 2024

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:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AutoAssignerNewDotQuality Used to assign quality issues to engineers Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Weekly KSv2
Projects
Development

No branches or pull requests

8 participants