Slay the Workflow
Closes #1475 (closed)
Implements part of teklia/requests#98 (Process.started
)
-
RetrieveWorkflow
,UpdateWorkflow
andPartialUpdateWorkflow
have been removed entirely; I simply couldn't get them to work with a process properly and it was easier to merge their behaviors intoRetrieveProcess
,UpdateProcess
andPartialUpdateProcess
.- The frontend uses
RetrieveWorkflow
to show a process' status. - The CLI uses
RetrieveWorkflow
forarkindex process report
andarkindex process recover
. - The API client's README uses
RetrieveWorkflow
in an example, but this example uses an endpoint that does not exist already (RetrieveTaskLog
). - Only the frontend uses
PartialUpdateWorkflow
, to stop processes. - Nobody on code.vpn uses
UpdateWorkflow
.
- The frontend uses
-
The
workflow
field has been removed from processes returned inListProcess
orRetrieveProcess
. This was the URL to a workflow, not an UUID.- The CLI uses the
workflow
inarkindex process report
andarkindex process recover
. - The frontend uses the
workflow
for status polling, as well as to detect whether a process is "configured" or not.
- The CLI uses the
-
The
with_workflow
option ofListProcesses
has been renamed towith_tasks
. This only affects the frontend. -
RetrieveProcess
now returns thefarm
and thetasks
, which were previously returned byRetrieveWorkflow
. -
The
workflow_id
onCreateTask
is nowprocess_id
, which affects the Git import task and the Ponos agent -
The Ponos agent can no longer provide the
PONOS_WORKFLOW
environment variable, which affects the Git import task -
The task logs and artifacts were stored on S3 using URLs that contain the workflow IDs. They now use only the task ID, to reduce the complexity if we ever have to do other migrations.
- Artifacts
<workflow ID>/<task ID>/*
→<task ID>/*
- Task logs
<workflow ID>/run_<run>/<task ID>.log
→<task ID>.log
⚠ Nothing is provided here to make the migration: the renaming will have to be done on the infra side as discussed on Whereby. - Artifacts
-
The
manage.py cleanup
command used to remove expired workflows, but not expired processes. It now deletes all tasks on expired processes, but does not delete expired processes since they would imply deleting WorkerRuns or WorkerActivities, which would be a mess.
Follow-ups
- Fix the frontend teklia/arkindex/frontend!1491
- Fix tasks teklia/arkindex/tasks!352
- Fix the Ponos agent teklia/arkindex/ponos-agent!20
- Update the CLI's
arkindex process report
andarkindex process recover
to adapt to theRetrieveWorkflow
removal - Write the Ponos logs and artifacts renaming script, which can also be useful to developers for their local setups
- Restore the behavior of a process retry to what it had before the recipe removal: the tasks should be regenerated via
build_workflow
, not cloned. This was not possible without the recipe, but is now possible without theWorkflow
. This currently prevents restarting a Repository process.