Implement Streaming of StepResults
Problem
Customers want step job logs as the job executes, not all together once the job completes.
The "shim", used to execute steps while steps is experimental, supports streaming logs. Once the shim is removed, logs should still be streamed.
Proposal
Currently execution of Execution.Run returns only when execution of all steps in the RunRequest complete, ans there is only one final StepResult. This essentially makes the FollowSteps API (which is supposed to be streaming), blocking. We want StepResults to be streamed to the caller as they happen, for each step in the RunRequest.
One possible approach is to define something like
type StepResultWriter interface {
Write(*proto.StepResult) error
}
And add one of those to the context.Global struct. Then somewhere in here and/or here, when the StepResult for a step is populated, write it to the StepResultWriter.