Skip to content

Conversation

runningcode
Copy link
Contributor

@runningcode runningcode commented Oct 10, 2025

Summary

This PR:

  1. Adds support for the build_configuration parameter in the Android distribution check-for-updates API
  2. Fixes response parsing to use snake_case to match the actual backend responses
  3. Adds toString() methods for easier debugging

#skip-changelog since this is for an unreleased feature

…esponse parsing

- Add required buildConfiguration parameter to UpdateCheckParams
- Update checkForUpdates to include build_configuration query parameter
- Add debug logging to print full URL for debugging
- Fix response parser to use correct backend format (update object instead of updateAvailable boolean)
- Fix response parser to use snake_case field names to match backend API
- Add toString methods to UpdateInfo and UpdateStatus classes for better debugging
- Update all tests to match new response format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

github-actions bot commented Oct 10, 2025

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

Generated by 🚫 dangerJS against f99fefe

@runningcode runningcode requested a review from chromy October 10, 2025 15:01
@runningcode runningcode changed the title feat(android-distribution): Add build_configuration support and fix response parsing feat(android-distribution): Add build_configuration support and use snake_case for parsing responses Oct 10, 2025
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Oct 10, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 316.14 ms 417.52 ms 101.38 ms
Size 1.58 MiB 2.11 MiB 539.19 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
3d205d0 352.15 ms 432.53 ms 80.38 ms
bdbe1f4 380.66 ms 464.44 ms 83.78 ms
9fbb112 359.71 ms 421.85 ms 62.14 ms
ee747ae 386.94 ms 431.43 ms 44.49 ms
3998a95 415.94 ms 478.54 ms 62.60 ms
14ff5ee 419.75 ms 495.73 ms 75.98 ms
ee747ae 554.98 ms 611.50 ms 56.52 ms
b750b96 408.98 ms 480.32 ms 71.34 ms
c8125f3 397.65 ms 485.14 ms 87.49 ms
b750b96 421.25 ms 444.09 ms 22.84 ms

App size

Revision Plain With Sentry Diff
3d205d0 1.58 MiB 2.10 MiB 532.97 KiB
bdbe1f4 1.58 MiB 2.11 MiB 538.88 KiB
9fbb112 1.58 MiB 2.11 MiB 539.18 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
3998a95 1.58 MiB 2.10 MiB 532.96 KiB
14ff5ee 1.58 MiB 2.10 MiB 535.08 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
b750b96 1.58 MiB 2.10 MiB 533.19 KiB
c8125f3 1.58 MiB 2.10 MiB 532.32 KiB
b750b96 1.58 MiB 2.10 MiB 533.20 KiB

Previous results on branch: no/add-build-configuration-support

Startup times

Revision Plain With Sentry Diff
fc31911 371.68 ms 452.06 ms 80.38 ms

App size

Revision Plain With Sentry Diff
fc31911 1.58 MiB 2.11 MiB 539.18 KiB

Copy link
Contributor

@chromy chromy left a comment

Choose a reason for hiding this comment

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

Lgtm! Thanks 😊

@runningcode runningcode enabled auto-merge (squash) October 13, 2025 10:40
Copy link

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

Bug: API Validation Error Naming Mismatch

The validation error messages for missing fields still reference camelCase names like buildVersion, but the parser now expects snake_case names such as build_version. This mismatch can make debugging API response issues confusing.

sentry-android-distribution/src/main/java/io/sentry/android/distribution/UpdateResponseParser.kt#L66-L74

}
if (buildVersion.isEmpty() || buildVersion == "null") {
missingFields.add("buildVersion")
}
if (downloadUrl.isEmpty() || downloadUrl == "null") {
missingFields.add("downloadUrl")
}
if (missingFields.isNotEmpty()) {

Fix in Cursor Fix in Web


@runningcode runningcode merged commit 33d9ad1 into main Oct 13, 2025
60 of 62 checks passed
@runningcode runningcode deleted the no/add-build-configuration-support branch October 13, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants