henry3260 commented on code in PR #11977:
URL: https://github.com/apache/gravitino/pull/11977#discussion_r3570443102


##########
clients/client-python/build.gradle.kts:
##########
@@ -186,11 +186,21 @@ tasks {
     args = listOf("scripts/generate_version.py")
   }
 
-  val integrationTest by registering(VenvTask::class) {
-    doFirst {
+  val startGravitinoServer by registering {
+    doLast {
       gravitinoServer("start")
     }
+  }
+
+  val stopGravitinoServer by registering {
+    doLast {
+      gravitinoServer("stop")
+    }
+  }
 
+  val integrationTest by registering(VenvTask::class) {
+    dependsOn(startGravitinoServer)
+    finalizedBy(stopGravitinoServer)

Review Comment:
   > `finalizedBy` only runs if `integrationTest` itself is scheduled to 
execute. If `startGravitinoServer` (a `dependsOn`) fails — e.g. the server 
never comes up — `integrationTest` is skipped entirely and 
`stopGravitinoServer` never fires, leaving a partially-started server process 
orphaned. I verified this with a minimal Gradle repro (dependency task fails -> 
finalizer of the dependent task never runs). Not a regression vs. the old 
single-task version (same gap existed there), but it does mean this only covers 
_test_ failures, not _server-start_ failures — might be worth a note in the 
description, or also finalizing `startGravitinoServer` with the stop task.
   
   Good catch!



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