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

Version v12.13.1 RC #30812

Merged
merged 7 commits into from
Mar 11, 2025
Merged

Version v12.13.1 RC #30812

merged 7 commits into from
Mar 11, 2025

Conversation

metamaskbot
Copy link
Collaborator

📦 🚀

Copy link
Contributor

github-actions bot commented Mar 6, 2025

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.

@metamaskbot metamaskbot added the team-bot Bot team (for MetaMask Bot) label Mar 6, 2025
danjm and others added 2 commits March 10, 2025 17:07
)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

<!--
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?
-->

Truly solving MetaMask/MetaMask-planning#3932
required us to clear `previousUserTraits` from metametrics controller
state. That property just functions as a cache, and we could actually
maintain it in memory.

The reason we need to clear it is that there are many users who had the
`has_marketing_consent` trait populated to `true` when the application
had a bug that prevented that trait from being submitted to segment.
That bug is fixed, so new users don't hit that problem. However, to
correctly track existing users that have `has_marketing_consent` set to
true, we need the comparison of previous and current user traits in the
`_buildUserTraitsObject` function to fail its equality check.

To do that, we are clearing `previousUserTraits` so that, upon update of
the extension and when the first metrics event is set to segment, the
current user trait values will compare to undefined, and they will all
be submitted to segment, including `has_marketing_consent`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30621?quickstart=1)

Fixes:

1. Install a build from this branch
2. Open the background console and the network tab
3. Start onboarding. On the metametrics screen, click the checkbox and
then "I agree"
4. The network tab should now include a request to segment with user
traits, where has_marketing_consent is set to true

--

1. Follow the above steps on the v12.9.3 build (step 4 will fail)
2. Update the version of that install to the build from this branch
3. Log in.
4. The network tab should now include a request to segment with user
traits, where has_marketing_consent is set to true

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

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

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

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

- [ ] 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.
@danjm danjm force-pushed the Version-v12.13.1 branch from ae79446 to 3852b10 Compare March 10, 2025 19:38
HowardBraham and others added 5 commits March 10, 2025 17:10
- **prep-deps**
- There's a new workflow that parallels the CircleCI workflow.
`prep-deps` runs first and caches the result, then
`prep-build-test-webpack` makes an artifact, then the benchmarks run.
- Several of the existing workflows were changed to now depend on
`prep-deps`
- Many of the file changes are just using the new
`checkout-and-setup@caching` and deleting the independent "Checkout
repository" step
- ~~**vars.USE_CACHING**~~ No longer using this
- ~~This allows us to toggle the caching feature on and off in a
centralized way. I left instructions as a comment in `main.yml` for how
to toggle it. We can discuss implementing this in a different way, but
passing this variable through different workflows is actually kind of a
pain (that's the first way I implemented it). Several of the jobs are
30-60 seconds faster when this is turned on.~~
- **~~test-short-suite~~ repository-health-checks**
- I think this could be slightly controversial, but I think it's for the
better.
- I noticed that there were 7 individual really short tests, that each
ran on their own VM. Each VM instance took about 1m30s to execute. I
combined these together into a single VM that runs all the short tests
in sequence, and takes about 1m20s combined. The `if: always()`
statements make all independent tests run, even if one fails.
- The 7 jobs were: `test-lint-shellcheck, test-lint-changelog,
test-lint-lockfile, test-deps-audit, test-yarn-dedupe,
test-deps-depcheck, validate-lavamoat-allow-scripts`
- If this were running on VMs that cost money, this would be a
no-brainer. As is on GitHub runners, it doesn't really cost us any time
or money. All we can really say is 7 separate jobs burn fossil fuels for
a slight bit of convenience in terms of seeing individual test failures
in the GitHub PR page.

- ~~Depends on #29955~~ **MERGED**
- ~~Merge this `caching` branch of `github-tools`:
MetaMask/github-tools#42~~ **MERGED**
- ~~Change `checkout-and-setup@caching` and
`checkout-and-setup-secure@caching` to new `@hash`~~

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29979?quickstart=1)

Split off from: #29955

<!--
-->

---------

Co-authored-by: Hassan Malik <[email protected]>
…est (#30680)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This temporarily disables the "Test Snap update via snaps component"
test because it's broken on `main`.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30680?quickstart=1)

## **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 Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

We temporarily ignore the `'@trezor/connect-web` audit failure to
unblock ci, as upgrading to the new version breaks the webpack build.

```
└─ @trezor/connect-web
   ├─ ID: @trezor/connect-web (deprecation)
   ├─ Issue: This version is no longer supported
   ├─ Severity: moderate
   ├─ Vulnerable Versions: 9.4.7
   │ 
   ├─ Tree Versions
   │  └─ 9.4.7
   │ 
   └─ Dependents
      └─ metamask-crx@workspace:.
```

[This
issue](#30851) is
created in order to upgrade to the latest version and remove the entry
from the ignore list.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30850?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Check yarn audit gh action


## **Screenshots/Recordings**

### Before

![Screenshot from 2025-03-07
09-35-05](https://github.com/user-attachments/assets/04fe6b00-93c9-40e3-8b0b-aeb758015ba7)

### After

![Screenshot from 2025-03-07
09-40-00](https://github.com/user-attachments/assets/a895ccfa-8203-4c92-b0dd-61c567cd9f5a)


## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.

---------

Co-authored-by: Frederik Bolding <[email protected]>
chore(cherr-pick): a new prep-deps workflow with caching (#29979)
@metamaskbot
Copy link
Collaborator Author

Builds ready [119e70c]
Page Load Metrics (1732 ± 72 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15312082173814771
domContentLoaded15132068170414268
load15352088173215072
domInteractive258139168
backgroundConnect107026168
firstReactRender1476312110
getState55314157
initialActions00000
loadScripts10591507124610550
setupStore764242110
uiStartup17522386197017886

@danjm danjm marked this pull request as ready for review March 11, 2025 11:36
@danjm danjm requested a review from a team as a code owner March 11, 2025 11:36
@danjm danjm merged commit 9e52b61 into master Mar 11, 2025
98 of 110 checks passed
@danjm danjm deleted the Version-v12.13.1 branch March 11, 2025 11:38
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-bot Bot team (for MetaMask Bot)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants