fix: Enable the workflow created by a wftmpl to retry after manually stopped #11355
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ally after manually stopped
No, I just met a problem in my work, but I made no issue but fix it myself because of time constraints
Motivation
Most of the users I am responsible for use workflow-templates to create workflows. However, there is a problem that has been bothering us: after the workflows created through the workflow templates are manually stopped, when retrying the failed node (because of the Stop operation) and all subsequent nodes will be skipped. Here is an example:
After manually stopped:

Ater manually retried:

Modifications
After carefully reading the relevant code, we finally realized that in the
FormulaRetryWorkflow
function,newWF.Status.StoredWorkflowSpec.Shutdown
should be set to an empty string instead of keeping the shutdown information.Verification
The following is a sample workflow template file:
You can just stop and retry the workflow when node A is running and the images in the Motivation can be reproduced.

After our fix, the workflow after retrying is as follows:
Signed-off-by: tongkangheng.tkh [email protected]