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

feat: Network Controller update to v12.1.2 #8952

Merged
merged 14 commits into from
Mar 20, 2024

Conversation

tommasini
Copy link
Contributor

@tommasini tommasini commented Mar 15, 2024

Description

  • Update network controller to version 12.1.2
  • re-applied the patch
  • created a migration to clean the storage of networkDetails and networkStatus properties of NetworkController that were deprecated
  • removed ts-expect-error from engine from controllers that were expecting network controller v12
  • update selectors that were dependents of the deprecated properties

Related issues

Fixes: https://github.com/MetaMask/mobile-planning/issues/1555

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Add/remove/switch networks: https://recordit.co/LQvO3ZAtkQ

Before migrations and network controller update:
https://recordit.co/KwkE7QUjl6

After migrations and network controller update:
https://recordit.co/Bl1BkZVK1F

Before

After

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.

…eated a migration to clean the storage of networkDetails and networkStatus properties of NetworkController that were deprecated, removed ts-expect-error from engine from controllers that were expecting network controller v12, update selectors that were dependents of the deprecated properties
Copy link
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.

Copy link

socket-security bot commented Mar 15, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/network-controller@12.1.2 environment Transitive: filesystem, network +100 17.4 MB metamaskbot

View full report↗︎

@tommasini tommasini added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 18, 2024
Copy link
Contributor

github-actions bot commented Mar 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0bbc3cf
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/5626944f-6a37-40b4-be2a-b0d4fe1995a0

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini tommasini marked this pull request as ready for review March 18, 2024 18:48
@tommasini tommasini requested a review from a team as a code owner March 18, 2024 18:48
@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 18, 2024
Copy link
Contributor

github-actions bot commented Mar 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 2e48c29
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/f4d20e6f-dd73-45f0-8eb7-20263121528b

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 19, 2024
@tommasini tommasini requested a review from a team as a code owner March 19, 2024 00:45
Copy link
Contributor

github-actions bot commented Mar 19, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: ca4e7b2
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fb8ba490-6232-42a4-a7f2-2804210db25f

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 43.83%. Comparing base (82a4668) to head (7dc104e).

Files Patch % Lines
app/selectors/networkController.ts 20.00% 4 Missing ⚠️
app/core/Engine.ts 0.00% 2 Missing ⚠️
app/store/migrations/036.ts 95.12% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8952      +/-   ##
==========================================
+ Coverage   43.77%   43.83%   +0.06%     
==========================================
  Files        1274     1275       +1     
  Lines       31126    31169      +43     
  Branches     3168     3182      +14     
==========================================
+ Hits        13624    13664      +40     
- Misses      16689    16690       +1     
- Partials      813      815       +2     

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

@tommasini tommasini removed the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 19, 2024
@tommasini tommasini added the Run Smoke E2E Triggers smoke e2e on Bitrise label Mar 19, 2024
Copy link
Contributor

github-actions bot commented Mar 19, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 7e59132
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/02a9677f-b08b-4c29-9f68-3948aaa42b03

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@tommasini tommasini mentioned this pull request Mar 19, 2024
13 tasks
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Left some comments

app/core/Engine.ts Show resolved Hide resolved
e2e/fixtures/fixture-builder.js Show resolved Hide resolved
app/selectors/networkController.ts Show resolved Hide resolved
app/util/test/initial-background-state.json Show resolved Hide resolved
app/store/migrations/024.test.js Show resolved Hide resolved
app/store/migrations/036.ts Outdated Show resolved Hide resolved
app/store/migrations/036.ts Outdated Show resolved Hide resolved
…al background state, adapt 36 migration to check every state data first and only then modify the data and updated the tests accordingly, updated fixture-builder with networkId property
@tommasini tommasini added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 19, 2024
Copy link
Contributor

github-actions bot commented Mar 19, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 9454fd2
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/49f79317-85b1-4b61-a0da-eb70de78c20e

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@Cal-L Cal-L added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Mar 19, 2024
Copy link
Contributor

github-actions bot commented Mar 19, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 7dc104e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/ccf26477-5d02-47a6-b43b-5b778b69a4ff

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarcloud bot commented Mar 19, 2024

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

app/util/test/initial-background-state.json Show resolved Hide resolved
@Cal-L Cal-L merged commit 3ae7b3c into main Mar 20, 2024
32 of 35 checks passed
@Cal-L Cal-L deleted the feat/1555-network-controllver-v12-1-2 branch March 20, 2024 01:40
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Mar 20, 2024
@metamaskbot metamaskbot added the release-7.20.0 Issue or pull request that will be included in release 7.20.0 label Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.20.0 Issue or pull request that will be included in release 7.20.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants