Call Process.build_workflow when retrying instead of cloning tasks
Follow-up of !2008 (merged)
Since the removal of Workflow.recipe in Arkindex 1.4.2, retrying a process now clones existing tasks instead of rebuilding tasks from the recipe. This works until any task uses the CreateTask
endpoint to add its own tasks to the process: retrying will clone these new tasks instead of only cloning the original tasks. This prevents all Repository processes from being retried, since the Git import task tries to recreate Docker build tasks that already exist.
Now that the Workflow model has been entirely removed, we can try to use Process.build_workflow
to rebuild the tasks instead of cloning them.
This might require adding new fields to Process
to store the arguments we pass to Process.start
that we do not currently store in the DB, like use_cache
, use_gpu
and worker_activity
, so that we can recreate exactly the same tasks.