rosemarYuan opened a new pull request, #954:
URL: https://github.com/apache/flink-agents/pull/954

   <!--
   * Thank you very much for contributing to Flink Agents.
   * Please add the relevant components in the PR title. E.g., [api], 
[runtime], [java], [python], [hotfix], etc.
   -->
   
   <!-- Please link the PR to the relevant issue(s). Hotfix doesn't need this. 
-->
   Linked issue: #953 
   
   ### Purpose of change
   
   The shaded Dist artifacts currently receive Log4j and SLF4J dependencies 
transitively from Plan, even though the default logging setup of the supported 
Flink distributions already provides Log4j2 and the SLF4J binding for 
JobManager and TaskManager processes.
   
   This can place different Log4j API and Core versions on the same runtime 
classpath and cause linkage errors such as `NoSuchMethodError`.
   
   This PR makes the logging dependency and packaging boundary explicit:
   
   - Keep `slf4j-api` as a normal Plan dependency so standalone Plan tools 
remain usable, but remove `log4j-core` and `log4j-slf4j-impl` from Plan.
   - Keep Runtime's Log4j dependencies as `provided` and align the compile-time 
Log4j version with 2.24.3, the version used by the oldest supported Flink 
distributions.
   - Exclude Log4j and SLF4J artifacts, classes, service metadata, and 
`log4j2.*` configuration files from all shaded Dist artifacts.
   - Add test-scoped Log4j dependencies for the E2E test JVM and align them 
with the selected Flink version: 2.24.3 for Flink 1.20 through 2.2 and 2.25.3 
for Flink 2.3.
   - Update `META-INF/NOTICE` so it no longer lists Log4j or SLF4J as bundled 
dependencies.
   
   After this change, Flink Agents uses the Log4j2 implementation provided by 
the default logging setup of the selected supported Flink distribution and no 
longer packages a second logging stack.
   
   ### Tests
   
   - [x] Built all common, full, and thin Dist artifacts for the supported 
Flink versions.
   - [x] Verified that the generated Dist JARs contain no Log4j or SLF4J 
classes, Log4j service metadata, or `log4j2.*` configuration files.
   - [x] Verified that the generated NOTICE files match the updated artifact 
contents.
   
   Full E2E and clean Flink deployment tests were not run locally.
   
   ### API
   
   No public API changes.
   
   ### Documentation
   
   <!-- Do not remove this section. Check the proper box only. -->
   
   - [ ] `doc-needed` <!-- Your PR changes impact docs -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-included` <!-- Your PR already contains the necessary 
documentation updates -->
   


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