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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

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

Current limitation: it only takes into account the GitHub actions (unit tests, integration tests, webpack tests, etc.). CircleCI results are ignored (for now).

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%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants