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

Update controller packages to match core v42 #6125

Merged
merged 1 commit into from
May 9, 2023
Merged

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 5, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add needs-qa label when dev review is completed
  5. Add QA Passed label when QA has signed off

Description

Most controller packages have been updated to the versions included in the core monorepo v42 release. The keyring controller was the only package held back, due to the BigInt incompatibility.

The breaking change for most of these updates was related to the removal of the isomorphic-fetch package. That package would polyfill the fetch API if it wasn't present. It's not a breaking change for mobile because mobile already includes its own polyfill for the fetch API.

The only other breaking change is to the gas fee controller, which has made a constructor parameter required rather than optional. This does not affect mobile because mobile already sets that parameter..

See here for the release notes for each updated controller: https://github.com/MetaMask/core/releases/tag/v42.0.0

A number of packages had their ranges reduced from ^ to ~ or were pinned so that the scope of this PR could be kept reasonably small. Two required resolutions to avoid bringing in unwanted updates. Here are the details:

  • @metamask/controller-utils range set to ~3.0.0 with a resolution
    Later versions of this package use the @metamask/utils package, which has introduced BigInt-related problems for mobile recently. We can remove this resolution in a future PR after carefully considering the impact, or after the React Native upgrade.
  • @metamask/approval-controller range set to ~2.0.0 with a resolution
    This was necessary to avoid dependencies upon later @metamask/controller-utils versions
  • "@metamask/assets-controllers pinned to 5.0.0
    Avoids dependency upon @metamask/network-controller@6.0.0, which is required by @metamask/assets-controllers@5.0.1
  • @metamask/gas-fee-controller pinned to 4.0.0
    Avoids dependency upon @metamask/network-controller@6.0.0, which is required by @metamask/gas-fee-controller@4.0.1
  • @metamask/permission-controller range reduced to ~3.0.0
    Avoids dependency upon later versions of @metamask/approval-controller
  • @metamask/transaction-controller pinned to 4.0.0
    Avoids dependency upon @metamask/network-controller@6.0.0, which is required by @metamask//transaction-controller@4.0.1

Issue

Progresses https://github.com/MetaMask/mobile-planning/issues/798

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@Gudahtt

This comment was marked as resolved.

@socket-security
Copy link

socket-security bot commented Apr 5, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Critical CVE ✅ 0 issues
CVE ✅ 0 issues
Mild CVE ✅ 0 issues
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script confusion ✅ 0 issues
Bin script shell injection ✅ 0 issues
Filesystem access ✅ 0 issues
Network access ✅ 0 issues
Shell access ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
GitHub dependency ✅ 0 issues
No bug tracker ✅ 0 issues
No contributors or author data ✅ 0 issues
No README ✅ 0 issues
Deprecated ✅ 0 issues
New author ✅ 0 issues
Unstable ownership ✅ 0 issues
Non-existent author ✅ 0 issues
Unmaintained ✅ 0 issues
Unpublished package ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues
AI detected security risk ✅ 0 issues
AI warning ✅ 0 issues

📊 Modified Dependency Overview:

⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
@metamask/composable-controller@2.0.0 1.0.2...2.0.0 None +0/-2 metamaskbot
@metamask/address-book-controller@2.0.0 1.1.0...2.0.0 None +0/-2 metamaskbot
@metamask/phishing-controller@3.0.0 2.0.0...3.0.0 None +0/-2 metamaskbot
@metamask/network-controller@5.0.0 4.0.0...5.0.0 None +0/-2 metamaskbot
@metamask/gas-fee-controller@4.0.0 3.0.0...4.0.0 None +1/-3 metamaskbot
@metamask/transaction-controller@4.0.0 3.0.0...4.0.0 None +1/-3 metamaskbot
@metamask/approval-controller@2.0.0 1.1.0...2.0.0 None +0/-2 metamaskbot
@metamask/message-manager@2.1.0 1.0.2...2.1.0 None +0/-2 metamaskbot
@metamask/permission-controller@3.0.0 2.0.0...3.0.0 None +1/-3 metamaskbot
@metamask/assets-controllers@5.0.0 4.0.1...5.0.0 None +1/-4 metamaskbot

🚮 Removed packages: @metamask/base-controller@1.1.2, @metamask/controller-utils@2.0.0

@Gudahtt Gudahtt changed the title Update controllers v42 Update controller packages to match core v42 Apr 5, 2023
@Gudahtt Gudahtt force-pushed the update-controllers-v40 branch 2 times, most recently from 7143e1d to 125aa70 Compare April 18, 2023 19:48
@Gudahtt Gudahtt force-pushed the update-controllers-v40 branch 2 times, most recently from 47ca3b1 to 381bb42 Compare April 26, 2023 19:15
@Gudahtt Gudahtt force-pushed the update-controllers-v40 branch 4 times, most recently from a124353 to 120d8a7 Compare May 5, 2023 01:08
Base automatically changed from update-controllers-v40 to main May 5, 2023 22:48
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
@Gudahtt Gudahtt force-pushed the update-controllers-v42 branch 4 times, most recently from 5553673 to fdade64 Compare May 8, 2023 13:36
Most controller packages have been updated to the versions included in
the core monorepo v42 release. The keyring controller was the only
package held back, due to the BigInt incompatibility.

The breaking change for most of these updates was related to the
removal of the `isomorphic-fetch` package. That package would polyfill
the `fetch` API if it wasn't present. It's not a breaking change for
mobile because mobile already includes its own polyfill for the `fetch`
API.

The only other breaking change is to the gas fee controller, which has
made a constructor parameter required rather than optional. This does
not affect mobile because mobile already sets that parameter..

See here for the release notes for each updated controller: https://github.com/MetaMask/core/releases/tag/v42.0.0

This progresses MetaMask/mobile-planning#798
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
@Gudahtt Gudahtt marked this pull request as ready for review May 8, 2023 13:57
@Gudahtt Gudahtt requested a review from a team as a code owner May 8, 2023 13:57
@Gudahtt Gudahtt added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. labels May 8, 2023
@Gudahtt
Copy link
Member Author

Gudahtt commented May 8, 2023

The Bitrise iOS e2e tests succeeded: https://app.bitrise.io/build/3abfec4a-1077-45c6-89c1-0a3872a319e9
Android failed; still looking into that. I'm not sure they're passing on main yet.

@sethkfman
Copy link
Contributor

@Gudahtt I sent over a few comments. Once you tracked down the results on the Android side let me know and I can review again.

@Gudahtt
Copy link
Member Author

Gudahtt commented May 9, 2023

Got a successful Android e2e test run here (passing all tests except 2 that are failing on main): https://app.bitrise.io/build/e87c3485-4efe-4596-8f27-83851669eae7

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@Gudahtt Gudahtt merged commit 792dc18 into main May 9, 2023
15 checks passed
@Gudahtt Gudahtt deleted the update-controllers-v42 branch May 9, 2023 20:49
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) No QA Needed/E2E Only Apply this label when your PR does not need any QA effort.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants