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

feat(s3): update runtime of notifications-handler to python3.9 #23209

Merged
merged 7 commits into from
Dec 7, 2022
Merged
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
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-event-sources/lib/kafka.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { md5hash } from '@aws-cdk/core/lib/helpers-internal';
import { ISecurityGroup, IVpc, SubnetSelection } from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import * as lambda from '@aws-cdk/aws-lambda';
import * as secretsmanager from '@aws-cdk/aws-secretsmanager';
import { Stack, Names } from '@aws-cdk/core';
import { md5hash } from '@aws-cdk/core/lib/helpers-internal';
Comment on lines -1 to +6
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind reverting this unrelated change. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This error was automatically fixed by yarn build --fix before integ-test.
Do I still need to fix it now that the test has passed because the IDE outputs the following Warning.

Import of `@aws-cdk/core/lib/helpers-internal` must be done after import of `@aws-cdk/core`.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nevertheless, I have added the commit to be corrected as requested.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, thanks for explaining where this came from. 👍🏻 Probably would have been fine to leave it in then. From a PR review it's difficult to establish the source of these kind of changes (and manually checking would just take to long).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I was in a hurry to fix it. This commit should bring us back to the beginning of this review!

Copy link
Contributor

Choose a reason for hiding this comment

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

All good and thank you for being diligent. It's a tricky thing. When the same module has other change I usually don't question it.

Maybe adding a comment to the line on GitHub would help reviewers. 🤔

import { Construct } from 'constructs';
import { StreamEventSource, BaseStreamEventSourceProps } from './stream';

Expand Down

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"22.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "22.0.0",
"testCases": {
"integ.s3": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "20.0.0",
"version": "22.0.0",
"files": {
"60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26": {
"33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": {
"source": {
"path": "asset.60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26",
"path": "asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26.zip",
"objectKey": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"0bd7f56caf58087052c78e8b8dfb76284423c45fe7556ed0ca3c5f9c47d6b79b": {
"88cd97cf8b61eb834d47062d3a923e447d47131e886b9487a06833f23868a9ec": {
"source": {
"path": "lambda-event-source-s3.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "0bd7f56caf58087052c78e8b8dfb76284423c45fe7556ed0ca3c5f9c47d6b79b.json",
"objectKey": "88cd97cf8b61eb834d47062d3a923e447d47131e886b9487a06833f23868a9ec.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26.zip"
"S3Key": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down Expand Up @@ -322,7 +322,7 @@
"Arn"
]
},
"Runtime": "python3.7",
"Runtime": "python3.9",
"Timeout": 300
},
"DependsOn": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "20.0.0",
"version": "22.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"lambda-event-source-s3.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0bd7f56caf58087052c78e8b8dfb76284423c45fe7556ed0ca3c5f9c47d6b79b.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/88cd97cf8b61eb834d47062d3a923e447d47131e886b9487a06833f23868a9ec.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -125,6 +119,12 @@
]
},
"displayName": "lambda-event-source-s3"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
"Tree": {
"id": "Tree",
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
}
},
"lambda-event-source-s3": {
"id": "lambda-event-source-s3",
"path": "lambda-event-source-s3",
Expand All @@ -24,6 +16,14 @@
"id": "ServiceRole",
"path": "lambda-event-source-s3/F/ServiceRole",
"children": {
"ImportServiceRole": {
"id": "ImportServiceRole",
"path": "lambda-event-source-s3/F/ServiceRole/ImportServiceRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "lambda-event-source-s3/F/ServiceRole/Resource",
Expand Down Expand Up @@ -199,14 +199,14 @@
"id": "Default",
"path": "lambda-event-source-s3/B/AutoDeleteObjectsCustomResource/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CustomResource",
"version": "0.0.0"
}
},
"Notifications": {
Expand All @@ -217,14 +217,14 @@
"id": "Resource",
"path": "lambda-event-source-s3/B/Notifications/Resource",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.168"
}
},
"AllowBucketNotificationsTolambdaeventsources3F74160805": {
Expand Down Expand Up @@ -271,30 +271,30 @@
"id": "Staging",
"path": "lambda-event-source-s3/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.AssetStaging",
"version": "0.0.0"
}
},
"Role": {
"id": "Role",
"path": "lambda-event-source-s3/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
},
"Handler": {
"id": "Handler",
"path": "lambda-event-source-s3/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CustomResourceProvider",
"version": "0.0.0"
}
},
"BucketNotificationsHandler050a0587b7544547bf325f094a3db834": {
Expand All @@ -305,6 +305,14 @@
"id": "Role",
"path": "lambda-event-source-s3/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role",
"children": {
"ImportRole": {
"id": "ImportRole",
"path": "lambda-event-source-s3/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/ImportRole",
"constructInfo": {
"fqn": "@aws-cdk/core.Resource",
"version": "0.0.0"
}
},
"Resource": {
"id": "Resource",
"path": "lambda-event-source-s3/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Role/Resource",
Expand Down Expand Up @@ -393,26 +401,50 @@
"id": "Resource",
"path": "lambda-event-source-s3/BucketNotificationsHandler050a0587b7544547bf325f094a3db834/Resource",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.CfnResource",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.168"
}
},
"BootstrapVersion": {
"id": "BootstrapVersion",
"path": "lambda-event-source-s3/BootstrapVersion",
"constructInfo": {
"fqn": "@aws-cdk/core.CfnParameter",
"version": "0.0.0"
}
},
"CheckBootstrapVersion": {
"id": "CheckBootstrapVersion",
"path": "lambda-event-source-s3/CheckBootstrapVersion",
"constructInfo": {
"fqn": "@aws-cdk/core.CfnRule",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "@aws-cdk/core.Stack",
"version": "0.0.0"
}
},
"Tree": {
"id": "Tree",
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.168"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"fqn": "@aws-cdk/core.App",
"version": "0.0.0"
}
}
}
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-s3-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2",
"jest": "^27.5.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"22.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "22.0.0",
"testCases": {
"integ.notifications": {
"stacks": [
Expand Down
Loading