feat(rds): real Oracle, SQL Server, and Db2 engines via Docker#773
feat(rds): real Oracle, SQL Server, and Db2 engines via Docker#773vieiralucas merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
8 issues found across 10 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="website/content/local-rds.md">
<violation number="1" location="website/content/local-rds.md:20">
P3: Use `SQL Server` instead of `Microsoft` in the driver list to keep engine/driver naming accurate and consistent.</violation>
</file>
<file name="crates/fakecloud-e2e/tests/rds_heavy_engines.rs">
<violation number="1" location="crates/fakecloud-e2e/tests/rds_heavy_engines.rs:44">
P2: Fail the heavy-DB lane when Docker is missing instead of skipping it, so CI doesn't silently omit the intended coverage.</violation>
</file>
<file name="website/content/localstack-alternative.md">
<violation number="1" location="website/content/localstack-alternative.md:30">
P3: This new claim adds Memcached support for ElastiCache, but the same page still documents ElastiCache as Redis/Valkey only. Keep the capability list consistent to avoid misleading users.</violation>
</file>
<file name="website/content/fake-aws-server.md">
<violation number="1" location="website/content/fake-aws-server.md:20">
P2: This line incorrectly states that ElastiCache runs real Memcached. Current docs specify only Redis/Valkey are Docker-backed, while Memcached does not run a real backing process.</violation>
</file>
<file name="website/static/llms.txt">
<violation number="1" location="website/static/llms.txt:11">
P3: The added ElastiCache `Memcached` claim is inconsistent with the rest of this file and likely inaccurate for this PR scope. Keep this line aligned with the supported-services section to avoid misleading capability docs.</violation>
</file>
<file name="README.md">
<violation number="1" location="README.md:42">
P2: This line overstates ElastiCache capabilities: Memcached is not backed by real Docker containers in this project. Keep this statement aligned with actual behavior to avoid misleading users.</violation>
</file>
<file name="crates/fakecloud-rds/src/runtime.rs">
<violation number="1" location="crates/fakecloud-rds/src/runtime.rs:107">
P1: Newly enabled Oracle/SQL Server/Db2 engines are not supported by dump/restore paths, so snapshot and read-replica operations will fail by running PostgreSQL tools in those containers.</violation>
</file>
<file name="crates/fakecloud-rds/src/service.rs">
<violation number="1" location="crates/fakecloud-rds/src/service.rs:3103">
P1: New engine default parameter-group names are generated, but corresponding default groups are not present in state initialization, so CreateDBInstance can fail with DBParameterGroupNotFound when DBParameterGroupName is omitted.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| } | ||
| "oracle-ee" | "oracle-se2" | "oracle-ee-cdb" | "oracle-se2-cdb" => { | ||
| let major = engine_version.split('.').next().unwrap_or("23"); | ||
| format!("default.{engine}-{major}") |
There was a problem hiding this comment.
P1: New engine default parameter-group names are generated, but corresponding default groups are not present in state initialization, so CreateDBInstance can fail with DBParameterGroupNotFound when DBParameterGroupName is omitted.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At crates/fakecloud-rds/src/service.rs, line 3103:
<comment>New engine default parameter-group names are generated, but corresponding default groups are not present in state initialization, so CreateDBInstance can fail with DBParameterGroupNotFound when DBParameterGroupName is omitted.</comment>
<file context>
@@ -3050,6 +3098,24 @@ fn default_parameter_group(engine: &str, engine_version: &str) -> String {
}
+ "oracle-ee" | "oracle-se2" | "oracle-ee-cdb" | "oracle-se2-cdb" => {
+ let major = engine_version.split('.').next().unwrap_or("23");
+ format!("default.{engine}-{major}")
+ }
+ "sqlserver-ee" | "sqlserver-se" | "sqlserver-ex" | "sqlserver-web" => {
</file context>
| - **Real HTTP server**, not an in-process mock. Your Go / Java / Kotlin / Node / Rust / PHP / Python code uses the regular AWS SDK with `endpoint_url` set to `http://localhost:4566`. | ||
| - **Speaks the AWS wire protocol** at 100% conformance per implemented service. 26 services, 1,924 operations, validated against AWS's own Smithy models on every commit (59,000+ generated test variants). | ||
| - **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB, ElastiCache runs real Redis/Valkey. | ||
| - **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB/Oracle/SQL Server/Db2, ElastiCache runs real Redis/Valkey/Memcached. |
There was a problem hiding this comment.
P2: This line incorrectly states that ElastiCache runs real Memcached. Current docs specify only Redis/Valkey are Docker-backed, while Memcached does not run a real backing process.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At website/content/fake-aws-server.md, line 20:
<comment>This line incorrectly states that ElastiCache runs real Memcached. Current docs specify only Redis/Valkey are Docker-backed, while Memcached does not run a real backing process.</comment>
<file context>
@@ -17,7 +17,7 @@ Listens on `http://localhost:4566`. Any AWS SDK in any language points at it and
- **Real HTTP server**, not an in-process mock. Your Go / Java / Kotlin / Node / Rust / PHP / Python code uses the regular AWS SDK with `endpoint_url` set to `http://localhost:4566`.
- **Speaks the AWS wire protocol** at 100% conformance per implemented service. 26 services, 1,924 operations, validated against AWS's own Smithy models on every commit (59,000+ generated test variants).
-- **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB, ElastiCache runs real Redis/Valkey.
+- **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB/Oracle/SQL Server/Db2, ElastiCache runs real Redis/Valkey/Memcached.
- **Real cross-service wiring**: S3 -> Lambda, SQS -> Lambda, SNS fan-out, EventBridge -> Step Functions, and 15+ more integrations execute end-to-end, not as stubs.
- **Free, open-source, AGPL-3.0.** No account, no auth token, no paid tier.
</file context>
| - **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB/Oracle/SQL Server/Db2, ElastiCache runs real Redis/Valkey/Memcached. | |
| - **Real execution** for stateful services: Lambda runs your function code in Docker containers across 13 runtimes, RDS runs real PostgreSQL/MySQL/MariaDB/Oracle/SQL Server/Db2, ElastiCache runs real Redis/Valkey. |
Adds three new engine families that boot a real database container, matching the Postgres/MySQL/MariaDB pattern: - Oracle Database Free 23 (gvenzl/oracle-free:23-slim) on port 1521 - SQL Server 2022 Express (mcr.microsoft.com/mssql/server:2022-latest) on port 1433 - Db2 Community Edition (icr.io/db2_community/db2:latest) on port 50000, launched with --privileged because Db2 sets kernel params during startup Each engine has a log-marker readiness probe followed by a TCP probe to handle the lag between engine-ready logs and listener-binding. Default ports, parameter group names, license models, and DB names are wired through service.rs to match AWS's reported defaults.
- Reject snapshot/read-replica dump+restore for Oracle/SQL Server/Db2 with a clear error instead of running pg_dump/psql against them - Register default parameter groups for the new engine families so CreateDBInstance with omitted DBParameterGroupName succeeds - Heavy-DB E2E lane panics on missing Docker after FAKECLOUD_E2E_HEAVY_DBS=1 is set, instead of silently skipping - Make ElastiCache Memcached references consistent across README, llms.txt, and localstack-alternative tables (matches PR #768) - Use 'SQL Server' (not 'Microsoft') in driver list
02f71cc to
536b11b
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
Closes the last RDS engine gaps from the audit. Where the previous engines (Postgres/MySQL/MariaDB) start a real backing container, fakecloud now does the same for Oracle, SQL Server, and Db2 via the upstream free-tier images:
Each engine has a log-marker readiness probe followed by a TCP probe to bridge the lag between the engine-ready log line and the listener actually binding. Db2 launches under `--privileged` because the container sets kernel params during startup; license-acceptance env vars (`ACCEPT_EULA`, `LICENSE`) are passed automatically.
Service-side wiring extended in lockstep:
Test plan
Summary by cubic
Adds real Oracle, SQL Server, and Db2 engines to RDS by launching the upstream Docker images and exposing real, connectable endpoints. Aligns engine/version validation, AWS defaults, and adds E2E coverage.
New Features
gvenzl/oracle-free:23-slim, 1521), SQL Server 2022 Express (mcr.microsoft.com/mssql/server:2022-latest, 1433), Db2 Community (icr.io/db2_community/db2:latest, 50000).ACCEPT_EULA,LICENSE); Db2 runs with--privileged.FAKECLOUD_E2E_HEAVY_DBS=1) plus unit tests; docs updated across README and site.Bug Fixes
pg_dump/psqlfallback).DBParameterGroupName.FAKECLOUD_E2E_HEAVY_DBS=1is set but Docker is unavailable; docs wording synced (Memcached references, “SQL Server” naming).Written for commit 536b11b. Summary will update on new commits.