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

[17.09] If the newest version of a tool is hidden, load the newest older version, if any, into the tool panel #4726

Merged
merged 1 commit into from Oct 2, 2017

Conversation

Projects
None yet
3 participants
@natefoo
Copy link
Member

commented Sep 29, 2017

With recent tool lineage handling that always uses tool version comparisons instead of installation order from the database (I think this is how it worked before?), we have some "broken" tool versions that show up as newer versions of tools that should in fact be older.

For example, at one point we had installed freebayes version freebayes-0.9.14. Later we installed version 1.0.2.29-3, and hid the older version by setting hidden="true" on its <tool> tag in shed_tool_conf.xml. This worked fine with Galaxy < 17.09 since lineage came from the database, but unfortunately:

>>> from distutils.version import LooseVersion
>>> LooseVersion('1.0.2.29-3') > LooseVersion('freebayes-0.9.14')
False
>>> 

Because tools are loaded into the panel regardless of whether they're hidden and, and newer versions replace older versions, and only at runtime are hidden tools filtered out, if the "newest" version is hidden, no version will show up in the panel. This change allows the "newest" unhidden version to appear.

Here are two things probably worth being aware of:

  • With this change, we don't load hidden tools in to the panel at all. It does result in the old version not being in config.toolbox in the client's app dict, I don't know if that is a problem, because I'm still able to switch to the old version and run it. I am not sure of the overall ramifications of this change as I don't really know the client at all and not much about the toolbox, so feel free to tell me this is the wrong way to do it.
  • The hidden version will forever appear as the "newest" (last) version in the Versions dropdown on the tool form.

On gitter we considered adding a forever-hack to the lineage module to fix this for this specific tool (and any others that we might encounter), but this newest-version-hiding fix was deemed more palatable.

@nsoranzo

This comment has been minimized.

Copy link
Member

commented Sep 29, 2017

What about also removing hidden tools from the Versions dropdown? I think hidden tools are meant to be loaded only for re-running purposes, but maybe that's too drastic?

@natefoo

This comment has been minimized.

Copy link
Member Author

commented Sep 29, 2017

The original intent was for them just to be hidden from the tool panel, I think the versions dropdown is supposed to have them, although we could add a new attribute (e.g. super_duper_hidden) that would remove them from both?

Also, rather than a tool-specific hack, we could introduce before and/or after attributes that'd allow admins to specify a version number that they should appear before or after? Then maybe we wouldn't even need to fix hiding the latest version (although I still think it's useful - say, for beta testing new versions?, just not sure about the implementation).

@jmchilton jmchilton merged commit 04a572e into galaxyproject:release_17.09 Oct 2, 2017

6 checks passed

api test Build finished. 292 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 161 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 46 tests run, 0 skipped, 0 failed.
Details
lgtm analysis: JavaScript No alert changes
Details
toolshed test Build finished. 579 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.