kestra-io / plugin-scripts

https://kestra.io/plugins/
Apache License 2.0
9 stars 11 forks source link

Powershell process outputFiles not detecting files after updating to 0.18.2 from 0.17. #170

Closed adam133 closed 2 months ago

adam133 commented 3 months ago

Expected Behavior

Thread from Slack: https://kestra-io.slack.com/archives/C03FQKXRK3K/p1724185082477709

0.17 version of flow:

  - id: "run_query"
    type: "io.kestra.plugin.scripts.powershell.Commands"
    failFast: false
    runner: PROCESS
    interpreter: [powershell]
    commands: 
      - "<< a powershell command that generates *.tab files in the ./ directory>>"
    outputFiles:
    - "*.tab"

0.18.2:

  - id: "run_query"
    type: "io.kestra.plugin.scripts.powershell.Commands"
    failFast: false
    taskRunner: 
      type: io.kestra.plugin.core.runner.Process
    interpreter: [powershell]
    targetOS: WINDOWS
    namespaceFiles: 
      enabled: false
    commands: 
      - "<< a powershell command that generates *.tab files in the ./ directory>>"
    outputFiles:
    - "*.tab"

outputFiles should be detected same as 0.17

Actual Behaviour

Task doesn't capture outputs it used to capture:

2024-08-20 16:11:17.539 Captured 0 output(s).

Steps To Reproduce

No response

Environment Information

Example flow

No response

loicmathieu commented 3 months ago

~I think this is the same root cause as https://github.com/kestra-io/kestra/issues/4759~

adam133 commented 3 months ago

FYI - I've tried 18.4 as well now, same result

Skraye commented 2 months ago

Hello Adam, it seems that due to some recent changes, Windows files are not captured the same anymore, you should be able to make it work with the outputfiles value regex:.*\\.tab

Edit: if you'd rather use the glob syntax instead of regex, you can use glob:**/*.tab

adam133 commented 2 months ago

Sounds good - I'm trying it out with 18.9 now but struggling to get Kestra running properly for some reason. Might be something with my setup though. I'm out of time to mess with it for now - I'll probably wait for the next release and try again.

adam133 commented 3 weeks ago

I'm finally getting time to look at this job again - should the documentation be updated for this?

https://kestra.io/plugins/plugin-script-powershell/tasks/io.kestra.plugin.scripts.powershell.commands#outputfiles

The docs don't mention the glob: or regex: being needed so I just want to verify that's intended.