gaogaotiantian commented on code in PR #54350: URL: https://github.com/apache/spark/pull/54350#discussion_r2824129427
########## python/pyspark/tests/test_install_spark.py: ########## @@ -29,10 +31,19 @@ class SparkInstallationTestCase(unittest.TestCase): + def get_latest_spark_version(self): + url = "https://spark.apache.org/releases/" Review Comment: ```python def get_preferred_mirrors(): mirror_urls = [] for _ in range(3): try: response = urllib.request.urlopen( "https://www.apache.org/dyn/closer.lua?preferred=true", timeout=10 ) mirror_urls.append(response.read().decode("utf-8")) except Exception: # If we can't get a mirror URL, skip it. No retry. pass default_sites = [ "https://dlcdn.apache.org/", "https://archive.apache.org/dist", "https://dist.apache.org/repos/dist/release", ] return list(set(mirror_urls)) + [x for x in default_sites if x not in mirror_urls] ``` This is in the actual pyspark code and it's pretty hard-coded. The newly added code is part of the testing code. I'm open to any way for us to find "what's the latest version of spark". Otherwise we just need to constantly updating this test (which is really hard-coded to `3.5.7` specifically) every time we release a new version. -- 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]
