You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2026/09/16 17:59:00 UTC

[jira] [Created] (FLINK-40687) flink-model shade relocations do not match, okhttp and kotlin ship unrelocated

Martijn Visser created FLINK-40687:
--------------------------------------

             Summary: flink-model shade relocations do not match, okhttp and kotlin ship unrelocated
                 Key: FLINK-40687
                 URL: https://issues.apache.org/jira/browse/FLINK-40687
             Project: Flink
          Issue Type: Bug
          Components: Library / Machine Learning
            Reporter: Martijn Visser


Both {{flink-models}} poms relocate {{com.squareup}}, and {{flink-model-openai}} also relocates
{{org.apache.httpcomponents}}. Neither pattern matches anything: those are Maven groupIds, not Java
packages. OkHttp and Okio are {{okhttp3.*}} and {{okio.*}}, and httpclient5 is {{org.apache.hc.*}}.

The result is that both jars ship {{okhttp3}} (335 classes), {{okio}} (153) and {{kotlin}} (1360 in
triton, 3381 in openai) in the default namespace, along with {{org.jetbrains}}, and openai also
ships {{com.openai}}, {{io.swagger}} and {{com.github.victools}} there. Only
{{com.fasterxml.jackson}} is actually relocated. A user with their own OkHttp or Kotlin on the
classpath gets a conflict.

The same applies to the {{META-INF/versions/(\d+)/com/squareup/}} rawString workaround next to it.

While we are in there, {{flink-model-triton}} resolves {{kotlin-stdlib}}, {{-jdk7}} and {{-jdk8}} at
1.8.21 but {{kotlin-stdlib-common}} at 1.9.10, and since Kotlin 1.8 the {{-jdk7}} and {{-jdk8}} jars
hold nothing but a module descriptor, which FLINK-40145 now strips. They contribute zero bytes and
can be excluded outright, which also removes two NOTICE lines that correspond to nothing.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)