Skip to content

Conversation

@DDDDDanica
Copy link
Contributor

@DDDDDanica DDDDDanica commented Jul 17, 2025

Description

The final script to push local changes to a remote branch, and the script should not be git push --force as The current branch master-sync has no upstream branch. Therefore we can change the message to push to a new remote branch git push --set-upstream origin master-sync
Screenshot 2025-07-17 at 17 27 12

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

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.

@github-actions
Copy link
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.

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Jul 17, 2025
itsyoboieltr
itsyoboieltr previously approved these changes Jul 17, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

Builds ready [a8f8931]
UI Startup Metrics (1317 ± 53 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1317122714745313511419
load112098413035511611211
domContentLoaded111197013005611541202
domInteractive211462111848
firstPaint73387119244711271182
backgroundConnect22220828510225237
firstReactRender2515164232337
getState1135581426
initialActions2014229
loadScripts897758106955940989
setupStore8411611718
WebpackHomeuiStartup24761922271715225782696
load19841460229116920912256
domContentLoaded19691454228617220742234
domInteractive2213178231673
firstPaint1776640376224308
backgroundConnect39114295834188
firstReactRender1699140773208319
getState183221381332
initialActions10219826730
loadScripts19641450228417220672223
setupStore226233381944
FirefoxBrowserifyHomeuiStartup15281303204514416111827
load13181121180010913611482
domContentLoaded13181120180010913611481
domInteractive1183649085110336
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2914205212869
firstReactRender292164103061
getState163181341071
initialActions40307325
loadScripts12951108178110813251454
setupStore949512732
WebpackHomeuiStartup18501565259919819632249
load15501337194714816721837
domContentLoaded15501336194714816721837
domInteractive106344377896323
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect302081123554
firstReactRender55437775966
getState12378121534
initialActions81103141122
loadScripts15251315192114516501815
setupStore175247361081
Benchmark value 1317 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1120 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1111 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 21 exceeds gate value 20 for chrome browserify home mean domInteractive
Benchmark value 222 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 2 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 897 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1419 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1211 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1203 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 48 exceeds gate value 41 for chrome browserify home p95 domInteractive
Benchmark value 1182 exceeds gate value 1180 for chrome browserify home p95 firstPaint
Benchmark value 238 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 990 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 18 exceeds gate value 17 for chrome browserify home p95 setupStore
Benchmark value 2476 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1985 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1970 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 22 exceeds gate value 21 for chrome webpack home mean domInteractive
Benchmark value 10 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1965 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2696 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2257 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2235 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 73 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 188 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 30 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2224 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1528 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1319 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1318 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 119 exceeds gate value 110 for firefox browserify home mean domInteractive
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 16 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 5 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1296 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 1827 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 336 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 61 exceeds gate value 55 for firefox browserify home p95 firstReactRender
Benchmark value 71 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 25 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 32 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1850 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1551 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1551 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 107 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 55 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 8 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1526 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 18 exceeds gate value 13 for firefox webpack home mean setupStore
Benchmark value 2249 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1837 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1837 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 323 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 54 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 66 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 34 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 22 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 1815 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 81 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 2713ms | Sum of p95 exceeds: 2980.8ms
Sum of all benchmark exceeds: 5693.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 15 Bytes (0%)

Comment on lines 98 to 100
console.log(
'You likely now need to do `git push --set-upstream origin master-sync`',
);
Copy link
Contributor

@MajorLift MajorLift Jul 17, 2025

Choose a reason for hiding this comment

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

Maybe we should execute the set-upstream-to step in the script since in this new command sequence it's always necessary?

It might be better to leave the forced push message as well, since there might be unexpected cases where a master-sync branch is already present and it's diverged from main, requiring a hard reset. We could provide guidance for the git push --force step but leave its execution to the user's discretion.

Suggested change
console.log(
'You likely now need to do `git push --set-upstream origin master-sync`',
);
await exec('git branch --set-upstream-to=origin/master-sync');
console.log('Executed: git branch --set-upstream-to');
console.log('You now need to run `git push`. If this fails, try `git push --force`');

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait this wouldn't work if master-sync doesn't already exist.
Is there anything preventing us from simply doing the following? The script already runs remote hard resets, and master-sync is intended to be a temporary branch.

Suggested change
console.log(
'You likely now need to do `git push --set-upstream origin master-sync`',
);
await exec('git push --force --set-upstream origin master-sync');
console.log('Executed: git push');

Copy link
Contributor

Choose a reason for hiding this comment

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

Another marginally safer option:

Suggested change
console.log(
'You likely now need to do `git push --set-upstream origin master-sync`',
);
await exec('git push --force-if-includes --set-upstream origin master-sync');
console.log('Executed: git push');
console.log(
'If the previous command failed, you may need to run `git push --force`.',
);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestions! I went with --force-if-includes as it's the safest option that still automates the push step. Since master-sync is a temporary branch that gets hard reset anyway, this approach prevents accidentally overwriting unexpected changes while eliminating the manual push step.

The script now handles the complete workflow automatically. Thanks for the feedback! 💟 80501a9

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little bit worried about edge cases where the push fails. A message to force push if that happens would be nice to have, but also the command should almost never fail since the script runs git fetch at the start. The script should work well as is.

@metamaskbot
Copy link
Collaborator

Builds ready [80501a9]
UI Startup Metrics (1270 ± 64 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1270106814726413131369
load108993012786011291195
domContentLoaded108292512666011221186
domInteractive18134571741
firstPaint60579127344610851171
backgroundConnect2111972417214226
firstReactRender21153652335
getState11375111437
initialActions30366216
loadScripts877725105958916975
setupStore74223816
WebpackHomeuiStartup23331884276716024382563
load18431354219817219432140
domContentLoaded18361348218517219362137
domInteractive2012128191563
firstPaint1596151175191318
backgroundConnect36113285529158
firstReactRender1718835468183326
getState933151119
initialActions9217623727
loadScripts18311344218217119332134
setupStore156216211625
FirefoxBrowserifyHomeuiStartup14821294215814515211765
load1278113616069513141478
domContentLoaded1277113616059513141478
domInteractive1103739564110297
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3115313322967
firstReactRender292066102963
getState11316525836
initialActions5017217218
loadScripts1253111615728812901438
setupStore11420423743
WebpackHomeuiStartup17151510242118917922118
load14521279197213615361686
domContentLoaded14521279197213615351686
domInteractive97563355891295
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2917155192559
firstReactRender51416955361
getState123208271025
initialActions10036139321
loadScripts14301261195213315141662
setupStore124235251029
Benchmark value 1270 exceeds gate value 1234 for chrome browserify home mean uiStartup
Benchmark value 1090 exceeds gate value 1070 for chrome browserify home mean load
Benchmark value 1083 exceeds gate value 1061 for chrome browserify home mean domContentLoaded
Benchmark value 212 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 878 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 1369 exceeds gate value 1365 for chrome browserify home p95 uiStartup
Benchmark value 1195 exceeds gate value 1190 for chrome browserify home p95 load
Benchmark value 1187 exceeds gate value 1180 for chrome browserify home p95 domContentLoaded
Benchmark value 227 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 37 exceeds gate value 33 for chrome browserify home p95 getState
Benchmark value 16 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 976 exceeds gate value 940 for chrome browserify home p95 loadScripts
Benchmark value 2333 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1843 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1836 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 10 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1832 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2564 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2141 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2137 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 63 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 159 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 27 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2135 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1483 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1278 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1278 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 31 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 29 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 12 exceeds gate value 11 for firefox browserify home mean getState
Benchmark value 6 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1254 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 12 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 1765 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 297 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 63 exceeds gate value 55 for firefox browserify home p95 firstReactRender
Benchmark value 36 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 18 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 43 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 1715 exceeds gate value 1615 for firefox webpack home mean uiStartup
Benchmark value 1452 exceeds gate value 1380 for firefox webpack home mean load
Benchmark value 1452 exceeds gate value 1380 for firefox webpack home mean domContentLoaded
Benchmark value 29 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 51 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 10 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 1430 exceeds gate value 1360 for firefox webpack home mean loadScripts
Benchmark value 2118 exceeds gate value 1935 for firefox webpack home p95 uiStartup
Benchmark value 1686 exceeds gate value 1660 for firefox webpack home p95 load
Benchmark value 1686 exceeds gate value 1660 for firefox webpack home p95 domContentLoaded
Benchmark value 295 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 59 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 61 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 21 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 1662 exceeds gate value 1630 for firefox webpack home p95 loadScripts
Benchmark value 29 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 1404ms | Sum of p95 exceeds: 1598.8ms
Sum of all benchmark exceeds: 3002.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 205 Bytes (0%)
  • ui: 4.72 KiB (0.06%)
  • common: 4.29 KiB (0.05%)

Comment on lines 98 to 100
console.log(
'You likely now need to do `git push --set-upstream origin master-sync`',
);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a little bit worried about edge cases where the push fails. A message to force push if that happens would be nice to have, but also the command should almost never fail since the script runs git fetch at the start. The script should work well as is.

@HowardBraham HowardBraham added this pull request to the merge queue Jul 18, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 18, 2025
@HowardBraham HowardBraham added this pull request to the merge queue Jul 18, 2025
Merged via the queue into main with commit 34ff83f Jul 18, 2025
272 of 275 checks passed
@HowardBraham HowardBraham deleted the chore/master-sync-message-fix branch July 18, 2025 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2025
@metamaskbot metamaskbot added the release-13.1.0 Issue or pull request that will be included in release 13.1.0 label Jul 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

extension-delivery release-13.1.0 Issue or pull request that will be included in release 13.1.0 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants