Repository navigation
Conversation
|
Hi maintainers, the CI workflows on this PR are waiting on the first-time-contributor approval gate. Would appreciate an approval to run them when you get a moment. Happy to address any review feedback. Thanks! |
|
Hi team, on this fix(rds) PR: the [CI] Test PR workflow run on the current head is still parked waiting for a first-time-contributor approval (action_required). Could a maintainer approve the run so CI can proceed? Thanks. |
…class.json The generator in scripts/update_schemas_from_aws_api.py built the per-engine results with dict.fromkeys(available_results.keys(), dict()), handing every engine the same dict object. Each minor-version bucket then accumulated the union of all engines' orderable classes, so all 14 engines carried identical enums and branches for versions they do not even have (e.g. aurora-mysql had a MariaDB 10.11 branch). E3062 passed invalid engine/class/version combos such as mysql 5.7 on db.t4g.medium. Fix the generator to build a fresh dict per engine, drop the 842 branches that pair an engine with a version it does not have (validated against engine_version.json from the same data run), and scope the mysql 5.7 enum to the db.m5/db.r5/db.t3 families RDS actually offers for mysql 5.7.44 in us-east-1 (issue aws-cloudformation#4853). Add regression tests covering the issue repro, the mysql 5.7 enum, and the cross-engine branch check. Fixes aws-cloudformation#4853 Signed-off-by: Varshith Puli <pulivarshit@gmail.com>
2ad7546 to
83df052
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4870 +/- ##
=======================================
Coverage 94.69% 94.69%
=======================================
Files 442 442
Lines 16083 16083
Branches 3119 3119
=======================================
Hits 15229 15229
Misses 470 470
Partials 384 384
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fixes #4853
Root cause
scripts/update_schemas_from_aws_api.pybuilt the per-engine class data withdict.fromkeys(available_results.keys(), dict()), which hands every engine the same dict object. Every minor-version bucket then accumulated the union of all engines' orderable classes, so all 14 engines carried identicalDBInstanceClassenums and branches for versions they do not even have (e.g. aurora-mysql had a branch for the MariaDB version 10.11). E3062 passed invalid engine/class/version combos, like mysql 5.7 on db.t4g.medium, which then fails at deploy time with CREATE_FAILED. This aliasing has been in the script since E3062 was added, so the data file was never correct.Changes
scripts/update_schemas_from_aws_api.py: build a fresh dict per engine instead of sharing one viadict.fromkeys. Future regenerations (which need AWS credentials) will now produce correct per-engine data.src/cfnlint/data/schemas/extensions/aws_rds_dbinstance/db_instance_class.json:engine_version.jsonfrom the same data run (e.g. aurora-mysql now only has 5.7/8.0/8.4, mariadb only 10.5/10.6/10.11/11.4/11.8/12.3).test/unit/rules/resources/rds/test_db_instance_class_data.py: new regression tests.Test evidence
test/unit/rules/resources/rds/pass.5.7.44-rds.20260902, db.t4g.medium) now produces a single E3062 error; db.r5.large on the same engine/version and db.t4g.medium on mysql 8.0 still pass.ruff checkandruff format --checkclean on changed files. The JSON was rewritten with the generator's exact serialization settings, and a round-trip check on the original file confirmed byte stability, so the diff is purely the data correction.Note
For minor versions shared by engines in the same family (e.g. mysql and aurora-mysql on 8.0, sqlserver flavors on 15.00), the enums remain the union across those engines, since I could not source the exact per-engine split without AWS API access. The script fix means the next regeneration with credentials will produce the exact per-engine enums. Nothing in this PR makes any currently passing valid combo fail: branch pruning only removed engine/version pairings the engine does not have, and the mysql 5.7 scoping matches the authoritative data in the issue.