Skip to content
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

Travis CI tests on MySQL 8.0 #3372

Merged
merged 1 commit into from
Dec 3, 2018
Merged

Conversation

BenMorel
Copy link
Contributor

@BenMorel BenMorel commented Dec 1, 2018

Q A
Type improvement
BC Break no
Fixed issues N/A

Summary

MySQL 8.0 has been out for some time, yet Doctrine DBAL is not tested against this version right now.

Following the rules edicted in #3347 and #3365, PHP 7.1, 7.3① and nightly are now only tested against the latest version, MySQL 8.0.

Edit: MySQL 8.0 requires Xenial, and Travis CI does not support PHP 7.3 on Xenial yet. PHP 7.3 tests are therefore kept on MySQL 5.7 for the time being.

@morozov
Copy link
Member

morozov commented Dec 1, 2018

Referencing #3183.

@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 1, 2018

Crap, sorry for the dup, once again.

@BenMorel BenMorel force-pushed the travis_mysql8 branch 9 times, most recently from 9e270ab to 58d2653 Compare December 1, 2018 23:50
@Ocramius
Copy link
Member

Ocramius commented Dec 1, 2018

Seems to fail to upgrade MySQL. What are your thoughts about running a tagged docker container instead?

@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 1, 2018

I'm debugging it right now, it should work soon.

@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 2, 2018

It runs MySQL 8.0 alright, there's just a ConnectionException not thrown because of a MySQL error 2054 (CR_NOT_IMPLEMENTED), which is due to this error:

The server requested authentication method unknown to the client

If I add code 2054 to AbstractMySQLDriver::convertException(), it works, but because this looks like a generic error code for any non-implemented feature, I don't think it's a good idea.

Instead I'm adding default-authentication-plugin=mysql_native_password to my.cnf to fix this error.

@BenMorel BenMorel force-pushed the travis_mysql8 branch 6 times, most recently from 7b81f2e to e9664f6 Compare December 2, 2018 01:11
@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 2, 2018

All good now 👍

MysqlPlatform::getListTableIndexesSQL() and getListTableColumnsSQL() are fixed for MySQL 8.0.

@Ocramius
Copy link
Member

Ocramius commented Dec 2, 2018

Give it a squash, please

@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 2, 2018

Squashed!

Ocramius
Ocramius previously approved these changes Dec 2, 2018
Copy link
Member

@morozov morozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BenMorel please make sure Scrutinizer code coverage configuration reflects the changes.

echo "Installing MySQL 8.0..."

echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Docker container instead of arbitrary 3rd-party debfile. As done in #3183.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with Docker, however for the record this isn't an arbitrary debfile, this is MySQL's official APT repository.

Copy link
Contributor

@Majkl578 Majkl578 Dec 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the nature of APT repositories, it's not a good idea to depend on a debfile as debfiles may randomly disappear when they get superseded by newer version.
Also Docker is easier to setup, configure environment, maintain and in the end is more reliable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that MySQL 5.7 is already installed using MySQL's APT repo. If you move to Docker, then this one should be updated as well for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@Majkl578
Copy link
Contributor

Majkl578 commented Dec 2, 2018

How is this PR better than #3183? Why not finish that one instead of duplicating changes here?

+ fixes issues in MysqlPlatform::getListTableIndexesSQL() and getListTableColumnsSQL() on MySQL 8.0
@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 2, 2018

@morozov Updated Scrutinizer config and rebased on latest master.

@Majkl578 Sorry, I didn't mean to interfer with your PR, I didn't find it when I opened this one. I did check it afterwards, and saw that it was left in a failing state with debug information. Because I don't have write access, I can't commit to your PR, so I chose to finish mine.

Feel free to merge either PR, I really don't mind!

@morozov
Copy link
Member

morozov commented Dec 2, 2018

@Majkl578 I think it will be fair to merge this pull request. It gets the job done, and we didn't have any problems with deb-packaged MySQL in the past. We can replace deb packages with Docker images later if needed.

MySQL 8.0 requires Xenial, and Travis CI does not support PHP 7.3 on Xenial yet. PHP 7.3 tests are therefore kept on MySQL 5.7 for the time being.

UPD: if it will work with a Docker image, we should reimplement it. I doubt Travis will ever support PHP 7.3 on Xenial, so if we don't take care of it now, we'll have to rework it later.

@morozov
Copy link
Member

morozov commented Dec 2, 2018

I'm not familiar with Docker […]

@BenMorel you can try using the bits from #3183. Let us know if you need help. Maybe @Majkl578 or I could help you finish it.

Alternatively, if we rebase #3183 and tests no longer fail there, we can merge it instead. @Majkl578 let me know if you need help rebasing it.

No pressure, but this is the last open ticket for 2.9.0 😄

@BenMorel
Copy link
Contributor Author

BenMorel commented Dec 2, 2018

I won't be able to help with Docker, as I don't have any incentive right now to learn it.

I suggest that you either:

  • merge this PR, that at least fixes the issues revealed on MySQL 8.0; maybe @Majkl578 can open another PR to convert it to Docker and make it work with PHP 7.3?
  • finish @Majkl578's PR, and integrate my fix for getListTableIndexesSQL()

If you're in a hurry for 2.9.0, then maybe the first option could be a good compromise?

@morozov
Copy link
Member

morozov commented Dec 2, 2018

If you're in a hurry for 2.9.0, then maybe the first option could be a good compromise?

Right now it's not that much of a blocker, so I'd like to get input from @Majkl578 first. Both options look legit to me.

@Ocramius
Copy link
Member

Ocramius commented Dec 3, 2018

I'd say let's merge here and then we rebase the other patch, mostly due to this being ready to be shipped.

@morozov morozov merged commit 8c0bf79 into doctrine:master Dec 3, 2018
@morozov
Copy link
Member

morozov commented Dec 3, 2018

Thank you @BenMorel. Time to put together some release notes.

@Majkl578
Copy link
Contributor

Majkl578 commented Dec 3, 2018

mostly due to this being ready to be shipped

I disagree, Xenial is not acceptable - it's unstable, undocumented and doesn't support PHP 7.3.

@Ocramius
Copy link
Member

Ocramius commented Dec 3, 2018

@Majkl578 let's fix it up, then - for now we reached the goal of getting 8.0 tested

@morozov morozov self-assigned this Feb 27, 2019
@morozov morozov added this to the 2.9.0 milestone Nov 2, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants