Skip to content

Commit

Permalink
temp+fix: Fix/10812 redundant source map upload (#11993)
Browse files Browse the repository at this point in the history
<!--
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?
-->

This PR introduces two new workflows in Bitrise
- `build_android_release_and_upload_sourcemaps` - Runs
`build_android_release` and uploads sourcemaps to Sentry
- `build_ios_release_and_upload_sourcemaps` - Runs `build_ios_release`
and uploads sourcemaps to Sentry

By default, both `build_android_release` and `build_ios_release` will
not automatically upload sourcemaps to Sentry

Related PR - #11490

## **Related issues**

Fixes: #10812 

## **Manual testing steps**

To build release AND upload sourcemaps, use the two workflows in
Bitrise:
- `build_android_release_and_upload_sourcemaps`
- `build_ios_release_and_upload_sourcemaps`

To only build release without uploading sourcemaps, use the two
workflows in Bitrise:
- `build_android_release`
- `build_ios_release`

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->
In this test, we ran the default `build_ios_release` and
`build_android_release`, which resulted in no sourcemaps being uploaded
- Android -
https://app.bitrise.io/build/bc568645-d1e4-418c-bea0-6aafe8f2e21c
- iOS -
https://app.bitrise.io/build/e7c224b3-c0f3-4be9-afa0-b3ad423d0da7

In this test, we enabled Sentry sourcemap upload and re-used
`build_ios_release` and `build_android_release` to mimic the workflows
that uploads sourcemaps. We can see in the two builds that it
successfully uploads sourcemaps.
- Android -
https://app.bitrise.io/build/d93989e0-3ca8-4bab-aaf2-48b0ca104986
- iOS -
https://app.bitrise.io/build/b24edfed-b020-4ac1-bf44-191d284b099b

Sourcemaps uploaded
- Android:
<img width="870" alt="Screenshot 2024-10-23 at 6 08 21 PM"
src="https://github.com/user-attachments/assets/44b24050-7337-4cc8-b13a-5aa9795bb72d">
- iOS:
<img width="851" alt="Screenshot 2024-10-23 at 6 08 31 PM"
src="https://github.com/user-attachments/assets/c26e8b8c-a767-46ee-ade6-5c519767893c">



## **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.
  • Loading branch information
runway-github[bot] authored Oct 29, 2024
1 parent e721d23 commit 07d2318
Show file tree
Hide file tree
Showing 379 changed files with 8,200 additions and 16,826 deletions.
7 changes: 7 additions & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,22 @@ ignores:
- 'rn-nodeify'

## Unused devDependencies to investigate
- '@ethersproject/abi'
- '@metamask/swappable-obj-proxy'
- '@react-native-picker/picker'
- '@rnhooks/keyboard'
- '@segment/sovran-react-native'
- '@tradle/react-native-http'
- 'asyncstorage-down'
- 'buffer'
- 'd3-shape'
- 'dnode'
- 'eciesjs'
- 'eth-block-tracker'
- 'eth-json-rpc-infura'
- 'events'
- 'https-browserify'
- 'obs-store'
- 'path'
- 'pbkdf2'
- 'pify'
Expand All @@ -68,9 +73,11 @@ ignores:
- 'react-native-aes-crypto'
- 'react-native-aes-crypto-forked'
- 'react-native-crypto'
- 'react-native-flash-message'
- 'react-native-level-fs'
- 'react-native-os'
- 'react-native-randombytes'
- 'react-native-redash'
- 'react-native-swipe-gestures'
- 'react-native-tcp'
- 'socket.io-client'
Expand Down
9 changes: 2 additions & 7 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
/** @type {Detox.DetoxConfig} */
module.exports = {
artifacts: {
rootDir: "./artifacts",
rootDir: "./artifacts/screenshots",
plugins: {
screenshot: {
shouldTakeAutomaticSnapshots: true,
keepOnlyFailedTestsArtifacts: true,
takeWhen: {
testStart: false,
testDone: false,
},
},
video: {
enabled: true, // Enable video recording
keepOnlyFailedTestsArtifacts: true, // Keep only failed tests' videos
}
},
},
},

testRunner: {
args: {
$0: 'jest',
Expand Down
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ module.exports = {
rules: {
// under discussion
'no-unused-vars': 'off',
'react/no-unstable-nested-components': [
'warn',
{
allowAsProps: true,
},
],
},
},
{
Expand Down
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ app/component-library/ @MetaMask/design-system-engineers
patches/ @MetaMask/mobile-platform
app/core/Engine.ts @MetaMask/mobile-platform
app/core/Engine.test.js @MetaMask/mobile-platform
app/core/Analytics/ @MetaMask/mobile-platform
app/util/metrics/ @MetaMask/mobile-platform
app/components/hooks/useMetrics/ @MetaMask/mobile-platform

# Supply Chain Team
bitrise.yml @MetaMask/supply-chain @MetaMask/mobile-platform
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/create-release-draft.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn --immutable
- name: Create Release & Changelog PR
id: create-release-changelog-pr
- name: Set Versions
id: set-versions
shell: bash
run: SEMVER_VERSION=${{ github.event.inputs.semver-version }} VERSION_NUMBER=${{ github.event.inputs.version-number }} yarn set-version
- name: Create Release PR
id: create-release-pr
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} ${{ github.event.inputs.version-number }}
./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,3 @@ app/util/termsOfUse/termsOfUseContent.ts
docs/assets/termsOfUse.html

/app/images/branding

# build metadata
android/app/src/main/assets/modules.json
7 changes: 2 additions & 5 deletions .js.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ export MM_ENABLE_SETTINGS_PAGE_DEV_OPTIONS="true"
# The endpoint used to submit errors and tracing data to Sentry for dev environment.
# export MM_SENTRY_DSN_DEV=

# Per dapp selected network (Amon Hen) feature flag
export MM_PER_DAPP_SELECTED_NETWORK=""

export MM_CHAIN_PERMISSIONS=""

# Multichain Feature flag
export MULTICHAIN_V1=""
#Multichain feature flag specific to UI changes
export MM_MULTICHAIN_V1_ENABLED=""
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.14.0
20.12.2
2 changes: 1 addition & 1 deletion .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const getStories = () => {
"./app/components/Views/confirmations/components/UI/InfoRow/InfoRow.stories.tsx": require("../app/components/Views/confirmations/components/UI/InfoRow/InfoRow.stories.tsx"),
"./app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.stories.tsx": require("../app/components/Views/confirmations/components/UI/ExpandableSection/ExpandableSection.stories.tsx"),
"./app/components/Views/confirmations/components/UI/Tooltip/Tooltip.stories.tsx": require("../app/components/Views/confirmations/components/UI/Tooltip/Tooltip.stories.tsx"),
"./app/component-library/components/Texts/SensitiveText/SensitiveText.stories.tsx": require("../app/component-library/components/Texts/SensitiveText/SensitiveText.stories.tsx"),
"./app/components/Views/confirmations/components/UI/CopyButton/CopyButton.stories.tsx": require("../app/components/Views/confirmations/components/UI/CopyButton/CopyButton.stories.tsx"),
};
};

Expand Down
4 changes: 1 addition & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@
"cucumberautocomplete.steps": ["wdio/step-definitions/**/*.js"],
"cucumberautocomplete.syncfeatures": "wdio/to/features/*.feature",
"cucumberautocomplete.strictGherkinCompletion": true,
"typescript.tsdk": "node_modules/typescript/lib",
"javascript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifier": "relative"
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading

0 comments on commit 07d2318

Please sign in to comment.