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

[24.0] Raise appropriate exception if user forces a collection that is not populated with elements as input #18023

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Apr 18, 2024

These aren't valid inputs and I think the only way to get here is by dragging such a collection into an input field, which bypasses all the validations happening in the dataset collection matcher.

Minor performance fix included for nested collections in said dataset collection matcher.
Fixes #18012

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

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@hexylena
Copy link
Member

also xref #17560 where I triggered this exception, by doing exactly that. (I am impatient waiting for the collection to upload, I "assume" (as a user) that Galaxy knows when the collection will be ready and won't start the job until the collection is ready, like it does with other datasets, and just wanted to queue my job so I could go back to my other tasks.)

@mvdbeek
Copy link
Member Author

mvdbeek commented Apr 19, 2024

I think the natural solution there is #17393, where the request itself is persisted, until then no way around it. At a minimum you'll get a message saying we can't do anything. I'm looking to make fetch data collection uploads a bit smarter so that we create the collection in a usable state if you're not building a collection from an archive where we really have no handle on what the collection is going to look like.

@mvdbeek
Copy link
Member Author

mvdbeek commented Apr 19, 2024

Also note that #17560 is a different in that your collection is populated, but we can't filter on metadata if we don't have metadata yet. If your collection is not populated it has no leaf elements.

@mvdbeek mvdbeek changed the title [24.0] Raise appropriate exception if user forces non-ready collection as input [24.0] Raise appropriate exception if user forces non-populated collection as input Apr 19, 2024
@mvdbeek mvdbeek changed the title [24.0] Raise appropriate exception if user forces non-populated collection as input [24.0] Raise appropriate exception if user forces a collection that is not populated with elements as input Apr 19, 2024
mvdbeek added 2 commits April 21, 2024 09:58
It was using the wrong id type, and since we don't prepopulate the
collection we need to wait until discovery happens. It actually nicely
illustrates the bug.
@mvdbeek mvdbeek force-pushed the fix_non_ready_collection_submission branch from 0e6c669 to a671090 Compare April 21, 2024 07:58
@mvdbeek mvdbeek merged commit 44782a4 into galaxyproject:release_24.0 Apr 22, 2024
49 of 50 checks passed
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.

3 participants