Skip to content

[Improvement][Master] Add Worker Group validator in api side.#12051

Closed
DarkAssassinator wants to merge 15 commits intoapache:devfrom
DarkAssassinator:improve_12001
Closed

[Improvement][Master] Add Worker Group validator in api side.#12051
DarkAssassinator wants to merge 15 commits intoapache:devfrom
DarkAssassinator:improve_12001

Conversation

@DarkAssassinator
Copy link
Contributor

@DarkAssassinator DarkAssassinator commented Sep 19, 2022

Purpose of the pull request

fix #12001

Brief change log

Just add a validator before task instance was put to dispatch queue.
Why need this change?
Because check the worker group before add to dispatch queue can avoid invalid infinite loops in TaskPriorityQueueConsumer

Verify this pull request

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2022

Codecov Report

Merging #12051 (277dd7f) into dev (8cddb10) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##                dev   #12051   +/-   ##
=========================================
  Coverage     38.65%   38.66%           
- Complexity     4005     4006    +1     
=========================================
  Files          1002     1002           
  Lines         37213    37219    +6     
  Branches       4249     4250    +1     
=========================================
+ Hits          14386    14390    +4     
- Misses        21195    21196    +1     
- Partials       1632     1633    +1     
Impacted Files Coverage Δ
...server/master/runner/task/CommonTaskProcessor.java 17.24% <0.00%> (-1.28%) ⬇️
...eduler/server/worker/task/WorkerHeartBeatTask.java 77.55% <0.00%> (+8.16%) ⬆️

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

@sonarqubecloud
Copy link

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 2 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@SbloodyS SbloodyS added this to the 3.0.2 milestone Sep 21, 2022
@DarkAssassinator DarkAssassinator requested review from ruanwenjun and removed request for SbloodyS and caishunfeng September 22, 2022 15:52
@caishunfeng
Copy link
Contributor

Hi @DarkAssassinator please use the correct title, thanks~

@DarkAssassinator DarkAssassinator changed the title [Improvement][Master] fix issue#12001 [Improvement][Master] Add Worker Group validator in api side. Sep 23, 2022
@DarkAssassinator
Copy link
Contributor Author

Hi @DarkAssassinator please use the correct title, thanks~

ohh. so sorry. done

DarkAssassinator and others added 2 commits September 23, 2022 21:43
* [feat] New restful API for workflow and schedule

CURD for workflow and schedule, different with exists
API, this new restful api only operate single resource
in each request, and return the latest. For example,
previous workflow should also need to post tasks definition
and tasks relation definition, but this patch will allow
you to create workflow without task relate information

* use checkProjectAndAuthThrowException, and fix CI error

* Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ScheduleV2Controller.java

* change method name
from createProcessDefinitionV2 to createSingleProcessDefinition
from updateProcessDefinitionV2 to updateSingleProcessDefinition

Co-authored-by: caishunfeng <caishunfeng2021@gmail.com>
Comment on lines +358 to +360
long subProcessCode = Long
.parseLong(JSONUtils.getNodeString(taskDefinition.getTaskParams(),
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
EricGao888 and others added 7 commits September 24, 2022 09:59
…ta complement (apache#12121)

* Add instructions for process execution type and data complement

* Fix and polish the docs
…che#12050)

* [Bug] [Master] Cannot remove the WorkerGroup from the master service. apache#12000

* remove unnecessary locks

* Update dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java

Co-authored-by: caishunfeng <caishunfeng2021@gmail.com>

Co-authored-by: caishunfeng <caishunfeng2021@gmail.com>
…y, the email fails to send the attachment, and an exception will be reported (apache#12059)

* [Bug-apache#12057][task-plugin] fix when the sql query result is empty, the email fails to send the attachment, and an exception will be reported

Co-authored-by: 冯剑 Jian <jian.feng@jiduauto.com>
@DarkAssassinator
Copy link
Contributor Author

Misuse coverage in conflict resolution, close it and re-open

@DarkAssassinator DarkAssassinator deleted the improve_12001 branch September 25, 2022 15:30
Comment on lines +386 to +388
taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
@EricGao888 EricGao888 removed this from the 3.0.2 milestone Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Master] Process instance will keep running when cannot find the worker group.

9 participants