Skip to content

chore: create an checkbox to upload the sourcemap in build mobile workflow#27750

Merged
weitingsun merged 7 commits into
mainfrom
wsun/upload-sourcemap-in-GHA-build
Mar 23, 2026
Merged

chore: create an checkbox to upload the sourcemap in build mobile workflow#27750
weitingsun merged 7 commits into
mainfrom
wsun/upload-sourcemap-in-GHA-build

Conversation

@weitingsun
Copy link
Copy Markdown
Contributor

@weitingsun weitingsun commented Mar 20, 2026

Description

Add an optional job to upload sourcemap to Sentry

Screenshot 2026-03-20 at 4 23 50 PM

Sentry: https://metamask.sentry.io/settings/projects/metamask-mobile/source-maps/?query=4123

Changelog

CHANGELOG entry: Added a checkbox to upload sourcemap on build mobile workflow

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Note

Medium Risk
Touches the mobile build/release pipeline and version numbering across Android/iOS/Bitrise, which can affect artifact reproducibility and release ordering if misconfigured. The Sentry upload toggle is opt-in but relies on correct environment auth and build scripts honoring SENTRY_DISABLE_AUTO_UPLOAD.

Overview
Adds a new upload_to_sentry input to the GitHub Actions build.yml workflow and wires it to a Configure Sentry upload step that toggles SENTRY_DISABLE_AUTO_UPLOAD for the subsequent platform build.

Updates build/version numbers used by the native projects and CI (android/app/build.gradle, ios/MetaMask.xcodeproj/project.pbxproj, and bitrise.yml) to align on 4138 (and adjusts Android versionName).

Written by Cursor Bugbot for commit 0230a9c. This will update automatically on new commits. Configure here.

@weitingsun weitingsun requested a review from a team as a code owner March 20, 2026 16:35
@github-actions
Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-mobile-platform Mobile Platform team label Mar 20, 2026
@weitingsun weitingsun changed the title chore: create an checkbox to upload the sourcemap in build mobile app… chore: create an checkbox to upload the sourcemap in build mobile workflow Mar 20, 2026
@github-actions github-actions Bot added the risk-low Low testing needed · Low bug introduction risk label Mar 20, 2026
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.42%. Comparing base (eb832ce) to head (1da9530).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #27750      +/-   ##
==========================================
+ Coverage   82.34%   82.42%   +0.07%     
==========================================
  Files        4787     4802      +15     
  Lines      123646   123906     +260     
  Branches    27511    27594      +83     
==========================================
+ Hits       101822   102126     +304     
+ Misses      14779    14713      -66     
- Partials     7045     7067      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Cal-L
Cal-L previously approved these changes Mar 21, 2026
Copy link
Copy Markdown
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weitingsun weitingsun enabled auto-merge March 21, 2026 01:08
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 21, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread android/app/build.gradle
targetSdkVersion rootProject.ext.targetSdkVersion
versionName "7.72.0"
versionCode 3607
versionName "7.71.0"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android versionName downgraded from 7.72.0 to 7.71.0

High Severity

The Android versionName was changed from "7.72.0" to "7.71.0", which is a version downgrade. This is inconsistent with every other version reference in the project: iOS MARKETING_VERSION is 7.72.0, bitrise.yml VERSION_NAME is 7.72.0, and FLASK_VERSION_NAME is 7.72.0. This mismatch likely causes the Android build to ship with the wrong marketing version.

Fix in Cursor Fix in Web

cat ios/.xcode.env.local
node --version

# Sentry: build.sh defaults SENTRY_DISABLE_AUTO_UPLOAD=true; set false only when opted in.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this couldn't we just add the environment variable in builds.yml?

I see that we only set this for rc and production builds to false in build.sh

@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 97%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 4 changed files are purely build infrastructure and version bump changes with no impact on app functionality or test flows:

  1. .github/workflows/build.yml: Adds an optional upload_to_sentry workflow input (defaults to false) and a CI step to configure Sentry source map/debug symbol uploads. This is purely a CI pipeline enhancement — it does not change any app code, test infrastructure, or test execution logic. The Sentry upload is opt-in and only affects build artifact handling.

  2. android/app/build.gradle: Version name/code bump (versionName 7.72.0→7.71.0, versionCode 3607→4138). Pure administrative version metadata change.

  3. bitrise.yml: VERSION_NUMBER and FLASK_VERSION_NUMBER bumped from 3911→4138. Pure CI build configuration change.

  4. ios/MetaMask.xcodeproj/project.pbxproj: CURRENT_PROJECT_VERSION bumped from 3911→4138 across all build configurations. Pure iOS project metadata change.

None of these changes affect: app source code, UI components, controllers, navigation, test page objects, test fixtures, or any user-facing functionality. No E2E tests are needed to validate these changes.

Performance Test Selection:
No performance-relevant changes. All modifications are build configuration, CI workflow, and version number updates. No UI components, data loading, state management, or critical user flows were modified.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@weitingsun weitingsun added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit d683173 Mar 23, 2026
60 of 62 checks passed
@weitingsun weitingsun deleted the wsun/upload-sourcemap-in-GHA-build branch March 23, 2026 19:15
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 23, 2026
@metamaskbot metamaskbot added the release-7.72.0 Issue or pull request that will be included in release 7.72.0 label Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.72.0 Issue or pull request that will be included in release 7.72.0 risk-low Low testing needed · Low bug introduction risk size-S team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants