Improved Oracle DB module
Hi,
I took the liberty to improve the Oracle DB module for Testcontainers Python. The PR has several enhancements:
- Leveraging
oracledbthin Python driver- This makes Oracle DB tests on CI/CD now possible too
- Usage of
gvenzl/oracle-freeimage with the latest and greatest Oracle DB version - DB version independent readiness check
- Support for various
gvenzl/oracle-freeimage features (ORACLE_DATABASE,APP_USER,APP_USER_PASSWORD, etc) - Tests for Oracle DB for the various combinations
Ideally, some more documentation on how the Container is supposed to be used would be handy but I couldn't really find a good example of how such a ReadMe should be structured. Any things are gladly appreciated!
Looking at the failed job, I'm fairly certain that this was a strange, potentially race condition on that individual execution of the test. All other Oracle DB tests with different Python versions pass, and so did they over at https://github.com/gvenzl/testcontainers-python/actions/runs/5236983249
I have seen situations where Docker Hub refuses to have images pulled if the pull frequency is too high. While I can only guess that something like that may have happened here, it would be great if an administrator could rerun that failed job.
My guess is that it will execute just fine and if not, it will be a clear indicator that there is something off with that particular test that needs fixing.
Yes, looks like it. I've restarted the run. Would it be possible to improve timeout handling so the tests fail earlier? The current setup ran for a few hours before bailing: https://github.com/testcontainers/testcontainers-python/actions/runs/5237034596/jobs/9470709201?pr=363#step:7:291
Hey @tillahoffmann,
Thanks a lot, it did go through this time!
Happy to increase the timeout if you could point me in the right direction. I didn't deviate from the default 120s and according to the output, that was supposedly used:
FAILED oracle/tests/test_oracle.py::test_docker_run_oracle_with_system_password - TimeoutError: Wait time (120s) exceeded for _connect(args: (), kwargs: {}). Exception: Wait time (120s) exceeded for get_exposed_port(args: (1521,), kwargs: {}). Exception: Port mapping for container 11fd19cb8765cff8effcb3dac33c31bad52c2e5abe7cb5be8c7a5db6c18e73cf and port 1521 is not available
I suspect something went wrong under the covers with spinning up the container altogether, given the Exception: Port mapping for container. I'm not sure what else I'm supposed to do here as I think setting a different timeout won't solve this particular issue (given that it says it used the default 120s), or did I get something wrong here?
Hey @tillahoffmann, just wanted to check in on that one and see how you want to proceed.
Thx,
Hey @tillahoffmann,
I've cleared the merge conflict and pumped up the oracledb driver version.
Could you please approve the workflows?
following! Is there any update on this? thanks!
did some exploratory work here - https://github.com/testcontainers/testcontainers-python/compare/main...alexanderankin:testcontainers-python:gvenzl_main
the original pull request which was opened last june had a hidden feature, which was a merged PR, which was also separately merged into testcontainers-python. additionally, there are several commits dealing only with setup.py and other removed files, which made for an interesting rebase. lastly, i removed the option to start it with a random password as that is unusable (youd have to open the logs and get the password out of there. at any rate, the oracle module is up to date again!
the original commits are here for reference - https://github.com/testcontainers/testcontainers-python/commits/gvenzl/oracle-free
Thanks a lot for merging this, @alexanderankin!
@gvenzl thank you for your contribution!