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

Cherry-Pick: "fix: issue where setNetworkClientIdForDomain was called without checking whether the origin was eligible for setting its own network (#26323)" #26328

Conversation

adonesky1
Copy link
Contributor

@adonesky1 adonesky1 commented Aug 2, 2024

CherryPicks 80f538e onto v12.0.1:

This PR fixes a issue where setNetworkClientIdForDomain was frequently called with origins that had no account permissions yet (which is the threshhold we currently set for giving site's their own network) resulting in a large number of silent errors in the background that are clogging up
sentry
.

Open in GitHub Codespaces

Fixes:
https://metamask.sentry.io/issues/5659582204/?environment=production&project=273505&qu%5B%E2%80%A6%5Derrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=1

…cking whether the origin was eligible for setting its own network (#26323)

This PR fixes a issue where `setNetworkClientIdForDomain` was frequently
called with origins that had no account permissions yet (which is the
thresshold we currently set for giving site's their own network)
resulting in [a large number of silent errors in the background that are
clogging up
sentry](https://metamask.sentry.io/issues/5659582204/?environment=production&project=273505&qu%5B%E2%80%A6%5Derrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=1).

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

Fixes:
https://metamask.sentry.io/issues/5659582204/?environment=production&project=273505&qu%5B%E2%80%A6%5Derrer=issue-stream&sort=freq&statsPeriod=90d&stream_index=1

N/A

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

N/A
N/A

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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/develop/.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.
@adonesky1 adonesky1 requested a review from a team as a code owner August 2, 2024 17:21
Copy link
Contributor

github-actions bot commented Aug 2, 2024

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 INVALID-PR-TEMPLATE PR's body doesn't match template label Aug 2, 2024
Copy link
Member

@Gudahtt Gudahtt 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
Copy link
Member

Gudahtt commented Aug 2, 2024

Tests on this branch are very flaky, but they should pass eventually. I've just re-run it, we should monitor and investigate further if it persistently fails.

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.61%. Comparing base (82d7193) to head (6720690).
Report is 1 commits behind head on Version-v12.0.1.

Additional details and impacted files
@@               Coverage Diff                @@
##           Version-v12.0.1   #26328   +/-   ##
================================================
  Coverage            65.60%   65.61%           
================================================
  Files                 1368     1368           
  Lines                54626    54630    +4     
  Branches             14201    14204    +3     
================================================
+ Hits                 35837    35842    +5     
+ Misses               18789    18788    -1     

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

@Gudahtt Gudahtt merged commit 8acb0a8 into Version-v12.0.1 Aug 2, 2024
77 of 78 checks passed
@Gudahtt Gudahtt deleted the ad/cherry-pick-setNetworkClientIdForDomain-constraint branch August 2, 2024 17:55
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [6720690]
Page Load Metrics (49 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6510579115
domContentLoaded8181021
load40764994
domInteractive8181021

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants