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

Python unit tests failing - latest sql image uses newer version that is not caught in regex #3731

Closed
crispin-ki opened this issue Aug 15, 2023 · 0 comments · Fixed by #3734
Closed

Comments

@crispin-ki
Copy link
Contributor

crispin-ki commented Aug 15, 2023

Expected Behavior

Python unit tests pass (in test_sql_registry.py)

Current Behavior

Tests currently fail (both locally and in cicd such as here), as the mysql:latest image defined here now uses mysql Version 8.1.0, not 8.0.* as expected here

Steps to reproduce

Run one of the failing tests, such as pytest sdk/python/tests/unit/test_sql_registry.py::test_registry_cache[mysql_registry] -vvs locally

Possible Solution

A solution is to simply change this line from log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '8.0.*' socket: '/var/run/mysqld/mysqld.sock' port: 3306" to log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '(\d+(\.\d+){1,2})' socket: '/var/run/mysqld/mysqld.sock' port: 3306". I have tested this change locally, and tests then pass.

Changing the version to regex is more flexible, as if we change it just to '8.1.*' then we will run into this issues again. The regex will match any number of digits with either 1 or two dots separating them. This is what we want for version numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant