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

Fix travis build instability with MySQL and IBM DB2 #3650

Closed
wants to merge 1 commit into from

Conversation

mmucklo
Copy link
Contributor

@mmucklo mmucklo commented Aug 10, 2019

Q A
Type improvement
BC Break no

Summary

Fixes the build instability seen with MySQL and IBM.

@mmucklo
Copy link
Contributor Author

mmucklo commented Aug 10, 2019

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.

@mmucklo mmucklo force-pushed the fix-build branch 7 times, most recently from bb59695 to 0872e40 Compare August 12, 2019 03:53
@mmucklo
Copy link
Contributor Author

mmucklo commented Aug 13, 2019

@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.

@morozov
Copy link
Member

morozov commented Aug 14, 2019

Which specific failure(s) does this patch fix?

@mmucklo
Copy link
Contributor Author

mmucklo commented Aug 14, 2019

@morozov

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.

  1. MySQL -
    (consistently flaky)

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.

  1. IBM DB2 -
    (broken some time last few weeks or so)

apt update command failing, causing the build to consistently crash:
https://travis-ci.community/t/then-sudo-apt-get-update-failed-public-key-is-not-available-no-pubkey-6b05f25d762e3157-in-ubuntu-xenial/1728

  1. appveyor -
    (broke some time last week or so)

PHP 7.2 no longer available on chocolatey (which is what appveyor builds use to install php).
https://chocolatey.org/packages?q=php&sortOrder=package-title&page=2&prerelease=False&moderatorQueue=False

All appveyor builds were crashing as a result.

  1. scrutinizer - ocular version
    (scrutinizer test coverage uploads were not working a few days ago)

Updated to the latest scrutinizer ocular. Not a fix per se, but scrutinizer was bombing on test coverage import - see:

scrutinizer-ci/ocular#40 (comment)

@mmucklo mmucklo mentioned this pull request Aug 17, 2019
@mmucklo
Copy link
Contributor Author

mmucklo commented Aug 17, 2019

Closing this in favor of the 3 separated-out PRs:

#3653
#3654
#3656

@mmucklo mmucklo closed this Aug 17, 2019
@mmucklo
Copy link
Contributor Author

mmucklo commented Aug 17, 2019

@morozov Please see the 3 new PRs opened which address the issues separately:

#3653
#3654
#3656

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants