-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[23.1] Workaround for XML nodes of job resource parameters losing their children #16728
[23.1] Workaround for XML nodes of job resource parameters losing their children #16728
Conversation
…dren This bug was spotted because the job resource parameters selector broke on usegalaxy.eu. For the tool keras_train_and_eval, the option "Use GPU resources" shows up, but no drop-down menu is available and no items can be selected. The options are available as children of the XML nodes tagged with "param" within the scope of `galaxy.jobs.parse_resource_parameters`. They are then returned and later retrieved within the scope of `galaxy.util.parse_resource_parameters`, but by then, the children of the XML node (the options) are gone. See galaxyproject#16727 for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, the reason this became a problem is because we get rid of the tool source, which takes up a lot of memory. Ideally we'd fully parse out the conditional, but this will work for now.
Import `etree` from `galaxy.util` as suggested in the code review. Co-authored-by: Marius van den Beek <[email protected]>
I cannot merge, so go ahead :) |
This PR was merged without a "kind/" label, please correct. |
This is a workaround for, and thus closes #16727.
This bug was spotted because the job resource parameters selector broke on usegalaxy.eu. For the tool keras_train_and_eval, the option "Use GPU resources" shows up, but no drop-down menu is available and no items can be selected.
The options are available as children of the XML nodes tagged with "param" within the scope of
galaxy.jobs.parse_resource_parameters
. They are then returned and later retrieved within the scope ofgalaxy.util.parse_resource_parameters
, but by then, the children of the XML node (the options) are gone.It seems that returning strings rather than lxml Element objects, and then converting the strings back to Element objects fixes the bug. I have no clue why. As said on #16727, this is likely not a Galaxy bug but rather something related either to lxml or whatever is doing the garbage collection. Nevertheless, this cannot be left broken.
How to test the changes?
(Select all options that apply)
License