kestra-io / plugin-scripts

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

conda activate does not work as shown in the Python Commands task example #113

Open shrutimantri opened 8 months ago

shrutimantri commented 8 months ago

Expected Behavior

The examples shown on this page: https://kestra.io/plugins/tasks/io.kestra.plugin.scripts.python.commands should work seamlessly.

Actual Behaviour

The first example with Conda is successful, but does not run "conda activate myCondaEnv" successfully. The logs have this warning: "/bin/sh: 1: conda: not found" implying the conda command did not work.

Steps To Reproduce

Take the first example on the Commands task page:

id: python_venv
namespace: dev

tasks:
  - id: hello
    type: io.kestra.plugin.scripts.python.Commands
    namespaceFiles:
      enabled: true
    runner: PROCESS
    beforeCommands:
      - conda activate myCondaEnv
    commands:
      - python etl_script.py

And execute the flow.

Environment Information

Example flow

id: python_venv namespace: dev

tasks: