This problem could happen, for example, if the IAM role used to run the Gradle task doesn't have the cloudformation:DescribeStackEvents permission.
If found == true exceptions are ignored. This code change defers the setting of this magic flag until after the describe stacks call has been made.
This means if describe stacks fails, it will now correctly throw an exception.
I can't be certain that this change won't have unintended side-effects. If it does, I suggest we fix them as they occur, using more fine-grained and robust exception handling logic.
This problem could happen, for example, if the IAM role used to run the Gradle task doesn't have the
cloudformation:DescribeStackEvents
permission.If
found == true
exceptions are ignored. This code change defers the setting of this magic flag until after the describe stacks call has been made.This means if describe stacks fails, it will now correctly throw an exception.
I can't be certain that this change won't have unintended side-effects. If it does, I suggest we fix them as they occur, using more fine-grained and robust exception handling logic.