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

"Move" operation will treat moveDirectory as a file if missing a trailing / #160

Open
paulgrainger85 opened this issue Nov 7, 2024 · 0 comments
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working good first issue Great issue for new contributors

Comments

@paulgrainger85
Copy link
Contributor

Describe the issue

If sftp task is configured to move file(s), if the moveDirectory is missing a trailing / it will treat the directory as a file

triggers:
  - id: sftp_downloads
    type: io.kestra.plugin.fs.sftp.Trigger
    host: hostname
    username: user
    keyfile: "{{secret('ssh_key')}}"
    from: /home/user/data
    regExp: ".*.txt"
    action: MOVE
    moveDirectory: /home/user/data/sftp_loc
    rootDir: false

on the SFTP host set up the following

  • mkdir -p /home/user/data/sftp_loc
  • echo testing >> /home/user/data/my_file.txt

Allow trigger to execute. Observe that /home/user/data/sftp_loc is now a file containing the word "testing

Expectation is that with or without the trailing / "moveDirectory" should be treated as a directory

Environment

  • Kestra Version: latest
@paulgrainger85 paulgrainger85 added bug Something isn't working area/plugin Plugin-related issue or feature request good first issue Great issue for new contributors labels Nov 7, 2024
@kestrabot kestrabot bot added this to Issues Nov 7, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Issues Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin Plugin-related issue or feature request bug Something isn't working good first issue Great issue for new contributors
Projects
Status: Backlog
Development

No branches or pull requests

1 participant