Open pvanheus opened 3 years ago
I think the problem is that tool installation expects an exception when a tool install fails (see https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tool_shed/galaxy_install/install_manager.py#L849) but the when the validation error is triggered from https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tool_shed/tools/tool_validator.py#L73 (load_tool_from_config()
) it is handled, resulting in a situation where there is no valid tool install the tool is still marked as installed (here: https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/tool_shed/galaxy_install/install_manager.py#L961).
Here is a potential patch - I don't really like this though as it does not really raise the error message appropriately in the web UI:
diff --git a/lib/galaxy/tool_shed/galaxy_install/install_manager.py b/lib/galaxy/tool_shed/galaxy_install/install_manager.py
index 73bf0067af..90e60658f1 100644
--- a/lib/galaxy/tool_shed/galaxy_install/install_manager.py
+++ b/lib/galaxy/tool_shed/galaxy_install/install_manager.py
@@ -516,6 +516,8 @@ class InstallRepositoryManager:
irmm.generate_metadata_for_changeset_revision()
irmm_metadata_dict = irmm.get_metadata_dict()
tool_shed_repository.metadata = irmm_metadata_dict
+ if 'invalid_tools' in irmm_metadata_dict:
+ tool_shed_repository.invalid_tups = irmm.get_invalid_file_tups()
# Update the tool_shed_repository.tool_shed_status column in the database.
tool_shed_status_dict = repository_util.get_tool_shed_status_for_installed_repository(self.app, tool_shed_repository)
if tool_shed_status_dict:
@@ -935,6 +937,15 @@ class InstallRepositoryManager:
reinstalling=reinstalling,
tool_panel_section_mapping=tool_panel_section_mapping)
metadata = tool_shed_repository.metadata
+ if 'invalid_tools' in metadata:
+ self.update_tool_shed_repository_status(tool_shed_repository,
+ self.install_model.ToolShedRepository.installation_status.ERROR)
+ if len(tool_shed_repository.invalid_tups) == 1:
+ # just one failed tool to worry about, extract install error message and use that
+ error_message = tool_shed_repository.invalid_tups[0][1]
+ else:
+ error_message = ', '.join([': '.join(invalid_tuple) for invalid_tuple in tool_shed_repository.invalid_tups])
+ raise RuntimeError(error_message)
if 'tools' in metadata and install_resolver_dependencies:
self.update_tool_shed_repository_status(tool_shed_repository,
self.install_model.ToolShedRepository.installation_status.INSTALLING_TOOL_DEPENDENCIES)
Describe the bug Attempting to install a tool that has a profile greater than than that supported by the Galaxy server leads to a failed installation with no message to the admin
Galaxy Version and/or server at which you observed the bug Galaxy 20.09 (Docker version)
To Reproduce Steps to reproduce the behavior:
Install
. The tool goes through "Cloning" and then "Installed" stages but (a)shed_tool_conf.xml
is never updated and (b) dependencies are not installed.Expected behavior The user should be informed about the failed install. Optionally, the user should be allowed to force an install, if they judge that the features required by the tool are adequately provided by their Galaxy version.