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.
Pull Request description
Added the ability to replay workflow steps, even if they were successful. This can be used to replay the successful submission of a job after a failure during the execution of this job.
Description of the change
What I did
rest/http_api.md
tasks/tasks.go
allowing to change a DONE step (to resubmit a job that failed during its execution for example)
tasks/workflow/step.go
Not ending the workflow on a step failure if this step has "on failure" next steps
tasks/workflow/worker.go
endAction() and runAction(): should not notify the task error if there are on failure steps, to go on in the workflow executing these on failure steps
runWorkflowStep(): on workflow replay, when an asynchronous step is done, its next steps must be registered
tasks/workflow/consul_test.go
tasks/workflow/testdata/workflow.yaml
tasks/workflow/worker_test.go
Added a test checking replaying a workflow containing workflow with an asynchronous step already done, will now execute steps following this asynchronous step
How to verify it
Tested on a LEXIS step with a job performing data transfers between Compute locations:
Using a workflow containing job steps, make the job executing a data transfer fail.
Then use yorc command :
to re-iniitlalise the run step that was on error and the submit step that was successful.
Then use yorc command:
to replay the workflow.
Check the job is resubmitted, then monitored until its end.
Description for the changelog
Allow to replay workflow steps even if they are not in error (GH-771)
Applicable Issues
#771