Skip to content

Commit e0f129b

Browse files
Merge pull request #37598 from MetaMask/release/13.9.0
release: 13.9.0
2 parents 7759a16 + 5ac92b7 commit e0f129b

File tree

521 files changed

+21224
-9120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

521 files changed

+21224
-9120
lines changed

.github/actions/page-load-benchmark-comment/action.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/scripts/benchmark-stats-commit.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ if [[ -z "${EXTENSION_BENCHMARK_STATS_TOKEN:-}" ]]; then
99
exit 1
1010
fi
1111

12-
if [[ -z "${GITHUB_SHA:-}" ]]; then
13-
printf '%s\n' 'GITHUB_SHA environment variable must be set'
12+
if [[ -z "${HEAD_COMMIT_HASH:-}" ]]; then
13+
printf '%s\n' 'HEAD_COMMIT_HASH environment variable must be set'
1414
exit 1
1515
fi
1616

17-
if [[ -z "${GITHUB_REPOSITORY_OWNER:-}" ]]; then
18-
printf '%s\n' 'GITHUB_REPOSITORY_OWNER environment variable must be set'
17+
if [[ -z "${OWNER:-}" ]]; then
18+
printf '%s\n' 'OWNER environment variable must be set'
1919
exit 1
2020
fi
2121

@@ -33,7 +33,7 @@ git fetch origin main:main
3333

3434
git checkout main
3535

36-
BENCHMARK_FILE="../test-artifacts/benchmarks/benchmark-results.json"
36+
BENCHMARK_FILE="../test-artifacts/benchmarks/page-load-benchmark-results.json"
3737
STATS_FILE="stats/page_load_data.json"
3838
TEMP_FILE="stats/page_load_data.temp.json"
3939

@@ -53,13 +53,13 @@ jq . "${BENCHMARK_FILE}" > /dev/null || {
5353
}
5454

5555
# Check if the SHA already exists in the stats file
56-
if jq -e "has(\"${GITHUB_SHA}\")" "${STATS_FILE}" > /dev/null; then
57-
echo "SHA ${GITHUB_SHA} already exists in stats file. No new commit needed."
56+
if jq -e "has(\"${HEAD_COMMIT_HASH}\")" "${STATS_FILE}" > /dev/null; then
57+
echo "SHA ${HEAD_COMMIT_HASH} already exists in stats file. No new commit needed."
5858
exit 0
5959
fi
6060

6161
# Append new benchmark data correctly using jq
62-
jq --arg sha "${GITHUB_SHA}" --argjson data "$(cat "${BENCHMARK_FILE}")" \
62+
jq --arg sha "${HEAD_COMMIT_HASH}" --argjson data "$(cat "${BENCHMARK_FILE}")" \
6363
'. + {($sha): $data}' "${STATS_FILE}" > "${TEMP_FILE}"
6464

6565
# Overwrite the original JSON file with the corrected version
@@ -68,9 +68,9 @@ mv "${TEMP_FILE}" "${STATS_FILE}"
6868
# Only add the JSON file
6969
git add stats/page_load_data.json
7070

71-
git commit --message "Adding page load benchmark data at commit: ${GITHUB_SHA}"
71+
git commit --message "Adding page load benchmark data at commit: ${HEAD_COMMIT_HASH}"
7272

73-
repo_slug="${GITHUB_REPOSITORY_OWNER}/extension_benchmark_stats"
73+
repo_slug="${OWNER}/extension_benchmark_stats"
7474

7575
git push "https://metamaskbot:${EXTENSION_BENCHMARK_STATS_TOKEN}@github.com/${repo_slug}" main
7676

.github/workflows/create-release-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ jobs:
7676
create-release-pr:
7777
needs: [resolve-bases, resolve-previous-ref]
7878
name: Create Release Pull Request using Github Tools
79-
uses: MetaMask/github-tools/.github/workflows/create-release-pr.yml@7fe185fdb0e60981c898e88d82e44ff33f604daa
79+
uses: MetaMask/github-tools/.github/workflows/create-release-pr.yml@6a04e4d0c8c25680a7543cfcd2e2fb7125b6759c
8080
with:
8181
platform: extension
8282
checkout-base-branch: ${{ needs.resolve-bases.outputs.checkout_base }}
8383
release-pr-base-branch: ${{ needs.resolve-bases.outputs.release_base }}
8484
semver-version: ${{ inputs.semver-version }}
8585
previous-version-ref: ${{ needs.resolve-previous-ref.outputs.previous_ref }}
86-
github-tools-version: 7fe185fdb0e60981c898e88d82e44ff33f604daa
86+
github-tools-version: 6a04e4d0c8c25680a7543cfcd2e2fb7125b6759c
8787
secrets:
8888
# This token needs write permissions to metamask-extension & read permissions to metamask-planning
8989
# If called from auto-create-release-pr use the PR_TOKEN passed in as an input, if called manually use github secret token values

.github/workflows/main.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ on:
2222
- cron: '0 2-6 * * *'
2323

2424
concurrency:
25-
group: ${{ github.workflow }}-${{ github.ref }}
25+
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.sha || github.ref }}
2626
cancel-in-progress: ${{ !(contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/stable')) }}
2727

2828
env:
@@ -241,22 +241,15 @@ jobs:
241241
s3-bucket: ${{ vars.AWS_S3_BUCKET }}/${{ github.event.repository.name }}/${{ github.run_id }}/bundle-size
242242
path: test-artifacts/chrome
243243

244-
page-load-benchmark-pr:
244+
page-load-benchmark:
245245
needs:
246246
- build-test-browserify
247-
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref_name == 'main') }}
248-
uses: ./.github/workflows/page-load-benchmark-pr.yml
249-
with:
250-
browser-loads: '10'
251-
page-loads: '10'
252-
253-
page-load-benchmark-upload:
254-
needs:
255-
- page-load-benchmark-pr
256-
if: github.ref == 'refs/heads/main'
257-
uses: ./.github/workflows/page-load-benchmark-upload.yml
247+
uses: ./.github/workflows/page-load-benchmark.yml
258248
secrets:
259249
EXTENSION_BENCHMARK_STATS_TOKEN: ${{ secrets.EXTENSION_BENCHMARK_STATS_TOKEN }}
250+
with:
251+
browser-loads: 10
252+
page-loads: 10
260253

261254
needs-e2e:
262255
needs:
@@ -419,6 +412,7 @@ jobs:
419412
- build-test-flask-browserify
420413
- build-test-flask-mv2-browserify
421414
- run-benchmarks
415+
- page-load-benchmark
422416
- bundle-size
423417
- build-storybook
424418
- build-ts-migration-dashboard

.github/workflows/page-load-benchmark-upload.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/page-load-benchmark-pr.yml renamed to .github/workflows/page-load-benchmark.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ on:
66
browser-loads:
77
description: 'Number of browser loads to perform'
88
required: false
9-
type: string
10-
default: '10'
9+
type: number
10+
default: 10
1111
page-loads:
1212
description: 'Number of page loads per browser'
1313
required: false
14-
type: string
15-
default: '10'
14+
type: number
15+
default: 10
16+
secrets:
17+
EXTENSION_BENCHMARK_STATS_TOKEN:
18+
required: true
1619

1720
jobs:
1821
page-load-benchmark-pr:
@@ -23,28 +26,42 @@ jobs:
2326
OWNER: ${{ github.repository_owner }}
2427
REPOSITORY: ${{ github.event.repository.name }}
2528
PR_NUMBER: ${{ github.event.pull_request.number }}
26-
GITHUB_SHA: ${{ github.event.pull_request.head.sha }}
29+
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha || github.sha }}
30+
BENCHMARK_BROWSER_LOADS: ${{ inputs.browser-loads }}
31+
BENCHMARK_PAGE_LOADS: ${{ inputs.page-loads }}
32+
IS_PR_OR_MAIN: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref_name == 'main') }}
2733
steps:
2834
- name: Checkout and setup environment
35+
if: ${{ env.IS_PR_OR_MAIN }}
2936
uses: MetaMask/action-checkout-and-setup@v1
3037
with:
3138
is-high-risk-environment: false
3239
skip-allow-scripts: true
3340
use-yarn-hydrate: true
3441

3542
- name: Download artifact 'build-test-browserify'
43+
if: ${{ env.IS_PR_OR_MAIN }}
3644
uses: actions/download-artifact@v4
3745
with:
3846
name: build-test-browserify
3947

4048
- name: Install Playwright browsers
49+
if: ${{ env.IS_PR_OR_MAIN }}
4150
run: yarn playwright install chromium
4251

4352
- name: Run page load benchmarks
53+
if: ${{ env.IS_PR_OR_MAIN }}
4454
run: yarn test:e2e:benchmark
4555

4656
- name: Upload benchmark results (github artifacts)
57+
if: ${{ env.IS_PR_OR_MAIN }}
4758
uses: actions/upload-artifact@v4
4859
with:
49-
name: benchmark-results
50-
path: test-artifacts/benchmarks/benchmark-results.json
60+
name: page-load-benchmark-results
61+
path: test-artifacts/benchmarks/page-load-benchmark-results.json
62+
63+
- name: Upload benchmark results (historical data)
64+
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
65+
run: .github/scripts/benchmark-stats-commit.sh
66+
env:
67+
EXTENSION_BENCHMARK_STATS_TOKEN: ${{ secrets.EXTENSION_BENCHMARK_STATS_TOKEN }}

.github/workflows/publish-prerelease.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ jobs:
6767
echo "MERGE_BASE_COMMIT_HASH=${merge_base_commit_hash}" >> "${GITHUB_ENV}"
6868
echo "The merge base commit hash is '${merge_base_commit_hash}'"
6969
70-
- name: Page load benchmark comment
70+
- name: Download page load benchmark results
7171
if: ${{ github.event_name == 'pull_request' }}
72-
uses: ./.github/actions/page-load-benchmark-comment
72+
uses: actions/download-artifact@v4
7373
with:
74-
head-commit-hash: ${{ env.HEAD_COMMIT_HASH }}
75-
pr-comment-token: ${{ secrets.PR_COMMENT_TOKEN }}
74+
name: page-load-benchmark-results
75+
path: test-artifacts/benchmarks
7676

7777
- name: Publish prerelease
7878
if: ${{ env.MERGE_BASE_COMMIT_HASH && env.PR_NUMBER && env.PR_COMMENT_TOKEN && vars.AWS_CLOUDFRONT_URL }}

.github/workflows/run-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ubuntu-latest
4848
timeout-minutes: 30
4949
container:
50-
image: ghcr.io/metamask/metamask-extension-e2e-image:v1.0.0
50+
image: ghcr.io/metamask/metamask-extension-e2e-image:v24.11.0
5151
credentials:
5252
username: ${{ github.actor }}
5353
password: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stable-branch-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
run-stable-sync:
3737
name: Run Stable branch sync
3838
needs: get-next-version
39-
uses: metamask/github-tools/.github/workflows/stable-sync.yml@486f5d113c5524eaab9a058abe76097f83a4c33e
39+
uses: metamask/github-tools/.github/workflows/stable-sync.yml@79ce6e3ab56c7f3d0ee0c2cf5900a2522d20be0b
4040
secrets:
4141
github-token: ${{ secrets.STABLE_SYNC_TOKEN }}
4242
with:
4343
semver-version: ${{ needs.get-next-version.outputs.next-version }}
4444
repo-type: 'extension' # Accepts 'mobile' or 'extension'
45-
github-tools-version: '486f5d113c5524eaab9a058abe76097f83a4c33e'
45+
github-tools-version: '79ce6e3ab56c7f3d0ee0c2cf5900a2522d20be0b'
4646
stable-branch-name: 'stable' # Defaults to `stable`

.github/workflows/update-release-changelog.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# On every push to a release branch (Version-v* or release/*), this workflow rebuilds the matching
1+
# On every push to a release branch (release/x.y.z format), this workflow rebuilds the matching
22
# changelog branch, re-runs the auto-changelog script, and either updates or recreates the changelog PR.
3+
# Note: This workflow validates the branch name to ensure it matches the semantic versioning pattern
4+
# (release/x.y.z) and skips execution for other branch names like release/x.y.z-Changelog.
35
name: Update Release Changelog PR
46

57
on:
@@ -12,7 +14,34 @@ concurrency:
1214
cancel-in-progress: false
1315

1416
jobs:
17+
validate-branch:
18+
name: Validate release branch format
19+
runs-on: ubuntu-latest
20+
outputs:
21+
is-valid-release: ${{ steps.check.outputs.is-valid }}
22+
version: ${{ steps.check.outputs.version }}
23+
steps:
24+
- name: Check if branch matches release/x.y.z pattern
25+
id: check
26+
run: |
27+
BRANCH_NAME="${{ github.ref_name }}"
28+
echo "Checking branch: $BRANCH_NAME"
29+
30+
# Validate branch matches release/x.y.z format (semantic versioning)
31+
if [[ "$BRANCH_NAME" =~ ^release/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
32+
VERSION="${BRANCH_NAME#release/}"
33+
echo "Valid release branch detected: $BRANCH_NAME (version: $VERSION)"
34+
echo "is-valid=true" >> "$GITHUB_OUTPUT"
35+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
36+
else
37+
echo "Branch '$BRANCH_NAME' does not match release/x.y.z pattern. Skipping changelog update."
38+
echo "is-valid=false" >> "$GITHUB_OUTPUT"
39+
fi
40+
1541
refresh-changelog:
42+
name: Update changelog
43+
needs: validate-branch
44+
if: needs.validate-branch.outputs.is-valid-release == 'true'
1645
permissions:
1746
contents: write
1847
pull-requests: write

0 commit comments

Comments
 (0)