Skip to content

feat(core): Add OTA SDK version to native sdk.packages#6191

Merged
antonis merged 4 commits into
mainfrom
antonis/ota-sdk-version
May 20, 2026
Merged

feat(core): Add OTA SDK version to native sdk.packages#6191
antonis merged 4 commits into
mainfrom
antonis/ota-sdk-version

Conversation

@antonis
Copy link
Copy Markdown
Contributor

@antonis antonis commented May 20, 2026

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

When an OTA update (e.g. CodePush, Expo Updates) replaces the JS bundle, the runtime @sentry/react-native version can drift from the version baked into the native binary at build time.

This change passes the JS runtime SDK version to native during init. If it differs from the built-in version, an additional npm:@sentry/react-native:ota entry is added to sdk.packages with the actual runtime version. When versions match (the normal case), no extra entry is added.

💡 Motivation and Context

Closes #4385

OTA updates can cause native/JS SDK version misalignment, which may lead to unexpected behavior. Recording the actual JS version alongside the built-in one helps when debugging SDK issues — you can immediately see if an OTA mismatch is in play.

Improvement on #4380, which added the built-in version to sdk.packages.

💚 How did you test it?

  • Added unit test verifying sdkVersion is passed to native SDK during init
  • All 1412 existing tests pass
  • Lint, build, and circular dependency checks pass

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

  • Native integration tests to verify the OTA package appears in events when versions differ

…differ

Pass the JS runtime SDK version to native during init. When it differs
from the built-in version (indicating an OTA update changed the JS bundle),
add an extra `npm:@sentry/react-native:ota` entry to `sdk.packages` with
the actual runtime version.

Closes #4385

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • feat(core): Add OTA SDK version to native sdk.packages by antonis in #6191
  • feat(core): Expose addConsoleInstrumentationFilter by antonis in #6180
  • fix(core): Preserve Metro config object identity in serializer wrapper by antonis in #6188
  • feat(replay): Expose captureSurfaceViews option for Android Session Replay by antonis in #6175
  • chore(deps): update Sentry Android Gradle Plugin to v6.7.1 by github-actions in #6190
  • fix(core): Fix includeWebFeedback crash by stubbing browser wrapper modules by antonis in #6150
  • fix(core): Deduplicate native HTTP breadcrumbs by antonis in #6132
  • chore(deps): bump brace-expansion from 5.0.5 to 5.0.6 by dependabot in #6183
  • chore(deps): bump ws from 8.16.0 to 8.20.1 by dependabot in #6184
  • fix(ios): Use conditional import for SentrySwizzle.h by antonis in #6186
  • fix(ios): use framework-style import for SentrySwizzle.h by alwx in #6181
  • chore(deps): bump actions/create-github-app-token from 3.1.1 to 3.2.0 by dependabot in #6178
  • chore(deps): bump github/codeql-action from 4.35.4 to 4.35.5 by dependabot in #6176
  • chore(deps): bump getsentry/craft from 2.26.3 to 2.26.5 by dependabot in #6179
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.3 to 2.26.5 by dependabot in #6177
  • fix(core): Resolve expo CLI directly instead of using npx in sourcemap upload by antonis in #6155
  • feat(core): Surface textComponentNames option in Metro config by antonis in #6169
  • chore(deps): update Sentry Android Gradle Plugin to v6.7.0 by github-actions in #6153
  • Filter ExceptionsManager.reportException duplicates in app-start init by alwx in #6145
  • chore(deps): update JavaScript SDK to v10.53.1 by github-actions in #6139
  • feat(core): Enable autoInjectSentryLabel by default in Metro config by antonis in #6141
  • feat(core): Respect Mask boundaries when reading sentry-label by antonis in #6142
  • fix(android): Handle boolean values in JSON options converter by antonis in #6130
  • Multi-instance <TimeToInitialDisplay> / <TimeToFullDisplay> coordination; a multi-signal TTID/TTFD system by alwx in #6090

Plus 16 more


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 2471608

@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented May 20, 2026

@sentry review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ee19627. Configure here.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label May 20, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sentry
Copy link
Copy Markdown

sentry Bot commented May 20, 2026

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.11.1 (88) Release

⚙️ sentry-react-native Build Distribution Settings

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3853.94 ms 1229.36 ms -2624.58 ms
Size 5.15 MiB 6.68 MiB 1.53 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
1122a96+dirty 3823.10 ms 1218.64 ms -2604.46 ms
4b87b12+dirty 1212.90 ms 1222.09 ms 9.19 ms
8929511+dirty 1216.42 ms 1219.02 ms 2.60 ms
a0d8cf8+dirty 3842.33 ms 1212.40 ms -2629.93 ms
5c1e987+dirty 1204.30 ms 1222.15 ms 17.85 ms
6177334+dirty 3834.85 ms 1217.58 ms -2617.28 ms
7d6fd3a+dirty 1223.29 ms 1229.57 ms 6.28 ms
71abba0+dirty 3821.93 ms 1202.81 ms -2619.12 ms
3b6e9f9+dirty 3851.90 ms 1233.33 ms -2618.57 ms
2c735cc+dirty 1229.67 ms 1221.50 ms -8.17 ms

App size

Revision Plain With Sentry Diff
1122a96+dirty 5.15 MiB 6.68 MiB 1.53 MiB
4b87b12+dirty 3.38 MiB 4.77 MiB 1.39 MiB
8929511+dirty 3.38 MiB 4.80 MiB 1.42 MiB
a0d8cf8+dirty 5.15 MiB 6.67 MiB 1.51 MiB
5c1e987+dirty 3.38 MiB 4.73 MiB 1.35 MiB
6177334+dirty 5.15 MiB 6.68 MiB 1.53 MiB
7d6fd3a+dirty 3.38 MiB 4.77 MiB 1.39 MiB
71abba0+dirty 5.15 MiB 6.67 MiB 1.52 MiB
3b6e9f9+dirty 5.15 MiB 6.68 MiB 1.53 MiB
2c735cc+dirty 3.38 MiB 4.74 MiB 1.35 MiB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@antonis antonis marked this pull request as ready for review May 20, 2026 10:55
@github-actions
Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 411.46 ms 457.29 ms 45.83 ms
Size 48.30 MiB 53.54 MiB 5.24 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3817909+dirty 406.67 ms 416.58 ms 9.91 ms
4b87b12+dirty 421.82 ms 413.60 ms -8.22 ms
df5d108+dirty 527.06 ms 603.58 ms 76.52 ms
71abba0+dirty 496.54 ms 525.16 ms 28.63 ms
890d145+dirty 504.54 ms 491.55 ms -12.99 ms
23598c3+dirty 414.12 ms 426.24 ms 12.12 ms
44c8b3f+dirty 414.20 ms 457.28 ms 43.08 ms
3b6e9f9+dirty 442.70 ms 486.44 ms 43.74 ms
7ac3378+dirty 404.78 ms 439.84 ms 35.06 ms
1122a96+dirty 422.22 ms 464.33 ms 42.10 ms

App size

Revision Plain With Sentry Diff
3817909+dirty 43.75 MiB 48.08 MiB 4.33 MiB
4b87b12+dirty 43.75 MiB 48.14 MiB 4.39 MiB
df5d108+dirty 43.75 MiB 48.08 MiB 4.33 MiB
71abba0+dirty 48.30 MiB 53.49 MiB 5.19 MiB
890d145+dirty 43.75 MiB 48.14 MiB 4.39 MiB
23598c3+dirty 43.75 MiB 48.16 MiB 4.41 MiB
44c8b3f+dirty 48.30 MiB 53.46 MiB 5.15 MiB
3b6e9f9+dirty 48.30 MiB 53.54 MiB 5.23 MiB
7ac3378+dirty 43.75 MiB 48.13 MiB 4.37 MiB
1122a96+dirty 48.30 MiB 53.54 MiB 5.24 MiB

@github-actions
Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3828.16 ms 1220.53 ms -2607.63 ms
Size 5.15 MiB 6.68 MiB 1.53 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
1122a96+dirty 3839.17 ms 1219.23 ms -2619.93 ms
4b87b12+dirty 1199.49 ms 1199.78 ms 0.29 ms
8929511+dirty 1223.41 ms 1222.49 ms -0.92 ms
a0d8cf8+dirty 3826.15 ms 1213.12 ms -2613.03 ms
5c1e987+dirty 1208.43 ms 1220.72 ms 12.29 ms
6177334+dirty 3851.52 ms 1226.23 ms -2625.29 ms
7d6fd3a+dirty 1210.89 ms 1217.63 ms 6.74 ms
71abba0+dirty 3852.70 ms 1224.53 ms -2628.16 ms
3b6e9f9+dirty 3822.77 ms 1208.00 ms -2614.77 ms
2c735cc+dirty 1223.33 ms 1224.38 ms 1.04 ms

App size

Revision Plain With Sentry Diff
1122a96+dirty 5.15 MiB 6.68 MiB 1.53 MiB
4b87b12+dirty 3.38 MiB 4.77 MiB 1.39 MiB
8929511+dirty 3.38 MiB 4.80 MiB 1.42 MiB
a0d8cf8+dirty 5.15 MiB 6.67 MiB 1.51 MiB
5c1e987+dirty 3.38 MiB 4.73 MiB 1.35 MiB
6177334+dirty 5.15 MiB 6.68 MiB 1.53 MiB
7d6fd3a+dirty 3.38 MiB 4.77 MiB 1.39 MiB
71abba0+dirty 5.15 MiB 6.67 MiB 1.52 MiB
3b6e9f9+dirty 5.15 MiB 6.68 MiB 1.53 MiB
2c735cc+dirty 3.38 MiB 4.74 MiB 1.35 MiB

@github-actions
Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 412.40 ms 441.49 ms 29.09 ms
Size 48.30 MiB 53.54 MiB 5.24 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
71abba0+dirty 411.04 ms 453.67 ms 42.63 ms
2c735cc+dirty 435.20 ms 459.48 ms 24.28 ms
44c8b3f+dirty 492.13 ms 563.47 ms 71.34 ms
0d9949d+dirty 414.88 ms 428.68 ms 13.81 ms
3b6e9f9+dirty 442.39 ms 486.44 ms 44.05 ms
5c1e987+dirty 444.71 ms 475.13 ms 30.42 ms
4b87b12+dirty 356.23 ms 399.86 ms 43.63 ms
1122a96+dirty 510.16 ms 542.00 ms 31.84 ms
ef27341+dirty 519.02 ms 553.42 ms 34.40 ms
5569641+dirty 465.92 ms 532.22 ms 66.30 ms

App size

Revision Plain With Sentry Diff
71abba0+dirty 48.30 MiB 53.49 MiB 5.19 MiB
2c735cc+dirty 43.94 MiB 48.94 MiB 5.00 MiB
44c8b3f+dirty 48.30 MiB 53.46 MiB 5.15 MiB
0d9949d+dirty 43.94 MiB 48.99 MiB 5.05 MiB
3b6e9f9+dirty 48.30 MiB 53.54 MiB 5.23 MiB
5c1e987+dirty 43.94 MiB 48.94 MiB 5.00 MiB
4b87b12+dirty 43.94 MiB 49.00 MiB 5.06 MiB
1122a96+dirty 48.30 MiB 53.54 MiB 5.24 MiB
ef27341+dirty 48.30 MiB 53.54 MiB 5.24 MiB
5569641+dirty 48.30 MiB 53.48 MiB 5.18 MiB

@antonis antonis merged commit c151573 into main May 20, 2026
86 of 87 checks passed
@antonis antonis deleted the antonis/ota-sdk-version branch May 20, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add actual JS/RN version to native SDK packages.

3 participants