Sxnan commented on issue #751:
URL: https://github.com/apache/flink-agents/issues/751#issuecomment-4655522328

   Took a look while reviewing. The observation that only the thin JAR is 
copied is correct, but I think the right fix may be to drop this copy step for 
the Python path rather than add the common JAR alongside it.
   
   `AgentsExecutionEnvironment.get_execution_environment(env=...)` already 
calls `env.add_jars(...)` for both the common and thin JARs 
([execution_environment.py:139–164](https://github.com/apache/flink-agents/blob/main/python/flink_agents/api/execution_environment.py#L139-L164)).
 PyFlink's `add_jars` injects them into the client-side py4j JVM context 
classloader AND into `pipeline.jars` for JM/TM user-code classloader 
(child-first). Verified against a clean PyFlink install (no flink-agents JARs 
in `pyflink/lib/`): both a thin-JAR probe class and a common-JAR probe class 
are unreachable before the call and reachable after. So nothing in 
`$FLINK_HOME/lib/` is needed for Python users.
   
   Copying the common JAR into `$FLINK_HOME/lib/` would also push all 
integration deps (AWS / OpenAI / Anthropic / Milvus / ES / OpenSearch / Azure / 
MCP …) — no relocation — into the system classloader, enlarging the dependency 
conflict surface for every user job, including ones that don't touch those 
integrations.
   
   Will send a PR shortly that scopes this step to the Java-only path.


-- 
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]

Reply via email to