-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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(action): Improve bug report creation #30176
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. |
3f0057e
to
4cf5e72
Compare
Builds ready [4cf5e72]
Page Load Metrics (1902 ± 145 ms)
Bundle size diffs
|
The purpose of this improvement is to automate several steps when a new release is created: the creation of regression labels on code and planning repos, the creation of bug report issue on planning repo, the addition of the bug report issue to the Releases Github Project board, and the setting of the RC cut date on the Github Project board. Finally this improvement ensures we no longer re-create the bug report issue when it already exists, which can happen when the release is re-cut.
4cf5e72
to
c82d59b
Compare
Builds ready [c82d59b]
Page Load Metrics (1566 ± 34 ms)
Bundle size diffs
|
## **Description** The purpose of this improvement is to automate several steps that I currently do manually when a new release x.y.z is created: 1. Create regression labels on public code repo (metamask-extension) and private planning repo (MetaMask-planning) a. `regression-RC-x.y.z` b. `regression-prod-x.y.z` 2. Create bug report issue on planning repo 3. Add the bug report issue to the Releases Github Project board 4. Set the RC cut date on the Releases Github Project board. These steps are important because the data pipelines of our metrics system consume the data that's present on the [Releases Github Project board](https://github.com/orgs/MetaMask/projects/86/views/1). Finally this improvement includes a check to no longer re-create the bug report issue when it already exists, which used to happen sometimes when the release was re-cut, and which was disturbing other automations (e.g. wrong metrics, duplicated Slack notifications). The following prerequisites are already met: - [x] Add `BUG_REPORT_TOKEN` to repo secrets (fine grained access token with `Issues:Write` and `Metadata:Read` permissions for metamask-mobile and mobile-planning repos, as well as `Projects: Write` permissions for MetaMask organization) - [x] Add `RELEASES_GITHUB_PROJECT_BOARD_NUMBER` to repo variables - [x] Add `RELEASES_GITHUB_PROJECT_BOARD_VIEW_NUMBER` to repo variables [Same PR for Extension](MetaMask/metamask-extension#30176) ## **Related issues** None ## **Manual testing steps** 1. Go to this [public code repo](https://github.com/gauthierpetetin-test/repo_test) (equivalent of metamask-extension repo) 2. Create a [new branch](https://github.com/gauthierpetetin-test/repo_test/branches) with the following format: `release/x.y.z` (where x, y, z, are numbers) 3. Wait for 30s, until the Github action execution is finalised 4. Check that `regression-RC-x.y.z` and r`egression-prod-x.y.z` labels have been created on the [public code repo](https://github.com/gauthierpetetin-test/repo_test/labels) 5. Go to this [private planning repo](https://github.com/gauthierpetetin-test/repo_test_2) (equivalent of MetaMask-planning repo) 6. Check that `regression-RC-x.y.z` and r`egression-prod-x.y.z` labels have been created on the [private planning repo](https://github.com/gauthierpetetin-test/repo_test_2/labels) 7. Check that the bug report issue has been created on the [private planning repo](https://github.com/gauthierpetetin-test/repo_test_2/issues) and has the following title: "vx.y.z Bug Report" 8. Go to this [Github Project board](https://github.com/users/gauthierpetetin-test/projects/2/views/1) 9. Check that the bug report issue is present on the board and its "RC Cut" date is set to the current date. In case, you don't have sufficient permissions on these test repos, here's a video where the manual testing steps are demoed. ## **Screenshots/Recordings** ### **Before** None ### **After** <div> <a href="https://www.loom.com/share/0f794c36cb6843809afed9472e396830"> <p>Github action to automate bug report creation - Watch Video</p> </a> <a href="https://www.loom.com/share/0f794c36cb6843809afed9472e396830"> <img style="max-width:300px;" src="https://cdn.loom.com/sessions/thumbnails/0f794c36cb6843809afed9472e396830-6d9405bba082fb85-full-play.gif"> </a> </div> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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.
In some cases, the Github Project board includes private issues that can't be access by the access token we're using. For example the access token used on Extension repo can't access Mobile planning issues and vice-versa.
Builds ready [f893bc6]
Page Load Metrics (1745 ± 60 ms)
Bundle size diffs
|
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.
Overall LGTM, small changes requested.
Builds ready [92a7ef0]
Page Load Metrics (1820 ± 85 ms)
Bundle size diffs
|
One more thing: Since this logic is shared between mobile and extension, the contents of this PR actually belong to the |
… github action designed for this purpose
Thank you very much for the detailed reviews. I have made the suggested changes and successfully re-tested everything on my test repo. I will create a PR to replicate those changes in the Mobile repo to maintain code parity between the two. This will allow me to then move everything to the github-tools repo. |
Builds ready [2658653]
Page Load Metrics (1523 ± 44 ms)
Bundle size diffs
|
Builds ready [2681404]
Page Load Metrics (1795 ± 61 ms)
Bundle size diffs
|
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.
LGTM!
Co-authored-by: Norbert Elter <[email protected]>
Builds ready [7178a59]
Page Load Metrics (1612 ± 50 ms)
Bundle size diffs
|
LGTM ! |
Description
The purpose of this improvement is to automate several steps that I currently do manually when a new release x.y.z is created:
a.
regression-RC-x.y.z
b.
regression-prod-x.y.z
These steps are important because the data pipelines of our metrics system consume the data that's present on the Releases Github Project board.
Finally this improvement includes a check to no longer re-create the bug report issue when it already exists, which used to happen sometimes when the release was re-cut, and which was disturbing other automations (e.g. wrong metrics, duplicated Slack notifications).
The following prerequisites are already met:
BUG_REPORT_TOKEN
to repo secrets (fine grained access token withIssues:Write
andMetadata:Read
permissions for metamask-extension and MetaMask-planning repos, as well asProjects: Write
permissions for MetaMask organization)RELEASES_GITHUB_PROJECT_BOARD_NUMBER
to repo variablesRELEASES_GITHUB_PROJECT_BOARD_VIEW_NUMBER
to repo variablesSame PR for Mobile
Related issues
None
Manual testing steps
release/x.y.z
(where x, y, z, are numbers)regression-RC-x.y.z
and regression-prod-x.y.z
labels have been created on the public code reporegression-RC-x.y.z
and regression-prod-x.y.z
labels have been created on the private planning repoIn case, you don't have sufficient permissions on these test repos, here's a video where the manual testing steps are demoed.
Screenshots/Recordings
Before
None
After
Github action to automate bug report creation - Watch Video
Pre-merge author checklist
Pre-merge reviewer checklist