Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mysql): Add seed support in MySQL #552

Merged
merged 4 commits into from
May 11, 2024

Conversation

OverkillGuy
Copy link
Contributor

@OverkillGuy OverkillGuy commented Apr 21, 2024

Ref #541.
New capability of "seeding" a db container using image's support for /docker-entrypoint-initdb.d/ folder.

Using the "transferable" system, borrowed from Kafka.

Updates DbContainer to have a new (NOOP-default) _transfer_seed() method, run after _start() and before _connect(), to allow the folder transfer.

Currently implemented only in MySQL, but extensible to others that use the /docker-entrypoint-initdb.d/ system.

New capability of "seeding" a db container, by running a
database-specific command or twelve to inject data (DB schema or sample
data).
Relies on the image's support for /docker-entrypoint-initdb.d/ folder
@alexanderankin alexanderankin changed the title Add seed support in MySQL fix: Add seed support in MySQL Apr 21, 2024
@alexanderankin alexanderankin added the community-feat feature but its a community module so we wont bump tc core for it label Apr 21, 2024
Jb DOYON added 2 commits April 26, 2024 02:06
Stop waiting for connection, which requires ready container.
Instead copy data first thing.
@OverkillGuy
Copy link
Contributor Author

Updated to use "transferable" like kafka does, which makes this support remote docker engines!

@OverkillGuy OverkillGuy marked this pull request as ready for review April 27, 2024 13:42
@OverkillGuy OverkillGuy changed the title fix: Add seed support in MySQL feat: Add seed support in MySQL Apr 27, 2024
@OverkillGuy OverkillGuy changed the title feat: Add seed support in MySQL fix: Add seed support in MySQL Apr 27, 2024
@alexanderankin alexanderankin changed the title fix: Add seed support in MySQL fix(mysql): Add seed support in MySQL May 11, 2024
@alexanderankin alexanderankin merged commit 396079a into testcontainers:main May 11, 2024
21 checks passed
@OverkillGuy OverkillGuy deleted the db-seed-doc branch May 11, 2024 15:43
alexanderankin pushed a commit that referenced this pull request May 14, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.4.1](testcontainers-v4.4.0...testcontainers-v4.4.1)
(2024-05-14)


### Bug Fixes

* Add memcached container
([#322](#322))
([690b9b4](690b9b4))
* Add selenium video support
[#6](#6)
([#364](#364))
([3c8006c](3c8006c))
* **core:** add empty _configure to DockerContainer
([#556](#556))
([08916c8](08916c8))
* **core:** remove version from compose tests
([#571](#571))
([38946d4](38946d4))
* **keycloak:** add realm imports
([#565](#565))
([f761b98](f761b98))
* **mysql:** Add seed support in MySQL
([#552](#552))
([396079a](396079a))
* url quote passwords
([#549](#549))
([6c5d227](6c5d227))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-feat feature but its a community module so we wont bump tc core for it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants