flyte icon indicating copy to clipboard operation
flyte copied to clipboard

[Core feature] Retrieval of stdout/stderr from ShellTask

Open benoistlaurent opened this issue 1 year ago • 3 comments

Motivation: Why do you think this is important?

Description: Currently, there is a limitation in the functionality of ShellTask where users are unable to retrieve standard output (stdout) and standard error (stderr) from executed ShellTasks directly. Users would have to write both channels to the disk, reading them back to retrieve the command result, and finally deleting them. All those are unnecessary steps which increase disk accesses and make the task writing heavier.

Goal: What should the final outcome look like, ideally?

Expected Behavior: Users should have the capability to access the stdout and stderr outputs generated during the execution of a ShellTask.

Describe alternatives you've considered

I've considered implementing a custom ShellTask class that would be 99% the same code as flytekit.extras.tasks.shell.ShellTask... Not very satisfying...

Propose: Link/Inline OR Additional context

No response

Are you sure this issue hasn't been raised already?

  • [X] Yes

Have you read the Code of Conduct?

  • [X] Yes

benoistlaurent avatar Feb 13 '24 09:02 benoistlaurent

Thank you for opening your first issue here! 🛠

welcome[bot] avatar Feb 13 '24 09:02 welcome[bot]

🤖

It's great to see your interest in improving the ShellTask functionality in Flyte! Your proposed solution of creating a custom ShellTask class sounds like a step in the right direction. We encourage you to go ahead and create a pull request with your proposed changes. Your contribution will be valuable in enhancing the user experience for others using Flyte. Thank you for considering this improvement!

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

dosubot[bot] avatar Feb 13 '24 09:02 dosubot[bot]

@benoistlaurent , exposing stdout and stderr in an ergonomic way should be possible. Please, feel free to open a PR and tag me on it.

eapolinario avatar Feb 15 '24 18:02 eapolinario