@@ -50144,7 +50144,7 @@ const core = __importStar(__nccwpck_require__(7484));
5014450144const client_cloudformation_1 = __nccwpck_require__(3805);
5014550145function waitUntilStackOperationComplete(params, input) {
5014650146 return __awaiter(this, void 0, void 0, function* () {
50147- var _a, _b;
50147+ var _a, _b, _c ;
5014850148 const { client, maxWaitTime, minDelay, changeSetId } = params;
5014950149 const startTime = Date.now();
5015050150 while (Date.now() - startTime < maxWaitTime * 1000) {
@@ -50177,20 +50177,22 @@ function waitUntilStackOperationComplete(params, input) {
5017750177 let failureReason = `Stack operation failed with status: ${status}`;
5017850178 if (changeSetId) {
5017950179 try {
50180+ core.info(`Attempting to get failure details for change set: ${changeSetId}`);
5018050181 const events = yield client.send(new client_cloudformation_1.DescribeEventsCommand({
5018150182 ChangeSetName: changeSetId,
5018250183 Filters: { FailedEvents: true }
5018350184 }));
50184- const failedEvents = (_b = events.OperationEvents) === null || _b === void 0 ? void 0 : _b.filter(event => event.ResourceStatusReason);
50185+ core.info(`Retrieved ${((_b = events.OperationEvents) === null || _b === void 0 ? void 0 : _b.length) || 0} failed events`);
50186+ const failedEvents = (_c = events.OperationEvents) === null || _c === void 0 ? void 0 : _c.filter(event => event.ResourceStatusReason);
5018550187 if (failedEvents && failedEvents.length > 0) {
5018650188 const reasons = failedEvents
5018750189 .map(event => `${event.LogicalResourceId}: ${event.ResourceStatusReason}`)
5018850190 .join('; ');
5018950191 failureReason += `. Failed resources: ${reasons}`;
5019050192 }
5019150193 }
50192- catch (_c ) {
50193- // Ignore errors getting events
50194+ catch (error ) {
50195+ core.info(`Failed to get event details: ${error}`);
5019450196 }
5019550197 }
5019650198 throw new Error(failureReason);
0 commit comments