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

Workflow with invalid tool state can't be uploaded #18580

Open
4 tasks
galaxyproject-sentryintegration bot opened this issue Jul 21, 2024 · 2 comments
Open
4 tasks

Workflow with invalid tool state can't be uploaded #18580

galaxyproject-sentryintegration bot opened this issue Jul 21, 2024 · 2 comments

Comments

@galaxyproject-sentryintegration

Workflow in question is https://training.galaxyproject.org/training-material/api/ga4gh/trs/v2/tools/genome-annotation-functional/versions/functional/GALAXY/descriptor.

We should

  • not fail the import with an uncaught exception
  • not silently fix or reset the state
  • by maybe not validating the workflow state from external imports ?
  • still refuse to save workflows with broken state if coming form the editor ?

This is kind of tricky to get right.

Sentry Issue: GALAXY-MAIN-ZFP

ValueError: ('No case matched value:', 'annotation_options', 'None')
(9 additional frame(s) were not displayed)
...
  File "galaxy/workflow/modules.py", line 317, in get_state
    return self.state.encode(Bunch(inputs=inputs), self.trans.app, nested=nested)
  File "galaxy/tools/__init__.py", line 697, in encode
    value = params_to_strings(tool.inputs, self.inputs, app, nested=nested)
  File "galaxy/tools/parameters/__init__.py", line 269, in params_to_strings
    value = params[key].value_to_basic(value, app, use_security=use_security)
  File "galaxy/tools/parameters/grouping.py", line 766, in value_to_basic
    current_case = rval["__current_case__"] = self.get_current_case(value[self.test_param.name])
  File "galaxy/tools/parameters/grouping.py", line 759, in get_current_case
    raise ValueError("No case matched value:", self.name, str_value)

Uncaught exception in exposed API method:
@davelopez
Copy link
Contributor

davelopez commented Jul 22, 2024

Just an idea, I'm not sure if it is possible right now, but will it make sense to "preview" the workflow locally before really uploading it using the idea behind #18496?

We could list a "compatibility" or "issues" report with the current server before importing a potentially broken workflow. This could inform you of the missing tools or versions, validation errors, etc.

@mvdbeek
Copy link
Member

mvdbeek commented Jul 24, 2024

It's a nice idea, but we'd still have to bump up the version and and make it clear that it wasn't what was actually uploaded. We should probably have both things.

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

No branches or pull requests

2 participants