Skip to content

Commit 535c596

Browse files
committed
cd(reportextractor): Configure deployment of GuCDK defined lambda
Riff-Raff's tag based lambda discovery expects to find one lambda. Currently, the YAML and GuCDK lambdas have the same tags, therefore we have to configure `riff-raff.yaml` with `functionNames` and explicitly name the GuCDK lambda.
1 parent 4df30d0 commit 535c596

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/report.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
report-cfn:
8585
- cdk/cdk.out/Report-CODE.template.json
8686
- cdk/cdk.out/Report-PROD.template.json
87+
reportextractor:
88+
- reportextractor.jar
8789
legacy-reportextractor:
8890
- reportextractor.jar
8991
legacy-reportextractor-cfn:

cdk/lib/__snapshots__/report.test.ts.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ exports[`The Report stack matches the snapshot for CODE 1`] = `
725725
"Stage": "CODE",
726726
},
727727
},
728+
"FunctionName": "mobile-notifications-reportextractor-CODE",
728729
"Handler": "com.gu.notifications.extractor.Lambda",
729730
"LoggingConfig": {
730731
"LogFormat": "Text",
@@ -1990,6 +1991,7 @@ exports[`The Report stack matches the snapshot for PROD 1`] = `
19901991
"Stage": "PROD",
19911992
},
19921993
},
1994+
"FunctionName": "mobile-notifications-reportextractor-PROD",
19931995
"Handler": "com.gu.notifications.extractor.Lambda",
19941996
"LoggingConfig": {
19951997
"LogFormat": "Text",

cdk/lib/report.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ export class Report extends GuStack {
149149
Stage: stage,
150150
App: reportExtractorApp,
151151
},
152+
153+
functionName: [stack, reportExtractorApp, stage].join('-'),
152154
});
153155

154156
reportExtractor.addToRolePolicy(

report/conf/riff-raff.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ deployments:
1919
bucketSsmLookup: true
2020
bucketSsmKey: /account/services/artifact.bucket.n10n
2121
dependencies: [report-cfn]
22+
reportextractor:
23+
type: aws-lambda
24+
app: reportextractor
25+
parameters:
26+
bucketSsmLookup: true
27+
bucketSsmKey: /account/services/artifact.bucket.n10n
28+
functionNames: [mobile-notifications-reportextractor-] # TODO switch to tag based lookup once the legacy YAML lambda has been deleted
29+
fileName: reportextractor.jar
30+
prefixStack: false
31+
dependencies: [report-cfn]
2232

2333
legacy-reportextractor:
2434
type: aws-lambda

0 commit comments

Comments
 (0)