Skip to content

fix: Set ENABLE_MV3=true for lavamoat:auto#24773

Merged
DDDDDanica merged 4 commits intodevelopfrom
enable-mv3-for-policy-generation
May 25, 2024
Merged

fix: Set ENABLE_MV3=true for lavamoat:auto#24773
DDDDDanica merged 4 commits intodevelopfrom
enable-mv3-for-policy-generation

Conversation

@danjm
Copy link
Copy Markdown
Contributor

@danjm danjm commented May 24, 2024

Description

The lavamoat policy file generation on develop is not accounting for the offscreen document when the polcies are being generated. This is causing MV3 tests to fail because @trezor/connect-web, which is only imported in the offscreen, is not covered by the lavamoat policy, resulting in an error being thrown in the offscreen document.

The fix is to set ENABLE_MV3=true for lavamoat:webapp:auto and lavamoat:webapp:auto:ci, resulting in the offscreen document being included in the files used policy generation. Policy files then also need to be updated.

Open in GitHub Codespaces

Manual testing steps

Snaps MV3 tests should pass on https://github.com/MetaMask/metamask-extension/tree/provider-retry-fix-plus-mv3-policy-fix, which is a combination of this branch and the branch for #24672, both of which are needed to get snaps mv3 tests passing.

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • 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.

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.

…eration includes dependencies of the offscreen document
@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.

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented May 24, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Copy Markdown
Collaborator

Policies updated

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented May 24, 2024

@metamaskbot update-policies

@metamaskbot
Copy link
Copy Markdown
Collaborator

Policies updated

@danjm danjm force-pushed the enable-mv3-for-policy-generation branch from eeb7424 to ed48a12 Compare May 24, 2024 21:22
@danjm danjm marked this pull request as ready for review May 24, 2024 21:24
@danjm danjm requested review from a team as code owners May 24, 2024 21:24
@danjm danjm changed the title Set ENABLE_MV3=true for lavamoat:auto fix: Set ENABLE_MV3=true for lavamoat:auto May 24, 2024
@danjm danjm added the team-extension-platform Extension Platform team label May 24, 2024
@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 24, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [ed48a12]
Page Load Metrics (1226 ± 562 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint631971013416
domContentLoaded85417126
load51286212261171562
domInteractive85417126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@danjm
Copy link
Copy Markdown
Contributor Author

danjm commented May 24, 2024

The MV3 tests are failing on this branch, but they are passing on https://github.com/MetaMask/metamask-extension/tree/provider-retry-fix-plus-mv3-policy-fix, which is this branch + the commits from #24672 (both PRs are needed to get these tests passing).

This should count as validation for this PR.

Copy link
Copy Markdown
Contributor

@davidmurdoch davidmurdoch left a comment

Choose a reason for hiding this comment

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

Shipit! Branch is out of date with develo, so don't forget to check for potential issues before merging !

@DDDDDanica DDDDDanica merged commit cc14283 into develop May 25, 2024
@DDDDDanica DDDDDanica deleted the enable-mv3-for-policy-generation branch May 25, 2024 00:23
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2024
@metamaskbot metamaskbot added release-11.16.6 Issue or pull request that will be included in release 11.16.6 and removed release-11.18.0 labels Jun 4, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Missing release label release-11.16.6 on PR. Adding release label release-11.16.6 on PR and removing other release labels(release-11.18.0), as PR was cherry-picked in branch 11.16.6.

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

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template release-11.16.6 Issue or pull request that will be included in release 11.16.6 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants