diff --git a/CHANGELOG.md b/CHANGELOG.md index 965e233..244969f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - panic when registry uri parsing errors - do not mask single-character secrets - capture stage duration on failure +- capture dag errors +- capture oom kill and exit code +- cancel step on semaphore deadline exceeded ### Added - support for running a single pipeline on-demand diff --git a/pipeline/runtime/execer.go b/pipeline/runtime/execer.go index 30e6929..1472088 100644 --- a/pipeline/runtime/execer.go +++ b/pipeline/runtime/execer.go @@ -116,6 +116,13 @@ func (e *Execer) Exec(ctx context.Context, spec Spec, state *pipeline.State) err log.Error(err) } result = multierror.Append(result, err) + + // if the pipeline is not in a failing state, + // returning an unexpected error must place the + // pipeline in a failing state. + if !state.Failed() { + state.FailAll(err) + } } // once pipeline execution completes, notify the state @@ -258,6 +265,7 @@ func (e *Execer) exec(ctx context.Context, state *pipeline.State, spec Spec, ste } err := e.reporter.ReportStep(noContext, state, step.GetName()) if err != nil { + log.Warnln("cannot report step status.") result = multierror.Append(result, err) } // if the exit code is 78 the system will skip all @@ -280,6 +288,7 @@ func (e *Execer) exec(ctx context.Context, state *pipeline.State, spec Spec, ste state.Fail(step.GetName(), err) err = e.reporter.ReportStep(noContext, state, step.GetName()) if err != nil { + log.Warnln("cannot report step failure.") result = multierror.Append(result, err) } return result