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

feat: log-merge-group-failure #28799

Merged
merged 12 commits into from
Dec 11, 2024
Merged

feat: log-merge-group-failure #28799

merged 12 commits into from
Dec 11, 2024

Conversation

itsyoboieltr
Copy link
Contributor

@itsyoboieltr itsyoboieltr commented Nov 28, 2024

Description

Open in GitHub Codespaces

This PR integrates the new reusable workflow (MetaMask/github-tools#31) that can be used to write data to google sheets when the merge group event fails. Environment variables (= GitHub secrets) are required to configure:

  • GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_SERVICE_ACCOUNT: The google service account that is used for authentication with the google sheets api.
    • The service account needs to have access to the google sheet you intend to operate on. To give access to the google sheet, you need to click the "Share" button in the top-right corner. Enter the service account's email (can be found on google cloud console), give "Editor" permissions. After this, the service account will have access to this spreadsheet, allowing read and write operations.
  • SPREADSHEET_ID: unique identifier that can be found in the url when you open the google sheet
  • SHEET_NAME: name of a sheet in a spreadsheet that can be found on the bottom

Short summary of what happens in the workflow:

  1. Google api authentication setup
  2. Check if current date exists in the spreadsheet
  3. If current date exists, increment number of PRs by 1
  4. If current date does not exist, create a new row with the current date, and the number 1 (so that it can be incremented later, if more merge group events fail on the same day).

Spreadsheet here: https://docs.google.com/spreadsheets/d/11niHgT_E2YzzXHXQSxX5LNdA6i0GG5aa-OZWvn7_-o4

Dashboard here: https://lookerstudio.google.com/u/1/reporting/e7e8f90e-72aa-4128-ae01-6305bf3393f4/page/p_pz1dszarmd

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3400

Manual testing steps

  1. When the workflow runs, depending on the state of the spreadsheet:
    • If the current date already exists, the number of PRs removed from the merge queue should be incremented by 1.
    • If the current date does not exist, a new row should be added with the current date, and the number of PRs should be set to 1.

I created a private repository to test it, and there it worked. The actual production usage can only be tested if we merge and see if anything gets removed from the merge queue, in this case the spreadsheet should get updated.

Screenshots/Recordings

Not applicable

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.

@itsyoboieltr itsyoboieltr self-assigned this Nov 28, 2024
@itsyoboieltr itsyoboieltr requested a review from a team as a code owner November 28, 2024 20:44
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
Copy link
Collaborator

Builds ready [48dcefc]
Page Load Metrics (1737 ± 102 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30421761663374180
domContentLoaded14332101170720397
load144121721737212102
domInteractive237339178
backgroundConnect798333014
firstReactRender15101392813
getState45912126
initialActions00000
loadScripts10131585124417082
setupStore681192210
uiStartup160425091985291140
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [90646e1]
Page Load Metrics (1542 ± 61 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint13611808154413062
domContentLoaded13211794151211455
load13631810154212861
domInteractive227537188
backgroundConnect876302110
firstReactRender157927209
getState45013147
initialActions01000
loadScripts9601397111410550
setupStore66714178
uiStartup15032041170113967
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [3deebb1]
Page Load Metrics (1559 ± 34 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint43717211510256123
domContentLoaded1415164815296130
load1459173615597234
domInteractive237137157
backgroundConnect1088322210
firstReactRender1673292010
getState46816199
initialActions00000
loadScripts1037126411356330
setupStore65711136
uiStartup1603193917388139
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [5d703b0]
Page Load Metrics (1877 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16002254187915976
domContentLoaded15952181184514771
load15992237187715977
domInteractive26159432914
backgroundConnect76034199
firstReactRender169227199
getState50204933316
initialActions00000
loadScripts11901651139512058
setupStore697152110
uiStartup183229562152246118
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [5d703b0]
Page Load Metrics (1759 ± 66 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15332040175813766
domContentLoaded15251993173313062
load15412042175913866
domInteractive23117352010
backgroundConnect85728157
firstReactRender14291942
getState104139121105
initialActions00000
loadScripts11181596131912359
setupStore618932
uiStartup17622281201014670
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@itsyoboieltr itsyoboieltr requested a review from a team as a code owner December 4, 2024 19:52
@metamaskbot
Copy link
Collaborator

Builds ready [2926a19]
Page Load Metrics (1764 ± 50 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22520421623461221
domContentLoaded14922020173211153
load15562036176410450
domInteractive23482863
backgroundConnect891352110
firstReactRender158722157
getState753891307536
initialActions01000
loadScripts1098152513179746
setupStore68011168
uiStartup17652560205520699
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [64da49e]
Page Load Metrics (2056 ± 169 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint36325741857570274
domContentLoaded162028932027352169
load168429292056351169
domInteractive25107412010
backgroundConnect768282110
firstReactRender156224136
getState843631516431
initialActions01000
loadScripts121822771589302145
setupStore78013168
uiStartup195433412381410197
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@itsyoboieltr itsyoboieltr force-pushed the feat/log-merge-group-failure branch from f2dbecf to 3ae991b Compare December 9, 2024 18:52
@metamaskbot
Copy link
Collaborator

Builds ready [d4564b7]
Page Load Metrics (2587 ± 341 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint384403820771034497
domContentLoaded176938142530685329
load182340502587710341
domInteractive26175734522
backgroundConnect12256616029
firstReactRender15210484823
getState722641545627
initialActions00000
loadScripts139431432018568273
setupStore7102172010
uiStartup203850103068961461
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

.github/workflows/main.yml Outdated Show resolved Hide resolved
@metamaskbot
Copy link
Collaborator

Builds ready [1d9944b]
Page Load Metrics (1934 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint16722394193419091
domContentLoaded16262325189918790
load16712390193418991
domInteractive25102422010
backgroundConnect116327189
firstReactRender1592282210
getState813051395527
initialActions00000
loadScripts12521870150216680
setupStore724942
uiStartup187129442258270130
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@danjm danjm left a comment

Choose a reason for hiding this comment

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

LGTM

@DDDDDanica
Copy link
Contributor

LGTM ! Good job !

@itsyoboieltr itsyoboieltr added this pull request to the merge queue Dec 11, 2024
@dbrans
Copy link
Contributor

dbrans commented Dec 11, 2024

Irony: if this PR gets removed from the merge queue.

Nice work @itsyoboieltr !

Merged via the queue into main with commit 2bd3db8 Dec 11, 2024
77 checks passed
@itsyoboieltr itsyoboieltr deleted the feat/log-merge-group-failure branch December 11, 2024 17:58
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2024
@metamaskbot metamaskbot added the release-12.10.1 Issue or pull request that will be included in release 12.10.1 label Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.10.1 Issue or pull request that will be included in release 12.10.1 team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants