Repository navigation
Fix duplicate SSE plugin installation in Ktor application helpers (#1079) - #1092
Conversation
There was a problem hiding this comment.
Looks good — the guards match the issue's expected fix and the regression tests cover all three scenarios, so this is approved.
Produced by Air Automations. Name: Code review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/409567ec-d3a7-40ac-ba95-8518ec577ac2?run=aa937596-498f-4cde-9fb7-816ea3c3b948
…encies, and improve endpoint handling. Clarify reuse of the `SSE` plugin in `KtorServer` documentation.
There was a problem hiding this comment.
Looks good — the guards reuse an existing SSE plugin exactly as the issue asked, and the new tests genuinely fail without them, so this is approved.
Produced by Air Automations. Name: Code review / Run: https://air.jetbrains.cloud/org/05cf1a7f-6ab5-713b-abd3-29d0c8a05e2d/automations/409567ec-d3a7-40ac-ba95-8518ec577ac2?run=0e1d110a-3cbc-45ab-aaaf-22b668f48284
Fixes #1079.
Summary
Application.mcpand the sharedApplication.mcpStreamableHttpsetup.The production change is one import and two guards. There are no public API changes.
Testing
Using JDK 21.0.12.1 and the repository's Gradle 9.8.0 wrapper:
./gradlew :kotlin-sdk-server:jvmTest --tests '*KtorExtensionsTest'ran 8 cases: the 3 duplicate-install regressions failed withDuplicatePluginException, and the other 5 passed../gradlew :kotlin-sdk-server:jvmTestpassed all 167 server JVM tests, with no failures or skips../gradlew :kotlin-sdk-server:ktlintCheckpassed../gradlew :kotlin-sdk-server:detektpassed, includingdetektMainJvm.git diff --checkpassed.Full
:kotlin-sdk-server:checkKotlinAbicould not complete in the validation environment: Kotlin/Native's MinGW dependency download (msys2-mingw-w64-x86_64-2.tar.gz) was blocked by an HTTP 403 from the environment proxy. The ABI result is therefore unverified and should be checked in CI. JS and Wasm compilation completed during the first ABI attempt; non-JVM runtime tests and the full repository build were not run.