davidradl commented on code in PR #26238:
URL: https://github.com/apache/flink/pull/26238#discussion_r1983495431


##########
flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java:
##########
@@ -246,7 +246,18 @@ public ClassLoader getUserCodeClassLoader() {
 
     /** Returns all provided libraries needed to run the program. */
     public List<URL> getJobJarAndDependencies() {
-        List<URL> libs = new ArrayList<URL>(extractedTempLibraries.size() + 1);
+        List<URL> libs = getJobJarAndDependencies(jarFile, 
extractedTempLibraries);
+
+        if (isPython) {
+            libs.add(PackagedProgramUtils.getPythonJar());
+        }
+
+        return libs;
+    }
+
+    private static List<URL> getJobJarAndDependencies(
+            URL jarFile, List<File> extractedTempLibraries) {
+        List<URL> libs = new ArrayList<>(extractedTempLibraries.size() + 1);

Review Comment:
   nit: I am curious why we initialize the list with a + 1. Is this in case we 
need to add the Python lib?
   If so, I  wonder if we should use `isPython` to allocate the correct size - 
ie. without Python we would not have the + 1.  



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to