dongjoon-hyun commented on code in PR #974:
URL: 
https://github.com/apache/spark-kubernetes-operator/pull/974#discussion_r4338228398


##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/reconcilesteps/AppValidateStep.java:
##########
@@ -59,10 +59,12 @@ public ReconcileProgress reconcile(
       log.warn("Spark application found with empty status. Resetting to 
initial state.");
       return attemptStatusUpdate(context, statusRecorder, new 
ApplicationStatus(), proceed());
     }
-    if (isClientMode(app)) {
-      return failWith(context, statusRecorder, "Client mode is not supported 
yet.");
-    }
+    // Only before the driver of an attempt is requested. Otherwise, an 
application which failed the
+    // validation would be failed again on every reconciliation, and never 
cleaned up or deleted.

Review Comment:
   Thank you for the review, @peter-toth. You're right. On a failed write, 
`persistStatus` returns `false` and only the in-memory copy has the new state, 
while JOSDK passes a fresh clone of the cached resource to every `cleanup()`. 
So each `cleanup()` retries the same `appCancelled()` write, which is larger 
than the `Failed` entry. I added an item to `docs/migration_guide.md` as you 
suggested.
   



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


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

Reply via email to