jiangxt2 commented on code in PR #13325:
URL: https://github.com/apache/gravitino/pull/13325#discussion_r4071524210
##########
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:
Thanks for the suggestion. I added a dedicated RayIcebergIT job to the
existing Python integration workflow, so it runs for matching source changes
and invokes :clients:client-python:rayIcebergIT with Python 3.12. The dedicated
task sets RAY_ICEBERG_IT_REQUIRED=true, so missing Ray or PyIceberg
dependencies fail the test instead of causing a skip; the regular Python
integration run retains its optional-dependency skip. The local task run passed
with 1 test run and 0 skipped.
--
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]