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

Wrong handling of input type in remote file sources secrets #19078

Open
wm75 opened this issue Oct 29, 2024 · 1 comment
Open

Wrong handling of input type in remote file sources secrets #19078

wm75 opened this issue Oct 29, 2024 · 1 comment

Comments

@wm75
Copy link
Contributor

wm75 commented Oct 29, 2024

Describe the bug

When creating a remote file source that requires a password secret that secret can currently not consist of digits only.
If that's the case, you're getting (with a Webdav plugin-based remote file source for example):

"""
Problem with template definition causing invalid configuration, template expanded without error but resulting configuration is invalid. please contact admin to correct template: 1 validation error for WebdavFileSourceConfiguration
password
Input should be a valid string [type=string_type, input_value=1234, input_type=int]
For further information visit https://errors.pydantic.dev/2.9/v/string_type
"""

Galaxy Version and/or server at which you observed the bug
Galaxy Version: 24.1
Commit: 051c5ab

To Reproduce
Steps to reproduce the behavior:

  1. On usegalaxy.eu, go to 'User -> Preferences -> Manage Your Remote File Sources'
  2. Try to create "An FTP server" connection with FTP Password 1234 (you can fill in dummy information for the other fields)

Expected behavior
A string consisting only of digits should still be considered a valid string and be accepted as a valid password.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@davelopez
Copy link
Contributor

I had a quick look and this seems to be the jinja2 template interpreting the value as a number in:

return key, template.render(**template_variables)

I've never used jinja2, maybe there's some option to control that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants