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][API] Support to check if the worker group has been used by any tasks or schedulers when users delete or rename it. #14893

Merged
merged 9 commits into from
Sep 13, 2023

Conversation

calvinjiang
Copy link
Contributor

Purpose of the pull request

This PR will close #14864 .

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

@calvinjiang calvinjiang added 3.2.0 for 3.2.0 version and removed backend labels Sep 11, 2023
@calvinjiang calvinjiang added this to the 3.2.1 milestone Sep 11, 2023
@calvinjiang calvinjiang added improvement make more easy to user or prompt friendly backend 3.2.1 ready-to-merge and removed 3.2.0 for 3.2.0 version labels Sep 11, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2023

Codecov Report

Merging #14893 (561b7d7) into dev (e7c579d) will decrease coverage by 0.01%.
The diff coverage is 35.48%.

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

@@             Coverage Diff              @@
##                dev   #14893      +/-   ##
============================================
- Coverage     38.80%   38.80%   -0.01%     
- Complexity     4584     4586       +2     
============================================
  Files          1232     1232              
  Lines         43318    43343      +25     
  Branches       4783     4788       +5     
============================================
+ Hits          16810    16819       +9     
- Misses        24650    24663      +13     
- Partials       1858     1861       +3     
Files Changed Coverage Δ
...duler/api/service/impl/WorkerGroupServiceImpl.java 74.72% <28.57%> (-7.15%) ⬇️
.../org/apache/dolphinscheduler/api/enums/Status.java 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

.map(schedule -> processDefinitionMapper.queryByCode(schedule.getProcessDefinitionCode()).getName())
.collect(Collectors.toList());

putMsg(result, Status.WORKER_GROUP_DEPENDENT_SCHEDULER_EXISTS, schedules.size(), processNames);
Copy link
Contributor

Choose a reason for hiding this comment

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

processNames? The above taskNames use JSON serialization, please choose a method and keep it consistent.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

46.7% 46.7% Coverage
0.0% 0.0% Duplication

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

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

@zhuangchong zhuangchong merged commit a070aa9 into apache:dev Sep 13, 2023
1 check passed
@zhongjiajie zhongjiajie removed this from the 3.2.1 milestone Oct 11, 2023
@zhongjiajie zhongjiajie added this to the 3.2.0 milestone Oct 11, 2023
zhongjiajie pushed a commit that referenced this pull request Oct 11, 2023
… by any tasks or schedulers when users delete or rename it. (#14893)

(cherry picked from commit a070aa9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.1 backend improvement make more easy to user or prompt friendly ready-to-merge
Projects
None yet
4 participants