-
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
(neptune-alpha): Fix construct to dynamically update supported engine versions #33444
Comments
Thank you for the feedback. I think supported list should be a static enum or enum-like class. For anything newly supported but not yet in the list, CDK should allow user to specify using a static method like Looking at aws-cdk/packages/@aws-cdk/aws-neptune-alpha/lib/cluster.ts Lines 19 to 118 in 523e0f0
I think we can simply new EngineVersion('new_version_string'); before we have a separate PR to update the list. |
I like the idea of a "catch-all". That seems to be what Aurora are doing here: aws-cdk/packages/aws-cdk-lib/aws-rds/lib/cluster-engine.ts Lines 645 to 669 in 39151d0
However, I am curious as to why we have these enumerated engine versions. This is just a string in our APIs and in CloudFormation. If a user inputs an unsupported engine version, the API throws an Exception. Is the intent here to have better error handling? If so, we have the DescribeDBEngineVersionsCommand API as a means to fetch the current list of supported engine versions. The input can be checked against that list versus relying on commits here to update the list of enumerated versions. For example, DocDB's L1 construct is just taking a string for
RDS's EngineVersion class also just accepts an arbitrary string: aws-cdk/packages/aws-cdk-lib/aws-rds/lib/engine-version.ts Lines 5 to 23 in 39151d0
Neptune's L1 construct is auto-generated, so it should be the same as the CFN resource spec for a cluster accepts a string for engine version. There are also older engine versions in this Neptune L2 construct that are no longer supported (anything older than 1.1.0.0). Unless there's a good reason for having these enumerated versions, I would suggest just removing them and supporting a string for |
There is - enums improve DX and that's why they're used pretty widely in AWS CDK. Reposting from Slack:
|
Describe the feature
The construct does not automatically update the supported engine versions and supported instance families. It needs to be altered to fetch the current supported engine versions via: DescribeDBEngineVersionsCommand
And the latest set of supported instance types/sizes via: DescribeOrderableDBInstanceOptionsCommand
Use Case
Provide users the ability to configure latest engine versions for a cluster along with the full list of supported instance types when using the neptune L2 construct (alpha).
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.178.2
Environment details (OS name and version, etc.)
N/A
The text was updated successfully, but these errors were encountered: