Fixing issue #6019: unable to use mysql SSL parameters when getting mysql engine#6020
Conversation
auvipy
left a comment
There was a problem hiding this comment.
please add test to show this won't regress! and thanks for tackling it!
|
@auvipy no problem! I'll work on the tests :) |
Codecov Report
@@ Coverage Diff @@
## master #6020 +/- ##
==========================================
+ Coverage 83.42% 83.42% +<.01%
==========================================
Files 145 145
Lines 17185 17186 +1
Branches 2117 2118 +1
==========================================
+ Hits 14337 14338 +1
Misses 2628 2628
Partials 220 220
Continue to review full report at Codecov.
|
|
@auvipy I am having a little trouble setting up my env, docker-compose is failing. Im working on it currently, but are these continuous integration tests expected to fail? |
|
yes |
auvipy
left a comment
There was a problem hiding this comment.
what is those two new files with no changes?
…are passed in for create_engine()
|
@auvipy that is weird! sorry, must have been from me trying to set up the env, and I overlooked it. I fixed it. |
Note: Before submitting this pull request, please review our contributing
guidelines.
Description
(Fixes #6019)
**kwargs for the mysql creat_engine() function were removed in the case that self.forked is False (94dae1b) due to issue #1903. However, this causes other database engine options to not be used, such as the SSL certs when the
ResultSessionis made. This fix ignores args in the database engine options that start withpoolwhile still applying the others. A detailed description of this issue can be found at #6019.https://docs.sqlalchemy.org/en/13/core/engines.html#sqlalchemy.create_engine.params.pool
The SQLalchemy documentation shows all of the possible engine args.
Here are the ones containing
pool:pool
poolclass
pool_logging_name
pool_pre_ping
pool_size
pool_recycle
pool_reset_on_return
pool_timeout
pool_use_lifo
echo_pool
In the description of
pool_sizeit says: "to disable pooling, set poolclass to NullPool instead"Therefore, none of these
poolargs will be needed sincepoolclassis set to NullPool.