Admaing commented on PR #18667:
URL: 
https://github.com/apache/dolphinscheduler/pull/18667#issuecomment-6463642553

   All three are addressed in 2db86ce8.
   
   1.Client termination failures are propagated. 
AbstractCommandExecutor.cancelApplication() now raises a TaskException when 
ProcessUtils.kill() fails, instead of only logging it; FlinkTask keeps it and 
fails the stop with "Failed to stop the flink client or its application, the 
task may still have running jobs". The jobs already known are still attempted 
(leaving them running would be worse), but the incomplete snapshot is never 
reported as final. The failure also reaches the worker kill RPC, which returns 
a failed response to the master. Tests: 
FlinkTaskTest#testCancelApplicationFailsWhenTheClientCannotBeStopped, 
AbstractCommandExecutorTest#testCancelApplicationPropagatesTheProcessTreeKillFailure.
   
   2.An undrained submission output is a failure. The 2s wait now throws 
(requireSubmissionOutputCollected) instead of warning, and is reported after 
the known jobs were attempted. An unreadable task log no longer means "nothing 
to cancel": getFlinkJobSubmissions() and countPendingSynchronousSubmissions() 
propagate the read error. Tests: 
#testCancelApplicationFailsWhenTheSubmissionOutputIsNotCollected, 
#testCancelApplicationFailsWhenTheTaskLogCannotBeRead.
   
   3.Resource-manager failures are propagated. ProcessUtils.cancelApplication() 
rethrows the application-manager failure as a TaskException instead of 
swallowing it; AbstractCommandExecutor combines it with the kill failure. Since 
flink cancel accepts no -yid, the CLI cannot serve as a fallback for a YARN 
job, so the failure is reported rather than hidden by the application id. 
Tests: 
ProcessUtilsTest#testCancelApplicationPropagatesTheResourceManagerFailure, 
AbstractCommandExecutorTest#testCancelApplicationPropagatesTheApplicationCancellationFailure
 and #testCancelApplicationKeepsBothFailures.
   
   Also, the descendant-process test no longer requires the process tree to be 
gone the moment the command returns (bounded wait of 15s); it was flaky on 
macOS.
   


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