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: Reboot the construct library #6713

Closed
nija-at opened this issue Mar 13, 2020 · 4 comments
Closed

rds: Reboot the construct library #6713

nija-at opened this issue Mar 13, 2020 · 4 comments
Assignees
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort feature-request A feature should be added or improved.

Comments

@nija-at
Copy link
Contributor

nija-at commented Mar 13, 2020

The RDS construct library today closely mimics how resources type are organized in CloudFormation -

The additional constructs such as DatabaseSecret does add value over simply using the L1 constructs. However, there are a number of modeling restrictions that come with this. A few instances of this are -

  1. The list of database engine versions are different depending on the database engine picked that is picked - https://aws.amazon.com/rds/faqs/#Database_Engine_Versions
  2. Some properties apply to only some database engines but not others, such as timezone that applies only to SQL Server. This leads to guard rails based development where there are validations all over the place, and the user has to keep adjusting to avoid these validations and take the working path.
  3. An extension of Update docs #2 but applies more broadly to Parameter Groups. Parameters like the inno_db_file_per_table will apply to Mysql and Aurora but not to other database types. Similarly, the aurora_load_from_s3_role applies to Aurora databases but not others.

Codifying all of this in the current RDS model will lead to fragmented code, validations lying around and overall, a poor customer experience where a feature is advertised as available (i.e., it's in the Props interface) but is actually not because there is validation that prevents it based on the database type (or some other condition).

The alternative is to reboot the construct library along the lines of creating constructs such as AuroraDatabase, MysqlDatabase, AuroraDBCluster, etc. which would make this experience significantly better.

@nija-at nija-at added feature-request A feature should be added or improved. @aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort labels Mar 13, 2020
@nija-at nija-at self-assigned this Mar 13, 2020
@nija-at
Copy link
Contributor Author

nija-at commented Apr 1, 2020

One more customer complaint and case for why we need this - #7072

@eladb
Copy link
Contributor

eladb commented Apr 2, 2020

Is it possible to offer subclasses for specific database types with all the specific APIs in there and leave the current api in tact. We can also do this incrementally (that is implement one subclass, Then another...)

@nija-at
Copy link
Contributor Author

nija-at commented Apr 8, 2020

Definitely possible.

However, my feeling is that module is going to cause long term maintenance and customer usage pain. For instance, this PR - #6611 - the work was to simply add a property to the CDK interface that needs to get passed down to two different CloudFormation resources (the DB cluster and parameter group).
The amount of code that needed to be written behind defensive code block was quite high and the number of iterations of the PR could have been significantly reduced if we had the correct model in place.

@skinny85
Copy link
Contributor

skinny85 commented Jul 7, 2020

We decide to forgo this large "reboot" in favor of incremental improvements, and minimizing breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database effort/large Large work item – several weeks of effort feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

3 participants