Skip to content

runExec doesn't modify StepResult

Cameron Swords requested to merge run-exec-doesnt-modify-step-runner into main

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.runSteps should return a StepResult instead of accepting one as a parameter and modifying it.
  • The file context.step_results.go can 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

Merge request reports

Loading