[improve][build] Remove kotlin-stdlib override; upgrade okhttp3 5.3.2 and okio 3.17.0#25855
Merged
lhotari merged 1 commit intoMay 22, 2026
Conversation
…p3 5.3.2 and okio 3.17.0 Closes apache#25763 The explicit kotlin-stdlib 1.8.20 override was added in PR apache#13065 to mitigate CVE-2020-29582, which only affects Kotlin < 1.4.21. With okhttp3 5.x and okio 3.x, the transitive kotlin-stdlib is already on a modern major (2.x), so the override is no longer needed and was pinning kotlin-stdlib to a version that is end-of-life. - okhttp3: 5.3.1 -> 5.3.2 (also resolves a 5.3.1/5.3.2 split where OpenTelemetry's opentelemetry-exporter-sender-okhttp 1.62.0 was bringing 5.3.2 transitively while the BOM forced 5.3.1) - okio: 3.16.3 -> 3.17.0 - Remove kotlin-stdlib version pin (now resolves to 2.2.21 via okio/okhttp transitive deps) - Remove jetbrains-annotations version pin (resolves naturally to 13.0 via kotlin-stdlib; not forced) - Drop explicit distLib declarations for kotlin-stdlib, kotlin-stdlib-common, and annotations in the server distribution build; they now flow in transitively. kotlin-stdlib-common is no longer published as a separate artifact in Kotlin 2.x. - Update LICENSE.bin.txt to reflect the new versions
nodece
approved these changes
May 22, 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.
Closes #25763
Motivation
The explicit
kotlin-stdlibversion override was added in PR #13065 to mitigate CVE-2020-29582, which only affects Kotlin< 1.4.21. With the recent upgrade tookhttp35.x andokio3.x, the transitivekotlin-stdlibis already on a modern major (2.x), so the override is no longer necessary. Worse, pinning to1.8.20was downgrading a transitive resolution that would naturally land on2.2.21, and1.8.20is itself out of support.While here, this also resolves a transitive version split:
opentelemetry-exporter-sender-okhttp:1.62.0was bringing inokhttp:5.3.2, but theokhttp-bom:5.3.1constraint forced it back down to5.3.1. Aligning the BOM to5.3.2removes the mismatch.org.jetbrains:annotationsis no longer pinned in the catalog either — it now resolves naturally to13.0as requested bykotlin-stdlib2.2.21 (not forced).Modifications
gradle/libs.versions.tomlokhttp3:5.3.1→5.3.2okio:3.16.3→3.17.0kotlin-stdlib = "1.8.20"version and catalog entry — resolves transitively to2.2.21via okio/okhttp.jetbrains-annotations = "13.0"— was unused outside the explicit dist declaration; resolves naturally to13.0viakotlin-stdlib.distribution/server/build.gradle.ktsdistLibentries forkotlin-stdlib,kotlin-stdlib-common, andorg.jetbrains:annotations. These now flow in transitively. (kotlin-stdlib-commonis no longer published as a separate JVM artifact in Kotlin 2.x — it is bundled intokotlin-stdlib.)distribution/server/src/assemble/LICENSE.bin.txtokhttp3-*,okio-jvm, andkotlin-stdlib.kotlin-stdlib-commonentry (no longer in the distribution).Affected transitive consumers verified compatible:
io.kubernetes:client-java:23.0.0(Pulsar Functions kubernetes runtime)io.opentelemetry:opentelemetry-exporter-sender-okhttp:1.62.0pulsar-broker-auth-oidc(direct usage)pulsar-brokerandpulsar-proxyThe contents of the built
apache-pulsar-*-bin.tar.gzwere inspected to confirm the new versions land inlib/:Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Local verification performed:
./gradlew :distribution:pulsar-server-distribution:checkBinaryLicense— passes./gradlew :distribution:pulsar-shell-distribution:checkBinaryLicense— passes./gradlew spotlessCheck— passeskotlin-stdlibis no longer forced to1.8.20and thatokhttp3/okioresolve to the aligned versions.Does this pull request potentially affect one of the following parts:
Documentation
no-need-doc