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

ci: enable sentry for releases #21766

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

markoburcul
Copy link

@markoburcul markoburcul commented Dec 5, 2024

referenced issue: #21706

@status-im-auto
Copy link
Member

status-im-auto commented Dec 5, 2024

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
058f244 #1 2024-12-05 15:22:38 ~1 min ios 📄log
058f244 #1 2024-12-05 15:23:03 ~1 min android 📄log
058f244 #1 2024-12-05 15:23:10 ~1 min android-e2e 📄log
✔️ 058f244 #1 2024-12-05 15:25:39 ~4 min tests 📄log
✔️ 132432f #2 2024-12-05 15:49:11 ~4 min tests 📄log
✔️ 132432f #2 2024-12-05 15:51:22 ~6 min android-e2e 🤖apk 📲
✔️ 132432f #2 2024-12-05 15:52:42 ~8 min android 🤖apk 📲
✔️ 132432f #2 2024-12-05 16:01:15 ~16 min ios 📱ipa 📲
f502597 #3 2024-12-06 07:33:28 ~20 sec android-e2e 📄log
f502597 #3 2024-12-06 07:33:28 ~20 sec android 📄log
f502597 #3 2024-12-06 07:35:42 ~2 min ios 📄log
✔️ f502597 #3 2024-12-06 07:37:45 ~4 min tests 📄log
✔️ 10c1f3f #4 2024-12-06 09:12:04 ~4 min tests 📄log
✔️ 10c1f3f #4 2024-12-06 09:14:26 ~7 min android-e2e 🤖apk 📲
✔️ 10c1f3f #4 2024-12-06 09:18:41 ~11 min android 🤖apk 📲
✔️ 10c1f3f #4 2024-12-06 09:22:34 ~15 min ios 📱ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b62ae9e #5 2024-12-09 15:59:25 ~4 min tests 📄log
✔️ b62ae9e #5 2024-12-09 16:01:42 ~7 min android-e2e 🤖apk 📲
✔️ b62ae9e #5 2024-12-09 16:04:30 ~9 min android 🤖apk 📲
✔️ b62ae9e #5 2024-12-09 16:06:15 ~11 min ios 📱ipa 📲
✔️ 166394c #6 2025-01-02 14:10:42 ~4 min tests 📄log
✔️ 166394c #6 2025-01-02 14:14:10 ~8 min ios 📱ipa 📲
✔️ 166394c #6 2025-01-02 14:14:29 ~8 min android-e2e 🤖apk 📲
✔️ 166394c #6 2025-01-02 14:15:53 ~9 min android 🤖apk 📲

@markoburcul markoburcul force-pushed the enable-sentry-for-releases branch from 058f244 to 132432f Compare December 5, 2024 15:44
@@ -109,6 +109,10 @@ in stdenv.mkDerivation rec {
export ANDROID_NDK_ROOT="${androidPkgs.ndk}"

export STATUS_NIX_MAVEN_REPO="${deps.gradle}"

# Sentry vars relevant for release
export SENTRY_CONTEXT_NAME="status-mobile"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we also export vars for iOS builds?

Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not required, you may revert changes to this file

Copy link
Contributor

@siddarthkay siddarthkay left a comment

Choose a reason for hiding this comment

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

@markoburcul : adding SENTRY_CONTEXT_NAME and SENTRY_CONTEXT_VERSION in nix/mobile/android/build.nix will make those vars available for both debug and release builds in Android.

On Android If you wish to add any secret which is only available to release then status-jenkins-lib is the correct place.

specifically here https://github.com/status-im/status-jenkins-lib/blob/1b075b8a2f8240c34ba1ad3969582fcaf92c2fb9/vars/android.groovy#L22-L28

For the mobile app to take notice of these variables then linking them in shadow-cljs config is also required here

{status-im.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.config/INFURA_TOKEN #shadow/env "INFURA_TOKEN"
status-im.config/STATUS_BUILD_PROXY_USER #shadow/env "STATUS_BUILD_PROXY_USER"
status-im.config/STATUS_BUILD_PROXY_PASSWORD #shadow/env "STATUS_BUILD_PROXY_PASSWORD"
status-im.config/STATUS_BACKEND_SERVER_ENABLED #shadow/env "STATUS_BACKEND_SERVER_ENABLED"
status-im.config/STATUS_BACKEND_SERVER_HOST #shadow/env "STATUS_BACKEND_SERVER_HOST"
status-im.config/STATUS_BACKEND_SERVER_MEDIA_SERVER_ENABLE_TLS
#shadow/env "STATUS_BACKEND_SERVER_MEDIA_SERVER_ENABLE_TLS"
status-im.config/STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX
#shadow/env "STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX"
status-im.config/STATUS_BACKEND_SERVER_ROOT_DATA_DIR #shadow/env
"STATUS_BACKEND_SERVER_ROOT_DATA_DIR"
status-im.config/MIXPANEL_APP_ID #shadow/env "MIXPANEL_APP_ID"
status-im.config/MIXPANEL_TOKEN #shadow/env "MIXPANEL_TOKEN"
status-im.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"
status-im.config/RARIBLE_MAINNET_API_KEY #shadow/env "RARIBLE_MAINNET_API_KEY"
status-im.config/RARIBLE_TESTNET_API_KEY #shadow/env "RARIBLE_TESTNET_API_KEY"
status-im.config/ALCHEMY_ETHEREUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ETHEREUM_MAINNET_TOKEN"
status-im.config/ALCHEMY_ETHEREUM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_ETHEREUM_SEPOLIA_TOKEN"
status-im.config/ALCHEMY_ARBITRUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ARBITRUM_MAINNET_TOKEN"
status-im.config/ALCHEMY_ARBITRUM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_ARBITRUM_SEPOLIA_TOKEN"
status-im.config/ALCHEMY_OPTIMISM_MAINNET_TOKEN #shadow/env "ALCHEMY_OPTIMISM_MAINNET_TOKEN"
status-im.config/ALCHEMY_OPTIMISM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_OPTIMISM_SEPOLIA_TOKEN"}

@markoburcul markoburcul force-pushed the enable-sentry-for-releases branch 2 times, most recently from f502597 to 10c1f3f Compare December 6, 2024 09:06
@ilmotta
Copy link
Contributor

ilmotta commented Dec 6, 2024

@siddarthkay @markoburcul what do you say I change my PR to branch off of this PR and then we can check everything works while you inject the env var values in Jenkins?

I'm suggesting this so we avoid merging PRs that are not fully working, which could be the case with this PR until we see the error appear in Sentry.

@siddarthkay
Copy link
Contributor

@ilmotta : sure go ahead

@@ -46,6 +46,10 @@ in buildGoPackage rec {
# TODO: try removing when go is upgraded to 1.22
GODEBUG = "netdns=cgo+2";

# Sentry for status-go
SENTRY_CONTEXT_NAME = "status-mobile";
SENTRY_CONTEXT_VERSION = fileContents ../../../VERSION;
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary. Just use the version we already have.

Suggested change
SENTRY_CONTEXT_VERSION = fileContents ../../../VERSION;
SENTRY_CONTEXT_VERSION = version;

referenced issue: #21706

Signed-off-by: markoburcul <[email protected]>
@markoburcul markoburcul force-pushed the enable-sentry-for-releases branch from b62ae9e to 166394c Compare January 2, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: CONTRIBUTOR
Development

Successfully merging this pull request may close these issues.

6 participants