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

✨ (app-data): Adds data backup and restore to install / uninstall app #7572

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

valpinkman
Copy link
Member

@valpinkman valpinkman commented Aug 9, 2024

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • new commands in live-common to install and uninstall app from device with app data backup and restore
    • implement those command in LLD, transparent to the user for now (no UI implemented, just the functionality), behind a feature flag
    • implement those command in LLM, transparent to the user for now (no UI implemented, just the functionality), behind a feature flag

📝 Description

This PR brings two new method in live-common for managing app install / uninstall from the device:

  • installAppWithRestore: when installing an app, after, check if there is current app data in the provided storage and restore it
  • uninstallAppWithBackup: when deleting an app, before, check if there is current app data and save it using the given storage

The implementation makes uses of execWithTransport which will be the fork where we call the new method or the old install / uninstall ones

In LLD and LLM, I implemented the new method behind the featureFlag enableAppsBackup. When enabled, it will transparently try to backup and restore app data if any.

Test Conditions

  • Stax OS >= 1.5.0 | Flex OS >= 1.1.0
  • Provider 83
  • Boilerplate App (on device) >= 2.1.0
  • Having opened the app at least once (and you can meddle with the settings then to see if it's correctly restores)
  • Bonus => you can trigger mock app update in Developer Settings to fake updates and reinstall the current apps on your device

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link

vercel bot commented Aug 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 10:04am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2024 10:04am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2024 10:04am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2024 10:04am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Aug 22, 2024 10:04am

@live-github-bot live-github-bot bot added desktop Has changes in LLD common Has changes in live-common labels Aug 9, 2024
@live-github-bot live-github-bot bot added the mobile Has changes in LLM label Aug 9, 2024
@valpinkman valpinkman marked this pull request as ready for review August 9, 2024 16:04
@valpinkman valpinkman requested review from a team as code owners August 9, 2024 16:04
gre
gre previously approved these changes Aug 12, 2024
Copy link
Contributor

@gre gre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for hub scope.

more general feedback beyond this PR, but the naming "Storage" is a bit generic and maybe could have been named something else since it only relates to device sdk 🤔

@jiyuzhuang jiyuzhuang added the live-devices Device team label label Aug 20, 2024
@valpinkman valpinkman changed the title ✨ (app-data): Adds data backup and restore to install / uninstall app [WIP] ✨ (app-data): Adds data backup and restore to install / uninstall app Aug 20, 2024
@jiyuzhuang
Copy link
Contributor

Great job ! And thank you for fixing the lc parameter errors in the use cases.

jiyuzhuang
jiyuzhuang previously approved these changes Aug 20, 2024
Copy link
Contributor

@mcayuelas-ledger mcayuelas-ledger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK for Hub

@valpinkman valpinkman merged commit 1d6bd63 into develop Aug 22, 2024
57 of 58 checks passed
@valpinkman valpinkman deleted the feat/llm-lld-app-data-backup branch August 22, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD live-devices Device team label mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants