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

Fix for re-installing an uninstalled TS repository with a dependency #1154

Merged
merged 1 commit into from
Nov 23, 2015

Conversation

gregvonkuster
Copy link
Contributor

where both the repository and the dependency were updated in the TS
after the repository was uninstalled.

This one is for @bgruening ;)

Here is the scenario:

In Galaxy:

  1. Install repo A from TS where A has a dependency on package B (of type tool_dependency_definition), checking the box to install all dependencies. Both A and B are installed.
  2. Uninstall A, leaving B installed

In the Tool Shed:

  1. Add an update to A
  2. Add an update to B

Back in Galaxy:

  1. Re-install A

Old behavior:
The new revision of B would get installed as a "white ghost" in addition to the original B
A would get installed with missing dependency B

Corrected behavior after this PR:
The updated revisions of A and B are installed, with single installed instanced of both.

where both the repository and the dependency were updated in the TS
after the repository was uninstalled.
@martenson
Copy link
Member

@galaxybot test this

@martenson
Copy link
Member

This change makes sense and my simple testing seems working. Thanks @gregvonkuster

martenson added a commit that referenced this pull request Nov 23, 2015
Fix for re-installing an uninstalled TS repository with a dependency
@martenson martenson merged commit 11f9fed into galaxyproject:dev Nov 23, 2015
@mvdbeek
Copy link
Member

mvdbeek commented Nov 23, 2015

Awesome, thanks so much @gregvonkuster,this should be fixing issue #667 .
@martenson can we get this into 15.10 ?

@bgruening
Copy link
Member

@gregvonkuster this is great! Thanks so much. In exchange see https://github.com/bgruening/docker-galaxy-stable/tree/dev for automatic tested images :)

@martenson martenson removed this from the 16.01 milestone Nov 23, 2015
@martenson
Copy link
Member

@mvdbeek cherry-picked into 15.10 82ce624

tool_shed_url = common_util.get_tool_shed_url_from_tool_shed_registry( app, tool_shed )
repository_clone_url = os.path.join( tool_shed_url, 'repos', owner, name )
repo_info_tuple = (None, repository_clone_url, changeset_revision, None, owner, None, None)
repository, pcr = repository_was_previously_installed( app, tool_shed_url, name, repo_info_tuple )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregvonkuster It seems that the code at line 503-507 is a subset of what is done by repository_was_previously_installed(): can this be consolidated in this last function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nsoranzo You make a good point, but the ideal solution to this is to rebase these functions and clean them up, which may be a bit non-trivial. My understanding is that all of this is going away some time soon?

I'm going to try to get some time to look at the 2nd problem discussed here (unless someone else gets to it first) #667 (comment)
If it makes sense to clean this function up a bit, I'll do it as part of that work.

By the way, what Tool Shed test harness should I be running to test PRs like this? I want to make sure I'm not breaking things. ;)

Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregvonkuster we have dockerized TS tests running at https://jenkins.galaxyproject.org/job/docker-toolshed/ but currently 12 are failing because of lack of maintenance (that is why they are not plugged in the PRs like the others)
Jenkins runs: ./run_tests.sh --dockerize --db postgres -toolshed

I also think that things are not going away soon. Not if we want to stay reproducible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martenson Thanks! I'll make sure to run those before changing any code and then submitting PRs that change Tool Shed code. It will at least help to know that the same 12 break before changes and after. ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmchilton jmchilton modified the milestone: 16.01 Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants