Skip to content

dumps

Dump models differ from their Read counterpart in that: * They are directly JSON-able, without any additional encoder. * They may only include a subset of the Read attributes.

These models are used in at least two situations: 1. In the "*_dump" attributes of Job models; 2. In the _DatasetHistoryItem.workflowtask model, to trim its size.

WorkflowTaskDumpV2

Bases: BaseModel

We do not include 'model_config = ConfigDict(extra="forbid")' because legacy data may include 'input_filters' field and we want to avoid response-validation errors for the endpoints that GET datasets.

Source code in fractal_server/app/schemas/v2/dumps.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class WorkflowTaskDumpV2(BaseModel):
    """
    We do not include 'model_config = ConfigDict(extra="forbid")'
    because legacy data may include 'input_filters' field and we want to avoid
    response-validation errors for the endpoints that GET datasets.
    """

    id: int
    workflow_id: int
    order: Optional[int] = None

    type_filters: dict[str, bool]

    task_id: Optional[int] = None
    task: Optional[TaskDumpV2] = None