ale

    ale

    1 year ago
    Hey folks 😒imple_smile: Regarding ShellTask, wouldn’t it be useful to return the logs generated by the shell command as part of the FAIL message when the task fails? Maybe we can add a parameter that keeps the current behaviour as a default to avoid breaking changes. I would find it very useful for return useful details when a DbtShellTask fails… What do you think?
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Can you expand on this a bit? What would you want to do with access to the logs in the task, vs streaming them to cloud as is (as added/improved in https://github.com/PrefectHQ/prefect/pull/4322).
    ale

    ale

    1 year ago
    My current use case is the ability to send those logs as part of a Slack notification
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Ah, gotcha.
    ale

    ale

    1 year ago
    Does it make sense to you Jim?
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    The current
    ShellTask
    is kind of becoming bloated with options, how we expose this may require some thought. I do agree that the use case makes sense though.
    I'll open an issue.
    Actually, is that not done already if you pass
    return_all=True
    ?
    Michael Adkins

    Michael Adkins

    1 year ago
    It should be attached to the state, yeah.
    If you want it to be a part of the state message I think this is a good case for a state handler.
    ale

    ale

    1 year ago
    Yes it is! Sorry guys, I’m still on
    0.13.13
    where this is not available. Hope to upgrade to the latest very soon! Thanks a lot for the guidance 😒imple_smile: