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 bad merge conflict resolution #19296

Closed
wants to merge 1 commit into from

Conversation

nsoranzo
Copy link
Member

Apologies!

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.

@github-actions github-actions bot added the area/database Galaxy's database or data access layer label Dec 10, 2024
@github-actions github-actions bot added this to the 24.1 milestone Dec 10, 2024
@@ -2630,7 +2630,9 @@ class PostJobAction(Base, RepresentById):
workflow_step_id: Mapped[Optional[int]] = mapped_column(ForeignKey("workflow_step.id"), index=True)
action_type: Mapped[str] = mapped_column(String(255))
output_name: Mapped[Optional[str]] = mapped_column(String(255))
_action_arguments: Mapped[Optional[bytes]] = mapped_column(MutableJSONType)
_action_arguments: Mapped[Optional[Union[bool, Dict[str, Any]]]] = mapped_column(
Copy link
Member

Choose a reason for hiding this comment

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

While we can have bool in the database the type checker should complain if you attempt this. Do things fail with

Suggested change
_action_arguments: Mapped[Optional[Union[bool, Dict[str, Any]]]] = mapped_column(
_action_arguments: Mapped[Optional[Dict[str, Any]]] = mapped_column(

?

Copy link
Member Author

Choose a reason for hiding this comment

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

It doesn't fail, but at line 2650 we are checking as if it's potentially a bool:

if ... and self._action_arguments is True:

so I suppose a future version of mypy may complain about this.
I think this is correct.

Copy link
Member

Choose a reason for hiding this comment

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

Then in that future version we ignore the type (or migrate the buggy values in the column). We should never ever set booleans in that column, any attempt to do so is a bug.

@nsoranzo
Copy link
Member Author

Replaced by #19297 .

@nsoranzo nsoranzo closed this Dec 10, 2024
@mvdbeek mvdbeek deleted the release_24.1_fix_merge branch December 10, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer kind/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants