Skip to content

Commit a977713

Browse files
committed
Avoid “Resource update cancelled” as UPDATE_FAILED reason
When a resource update fails, concurrently updated resources also fail with “Resource update cancelled” reason, and these events happen after the actual culprit. Since events are scanned backwards, skip such “cancelled” failures, increasing the likelihood of reporting the actual stack update failure reason.
1 parent b63ad54 commit a977713

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func run(ctx context.Context, stackName string, args []string) error {
126126
if evt.ClientRequestToken == nil || *evt.ClientRequestToken != token {
127127
continue
128128
}
129-
if evt.ResourceStatus == types.ResourceStatusUpdateFailed {
129+
if evt.ResourceStatus == types.ResourceStatusUpdateFailed && aws.ToString(evt.ResourceStatusReason) != "Resource update cancelled" {
130130
return fmt.Errorf("%v: %s", evt.ResourceStatus, aws.ToString(evt.ResourceStatusReason))
131131
}
132132
debugf("%s\t%s\t%v", aws.ToString(evt.ResourceType), aws.ToString(evt.LogicalResourceId), evt.ResourceStatus)

0 commit comments

Comments
 (0)