liyinan926 commented on a change in pull request #23520: [SPARK-26603][K8s] 
Update minikube backend
URL: https://github.com/apache/spark/pull/23520#discussion_r248434903
 
 

 ##########
 File path: 
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/backend/minikube/Minikube.scala
 ##########
 @@ -38,12 +38,50 @@ private[spark] object Minikube extends Logging {
 
   def getMinikubeStatus: MinikubeStatus.Value = {
     val statusString = executeMinikube("status")
+    logInfo(s"Minikube status command output:\n$statusString")
+    // up to minikube version 0.30 use this to check for minikube status
+    val oldMinikube = statusString
       .filter(line => line.contains("minikubeVM: ") || 
line.contains("minikube:"))
-      .head
-      .replaceFirst("minikubeVM: ", "")
-      .replaceFirst("minikube: ", "")
-    MinikubeStatus.unapply(statusString)
+
+    if (oldMinikube.isEmpty) {
 
 Review comment:
   This code is a bit hard to read due to the multiple levels of nesting with 
`if-else` blocks. Can you put the code for the newer versions of Minikube into 
a separate method?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to