runExec doesn't modify StepResult
What does this MR do?
StepResult is conceptually immutable - a step runs once, so any returned result should never need to change. In contrast, the step-runner code changes StepResult in many places.
This MR updates the Execution.runExec function to return a StepResult, instead of accepting one as a parameter. This is a first step towards converting StepResult to a domain object instead of using proto.StepResult.
Next steps
-
Execution.runStepsshould return aStepResultinstead of accepting one as a parameter and modifying it. - The file
context.step_results.gocan change to define a custom Step Result. - Use the custom Step Result in
context.Steps, pass either the domain object or a new type when interpolating values.
Reference
Restrict access to internal variables in expres... (#100 - closed)
Edited by Cameron Swords