Skip to content

Commit 25971c9

Browse files
authored
Merge branch 'main' into alwx/ci/retry-e2e-ready-flake
2 parents f4344b0 + eae9020 commit 25971c9

104 files changed

Lines changed: 11054 additions & 8187 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
* @alwx @antonis @lucas-zimerman
2+
3+
# Public API surface — also request a mobile SDK team review on API changes
4+
/packages/core/etc/sentry-react-native.api.md @alwx @antonis @lucas-zimerman @getsentry/team-mobile

.github/pull_request_template.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
## :scroll: Description
10-
<!--- Describe your changes in detail -->
10+
<!--- Describe your changes in detail and optionally add screenshots -->
1111

1212

1313
## :bulb: Motivation and Context
@@ -16,15 +16,20 @@
1616

1717

1818
## :green_heart: How did you test it?
19+
<!---
20+
Include a link to Sentry when applicable:
21+
* Link to Sentry: <LINK>
22+
-->
1923

2024

2125
## :pencil: Checklist
2226
<!--- Put an `x` in the boxes that apply -->
23-
- [ ] I added tests to verify changes
24-
- [ ] No new PII added or SDK only sends newly added PII if `sendDefaultPII` is enabled
27+
- [ ] I added tests to verify changes.
28+
- [ ] No new PII added or SDK only sends newly added PII if `sendDefaultPII` is enabled.
2529
- [ ] I updated the docs if needed.
2630
- [ ] I updated the wizard if needed.
27-
- [ ] All tests passing
28-
- [ ] No breaking changes
31+
- [ ] All tests passing.
32+
- [ ] Public API changes reviewed by another Mobile SDK team member or implemented according to the [develop docs](https://develop.sentry.dev/) spec.
33+
- [ ] No breaking changes.
2934

3035
## :crystal_ball: Next steps

.github/workflows/buildandtest.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ jobs:
3434
- name: Test
3535
run: yarn test
3636

37+
job_native_link_check:
38+
name: Android Native Link Check
39+
runs-on: ubuntu-latest
40+
needs: [diff_check]
41+
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
42+
steps:
43+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
44+
- run: corepack enable
45+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
46+
with:
47+
package-manager-cache: false
48+
node-version: 18
49+
cache: 'yarn'
50+
cache-dependency-path: yarn.lock
51+
- name: Install Dependencies
52+
run: yarn install
53+
# Guards against regressing the #6398 fix: verifies libsentry-tm-perf-logger.so
54+
# still links for armeabi-v7a under --no-undefined when the reactnative prefab
55+
# reference is unresolved. Uses the runner's preinstalled NDK (ANDROID_NDK_LATEST_HOME).
56+
- name: Check libsentry-tm-perf-logger.so links (armeabi-v7a)
57+
run: ./scripts/check-tm-perf-logger-link.sh
58+
3759
job_lint:
3860
name: Lint
3961
runs-on: ubuntu-latest

.github/workflows/changelog-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ permissions:
1515

1616
jobs:
1717
changelog-preview:
18-
uses: getsentry/craft/.github/workflows/changelog-preview.yml@e724996ca4ee2ce84dc035eb407d4d6a4ecf8395 # v2.26.13
18+
uses: getsentry/craft/.github/workflows/changelog-preview.yml@cdb657d4bbc70cd497876ad158984b4d345a48ae # v2.26.14

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # pin@v4.36.2
47+
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # pin@v4.36.3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # pin@v4.36.2
58+
uses: github/codeql-action/autobuild@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # pin@v4.36.3
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -66,4 +66,4 @@ jobs:
6666
# make bootstrap
6767
# make release
6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # pin@v4.36.2
69+
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # pin@v4.36.3

.github/workflows/e2e-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ jobs:
509509

510510
- name: Run tests on Android
511511
if: ${{ steps.platform-check.outputs.skip != 'true' && matrix.platform == 'android' }}
512-
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # pin@v2.37.0
512+
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # pin@v2.38.0
513513
with:
514514
api-level: 30
515515
force-avd-creation: false

.github/workflows/native-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
sudo udevadm trigger --name-match=kvm
172172
173173
- name: Run connected tests
174-
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a #pin@v2.37.0
174+
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d #pin@v2.38.0
175175
with:
176176
working-directory: packages/core/RNSentryAndroidTester
177177
api-level: 30

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
cache-dependency-path: yarn.lock
4444

4545
- name: Prepare release
46-
uses: getsentry/craft@e724996ca4ee2ce84dc035eb407d4d6a4ecf8395 # v2
46+
uses: getsentry/craft@cdb657d4bbc70cd497876ad158984b4d345a48ae # v2
4747
env:
4848
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
4949
with:

.github/workflows/sample-application-expo.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,16 @@ jobs:
182182
- name: Build Android App
183183
working-directory: samples/expo/android
184184
env:
185-
# Increase memory for Expo SDK 55 lint tasks
185+
# Increase memory for Expo SDK 57 lint tasks
186186
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g"
187187
run: |
188188
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
189189
echo "Building $CONFIG"
190-
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
190+
# Build all ABIs (not just x86): the Sentry perf-logger native library is
191+
# compiled from source per ABI, and #6398 (armeabi-v7a link failure) was
192+
# reported on an Expo build. Keeps ABI coverage consistent with the bare
193+
# RN sample.
194+
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
191195
192196
- name: Export Expo
193197
working-directory: samples/expo

.github/workflows/sample-application.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
caller_ref: ${{ github.ref }}
4444

4545
build-ios:
46-
name: Build ${{ matrix.rn-architecture }} ios ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
46+
name: Build ${{ matrix.rn-architecture }} ios ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }} ${{ matrix.sentry-consumption }}
4747
runs-on: macos-26-xlarge
4848
needs: [diff_check, detect-changes]
4949
if: >-
@@ -60,6 +60,16 @@ jobs:
6060
rn-architecture: ["new"]
6161
ios-use-frameworks: ["no-frameworks"]
6262
build-type: ["dev", "production"]
63+
sentry-consumption: ["xcframework"]
64+
# `xcframework` is the default: RNSentry vendors a prebuilt
65+
# `Sentry-Dynamic.xcframework` downloaded from sentry-cocoa's release.
66+
# Keep a single CocoaPods job to catch regressions in the source-build
67+
# fallback (`SENTRY_USE_XCFRAMEWORK=0`).
68+
include:
69+
- rn-architecture: "new"
70+
ios-use-frameworks: "no-frameworks"
71+
build-type: "production"
72+
sentry-consumption: "cocoapods"
6373
steps:
6474
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
6575

@@ -95,6 +105,7 @@ jobs:
95105
[[ "${{ matrix.build-type }}" == "production" ]] && export ENABLE_PROD=1 || export ENABLE_PROD=0
96106
[[ "${{ matrix.rn-architecture }}" == "new" ]] && export ENABLE_NEW_ARCH=1 || export ENABLE_NEW_ARCH=0
97107
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic
108+
[[ "${{ matrix.sentry-consumption }}" == "cocoapods" ]] && export SENTRY_USE_XCFRAMEWORK=0
98109
99110
./scripts/pod-install.sh
100111
@@ -112,15 +123,18 @@ jobs:
112123
./scripts/build-ios.sh
113124
114125
- name: Archive iOS App
115-
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' }}
126+
# Only upload from the xcframework job (the default consumption path)
127+
# to avoid duplicate artifact names when the CocoaPods regression job
128+
# runs.
129+
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' && matrix.sentry-consumption == 'xcframework' }}
116130
working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }}
117131
run: |
118132
zip -r \
119133
${{ github.workspace }}/${{ env.IOS_APP_ARCHIVE_PATH }} \
120134
sentryreactnativesample.app
121135
122136
- name: Upload iOS APP
123-
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' }}
137+
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' && matrix.ios-use-frameworks == 'no-frameworks' && matrix.sentry-consumption == 'xcframework' }}
124138
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
125139
with:
126140
name: sample-rn-${{ matrix.rn-architecture }}-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-ios
@@ -131,7 +145,7 @@ jobs:
131145
if: ${{ always() }}
132146
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
133147
with:
134-
name: build-sample-${{ matrix.rn-architecture }}-ios-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-logs
148+
name: build-sample-${{ matrix.rn-architecture }}-ios-${{ matrix.build-type }}-${{ matrix.ios-use-frameworks}}-${{ matrix.sentry-consumption }}-logs
135149
path: ${{ env.REACT_NATIVE_SAMPLE_PATH }}/ios/*.log
136150

137151
build-android:
@@ -185,7 +199,31 @@ jobs:
185199
[[ "${{ matrix.build-type }}" == "production" ]] && export CONFIG='release' || export CONFIG='debug'
186200
187201
./scripts/set-dsn-aos.mjs
188-
./scripts/build-android.sh -PreactNativeArchitectures=x86
202+
# Split ABI coverage across the two matrix entries:
203+
# - `dev` → subset (arm64-v8a only) so we can assert the module
204+
# builds only the ABIs the app requested — the root
205+
# cause of #6398 was hardcoded abiFilters ignoring
206+
# `reactNativeArchitectures`.
207+
# - `production` → all four ABIs so the 16 KB alignment check below
208+
# runs across every ABI (guards against #6394).
209+
if [[ "${{ matrix.build-type }}" == "production" ]]; then
210+
./scripts/build-android.sh -PreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
211+
else
212+
./scripts/build-android.sh -PreactNativeArchitectures=arm64-v8a
213+
fi
214+
215+
- name: Check libsentry-tm-perf-logger.so honors reactNativeArchitectures
216+
if: ${{ matrix.build-type == 'dev' }}
217+
# Asserts the module packaged our .so for exactly the subset the app
218+
# requested — guards against regressing the #6398 root-cause fix.
219+
run: ./scripts/check-tm-perf-logger-abi-subset.sh ${{ env.REACT_NATIVE_SAMPLE_PATH }}/app.apk 'arm64-v8a'
220+
221+
- name: Check 16 KB native library alignment
222+
# Only Sentry-owned libraries are checked: third-party/React Native
223+
# libraries are aligned by their own build (RN ships arm64 at 16 KB but
224+
# x86 at 4 KB, and CI builds x86), so a whole-APK check is not
225+
# meaningful here. Guards against regressing #6394.
226+
run: ./scripts/check-android-16kb-alignment.sh ${{ env.REACT_NATIVE_SAMPLE_PATH }}/app.apk 'libsentry'
189227

190228
- name: Archive Android App
191229
if: ${{ matrix.rn-architecture == 'new' && matrix.build-type == 'production' }}
@@ -436,7 +474,7 @@ jobs:
436474
sudo udevadm trigger --name-match=kvm
437475
438476
- name: Run Android Tests on API ${{ env.ANDROID_API_LEVEL }}
439-
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # pin@v2.37.0
477+
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # pin@v2.38.0
440478
with:
441479
api-level: ${{ env.ANDROID_API_LEVEL }}
442480
# Pin the emulator binary: canary 37.1.6.0 (build 15726199) broke emulator

0 commit comments

Comments
 (0)