Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to latest GuCDK/CDK #2660

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions cdk/lib/__snapshots__/alarms-handler.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,24 @@ exports[`The alarms-handler stack matches the snapshot 1`] = `
"Namespace": "AWS/SQS",
"Period": 60,
"Statistic": "Sum",
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
"Threshold": 0,
},
"Type": "AWS::CloudWatch::Alarm",
Expand Down Expand Up @@ -182,6 +200,9 @@ exports[`The alarms-handler stack matches the snapshot 1`] = `
},
"FunctionName": "alarms-handler-CODE",
"Handler": "index.handler",
"LoggingConfig": {
"LogFormat": "JSON",
},
Comment on lines +203 to +205
Copy link
Member Author

@johnduffell johnduffell Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default is now JSON
guardian/cdk#2260

Copy link
Member Author

@johnduffell johnduffell Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't look reasonable at all, so I think we will have to override this everywhere
BEFORE
image
AFTER
image

"MemorySize": 1024,
"Role": {
"Fn::GetAtt": [
Expand Down Expand Up @@ -408,6 +429,28 @@ exports[`The alarms-handler stack matches the snapshot 1`] = `
"FunctionName": {
"Ref": "alarmshandlerlambda383D2BAA",
},
"Tags": [
{
"Key": "App",
"Value": "alarms-handler",
},
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
Comment on lines +432 to +453
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are mostly standard tags that devex like to have on everything to help with their analysis. They would not cause any rumtime issues.

},
"Type": "AWS::Lambda::EventSourceMapping",
},
Expand Down Expand Up @@ -731,6 +774,24 @@ exports[`The alarms-handler stack matches the snapshot 2`] = `
"Namespace": "AWS/SQS",
"Period": 60,
"Statistic": "Sum",
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "PROD",
},
],
"Threshold": 0,
},
"Type": "AWS::CloudWatch::Alarm",
Expand Down Expand Up @@ -804,6 +865,9 @@ exports[`The alarms-handler stack matches the snapshot 2`] = `
},
"FunctionName": "alarms-handler-PROD",
"Handler": "index.handler",
"LoggingConfig": {
"LogFormat": "JSON",
},
"MemorySize": 1024,
"Role": {
"Fn::GetAtt": [
Expand Down Expand Up @@ -1030,6 +1094,28 @@ exports[`The alarms-handler stack matches the snapshot 2`] = `
"FunctionName": {
"Ref": "alarmshandlerlambda383D2BAA",
},
"Tags": [
{
"Key": "App",
"Value": "alarms-handler",
},
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "PROD",
},
],
},
"Type": "AWS::Lambda::EventSourceMapping",
},
Expand Down
42 changes: 42 additions & 0 deletions cdk/lib/__snapshots__/discount-api.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ exports[`The Discount API stack matches the snapshot 1`] = `
"Namespace": "AWS/ApiGateway",
"Period": 300,
"Statistic": "Sum",
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "CODE",
},
],
"Threshold": 1,
},
"Type": "AWS::CloudWatch::Alarm",
Expand Down Expand Up @@ -278,6 +296,9 @@ exports[`The Discount API stack matches the snapshot 1`] = `
},
"FunctionName": "discount-api-CODE",
"Handler": "index.handler",
"LoggingConfig": {
"LogFormat": "JSON",
},
"MemorySize": 1024,
"Role": {
"Fn::GetAtt": [
Expand Down Expand Up @@ -1049,6 +1070,24 @@ exports[`The Discount API stack matches the snapshot 2`] = `
"Namespace": "AWS/ApiGateway",
"Period": 300,
"Statistic": "Sum",
"Tags": [
{
"Key": "gu:cdk:version",
"Value": "TEST",
},
{
"Key": "gu:repo",
"Value": "guardian/support-service-lambdas",
},
{
"Key": "Stack",
"Value": "membership",
},
{
"Key": "Stage",
"Value": "PROD",
},
],
"Threshold": 1,
},
"Type": "AWS::CloudWatch::Alarm",
Expand Down Expand Up @@ -1246,6 +1285,9 @@ exports[`The Discount API stack matches the snapshot 2`] = `
},
"FunctionName": "discount-api-PROD",
"Handler": "index.handler",
"LoggingConfig": {
"LogFormat": "JSON",
},
"MemorySize": 1024,
"Role": {
"Fn::GetAtt": [
Expand Down
Loading