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

RDS: DatabaseProxy dbProxyName is not autogenerated by CloudFormation #18578

Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@AustinGomez
Copy link

What is the problem?

The documentation gives the following info for the dbProxy prop:

"Type: string (optional, default: Generated by CloudFormation (recommended))"

However, the dbProxyName is not autogenerated by CFN. Instead the dbProxy name is set to the id string if props.dbProxy is not present.

Reproduction Steps

Create a DatabaseProxy without specifying a dbProxyName.

What did you expect to happen?

The dbProxyName would be autogenerated by CloudFormation, as stated in the docs.

What actually happened?

The dbProxyName will be set to the id of the construct.

CDK CLI Version

v1.72.0

Framework Version

No response

Node.js Version

v17.0.1

OS

macOS Big Sur 11.6.2

Language

Typescript

Language Version

No response

Other information

Looks like the following line is causing the issue, but I'd need to dig deeper to see if the fix is this easy

super(scope, id, { physicalName: props.dbProxyName || id });

@AustinGomez AustinGomez added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 20, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jan 20, 2022
@skinny85
Copy link
Contributor

Hey @AustinGomez,

thanks for opening the issue. Indeed, this is a mistake in the documentation, and we should fix that.

Using the id was actually a mistake, as it's not guaranteed to be unique across the CDK application (#14374), but fixing that will be a much more involved issue that just a documentation fix.

Would you consider opening us a Pull Request, improving the docs? The offending line is here. Here's our "Contributing" guide: https:/aws/aws-cdk/blob/master/CONTRIBUTING.md.

Thanks,
Adam

@skinny85 skinny85 added @aws-cdk/aws-rds Related to Amazon Relational Database documentation This is a problem with documentation. effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2 and removed package/tools Related to AWS CDK Tools or CLI needs-triage This issue or PR still needs to be triaged. labels Jan 21, 2022
@skinny85 skinny85 changed the title DatabaseProxy dbProxyName is not autogenerated by CloudFormation RDS: DatabaseProxy dbProxyName is not autogenerated by CloudFormation Jan 21, 2022
@skinny85 skinny85 removed their assignment Jan 21, 2022
@ymhiroki
Copy link
Contributor

ymhiroki commented Jan 4, 2023

Hi @skinny85 ,

I'm interested in contributing aws-cdk.
May I create a Pull Request to fix the bug?

I'm goint to use Names.uniqueResourceName() instead of id.

@skinny85
Copy link
Contributor

skinny85 commented Jan 5, 2023

Hey @ymhiroki,

that's awesome that you want to contribute this fix!

Note one thing: you can't simply change id to Names.uniqueResourceName(), because that would cause resource replacement for all CDK users who already have a Proxy created with a previous version of the CDK when they upgrade.

To work around that problem, you will have to introduce a new feature flag for fixing this bug. There are many example PRs you can use to see how other feature flags are implemented (just search the CDK PRs for "feature flag". Here is a simple example.

Best of luck!

ymhiroki pushed a commit to ymhiroki/aws-cdk that referenced this issue Jan 14, 2023
@ymhiroki
Copy link
Contributor

Thanks for your kind advice, @skinny85 !

I added the feature flag and try to run the integration tests yarn integ-runner --update-on-failed, but I can't make the snapshot with the error below.

Do you have any idea about this error and any solutions?

aws-rds % yarn integ-runner --update-on-failed
yarn run v1.22.18
$ ~/ymhiroki/aws-cdk/node_modules/.bin/integ-runner --update-on-failed

Verifying integration test snapshots...

  UNCHANGED  integ.cluster-dual 6.259s
  UNCHANGED  integ.instance-gp3 6.361s
  UNCHANGED  integ.rolling-instance-updates 6.86s
  UNCHANGED  integ.instance-dual 6.702s
  UNCHANGED  integ.serverless-cluster-no-vpc 16.366s
  UNCHANGED  integ.instance-from-generated-password 17.181s
  UNCHANGED  integ.cluster 17.442s
  UNCHANGED  integ.read-replica 17.289s
  UNCHANGED  integ.cluster-s3.mysql-8 17.703s
  UNCHANGED  integ.instance-s3 17.405s
  UNCHANGED  integ.instance-s3-postgres 17.213s
  UNCHANGED  integ.cluster-s3 17.579s
  UNCHANGED  integ.cluster-rotation.lit 17.894s
  UNCHANGED  integ.serverless-cluster 12.096s
  CHANGED    integ.proxy 18.005s
      Resources
[~] AWS::RDS::DBProxy dbProxy3B89EAF2 replace
 └─ [~] DBProxyName (requires replacement)
     ├─ [-] dbProxy
     └─ [+] awscdkrdsproxydbProxy0E60A1B7
[~] AWS::RDS::DBProxyTargetGroup dbProxyProxyTargetGroup8DA26A77 replace
 └─ [~] DBProxyName (requires replacement)
     └─ [~] .Ref:
         ├─ [-] dbProxy3B89EAF2
         └─ [+] dbProxy3B89EAF2 (replaced)


  UNCHANGED  integ.cluster-snapshot 18.02s
  UNCHANGED  integ.instance.lit 18.443s

Snapshot Results:

Tests:    1 failed, 17 total

Running integration tests for failed tests...

Running in parallel across regions: us-east-1, us-east-2, us-west-2
Running test ~/ymhiroki/aws-cdk/packages/@aws-cdk/aws-rds/test/integ.proxy.js in us-east-1

✨  Synthesis time: 1.37s

aws-cdk-rds-proxy: building assets...

[0%] start: Building a7b7464d2c38470e36e10d1f9ce04cb49b452300d65c98728df292e50153d837:current_account-current_region
[100%] success: Built a7b7464d2c38470e36e10d1f9ce04cb49b452300d65c98728df292e50153d837:current_account-current_region

aws-cdk-rds-proxy: assets built

aws-cdk-rds-proxy: deploying... [1/1]
[0%] start: Publishing a7b7464d2c38470e36e10d1f9ce04cb49b452300d65c98728df292e50153d837:current_account-current_region
[100%] success: Published a7b7464d2c38470e36e10d1f9ce04cb49b452300d65c98728df292e50153d837:current_account-current_region
aws-cdk-rds-proxy: creating CloudFormation changeset...
aws-cdk-rds-proxy | 0/4 | 1:25:35 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy User Initiated
aws-cdk-rds-proxy | 0/4 | 1:25:41 | UPDATE_FAILED        | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Replacement type updates not supported on stack with disable-rollback.
aws-cdk-rds-proxy | 0/4 | 1:25:42 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy Replacement type updates not supported on stack with disable-rollback.
aws-cdk-rds-proxy | 1/4 | 1:25:45 | UPDATE_ROLLBACK_COMP | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Rollback succeeded for the failed resources.
aws-cdk-rds-proxy | 1/4 | 1:25:46 | UPDATE_FAILED        | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy The following resource(s) failed to update: [dbProxy3B89EAF2].

Failed resources:
aws-cdk-rds-proxy | 1:25:41 | UPDATE_FAILED        | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Replacement type updates not supported on stack with disable-rollback.

 ❌  aws-cdk-rds-proxy failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. )
    at FullCloudFormationDeployment.monitorDeployment (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/api/deploy-stack.ts:505:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at deployStack (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cdk-toolkit.ts:265:24)
    at /Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/deploy.ts:39:11
    at run (/Users/yhirokiy/works/ymhiroki/aws-cdk/node_modules/p-queue/dist/index.js:163:29)

 ❌ Deployment failed: Error: Stack Deployments Failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. )
    at Object.exports.deployStacks (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/deploy.ts:61:11)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at CdkToolkit.deploy (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cdk-toolkit.ts:339:7)
    at initCommandLine (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cli.ts:374:12)

Stack Deployments Failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. )
  FAILED     integ.proxy-integ.proxy (undefined/us-east-1) 1745.32s
      Integration test failed: Error: Command exited with status 1

Test Results:

Tests:    1 failed, 1 total
Error: Some integration tests failed!
    at main (~/ymhiroki/aws-cdk/packages/@aws-cdk/integ-runner/lib/cli.js:147:23)
error Command failed with exit code 1.

@skinny85
Copy link
Contributor

skinny85 commented Jan 14, 2023

So, this is exactly what I mentioned 🙂. You changed the ID of the proxy from the simple ID (dbProxy in the diff) to the unique ID (awscdkrdsproxydbProxy0E60A1B7), and the integration tests are (rightfully) complaining about it.

Can you show the code you changed in the Proxy class?

@ymhiroki
Copy link
Contributor

I pushed the code here.

@skinny85
Copy link
Contributor

Hmm. I wonder if the recommendedValue: true is what is making that flag be turned on in the integ tests?

Can you try setting recommendedValue to false, and seeing what happens then? I think you can still set the flag to be true by default in new projects by using the defaults property (here's an example).

@ymhiroki
Copy link
Contributor

When I set recommendedValue to false, the integration test completed successfully, thank you!

I added the testcase in integ.proxy.ts to pass the CI, however, it fails when I run yarn integ-runner --update-onfailed with the error below again. (dbProxy3B89EAF2 seems to be updated even though it doesn't change at all.)

How can I pass the CI or make the snapshot successfully?

yarn integ --update-on-failed test/integ.proxy.js
yarn run v1.22.18
$ integ-runner --update-on-failed test/integ.proxy.js

Verifying integration test snapshots...

  CHANGED    integ.proxy 10.971s
      IAM Statement Changes
┌───┬──────────────────────────────────────┬────────┬───────────────────────────────┬─────────────────────────────┬───────────┐
│   │ Resource                             │ Effect │ Action                        │ Principal                   │ Condition │
├───┼──────────────────────────────────────┼────────┼───────────────────────────────┼─────────────────────────────┼───────────┤
│ + │ ${ProxyIAMRole2FE8AB0F.Arn}          │ Allow  │ sts:AssumeRole                │ Service:rds.amazonaws.com   │           │
├───┼──────────────────────────────────────┼────────┼───────────────────────────────┼─────────────────────────────┼───────────┤
│ + │ ${dbClusterSecretAttachmentAB67A752} │ Allow  │ secretsmanager:DescribeSecret │ AWS:${ProxyIAMRole2FE8AB0F} │           │
│   │                                      │        │ secretsmanager:GetSecretValue │                             │           │
└───┴──────────────────────────────────────┴────────┴───────────────────────────────┴─────────────────────────────┴───────────┘
Security Group Changes
┌───┬────────────────────────────────────────────┬─────┬────────────────────────────────────────┬────────────────────────────────────────────┐
│   │ Group                                      │ Dir │ Protocol                               │ Peer                                       │
├───┼────────────────────────────────────────────┼─────┼────────────────────────────────────────┼────────────────────────────────────────────┤
│ + │ ${ProxyProxySecurityGroupC42FC3CE.GroupId} │ Out │ Everything                             │ Everyone (IPv4)                            │
├───┼────────────────────────────────────────────┼─────┼────────────────────────────────────────┼────────────────────────────────────────────┤
│ + │ ${dbClusterSecurityGroupCAA1A91F.GroupId}  │ In  │ TCP ${dbClusterE86E47AE.Endpoint.Port} │ ${ProxyProxySecurityGroupC42FC3CE.GroupId} │
│ + │ ${dbClusterSecurityGroupCAA1A91F.GroupId}  │ Out │ Everything                             │ Everyone (IPv4)                            │
└───┴────────────────────────────────────────────┴─────┴────────────────────────────────────────┴────────────────────────────────────────────┘
(NOTE: There may be security-related changes not in this list. See https:/aws/aws-cdk/issues/1299)

Resources
[+] AWS::RDS::DBSubnetGroup dbClusterSubnets03B9B0E1
[+] AWS::EC2::SecurityGroup dbClusterSecurityGroupCAA1A91F
[+] AWS::EC2::SecurityGroupIngress dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002
[+] AWS::SecretsManager::Secret dbClusterSecretCEA6D7B6
[+] AWS::SecretsManager::SecretTargetAttachment dbClusterSecretAttachmentAB67A752
[+] AWS::RDS::DBCluster dbClusterE86E47AE
[+] AWS::RDS::DBInstance dbClusterInstance1BCE092AC
[+] AWS::RDS::DBInstance dbClusterInstance20BA1ECD9
[+] AWS::IAM::Role ProxyIAMRole2FE8AB0F
[+] AWS::IAM::Policy ProxyIAMRoleDefaultPolicy59EB0117
[+] AWS::EC2::SecurityGroup ProxyProxySecurityGroupC42FC3CE
[+] AWS::RDS::DBProxy ProxyCB0DFB71
[+] AWS::RDS::DBProxyTargetGroup ProxyProxyTargetGroupB462B5C5



Snapshot Results:

Tests:    1 failed, 1 total

Running integration tests for failed tests...

Running in parallel across regions: us-east-1, us-east-2, us-west-2
Running test /Users/yhirokiy/works/ymhiroki/aws-cdk/packages/@aws-cdk/aws-rds/test/integ.proxy.js in us-east-1

✨  Synthesis time: 1.63s

aws-cdk-rds-proxy: building assets...

[0%] start: Building eade7d2d48419acaec1228343071922ec168779f7a6dd46405c9605c5652b43e:current_account-current_region
[100%] success: Built eade7d2d48419acaec1228343071922ec168779f7a6dd46405c9605c5652b43e:current_account-current_region

aws-cdk-rds-proxy: assets built

aws-cdk-rds-proxy: deploying... [1/1]
[0%] start: Publishing eade7d2d48419acaec1228343071922ec168779f7a6dd46405c9605c5652b43e:current_account-current_region
[100%] success: Published eade7d2d48419acaec1228343071922ec168779f7a6dd46405c9605c5652b43e:current_account-current_region
aws-cdk-rds-proxy: creating CloudFormation changeset...
aws-cdk-rds-proxy |  0/17 | 9:21:23 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy User Initiated
aws-cdk-rds-proxy |  0/17 | 9:21:29 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroup                     | Proxy/ProxySecurityGroup (ProxyProxySecurityGroupC42FC3CE)
aws-cdk-rds-proxy |  0/17 | 9:21:29 | CREATE_IN_PROGRESS   | AWS::IAM::Role                              | Proxy/IAMRole (ProxyIAMRole2FE8AB0F)
aws-cdk-rds-proxy |  0/17 | 9:21:29 | CREATE_IN_PROGRESS   | AWS::RDS::DBSubnetGroup                     | dbCluster/Subnets/Default (dbClusterSubnets03B9B0E1)
aws-cdk-rds-proxy |  0/17 | 9:21:29 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroup                     | dbCluster/SecurityGroup (dbClusterSecurityGroupCAA1A91F)
aws-cdk-rds-proxy |  0/17 | 9:21:30 | CREATE_IN_PROGRESS   | AWS::SecretsManager::Secret                 | dbCluster/Secret (dbClusterSecretCEA6D7B6)
aws-cdk-rds-proxy |  0/17 | 9:21:30 | CREATE_IN_PROGRESS   | AWS::IAM::Role                              | Proxy/IAMRole (ProxyIAMRole2FE8AB0F) Resource creation Initiated
aws-cdk-rds-proxy |  0/17 | 9:21:30 | UPDATE_FAILED        | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Replacement type updates not supported on stack with disable-rollback.
aws-cdk-rds-proxy |  0/17 | 9:21:31 | CREATE_IN_PROGRESS   | AWS::SecretsManager::Secret                 | dbCluster/Secret (dbClusterSecretCEA6D7B6) Resource creation Initiated
aws-cdk-rds-proxy |  1/17 | 9:21:31 | CREATE_COMPLETE      | AWS::SecretsManager::Secret                 | dbCluster/Secret (dbClusterSecretCEA6D7B6)
aws-cdk-rds-proxy |  1/17 | 9:21:32 | CREATE_IN_PROGRESS   | AWS::RDS::DBSubnetGroup                     | dbCluster/Subnets/Default (dbClusterSubnets03B9B0E1) Resource creation Initiated
aws-cdk-rds-proxy |  2/17 | 9:21:32 | CREATE_COMPLETE      | AWS::RDS::DBSubnetGroup                     | dbCluster/Subnets/Default (dbClusterSubnets03B9B0E1)
aws-cdk-rds-proxy |  2/17 | 9:21:34 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroup                     | dbCluster/SecurityGroup (dbClusterSecurityGroupCAA1A91F) Resource creation Initiated
aws-cdk-rds-proxy |  2/17 | 9:21:34 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroup                     | Proxy/ProxySecurityGroup (ProxyProxySecurityGroupC42FC3CE) Resource creation Initiated
aws-cdk-rds-proxy |  3/17 | 9:21:36 | CREATE_COMPLETE      | AWS::EC2::SecurityGroup                     | Proxy/ProxySecurityGroup (ProxyProxySecurityGroupC42FC3CE)
aws-cdk-rds-proxy |  4/17 | 9:21:36 | CREATE_COMPLETE      | AWS::EC2::SecurityGroup                     | dbCluster/SecurityGroup (dbClusterSecurityGroupCAA1A91F)
aws-cdk-rds-proxy |  4/17 | 9:21:38 | CREATE_IN_PROGRESS   | AWS::RDS::DBCluster                         | dbCluster (dbClusterE86E47AE)
aws-cdk-rds-proxy |  4/17 | 9:21:41 | CREATE_IN_PROGRESS   | AWS::RDS::DBCluster                         | dbCluster (dbClusterE86E47AE) Resource creation Initiated
aws-cdk-rds-proxy |  5/17 | 9:21:49 | CREATE_COMPLETE      | AWS::IAM::Role                              | Proxy/IAMRole (ProxyIAMRole2FE8AB0F)
 5/17 Currently in progress: aws-cdk-rds-proxy, dbClusterE86E47AE
aws-cdk-rds-proxy |  6/17 | 9:22:43 | CREATE_COMPLETE      | AWS::RDS::DBCluster                         | dbCluster (dbClusterE86E47AE)
aws-cdk-rds-proxy |  6/17 | 9:22:46 | CREATE_IN_PROGRESS   | AWS::RDS::DBInstance                        | dbCluster/Instance1 (dbClusterInstance1BCE092AC)
aws-cdk-rds-proxy |  6/17 | 9:22:46 | CREATE_IN_PROGRESS   | AWS::RDS::DBInstance                        | dbCluster/Instance2 (dbClusterInstance20BA1ECD9)
aws-cdk-rds-proxy |  6/17 | 9:22:46 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroupIngress              | dbCluster/SecurityGroup/from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort} (dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002)
aws-cdk-rds-proxy |  6/17 | 9:22:46 | CREATE_IN_PROGRESS   | AWS::EC2::SecurityGroupIngress              | dbCluster/SecurityGroup/from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort} (dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002) Resource creation Initiated
aws-cdk-rds-proxy |  6/17 | 9:22:47 | CREATE_IN_PROGRESS   | AWS::SecretsManager::SecretTargetAttachment | dbCluster/Secret/Attachment (dbClusterSecretAttachmentAB67A752)
aws-cdk-rds-proxy |  7/17 | 9:22:47 | CREATE_COMPLETE      | AWS::EC2::SecurityGroupIngress              | dbCluster/SecurityGroup/from awscdkrdsproxyProxyProxySecurityGroup9F179E6F:{IndirectPort} (dbClusterSecurityGroupfromawscdkrdsproxyProxyProxySecurityGroup9F179E6FIndirectPortED421002)
aws-cdk-rds-proxy |  7/17 | 9:22:49 | CREATE_IN_PROGRESS   | AWS::RDS::DBInstance                        | dbCluster/Instance1 (dbClusterInstance1BCE092AC) Resource creation Initiated
aws-cdk-rds-proxy |  7/17 | 9:22:49 | CREATE_IN_PROGRESS   | AWS::SecretsManager::SecretTargetAttachment | dbCluster/Secret/Attachment (dbClusterSecretAttachmentAB67A752) Resource creation Initiated
aws-cdk-rds-proxy |  8/17 | 9:22:49 | CREATE_COMPLETE      | AWS::SecretsManager::SecretTargetAttachment | dbCluster/Secret/Attachment (dbClusterSecretAttachmentAB67A752)
aws-cdk-rds-proxy |  8/17 | 9:22:49 | CREATE_IN_PROGRESS   | AWS::RDS::DBInstance                        | dbCluster/Instance2 (dbClusterInstance20BA1ECD9) Resource creation Initiated
aws-cdk-rds-proxy |  8/17 | 9:22:51 | CREATE_IN_PROGRESS   | AWS::RDS::DBProxy                           | Proxy (ProxyCB0DFB71)
aws-cdk-rds-proxy |  8/17 | 9:22:51 | CREATE_IN_PROGRESS   | AWS::IAM::Policy                            | Proxy/IAMRole/DefaultPolicy (ProxyIAMRoleDefaultPolicy59EB0117)
aws-cdk-rds-proxy |  8/17 | 9:22:52 | CREATE_IN_PROGRESS   | AWS::IAM::Policy                            | Proxy/IAMRole/DefaultPolicy (ProxyIAMRoleDefaultPolicy59EB0117) Resource creation Initiated
aws-cdk-rds-proxy |  8/17 | 9:22:53 | CREATE_IN_PROGRESS   | AWS::RDS::DBProxy                           | Proxy (ProxyCB0DFB71) Resource creation Initiated
aws-cdk-rds-proxy |  9/17 | 9:23:09 | CREATE_COMPLETE      | AWS::IAM::Policy                            | Proxy/IAMRole/DefaultPolicy (ProxyIAMRoleDefaultPolicy59EB0117)
 9/17 Currently in progress: aws-cdk-rds-proxy, dbClusterInstance1BCE092AC, dbClusterInstance20BA1ECD9, ProxyCB0DFB71
aws-cdk-rds-proxy | 10/17 | 9:27:08 | CREATE_COMPLETE      | AWS::RDS::DBProxy                           | Proxy (ProxyCB0DFB71)
10/17 Currently in progress: aws-cdk-rds-proxy, dbClusterInstance1BCE092AC, dbClusterInstance20BA1ECD9
aws-cdk-rds-proxy | 11/17 | 9:30:15 | CREATE_COMPLETE      | AWS::RDS::DBInstance                        | dbCluster/Instance1 (dbClusterInstance1BCE092AC)
11/17 Currently in progress: aws-cdk-rds-proxy, dbClusterInstance20BA1ECD9
aws-cdk-rds-proxy | 12/17 | 9:35:58 | CREATE_COMPLETE      | AWS::RDS::DBInstance                        | dbCluster/Instance2 (dbClusterInstance20BA1ECD9)
aws-cdk-rds-proxy | 12/17 | 9:36:05 | CREATE_IN_PROGRESS   | AWS::RDS::DBProxyTargetGroup                | Proxy/ProxyTargetGroup (ProxyProxyTargetGroupB462B5C5)
aws-cdk-rds-proxy | 12/17 | 9:36:07 | CREATE_IN_PROGRESS   | AWS::RDS::DBProxyTargetGroup                | Proxy/ProxyTargetGroup (ProxyProxyTargetGroupB462B5C5) Resource creation Initiated
12/17 Currently in progress: aws-cdk-rds-proxy, ProxyProxyTargetGroupB462B5C5
aws-cdk-rds-proxy | 13/17 | 9:41:50 | CREATE_COMPLETE      | AWS::RDS::DBProxyTargetGroup                | Proxy/ProxyTargetGroup (ProxyProxyTargetGroupB462B5C5)
aws-cdk-rds-proxy | 13/17 | 9:41:51 | UPDATE_IN_PROGRESS   | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy Replacement type updates not supported on stack with disable-rollback.
aws-cdk-rds-proxy | 14/17 | 9:41:55 | UPDATE_ROLLBACK_COMP | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Rollback succeeded for the failed resources.
aws-cdk-rds-proxy | 14/17 | 9:41:55 | UPDATE_FAILED        | AWS::CloudFormation::Stack                  | aws-cdk-rds-proxy The following resource(s) failed to update: [dbProxy3B89EAF2].

Failed resources:
aws-cdk-rds-proxy | 9:21:30 | UPDATE_FAILED        | AWS::RDS::DBProxy                           | dbProxy (dbProxy3B89EAF2) Replacement type updates not supported on stack with disable-rollback.

 ❌  aws-cdk-rds-proxy failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. ): Replacement type updates not supported on stack with disable-rollback.
    at FullCloudFormationDeployment.monitorDeployment (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/api/deploy-stack.ts:505:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at deployStack (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cdk-toolkit.ts:265:24)
    at /Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/deploy.ts:39:11
    at run (/Users/yhirokiy/works/ymhiroki/aws-cdk/node_modules/p-queue/dist/index.js:163:29)

 ❌ Deployment failed: Error: Stack Deployments Failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. ): Replacement type updates not supported on stack with disable-rollback.
    at Object.exports.deployStacks (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/deploy.ts:61:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at CdkToolkit.deploy (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cdk-toolkit.ts:339:7)
    at initCommandLine (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/aws-cdk/lib/cli.ts:374:12)

Stack Deployments Failed: Error: The stack named aws-cdk-rds-proxy failed to deploy: UPDATE_FAILED (The following resource(s) failed to update: [dbProxy3B89EAF2]. ): Replacement type updates not supported on stack with disable-rollback.
  FAILED     integ.proxy-integ.proxy (undefined/us-east-1) 4202.281s
      Integration test failed: Error: Command exited with status 1

Test Results:

Tests:    1 failed, 1 total
Error: Some integration tests failed!
    at main (/Users/yhirokiy/works/ymhiroki/aws-cdk/packages/@aws-cdk/integ-runner/lib/cli.js:147:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@skinny85
Copy link
Contributor

I would ask on the PR you opened (#23703), someone from the CDK team should give you the current advice (I'm no longer with Amazon). I would also convert it to a non-draft, I think it's good enough 🙂.

I would also take a look at the integration tests section of the Contributing guide.

Good luck!

@ymhiroki
Copy link
Contributor

I'm sorry for my ignorance about your position. I really appreciate your kind comments.

ymhiroki pushed a commit to ymhiroki/aws-cdk that referenced this issue Jan 17, 2023
@skinny85
Copy link
Contributor

I'm sorry for my ignorance about your position. I really appreciate your kind comments.

No need to apologize, you had no way of knowing, and even if you knew, you did absolutely nothing wrong 🙂.

@mergify mergify bot closed this as completed in #23703 Feb 10, 2023
mergify bot pushed a commit that referenced this issue Feb 10, 2023
…under feature flag) (#23703)

fixes #18578


----

### All Submissions:

* [X] Have you followed the guidelines in our [Contributing guide?](https:/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Construct Runtime Dependencies:

* [ ] This PR adds new construct runtime dependencies following the process described [here](https:/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies)

### New Features

* [X] Have you added the new feature to an [integration test](https:/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [X] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment