Skip to content

Commit fcbfb94

Browse files
committed
Remove irrelevant change set event logging for execution errors
1 parent 31fa6d3 commit fcbfb94

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

dist/index.js

Lines changed: 1 addition & 17 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;
50147+
var _a;
5014850148
const { client, maxWaitTime, minDelay, changeSetId } = params;
5014950149
const startTime = Date.now();
5015050150
while (Date.now() - startTime < maxWaitTime * 1000) {
@@ -50175,22 +50175,6 @@ function waitUntilStackOperationComplete(params, input) {
5017550175
status === 'IMPORT_ROLLBACK_FAILED') {
5017650176
// Get failed events using change set ID if available
5017750177
let failureReason = `Stack operation failed with status: ${status}`;
50178-
if (changeSetId) {
50179-
try {
50180-
core.info(`Attempting to get failure details for change set: ${changeSetId}`);
50181-
const events = yield client.send(new client_cloudformation_1.DescribeEventsCommand({
50182-
ChangeSetName: changeSetId
50183-
}));
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)}`);
50188-
}
50189-
}
50190-
catch (error) {
50191-
core.info(`Failed to get event details: ${error}`);
50192-
}
50193-
}
5019450178
throw new Error(failureReason);
5019550179
}
5019650180
// In-progress states - keep waiting

src/deploy.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,6 @@ async function waitUntilStackOperationComplete(
6969
) {
7070
// Get failed events using change set ID if available
7171
let failureReason = `Stack operation failed with status: ${status}`
72-
if (changeSetId) {
73-
try {
74-
core.info(
75-
`Attempting to get failure details for change set: ${changeSetId}`
76-
)
77-
const events = await client.send(
78-
new DescribeEventsCommand({
79-
ChangeSetName: changeSetId
80-
})
81-
)
82-
core.info(
83-
`Retrieved ${events.OperationEvents?.length || 0} events`
84-
)
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)}`)
88-
}
89-
} catch (error) {
90-
core.info(`Failed to get event details: ${error}`)
91-
}
92-
}
9372
throw new Error(failureReason)
9473
}
9574

0 commit comments

Comments
 (0)