You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(plugins): define the WES run request for plugins #781
request plugins of the wes group (elixir-cloud-aai/foca-plugins#87, TRS URIs; elixir-cloud-aai/foca-plugins#88, Git repositories) must read workflow_url and workflow_type of a POST /runs request and add workflow_attachment files. WES submits runs as multipart/form-data, but FOCA's plugin API defines only InboundRequest.payload: Any ("parsed body"): there is no documented shape for WES form fields and no way to carry or add file parts. Each gateway (proWES, elixir-cloud-aai/prowes#121) would invent its own, and wes plugins would not be reusable across gateways.
What to do
Define in foca.plugins (framework-neutral, so it survives FOCA 1.0) the payload of WES run requests: the form fields as a dict (workflow_params, tags and workflow_engine_parameters parsed from JSON; workflow_url, workflow_type, workflow_type_version as strings) plus the attachments as plain values (e.g., a frozen dataclass Attachment(filename, content: bytes, media_type)) that plugins may read, add, replace or remove.
Checks the gateway applies after each plugin, as for re-validation: safe relative filenames (no absolute paths, no ..), maximum count and total size (configurable).
Test kit: make_inbound() for WES runs with attachments; contract checks with api="wes".
Document the contract on the plugins page ("WES requests"), including that apps build it from the multipart request and turn it back into one when forwarding.
Done when
Model and checks in foca.plugins, with tests (100% coverage).
docs/plugins.md documents the WES payload and the attachment rules.
Activity