-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Introduce a way to bypass Sonarcloud quality gate #11403
Labels
Comments
7 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Sep 25, 2024
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Adds logic in the `sonar-cloud-quality-gate-status` step in the CI that checks for the existence of `skip-sonar-cloud` label. If it exists, the step is bypassed and passes. If the label doesn't exist, it checks the sonar cloud quality gate status as usual. Also removes the redundant `sonar-cloud` dependency in the `all-jobs-pass` step ## **Related issues** Fixes: #11403 ## **Manual testing steps** - Apply `skip-sonar-cloud` label - Manually re-run `ci.yml` jobs - Notice the `sonar-cloud-quality-gate-status` step logs that it is skipped and the status checks is green - Afterwards, remove `skip-sonar-cloud` label - Manually re-run `ci.yml` jobs - Notice the `sonar-cloud-quality-gate-status` step runs as usual ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> With label applied https://github.com/MetaMask/metamask-mobile/actions/runs/11026106803/job/30622332596?pr=11425 Without label applied **https://github.com/MetaMask/metamask-mobile/actions/runs/11026106803/job/30623782793** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
devin-ai-integration bot
pushed a commit
that referenced
this issue
Sep 25, 2024
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> Adds logic in the `sonar-cloud-quality-gate-status` step in the CI that checks for the existence of `skip-sonar-cloud` label. If it exists, the step is bypassed and passes. If the label doesn't exist, it checks the sonar cloud quality gate status as usual. Also removes the redundant `sonar-cloud` dependency in the `all-jobs-pass` step ## **Related issues** Fixes: #11403 ## **Manual testing steps** - Apply `skip-sonar-cloud` label - Manually re-run `ci.yml` jobs - Notice the `sonar-cloud-quality-gate-status` step logs that it is skipped and the status checks is green - Afterwards, remove `skip-sonar-cloud` label - Manually re-run `ci.yml` jobs - Notice the `sonar-cloud-quality-gate-status` step runs as usual ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> With label applied https://github.com/MetaMask/metamask-mobile/actions/runs/11026106803/job/30622332596?pr=11425 Without label applied **https://github.com/MetaMask/metamask-mobile/actions/runs/11026106803/job/30623782793** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/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-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is this about?
This task aims to introduce a way to bypass Sonarcloud quality gate but should only be used in appropriate conditions. Some conditions include:
Sonarcloud quality gate exists to uphold the quality of the codebase. This bypass should not be abused to circumvent that without reason.
Scenario
ci.yml
actionDesign
No response
Technical Details
sonar-cloud-quality-gate-status
job inci.yml
will bypass and return successThreat Modeling Framework
No response
Acceptance Criteria
On a non-functional refactor that has a failing sonarcloud quality gate
ci.yml
jobsThe reverse can be applied to the last scenario above
ci.yml
jobsStakeholder review needed before the work gets merged
References
No response
The text was updated successfully, but these errors were encountered: