srowen commented on a change in pull request #25599: [SPARK-28886][K8S] Fix the
DepsTestsSuite with minikube 1.3.1
URL: https://github.com/apache/spark/pull/25599#discussion_r318784930
##########
File path:
resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/DepsTestsSuite.scala
##########
@@ -224,9 +224,20 @@ private[spark] trait DepsTestsSuite { k8sSuite:
KubernetesSuite =>
}
private def getServiceUrl(serviceName: String): String = {
+ val fuzzyUrlMatcher = """^(.*?)([a-zA-Z]+://.*?)(\s*)$""".r
Eventually.eventually(TIMEOUT, INTERVAL) {
// ns is always available either random or provided by the user
- Minikube.minikubeServiceAction(serviceName, "-n",
kubernetesTestComponents.namespace, "--url")
+ val rawUrl = Minikube.minikubeServiceAction(
+ serviceName, "-n", kubernetesTestComponents.namespace, "--url")
+ val url = rawUrl match {
+ case fuzzyUrlMatcher(junk, url, extra) =>
+ logDebug(s"Service url matched junk ${junk} - url ${url} - extra
${extra}")
+ url
+ case _ =>
+ logWarning(s"Response from minikube ${rawUrl} did not match URL
regex")
+ rawUrl
Review comment:
Out of curiosity what does the minikube command return for you? wondering if
it's something that varies by version or we have a problem with the command
outputting extra stuff. Seems like it intends to only return a URL.
----------------------------------------------------------------
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.
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]