yuqi1129 commented on code in PR #13325:
URL: https://github.com/apache/gravitino/pull/13325#discussion_r4069961893


##########
clients/client-python/build.gradle.kts:
##########
@@ -226,6 +226,66 @@ tasks {
     environment = envMap
   }
 
+  val rayIcebergPythonVersion = 
project.rootProject.extra["pythonVersion"].toString()
+  val rayIcebergOsDir = when {
+    org.gradle.internal.os.OperatingSystem.current().isMacOsX -> "MacOSX"
+    org.gradle.internal.os.OperatingSystem.current().isLinux -> "Linux"
+    else -> throw GradleException("Ray Iceberg IT only supports macOS and 
Linux")
+  }
+  val rayIcebergMiniforgeDir =
+    
project.file("${project.rootDir}/.gradle/python/$rayIcebergOsDir/Miniforge3")
+  val rayIcebergCondaExecutable = rayIcebergMiniforgeDir.resolve("bin/conda")
+  val rayIcebergEnvDir =
+    project.layout.buildDirectory.dir("ray-iceberg-it-env").get().asFile
+  val rayIcebergPythonExecutable = rayIcebergEnvDir.resolve("bin/python")
+
+  val rayIcebergDependencies by registering {
+    group = "verification"
+    description = "Install the dependencies for the Ray Iceberg IT."
+    dependsOn("miniforgeSetup")
+    doLast {
+      if (!rayIcebergPythonExecutable.exists()) {
+        project.exec {
+          executable = rayIcebergCondaExecutable.absolutePath
+          args = listOf(
+            "create", "--prefix", rayIcebergEnvDir.absolutePath,
+            "python=$rayIcebergPythonVersion", "--yes"
+          )
+        }
+      }
+      project.exec {
+        executable = rayIcebergPythonExecutable.absolutePath
+        workingDir = projectDir
+        args = listOf(
+          "-m", "pip", "install", "-e", ".", "-r", 
"requirements-ray-iceberg.txt"
+        )
+      }
+      project.exec {
+        executable = rayIcebergPythonExecutable.absolutePath
+        workingDir = projectDir
+        args = listOf("scripts/generate_version.py")
+      }
+    }
+  }
+
+  register("rayIcebergIT") {

Review Comment:
   Could we run `rayIcebergIT` in a CI or scheduled workflow? The current 
Python CI calls `:clients:client-python:test`, not this task, and 
`test_ray_iceberg.py` skips when PyIceberg is unavailable. As a result, a green 
Python CI run does not exercise the new Ray/Iceberg REST contract. It would 
also help to make this dedicated task fail if its test is skipped, so a 
dependency/import problem cannot produce a false green run.



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

Reply via email to