Skip to content

fix(rules): accept neptune and sqlserver-dev engines in E3690/E3691 - #4830

Merged
kddejong merged 1 commit into
aws-cloudformation:mainfrom
Varshith-Kali:fix/rds-engine-enum-4822
Oct 22, 2026
Merged

kddejong merged 1 commit into
aws-cloudformation:mainfrom
Varshith-Kali:fix/rds-engine-enum-4822

Conversation

@Varshith-Kali

Copy link
Copy Markdown
Contributor

Issue #, if available:
#4822

Description of changes:

E3690 (AWS::RDS::DBCluster) and E3691 (AWS::RDS::DBInstance) rejected Engine values that RDS serves and CloudFormation accepts, producing false positives on valid templates:

  • Engine: neptune on both AWS::RDS::DBCluster and AWS::RDS::DBInstance (RDS serves the neptune engine, the resource schemas type Engine as a plain string, and CloudFormation creates the stack)
  • Engine: sqlserver-dev-ee and Engine: sqlserver-dev-se on AWS::RDS::DBInstance (both are documented valid values)

Root cause: the engine allowlists are hand-maintained in scripts/update_schemas_from_aws_api.py (_ENGINE_SUPPORTED and the cluster engine lists) rather than derived from what RDS serves, and the three engines were missing. The generated extension schemas (aws_rds_dbinstance/engine_version.json, aws_rds_dbcluster/engine_version.json) inherited the gap.

Changes:

  • scripts/update_schemas_from_aws_api.py: added neptune to _ENGINE_SUPPORTED and to the DB cluster engine lists (including the cluster deprecated writer, keeping it in parity with the cluster writer); added sqlserver-dev-ee and sqlserver-dev-se to _ENGINE_SUPPORTED. The DB instance deprecated writer keeps its existing 4-engine subset, matching the established pattern for the other supported engines.
  • Regenerated data (hand-applied with the script's exact JSON dump parameters since this environment has no AWS API access): the three engines added to the Engine enum in aws_rds_dbinstance/engine_version.json, neptune added to the Engine enum in aws_rds_dbcluster/engine_version.json. Per-engine EngineVersion entries for the new engines will populate on the next script run with API access; until then EngineVersion is unconstrained for these engines (fail-open, the safe direction).
  • Added test/unit/rules/resources/rds/test_db_engine_version_data.py: regression tests that load the real extension schemas and assert the issue's cases pass while unknown engines still fail.

Verification:

  • New tests: 5 of 9 fail on the pre-fix tree (the four issue cases plus a mixed-case Neptune case), all 9 pass post-fix.
  • Full test/unit/rules/ suite: 2033 passed. ruff check and ruff format --check clean on changed files.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

E3690 (DBCluster) and E3691 (DBInstance) rejected Engine values that
RDS serves and CloudFormation accepts: neptune on both resources, and
sqlserver-dev-ee / sqlserver-dev-se on DBInstance (both documented as
valid). The engine lists are hand-maintained in
scripts/update_schemas_from_aws_api.py, so add the missing engines
there and in the generated extension schemas. Fixes aws-cloudformation#4822.
@kddejong
kddejong force-pushed the fix/rds-engine-enum-4822 branch from a8e9181 to 833f7ed Compare October 22, 2026 15:10
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.68%. Comparing base (e8f395b) to head (833f7ed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4830   +/-   ##
=======================================
  Coverage   94.68%   94.68%           
=======================================
  Files         439      439           
  Lines       15973    15973           
  Branches     3097     3097           
=======================================
  Hits        15124    15124           
  Misses        467      467           
  Partials      382      382           
Flag Coverage Δ
unittests 94.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong
kddejong merged commit 9cb4896 into aws-cloudformation:main Oct 22, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants