You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/01/22 20:46:46 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #31294: [SPARK-34202][SQL][TEST] Add ability to fetch spark release package from internal environment in HiveExternalCatalogVersionsSuite
dongjoon-hyun commented on a change in pull request #31294:
URL: https://github.com/apache/spark/pull/31294#discussion_r562901566
##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala
##########
@@ -237,17 +237,20 @@ class HiveExternalCatalogVersionsSuite extends SparkSubmitTestUtils {
}
object PROCESS_TABLES extends QueryTest with SQLTestUtils {
- val releaseMirror = "https://dist.apache.org/repos/dist/release"
+ val releaseMirror = sys.env.getOrElse("SPARK_RELEASE_MIRROR",
+ "https://dist.apache.org/repos/dist/release")
// Tests the latest version of every release line.
val testingVersions: Seq[String] = {
import scala.io.Source
val versions: Seq[String] = try {
- Source.fromURL(s"${releaseMirror}/spark").mkString
- .split("\n")
- .filter(_.contains("""<li><a href="spark-"""))
- .filterNot(_.contains("preview"))
- .map("""<a href="spark-(\d.\d.\d)/">""".r.findFirstMatchIn(_).get.group(1))
- .filter(_ < org.apache.spark.SPARK_VERSION)
+ Utils.tryWithResource(Source.fromURL(s"$releaseMirror/spark")) { htmlContent =>
Review comment:
Ya. Please revert from this PR and proceed in a separate PR. It's worth of it. Thanks.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org