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

[Improvement-15603][API] When removing or modifying a workflow the system can check if there any tasks depend on it. #15681

Merged
merged 19 commits into from Mar 10, 2024

Conversation

calvinjiang
Copy link
Contributor

Purpose of the pull request

This PR will close #15603 .

Brief change log

Verify this pull request

This change added tests and can be verified as follows:

  • Manually verified the change by testing locally.

The test results are as follows:

image
image

image
image

image

image
image

@github-actions github-actions bot added UI ui and front end related backend labels Mar 7, 2024
@calvinjiang calvinjiang added this to the 3.2.2 milestone Mar 7, 2024
@calvinjiang calvinjiang added improvement make more easy to user or prompt friendly 3.2.2 ready-to-merge labels Mar 7, 2024
})
@GetMapping(value = "/query-dependent-tasks")
@ResponseStatus(HttpStatus.OK)
public Result<Map<String, Object>> queryDownstreamDependentTaskList(@Parameter(hidden = true) @RequestAttribute(value = SESSION_USER) User loginUser,

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'loginUser' is never used.
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 27.27273% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 38.96%. Comparing base (e3fdb1a) to head (e7831dd).

❗ Current head e7831dd differs from pull request most recent head 5a7c99c. Consider uploading reports for the commit 5a7c99c to get more accurate results

Files Patch % Lines
...r/api/service/impl/WorkFlowLineageServiceImpl.java 0.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15681      +/-   ##
============================================
- Coverage     38.96%   38.96%   -0.01%     
- Complexity     4838     4840       +2     
============================================
  Files          1316     1316              
  Lines         45000    45010      +10     
  Branches       4817     4818       +1     
============================================
+ Hits          17535    17538       +3     
- Misses        25568    25576       +8     
+ Partials       1897     1896       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 155 to 158
} catch (Exception e) {
log.error(QUERY_WORKFLOW_LINEAGE_ERROR.getMsg(), e);
return error(QUERY_WORKFLOW_LINEAGE_ERROR.getCode(), QUERY_WORKFLOW_LINEAGE_ERROR.getMsg());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend using @ApiException annotation for this part of the code.

/**
* Check if there're any tasks that depend on the process
*/
private void checkIfDependentTaskExists(ProcessDefinition processDefinition) {
Copy link
Contributor

Choose a reason for hiding this comment

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

no called.

Comment on lines 89 to 94
// const dependenciesData = reactive({
// showRef: false,
// taskLinks: ref([]),
// required: ref(false),
// tip: ref(''), action: () => {}
// })
Copy link
Contributor

Choose a reason for hiding this comment

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

Please delete this part.

Copy link
Member

@songjianet songjianet left a comment

Choose a reason for hiding this comment

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

Please delete introduced but unused variables

zhuangchong
zhuangchong previously approved these changes Mar 8, 2024
Copy link
Contributor

@zhuangchong zhuangchong left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Member

@songjianet songjianet left a comment

Choose a reason for hiding this comment

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

image

Copy link

sonarcloud bot commented Mar 9, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
23.1% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

@songjianet songjianet merged commit c61b81e into apache:dev Mar 10, 2024
55 of 58 checks passed
@qingwli
Copy link
Member

qingwli commented Mar 11, 2024

@SbloodyS
Copy link
Member

Looks like check https://github.com/apache/dolphinscheduler/actions/runs/8215624741/job/22469292085 not pass @calvinjiang @songjianet

It's odd that dolphinscheduler-api module build passed...

@SbloodyS
Copy link
Member

Maybe the command npm install pnpm@7 -g install an incompatible version of pnpm in

run: |
npm install pnpm@7 -g
pnpm install
pnpm run lint
pnpm run build:prod

PTAL @songjianet

@qingwli
Copy link
Member

qingwli commented Mar 12, 2024

Looks like some code format issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.2 backend improvement make more easy to user or prompt friendly ready-to-merge UI ui and front end related
Projects
None yet
6 participants