Skip to content

fix: Fix/1539 patch root file with controller data#8578

Merged
sethkfman merged 22 commits into
release/7.16.0from
fix/1539-patch-root-file-with-controller-data
Feb 15, 2024
Merged

fix: Fix/1539 patch root file with controller data#8578
sethkfman merged 22 commits into
release/7.16.0from
fix/1539-patch-root-file-with-controller-data

Conversation

@Cal-L

@Cal-L Cal-L commented Feb 14, 2024

Copy link
Copy Markdown
Contributor

Description

This PR creates a migration that reconstructs the old root persisted structure. In the migration, it reconsolidates the controllers back into the root data. This solution is intended to be compatible when upgrading from any version to 7.16.0, especially for users who have already upgraded to 7.15.0.

Related issues

Fixes:

Manual testing steps

  • Install 7.14.0 release and upgrade to 7.16.0
  • Install 7.15.0 release and upgrade to 7.16.0
  • Upgrade to 7.15.0 from 7.14.0 on Android and notice the vault corruption flow. Recover the account, then upgrade to 7.16.0

The end behavior for all three scenarios is that the app should behave as expected and no data should be loss
For testing support, please reach out to @MarioAslau or @Cal-L

Screenshots/Recordings

Before

After

7.14.0 -> 7.16.0 is unaffected since the root architecture doesn't change and the migration just returns the original state

iOS
Going from 7.14 -> 7.15 -> 7.16. Same as going from 7.15 -> 7.16
https://github.com/MetaMask/metamask-mobile/assets/10508597/1a80c32f-cc57-4a5f-9e5b-fb7052595434

Going from 7.14 -> 7.16
https://github.com/MetaMask/metamask-mobile/assets/10508597/1e5b9c8e-19c1-43f3-a05b-c4b2af47357d

Android
Same as iOS

The video below shows that the app continues to function as expected when upgrading from 7.15.0 data -> 7.16.0 with the patch (Android)
https://github.com/MetaMask/metamask-mobile/assets/10508597/a98256f6-b855-45a4-acfe-3bac891b9e16

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@Cal-L Cal-L requested a review from a team as a code owner February 14, 2024 08:32
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@Cal-L Cal-L added team-mobile-platform Mobile Platform team needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Feb 14, 2024
@codecov-commenter

codecov-commenter commented Feb 14, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (release/7.16.0@13c3328). Click here to learn what that means.

Additional details and impacted files
@@                Coverage Diff                @@
##             release/7.16.0    #8578   +/-   ##
=================================================
  Coverage                  ?   40.63%           
=================================================
  Files                     ?     1239           
  Lines                     ?    30067           
  Branches                  ?     2878           
=================================================
  Hits                      ?    12219           
  Misses                    ?    17144           
  Partials                  ?      704           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread app/store/migrations/028.ts
@Cal-L Cal-L removed the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Feb 15, 2024
## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR excludes the `ip` package from our ci audit. It is a dependency
of `cli-doctor`, which is not used in production code.

Advisory - GHSA-78xj-cgh5-2h22

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@sethkfman

sethkfman commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

@sonarqubecloud

Copy link
Copy Markdown

@sethkfman sethkfman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sethkfman sethkfman merged commit f544ac2 into release/7.16.0 Feb 15, 2024
@sethkfman sethkfman deleted the fix/1539-patch-root-file-with-controller-data branch February 15, 2024 14:07
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 15, 2024
@github-actions github-actions Bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Feb 15, 2024
@metamaskbot metamaskbot added the release-7.16.0 Issue or pull request that will be included in release 7.16.0 label Feb 28, 2024
@metamaskbot

Copy link
Copy Markdown
Collaborator

No release label on PR. Adding release label release-7.16.0 on PR, as PR was added to branch 7.16.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.16.0 Issue or pull request that will be included in release 7.16.0 team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants