Skip to content

Commit 0c026d7

Browse files
chore: decrease log level for some logs
1 parent 5f56ef9 commit 0c026d7

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
@@ -417,38 +417,36 @@ export async function scaleUp(payloads: ActionRequestMessageSQS[]): Promise<stri
417417
const queuedMessages: ActionRequestMessageSQS[] = [];
418418

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

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

427-
logger.info('EC2 labels detected', { ec2Labels });
428-
429-
if (ec2Labels.length > 0) {
427+
if (dynamicEC2Labels.length > 0) {
430428
// Append all EC2 labels to runnerLabels
431429
runnerLabels = runnerLabels
432-
? `${runnerLabels},${ec2Labels.join(',')}`
433-
: ec2Labels.join(',');
430+
? `${runnerLabels},${dynamicEC2Labels.join(',')}`
431+
: dynamicEC2Labels.join(',');
434432

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

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

442440
if (requestedInstanceType) {
443441
instanceTypes = [requestedInstanceType];
444-
logger.info('EC2 instance type requested', {
442+
logger.debug('EC2 instance type requested', {
445443
instanceType: requestedInstanceType,
446444
});
447445
} else {
448-
logger.info('No EC2 instance type label found');
446+
logger.debug('No dynamic EC2 instance type label found');
449447
}
450448
} else {
451-
logger.info('No EC2 labels found on message');
449+
logger.debug('No dynamic EC2 labels found on message');
452450
}
453451
}
454452

0 commit comments

Comments
 (0)