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 MySQL and MSSQL test failures #16011

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup-mssql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ runs:
-p 1433:1433 \
--name sql1 \
-h sql1 \
-d mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04
-d mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
14 changes: 5 additions & 9 deletions .github/actions/setup-x64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ runs:
run: |
set -x

sudo service mysql start
sudo service slapd start
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
# Ensure local_infile tests can run.
mysql -uroot -proot -e "SET GLOBAL local_infile = true"
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "create login odbc_test with password='password', check_policy=off; create user odbc_test for login odbc_test; grant alter, control, delete to odbc_test;"
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "ALTER SERVER ROLE sysadmin ADD MEMBER odbc_test;"
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE odbc;"
docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE pdo_odbc;"
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;"
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "create login odbc_test with password='password', check_policy=off; create user odbc_test for login odbc_test; grant alter, control, delete to odbc_test;"
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "ALTER SERVER ROLE sysadmin ADD MEMBER odbc_test;"
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE odbc;"
docker exec sql1 /opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U SA -C -P "<YourStrong@Passw0rd>" -Q "CREATE DATABASE pdo_odbc;"
sudo locale-gen de_DE

./.github/scripts/setup-slapd.sh
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ jobs:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
services:
mysql:
image: mysql:8.3
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
Copy link
Member

Choose a reason for hiding this comment

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

This is problematic, because it will add the service to older branches in nightly, at which point the sudo service mysql start again needs to be removed. So maybe this needs to target 8.2 after all. Or we can skip the service somehow on older branches, but I don't think that's possible, I don't see such an option in the documentation.

Copy link
Member

Choose a reason for hiding this comment

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

Argh, just committed to PHP-8.3 and master (I want todays tags to run on all CI). What to do now?

Copy link
Member

Choose a reason for hiding this comment

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

@cmb69 No worries. It was broken anyway. I think it would be easiest if we backport this and consistently use containers.

Copy link
Member

Choose a reason for hiding this comment

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

@cmb69 Are you still on Slack? If so, maybe it would be easier to discuss it there. 🙂 If not, I can organize a new invite for you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iluuu1994 @cmb69
It seems that I confused you because I didn't understand how backporting and Nightly Test work. Thank you very much for all your consideration and support.

Is it okay for me to ask everyone to backport? Please let me know if there's anything I can do for you.

postgres:
image: postgres
env:
Expand Down Expand Up @@ -286,6 +293,13 @@ jobs:
COVERAGE_DEBUG_NTS:
if: github.repository_owner == 'php' || github.event_name == 'workflow_dispatch'
services:
mysql:
image: mysql:8.3
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
postgres:
image: postgres
env:
Expand Down Expand Up @@ -501,6 +515,13 @@ jobs:
needs: GENERATE_MATRIX
if: ${{ needs.GENERATE_MATRIX.outputs.branches != '[]' }}
services:
mysql:
image: mysql:8.3
ports:
- 3306:3306
env:
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: root
postgres:
image: postgres
env:
Expand Down
Loading