galaxyproject / galaxyproject/planemo

Allow linting of workflows

Open
#885 1 comment 1 reaction 0 assignees View on GitHub
enhancement help wanted linting
Dominant language
Python
Stars
110
Forks
102
Avg merge
4d 21h
Merged PRs (30d)
13

Description

A user reported a "500 error" uploading a workflow (with no further information, so that's https://github.com/galaxyproject/galaxy/issues/6976)

```
galaxy.web.framework.decorators ERROR 2018-11-06 11:23:22,360 [p:4004472,w:5,m:0] [uWSGIWorker5Core0] Uncaught exception in exposed API method:
Traceback (most recent call last):
File "lib/galaxy/web/framework/decorators.py", line 281, in decorator
rval = func(self, trans, *args, **kwargs)
File "lib/galaxy/webapps/galaxy/api/workflows.py", line 318, in create
return self.__api_import_from_archive(trans, archive_data, "uploaded file")
File "lib/galaxy/webapps/galaxy/api/workflows.py", line 561, in __api_import_from_archive
workflow, missing_tool_tups = self._workflow_from_dict(trans, data, source=source)
File "lib/galaxy/web/base/controller.py", line 1252, in _workflow_from_dict
exact_tools=exact_tools,
File "lib/galaxy/managers/workflows.py", line 232, in build_workflow_from_dict
exact_tools=exact_tools,
File "lib/galaxy/managers/workflows.py", line 337, in _workflow_from_dict
self.__connect_workflow_steps(steps, steps_by_external_id)
File "lib/galaxy/managers/workflows.py", line 948, in __connect_workflow_steps
conn.output_step = steps_by_external_id[conn_dict['id']]
KeyError: 2
```

It would be helpful if Planemo could lint workflows for these kinds of bugs.

Contributor guide

Open the contributing guide

Research direction

Begin with the workflow import path shown in lib/galaxy/managers/workflows.py, especially _workflow_from_dict and __connect_workflow_steps, then locate Planemo’s workflow lint entry point and existing tests. Reproduce the missing connection-id case and define completion as a lint result that identifies the malformed workflow instead of allowing the upload-time 500.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.