mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-09-21 22:42:26 -07:00
Remove testing against mysqlclient (#736)
Some checks are pending
Plugins CI / Sanity (Ⓐdevel) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.17) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.18) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.19) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.16, DB: mariadb 10.11.8, connector: pymysql 0.10.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.8) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.9) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.9) (push) Waiting to run
Some checks are pending
Plugins CI / Sanity (Ⓐdevel) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.17) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.18) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.19) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.16, DB: mariadb 10.11.8, connector: pymysql 0.10.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.8) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.9) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.9) (push) Waiting to run
* Remove testing against mysqlclient * Fix * Update TESTING.md
This commit is contained in:
parent
fed5f30203
commit
04b663b3b7
8 changed files with 8 additions and 77 deletions
40
.github/workflows/ansible-test-plugins.yml
vendored
40
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -58,14 +58,10 @@ jobs:
|
|||
- '11.4.5'
|
||||
connector_name:
|
||||
- pymysql
|
||||
- mysqlclient
|
||||
connector_version:
|
||||
- '0.9.3'
|
||||
- '1.0.2'
|
||||
- '1.1.1'
|
||||
- '2.0.1'
|
||||
- '2.0.3'
|
||||
- '2.1.1'
|
||||
|
||||
include:
|
||||
|
||||
|
@ -98,24 +94,6 @@ jobs:
|
|||
- db_engine_name: mariadb
|
||||
db_engine_version: '8.4.1'
|
||||
|
||||
- connector_name: pymysql
|
||||
connector_version: '2.0.1'
|
||||
|
||||
- connector_name: pymysql
|
||||
connector_version: '2.0.3'
|
||||
|
||||
- connector_name: pymysql
|
||||
connector_version: '2.1.1'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '0.9.3'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '1.0.2'
|
||||
|
||||
- connector_name: mysqlclient
|
||||
connector_version: '1.1.1'
|
||||
|
||||
- db_engine_version: '8.0.38'
|
||||
ansible: stable-2.17
|
||||
|
||||
|
@ -128,24 +106,12 @@ jobs:
|
|||
- db_engine_version: '10.11.8'
|
||||
ansible: devel
|
||||
|
||||
- db_engine_version: '8.4.1'
|
||||
connector_version: '0.9.3'
|
||||
|
||||
- db_engine_version: '8.4.1'
|
||||
connector_version: '1.0.2'
|
||||
|
||||
- db_engine_version: '8.4.1'
|
||||
connector_version: '2.0.1'
|
||||
|
||||
- db_engine_version: '8.4.1'
|
||||
connector_version: '2.0.3'
|
||||
|
||||
- db_engine_version: '10.11.8'
|
||||
connector_version: '0.9.3'
|
||||
|
||||
- db_engine_version: '10.11.8'
|
||||
connector_version: '1.0.2'
|
||||
|
||||
- db_engine_version: '10.11.8'
|
||||
connector_version: '2.0.1'
|
||||
|
||||
|
@ -158,12 +124,6 @@ jobs:
|
|||
- db_engine_version: '8.4.1'
|
||||
ansible: stable-2.15
|
||||
|
||||
- connector_version: '1.1.1'
|
||||
db_engine_version: '8.0.38'
|
||||
|
||||
- connector_version: '1.1.1'
|
||||
db_engine_version: '10.11.8'
|
||||
|
||||
services:
|
||||
db_primary:
|
||||
image: docker.io/library/${{ matrix.db_engine_name }}:${{ matrix.db_engine_version }}
|
||||
|
|
|
@ -73,7 +73,6 @@ The Makefile accept the following options
|
|||
- Mandatory: true
|
||||
- Choices:
|
||||
- "pymysql"
|
||||
- "mysqlclient"
|
||||
- Description: The python package of the connector to use. In addition to selecting the test container, this value is also used for tests filtering: `when: connector_name == 'pymysql'`.
|
||||
|
||||
- `connector_version`
|
||||
|
@ -118,7 +117,7 @@ make ansible="stable-2.16" db_engine_name="mysql" db_engine_version="8.0.31" con
|
|||
|
||||
# Keep databases and ansible tests containers alives
|
||||
# A single target and continue on errors
|
||||
make ansible="stable-2.17" db_engine_name="mysql" db_engine_version="8.0.31" connector_name="mysqlclient" connector_version="2.0.3" target="test_mysql_query" keep_containers_alive=1 continue_on_errors=1
|
||||
make ansible="stable-2.17" db_engine_name="mysql" db_engine_version="8.0.31" connector_name="pymysql" connector_version="1.0.2" target="test_mysql_query" keep_containers_alive=1 continue_on_errors=1
|
||||
|
||||
# If your system has an usupported version of Python:
|
||||
make local_python_version="3.10" ansible="stable-2.17" db_engine_name="mariadb" db_engine_version="11.4.5" connector_name="pymysql" connector_version="1.0.2"
|
||||
|
|
2
changelogs/fragments/2-drop_mysql_client.yml
Normal file
2
changelogs/fragments/2-drop_mysql_client.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
breaking_changes:
|
||||
- collection - stop testing against mysqlclient connector as its support was deprecated in this collection - use PyMySQL connector instead! It'll stop working in 5.0.0 when we remove all related code (https://github.com/ansible-collections/community.mysql/issues/654).
|
|
@ -33,14 +33,6 @@
|
|||
when:
|
||||
- connector_name == 'pymysql'
|
||||
|
||||
- name: Assert that mysql_info module used the expected version of mysqlclient
|
||||
assert:
|
||||
that:
|
||||
- primary_info.connector_name == 'MySQLdb'
|
||||
- primary_info.connector_version == connector_version
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
|
||||
- name: Get the python version in use
|
||||
ansible.builtin.shell:
|
||||
cmd: echo $( $(command -v python || command -v python3) -V )
|
||||
|
|
|
@ -404,20 +404,15 @@
|
|||
- connector_version is version('0.10.0', '<')
|
||||
|
||||
# Issue https://github.com/ansible-collections/community.mysql/issues/268
|
||||
- name: Assert that create table IF NOT EXISTS is changed with mysqlclient
|
||||
- name: Assert that create table IF NOT EXISTS is changed
|
||||
assert:
|
||||
that:
|
||||
# Mysqlclient 2.0.1 and pymysql 0.10.0+ drivers throws no warning,
|
||||
# pymysql 0.10.0+ drivers throw no warning,
|
||||
# so it's impossible to figure out if the state was changed or not.
|
||||
# We assume that it was for DDL queries by default in the code
|
||||
- result is changed
|
||||
when:
|
||||
- >
|
||||
connector_name == 'mysqlclient'
|
||||
or (
|
||||
connector_name == 'pymysql'
|
||||
and connector_version is version('0.10.0', '>')
|
||||
)
|
||||
- connector_name == 'pymysql' and connector_version is version('0.10.0', '>')
|
||||
|
||||
- name: Drop db {{ test_db }}
|
||||
mysql_query:
|
||||
|
|
|
@ -278,7 +278,7 @@
|
|||
fail_on_error: true
|
||||
register: result
|
||||
|
||||
# mysqlclient 2.0.1 and pymysql 0.10.0+ always return "changed"
|
||||
# pymysql 0.10.0+ always returns "changed"
|
||||
- name: Assert that startreplica is not changed
|
||||
assert:
|
||||
that:
|
||||
|
@ -306,7 +306,7 @@
|
|||
timeout: 2
|
||||
|
||||
# Test stopreplica mode:
|
||||
# mysqlclient 2.0.1 and pymysql 0.10.0+ always return "changed"
|
||||
# pymysql 0.10.0+ always returns "changed"
|
||||
- name: Stop replica that is no longer running
|
||||
mysql_replication:
|
||||
<<: *mysql_params
|
||||
|
|
|
@ -60,13 +60,6 @@
|
|||
when:
|
||||
- connector_name == 'pymysql'
|
||||
|
||||
- name: Assert that result is success for mysqlclient
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is succeeded
|
||||
when:
|
||||
- connector_name != 'pymysql'
|
||||
|
||||
- name: attempt connection with newly created user ignoring hostname
|
||||
community.mysql.mysql_variables:
|
||||
variable: '{{ set_name }}'
|
||||
|
|
|
@ -184,16 +184,6 @@
|
|||
register: oor_result
|
||||
ignore_errors: true
|
||||
|
||||
- include_tasks: assert_var.yml
|
||||
vars:
|
||||
changed: true
|
||||
output: "{{ oor_result }}"
|
||||
var_name: max_connect_errors
|
||||
var_value: 1
|
||||
when:
|
||||
- connector_name == 'mysqlclient'
|
||||
- db_engine == 'mysql' # mysqlclient returns "changed" with MariaDB
|
||||
|
||||
- include_tasks: assert_fail_msg.yml
|
||||
vars:
|
||||
output: "{{ oor_result }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue