Skip to content

when using --output-group-error-only, get a lot of output from interrupted tasks unrelated to root error #2174

Open
@brigitops

Description

@brigitops

Description

I'm trying to use task to parallelize a complex build and the wall clock savings are huge - about 40% - but the output is very confusing if any task fails. Task doesn't finish off by writing out which particular task was first to fail, so you have to trawl through all the output to find the issue. This leads to a poor developer experience, with developers trying to fix whatever happened to output last, rather than what actually went wrong.

I tried to solve this with the following options:

task --output group --output-group-error-only --output-group-end 'FAILED TASK: {{.TASK}}'

And that helps, but only a little. I still get a lot of irrelevant output, because task is outputting errors caused by its own interrupting of tasks. If task A fails, and task B, C, D, E are all interrupted due to that failure, I want to see the output of task A, and don't care about the other tasks. I'd only want to see their output if the interrupt came from elsewhere, like if the OS sent task itself a SIGINT, or if the task refused to gracefully exit and had to be sent another signal.

It'd be tolerable if task signed off with a message saying what actually was the root failure. But it doesn't do that, and my attempt to make it do that with --output-group-end doesn't really solve the problem because it'll be the last task that happens to gracefully exit from being interrupted that comes at the actual end.

So I think, either task needs to swallow the output from the tasks that didn't cause the failure, or it needs to write out a final message at the end that's more helpful about tasks it got an error from (that it didn't itself choose to interrupt).

Version

3.42.1

Operating system

linux

Experiments Enabled

None

Example Taskfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions