Skip to content

Add metadata with more bare results to Result #68

@gisostallenberg

Description

@gisostallenberg

After tasks are run a Result is created, but some result data is formatted or discarded.
For example if a Process fails:

        return Result::failure(
            $task,
            "Exit {$process->getExitCode()}: {$process->getExitCodeText()}",
            $process->getOutput().$process->getErrorOutput()
        );

in ProcessTaskRunner makes it impossible to get the Process and for example get the exit code (without extracting it from the description).

I suggest to add an array with metadata as last argument of Result::__construct and all related static methods which can accept various data regarding the run of the task. The Process for a process task run, the plain output for a callback task run, the plain output and exit code for a command task run, ...

An alternative would be to add an AfterTaskRun event with the above details of the task that ran and dispatch this in each task runners invoke method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions