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

Remove legacy library interface #4908

Merged
merged 35 commits into from
Nov 13, 2017
Merged

Conversation

guerler
Copy link
Contributor

@guerler guerler commented Nov 1, 2017

This PR removes the legacy library interface. The main challenge is that the api controller uses the web controller functions. This PR attempts to unwind the two. While unwinding it turns out that many of the validation checks, parameters and code paths used through the controller are not working/not used when called through the API. Access validation e.g. is tested through the api but the result is not used to prohibit the operation, see: https://github.com/galaxyproject/galaxy/pull/4908/files#diff-a74fb51de19ecbcb13be07dea19fde07R316.

@martenson
Copy link
Member

xref: #1995

@martenson martenson self-requested a review November 1, 2017 15:31
@martenson
Copy link
Member

I signed up as a reviewer for this since I am interested and working on related code atm.

@guerler guerler force-pushed the remove_old_library branch from eecccb6 to 0ea7720 Compare November 1, 2017 19:01
@galaxybot galaxybot added this to the 18.01 milestone Nov 3, 2017
@martenson
Copy link
Member

When adding datasets from user directory:

galaxy.web.framework.decorators ERROR 2017-11-10 12:22:58,257 Uncaught exception in exposed API method:
Traceback (most recent call last):
  File "/Users/marten/devel/git/galaxy/lib/galaxy/web/framework/decorators.py", line 281, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/Users/marten/devel/git/galaxy/lib/galaxy/webapps/galaxy/api/library_datasets.py", line 480, in load
    trans, 'api', kwd, os.path.basename(file), file, 'server_dir', library_bunch))
  File "/Users/marten/devel/git/galaxy/lib/galaxy/webapps/galaxy/api/library_datasets.py", line 568, in _make_library_uploaded_dataset
    link_data_only = params.get('link_data_only', 'copy_files')
AttributeError: 'str' object has no attribute 'get'

@martenson
Copy link
Member

martenson commented Nov 10, 2017

also errors when using import directory or path

Traceback (most recent call last):
  File "/Users/marten/devel/git/galaxy/lib/galaxy/web/framework/decorators.py", line 281, in decorator
    rval = func(self, trans, *args, **kwargs)
  File "/Users/marten/devel/git/galaxy/lib/galaxy/webapps/galaxy/api/library_datasets.py", line 495, in load
    trans, kwd, library_bunch, 200, '')
  File "/Users/marten/devel/git/galaxy/lib/galaxy/webapps/galaxy/api/library_datasets.py", line 521, in _get_path_paste_uploaded_datasets
    uploaded_datasets.append(self._make_library_uploaded_dataset(trans, 'api', params, name, path, 'path_paste', library_bunch, folder))
TypeError: _make_library_uploaded_dataset() takes at most 8 arguments (9 given)

@martenson
Copy link
Member

My branch was busted, with a clean checkout the errors above are not thrown anymore.

Copy link
Member

@martenson martenson left a comment

Choose a reason for hiding this comment

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

Looks well, works well. Thanks Aysam.

@martenson martenson merged commit d2a5695 into galaxyproject:dev Nov 13, 2017
@guerler
Copy link
Contributor Author

guerler commented Nov 13, 2017

Thanks a lot for the review man. I know it was quite a bit of work.

jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 13, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 13, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 14, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 15, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 15, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 15, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 18, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 18, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 19, 2017
jmchilton added a commit to jmchilton/galaxy that referenced this pull request Dec 20, 2017
@martenson martenson added the kind/refactoring cleanup or refactoring of existing code, no functional changes label Mar 7, 2018
@guerler guerler deleted the remove_old_library branch February 19, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants