feat: add oceanbase-ce module
OceanBase is a distributed relational database developed by Ant Group, and its community edition is open sourced at https://github.com/oceanbase/oceanbase.
There is a docker image maintained by the official team, and in this pull request I add OceanBaseContainer and OceanBaseContainerProvider for a new oceanbase-ce module based on the docker image. https://github.com/oceanbase/oceanbase/tree/master/tools/docker/standalone.
Thanks for your contribution! I have left some suggestions. Please, also take a look at at the build which just failed.
Thank you for your review, I have addressed the comments in the latest commit.
For the CI failure, it seems the container start failed, and I guess the reason may be the memory is not enought. To start the docker container of OceanBase, at least 2 cpu and 8g memory are required.
To start the docker container of OceanBase, at least 2 cpu and 8g memory are required.
I think this is a concern due to IIRC Docker Desktop provides a default of 4g or 8g so it will be at limit all the time not even allowing running other test in parallel. Is there any way to consume less resources. So far, I've seen DB2 consuming ~1.75g
To start the docker container of OceanBase, at least 2 cpu and 8g memory are required.
I think this is a concern due to IIRC Docker Desktop provides a default of 4g or 8g so it will be at limit all the time not even allowing running other test in parallel. Is there any way to consume less resources. So far, I've seen DB2 consuming ~1.75g
We have a plan to achieve lightweight deployment, but it may be difficult to achieve it in the near future.
Now we can't deploy the container on a free GitHub agent. For reference, we use the docker image through testcontainers on a self-hosted CI service in flink cdc.
Now we can't deploy the container on a free GitHub agent.
TBH, I think for now it will keep on hold if that the case 😕
Another option is to self-host the module as others do.
Now we can't deploy the container on a free GitHub agent.
TBH, I think for now it will keep on hold if that the case 😕
Another option is to self-host the module as others do.
OK, I understand. I would convert this pull request to a draft, and we can continue the process after https://github.com/oceanbase/oceanbase/issues/1557 is basically completed.
great! Thanks for your understanding! I'll be following the issue in order to get updates
I updated the container class with the new image oceanbase/oceanbase-ce:4.2.0.0 which can be deployed on GitHub Action now https://hub.docker.com/r/oceanbase/oceanbase-ce.
Currently the startup time is still more than 1 minute, I think we can use 3 min in this version and update it when https://github.com/oceanbase/oceanbase/issues/1573 is released. WDYT? @eddumelendez
Hi @whhe, great to see the improvements. Currently, 1 min is the maximum value we are setting. I would say reaching that limit would produce a not good experience when running tests, of course, it depends how those are set too. IMO, we can wait a little bit more and provide the best experience possible when the other issue is fixed.
Hi @whhe, great to see the improvements. Currently, 1 min is the maximum value we are setting. I would say reaching that limit would produce a not good experience when running tests, of course, it depends how those are set too. IMO, we can wait a little bit more and provide the best experience possible when the other issue is fixed.
Thanks for the suggestion, I think it makes perfect sense, will update this PR with the new image later.
Hi @eddumelendez, I updated this PR with our latest docker image, which can start in less than 30s with FASTBOOT enabled. I think we can go back to the review process now.
@eddumelendez PTAL if you are available.
Hi @eddumelendez, is there any plan for this pr?
Thanks for your contribution, @whhe ! and sorry for the late reply. I have left some comments and some more general:
- Rename the module to
oceanbase. Is it ok for you?- Package should be
org.testcontainers.oceanbase- Run
./gradlew spotlessApply
Thanks for your review and sorry for the late reply, I just came back from the Chinese new year holiday.
I will address the comments soon, but for the module name, I used 'oceanbase-ce' because the community will most likely release a 'oceanbase-xe' docker image in the future for the OceanBase Enterprise Edition. So I think we'd better keep it here.
I think in that case the module can still be oceanbase and contain two implementations OceanbaseCEContainer and OceanbaseXEContainer, it depends in how much difference there is between both of them.
@eddumelendez PR updated, PTAL.
@eddumelendez Look forward to your feedback.
One last change, can we add an entry for oceanbase here, please?
Thanks for your contribution, @whhe !