From 1638d6f676d6fea6ec192e521cf3ce2c41604851 Mon Sep 17 00:00:00 2001 From: Michelle Wang Date: Thu, 19 Sep 2024 15:37:10 -0700 Subject: [PATCH] modify integration test --- .../integ-init.assets.json | 4 +-- .../integ-init.template.json | 3 +- .../manifest.json | 2 +- .../integ.enable-sum-timeout-instance-init.ts | 2 +- packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md | 28 ++++++++++--------- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.assets.json index 471caad180d46..9f3cec5827aaf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.assets.json @@ -14,7 +14,7 @@ } } }, - "765ab9ec0600fca96fcfeaeef4a674f6a836e53faf1284fdd8e55e883f1912e2": { + "aabd2520799daa243ae9f17baf1ab61a81d22b69d172736ad387003b7fb81fdc": { "source": { "path": "integ-init.template.json", "packaging": "file" @@ -22,7 +22,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "765ab9ec0600fca96fcfeaeef4a674f6a836e53faf1284fdd8e55e883f1912e2.json", + "objectKey": "aabd2520799daa243ae9f17baf1ab61a81d22b69d172736ad387003b7fb81fdc.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.template.json index 06318de877cc8..4f5005352ab68 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/integ-init.template.json @@ -581,7 +581,8 @@ ], "CreationPolicy": { "ResourceSignal": { - "Timeout": "PT10M" + "Count": 1, + "Timeout": "PT40M" } }, "Metadata": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/manifest.json index 0c6fc2c033555..9a3e37da8233b 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.js.snapshot/manifest.json @@ -18,7 +18,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}/765ab9ec0600fca96fcfeaeef4a674f6a836e53faf1284fdd8e55e883f1912e2.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/aabd2520799daa243ae9f17baf1ab61a81d22b69d172736ad387003b7fb81fdc.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.ts index 3d918f0419e6a..b65d883c49672 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.enable-sum-timeout-instance-init.ts @@ -8,7 +8,7 @@ import { EC2_RESTRICT_DEFAULT_SECURITY_GROUP } from 'aws-cdk-lib/cx-api'; const app = new cdk.App({ postCliContext: { - '@aws-cdk/aws-ec2:ec2SumTImeoutEnabled': false, + '@aws-cdk/aws-ec2:ec2SumTImeoutEnabled': true, }, }); const stack = new cdk.Stack(app, 'integ-init'); diff --git a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md index c58290a8be8d7..996ccc96e72dd 100644 --- a/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md +++ b/packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md @@ -1382,36 +1382,38 @@ When this feature flag is enabled, specify newly introduced props 's3InputUri' a **Compatibility with old behavior:** Disable the feature flag to use input and output path fields for s3 URI -### @aws-cdk/aws-ec2:ec2SumTimeoutEnabled +### @aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions -*When enabled, initOptions.timeout and resourceSignalTimeout values will be summed together.* (fix) +*When enabled, we will only grant the necessary permissions when users specify cloudwatch log group through logConfiguration* (fix) -Currently is both initOptions.timeout and resourceSignalTimeout are both specified in the options for creating an EC2 Instance, -only the value from 'resourceSignalTimeout' will be used. This feature flag will enable both values to be summed together. +Currently, we automatically add a number of cloudwatch permissions to the task role when no cloudwatch log group is +specified as logConfiguration and it will grant 'Resources': ['*'] to the task role. + +When this feature flag is enabled, we will only grant the necessary permissions when users specify cloudwatch log group. | Since | Default | Recommended | | ----- | ----- | ----- | | (not in v1) | | | -| V2NEXT | `false` | `true` | +| 2.159.0 | `false` | `true` | +**Compatibility with old behavior:** Disable the feature flag to continue grant permissions to log group when no log group is specified -### @aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions -*When enabled, we will only grant the necessary permissions when users specify cloudwatch log group through logConfiguration* (fix) +### @aws-cdk/aws-ec2:ec2SumTImeoutEnabled -Currently, we automatically add a number of cloudwatch permissions to the task role when no cloudwatch log group is -specified as logConfiguration and it will grant 'Resources': ['*'] to the task role. +*When enabled, initOptions.timeout and resourceSignalTimeout values will be summed together.* (fix) -When this feature flag is enabled, we will only grant the necessary permissions when users specify cloudwatch log group. +Currently is both initOptions.timeout and resourceSignalTimeout are both specified in the options for creating an EC2 Instance, +only the value from 'resourceSignalTimeout' will be used. + +When this feature flag is enabled, if both initOptions.timeout and resourceSignalTimeout are specified, the values will to be summed together. | Since | Default | Recommended | | ----- | ----- | ----- | | (not in v1) | | | -| 2.159.0 | `false` | `true` | - -**Compatibility with old behavior:** Disable the feature flag to continue grant permissions to log group when no log group is specified +| V2NEXT | `false` | `true` |