Copilot commented on code in PR #9941:
URL: https://github.com/apache/gravitino/pull/9941#discussion_r2787004467


##########
spark-connector/v3.3/spark/build.gradle.kts:
##########
@@ -42,6 +42,15 @@ if (hasProperty("excludePackagesForSparkConnector")) {
   configureFunc?.invoke(project)
 }
 
+configurations.all {
+  resolutionStrategy {
+    // 1.7.36 is the latest version of slf4j 1.7.x, and log4j-slf4j-impl 
2.17.2 depends on it,
+    // we need to align the version to avoid conflicts.
+    force("org.slf4j:slf4j-api:1.7.36")
+  }
+  exclude(group = "org.apache.logging.log4j", module = "log4j-slf4j2-impl")
+}

Review Comment:
   `configurations.all { ... }` applies the SLF4J downgrade and Log4j exclusion 
to every configuration (including compile/publish/shadow ones), which can have 
broader impact than needed for an integration-test-only logging issue. Consider 
scoping this to just `testRuntimeClasspath`/`testCompileClasspath` (or 
whichever configuration is used by the failing 
`:spark-connector:spark-3.3:test`) to reduce risk of affecting the produced 
connector artifact’s dependency resolution.



##########
spark-connector/v3.3/spark/build.gradle.kts:
##########
@@ -42,6 +42,15 @@ if (hasProperty("excludePackagesForSparkConnector")) {
   configureFunc?.invoke(project)
 }
 
+configurations.all {
+  resolutionStrategy {
+    // 1.7.36 is the latest version of slf4j 1.7.x, and log4j-slf4j-impl 
2.17.2 depends on it,
+    // we need to align the version to avoid conflicts.
+    force("org.slf4j:slf4j-api:1.7.36")
+  }

Review Comment:
   The version pin `force("org.slf4j:slf4j-api:1.7.36")` hard-codes a version 
that differs from the repo’s version catalog (which pins SLF4J 2.x). For easier 
maintenance, consider extracting the version into a local constant and/or 
rewording the comment to avoid tying it to a specific Log4j binding version 
(e.g., “Spark 3.3 pulls an SLF4J 1.7 binding, so align slf4j-api to 1.7.x”).



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