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/27 22:34:36 UTC

(spark-kubernetes-operator) branch main updated: [SPARK-56267] Use `testCompileOnly` for `spotbugs-annotations` in `spark-operator`

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 6c03d58  [SPARK-56267] Use `testCompileOnly` for `spotbugs-annotations` in `spark-operator`
6c03d58 is described below

commit 6c03d580ea49f5b07d0ffce825ef19f18a1e702f
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Fri Mar 27 15:34:25 2026 -0700

    [SPARK-56267] Use `testCompileOnly` for `spotbugs-annotations` in `spark-operator`
    
    ### What changes were proposed in this pull request?
    
    This PR changes `spotbugs-annotations` dependency scope from `testImplementation` to `testCompileOnly` in `spark-operator` module.
    
    ### Why are the changes needed?
    
    `SuppressFBWarnings` annotation has `Retention(CLASS)` policy, meaning it is retained in the bytecode but not needed at runtime. Using `testCompileOnly` is the correct scope for such compile-time-only annotations, avoiding unnecessary runtime classpath pollution.
    
    ### 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 (Claude Opus 4.6 1M context)
    
    Closes #594 from dongjoon-hyun/SPARK-56267.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 spark-operator/build.gradle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spark-operator/build.gradle b/spark-operator/build.gradle
index 9672349..baf32fb 100644
--- a/spark-operator/build.gradle
+++ b/spark-operator/build.gradle
@@ -81,7 +81,7 @@ dependencies {
   testImplementation(libs.junit.jupiter)
   testRuntimeOnly(libs.junit.platform.launcher)
 
-  testImplementation(libs.spotbugs.annotations)
+  testCompileOnly(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