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

update to latest GuCDK/CDK #2660

wants to merge 1 commit into from

Conversation

johnduffell
Copy link
Member

@johnduffell johnduffell commented Jan 29, 2025

We are on quite an old GuCDK.

This PR updates to the latest.

This is needed so that I can add tags to alarms, which has only been supported since aws/aws-cdk#29759 (comment)

I have commented all the types of change that are in the files, but I think the only one that would change the behaviour would be the log format.

TODO show an example of the new log format in this description

Comment on lines +203 to +205
"LoggingConfig": {
"LogFormat": "JSON",
},
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

@johnduffell johnduffell marked this pull request as draft January 29, 2025 14:53
Comment on lines +432 to +453
"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",
},
],
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.

"states",
],
},
"Service": "states.amazonaws.com",
Copy link
Member Author

Choose a reason for hiding this comment

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

I assume we had to use the right url before, but AWS have made a standard one now. I haven't looked it up for sure though to confirm.

@@ -389,7 +283,7 @@ exports[`The discount-expiry-notifier stack matches the snapshot 1`] = `
"Arn",
],
},
"","Payload.$":"$"}},"Email sends processor map":{"Type":"Map","ResultPath":"$.discountProcessingAttempts","Next":"Save results","Parameters":{"item.$":"$$.Map.Item.Value"},"Iterator":{"StartAt":"Check sub is active","States":{"Check sub is active":{"Next":"Is Subscription Active?","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload","Resource":"arn:",
"","Payload.$":"$"}},"Email sends processor map":{"Type":"Map","ResultPath":"$.discountProcessingAttempts","Next":"Save results","Parameters":{"item.$":"$$.Map.Item.Value"},"ItemsPath":"$.expiringDiscountsToProcess","MaxConcurrency":10,"Iterator":{"StartAt":"Check sub is active","States":{"Check sub is active":{"Next":"Is Subscription Active?","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload","Resource":"arn:",
Copy link
Member Author

Choose a reason for hiding this comment

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

this is just a reordering of the values

@@ -563,6 +575,7 @@ def submit_response(event: dict, context, response_status: str, error_message: s
"Arn",
],
},
"SkipDestinationValidation": false,
Copy link
Member Author

Choose a reason for hiding this comment

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

managed = props.get('Managed', 'true').lower() == 'true'
skipDestinationValidation = props.get('SkipDestinationValidation', 'false').lower() == 'true'
Copy link
Member Author

Choose a reason for hiding this comment

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

this is a lambda that is defined by CDK itself, rahter than AWS functuoinality. they have updated the implementation and python version, causing a lot of diffs, but (hopefully) the lambda will work the same

@@ -15,11 +15,11 @@
"fix-formatting": "prettier --write **.ts"
},
"devDependencies": {
"@guardian/cdk": "52.3.0",
"@guardian/cdk": "61.1.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +21 to +22
"aws-cdk": "2.175.1",
"aws-cdk-lib": "2.175.1",
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant