Repository navigation
fix(scripts): only collect orderable options for available RDS versions - #4946
Merged
kddejong merged 3 commits intoOct 27, 2026
Merged
Conversation
update_schemas_from_aws_api.py has aborted on every scheduled run since sqlserver-dev-ee and sqlserver-dev-se joined _ENGINE_SUPPORTED. That list does double duty: it gates the engine version data and, through available_results, it also gates DescribeOrderableDBInstanceOptions. That operation refuses the SQL Server development engines with InvalidParameterValue unless the calling account owns a custom engine version built from the template version, so one engine took down the whole data refresh. Skip the engines whose orderable options need an account owned CEV, and treat a per-request InvalidParameterValue or InvalidParameterCombination on that operation as a warning for that engine version rather than a fatal error, so a family AWS adds later degrades instead of aborting. Credential, throttling and service errors still propagate.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4946 +/- ##
=======================================
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:
|
DescribeDBEngineVersions returns three Status values, not two. The available/deprecated branch let requires-custom-engine-version fall through into available_results, so DescribeOrderableDBInstanceOptions was called for sqlserver-dev-ee and sqlserver-dev-se, which it cannot serve, and the refresh aborted. Replaces the engine-name predicate and the ClientError handler added earlier on this branch with the status AWS already reports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
scripts/update_schemas_from_aws_api.pyhas aborted on every scheduled run since 2026-10-22:Root cause
DescribeDBEngineVersionsalready labels these versions. It returns aStatusfield, andrds_api()branches on only one of its values:The
elseis the bug. Anything that is notdeprecatedis treated as available and enrolled inavailable_results, which is what drives the second loop'sDescribeOrderableDBInstanceOptionscalls. A third status exists, and it means precisely "you cannot enumerate this without creating a
CEV first".
Measured across all 23 engines in
_ENGINE_SUPPORTED, us-east-1, 2026-10-27 — every valueDescribeDBEngineVersionsreturned, withIncludeAll=True:Statusavailabledeprecatedrequires-custom-engine-versionOnly three statuses exist. The 18 are exactly
sqlserver-dev-ee(13) andsqlserver-dev-se(5) —the two engines that fail, and nothing else.
This branch has always swallowed a non-
deprecatedstatus; it became an abort when #4830(
9cb4896, fixes #4822) addedneptune,sqlserver-dev-eeandsqlserver-dev-seto_ENGINE_SUPPORTEDso E3690/E3691 would stop rejecting engines CloudFormation accepts. That listdoes double duty — it filters the version enums and feeds the orderable-options loop — so the
addition enrolled two engines in a call that cannot serve them. There is no
Fixes #line becauseno issue was filed.
Corroborating:
sqlserver-dev-eeis absent fromsrc/cfnlint/data/schemas/extensions/aws_rds_dbinstance/db_instance_class.json, so that loop hasnever produced data for it.
The fix
One line. The engine/version enums are untouched —
resultsstill receives all three statuses, sosqlserver-dev-*keeps appearing inengine_version.jsonexactly as it does today. Only theorderable-options collection narrows, and it narrows to the versions AWS says are orderable.
An earlier revision of this branch did this with a
-dev-engine-name predicate, a skip-codefrozenset and a
try/except ClientError— 48 lines inferring from the engine name what the APIalready states in a field. That is reverted here. A naming predicate also has to be re-guessed
every time AWS ships a new family; a status check does not.
Verification
Against us-east-1, 2026-10-27, running the script end to end:
upstream/mainInvalidParameterValue ... A custom engine version is required for SQL Server engine sqlserver-dev-eeexit=0, every engine through to the Elasticache stage, ~12 minStubbed tests, following the
importlib+patch.objectpattern of the neighbouringtest_update_specs_from_pricing.py:The 16 failures are pre-existing and identical by name to a pristine
upstream/mainworktree(16 failed / 3229 passed; the +2 are the new tests). All are missing optional deps — pydot,
junit-xml, jschema-to-python.
The two tests:
test_requires_custom_engine_version_is_not_collected— arequires-custom-engine-versionversion never reaches
DescribeOrderableDBInstanceOptions. This fails on pristineupstream/main, wheresqlserver-dev-eeis requested, so it is the reproduction rather than arestatement of the new code.
test_available_and_deprecated_versions_are_unchanged—availableanddeprecatedstill routewhere they did, and all three statuses still reach the engine/version enums. Passes on both trees
by design; it is the guard against over-correcting.
No file under
src/cfnlint/data/is modified, so no-m datarun is needed.Not fixed here: the shared dict
results_db_instance_class = dict.fromkeys(available_results.keys(), dict())passes one dict asthe value for every key, so all engines share it and each ends up with every other engine's minor
versions. It is a real and separate bug, it is not what causes this abort, and #4870 fixes it.
Left alone here so the two do not conflict.