Skip to content

Conversation

@ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented Jul 16, 2024

Purpose of the pull request

close #16423

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)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch 3 times, most recently from d29aba5 to d6052b8 Compare July 16, 2024 11:56
String[] processInstanceIdArray = processInstanceIds.split(Constants.COMMA);
List<String> errorMessage = new ArrayList<>();
for (String strProcessInstanceId : processInstanceIdArray) {
int processInstanceId = Integer.parseInt(strProcessInstanceId);

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.
int processInstanceId = Integer.parseInt(strProcessInstanceId);
try {
execService.controlWorkflowInstance(loginUser, processInstanceId, executeType);
log.info("Success do action {} on workflowInstance: {}", executeType, processInstanceId);

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
} catch (Exception e) {
errorMessage.add("Failed do action " + executeType + " on workflowInstance: " + processInstanceId
+ "reason: " + e.getMessage());
log.error("Failed do action {} on workflowInstance: {}, error: {}", executeType, processInstanceId, e);

Check failure

Code scanning / CodeQL

Log Injection

This log entry depends on a [user-provided value](1).
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarCloud

@ruanwenjun ruanwenjun marked this pull request as draft July 16, 2024 13:32
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from d6052b8 to 465806d Compare July 17, 2024 01:12
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from 465806d to 4adedb5 Compare July 23, 2024 15:39
@github-actions github-actions bot added the UI ui and front end related label Jul 23, 2024
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from 4adedb5 to 0b40177 Compare July 25, 2024 06:41
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch 2 times, most recently from f5a524f to c816086 Compare August 14, 2024 14:32
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch 2 times, most recently from 41a627e to a101f89 Compare August 15, 2024 12:01
@ruanwenjun ruanwenjun changed the title Fix serial wait workflow instance cannot stop [DSIP-61][Master] Refactor thread pool and state event orchestration in master Aug 15, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch 3 times, most recently from 8999a0d to 2118c1f Compare August 15, 2024 12:54
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch 4 times, most recently from c143676 to 8f6286a Compare August 21, 2024 02:46
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from 8f6286a to a3eed5b Compare August 21, 2024 06:23
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from a3eed5b to c320f08 Compare August 21, 2024 06:54
@ruanwenjun ruanwenjun requested a review from SbloodyS August 21, 2024 07:45
SbloodyS
SbloodyS previously approved these changes Aug 21, 2024
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

LGTM. That's really a huge job. 👍🏻

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.

Incomplete review

package org.apache.dolphinscheduler.extract.master.transportor;

public interface ITaskInstanceExecutionEvent {
public interface ITaskExecutionEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to add event source, which can help troubleshoot.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is needed, e.g. distinguish the event from the task executor or user operation. I add todo here.

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from b5a7d6f to 23872cf Compare August 23, 2024 14:48
Comment on lines 22 to 29
GLOBAL_MASTER_FAILOVER,
MASTER_FAILOVER,
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to add some comments for the difference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


@Slf4j
@Component
public class PhysicalTaskExecutorClientDelegator implements ITaskExecutorClientDelegator {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the PhysicalTask means The tasks which execute on worker?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixSerialWaitWorkflowCannotKill branch from 5f5fe56 to 109d07e Compare August 26, 2024 05:45
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7.0% Coverage on New Code (required ≥ 60%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

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

@ruanwenjun ruanwenjun requested a review from caishunfeng August 26, 2024 06:37
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 overall.

Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

+1

@ruanwenjun ruanwenjun merged commit 9448806 into apache:dev Aug 26, 2024
@ruanwenjun ruanwenjun deleted the dev_wenjun_fixSerialWaitWorkflowCannotKill branch August 26, 2024 07:19
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.

[DSIP-61][Master] Refactor thread pool and state event orchestration in master

3 participants