Skip to content

Commit

Permalink
Merge pull request #24325 from MetaMask/Version-v11.14.4
Browse files Browse the repository at this point in the history
Version v11.14.4
  • Loading branch information
Gudahtt committed May 1, 2024
2 parents e70899b + 16b8ba4 commit b3949d9
Show file tree
Hide file tree
Showing 449 changed files with 6,210 additions and 15,892 deletions.
99 changes: 10 additions & 89 deletions .circleci/config.yml
Expand Up @@ -67,18 +67,6 @@ aliases:
git checkout -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1"
fi
# Check if MMI Optional tests should run
- &check-mmi-optional
name: Check if MMI Optional tests should run
command: |
RUN_MMI_OPTIONAL=$(cat ./RUN_MMI_OPTIONAL)
if [[ "${CIRCLE_BRANCH}" == "develop" || "${RUN_MMI_OPTIONAL}" == "true" ]]; then
echo "Running MMI Optional tests"
else
echo "Skipping MMI Optional tests"
circleci step halt
fi
workflows:
test_and_release:
jobs:
Expand All @@ -89,7 +77,6 @@ workflows:
- trigger-beta-build:
requires:
- prep-deps
- check-pr-tag
- prep-deps
- test-deps-audit:
requires:
Expand Down Expand Up @@ -145,7 +132,6 @@ workflows:
- prep-build-test-mmi-playwright:
requires:
- prep-deps
- check-pr-tag
- prep-build-storybook:
requires:
- prep-deps
Expand Down Expand Up @@ -387,68 +373,6 @@ jobs:
name: Create GitHub Pull Request for version
command: .circleci/scripts/release-create-release-pr.sh

check-pr-tag:
docker:
- image: cimg/base:stable
steps:
- run:
name: Check for MMI Team Tag
command: |
#!/bin/bash
# GitHub Personal Access Token for API Authentication
GITHUB_TOKEN="${GITHUB_TOKEN}"
BRANCH="${CIRCLE_BRANCH}"
# Fetch the PRs associated with the current branch and check the response
PR_RESPONSE=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls?state=open&head=${CIRCLE_PROJECT_USERNAME}:${BRANCH}")
echo "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls?state=open&head=${CIRCLE_PROJECT_USERNAME}:${BRANCH}"
# Check if the response contains valid JSON
if ! echo "$PR_RESPONSE" | jq empty; then
echo "Failed to parse JSON response."
echo "$PR_RESPONSE"
exit 1
fi
# Check if we received an array of PRs
if ! echo "$PR_RESPONSE" | jq -e '. | type == "array"'; then
echo "$PR_RESPONSE"
echo "Expected an array of PRs, got something else."
exit 1
fi
# Check if the array of PRs is empty
PR_COUNT=$(echo "$PR_RESPONSE" | jq '. | length')
# If no PRs are found, exit gracefully
if [ "$PR_COUNT" -eq 0 ]; then
echo "No open PRs found. Exiting."
echo "false" > ./RUN_MMI_OPTIONAL
exit 0
fi
# Extract label names from the PR_RESPONSE
LABEL_NAMES=$(echo "$PR_RESPONSE" | jq -r '.[0].labels[].name')
echo "Labels found: $LABEL_NAMES"
# Check if "team-mmi" label is present
if echo "$LABEL_NAMES" | grep -qw "team-mmi"; then
echo "team-mmi tag found."
# assign the RUN_MMI_OPTIONAL variable to true
echo "true" > ./RUN_MMI_OPTIONAL
else
echo "team-mmi tag not found."
# assign the RUN_MMI_OPTIONAL variable to false
echo "false" > ./RUN_MMI_OPTIONAL
fi
- persist_to_workspace:
root: .
paths:
- RUN_MMI_OPTIONAL

prep-deps:
executor: node-browsers-medium
steps:
Expand Down Expand Up @@ -716,7 +640,6 @@ jobs:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run: *check-mmi-optional
- run:
name: Build MMI extension for Playwright e2e
command: |
Expand All @@ -731,7 +654,6 @@ jobs:
- persist_to_workspace:
root: .
paths:
- RUN_MMI_OPTIONAL
- dist-test-mmi-playwright
- builds-test-mmi-playwright
- store_artifacts:
Expand Down Expand Up @@ -953,7 +875,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome --retries 2
timeout 20m yarn test:e2e:chrome --retries 2 --debug
fi
no_output_timeout: 5m
- store_artifacts:
Expand All @@ -980,7 +902,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome --retries 2
timeout 20m yarn test:e2e:chrome --retries 2 --debug
fi
no_output_timeout: 5m
environment:
Expand Down Expand Up @@ -1009,7 +931,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome --retries 2 || echo "Temporarily suppressing MV3 e2e test failures"
timeout 20m yarn test:e2e:chrome --retries 2 --debug || echo "Temporarily suppressing MV3 e2e test failures"
fi
no_output_timeout: 5m
- store_artifacts:
Expand Down Expand Up @@ -1087,7 +1009,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:rpc --retries 2 --build-type=mmi
timeout 20m yarn test:e2e:chrome:rpc --retries 2 --debug --build-type=mmi
fi
no_output_timeout: 5m
- store_artifacts:
Expand All @@ -1107,7 +1029,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 2
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 2 --debug
fi
no_output_timeout: 5m

Expand All @@ -1129,7 +1051,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:firefox:flask --retries 2
timeout 20m yarn test:e2e:firefox:flask --retries 2 --debug
fi
no_output_timeout: 5m
- store_artifacts:
Expand All @@ -1156,7 +1078,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:flask --retries 2
timeout 20m yarn test:e2e:chrome:flask --retries 2 --debug
fi
no_output_timeout: 5m
- store_artifacts:
Expand All @@ -1183,7 +1105,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:mmi --retries 2 --build-type=mmi
timeout 20m yarn test:e2e:chrome:mmi --retries 2 --debug --build-type=mmi
fi
no_output_timeout: 5m
- store_artifacts:
Expand All @@ -1199,7 +1121,6 @@ jobs:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run: *check-mmi-optional
- run:
name: Move test build to dist
command: mv ./dist-test-mmi-playwright ./dist
Expand Down Expand Up @@ -1251,7 +1172,7 @@ jobs:
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:firefox --retries 2
timeout 20m yarn test:e2e:firefox --retries 2 --debug
fi
no_output_timeout: 5m
- store_artifacts:
Expand Down Expand Up @@ -1650,4 +1571,4 @@ jobs:
steps:
- run:
name: All Tests Passed
command: echo 'whew - everything passed!'
command: echo 'weew - everything passed!'
1 change: 0 additions & 1 deletion .eslintrc.js
Expand Up @@ -135,7 +135,6 @@ module.exports = {
path.resolve(__dirname, '.eslintrc.typescript-compat.js'),
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
// this rule is new, but we didn't use it before, so it's off now
'@typescript-eslint/no-duplicate-enum-values': 'off',
'@typescript-eslint/no-shadow': [
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -51,6 +51,3 @@ privacy-snapshot.json @MetaMask/extension-privacy-reviewers
# For now, restricting approvals inside the .devcontainer folder to devs
# who were involved with the Codespaces project.
.devcontainer/ @MetaMask/library-admins @HowardBraham @plasmacorral @brad-decker

# Confirmations UX team to own code for confirmations on UI.
ui/pages/confirmations @MetaMask/confirmations-ux @MetaMask/confirmations-system-team
2 changes: 1 addition & 1 deletion .github/scripts/check-pr-has-required-labels.ts
Expand Up @@ -73,7 +73,7 @@ async function main(): Promise<void> {
if (!hasTeamLabel) {
errorMessage += 'No team labels found on the PR. ';
}
errorMessage += `Please make sure the PR is appropriately labeled before merging it.\n\nSee labeling guidelines for more detail: https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md`;
errorMessage += `Please make sure the PR is appropriately labeled before merging it.\n\nSee labeling guidelines for more detail: https://github.com/MetaMask/metamask-extension/blob/develop/.github/LABELING_GUIDELINES.md`;
core.setFailed(errorMessage);
process.exit(1);
}
2 changes: 1 addition & 1 deletion .github/workflows/security-code-scanner.yml
Expand Up @@ -32,5 +32,5 @@ jobs:
node_modules
rules_excluded:
example
project_metrics_token: ${{secrets.SECURITY_SCAN_METRICS_TOKEN}}
mixpanel_project_token: ${{secrets.SECURITY_CODE_SCANNER_MIXPANEL_TOKEN}}
slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
14 changes: 2 additions & 12 deletions .github/workflows/sonar.yml
Expand Up @@ -4,16 +4,6 @@ on:
secrets:
SONAR_TOKEN:
required: true
pull_request:
branches:
- develop
types:
- opened
- reopened
- synchronize
- labeled
- unlabeled

jobs:
sonarcloud:
name: SonarCloud
Expand All @@ -23,8 +13,8 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for better relevancy of analysis
- name: SonarCloud Scan
# This is SonarSource/sonarcloud-github-action@v2.0.0
uses: SonarSource/sonarcloud-github-action@4b4d7634dab97dcee0b75763a54a6dc92a9e6bc1
# v1.9.1
uses: SonarSource/sonarcloud-github-action@5875562561d22a34be0c657405578705a169af6c
with:
args: >
-Dsonar.javascript.lcov.reportPaths=tests/coverage/lcov.info
Expand Down
1 change: 0 additions & 1 deletion .metamaskrc.dist
Expand Up @@ -21,4 +21,3 @@ BLOCKAID_PUBLIC_KEY=
; SELENIUM_HEADLESS=
; Set this to 1 to make chrome e2e tests disable DoH/DoT and use system DNS
; SELENIUM_USE_SYSTEM_DNS=
ENABLE_CONFIRMATION_REDESIGN=
10 changes: 0 additions & 10 deletions .storybook/main.js
Expand Up @@ -64,7 +64,6 @@ module.exports = {
{
loader: 'css-loader',
options: {
esModule: false,
import: false,
url: false,
},
Expand All @@ -84,15 +83,6 @@ module.exports = {
config.plugins.push(
new CopyWebpackPlugin({
patterns: [
{
from: path.join(
'ui',
'css',
'utilities',
'fonts/',
),
to: 'fonts',
},
{
from: path.join(
'node_modules',
Expand Down
84 changes: 0 additions & 84 deletions .vscode/cspell.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/launch.json
Expand Up @@ -38,7 +38,7 @@
"type": "pickString",
"id": "browserToUse",
"description": "Which browser do you want to test with?",
"options": ["chrome", "firefox", "all"],
"options": ["chrome", "firefox"],
"default": "chrome"
}
],
Expand Down

0 comments on commit b3949d9

Please sign in to comment.