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

Error exporting subworkflow #31

Open
mvdbeek opened this issue Jun 1, 2020 · 4 comments
Open

Error exporting subworkflow #31

mvdbeek opened this issue Jun 1, 2020 · 4 comments

Comments

@mvdbeek
Copy link
Member

mvdbeek commented Jun 1, 2020

When exporting the big all-in-one subworkflow that includes the 2 variants for single-end and paired-end workflows the export fails with

galaxy.web.framework.decorators ERROR 2020-06-01 18:04:18,839 Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/Users/mvandenb/src/galaxy/lib/galaxy/web/framework/decorators.py", line 295, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 471, in workflow_dict
    ret_dict = self.workflow_contents_manager.workflow_to_dict(trans, stored_workflow, style=style, version=version)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/workflows.py", line 480, in workflow_to_dict
    wf_dict = to_format_2(wf_dict)
  File "/Users/mvandenb/src/galaxy/lib/galaxy/managers/workflows.py", line 461, in to_format_2
    return from_galaxy_native(wf_dict, None, **kwds)
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.8/site-packages/gxformat2/export.py", line 54, in from_galaxy_native
    output_id = labels.ensure_new_output_label(workflow_output.get("label"))
  File "/Users/mvandenb/src/galaxy/.venv/lib/python3.8/site-packages/gxformat2/_labels.py", line 17, in ensure_new_output_label
    assert label not in self.seen_labels
AssertionError

I think assert label not in self.seen_labels might need to be scoped to individual workflows ?

@mvdbeek
Copy link
Member Author

mvdbeek commented Jun 1, 2020

This is the .ga in question: https://gist.github.com/mvdbeek/7d6c1da73e54b12f0163c0440b786161

just tracking it here so I don't forget.

@mvdbeek
Copy link
Member Author

mvdbeek commented May 23, 2022

I'm not sure what to do here ... if we want to switch to export gxformat2 by default we should be able to export all existing workflows IMO, but if we auto-fix or drop the redundant labels we can't go back to the native format without losing the labels. As a sidenote, you can't produce workflows like this anymore because of galaxyproject/galaxy#10432 and the editor will try to "fix" this for you by dropping the redundant labels ... which I guess is an option ?

@nsoranzo
Copy link
Member

As a sidenote, you can't produce workflows like this anymore because of galaxyproject/galaxy#10432 and the editor will try to "fix" this for you by dropping the redundant labels ... which I guess is an option ?

I agree that dropping the redundant labels is a good option, since that's also what happens if you try to import into UseGalaxy.org the .ga file you linked above.

@mvdbeek
Copy link
Member Author

mvdbeek commented May 26, 2022

Try uploading the workflow, then downloading it. The redundant label is still there. If we silently dropped the label on import that would be really really bad, but that's not happening. The editor will warn you about the duplicate label and then drop it, you need to save for the label to disappear.

I think we've decided we'd fall back to the .ga download when we can't produce .gxformat2 because of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants