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

 ##########
 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) {
+      if (statusString.length != 4) {
+        return MinikubeStatus.NONE
+      }
+
+      val hostString = statusString.find(_.contains("host: "))
 
 Review comment:
   Looks like you can define constants for the various string literals here as 
they are used more than once.

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