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

Workflows: tool version is replaced (randomly?) by older version #17273

Closed
bernt-matthias opened this issue Jan 11, 2024 · 6 comments
Closed

Comments

@bernt-matthias
Copy link
Contributor

bernt-matthias commented Jan 11, 2024

Describe the bug

In a workflow (galaxyproject/iwc#321) on my instance the tool version of the map_value tool is sometimes reduced to 0.1.1 (instead of 0.2.0 as defined in the workflow).

This happened a few times when opening the editor (but not always).

Screenshot from 2024-01-11 23-33-48

And also when I executed planemo workflow_test_init --from_invocation 475029a28781f288 --galaxy_url https://galaxy.intranet.ufz.de --galaxy_user_key XXX

which showed me bioblend WARNING: GET: error 500: b'{"err_msg": "Uncaught exception in exposed API method:", "err_code": 0}', 9 attempts left. In the server logs was:

galaxy.workflow.modules DEBUG 2024-01-11 22:52:15,629 [pN:main.4,p:629336,tN:WSGI_1] <span title="tool id 'toolshed.g2.bx.psu.edu/repos/iuc/map_param_value/map_param_value/0.2.0'">Using version '0.1.1' instead of version '0.2.0' specified in this workflow.
galaxy.web.framework.decorators ERROR 2024-01-11 22:52:15,687 [pN:main.4,p:629336,tN:WSGI_1] Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/web/framework/decorators.py", line 337, in decorator
    rval = func(self, trans, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/webapps/galaxy/api/workflows.py", line 385, in workflow_dict
    ret_dict = self.workflow_contents_manager.workflow_to_dict(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/managers/workflows.py", line 843, in workflow_to_dict
    wf_dict = self._workflow_to_dict_export(trans, stored, workflow=workflow)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/managers/workflows.py", line 1386, in _workflow_to_dict_export
    tool_state = module.get_export_state()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 320, in get_export_state
    return self.get_state(nested=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/workflow/modules.py", line 315, in get_state
    return self.state.encode(Bunch(inputs=inputs), self.trans.app, nested=nested)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/__init__.py", line 678, in encode
    value = params_to_strings(tool.inputs, self.inputs, app, nested=nested)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/__init__.py", line 266, in params_to_strings
    value = params[key].value_to_basic(value, app, use_security=use_security)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/grouping.py", line 753, in value_to_basic
    current_case = rval["__current_case__"] = self.get_current_case(value[self.test_param.name])
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs1/data/galaxy_server/galaxy/lib/galaxy/tools/parameters/grouping.py", line 746, in get_current_case
    raise ValueError("No case matched value:", self.name, str_value)
ValueError: ('No case matched value:', 'input_param_type', 'data')

Galaxy Version and/or server at which you observed the bug
Galaxy Version: 23.1
Commit: 0e3a0ca

@bernt-matthias bernt-matthias changed the title Workflows Workflows: tool version is replaced by older version Jan 11, 2024
@bernt-matthias bernt-matthias changed the title Workflows: tool version is replaced by older version Workflows: tool version is replaced (randomly?) by older version Jan 11, 2024
@mvdbeek
Copy link
Member

mvdbeek commented Jan 12, 2024

Unclear how that is a bug ? If you don't have the tool installed what else are we supposed to do ?

@bernt-matthias
Copy link
Contributor Author

Both versions are installed. But might be related to #17272 (comment)

On my instance I do not do a restart Galaxy after a tool installation. Maybe some "components" (handlers?) still have an old tool set.

Will try a restart.

@bgruening
Copy link
Member

I also see that from time to time when new tools get installed and web handlers have not been restarted.

@bernt-matthias
Copy link
Contributor Author

Windows style: Restart "solved" it. Question is, if this is expected.

@mvdbeek
Copy link
Member

mvdbeek commented Jan 15, 2024

If everything is set up correctly and your processes are listening to the internal task queue, no. I've yet to see a reproduction. Whatever the problem, it's not related to workflows.

@mvdbeek mvdbeek closed this as completed Jan 15, 2024
@mvdbeek
Copy link
Member

mvdbeek commented Jan 15, 2024

and you can check that the task queue listening works with e.g. curl -X 'PUT' $GALAXY_URL -H "x-api-key: $API_KEY and checking that every single process has reloaded the toolbox.

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

3 participants