-
Notifications
You must be signed in to change notification settings - Fork 266
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
add support for database versions #225
Conversation
I have included this in #229, it goes one step further by eliminating the PHP specific db overrides used for mssql with PHP 5.6 which can be there solved with moodle-docker.yml overrides. |
Hi, nice one! Only a couple of comments?
About point 2 I was thinking something like (for example, for MySQL, same for all DBs):
Disclaimer, not tested, may be it doesn't work. All I've been able to find is this, telling that it should work: https://github.com/compose-spec/compose-spec/blob/master/spec.md#interpolation But it's not in the docker docs: That way each DB would have its default in their corresponding .yml file and done. Alternative to that is to have another, new, Or maybe via .env file, don't know. Just aiming to have the defaults defined once. What do you think? Ciao :-) Note: if point 2 becomes too complex... I'm happy merging this as is. We can always investigate later and have the defaults defined twice in the mean time. Just was guessing if, maybe, it was not hard to achieve it now. |
I have updated the patch, in it I have removed the DB tweaks with PHP versions, I do not think anybody needs mssql driver from PHP 5.6 these days. I have also split the db.pgsql.yml from base.yml - it was useful when I rewrote the waiting for database instance in my other patch. |
Will look to this soon, but +1 to that idea, I've thought about it N times, basically every time I review anything, better having it separated, yep. |
Much better, yay!
Ciao :-) |
MySQL 8.0 is not compatible with your 5.7 stuff, they deprecated and removed some features and it fails now. I was playing a bit with docker version and I ended up using "2.4" because "2" was complaining about "platform", my understanding is that Docker Compose V2 pretty much ignores the version... As far as mssql and oracle go I am not keen to work with those because Roseta emulation on M2 does not work properly with these docker instances - they crap out immediately. You can see the results of my experiments in olms branch at https://github.com/skodak/moodle-docker/ - I suppose you might be interested in my new code that waits for databases inside the containers https://github.com/skodak/moodle-docker/blob/olms/assets/db/pgsql_wait.sh. |
Hi, using my previous numbers...
And, I'm happy considering any PR, of course. How not! Ciao :-) |
BTW, just came to my brain looking to recent changes to other CI tools... I think that |
I just initialised phpunit with mysql 8.0 image, so the password thing cannot be a problem I'll have a look at the oracle and mssql now |
Hello Everyone,
Ref.: https://www.php.net/manual/en/mysqli.requirements.php HTH, |
I've added the mysql_native_password just to be sure, it seems to be working the same for me |
Yeah, nice you found that page, telling which php versions do support For some reason I thought that only PHP 7.4 supported it, but it's clear that, starting with 7.1.x, all our images support it. That means Moodle 3.2 and up. So I agree that we don't need it anymore, all our PHP versions support the new auth plugin. Sorry for the ping-pong, @skodak ! |
should I revert it then? @stronk7 ? |
Ok, and, hopefully latest round...
With that... and GHA passing plus some quick windows testing locally... I'm happy to merge this, it's really a nice addition, much requested / needed, yay! Ciao :-) |
Ah, sorry, didn't see this. Yeah, I think we don't need to force the old auth, coz all our PHP images support the new). Ciao :-) |
I was wondering was wondering if it could be merged, but then I decide I do not want to be wasting time testing all combinations, up to you then... also you should be switching to a new collation utf8mb4_0900_as_cs to make it behat more like PostgreSQL |
Yeah, I'm using here Ok, let's keep the 2 files separated, we can cleanup those 5.7 settings later, not in a hurry. Going to perform some local tests (mainly Windows) and, with GHA passing, this is ready, thanks! |
Grrr, I'm getting (again) some syntax errors with Windows... trying to trace them down... BTW have noticed that, in the .cmd the PHP override has not been deleted. Ciao :-) |
Uhm.. it's something from yesterday's |
Wow, just changing this, that was introduced by #226 , from:
I get the script working. Certainly I cannot understand it, specifically because I tested it and also, because we have other Anyway, I'm not going to spend more time, preparing an extra commit with the needed changes. Will share once I have it running ok locally. |
1. Remove the php overrides facility. 2. Enclose all EXIST calls with double quotes, only that way they work consistently. 3. Remove an old debugging that was there since years ago. 4. Avoid a warning about selenium suffix not set.
I've taken the liberty of adding one extra commit to you branch, @skodak , with various CMD fixes: @scara , some of them are related with pieces of work / fixes that you were involved with, if you can take a look to them, great! With that commit applied here, I've tested both the DB port (#226) and the DB version (this) and everything is, apparently, working ok:
|
thanks @stronk7 , your patch looks good |
Hi @stronk7, HTH, |
pong? |
I am no yaml expert, it works for me, if anybody wants to improve it then please submit patches |
Do I assume that means that you aren't going to remove the four (x2) quotes from the mariadb, mysql, mysql8 and postgres ymls? No problem with that, I'm more that happy adding a extra commit applying the changes and explaining your rationale, so you introduced them, but don't remove them, because you aren't a yaml expert. Seriously? Using your own words... grrr! 😆 Ciao :-) |
I do not really get what is the problem, before my patch there already was a mix of quoted and unquoted image values. I introduced them by accident when I was copy/pasting during refactoring of my other branch. |
Thanks @skodak, will process this soon! |
Hi @stronk7 ,
I have decided to use docker for all my development and testing work on my M2 mb air, I did a few tweaks to add support for all MySQL, MariaDB and PostgreSQL database versions. I was wondering if you guys were interested in merging it.
Please note I did not test this on Windows because I do not have any computer capable of running it, sorry.
Ciao,
Petr