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

chore(rds): update engine versions #29422

Merged
merged 8 commits into from
Mar 11, 2024
Merged

Conversation

nmussy
Copy link
Contributor

@nmussy nmussy commented Mar 9, 2024

Issue # (if applicable)

Closes #29360, closes #23810

Note: #29421 already adds some of the missing Oracle versions, this PR also includes them

Reason for this change

Update the CDK RDS engine versions to match the current availability, as well as facilitate automated alerts for updates in the future

Description of changes

  • Added missing engine version for all RDS engines
    • This includes engines missing in the CDK that are already deprecated, but still returned by the SDK. The goal is to remove any differences between the two, even if it means a few needless static fields
  • Updated missing or un-needed @deprecated TSDoc tags

Description of how you validated changes

Like I mentioned in #29360 (comment), I'm working on a CLI that compares the aws-cdk-lib TypeScript declarations to SDK API calls, in this case DescribeDBEngineVersions.
I am re-validating these locally edited files as I update them, until I have no differences between the CDK and the live SDK results.

This is currently a mostly manual process. I'll add support for more version fields such as ec2.WindowsVersion before adding automation, to bridge the other currently missing versions ASAP.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2 labels Mar 9, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team March 9, 2024 20:08
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Mar 9, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 9, 2024
* Version "14.4".
* @deprecated Version 14.4 is no longer supported by Amazon RDS.
*/
/** Version "14.4". */
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this wrongly deprecated previously?

Copy link
Contributor Author

@nmussy nmussy Mar 10, 2024

Choose a reason for hiding this comment

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

I would assume so, unless it was deprecated then reinstated?

$ aws rds describe-db-engine-versions --engine aurora-postgresql --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion=="14.4") | .Status'
available

$ aws rds describe-db-engine-versions --engine aurora-postgresql --region eu-west-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion=="14.4") | .Status'
available

EDIT: Fixed version in jq filter

Copy link
Contributor

@msambol msambol left a comment

Choose a reason for hiding this comment

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

LGTM. I'm interested in the tool you're developing for automating this.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Mar 10, 2024
@nmussy
Copy link
Contributor Author

nmussy commented Mar 10, 2024

@msambol It's very messy ATM, just a collection of loose scripts I'm running manually. Once I'm done opening PRs here I'll give it a once over, add a CLI and make the repo public 👍

The end goal is probably to have the tool run daily, and open/update GitHub issues if there are any drifts with master, with basic code recommendations. Having it automate PRs would be ideal but I'm sure there will be difficulties automating everything, e.g. generating symbolic values for ec2.InstanceClass

Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Thanks 👍
I left some notes as I found some inconsistencies between the changes and the AWS documentation. Not sure if the documentation is outdated.

/**
* Version "11.16"
* @deprecated Version 11.16 is no longer supported by Amazon RDS.
*/
public static readonly VER_11_16 = AuroraPostgresEngineVersion.of('11.16', '11', { s3Import: true, s3Export: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs mark Aurora PostgreSQL v11 deprecated up to 11.15.
Did you check a different source?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs would also be out of date then, I'm using the SDK for reference. In this case, it's not even listed. Here is the CLI command:

$ aws rds describe-db-engine-versions --engine aurora-postgresql --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion=="11.16")'

* Version "5.7.mysql_aurora.2.05.1"
* @deprecated Version 5.7.mysql_aurora.2.05.1 is no longer supported by Amazon RDS.
*/
public static readonly VER_2_05_1 = AuroraMysqlEngineVersion.builtIn_5_7('2.05.1');
Copy link
Contributor

Choose a reason for hiding this comment

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

Cannot find this version in the release notes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, based on the SDK, it's not listed. It could have been removed, or never existed:

$ aws rds describe-db-engine-versions --engine aurora-mysql --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | endswith("2.05.1"))'

/**
* Version "12.00.6293.0.v1".
* @deprecated SQL Server 12.00.6293.0.v1 is no longer supported by Amazon RDS.
*/
public static readonly VER_12_00_6293_0_V1 = SqlServerEngineVersion.of('12.00.6293.0.v1', '12.00');
Copy link
Contributor

Choose a reason for hiding this comment

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

12.00.6293.0.v1 and above seem still supported from docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, not listed by the SDK:

$ aws rds describe-db-engine-versions --engine sqlserver-se --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("12."))'
$ aws rds describe-db-engine-versions --engine sqlserver-ee --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("12."))'
$ aws rds describe-db-engine-versions --engine sqlserver-ex --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("12."))'
$ aws rds describe-db-engine-versions --engine sqlserver-web --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("12."))'

/**
* Version "5.7.36"
* @deprecated MySQL 5.7.36 is no longer supported by Amazon RDS.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like v5 is now deprecated (docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, based on the SDK:

$ aws rds describe-db-engine-versions --engine mysql --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("5.")) | .EngineVersion,.Status'
5.7.37
available
5.7.38
available
5.7.39
available
5.7.40
available
5.7.41
available
5.7.42
available
5.7.43
available
5.7.44
available

/** Version "11.16". */
/**
* Version "11.16"
* @deprecated PostgreSQL 11.16 is no longer supported by Amazon RDS.
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like v11 is now deprecated (docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again, based on the SDK:

$ aws rds describe-db-engine-versions --engine postgres --region us-east-1 | jq -r '.DBEngineVersions[] | select(.EngineVersion | startswith("11.")) | .EngineVersion,.Status'
11.17
available
11.18
available
11.19
available
11.20
available
11.21
available
11.22
available

@@ -1841,67 +2249,159 @@ class OracleEeCdbInstanceEngine extends OracleInstanceEngineBase {
* and `DatabaseInstanceEngine.sqlServerEe`).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* and `DatabaseInstanceEngine.sqlServerEe`).
* and `DatabaseInstanceEngine.sqlServerEe`).
*
* @see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport

I think it would be useful to add links in the documentation for each class showing the version notes for each instance and cluster engine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seen as the documentation doesn't seem to match the live data, it might be confusing, not sure about this

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, that's confusing indeed. I guess we should trust the API.
Thanks for the detailed clarification 👍

Copy link
Contributor

@paulhcsun paulhcsun left a comment

Choose a reason for hiding this comment

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

Nice work @nmussy! Looking forward to the completed version of your tool, it'll be super helpful!

Thanks for the review @msambol @lpizzinidev!

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: ea20b85
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 11, 2024
Copy link
Contributor

mergify bot commented Mar 11, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit bf33efd into aws:main Mar 11, 2024
13 checks passed
@nmussy nmussy deleted the chore-rds-versions branch March 11, 2024 17:32
mergify bot pushed a commit that referenced this pull request Mar 11, 2024
### Issue # (if applicable)

Closes #23854

### Reason for this change

Update the CDK EC2 instance class and size enums to match the current availability

### Description of changes

Added the missing instance class and sizes

### Description of how you validated changes

This was generated with the help of the same tool I used to create #29422, using the live SDK data to match against the CDK. For the instance types, I am using the `DescribeInstanceTypes` API command in multiple regions (`us-east-1`, `us-east-2`, `us-west-1`, `eu-west-1`.) As far as I could tell, the union of `us-east-1` and `us-east-2` cover all possible instance classes and sizes, but correct me if I'm wrong.

As a sanity check, I'm also checking that the CDK does not have more instance types and sizes that the SDK does. It does vary between regions, but of note, there were:
* `p4de`, in developer preview
* `x2g`, RDS exclusive and not returned by `DescribeInstanceTypes`

Finally, I am ignoring some of the previous generation instance classes missing from the CDK, as they are very outdated and weren't added in first place, i.e. `c1`, `t1`, `m1`, `m2`, and `i2`.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
mergify bot pushed a commit that referenced this pull request Jun 26, 2024
### Issue # (if applicable)

None

### Reason for this change

Update the CDK RDS engine versions to match the current availability, as well as facilitate automated alerts for updates in the future

### Description of changes

* Added missing engine version for all RDS engines
* Added missing `@deprecated` TSDoc tags


### Description of how you validated changes

The available versions were compared to live AWS API data. See #29422 for more details.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
5 participants