Skip to content
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][Api] When use api to run a process we want get processInstanceId #13184

Merged
merged 34 commits into from
Jan 18, 2023

Conversation

qianli2022
Copy link
Contributor

Purpose of the pull request

If this ID is obtained, the user can track the states of the task by it. processId cannot be used because multiple jobs may be triggered.

Brief change log

  • Add TriggerRelationMapper
  • Add TriggerRelationService
  • Modify WorkflowExecuteRunnable

Verify this pull request

This change added tests and can be verified as follows:

  • Added dolphinscheduler-dao tests for end-to-end.
  • Added TriggerRelationServiceTest to verify the change.
  • Manually verified the change by testing locally.

close #12665

@github-actions github-actions bot removed the UI ui and front end related label Dec 14, 2022
@qianli2022 qianli2022 changed the title [Feature][Api] When use api to run a process we want get processInstanceId [feature][Api] When use api to run a process we want get processInstanceId Dec 14, 2022
@qianli2022 qianli2022 changed the title [feature][Api] When use api to run a process we want get processInstanceId [feature][api] When use api to run a process we want get processInstanceId Dec 14, 2022
@qianli2022 qianli2022 changed the title [feature][api] When use api to run a process we want get processInstanceId [Feature][Api] When use api to run a process we want get processInstanceId Dec 14, 2022
@caishunfeng caishunfeng added the feature new feature label Dec 14, 2022
@caishunfeng caishunfeng added the 3.2.0 for 3.2.0 version label Dec 14, 2022
@caishunfeng caishunfeng added this to the 3.2.0 milestone Dec 14, 2022
@EricGao888 EricGao888 self-requested a review December 17, 2022 15:26
@codecov-commenter
Copy link

codecov-commenter commented Dec 23, 2022

Codecov Report

Merging #13184 (6749b5e) into dev (3a6e103) will increase coverage by 0.00%.
The diff coverage is 70.68%.

@@            Coverage Diff            @@
##                dev   #13184   +/-   ##
=========================================
  Coverage     39.55%   39.56%           
- Complexity     4326     4335    +9     
=========================================
  Files          1084     1086    +2     
  Lines         40916    40969   +53     
  Branches       4697     4702    +5     
=========================================
+ Hits          16186    16210   +24     
- Misses        22927    22954   +27     
- Partials       1803     1805    +2     
Impacted Files Coverage Δ
.../dolphinscheduler/common/enums/ApiTriggerType.java 0.00% <0.00%> (ø)
.../server/master/runner/WorkflowExecuteRunnable.java 10.14% <0.00%> (-0.01%) ⬇️
...nscheduler/service/process/ProcessServiceImpl.java 30.24% <25.00%> (-0.02%) ⬇️
...cheduler/api/service/impl/ExecutorServiceImpl.java 47.50% <83.33%> (+0.28%) ⬆️
...r/api/service/impl/ProcessInstanceServiceImpl.java 60.40% <88.88%> (+0.52%) ⬆️
...uler/api/controller/ProcessInstanceController.java 69.56% <100.00%> (+1.38%) ⬆️
...er/service/process/TriggerRelationServiceImpl.java 100.00% <100.00%> (ø)
...r/plugin/registry/zookeeper/ZookeeperRegistry.java 43.54% <0.00%> (-7.26%) ⬇️
...erver/master/processor/queue/TaskEventService.java 75.00% <0.00%> (-5.36%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -241,4 +241,6 @@ void sendStartTask2Master(ProcessInstance processInstance, int taskId,
void forceProcessInstanceSuccessByTaskInstanceId(Integer taskInstanceId);

Integer queryTestDataSourceId(Integer onlineDataSourceId);

void saveCommandTrigger(Integer commandId, Integer processInstanceId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the commandDao? And then we can put the command operation into it.

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 25 Code Smells

75.7% 75.7% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@caishunfeng caishunfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version backend feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Api] When use api to run a process we want get processInstanceId
3 participants