Skip to content

Commit

Permalink
Fix unnecessary writing of successful output to failure in the event …
Browse files Browse the repository at this point in the history
…that the prior plan had failed but the current one is successful (#52)

Signed-off-by: Chris Kim <[email protected]>
  • Loading branch information
Oats87 authored Aug 24, 2021
1 parent 7662889 commit 3703146
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/k8splan/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (w *watcher) start(ctx context.Context) {
}
}

if errorFromApply != nil || wasFailedPlan {
if errorFromApply != nil || (wasFailedPlan && !needsApplied) {
logrus.Debugf("[K8s] Plan with checksum (%s) failed during application", cp.Checksum)
// Update the corresponding counts/outputs
secret.Data[failedChecksumKey] = []byte(cp.Checksum)
Expand Down

0 comments on commit 3703146

Please sign in to comment.