Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/job replay #772

Merged
merged 6 commits into from
Sep 10, 2021
Merged

Feature/job replay #772

merged 6 commits into from
Sep 10, 2021

Conversation

laurentganne
Copy link
Contributor

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 :

yorc deployments tasks update-step-state <deployment ID> <task ID> <step name> initial

to re-iniitlalise the run step that was on error and the submit step that was successful.

Then use yorc command:

yorc deployments tasks resume <deployment ID> <task ID>

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

@laurentganne laurentganne self-assigned this Sep 10, 2021
Copy link
Member

@loicalbertin loicalbertin left a comment

Choose a reason for hiding this comment

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

LGTM 👍 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants