-
Notifications
You must be signed in to change notification settings - Fork 5.5k
chore: change the message in the script that initializes master sync #34370
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
Conversation
|
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. |
Builds ready [a8f8931]
UI Startup Metrics (1317 ± 53 ms)
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!]
|
| console.log( | ||
| 'You likely now need to do `git push --set-upstream origin master-sync`', | ||
| ); |
There was a problem hiding this comment.
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.
| 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`'); |
There was a problem hiding this comment.
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.
| 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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another marginally safer option:
| 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`.', | |
| ); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Builds ready [80501a9]
UI Startup Metrics (1270 ± 64 ms)
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!]
|
| console.log( | ||
| 'You likely now need to do `git push --set-upstream origin master-sync`', | ||
| ); |
There was a problem hiding this comment.
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.
Description
The final script to push local changes to a remote branch, and the script should not be

git push --forceas The current branch master-sync has no upstream branch. Therefore we can change the message to push to a new remote branchgit push --set-upstream origin master-syncChangelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist