MetaMask / MetaMask/metamask-mobile

Introduce a way to bypass Sonarcloud quality gate

Open
#11,403 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### 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:
- TS migration
- Enzyme -> RTL migration
- Refactors that do not change the functionality of the app

Sonarcloud quality gate exists to uphold the quality of the codebase. This bypass should not be abused to circumvent that without reason.

### Scenario

- After applying the skip label, a contributor will be required to re-run the `ci.yml` action
- This friction is intentional and aims to deter the frequent usage of the bypass

### Design

_No response_

### Technical Details

- We can introduce a label that when exists on a PR, the `sonar-cloud-quality-gate-status` job in `ci.yml` will bypass and return success

### Threat Modeling Framework

_No response_

### Acceptance Criteria

- On a non-functional refactor that has a failing sonarcloud quality gate
- Apply the skip label
- Manually re-run the `ci.yml` jobs
- Upon CI completion, sonarcloud quality gate status should pass
- PR should be unblocked

- The reverse can be applied to the last scenario above
- Remove the skip label
- Re-run the `ci.yml` jobs
- Upon CI completion, sonarcloud quality gate status should fail
- PR should be blocked

### Stakeholder review needed before the work gets merged

- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)

### References

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ci.yml and the sonar-cloud-quality-gate-status job. Trace how pull request labels and manual workflow reruns are handled, then verify the acceptance scenarios: the quality gate passes with the skip label and fails after the label is removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.