uranusjr commented on code in PR #75538:
URL: https://github.com/apache/airflow/pull/75538#discussion_r4463822456
##########
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:
Should the trigger path (line 110) also not raise CancellationException?
--
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]