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 dcb3aec  [SPARK-55486] Fix 
`StatusRecorder.patchAndStatusWithVersionLocked` not to log errors
dcb3aec is described below

commit dcb3aec06145a7839533765d1d06eb86e9d34eff
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Feb 12 08:16:34 2026 -0800

    [SPARK-55486] Fix `StatusRecorder.patchAndStatusWithVersionLocked` not to 
log errors
    
    ### What changes were proposed in this pull request?
    
    This PR aims to fix `StatusRecorder.patchAndStatusWithVersionLocked` not to 
log errors.
    
    ### Why are the changes needed?
    
    The upper layer already shows the error properly like the following. So, we 
had better avoid repeating the same exception log.
    
    
https://github.com/apache/spark-kubernetes-operator/blob/bdbbbbe5725e619c6bdd79ddc7bc8c11ee156c7c/spark-operator/src/main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java#L132-L141
    
    ### Does this PR introduce _any_ user-facing change?
    
    No behavior change because this is a removal of duplicated log.
    
    ### How was this patch tested?
    
    Pass the CIs.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #496 from dongjoon-hyun/SPARK-55486.
    
    Authored-by: Dongjoon Hyun <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java
 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java
index d7d2647..df97433 100644
--- 
a/spark-operator/src/main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java
+++ 
b/spark-operator/src/main/java/org/apache/spark/k8s/operator/utils/StatusRecorder.java
@@ -93,7 +93,7 @@ public class StatusRecorder<
       return;
     }
 
-    Exception err = null;
+    KubernetesClientException err = null;
     long maxRetry = API_STATUS_PATCH_MAX_ATTEMPTS.getValue();
     for (long i = 1; i <= maxRetry; i++) {
       // We retry the status update maxRetry times to avoid some intermittent 
connectivity errors
@@ -110,7 +110,6 @@ public class StatusRecorder<
     }
 
     if (err != null) {
-      log.error("Fail to patch status.", err);
       throw err;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to