refactor(rds): make CreateDBInstance async, drop 180s SDK timeout#808
Merged
vieiralucas merged 1 commit intomainfrom Apr 28, 2026
Merged
refactor(rds): make CreateDBInstance async, drop 180s SDK timeout#808vieiralucas merged 1 commit intomainfrom
vieiralucas merged 1 commit intomainfrom
Conversation
CreateDBInstance now returns a `creating` placeholder ~immediately and
runs the container start (and any underlying postgres image pull/build)
in a background tokio task. DescribeDBInstances flips the row to
`available` once the container is up, or removes it and emits
RDS-EVENT-0058 ("DB instance failed to create") on failure. Matches
real AWS RDS behavior — CreateDBInstance never blocks on the container.
- The `<Endpoint>` element is suppressed from the Create/Describe XML
while the instance is in `creating` so SDK callers don't try to dial
an empty host:0.
- Persistence load drops any `creating` rows from a captured snapshot;
the background task didn't survive the restart and the placeholder
would otherwise be stuck forever.
- New `helpers::wait_for_db_available` for tests that need the
endpoint after Create. Existing rds e2e tests + sdk e2e bridge into
it; the heavy-engine and aws_lambda/aws_s3 tests pass through too.
- TypeScript SDK e2e drops the 180_000 ms blanket timeout in favor of
an explicit poll loop on DescribeDBInstances, matching what users
will write themselves.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
3 tasks
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
fix(rds): forward fmt + SDK e2e poll fixes from PR #808
4 tasks
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
CreateDBInstance returns a
creatingplaceholder ~immediately. The container start (and any underlying postgres image pull/build) runs in a background task; DescribeDBInstances flips toavailableonce the container is up, or removes the row and emits RDS-EVENT-0058 ("DB instance failed to create") on failure. Matches real AWS RDS behavior.<Endpoint>suppressed from XML while status iscreating.creatingrows from captured snapshots (background task didn't survive restart).helpers::wait_for_db_availabletest helper; existing rds tests + sdk tests bridge into it.Test plan
cargo clippy --workspace --all-targets -- -D warningscargo fmt --allcargo test -p fakecloud-rds(120 unit tests)Summary by cubic
Make RDS
CreateDBInstanceasynchronous: it returnscreatingimmediately and starts the container in the background;DescribeDBInstancesflips toavailablewhen ready or emitsRDS-EVENT-0058on failure. Tests, SDK e2e, and docs now poll for readiness; the<Endpoint>field is hidden until the instance is live.New Features
availableor cleans up and emitsRDS-EVENT-0058on failure.<Endpoint>omitted while status iscreating.creatingrows captured mid-create.helpers::wait_for_db_availablefor tests; e2e and heavy-engine tests updated.DescribeDBInstancespoll loop (test timeout 300s).Migration
CreateDBInstance, pollDescribeDBInstancesuntil status isavailable. Do not expectEndpointduringcreating.Written for commit 31e89bf. Summary will update on new commits. Review in cubic