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

[23.0] Force __DUPLICATE_FILE_TO_COLLECTION__ 'size' param to integer #16659

Merged
merged 1 commit into from Sep 8, 2023

Conversation

simonbray
Copy link
Member

I have a workflow containing the __DUPLICATE_FILE_TO_COLLECTION__ tool, with the parameter specifying the size of the output collection exposed as an integer workflow parameter. Workflow execution fails with this error:

Traceback (most recent call last):
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 2047, in handle_single_execution
    rval = self.execute(
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 2144, in execute
    return self.tool_action.execute(
  File "/srv/galaxy/server/lib/galaxy/tools/actions/model_operations.py", line 87, in execute
    self._produce_outputs(
  File "/srv/galaxy/server/lib/galaxy/tools/actions/model_operations.py", line 114, in _produce_outputs
    tool.produce_outputs(
  File "/srv/galaxy/server/lib/galaxy/tools/__init__.py", line 3902, in produce_outputs
    f"{element_identifier} {n}": hda.copy(copy_tags=hda.tags, flush=False) for n in range(1, number + 1)
TypeError: can only concatenate str (not "int") to str

whereas running __DUPLICATE_FILE_TO_COLLECTION__ as a tool, outside the workflow, succeeds as expected. With this change both tool and workflow complete successfully.

I can't help but feel there must be some deeper issue, the workflow integer param presumably shouldn't be turned into an string, so this is more of a sticking plaster - feel free to close if the underlying issue can be solved instead.

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. follow description above

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 this to the 23.2 milestone Sep 7, 2023
@mvdbeek
Copy link
Member

mvdbeek commented Sep 7, 2023

Thank you! Do you want to target this against an older release ? We usually apply bug fixes to the old supported release, which 1 year prior to the latest supported release, so 22.01 in this case.

@simonbray simonbray changed the base branch from dev to release_23.0 September 7, 2023 15:13
@simonbray simonbray changed the title Force __DUPLICATE_FILE_TO_COLLECTION__ 'size' param to integer [23.0] Force __DUPLICATE_FILE_TO_COLLECTION__ 'size' param to integer Sep 7, 2023
@simonbray
Copy link
Member Author

Ah yes, I went for 23.0 since that's when the tool in question was added.

@nsoranzo nsoranzo merged commit ea148f3 into galaxyproject:release_23.0 Sep 8, 2023
39 of 41 checks passed
@nsoranzo
Copy link
Member

nsoranzo commented Sep 8, 2023

Thanks @simonbray !

@simonbray simonbray deleted the patch-3 branch September 8, 2023 11:45
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.

None yet

3 participants