From 8f8628dd201b3ac3375cb3c4506e7170bdc8598c Mon Sep 17 00:00:00 2001 From: Kelvin Chappell Date: Thu, 5 Dec 2024 16:24:59 +0000 Subject: [PATCH] Configure schedule and memory for AmigoBakePackages task (#1352) * Configure schedule and memory for AmigoBakePackages task * Update test snapshot --- .../cdk/lib/__snapshots__/service-catalogue.test.ts.snap | 6 +++--- packages/cdk/lib/cloudquery/index.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/cdk/lib/__snapshots__/service-catalogue.test.ts.snap b/packages/cdk/lib/__snapshots__/service-catalogue.test.ts.snap index 7c2b966e1..a849e5a0c 100644 --- a/packages/cdk/lib/__snapshots__/service-catalogue.test.ts.snap +++ b/packages/cdk/lib/__snapshots__/service-catalogue.test.ts.snap @@ -71,7 +71,7 @@ exports[`The ServiceCatalogue stack matches the snapshot 1`] = ` "Resources": { "CloudquerySourceAmigoBakePackagesScheduledEventRule3FDBCEB5": { "Properties": { - "ScheduleExpression": "rate(1 day)", + "ScheduleExpression": "cron(0 3 * * ? *)", "State": "ENABLED", "Targets": [ { @@ -416,7 +416,7 @@ spec: "Environment": [ { "Name": "GOMEMLIMIT", - "Value": "409MiB", + "Value": "819MiB", }, ], "Essential": true, @@ -681,7 +681,7 @@ spec: ], }, "Family": "ServiceCatalogueCloudquerySourceAmigoBakePackagesTaskDefinition07388B36", - "Memory": "512", + "Memory": "1024", "NetworkMode": "awsvpc", "RequiresCompatibilities": [ "FARGATE", diff --git a/packages/cdk/lib/cloudquery/index.ts b/packages/cdk/lib/cloudquery/index.ts index 3be15f2fc..e58d36d7d 100644 --- a/packages/cdk/lib/cloudquery/index.ts +++ b/packages/cdk/lib/cloudquery/index.ts @@ -626,13 +626,14 @@ export function addCloudqueryEcsCluster( const amigoBakePackagesSource: CloudquerySource = { name: 'AmigoBakePackages', description: 'Packages installed in Amigo bakes.', - schedule: nonProdSchedule ?? Schedule.rate(Duration.days(1)), + schedule: nonProdSchedule ?? Schedule.cron({ minute: '0', hour: '3' }), config: amigoBakePackagesConfig( baseImagesTableName, recipesTableName, bakesTableName, packagesBucket.bucketName, ), + memoryLimitMiB: 1024, policies: [ readDynamoDbTablePolicy( GuardianAwsAccounts.DeployTools,