Savonitar commented on code in PR #28995:
URL: https://github.com/apache/flink/pull/28995#discussion_r4159673116
##########
flink-dist/pom.xml:
##########
@@ -593,6 +593,26 @@ under the License.
<skip>true</skip>
</configuration>
</execution>
+ <execution>
+ <!-- Keep OkHttp/okio off the
core Flink distribution classpath. Metrics reporters that
+ bundle OkHttp declare
it as an optional (non-transitive) dependency and ship it shaded
+ inside their plugin
jar, so it never reaches this distribution tree. -->
+
<id>forbid-okhttp-on-core-classpath</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+
<bannedDependencies>
+
<excludes>
Review Comment:
Does this rule need an exception for the intellij profile?
https://github.com/MartijnVisser/flink/blob/440cd03cd163fc31125383ae8bd725688424f3a3/pom.xml#L997-L1007
##########
flink-kubernetes/pom.xml:
##########
@@ -75,10 +80,12 @@ under the License.
</exclusions>
</dependency>
- <!-- Since 7.0.0, Fabric8 uses Vert.x as its HTTP client, but
we want to use OkHttp to keep the same dependencies as used before this
version. -->
+ <!-- Since 7.0.0, Fabric8 uses Vert.x as its default HTTP
client. We use the built-in java.net.http (JDK)
+ client instead (see fabric8.httpclient.impl above),
which keeps OkHttp/okio/Kotlin off the classpath and
+ avoids pulling in Vert.x/Netty. -->
<dependency>
<groupId>io.fabric8</groupId>
- <artifactId>kubernetes-httpclient-okhttp</artifactId>
+
<artifactId>kubernetes-httpclient-${fabric8.httpclient.impl}</artifactId>
Review Comment:
Will this break existing SOCKS5 kubeconfigs? For an HTTPS API server with
`proxy-url: socks5://localhost:1080`, [Fabric8 loads the proxy
URL](https://github.com/fabric8io/kubernetes-client/blob/0d235f6616f488a55f7e77052e1a0c3edc4dd4f6/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/internal/KubeConfigUtils.java#L199-L204)
and [selects
`ProxyType.SOCKS5`](https://github.com/fabric8io/kubernetes-client/blob/0d235f6616f488a55f7e77052e1a0c3edc4dd4f6/kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/HttpClientUtils.java#L243-L279),
unless the API server is excluded by `NO_PROXY`. However,
[`JdkHttpClientBuilderImpl.build()` immediately
throws](https://github.com/fabric8io/kubernetes-client/blob/0d235f6616f488a55f7e77052e1a0c3edc4dd4f6/httpclient-jdk/src/main/java/io/fabric8/kubernetes/client/jdkhttp/JdkHttpClientBuilderImpl.java#L75-L80)
`"JDK HttpClient only support HTTP proxies"`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]