service.logs¶
The logs of the pods of a task, kept in the run store.
The logs of a pod are gone with the pod: Kueue deletes a preempted pod, Argo deletes
the pods of a workflow with it after its time to live, and stopping a workflow ends
its pods. So the controller copies the logs of the main containers of the pods of a
task into tasks/<task>/logs/ once the task is final and its pods terminated, the
ones which ended before it stops or cancels a workflow (the last KEPT_TAIL_LINES
lines, at most what the backend reads of a log): a file <pod>.log per pod (every
attempt the backend can still read) and index.json, the pods in their order,
written last, which marks the logs as kept. An ended run is followed until its logs
are kept or its workflow is gone (RunRecord.pending_logs); a run which never had a
workflow keeps none. The API serves the kept logs first and the logs of the live pods
otherwise.
keep
¶
Keep the logs of the pods of a task in task_dir/logs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_dir
|
Path
|
The directory of the task. |
required |
logs
|
list[PodLog]
|
The logs of its pods, oldest first. |
required |