-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(rds): Add engine
to IDatabaseInstance
, IClusterInstance
#9257
Conversation
fixes #9195 related to #8686 BREAKING CHANGE: Constructs for imported resources take additional parameters in props - **rds**: `DatabaseCluster.fromDatabaseClusterAttributes` takes `engine: IClusterEngine` - **rds**: `DatabaseInstanceBase.fromDatabaseInstanceAttributes` takes `engine: IInstanceEngine`
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
Thanks for the fix @civilizeddev , but I don't think this is the correct way to go here.
Instead, I think the solution here is to add optional parameters to ProxyTarget
's fromInstance
and fromCluster
methods, of type IInstanceEngine
and IClusterEngine
, respectively.
Thank you for reviewing @skinny85 But that way still lead to a weird interface, then cdk users will not be able to I just want to achieve the goal mentioned below:
And to remove these ulgy and unstable implementation. aws-cdk/packages/@aws-cdk/aws-rds/lib/proxy.ts Lines 69 to 75 in 489eae6
Likewise, the property So I think it's better to have But It might affect users of |
Precedent casesaws-ecsinterface IClusteraws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts Lines 479 to 482 in ac612c6
this.vpc
Cluster. fromClusterAttributes(attrs: ClusterAttributes)aws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts Lines 55 to 61 in ac612c6
interface ClusterAttributesaws-cdk/packages/@aws-cdk/aws-ecs/lib/cluster.ts Lines 521 to 524 in ac612c6
|
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.
@civilizeddev I will take your opinion up with the team, and we'll make a group decision, so it's not only up to me.
Marking as "Request changes" for now to stop if from being merged until we came up with a decision.
Related Issue
|
Hey @civilizeddev , I've talked this over with the team, and unfortunately they sided with me 🙂. The problem in your solution is that you are now requiring everyone who imports So, I think adding them into Thanks, |
Hey @civilizeddev , I took the liberty of submitting my version of this functionality in #10488 . I went a very similar way to you, I just made Let me know what you think of my version! |
It looks better for now. You can go on with your version. |
fixes #9195
related to #8686
BREAKING CHANGE: Constructs for imported resources take additional parameters in props
DatabaseCluster.fromDatabaseClusterAttributes
takesengine: IClusterEngine
DatabaseInstanceBase.fromDatabaseInstanceAttributes
takesengine: IInstanceEngine
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license