Skip to content

Commit 6393a72

Browse files
committed
Remove filters and post-filtering to debug execution error events
1 parent e8f89ad commit 6393a72

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

dist/index.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50144,7 +50144,7 @@ const core = __importStar(__nccwpck_require__(7484));
5014450144
const client_cloudformation_1 = __nccwpck_require__(3805);
5014550145
function waitUntilStackOperationComplete(params, input) {
5014650146
return __awaiter(this, void 0, void 0, function* () {
50147-
var _a, _b, _c;
50147+
var _a, _b;
5014850148
const { client, maxWaitTime, minDelay, changeSetId } = params;
5014950149
const startTime = Date.now();
5015050150
while (Date.now() - startTime < maxWaitTime * 1000) {
@@ -50179,16 +50179,12 @@ function waitUntilStackOperationComplete(params, input) {
5017950179
try {
5018050180
core.info(`Attempting to get failure details for change set: ${changeSetId}`);
5018150181
const events = yield client.send(new client_cloudformation_1.DescribeEventsCommand({
50182-
ChangeSetName: changeSetId,
50183-
Filters: { FailedEvents: true }
50182+
ChangeSetName: changeSetId
5018450183
}));
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);
50187-
if (failedEvents && failedEvents.length > 0) {
50188-
const reasons = failedEvents
50189-
.map(event => `${event.LogicalResourceId}: ${event.ResourceStatusReason}`)
50190-
.join('; ');
50191-
failureReason += `. Failed resources: ${reasons}`;
50184+
core.info(`Retrieved ${((_b = events.OperationEvents) === null || _b === void 0 ? void 0 : _b.length) || 0} events`);
50185+
// Log all events to see their structure
50186+
if (events.OperationEvents && events.OperationEvents.length > 0) {
50187+
core.info(`Events: ${JSON.stringify(events.OperationEvents, null, 2)}`);
5019250188
}
5019350189
}
5019450190
catch (error) {

src/deploy.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,15 @@ async function waitUntilStackOperationComplete(
7676
)
7777
const events = await client.send(
7878
new DescribeEventsCommand({
79-
ChangeSetName: changeSetId,
80-
Filters: { FailedEvents: true }
79+
ChangeSetName: changeSetId
8180
})
8281
)
8382
core.info(
84-
`Retrieved ${events.OperationEvents?.length || 0} failed events`
83+
`Retrieved ${events.OperationEvents?.length || 0} events`
8584
)
86-
const failedEvents = events.OperationEvents?.filter(
87-
event => event.ResourceStatusReason
88-
)
89-
if (failedEvents && failedEvents.length > 0) {
90-
const reasons = failedEvents
91-
.map(
92-
event =>
93-
`${event.LogicalResourceId}: ${event.ResourceStatusReason}`
94-
)
95-
.join('; ')
96-
failureReason += `. Failed resources: ${reasons}`
85+
// Log all events to see their structure
86+
if (events.OperationEvents && events.OperationEvents.length > 0) {
87+
core.info(`Events: ${JSON.stringify(events.OperationEvents, null, 2)}`)
9788
}
9889
} catch (error) {
9990
core.info(`Failed to get event details: ${error}`)

0 commit comments

Comments
 (0)