fix: ensure all post steps are executed (#1286)

This fixes an issue in the chain of post steps introduced
while updating the step-logger for composite actions.

It includes a test case so we make sure this does not happen
again.
This commit is contained in:
Markus Wolf
2022-07-29 21:43:24 +02:00
committed by GitHub
parent 9d76bac4ef
commit 3364f95569
7 changed files with 34 additions and 2 deletions

View File

@@ -160,8 +160,7 @@ func (rc *RunContext) compositeExecutor(action *model.Action) *compositeSteps {
// run the post executor in reverse order
if postExecutor != nil {
stepPost := rc.newCompositeCommandExecutor(step.post())
postExecutor = newCompositeStepLogExecutor(stepPost, stepID)
stepPost.Finally(postExecutor)
postExecutor = newCompositeStepLogExecutor(stepPost.Finally(postExecutor), stepID)
} else {
stepPost := rc.newCompositeCommandExecutor(step.post())
postExecutor = newCompositeStepLogExecutor(stepPost, stepID)