-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Require MySQL 8.0, PostgreSQL 12, MSSQL 2012 #27337
Conversation
- MySQL 5.7 support and testing is dropped - MySQL tests now only test against 8.1, previously it was 5.7 and 8.0 Fixes: go-gitea#25657
Before merging this, we need to adjust the required checks config on github ui to update from |
I mean, we could also be so nice and block this PR until the mentioned versions are actually EOL. |
I don't think that people who use MySQL 5.7 also use Gitea nightly in production 😆 |
By the time the 1.22 branch releases they will be EOL. I imagine anyone running unstable builds will likely not run unsupported databases :) |
@silverwind ✨ same though at the same moment ✨ |
Good point. |
Thanks for keeping this current 😀 Could you add a note that should someone need support for an outdated database that they can contact us for an "extended support contract" (or some other name?). As then we can then test for those older databases and add fixes into this codebase too. I know there are some people who are using the outdated mssql version that are paying MS for them to backport fixes, so they may need to have that support in Gitea too. |
Feel free to edit the OP to your liking :) |
@@ -86,7 +86,7 @@ jobs: | |||
runs-on: ubuntu-latest | |||
services: | |||
mysql: | |||
image: mysql:5.7 | |||
image: mysql:8.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should test with MySQL 8.0 but not 8.1
The same to pgsql/mssql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not test with latest? New deployments are likely to use latest. I see no point testing non-latest if we only test one version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one step I guess we could move to 8.0 because 8.1 is tested below separately, but I don't see much of a point either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you used a MySQL 8.1 only syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By your notion, we would have to test every single supported db version, which given our CI resources is likely not feasible. Also, MariaDB is completely untested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, MariaDB should have a separate test.
For others, databases have pretty good backward compatibility. If MySQL 8.0 passes, then MySQL 8.1 are almost sure to pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should stick to MySQL LTS versions? According to this 8.0, 8.4, 9.7 will be LTS:
No, at the moment, only the minimal supported version is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand the reasons. We can:
- Test latest, be most likely correct for new deployment, but old ones may break with incompatibly SQL syntax etc.
- Test oldest, be correct for ancient deployments, but unknown for new ones.
- Test something in between, but by what rules?
I think it's easier to maintain if we just test latest, so that the maintainer updating this doesn't have to thing about obscure rules about which version to test.
Ideally we'd have a matrix build to easily add/remove versions. Currently it's a pain because of all the Makefile changes and such. If we had a matrix, I guess testing oldest and newest of each version would be ideal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Test latest, be most likely correct for new deployment, but old ones may break with incompatibly SQL syntax etc.
No, it would break the old database easily.
- Test oldest, be correct for ancient deployments, but unknown for new ones.
This is the right approach. It won't be "unknown": see my comment: databases have pretty good backward compatibility. If MySQL 8.0 passes, then MySQL 8.1 are almost sure to pass.
- Test something in between, but by what rules?
No, it's not worth to be considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR doesn't change the behaviour of what we are doing with tests (w/ psql we're using latest, and w/ mqsl we were using 8.x).
I agree we should test both min/max db versions, but that can be done in a different PR.
Yes, if we say it required mysql 8.0, we should test the minial version 8.0 but not 8.1 like we did with Golang. |
Testing the minimal version is good enough and the right approach, like before. But I guess nobody would really follow it if this gets merged, until some bugs like #22809 occurs (pgsql 10 works but pgsql 9 doesn't -- newer version works, older version fails) This is my last comment for this problem, because I have explained enough and I do not want to bother people. |
ref: #27429 |
Fixes: #25657
Ref: https://endoflife.date/mysql
Ref: https://endoflife.date/postgresql
Ref: https://endoflife.date/mssqlserver
Support for MySQL 5.7, PostgreSQL 10 and 11, and MSSQL 2008 is dropped. You are encouraged to upgrade to supported versions.