You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2026/03/25 05:50:52 UTC
(spark-kubernetes-operator) branch main updated: [SPARK-56192] Exclude `spotbugs-annotations` from the uber jar
This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 9d5136a [SPARK-56192] Exclude `spotbugs-annotations` from the uber jar
9d5136a is described below
commit 9d5136a0bc6f5aa5d86e6bb590f6328ecf13150d
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Mar 24 22:50:44 2026 -0700
[SPARK-56192] Exclude `spotbugs-annotations` from the uber jar
### What changes were proposed in this pull request?
This PR changes `spotbugs-annotations` from `implementation` to `compileOnly` in `spark-operator/build.gradle` and adds it as `testImplementation` for test compilation.
```diff
$ ls -al spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
- -rw-r--r-- 1 dongjoon staff 140340193 Mar 23 11:52 spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
+ -rw-r--r-- 1 dongjoon staff 140326750 Mar 24 22:18 spark-operator/build/libs/spark-kubernetes-operator-0.9.0-SNAPSHOT-all.jar
```
### Why are the changes needed?
`spotbugs-annotations` is a static analysis annotation library (e.g., `SuppressFBWarnings`) that is only needed at compile time and has no runtime purpose. Keeping it as `implementation` causes it to be bundled into the uber JAR unnecessarily, increasing the final JAR size. Changing it to `compileOnly` excludes it from the shadow JAR output.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.6 1M)
Closes #581 from dongjoon-hyun/SPARK-56192.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
spark-operator/build.gradle | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/spark-operator/build.gradle b/spark-operator/build.gradle
index c276a8c..ebade5d 100644
--- a/spark-operator/build.gradle
+++ b/spark-operator/build.gradle
@@ -27,7 +27,7 @@ dependencies {
exclude group: 'io.fabric8'
}
implementation(libs.kubernetes.httpclient.vertx)
- implementation(libs.spotbugs.annotations)
+ compileOnly(libs.spotbugs.annotations)
// logging
implementation(libs.log4j.api)
implementation(libs.log4j.core)
@@ -73,6 +73,7 @@ dependencies {
testImplementation(libs.junit.jupiter)
testRuntimeOnly(libs.junit.platform.launcher)
+ testImplementation(libs.spotbugs.annotations)
testImplementation(libs.mockito.core)
testImplementation(libs.kube.api.test.client.inject)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org