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

Fix import of pre-2.11 workflows into 2.11 #2226

Closed
tcompa opened this issue Jan 28, 2025 · 0 comments · Fixed by #2227
Closed

Fix import of pre-2.11 workflows into 2.11 #2226

tcompa opened this issue Jan 28, 2025 · 0 comments · Fixed by #2227
Labels
API bug Something isn't working flexibility Support more workflow-execution use cases

Comments

@tcompa
Copy link
Collaborator

tcompa commented Jan 28, 2025

Observed error (through fractal-client 2.7.0a0):

ERROR:root:Server returned 422

ERROR:root:Original request: POST http://localhost:8000/api/v2/project/1/workflow/import/

ERROR:root:Original payload: {"name": "wf-1738071424-1", "task_list": [{"meta_non_parallel": {"cpus_per_task": 1, "mem": 500}, "meta_parallel": {"cpus_per_task": 1, "mem": 500}, "args_non_parallel": {"image_dirs": ["/data/images/10.5281_zenodo.8287221/"], "allowed_channels": [{"color": "00FFFF", "wavelength_id": "A01_C01", "label": "DAPI", "window": {"start": 110, "end": 800}, "active": true}, {"color": "FF00FF", "wavelength_id": "A01_C02", "label": "nanog", "window": {"start": 110, "end": 290}, "active": true}, {"color": "FFFF00", "wavelength_id": "A02_C03", "label": "Lamin B1", "window": {"start": 110, "end": 1600}, "active": true}], "coarsening_xy": 2, "num_levels": 5, "image_extension": "png", "overwrite": true}, "args_parallel": null, "input_filters": {"attributes": {}, "types": {}}, "task": {"pkg_name": "fractal-tasks-core", "version": "1.4.2", "name": "Convert Cellvoyager to OME-Zarr"}}, {"meta_non_parallel": {"cpus_per_task": 1, "mem": 500}, "meta_parallel": {"cpus_per_task": 1, "mem": 500}, "args_non_parallel": {"overwrite": true}, "args_parallel": null, "input_filters": {"attributes": {}, "types": {}}, "task": {"pkg_name": "fractal-tasks-core", "version": "1.4.2", "name": "Project Image (HCS Plate)"}}]}

ERROR:root:Server error message: {'detail': [{'loc': ['body', 'task_list', 0, 'input_filters'], 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}, {'loc': ['body', 'task_list', 1, 'input_filters'], 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}]}

but this contradicts #2156.

I think we got a typo in this class below (filters->input_filters?)

class WorkflowTaskImportV2(BaseModel, extra=Extra.forbid):

    meta_non_parallel: Optional[dict[str, Any]] = None
    meta_parallel: Optional[dict[str, Any]] = None
    args_non_parallel: Optional[dict[str, Any]] = None
    args_parallel: Optional[dict[str, Any]] = None
    type_filters: Optional[dict[str, bool]] = None
    filters: Optional[dict[str, Any]] = None
@tcompa tcompa added API bug Something isn't working flexibility Support more workflow-execution use cases labels Jan 28, 2025
@ychiucco ychiucco linked a pull request Jan 28, 2025 that will close this issue
3 tasks
@ychiucco ychiucco mentioned this issue Jan 28, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API bug Something isn't working flexibility Support more workflow-execution use cases
Projects
Development

Successfully merging a pull request may close this issue.

1 participant