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.1] Fix datatype validation of newly built collection #18738

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Aug 26, 2024

We only request the summary view when polling the history for updates, so we don't serialize elements_datatypes, which is used to make sure that the dragged element is of the correct datatype.

This probably fixes https://sentry.galaxyproject.org/share/issue/790be09602694a638d66257004325163/:

Message
(60007760) Failure preparing job
Stack Trace

Newest

NotFound: cannot find 'ext'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "Cheetah/Template.py", line 1053, in __unicode__
    return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1724455756_31925_91921.py", line 102, in respond

where a user provided a collection of HTML elements into a fasta/fastq input. This is the only way I can think of where the validation would fail.

Has the nice side-effect that once you build a collection in the history the datatypes for the collection are shown (which currently requires reloading the history).

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.

We only request the summary view when polling the history for updates,
so we don't serialize elements_datatypes, which is used to make sure
that the dragged element is of the correct datatype.

This probably fixes https://sentry.galaxyproject.org/share/issue/790be09602694a638d66257004325163/:
```
Message
(60007760) Failure preparing job
Stack Trace

Newest

NotFound: cannot find 'ext'
  File "galaxy/util/template.py", line 87, in fill_template
    return unicodify(t, log_exception=False)
  File "galaxy/util/__init__.py", line 1183, in unicodify
    value = str(value)
  File "Cheetah/Template.py", line 1053, in __unicode__
    return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1724455756_31925_91921.py", line 102, in respond
```

where a user provided a collection of HTML elements into a fasta/fastq
input. This is the only way I can think of where the validation would
fail.
@jmchilton
Copy link
Member

The client test failure looks legit?

@mvdbeek mvdbeek force-pushed the serialize_elements_datatypes_in_summary_view branch from 4f18621 to 37f91f2 Compare August 26, 2024 14:01
@mvdbeek
Copy link
Member Author

mvdbeek commented Aug 26, 2024

Yep, elements_datatype missing in the test definition, fixed that now.

@jmchilton jmchilton merged commit 99c1a92 into galaxyproject:release_24.1 Aug 26, 2024
46 of 51 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.

2 participants