Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sourcemap uploads #11490

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
843e6c2
made changes to bitrise.yml to stop the creating of Sentry sourcemaps
Daniel-Cross Sep 6, 2024
15b23f8
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 9, 2024
ffff32d
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 9, 2024
a545641
stopped Sentry Source Map creation as default and removed the skip en…
Daniel-Cross Sep 9, 2024
6b3dcab
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 10, 2024
e61ea99
Update scripts/build.sh
Daniel-Cross Sep 10, 2024
382a328
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 10, 2024
7313a80
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 10, 2024
dce5e2b
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 18, 2024
1704d94
disabled auto sourcemap upload for Android
Daniel-Cross Sep 18, 2024
87eaaa4
changed text from enable to disable
Daniel-Cross Sep 18, 2024
f90b6ce
changed build number to 1234 for testing
Daniel-Cross Sep 18, 2024
d074bdd
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 19, 2024
84f9c10
changed env variable for the release flow
Daniel-Cross Sep 19, 2024
b367d9e
added a condition to check for SENTRY_DISABLE_AUTO_UPLOAD
Daniel-Cross Sep 19, 2024
bd719f0
merged main
Daniel-Cross Sep 19, 2024
8b259a0
updated bitrise.yml after meeting with Seth to discuss how to run fro…
Daniel-Cross Sep 19, 2024
9ede8c5
kept all current changes from main conflicts for testing purposes
Daniel-Cross Sep 20, 2024
b99b974
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 20, 2024
35b32eb
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 23, 2024
693c6d2
moved from stages to workflows
Daniel-Cross Sep 23, 2024
6238cee
updated format
metamaskbot Sep 23, 2024
b0a1d08
remove setting sourcemaps env
metamaskbot Sep 23, 2024
bb20b53
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
sethkfman Sep 24, 2024
62e42e0
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 24, 2024
47d1330
update iOS build process
metamaskbot Sep 24, 2024
4a454b0
remove if check variables
metamaskbot Sep 24, 2024
c769d3c
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 25, 2024
5f060e9
changed versioncode¨
Daniel-Cross Sep 25, 2024
2782ccd
version name match
Daniel-Cross Sep 25, 2024
7ed877f
cleaned up PR
Daniel-Cross Sep 25, 2024
5dd604b
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 25, 2024
136dcb6
copied project file from main
Daniel-Cross Sep 25, 2024
65181c7
added space at bottom
Daniel-Cross Sep 25, 2024
4a17aa7
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 25, 2024
242fe97
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 25, 2024
59c2d3c
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 26, 2024
706fd41
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
Daniel-Cross Sep 26, 2024
ca8c230
Merge branch 'main' into 10812-prevent-redundant-sentry-sourcemap-upl…
sethkfman Sep 26, 2024
d041c38
revert upgrage change
metamaskbot Sep 26, 2024
6a846a6
add node -v back
metamaskbot Sep 26, 2024
84b9706
merge main
metamaskbot Sep 27, 2024
2f0ee16
updated build.sh to support sourcemap upload
metamaskbot Sep 27, 2024
204208a
flipped text to be accurate
metamaskbot Sep 27, 2024
df28ee7
updated to executable
metamaskbot Sep 27, 2024
c9d066c
fix script
metamaskbot Sep 27, 2024
8ddb6ad
Merge branch 'main' into chore/fix-sourcemap
sethkfman Oct 17, 2024
59488b0
chore: bump ruby version to 3.1.6 (#11846)
joaoloureirop Oct 17, 2024
a588de6
fix: invalid wallet connect detection (wrong hostname in connect moda…
abretonc7s Oct 17, 2024
f6ef35c
chore: Add conditional for api specification test (#11831)
cortisiko Oct 17, 2024
a9ea74f
chore: bump rbenv, ruby-build (#11849)
legobeat Oct 17, 2024
6fb93da
removed duplicate env being set
sethkfman Oct 17, 2024
5f65c17
updated yarn commands
sethkfman Oct 17, 2024
03fde24
disable flipper
sethkfman Oct 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
configurations: {
'ios.sim.apiSpecs': {
device: 'ios.simulator',
app: 'ios.qa',
app: process.env.CI ? 'ios.qa' :'ios.debug',
testRunner: {
args: {
"$0": "node e2e/api-specs/run-api-spec-tests.js",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
cache: yarn
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 #v1
with:
ruby-version: '3.1.5'
ruby-version: '3.1.6'
bundler-cache: true
env:
BUNDLE_GEMFILE: ios/Gemfile
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.5
3.1.6
3 changes: 2 additions & 1 deletion app/components/Views/AccountConnect/AccountConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ const AccountConnect = (props: AccountConnectProps) => {
const accountsLength = useSelector(selectAccountsLength);
const { wc2Metadata } = useSelector((state: RootState) => state.sdk);

const isOriginWalletConnect = wc2Metadata?.id && wc2Metadata?.id.length > 0;
const { origin: channelIdOrHostname } = hostInfo.metadata as {
id: string;
origin: string;
Expand All @@ -141,6 +140,8 @@ const AccountConnect = (props: AccountConnectProps) => {

const isOriginMMSDKRemoteConn = sdkConnection !== undefined;

const isOriginWalletConnect = !isOriginMMSDKRemoteConn && wc2Metadata?.id && wc2Metadata?.id.length > 0;

const dappIconUrl = sdkConnection?.originatorInfo?.icon;
const dappUrl = sdkConnection?.originatorInfo?.url ?? '';

Expand Down
31 changes: 26 additions & 5 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,16 @@ workflows:
inputs:
- abort_on_fail: 'yes'
- access_token: $BITRISE_START_BUILD_ACCESS_TOKEN
build_ios_release_with_sourcemaps:
envs:
- UPLOAD_SOURCEMAP: true
after_run:
- build_ios_release
build_android_release_with_sourcemaps:
envs:
- UPLOAD_SOURCEMAP: true
after_run:
- build_android_release
build_android_release:
before_run:
- code_setup
Expand All @@ -1050,9 +1060,14 @@ workflows:
inputs:
- content: |-
#!/usr/bin/env bash
node -v
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:pre-release:bundle
title: Build Android Pre-Release Bundle
if [ "$UPLOAD_SOURCEMAP" = "true" ]; then
echo "Creating and uploading Sentry sourcemap..."
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:pre-release:bundle:sourcemap
else
echo "Skipping Sentry sourcemap creation and upload..."
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:android:pre-release:bundle
fi
title: Android Build
is_always_run: false
- save-gradle-cache@1: {}
- deploy-to-bitrise-io@2.2.3:
Expand Down Expand Up @@ -1280,8 +1295,14 @@ workflows:
inputs:
- content: |-
#!/usr/bin/env bash
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:pre-release
title: iOS Sourcemaps & Build
if [ "$UPLOAD_SOURCEMAP" = "true" ]; then
echo "Creating and uploading Sentry sourcemap..."
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:pre-release:sourcemap
else
echo "Skipping Sentry sourcemap creation and upload..."
METAMASK_BUILD_TYPE='main' METAMASK_ENVIRONMENT='production' yarn build:ios:pre-release
fi
title: iOS Build
is_always_run: false
- deploy-to-bitrise-io@2.2.3:
is_always_run: false
Expand Down
2 changes: 1 addition & 1 deletion ios/Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

# Recommended to use http://rbenv.org/ to install and use this version
ruby '>= 3.1.5'
ruby '>= 3.1.6'

# Allow minor version updates up to but excluding 2.0.0
gem 'cocoapods', '~> 1.12'
Expand Down
2 changes: 1 addition & 1 deletion ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ DEPENDENCIES
cocoapods (~> 1.12)

RUBY VERSION
ruby 3.1.5p252
ruby 3.1.6p260

BUNDLED WITH
2.5.8
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def common_target_logic
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
flipper_config = FlipperConfiguration.disabled
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@
"build:android:checksum:flask": "export METAMASK_BUILD_TYPE='flask' && ./scripts/checksum.sh flask",
"build:android:checksum:verify": "shasum -a 512 -c sha512sums.txt",
"build:android:pre-release": "./scripts/build.sh android release --pre",
"build:android:pre-release:bundle:sourcemap": "NO_FLIPPER='1' && GENERATE_BUNDLE=true ./scripts/build.sh android releaseSourcemap --pre",
"build:android:pre-release:bundle": "GENERATE_BUNDLE=true ./scripts/build.sh android release --pre",
"build:android:pre-release:bundle:qa": "GENERATE_BUNDLE=true ./scripts/build.sh android QA --pre",
"build:android:pre-release:bundle:flask": "export METAMASK_BUILD_TYPE='flask' && GENERATE_BUNDLE=true ./scripts/build.sh android flask --pre",
"build:ios:release": "./scripts/build.sh ios release",
"build:ios:pre-flask": "export METAMASK_BUILD_TYPE='flask' && ./scripts/build.sh ios flask --pre",
"build:ios:pre-release": "./scripts/build.sh ios release --pre",
"build:ios:pre-release:sourcemap": "NO_FLIPPER='1' ./scripts/build.sh ios releaseSourcemap --pre",
"build:ios:pre-qa": "./scripts/build.sh ios QA --pre",
"build:android:qa": "NO_FLIPPER='1' ./scripts/build.sh android QA",
"build:ios:qa": "NO_FLIPPER='1' ./scripts/build.sh ios QA",
Expand Down
23 changes: 13 additions & 10 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ generateArchivePackages() {
buildIosRelease(){
remapEnvVariableRelease

# Enable Sentry to auto upload source maps and debug symbols
export SENTRY_DISABLE_AUTO_UPLOAD="false"

prebuild_ios

# Replace release.xcconfig with ENV vars
Expand Down Expand Up @@ -424,8 +421,6 @@ buildAndroidRelease(){
adb uninstall io.metamask || true
fi

# Enable Sentry to auto upload source maps and debug symbols
export SENTRY_DISABLE_AUTO_UPLOAD="false"
prebuild_android

# GENERATE APK
Expand Down Expand Up @@ -486,6 +481,10 @@ buildAndroidQAE2E(){
buildAndroid() {
if [ "$MODE" == "release" ] ; then
buildAndroidRelease
elif [ "$MODE" == "releaseSourcemap" ] ; then
# Enable Sentry to auto upload source maps and debug symbols
export SENTRY_DISABLE_AUTO_UPLOAD="false"
buildAndroidRelease
elif [ "$MODE" == "flask" ] ; then
buildAndroidFlaskRelease
elif [ "$MODE" == "QA" ] ; then
Expand All @@ -494,8 +493,8 @@ buildAndroid() {
buildAndroidReleaseE2E
elif [ "$MODE" == "QAE2E" ] ; then
buildAndroidQAE2E
elif [ "$MODE" == "debugE2E" ] ; then
buildAndroidRunE2E
elif [ "$MODE" == "debugE2E" ] ; then
buildAndroidRunE2E
elif [ "$MODE" == "qaDebug" ] ; then
buildAndroidRunQA
elif [ "$MODE" == "flaskDebug" ] ; then
Expand All @@ -518,13 +517,17 @@ buildIos() {
echo "Build iOS $MODE started..."
if [ "$MODE" == "release" ] ; then
buildIosRelease
elif [ "$MODE" == "releaseSourcemap" ] ; then
# Enable Sentry to auto upload source maps and debug symbols
export SENTRY_DISABLE_AUTO_UPLOAD="false"
buildIosRelease
elif [ "$MODE" == "flask" ] ; then
buildIosFlaskRelease
elif [ "$MODE" == "releaseE2E" ] ; then
buildIosReleaseE2E
elif [ "$MODE" == "debugE2E" ] ; then
buildIosSimulatorE2E
elif [ "$MODE" == "qadebugE2E" ] ; then
elif [ "$MODE" == "debugE2E" ] ; then
buildIosSimulatorE2E
elif [ "$MODE" == "qadebugE2E" ] ; then
buildIosQASimulatorE2E
elif [ "$MODE" == "QA" ] ; then
buildIosQA
Expand Down
4 changes: 2 additions & 2 deletions scripts/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ ENV BUNDLE_PATH=/home/node/.bundle
ENV HOME=/home/node
# distro rbenv and ruby are out of date - install rbenv from git and manage ruby
# RUBY_BUILD_VERSION=v20240501
ARG RBENV_COMMIT=c3ba994ec2daccf4d160aea7f55dd5cc6fc873ef
ARG RUBY_BUILD_COMMIT=263640c9fe1d44e6fc8f86fc56a67ee58e7b22f7
ARG RBENV_COMMIT=3bac268cdb81dd745ce13a1cf6ff4a286336ab3b
ARG RUBY_BUILD_COMMIT=aab1b8d0e7e814f200320749501ba57e2fae20d0
RUN (mkdir /home/node/.rbenv \
&& curl -sL https://github.com/rbenv/rbenv/archive/${RBENV_COMMIT}.tar.gz \
| tar --strip-components=1 -C /home/node/.rbenv/ -xzf - \
Expand Down
Loading