Hi everyone, I’ve recently upgraded my prefect ver...
# ask-community
s
Hi everyone, I’ve recently upgraded my prefect version from 2.8.6 to 2.10.12. Now prefect no longer captures the logs from my tasks that run prefect-shell. Does anyone know a fix for this?
1
j
hey! do you have a reproduction of this that works on 2.8.6 but fails on 2.10.12?
s
I think I’ve managed to find a working solution to my problem. I was effectively doing this:
Copy code
from prefect_shell import ShellOperation

...

with ShellOperation(commands=commands) as shell:
    proc = shell.trigger()
    proc.wait_for_completion()
Instead I use the solution suggested in https://github.com/PrefectHQ/prefect-dbt/issues/146
Copy code
from prefect_shell import ShellOperation

...

with ShellOperation(commands=commands) as shell:
    shell.run()
Both snippets worked in 2.8.6, whereas only the second snippet works in >=2.8.7