-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature][Master] Run single task in workflow instance #13103
Conversation
...heduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
Fixed
Show fixed
Hide fixed
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Fixed
Show fixed
Hide fixed
Set<String> taskCodesString = dag.getAllNodesList(); | ||
|
||
for (String taskCodeString : taskCodesString) { | ||
long taskCode = Long.parseLong(taskCodeString); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
...heduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ExecutorController.java
Fixed
Show fixed
Hide fixed
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Outdated
Show resolved
Hide resolved
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Outdated
Show resolved
Hide resolved
taskInstance = taskInstanceDao.findTaskByInstanceIdAndCode(processInstance.getId(), taskCode); | ||
} | ||
if (taskInstance == null) { | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add some warn log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not an anomaly. If some task failed in the last execution of the workflow, the downstream task will not create a task instance. And then, taskInstance
is null, we just ignore them.
.../src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java
Outdated
Show resolved
Hide resolved
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## dev #13103 +/- ##
============================================
+ Coverage 39.28% 39.37% +0.09%
- Complexity 4277 4292 +15
============================================
Files 1069 1069
Lines 40305 40425 +120
Branches 4633 4642 +9
============================================
+ Hits 15834 15919 +85
- Misses 22685 22712 +27
- Partials 1786 1794 +8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
...uler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
Fixed
Show fixed
Hide fixed
e315788
to
d1cc4d6
Compare
@labbomb @songjianet @Amy0104 Please help to review the code of front end, thanks |
@caishunfeng @ruanwenjun Please help to review the backend code, thanks |
d1cc4d6
to
d414f36
Compare
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@jieguangzhou Hello, may I ask what's the relation between this PR and #10117 ? Seems there are some stuff overlapping with each other. |
10177 runs from the workflow definition, while this pr runs from the workflow instance. Previously, if we runs a single task in 10177 and wanted to continue using that workflow instance to execute the next task, it was impossible. This PR solves this problem. |
Cool, thx for the explanation : ) |
Purpose of the pull request
close: #12978
Brief change log
UI
Workflow Instance
page, add three buttons if we Right-click the taskWorkflow Instance
page, if we save the workflow instance, will refresh instead of returning theworkflow instance list
page. (Because we can execute the task after editing the task definition directly)Backend
executeTask
to execute the taskVerify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(or)
If your pull request contain incompatible change, you should also add it to
docs/docs/en/guide/upgrede/incompatible.md