github-advanced-security[bot] commented on code in PR #18549:
URL:
https://github.com/apache/dolphinscheduler/pull/18549#discussion_r4193065490
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/executor/PhysicalTaskExecutor.java:
##########
@@ -91,6 +92,13 @@
@Override
protected TaskExecutorState doTrackTaskPluginStatus() {
+ if (physicalTask.getExitStatus() == TaskExecutionStatus.SUCCESS) {
+ // Synchronize the legacy needAlert/taskAlertInfo fields written
directly
+ // by AbstractTask subclasses into the context, so that the success
+ // lifecycle event carries the alert info of third-party plugins.
+ taskExecutionContext.setNeedAlert(physicalTask.getNeedAlert());
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [AbstractTask.getNeedAlert](1) should be avoided because it has
been deprecated.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/5866)
##########
dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/executor/PhysicalTaskExecutor.java:
##########
@@ -91,6 +92,13 @@
@Override
protected TaskExecutorState doTrackTaskPluginStatus() {
+ if (physicalTask.getExitStatus() == TaskExecutionStatus.SUCCESS) {
+ // Synchronize the legacy needAlert/taskAlertInfo fields written
directly
+ // by AbstractTask subclasses into the context, so that the success
+ // lifecycle event carries the alert info of third-party plugins.
+ taskExecutionContext.setNeedAlert(physicalTask.getNeedAlert());
+
taskExecutionContext.setTaskAlertInfo(physicalTask.getTaskAlertInfo());
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [AbstractTask.getTaskAlertInfo](1) should be avoided because it has
been deprecated.
[Show more
details](https://github.com/apache/dolphinscheduler/security/code-scanning/5867)
--
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]