Supported database versions and integration testing #141
-
SUMMARYI'm creating this issue hoping to start a discussion about which database server/versions that this collection supports and how that affects integration testing. Based on the code, it seems that the intent is to support MySQL <5.7, MySQL 5.7, MySQL 8.0, and MariaDB. The integration tests only execute on MySQL 5.7 and 8.0, however, which limits the guarantees of compatibility for all other servers and versions. I had some follow-up questions that the maintainers may or may not find are worth discussing:
ISSUE TYPE
COMPONENT NAMEN/A ADDITIONAL INFORMATIONIt is worth mentioning that it looks like end of support for MySQL 5.6 appears to be quickly approaching, so I can see that it might not be worth including that version in integration tests now. This isn't the case for MariaDB, however. Some examples where coverage is being missed:
|
Beta Was this translation helpful? Give feedback.
Replies: 16 comments 17 replies
-
@steveteahan I very much she with you, and it's true that we're not testing against MariaDB and we should. If someone could put the work into setting up such a container (I believe there work would go into the setup.yml file of the integration tests) we could start testing against MariaDB. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the information, @Jorge-Rodriguez. I don't have a vested interest in MariaDB support, but some of the changes that I'm making inevitably hit a MariaDB conditional which then affects the coverage of the patch. I do have an interest in making sure that my changes don't break any MariaDB users if the intent is to continue to support that database. Any thoughts on publishing a list of supported database versions? MySQL >= 5.7 would seem to make sense given that 5.6 is end-of-life next month. It looks like MariaDB >= 10.2 are the versions of that server that aren't out of support. I can spend a few hours seeing if I can get MariaDB integration tests working. I do see a variable related to testing MariaDB that at least is properly installing it from what I can see. The tests fail pretty early in the process, however. |
Beta Was this translation helpful? Give feedback.
-
Enabling integration tests for MariaDB looks like it will be a bit more of a time investment than I can make at the moment. There were some initial hurdles to being able to enable the tests:
I'm making those fixes available here in case it'll save anyone else time who is able to run with this: steveteahan@0af1d2b. There are a couple of changes in there that are not intended to actually be carried over to the main branch, but are there for demonstration purposes. After fixing those I also hit these issues:
My guess is that these aren't the only issues. That is simply as far as I was able to get on the The growing differences between MySQL and MariaDB look like it should make things interesting moving forward. I see that there is also now a MariaDB connector. I'd imagine that to provide good MariaDB support going forward the project would need:
I think it does lead to the question of at what point does it make sense for MariaDB to be its own Ansible collection? There are certainly some downsides to this such as potentially fragmenting the community and not benefiting from where they are still similar. The benefits of splitting them apart might include less churn trying to support both server flavors. I could see some future contributors avoiding making a change that is more complicated that it needs to be for this reason. I'm not an expert on the differences between MySQL and MariaDB, so I'll defer to others for additional feedback on this. I figure that it is worth discussing in any case. From what I've seen there are at least a couple of bugs that exist today due to the lack of MariaDB integration tests. |
Beta Was this translation helpful? Give feedback.
-
For completeness, I quickly checked to see if enabling integration tests for MySQL 5.6 would be trivial. I quickly hit a number of issues just in the
Given this initial list, and the assumption that there are likely to be many other issues, I'm thinking that it doesn't make sense to put any effort towards enabling integration tests for 5.6. The end of support for that version is two weeks away. Perhaps it would make the most sense to drop support for 5.6 at that point? |
Beta Was this translation helpful? Give feedback.
-
@Jorge-Rodriguez @bmalynovytch what do you think about dropping support for 5.6? |
Beta Was this translation helpful? Give feedback.
-
Hello there ! Thank you for your time dudes. While I think we should restrict supported environments to limit complexity of code and tests, we can't, suddenly, drop features IMOH. IMOH, the best would be to rework the entire set of modules to better handle all "supported versions", splitting the code and the tests depending on the target db server. When we started to split cases, a couple of years ago, there were only a few differences to handle. Nowadays, there seem to be around 50% of the whole codebase that would need to be adapted to the whole set of supported versions. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the additional background information, @bmalynovytch. I didn't know that Percona was extending the support for 5.6. I wasn't necessarily suggesting just dropping support 5.6 immediately (although it may have sounded that way), but there would need to be some documented procedure for doing so? I could see that documented procedure covering the fact that Percona provides extended support beyond standard MySQL and should continue to be supported.
I guess that brings up my other question which was at what point does it make sense to have |
Beta Was this translation helpful? Give feedback.
-
Not a problem, we absolutely need to stop doing just like if everything was fine, it's not the case.
I'm not sure splitting the modules would be the best, because MySQL and MariaDB still share a lot of common bits and have a general interoperability. I guess users would expect that That's my own opinion, not what I expect our working group to do without prior discussion. |
Beta Was this translation helpful? Give feedback.
-
@bmalynovytch @Andersson007 do you think it would make sense to make the split suggested by @steveteahan transparent within the collection? We could refactor to have two separate codebases and determine early in the module execution what server we're targeting, thus selecting an early execution branch for MySQL or MariaDB. |
Beta Was this translation helpful? Give feedback.
-
It’s probably a good idea. The main inconvenient I see is the risk of code duplication within the different parts servings equivalent functions. |
Beta Was this translation helpful? Give feedback.
-
I suppose the risk is inherent when dealing with this kind of pattern. We could deal with that in CI by running a code examination tool that would detect such duplication and alert accordingly. In the end there would be three different parts, MySQL, MariaDB and commons shared by both to reduce duplication. |
Beta Was this translation helpful? Give feedback.
-
Since we've merged the code to handle divergences between MySQL and MariaDB, I'm moving this into a discussion. Hopefully we can now continue the discussion. Ping @steveteahan |
Beta Was this translation helpful? Give feedback.
-
Ok, I think we're in a position to open this Pandora's box. What we could do is enable the versions we want to test against and see where it fails. Then we can see if there's any low hanging fruit and open issues for the not so trivial problems. So I guess the big question now is what is the comprehensive list of versions we want to test against. |
Beta Was this translation helpful? Give feedback.
-
Ok, so according to CI, we're currently supporting:
I would add, for now:
We can progressively extend this as needed. |
Beta Was this translation helpful? Give feedback.
-
While we're at this, we should probably review and document the supported versions of the connectors too |
Beta Was this translation helpful? Give feedback.
-
Mentioning #178 here so we don't lose track of the intention of replacing MySQL-Python with mysqlclient |
Beta Was this translation helpful? Give feedback.
Ok, so according to CI, we're currently supporting:
I would add, for now:
We can progressively extend this as needed.