Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 649ad35

Browse files
authored
fix: change log level for termination watcher if no match (#3866)
Changed log level to debug in case no match. Deploying the lambda multiple times in a single aws account will create unrelated warning logs otherwise.
1 parent 8e47807 commit 649ad35

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lambdas/functions/termination-watcher/src/lambda.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { interruptionWarning } from './lambda';
77
import { SpotInterruptionWarning, SpotTerminationDetail } from './types';
88

99
jest.mock('./termination-warning');
10-
//jest.mock('@terraform-aws-github-runner/aws-powertools-util');
1110

1211
process.env.POWERTOOLS_METRICS_NAMESPACE = 'test';
1312
process.env.POWERTOOLS_TRACE_ENABLED = 'true';

lambdas/functions/termination-watcher/src/termination-warning.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function handle(event: SpotInterruptionWarning<SpotTerminationDetail>, con
4949
);
5050
}
5151
} else {
52-
logger.warn(
52+
logger.debug(
5353
`Received spot termination notification warning for instance ${event.detail['instance-id']} but ` +
5454
`details are not available or instance not matching the tag fileter (${config.tagFilters}).`,
5555
);

0 commit comments

Comments
 (0)