Preserve smoke observer failures independently of readiness
This commit is contained in:
@@ -62,7 +62,6 @@ func executePreflight(invocation commandkit.Invocation, input pipelineRunInput,
|
||||
report.Checks = append(report.Checks, preflightCheck{ID: id, Scope: scope, Result: result, Message: message})
|
||||
}
|
||||
finish := func(outcome commandkit.Outcome) commandkit.Outcome {
|
||||
report.Ready = outcome.Status == 0
|
||||
report.DebugDirectory = capture.Path()
|
||||
if err := capture.Finalize(report, outcome.Cause); err != nil {
|
||||
if outcome.Status == 0 {
|
||||
@@ -200,8 +199,10 @@ func executePreflight(invocation commandkit.Invocation, input pipelineRunInput,
|
||||
add(string(observation.Kind), scope, "passed", fmt.Sprintf("%s check passed for profile %q.", observation.Kind, observation.ProfileID))
|
||||
}
|
||||
}
|
||||
// Recording failure is independent of a completed diagnostic assessment.
|
||||
report.Ready = !failedCheck && len(observations) == 2*len(targets.Access)+len(targets.Profiles) && ctx.Err() == nil
|
||||
if err != nil {
|
||||
if !failedCheck {
|
||||
if !failedCheck && !report.Ready {
|
||||
if capture.Err() != nil {
|
||||
add("debug", preflightScope{Path: capture.Path()}, "failed", err.Error())
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user