-
Notifications
You must be signed in to change notification settings - Fork 6
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
base: main
Are you sure you want to change the base?
Conversation
"LoggingConfig": { | ||
"LogFormat": "JSON", | ||
}, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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", | ||
}, | ||
], |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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:", |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aws-cdk": "2.175.1", | ||
"aws-cdk-lib": "2.175.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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