-
Notifications
You must be signed in to change notification settings - Fork 7.8k
ci: Fixed an issue where GitHub Actions could not connect to PostgreSQL and MySQL. #12475
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
ci: Fixed an issue where GitHub Actions could not connect to PostgreSQL and MySQL. #12475
Conversation
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.
Ah, good eye. This is an oversight. However, it doesn't seem like this PR works. The number of executed tests doesn't change. Looking at the junit.out.xml, the pdo_pgsql tests are still skipped.
PDO::__construct(): Argument #1 ($dsn) must be a valid data source name
Sorry. I had overlooked it. I'll try to fix it! |
9db720e
to
fe114c6
Compare
fe114c6
to
58c09d0
Compare
Thank you for the review. I'm sorry for taking up so much of your time. When I corrected the point raised by @iluuu1994, I realized that there was a completely different cause than I originally thought. As a result of fixing that, many tests other than pdo_pgsql were fixed. The concept of "fixing a test that wasn't working so that it works" remains the same, but the scope and approach of the fix has changed significantly, so we changed the subject of the pull request and added details to the text. |
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'm sorry for taking up so much of your time.
Please don't worry about that. Volunteer work is appreciated!
Huh. Apparently ext/mysqli, ext/pdo_mysql and ext/pdo_pgsql are all not running in GitHub actions and nobody noticed. Your PR does not yet fix the ext/mysqli tests. Do you want to have a look or should I?
I tried to fix it as much as I could, but I couldn't fix everything.
It seems that the error message has changed in some version, but the output seems to vary depending on the OS and execution environment. I don't know how to deal with this...(Since we are not testing the OS, I feel like I should just look at Since it doesn't pass the test, I've marked it as a draft. I'm fine with either reverting the mysqli test and doing it with another pull request, or making some modifications! |
If this commit is OK, I checked the all pass of the test in my repository. |
@KentarouTakeda Seems to have worked with a few tweaks. Thank you! |
Thank you for your very kind review and merge! I hope everyone's development experience with php-src will be improved. Let me help you again! |
Since the pdo-pgsql tests are only run on CircleCI when merged into the master branch, some contributors seem to be working on setting up CircleCI themselves. for example: #12448
As with any other test, it may be more convenient to run it in GitHub Actions.
(Added on 2023/10/20 0:00 JST)
Fix details
All connections to PostgreSQL and MySQL from CI running on GitHub Actions were failing. With this fix, the following tests will now work correctly.
mysqliThere were no problems with SQL Server, Oracle, etc., but only PostgreSQL and MySQL could not be connected. The difference is that they use GitHub Actions Service Containers.
Previous implementation:
If the test itself is running inside Service Containers, it can be connected without any problems by name resolution between containers. But the tests are running outside of Service Containers.
Implementation after fixing:
localhost
,localhost
also for connection from test.