ci(danger): Demote Android SDK version mismatch from fail to warn#6018
Merged
ci(danger): Demote Android SDK version mismatch from fail to warn#6018
Conversation
The check was introduced to prevent shipping a sentry-android version that differs from the one bundled by our pinned Sentry Android Gradle Plugin, since a mismatch causes an IllegalStateException crash when AGP autoInstallation is enabled. Following the documentation update in getsentry/sentry-docs#17349, React Native users are now explicitly told to set autoInstallation.enabled = false. Per internal discussion, users who opt into AGP are expected to follow the setup guide, so the footgun is no longer silent, and hard-failing the check unnecessarily couples RN SDK release cadence to gradle plugin release cadence. Downgrade to warn() so reviewers still see the mismatch, with an updated message pointing to the docs-based mitigation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
alwx
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Downgrade the Danger check in
scripts/check-android-sdk-mismatch.jsfromfail()towarn()when thesentry-androidversion inpackages/core/android/build.gradlediffers from the version bundled by the pinned Sentry Android Gradle Plugin (AGP).The message is also updated to reflect that the crash is conditional on AGP
autoInstallationbeing enabled, and to point reviewers at the docs-based mitigation rather than treating the mismatch as a guaranteed crash.💡 Motivation and Context
The check was originally added as a hard fail because an
IllegalStateException: Sentry SDK has detected a mix of versionscrash can occur at app startup when AGP'sautoInstallation(default:true) pulls in a differentsentry-androidversion than the one shipped by@sentry/react-native.Since then, the docs have been updated to explicitly instruct React Native users to disable
autoInstallationin theirandroid/app/build.gradle:IllegalStateException.Per internal discussion, adding AGP to a React Native app is an explicit opt-in step, and users performing that step are expected to follow the setup guide — which now prominently instructs them to set
autoInstallation.enabled = false. In that world, a version mismatch between our bundledsentry-androidand the version AGP would auto-install is no longer a guaranteed crash: it only affects users who both opt into AGP and ignore the documented configuration.Keeping the check as
fail()couples RN SDK release cadence to gradle plugin release cadence (we couldn't bumpsentry-androiduntil a matching AGP release shipped), without providing meaningful additional protection over the docs. Demoting towarn()preserves reviewer visibility while unblocking dependency bumps.💚 How did you test it?
warn()with a⚠️icon, so the mismatch branch is now visually and behaviorally consistent with them.📝 Checklist
sendDefaultPIIis enabled🔮 Next steps