mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
fix(cloudformation): propagate nested stack failure status reason and cover changeset rollbacks (#3921)
When a nested stack fails with no status reason of its own, as after an UPDATE_ROLLBACK_COMPLETE, the parent's ChildStack event now says the nested stack rolled back or failed with its terminal status instead of "failed: null". Cover the changeset create and update rollback paths, asserting the parent's ResourceStatusReason, and restore the @Test on the nested-output regression test.
This commit is contained in:
1 parent
ee4acfdf81
commit
a5254defb6
2 files changed
+217
-1
No files matched your search
+7
-1
@@ -2418,7 +2418,13 @@ public class CloudFormationService implements ResourceProvider {
|
||||
resource.setStatus("CREATE_COMPLETE");
|
||||
} else {
|
||||
resource.setStatus("CREATE_FAILED");
|
||||
resource.setStatusReason("Nested stack " + childStackName + " failed: " + childStack.getStatusReason());
|
||||
String reason = childStack.getStatusReason();
|
||||
if (reason == null || reason.isBlank()) {
|
||||
reason = "Nested stack " + childStackName + " rolled back or failed with status " + childStack.getStatus();
|
||||
} else {
|
||||
reason = "Nested stack " + childStackName + " failed: " + reason;
|
||||
}
|
||||
resource.setStatusReason(reason);
|
||||
}
|
||||
|
||||
return resource;
|
||||
|
||||
Reference in new issue
Block a user