Fix(rds): handle MasterUserPassword in ModifyDBInstance#376
Merged
Nahuel990 merged 4 commits intoministackorg:mainfrom Apr 18, 2026
Merged
Fix(rds): handle MasterUserPassword in ModifyDBInstance#376Nahuel990 merged 4 commits intoministackorg:mainfrom
Nahuel990 merged 4 commits intoministackorg:mainfrom
Conversation
Nahuel990
approved these changes
Apr 18, 2026
Collaborator
|
Good work @ptanlam we'll be adding a modification related to the import of psycopg2 in the tests but excellent contribution. Welcome to Ministack! |
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.
Summary
ModifyDBInstancenow correctly handlesMasterUserPasswordchanges — previously the password was silently ignored_MasterUserPasswordinternally (matching how clusters already do), enabling password tracking and rotation_rotate_instance_passwordhelper rotates the password on real Docker-backed Postgres and MySQL containersProblem
Applications calling
ModifyDBInstancewithMasterUserPasswordexpected the password to be updated (matching real AWS behavior), but MiniStack silently discarded the value. Thefield_mapmapped"MasterUserPassword": None, and the loop skipped allNone-mapped entries. UnlikeDBParameterGroupName(alsoNone-mapped but with dedicated handling below), there was no special code path for password changes. Additionally, instances never stored_MasterUserPasswordat creation time, so there was no way to track the old password for rotation.Changes
ministack/services/rds.py_MasterUserPasswordon instances at creation; add_rotate_instance_passwordhelper (supports both MySQL/MariaDB and PostgreSQL); handleMasterUserPasswordin_modify_db_instancetests/test_rds.pytest_rds_modify_instance_password— creates instance, modifies password, asserts operation succeeds and other fields remain unchangedTest plan
test_rds_modify_instance_passwordpassestest_rds_modify_cluster_passwordstill passes_MasterUserPassworddefaults to"password"for existing instances without the field