Skip to content

test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite - #6520

Open
adinauer wants to merge 1 commit into
fix/ktor-inline-attribute-keyfrom
test/ktor-300-runtime-compatibility
Open

adinauer wants to merge 1 commit into
fix/ktor-inline-attribute-keyfrom
test/ktor-300-runtime-compatibility

Conversation

@adinauer

@adinauer adinauer commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Ktor 3.6)


📜 Description

Add a testKtor300 JVM test suite that recompiles the existing Ktor client tests against Ktor 3.0.0 and runs them with the complete Ktor 3.0.0 runtime dependency graph.

The production integration remains compiled against the catalog's Ktor 3.6.1 version. The compatibility suite is attached to check and exercises those production classes through a real Ktor Java client and local MockWebServer.

💡 Motivation and Context

Kotlin inline APIs can embed references to dependency internals in the compiled SDK classes. The regular test suite only verifies the current Ktor version, so it would not detect a reference that is unavailable in the oldest supported Ktor 3 runtime.

Compiling the compatibility test sources against Ktor 3.0.0 also ensures the test application uses Ktor 3.0's normal transitive dependencies, including coroutines 1.9.0, instead of accidentally retaining the latest runtime graph.

💚 How did you test it?

  • Ran ./gradlew spotlessApply updateKotlinAbi
  • Ran ./gradlew :sentry-ktor-client:check; the 32 tests passed with both Ktor 3.6.1 and Ktor 3.0.0
  • Verified dependency resolution selects ktor-client-core:3.0.0 and kotlinx-coroutines-core:1.9.0 for the compatibility suite
  • Temporarily restored the original inline AttributeKey implementation and confirmed testKtor300 fails with the expected TypeInfo(KClass, boolean, KType) NoSuchMethodError

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the 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.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Compile the production integration against the catalog Ktor version
while compiling and running the existing tests against Ktor 3.0.0.

Add the compatibility suite to check so inline API binary
incompatibilities fail CI.
@sentry

sentry Bot commented Nov 9, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.63.0 (1) release

⚙️ sentry-android Build Distribution Settings

@adinauer
adinauer marked this pull request as ready for review November 9, 2026 13:53
@adinauer
adinauer requested a review from a team as a code owner November 9, 2026 13:53
@adinauer
adinauer requested review from 0xadam-brown and runningcode and removed request for a team November 9, 2026 13:53

This branch has not been deployed

No deployments
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.

1 participant