nielsbasjes commented on a change in pull request #11245:
URL: https://github.com/apache/flink/pull/11245#discussion_r441560978
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/configuration/KubernetesConfigOptions.java
##########
@@ -137,11 +138,17 @@
.withDescription("The cluster-id, which should be no more than
45 characters, is used for identifying " +
"a unique Flink cluster. If not set, the client will
automatically generate it with a random ID.");
+ // The default container image that ties to the exact needed versions
of both Flink and Scala.
+ public static final String DEFAULT_CONTAINER_IMAGE = "flink:" +
EnvironmentInformation.getVersion() + "-scala_" +
EnvironmentInformation.getScalaVersion();
+
public static final ConfigOption<String> CONTAINER_IMAGE =
key("kubernetes.container.image")
.stringType()
- .defaultValue("flink:latest")
- .withDescription("Image to use for Flink containers.");
+ .defaultValue(DEFAULT_CONTAINER_IMAGE)
+ .withDescription("Image to use for Flink containers. " +
+ "The specified image MUST be based upon Apache Flink " +
+ EnvironmentInformation.getVersion() + " that uses Scala
" + EnvironmentInformation.getScalaVersion() + " . " +
Review comment:
I was thinking about this and the main thing is handling version
difference between the flink runtime and the application flink libraries better.
Now I see two things that can be done to avoid this:
1) Avoid: By setting the right default docker image to use in Kubernetes
(this story). I think we should simply have a SNAPSHOT image too. I do this for
my own projects too https://hub.docker.com/r/nielsbasjes/yauaa/tags
2) Block: At runtime check the compatibility between the application and the
runtime. I agree this is a separate problem. I propose to make a new issue out
of that.
So this change is about the Avoid part, yet it turns out that there are for
each Flink version at least 2 distinct versions that are incompatible. For the
code this is fine as this is generated for each; the documentation is going to
'flip flop'.
So the real problem is that this default depends on the actual build using
the specific tooling version of the developer. The problem is that this has
more variations than the version of the project and this is reflected in the
documentation.
So really the actual default and the default in the documentation should be
different!
How can I do that? Because the table in the documentation should simply show
"2.12" as the default scala version; yet the actual code should have the REAL
scala version to be used as a default.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]