feat(rds): MySQL/MariaDB Lambda bridge + prebuilt images#810
Merged
vieiralucas merged 1 commit intomainfrom Apr 28, 2026
Merged
feat(rds): MySQL/MariaDB Lambda bridge + prebuilt images#810vieiralucas merged 1 commit intomainfrom
vieiralucas merged 1 commit intomainfrom
Conversation
Aurora MySQL exposes Lambda invocation as built-in stored procedures (`mysql.lambda_async`, `mysql.lambda_sync`). fakecloud now ships the same surface for both MySQL and MariaDB: - New `fakecloud-mysql` and `fakecloud-mariadb` images that bake a small libcurl-backed UDF (`fakecloud_post`, `fakecloud_post_async`) plus an Aurora-compatible bootstrap script that creates the stored procedures on first container start. Procedures POST to `/_fakecloud/rds/lambda-invoke` against `host.docker.internal`, reusing the same bridge endpoint as the postgres `aws_lambda` extension. - `RdsRuntime::ensure_mysql_image` / `ensure_mariadb_image` mirror the existing postgres pull-first/build-fallback path; a shared `ensure_bridge_image` helper centralizes the per-tag mutex + force- rebuild env knob across all three engines. - MySQL/MariaDB containers now receive the same `FAKECLOUD_*` env vars postgres already gets so the bootstrap can render the host endpoint and account ID into the procedure bodies. - `docker-rds-images.yml` extended with an engine-axis matrix (postgres/mysql/mariadb), publishing nine version+engine combinations on each release tag. - E2E test (`rds_mysql_lambda.rs`) drives both engines: create echo Lambda, spin up the container, exercise `mysql.lambda_sync` and `mysql.lambda_async` end-to-end.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
4 tasks
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
`aws_lambda_bridge_mysql_round_trip` and the matching mariadb test in PR #810 use `engine_version("8.0")` / `("10.11")` — short major-only strings AWS RDS accepts. The CreateDBInstance validator only knew about full `<major>.<minor>.<patch>` strings (`8.0.35`, `10.11.6`), so both tests have been failing on every main run since #810 merged with `EngineVersion 'X' is not supported yet.` Add the short majors for postgres, mysql, and mariadb to `supported_versions`. The runtime already resolves them — it parses the prefix to pick an image tag — so this is a validator-only gap.
3 tasks
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
`aws_lambda_bridge_mysql_round_trip` and the matching mariadb test in PR #810 use `engine_version("8.0")` / `("10.11")` — short major-only strings AWS RDS accepts. The CreateDBInstance validator only knew about full `<major>.<minor>.<patch>` strings (`8.0.35`, `10.11.6`), so both tests have been failing on every main run since #810 merged with `EngineVersion 'X' is not supported yet.` Add the short majors for postgres, mysql, and mariadb to `supported_versions`. The runtime already resolves them — it parses the prefix to pick an image tag — so this is a validator-only gap.
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
`aws_lambda_bridge_mysql_round_trip` and the matching mariadb test in PR #810 use `engine_version("8.0")` / `("10.11")` — short major-only strings AWS RDS accepts. The CreateDBInstance validator only knew about full `<major>.<minor>.<patch>` strings (`8.0.35`, `10.11.6`), so both tests have been failing on every main run since #810 merged with `EngineVersion 'X' is not supported yet.` Add the short majors for postgres, mysql, and mariadb to `supported_versions`. The runtime already resolves them — it parses the prefix to pick an image tag — so this is a validator-only gap.
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
`aws_lambda_bridge_mysql_round_trip` and the matching mariadb test in PR #810 use `engine_version("8.0")` / `("10.11")` — short major-only strings AWS RDS accepts. The CreateDBInstance validator only knew about full `<major>.<minor>.<patch>` strings (`8.0.35`, `10.11.6`), so both tests have been failing on every main run since #810 merged with `EngineVersion 'X' is not supported yet.` Add the short majors for postgres, mysql, and mariadb to `supported_versions`. The runtime already resolves them — it parses the prefix to pick an image tag — so this is a validator-only gap.
vieiralucas
added a commit
that referenced
this pull request
Apr 28, 2026
`aws_lambda_bridge_mysql_round_trip` and the matching mariadb test in PR #810 use `engine_version("8.0")` / `("10.11")` — short major-only strings AWS RDS accepts. The CreateDBInstance validator only knew about full `<major>.<minor>.<patch>` strings (`8.0.35`, `10.11.6`), so both tests have been failing on every main run since #810 merged with `EngineVersion 'X' is not supported yet.` Add the short majors for postgres, mysql, and mariadb to `supported_versions`. The runtime already resolves them — it parses the prefix to pick an image tag — so this is a validator-only gap.
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
Aurora MySQL parity for
mysql.lambda_async/mysql.lambda_sync. SQL inside an RDS-managed MySQL or MariaDB instance can now invoke fakecloud Lambda functions, mirroring what we shipped for postgres in #806.fakecloud-mysql+fakecloud-mariadbimages bake a libcurl-backed UDF (fakecloud_post,fakecloud_post_async) and a bootstrap that creates the Aurora-compatible stored procedures on first start.ensure_mysql_image/ensure_mariadb_imagereuse the postgres pull-first / build-fallback flow via a new sharedensure_bridge_imagehelper.FAKECLOUD_*env vars postgres already gets so the bootstrap can render the bridge URL.docker-rds-images.ymlmatrix extended overengine × version × arch(3 engines, 9 version+engine combinations, 2 arches).rds_mysql_lambda.rs) drives both engines end-to-end.Test plan
cargo clippy --workspace --all-targets -- -D warningscargo fmt --all -- --checkcargo test -p fakecloud-rds(120 tests)cargo test -p fakecloud-e2e --test rds_mysql_lambda(Docker-bound, in CI)docker-rds-images.ymlPR run exercises mysql + mariadb image builds for both archesNotes
CreateDBInstancewithengine=mysqlorengine=mariadbwill compile the libcurl UDF inside the container the first time the image is built locally; subsequent invocations reuse the cached image. After v0.13.2 publishes, end users will pull the prebuilt image and skip the build entirely.Summary by cubic
Adds an Aurora-compatible Lambda bridge for MySQL and MariaDB so SQL can invoke fakecloud Lambda via
mysql.lambda_asyncandmysql.lambda_sync. Ships prebuiltfakecloud-mysqlandfakecloud-mariadbimages and updates the runtime to pull-first with a local build fallback.New Features
fakecloud-mysqlandfakecloud-mariadbimages with a libcurl-backed UDF (fakecloud_post,fakecloud_post_async) and a bootstrap that createsmysql.lambda_async/mysql.lambda_sync.RdsRuntime::ensure_mysql_imageandRdsRuntime::ensure_mariadb_imagemirror the postgres flow to pull images or build locally.docker-rds-images.ymlnow builds/publishespostgres/mysql/mariadbacross version × arch with tags like<version>-<release>and a rolling<version>.rds_mysql_lambda.rscovers sync and async invocations on both engines.Refactors
ensure_bridge_imageandbridge_image_tagto centralize pull-first/build-fallback and tagging across engines.FAKECLOUD_*env vars, and bridge-aware engines add thehost.docker.internalalias for in-container callbacks.Written for commit 893fa2f. Summary will update on new commits. Review in cubic