refactor(rds): extract build_restored_instance from restore_db_instance_from_db_snapshot#348
Merged
vieiralucas merged 1 commit intomainfrom Apr 13, 2026
Conversation
Mirror the build_read_replica_instance extraction from PR #347 for the restore-from-snapshot path. The 30-field DbInstance literal inside restore_db_instance_from_db_snapshot no longer interrupts the async control flow (snapshot lookup → spin up container → restore dump → register in state).
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
Mirror of PR #347's `build_read_replica_instance` extraction for the restore-from-snapshot path. The 30-field `DbInstance` literal inside `restore_db_instance_from_db_snapshot` was the one block not belonging in the async flow (snapshot lookup → ensure container → restore dump → register in state); extract it as `build_restored_instance` so the outer function reads as the sequence of phases it actually is.
Test plan
Summary by cubic
Extracted
build_restored_instancefromrestore_db_instance_from_db_snapshotto encapsulate building a restoredDbInstancefrom a snapshot and running container. Mirrorsbuild_read_replica_instanceand simplifies the async restore flow with no behavior changes.Written for commit b288db7. Summary will update on new commits.