Skip to content

chore: test yarn package #33446

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

Closed
wants to merge 5 commits into from
Closed

chore: test yarn package #33446

wants to merge 5 commits into from

Conversation

Qbandev
Copy link

@Qbandev Qbandev commented Jun 3, 2025

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Copy link
Contributor

github-actions bot commented Jun 3, 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
Copy link
Collaborator

Builds ready [8995e6d]
UI Startup Metrics (1266 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1266116315846413011356
load108995314476711281185
domContentLoaded108194314286711191179
domInteractive1813117111630
firstPaint773143144941711051163
backgroundConnect84294920
firstReactRender22166382241
getState1566692028
initialActions001001
loadScripts827687116168869915
setupStore94223916
WebpackHomeuiStartup21721765265120823212422
load16701363203415517761894
domContentLoaded16631359201915417701884
domInteractive171171131358
firstPaint1676132061210289
backgroundConnect2910345392948
firstReactRender17146367108295343
getState1254571430
initialActions613023045
loadScripts16601357200815217661880
setupStore1874782234
FirefoxBrowserifyHomeuiStartup13601170198311714191601
load1207104315469812801433
domContentLoaded1206104215469812791433
domInteractive953817526103157
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2213309302137
firstReactRender23204942429
getState9416916810
initialActions001001
loadScripts1188102915279412571375
setupStore9423824611
WebpackHomeuiStartup15741365218415816571870
load13701182198815514691652
domContentLoaded13701182198815514691652
domInteractive76411601883116
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21145152230
firstReactRender41285144448
getState95305923
initialActions001011
loadScripts13521167196815514521636
setupStore95788822
Benchmark value 1266 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1089 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1082 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 16 exceeds gate value 15 for chrome browserify home mean getState
Benchmark value 21 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 58 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1636 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 76ms | Sum of p95 exceeds: 10ms
Sum of all benchmark exceeds: 86ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [00c99da]
UI Startup Metrics (1226 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1226109214167212761352
load106394212286811041188
domContentLoaded105693712236910981182
domInteractive16135751627
firstPaint735135123041910891172
backgroundConnect84244820
firstReactRender20154552027
getState1363971825
initialActions001000
loadScripts81069096366853917
setupStore84313812
WebpackHomeuiStartup21261669264121722582562
load16701311204417917781968
domContentLoaded16641307202917817681962
domInteractive161160111351
firstPaint1826537765233293
backgroundConnect2510335332542
firstReactRender13943363111261348
getState145402391125
initialActions318135
loadScripts16601305201817717641960
setupStore236307471842
FirefoxBrowserifyHomeuiStartup13841170202212514581568
load12251040174611212891370
domContentLoaded12251040174511212891370
domInteractive1023542743110164
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2414211222253
firstReactRender24216042531
getState11418420926
initialActions001001
loadScripts12041026173010412661351
setupStore64182610
WebpackHomeuiStartup16921422216317818202090
load14701227194517315931853
domContentLoaded14691227194517315931852
domInteractive80362882983120
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2616267252543
firstReactRender45365744854
getState11590101019
initialActions002111
loadScripts14471211192816915741815
setupStore96848914
Benchmark value 1182 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 21 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2563 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 26 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 1693 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1470 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1470 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 46 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1447 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2090 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1853 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1852 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 54 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 1815 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 354ms | Sum of p95 exceeds: 845ms
Sum of all benchmark exceeds: 1199ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [c3dec7c]
UI Startup Metrics (1236 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1236112115196912741348
load106994612496511071189
domContentLoaded106194312436510991181
domInteractive16143641630
firstPaint796133127540610951189
backgroundConnect94507922
firstReactRender21165062135
getState1463771926
initialActions001001
loadScripts811696100064852927
setupStore85243814
WebpackHomeuiStartup20741601261724122272492
load16211272213619117451910
domContentLoaded16151267211418917391897
domInteractive161173121349
firstPaint1606534463192294
backgroundConnect2195372438
firstReactRender13143362105134346
getState144309331220
initialActions314134
loadScripts16101261198618317361881
setupStore2763096116259
FirefoxBrowserifyHomeuiStartup13841190206813614521628
load12271064163611712801481
domContentLoaded12261064163511712801480
domInteractive1023735346110153
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2412309302349
firstReactRender23213022427
getState84414814
initialActions001001
loadScripts12071056162511412671430
setupStore9424324612
WebpackHomeuiStartup15601340213516316341931
load13561173187615014521690
domContentLoaded13561173187515014521690
domInteractive77341501985120
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22156782339
firstReactRender41295944448
getState12527527930
initialActions002111
loadScripts13381159186015014341669
setupStore95385821
Benchmark value 1237 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1062 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 1182 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1190 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 2492 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 259 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1690 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1690 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1669 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 8ms | Sum of p95 exceeds: 348ms
Sum of all benchmark exceeds: 356ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [c3dec7c]
UI Startup Metrics (1221 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1221109914716812581342
load105394012666210781185
domContentLoaded104693612606210701175
domInteractive16133341628
firstPaint74988118840610631155
backgroundConnect84274813
firstReactRender21166062132
getState1453582030
initialActions001001
loadScripts798697101261826927
setupStore85162812
WebpackHomeuiStartup20291584269025722292470
load15841246200120017351909
domContentLoaded15781242199619917291897
domInteractive161170111348
firstPaint1706052775193318
backgroundConnect221085102438
firstReactRender12643349100105325
getState114145141123
initialActions215134
loadScripts15751240198719717271886
setupStore4073148417308
FirefoxBrowserifyHomeuiStartup13641177174012014131667
load12071031154510812491434
domContentLoaded12071031154510812491433
domInteractive983526529110141
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2213172192241
firstReactRender23203432429
getState11418123811
initialActions001001
loadScripts11871015153110612281417
setupStore8317717613
WebpackHomeuiStartup15651352215216016252000
load13661159193115414391796
domContentLoaded13661159193015414381796
domInteractive78571581882131
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2315243232234
firstReactRender40295344347
getState95315820
initialActions002111
loadScripts13461143191015414181781
setupStore1052142279
Benchmark value 40 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2470 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 308 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 1667 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 2000 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1796 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1796 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 1781 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 11ms | Sum of p95 exceeds: 754ms
Sum of all benchmark exceeds: 765ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [72cdf40]
UI Startup Metrics (1238 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1238109114076912811359
load107594312447011221187
domContentLoaded106793512377111171181
domInteractive17134551630
firstPaint700139124643510951187
backgroundConnect84324818
firstReactRender20163642128
getState1464782026
initialActions001001
loadScripts81969697769871945
setupStore85303812
WebpackHomeuiStartup21261643255422422762511
load16551301196917417651933
domContentLoaded16491297196517317611925
domInteractive15115981337
firstPaint1676135561192307
backgroundConnect23979102542
firstReactRender15242370114287353
getState134326321218
initialActions316135
loadScripts16461296195517117591914
setupStore3574968118312
FirefoxBrowserifyHomeuiStartup13991190176311514521620
load1232104816099412921412
domContentLoaded1232104716089412921411
domInteractive993632841109146
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect22145692249
firstReactRender24213232529
getState11519225910
initialActions001001
loadScripts1212103315909312711393
setupStore74697712
WebpackHomeuiStartup16151394238118316902019
load13991199214417214731804
domContentLoaded13991199214417214721803
domInteractive78461571884116
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2615238242554
firstReactRender43277454551
getState12499111031
initialActions102112
loadScripts13761182206616814471787
setupStore11522122826
Benchmark value 1239 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1075 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1068 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 1181 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 1187 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 19 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 945 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 35 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2511 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 312 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 1616 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1400 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1399 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 27 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 43 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 1376 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2019 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1804 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1803 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 54 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 51 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 1787 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Sum of mean exceeds: 83ms | Sum of p95 exceeds: 852ms
Sum of all benchmark exceeds: 935ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

@metamaskbot
Copy link
Collaborator

Builds ready [8b11857]
UI Startup Metrics (1236 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1236110514617012911360
load107195012116711281176
domContentLoaded106494212036611231168
domInteractive17113641728
firstPaint781137117941911181176
backgroundConnect84345823
firstReactRender20165142128
getState1465582027
initialActions001001
loadScripts81670294866871919
setupStore85232811
WebpackHomeuiStartup20801626256121721952459
load16271271200917017351888
domContentLoaded16221267200016917271878
domInteractive15115181341
firstPaint1586146264192261
backgroundConnect21115282437
firstReactRender1174335893102350
getState1043041118
initialActions512952934
loadScripts16191265198916817241869
setupStore3863278218314
FirefoxBrowserifyHomeuiStartup14171178197813814891639
load12481052182012313081461
domContentLoaded12481052182012313081460
domInteractive1033721430118171
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2514109162758
firstReactRender25216362533
getState10514815918
initialActions001001
loadScripts12261038179112212911438
setupStore9417819727
WebpackHomeuiStartup15391322196514616191864
load13361148176013114331585
domContentLoaded13361145175913114331585
domInteractive76341501983124
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect21156982141
firstReactRender40275544347
getState12525326929
initialActions102111
loadScripts13181130174113014161572
setupStore85626819
Benchmark value 1236 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1071 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1064 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 23 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 39 exceeds gate value 32 for chrome webpack home mean setupStore
Benchmark value 2460 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 314 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 1418 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1248 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1248 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 41 exceeds gate value 38 for firefox webpack home mean firstReactRender
Sum of mean exceeds: 43ms | Sum of p95 exceeds: 260ms
Sum of all benchmark exceeds: 303ms

Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

HowardBraham added a commit to MetaMask/action-checkout-and-setup that referenced this pull request Jun 5, 2025
## Overview

This PR improves the reliability and flexibility of the action by
introducing two new features:

1. **Support for Custom Yarn Bundle URLs**
2. **Configurable Yarn Install Retries**

---

### Problem

- CI workflows are intermittently failing due to HTTP 429
(rate-limiting) errors when Corepack downloads Yarn from the default
registry (`https://repo.yarnpkg.com`).
- Transient network issues during `yarn install` can also cause
unnecessary build failures.

---

### Solution

#### 1. Custom Yarn Bundle URL

- **New input:** `yarn-custom-url`
- When provided, the action:
- Sets `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1` (enables Corepack to fetch
Yarn from non-default sources).
- Prepares and activates Yarn from the specified custom URL using
`corepack prepare yarn@<custom-url> --activate`.
- This allows CI to use a self-hosted or alternative Yarn bundle,
reducing dependency on the public Yarn registry and mitigating
rate-limiting issues.

#### 2. Configurable Yarn Install Retries

- **New input:** `yarn-install-max-retries` (default: 5)
- The `yarn --immutable` install step now uses this value to control the
maximum number of retry attempts (via
`MetaMask/action-retry-command@v1`).
- This helps handle transient network errors more gracefully.

---

### Security & Compatibility

- The custom Yarn URL logic is only triggered if the `yarn-custom-url`
input is set, so local development and most workflows remain unaffected.
- High-risk environments (`is-high-risk-environment: true`) are still
protected: caching is disabled, and the custom Yarn logic is opt-in.
- The `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS` flag is only set in CI when a
custom URL is provided, not globally for all users.
- All new features are opt-in and maintain backward compatibility.

---

### Usage Example

```yaml
- uses: MetaMask/action-checkout-and-setup@v1
  with:
    is-high-risk-environment: 'false'
    yarn-custom-url: 'https://diuv6g5fj9pvx.cloudfront.net/metamask-extension/yarn-4.9.1/yarn.js#sha224.4285002185abb91fe2b781f27fd1e078086c37a7b095f6ea4ee25971'
    yarn-install-max-retries: 7
```

---

### Additional Notes

- See
[MetaMask/metamask-extension#33446](MetaMask/metamask-extension#33446)
and [#33447](MetaMask/metamask-extension#33447)
for real-world usage and validation.

---

### Checklist

- [x] Adds `yarn-custom-url` and `yarn-install-max-retries` inputs
- [x] Sets `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS=1` only when needed
- [x] Prepares and activates custom Yarn bundle if URL is provided
- [x] Makes install retries configurable
- [x] Update README with new input documentation

---

### References

- [CI
flakiness](https://github.com/MetaMask/metamask-extension/actions/runs/15070173571/job/42364452666?pr=32555)
-
[INFRA-2575](https://consensyssoftware.atlassian.net/browse/INFRA-2575)

---------

Co-authored-by: Norbert Elter <[email protected]>
Co-authored-by: Howard Braham <[email protected]>
@Qbandev Qbandev closed this Jun 6, 2025
@Qbandev Qbandev deleted the test-yarn-package branch June 6, 2025 09:28
@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants