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] Clean up Scheduler logic #15198

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

ruanwenjun
Copy link
Member

Purpose of the pull request

  • Refactor scheduler code
  • Remove unused code

Brief change log

Verify 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

@ruanwenjun ruanwenjun added improvement make more easy to user or prompt friendly backend labels Nov 21, 2023
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_removeUnsedCode branch 3 times, most recently from 803a427 to 1381229 Compare November 22, 2023 06:53
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2023

Codecov Report

Attention: 118 lines in your changes are missing coverage. Please review.

Comparison is base (df656a7) 37.89% compared to head (a437bda) 37.93%.

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

Files Patch % Lines
...api/service/impl/ProcessDefinitionServiceImpl.java 15.55% 38 Missing ⚠️
...heduler/api/service/impl/SchedulerServiceImpl.java 0.00% 38 Missing ⚠️
...nscheduler/service/process/ProcessServiceImpl.java 6.66% 13 Missing and 1 partial ⚠️
...che/dolphinscheduler/api/python/PythonGateway.java 0.00% 11 Missing ⚠️
...er/api/service/impl/TaskDefinitionServiceImpl.java 12.50% 7 Missing ⚠️
...er/api/controller/ProcessDefinitionController.java 37.50% 4 Missing and 1 partial ⚠️
...i/service/impl/ProcessTaskRelationServiceImpl.java 16.66% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #15198      +/-   ##
============================================
+ Coverage     37.89%   37.93%   +0.03%     
+ Complexity     4661     4638      -23     
============================================
  Files          1281     1281              
  Lines         44861    44600     -261     
  Branches       4864     4814      -50     
============================================
- Hits          17000    16917      -83     
+ Misses        26004    25831     -173     
+ Partials       1857     1852       -5     

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

@Override
public void deleteOtherRelation(Project project, Map<String, Object> result, ProcessDefinition processDefinition) {

private void checkWorkflowIsNotEmpty(Long workflowDefinitionCode) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIP, I think it's better to check DAG dto.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added comment on this method, and will use another pr to add a public method for check if the dag is validated.

@caishunfeng caishunfeng changed the title Clean up Scheduler logic [Improvement] Clean up Scheduler logic Nov 22, 2023
…/api/service/impl/ProcessDefinitionServiceImpl.java

Co-authored-by: 旺阳 <wang@lqwang.net>
Copy link

sonarcloud bot commented Nov 24, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

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

13.3% 13.3% Coverage
0.7% 0.7% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

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

@caishunfeng caishunfeng merged commit 9c7ad6d into apache:dev Nov 24, 2023
52 of 53 checks passed
@ruanwenjun ruanwenjun deleted the dev_wenjun_removeUnsedCode branch December 2, 2023 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.3.0 backend improvement make more easy to user or prompt friendly ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants