FrankYang0529 commented on code in PR #75538:
URL: https://github.com/apache/airflow/pull/75538#discussion_r4490620803


##########
java-sdk/sdk/src/main/kotlin/org/apache/airflow/sdk/execution/Task.kt:
##########
@@ -142,13 +144,15 @@ internal object TaskRunner {
         return TaskResult.failure(request.tiContext.shouldRetry)
       }
     return try {
-      val context = Context.from(request, taskDef)
+      val context = Context.from(request, taskDef, cancellation)
+      if (instance is StoppableTask) cancellation?.hold(instance, context)
       val decider = taskDef.decider
       if (decider == null) instance.execute(context, client) else 
decide(decider, taskDef, instance, context, client)
       TaskResult.success()
-    } catch (e: CancellationException) {
-      throw e // Let coroutine cancellation propagate so the task coroutine 
unwinds.

Review Comment:
   Yes, removed related code.



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