-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix travis build instability with MySQL and IBM DB2 #3650
Conversation
This adds two new exception subclasses to properly propagate and distinguish connection exceptions versus regular or driver exceptions. This is necessary as the MySQL error 2006 (MySQL server has gone away) could happen after a successful connection, and probably should be distinguished from a pure connection error that happens during an attempt to connect. |
bb59695
to
0872e40
Compare
@morozov - This is ready for review. There's still some occasionally build failings due to VM / Network stability issues, which is hard for me to fix, but barring that, this should fix the general flakiness of the MySQL builds (due to unhandled error conditions), and updates appveyor to the only php version that's presently available on chocolate (which started failing over the weekend). The IBM issue started happening last week or so, and the appveyor builds started failing over the weekend. The ocular update is not strictly necessary, but was just one of my steps along the way in troubleshooting. Mainly the two MySQL error conditions that weren't being caught are now caught. The mysql driver would seem to rotate through these errors and pick one to fail on fairly regularly. The connection going away error (2006) can happen normally, so I extended the classes to try and distinguish it happening during the time of connection so that the DBAL ConnectionException is known to be thrown. |
Which specific failure(s) does this patch fix? |
TLDR; Please skip to the itemized list below. Without these fixes, the build in the master branch will not work as far as my experience is concerned (notice the number of failed builds in the current list of PRs). For PR #3645 I spent way too long just trying to get a full build to run and all tests to pass. A portion of it was chasing down these issues with the build. Incidentally I've spent a lot of time on this and the other PR (probably hours upon hours over many days). I'm not saying that you should accept things carte blanche, by no means, but hopefully I can work with you with whatever concerns you have as it would be such that the effort doesn't go to waste.
Fixes ~25% chance of falling back to DriverException instead of ConnectionException leading to failed builds as the DBAL ConnectionException test fails (as it sees DriverException instead of CnonectionException). Apparently trying to connect to a non-existent host can cause the mysqli / PDO MySQL drivers to crash in different ways, probably due to timings of the network stack during the run, but possibly just by some other race condition.
apt update command failing, causing the build to consistently crash:
PHP 7.2 no longer available on chocolatey (which is what appveyor builds use to install php). All appveyor builds were crashing as a result.
Updated to the latest scrutinizer ocular. Not a fix per se, but scrutinizer was bombing on test coverage import - see: |
Summary
Fixes the build instability seen with MySQL and IBM.