Skip to content

Commit 39f324c

Browse files
chore: decrease log level for some logs
1 parent cc4efa6 commit 39f324c

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

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

402-
const ec2Labels =
402+
const dynamicEC2Labels =
403403
messages[0].labels
404404
?.map(l => l.trim())
405405
.filter(l => l.startsWith('ghr-ec2-')) ?? [];
406406

407-
logger.info('EC2 labels detected', { ec2Labels });
408-
409-
if (ec2Labels.length > 0) {
407+
if (dynamicEC2Labels.length > 0) {
410408
// Append all EC2 labels to runnerLabels
411409
runnerLabels = runnerLabels
412-
? `${runnerLabels},${ec2Labels.join(',')}`
413-
: ec2Labels.join(',');
410+
? `${runnerLabels},${dynamicEC2Labels.join(',')}`
411+
: dynamicEC2Labels.join(',');
414412

415-
logger.info('Updated runner labels', { runnerLabels });
413+
logger.debug('Updated runner labels', { runnerLabels });
416414

417415
// Extract instance type from EC2 labels
418-
const requestedInstanceType = ec2Labels
416+
const requestedInstanceType = dynamicEC2Labels
419417
.find(l => l.startsWith('ghr-ec2-instance-type:'))
420418
?.replace('ghr-ec2-instance-type:', '');
421419

422420
if (requestedInstanceType) {
423421
instanceTypes = [requestedInstanceType];
424-
logger.info('EC2 instance type requested', {
422+
logger.debug('EC2 instance type requested', {
425423
instanceType: requestedInstanceType,
426424
});
427425
} else {
428-
logger.info('No EC2 instance type label found');
426+
logger.debug('No dynamic EC2 instance type label found');
429427
}
430428
} else {
431-
logger.info('No EC2 labels found on message');
429+
logger.debug('No dynamic EC2 labels found on message');
432430
}
433431
}
434432

0 commit comments

Comments
 (0)