Skip to content

[Fix-18247] Fix when forceTaskSuccess is performed on the last unsuccessful workflow instance, the workflow instance cannot be reset to the Success state#18351

Open
SbloodyS wants to merge 8 commits into
apache:devfrom
SbloodyS:fix_18247
Open

[Fix-18247] Fix when forceTaskSuccess is performed on the last unsuccessful workflow instance, the workflow instance cannot be reset to the Success state#18351
SbloodyS wants to merge 8 commits into
apache:devfrom
SbloodyS:fix_18247

Conversation

@SbloodyS

@SbloodyS SbloodyS commented Jun 15, 2026

Copy link
Copy Markdown
Member

Was this PR generated or assisted by AI?

No.

Purpose of the pull request

fix #18247

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 contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

@SbloodyS SbloodyS added this to the 3.5.0 milestone Jun 15, 2026
@SbloodyS SbloodyS self-assigned this Jun 15, 2026
@SbloodyS SbloodyS requested a review from caishunfeng as a code owner June 15, 2026 05:49
@SbloodyS SbloodyS added bug Something isn't working backend labels Jun 15, 2026
definiteTaskCodeList)) {
List<Integer> failTaskList = validTaskList.stream()
.filter(instance -> instance.getState().isFailure() || instance.getState().isKill())
.filter(instance -> instance.getState().isForceSuccess() || instance.getState().isFailure())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If there exists task which status is killed or paused, then we still cannot set the workflow instance to success.
A simple logic here might be to check whether all instances have succeeded.

@SbloodyS SbloodyS Jun 18, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes. You are right. Added.

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [api] When forceTaskSuccess is performed on the last unsuccessful workflow instance, the workflow instance cannot be reset to the Success state.

2 participants