Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-40022][YARN][TESTS] Ignore pyspark suites in YarnClusterSuite when python3 is unavailable #37454

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ import org.apache.spark.util.{Utils, YarnContainerInfoHelper}
@ExtendedYarnTest
class YarnClusterSuite extends BaseYarnClusterSuite {

private val pythonExecutablePath = {
private val (isPythonAvailable, pythonExecutablePath) = {
// To make sure to use the same Python executable.
val maybePath = TestUtils.getAbsolutePathFromExecutable("python3")
assert(maybePath.isDefined)
maybePath.get
TestUtils.getAbsolutePathFromExecutable("python3") match {
case Some(path) => (true, path)
case _ => (false, "")
}
}

override def newYarnConfig(): YarnConfiguration = new YarnConfiguration()
Expand Down Expand Up @@ -372,6 +373,7 @@ class YarnClusterSuite extends BaseYarnClusterSuite {
clientMode: Boolean,
extraConf: Map[String, String] = Map(),
extraEnv: Map[String, String] = Map()): Unit = {
assume(isPythonAvailable)
val primaryPyFile = new File(tempDir, "test.py")
Files.write(TEST_PYFILE, primaryPyFile, StandardCharsets.UTF_8)

Expand Down