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] Fix tool version switch in editor #17858

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Mar 28, 2024

Fixes #17464

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.

mvdbeek added 3 commits April 8, 2024 17:16
This only happens for non-ts tools which don't have the version in their
tool id.
that can result form upgrading tools.
@mvdbeek mvdbeek force-pushed the fix_tool_version_switch_in_editor branch from 2649b34 to 8e8d7fa Compare April 8, 2024 18:29
@mvdbeek mvdbeek marked this pull request as ready for review April 9, 2024 14:12
@mvdbeek mvdbeek merged commit f4c4019 into galaxyproject:release_24.0 Apr 9, 2024
53 checks passed
@@ -1472,7 +1478,7 @@ def _workflow_to_dict_export(self, trans, stored=None, workflow=None, internal=F
"tool_version": module.get_version() if allow_upgrade else step.tool_version,
"name": module.get_name(),
"tool_state": json.dumps(tool_state),
"errors": module.get_errors(),
"errors": errors or module.get_errors(),
Copy link
Member

Choose a reason for hiding this comment

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

I suppose a user would like to see the errors from module.get_errors() also when errors is not empty, i.e. we could merge them?
But currently get_errors() can return None, a list or a string, depending on the module type, which is not great in itself, so I suppose we need to decide what format this should have.

Copy link
Member Author

Choose a reason for hiding this comment

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

errors will contain the upgrade messages, I don't think there's a need to merge them ?

Copy link
Member

Choose a reason for hiding this comment

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

Then maybe put them in a "messages" key?

Copy link
Member Author

Choose a reason for hiding this comment

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

Then I have to redo the editor and potentially other things. I don't disagree that this should be modernized, but it doesn't seem like the right moment ?

Copy link
Member Author

Choose a reason for hiding this comment

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

And sorry, it's not messages, these are actually errors, for the current state of the module.

Copy link
Member

Choose a reason for hiding this comment

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

Does the editor work with something that can be None, list, string or dictionary?
Anyway, my main concern was about losing the errors from module.get_errors() when errors is not empty.

Copy link
Member Author

@mvdbeek mvdbeek Apr 9, 2024

Choose a reason for hiding this comment

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

Yes, the editor just dumps them as a string, so anything's fine. I don't think we really ever display them for more than a second inside the node body, and the refactoring action just uses step.upgrade_messages.

@github-actions github-actions bot added this to the 24.1 milestone Apr 9, 2024
@nsoranzo nsoranzo deleted the fix_tool_version_switch_in_editor branch April 9, 2024 15:11
@galaxyproject galaxyproject deleted a comment from github-actions bot Apr 10, 2024
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