JustinPihony / gradle-aws-plugin-reboot

Gradle plugin to manage Amazon Web Services
6 stars 5 forks source link

Fix problem where exception thrown from getStackEvents gets ignored #6

Closed tkgregory closed 3 years ago

tkgregory commented 3 years ago

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.