-
Notifications
You must be signed in to change notification settings - Fork 88
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
Embed pymysql
connector within the collection
#643
Embed pymysql
connector within the collection
#643
Conversation
This change eliminates the need to install the connector on each controlled node, as `pymysql` version 1.1.1 is now included. As a result, we can safely assume its availability, thus simplifying the testing process. Also, I managed to remove the need for pre-built test containers. We now use the default test containers from ansible-test.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 75.26% 66.23% -9.04%
==========================================
Files 18 31 +13
Lines 2515 4902 +2387
Branches 642 923 +281
==========================================
+ Hits 1893 3247 +1354
- Misses 425 1345 +920
- Partials 197 310 +113
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pymysql
connector within the collection
@betanummeric, @rsicart, @Andersson007 and any other contributor. I would love your input on the idea of embedding the pymysql connector into the collection. |
Please don't make pymysql part of this repository. It should be installed separately, we don't need to become pymysql maintainers. Also including pymysql would slow down module execution a bit because pymysql needs to be copied from the ansible controller to the target node. So far, pymysql is pre-installed on the target node and doesn't need to travel through the ansible ssh connection. What if someone wants to use mysql_client? Why is pymysql better? "Expand test matrix: Add tests against Python 3.11 and 3.12." <- please open separate PRs for independent changes |
This PR as been rejected by almost all maintainers. The main reasons are security concerns (must release c.mysql everytime PyMySQL receive a security patch) and speed (Ansible must send the whole PyMySQL code through SSH each time a module is used in a Playbook). I extracted the part were I removed the custom test containers and open PR #650. Also, there is a vote to deprecate mysqlclient and support only PyMySQL in #645. For the above reasons, I close this PR. Thank you all for your feedback. |
It was a good and productive discussion here and on Matrix, thanks everyone! |
SUMMARY
This PR introduces significant changes to the MySQL connector integration. It's aimed at streamlining dependencies and ensuring consistent behavior by removing mysql_client support.
pymysql has a MIT license, who is compatible with the GPL-v3.
I believe this change will help us create better modules with better documented returned values and offer a simpler experience for our users. A significant portion of exceptions from our modules documentation could be removed.
Changes
Impact on Users
If you are a user of mysql_client, please note that this change forces the usage of pymysql exclusively. Be aware that:
Pro
Cons
Thanks to @betanummeric, @Andersson007 and @markuman we also have a list of downside to look out for:
Request for Feedback
Given the scope of these changes, your feedback is crucial. Especially if you utilize mysql_client.