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

[22.05] Send composite datasets directly to tusUpload #14191

Merged
merged 1 commit into from
Jun 29, 2022

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Jun 24, 2022

Fixes #14125.

If the data contains a file or is a composite dataset, send it directly to tusUpload(), otherwise attempt to handle the pasted content on the client depending on what that pasted content is.

I couldn't figure out a way to handle the parts of a composite dataset on the client depending on what they are. A composite dataset may consist of any combination of a file, a pasted url(s), and pasted non-url content (unlikely, but not impossible). Any files are stored at data.files and are already handled by tus - so no problem there. Any non-file items are stored in the data.targets[0].target.items[0].composite.items array and are identified as: src=pasted for non-url pasted content and src=url for url pasted content. I tried iterating over this array and handling each item separately - which, of course, resulted in 3 separate composite datasets. So, I've opted for the simple solution: if it has files or is a composite dataset, don't try to handle pasted content with tus.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

Where they will be submitted to the fetch api.
A composite dataset may consist of any combination of a file, a pasted
url(s), and pasted non-url content.
@jdavcs jdavcs added this to the 22.05 milestone Jun 24, 2022
@mvdbeek
Copy link
Member

mvdbeek commented Jun 24, 2022

Can you write selenium tests for the possible combinations ?

@davelopez davelopez changed the title Send composite datasets directly to tusUpload [22.05] Send composite datasets directly to tusUpload Jun 27, 2022
@mvdbeek
Copy link
Member

mvdbeek commented Jun 29, 2022

It would still be nice to get a test here, but this works.

@mvdbeek mvdbeek merged commit f19d0c1 into galaxyproject:release_22.05 Jun 29, 2022
@jdavcs
Copy link
Member Author

jdavcs commented Jun 29, 2022

@mvdbeek yes, I'll have the tests sometime today - almost done with them!

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.

2 participants