Skip to content

Commit f2591bb

Browse files
chore: decrease log level for some logs
1 parent f93f988 commit f2591bb

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

  • lambdas/functions/control-plane/src/scale-runners

lambdas/functions/control-plane/src/scale-runners/scale-up.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -419,38 +419,36 @@ export async function scaleUp(payloads: ActionRequestMessageSQS[]): Promise<stri
419419
const queuedMessages: ActionRequestMessageSQS[] = [];
420420

421421
if (messages.length > 0 && dynamicEc2ConfigEnabled) {
422-
logger.info('Dynamic EC2 config enabled, processing labels', {labels: messages[0].labels});
422+
logger.debug('Dynamic EC2 config enabled, processing labels', {labels: messages[0].labels});
423423

424-
const ec2Labels =
424+
const dynamicEC2Labels =
425425
messages[0].labels
426426
?.map(l => l.trim())
427427
.filter(l => l.startsWith('ghr-ec2-')) ?? [];
428428

429-
logger.info('EC2 labels detected', { ec2Labels });
430-
431-
if (ec2Labels.length > 0) {
429+
if (dynamicEC2Labels.length > 0) {
432430
// Append all EC2 labels to runnerLabels
433431
runnerLabels = runnerLabels
434-
? `${runnerLabels},${ec2Labels.join(',')}`
435-
: ec2Labels.join(',');
432+
? `${runnerLabels},${dynamicEC2Labels.join(',')}`
433+
: dynamicEC2Labels.join(',');
436434

437-
logger.info('Updated runner labels', { runnerLabels });
435+
logger.debug('Updated runner labels', { runnerLabels });
438436

439437
// Extract instance type from EC2 labels
440-
const requestedInstanceType = ec2Labels
438+
const requestedInstanceType = dynamicEC2Labels
441439
.find(l => l.startsWith('ghr-ec2-instance-type:'))
442440
?.replace('ghr-ec2-instance-type:', '');
443441

444442
if (requestedInstanceType) {
445443
instanceTypes = [requestedInstanceType];
446-
logger.info('EC2 instance type requested', {
444+
logger.debug('EC2 instance type requested', {
447445
instanceType: requestedInstanceType,
448446
});
449447
} else {
450-
logger.info('No EC2 instance type label found');
448+
logger.debug('No dynamic EC2 instance type label found');
451449
}
452450
} else {
453-
logger.info('No EC2 labels found on message');
451+
logger.debug('No dynamic EC2 labels found on message');
454452
}
455453
}
456454

0 commit comments

Comments
 (0)