From 92aaa0d5dc188638059fce126c41875ae75381d8 Mon Sep 17 00:00:00 2001 From: Pavlo Tytarchuk Date: Fri, 20 Dec 2024 13:10:40 +0100 Subject: [PATCH 1/3] DAT-14344. added initial setup for percona-mysql-8.4 --- .github/workflows/main.yml | 3 ++- src/test/resources/automation-runner.sh | 3 +++ src/test/resources/docker/create-infra.sh | 2 +- src/test/resources/docker/docker-compose.yml | 16 ++++++++++++++++ src/test/resources/harness-config.yml | 6 ++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ca038b0ff..9de4e8154 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,6 +59,7 @@ on: "mysql-8", "percona-xtradb-cluster-5.7", "percona-xtradb-cluster-8.0", + "percona-xtradb-cluster-8.4", "postgres-12", "postgres-13", "postgres-14", @@ -116,7 +117,7 @@ jobs: liquibaseBranch: ${{ steps.configure-build.outputs.liquibaseBranch }} liquibaseRepo: ${{ steps.configure-build.outputs.liquibaseRepo }} liquibaseSha: ${{ steps.configure-build.outputs.liquibaseSha }} - databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0", + databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0","percona-xtradb-cluster-8.4", "postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6", "mariadb-10.7","mssql-2017","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1", "edb-postgres-12","edb-postgres-13","edb-postgres-14","edb-postgres-15","edb-postgres-16", diff --git a/src/test/resources/automation-runner.sh b/src/test/resources/automation-runner.sh index d91890c1c..2a80ab32e 100755 --- a/src/test/resources/automation-runner.sh +++ b/src/test/resources/automation-runner.sh @@ -26,6 +26,9 @@ case $db in "percona-xtradb-cluster-8.0" ) test_command mvn -ntp -Dtest=$tc -DdbName=percona-xtradb-cluster -DdbVersion=8.0 test ;; + "percona-xtradb-cluster-8.4" ) + test_command mvn -ntp -Dtest=$tc -DdbName=percona-xtradb-cluster -DdbVersion=8.4 test + ;; "postgres-12" ) test_command mvn -ntp -Dtest=$tc -DdbName=postgresql -DdbVersion=12 test ;; diff --git a/src/test/resources/docker/create-infra.sh b/src/test/resources/docker/create-infra.sh index 5e2757445..6de0abb8e 100755 --- a/src/test/resources/docker/create-infra.sh +++ b/src/test/resources/docker/create-infra.sh @@ -7,7 +7,7 @@ db=$1 case $db in # percona xtradb cluster needs a bit more time to start - "percona-xtradb-cluster-5.7"|"percona-xtradb-cluster-8.0" ) + "percona-xtradb-cluster-5.7"|"percona-xtradb-cluster-8.0"|"percona-xtradb-cluster-8.4" ) docker compose up -d $db sleep 180 ;; diff --git a/src/test/resources/docker/docker-compose.yml b/src/test/resources/docker/docker-compose.yml index 8ca368c15..12bf00e07 100644 --- a/src/test/resources/docker/docker-compose.yml +++ b/src/test/resources/docker/docker-compose.yml @@ -76,6 +76,22 @@ services: volumes: - "./percona-xtradb-cluster-init.sql:/docker-entrypoint-initdb.d/percona-xtradb-cluster-init.sql" + percona-xtradb-cluster-8.4: + image: percona/percona-xtradb-cluster:8.4 + ports: + - "33072:3306" + networks: + - cluster1_net + restart: always + environment: + MYSQL_ROOT_PASSWORD: LbRootPass1 + MYSQL_DATABASE: lbcat + MYSQL_USER: lbuser + MYSQL_PASSWORD: LiquibasePass1 + CLUSTER_NAME: cluster1 + volumes: + - "./percona-xtradb-cluster-init.sql:/docker-entrypoint-initdb.d/percona-xtradb-cluster-init.sql" + postgres-12: image: postgres:12 ports: diff --git a/src/test/resources/harness-config.yml b/src/test/resources/harness-config.yml index 142864263..3575428bc 100644 --- a/src/test/resources/harness-config.yml +++ b/src/test/resources/harness-config.yml @@ -70,6 +70,12 @@ databasesUnderTest: username: lbuser password: LiquibasePass1 + - name: percona-xtradb-cluster + version: 8.4 + url: jdbc:mysql://localhost:33072/lbcat + username: lbuser + password: LiquibasePass1 + - name: mariadb prefix: docker version: 10.2 From b12af93d83647b66a7712d5f0e431a44f504eb57 Mon Sep 17 00:00:00 2001 From: Pavlo Tytarchuk Date: Fri, 20 Dec 2024 13:22:28 +0100 Subject: [PATCH 2/3] DAT-14344. fix for a failing test --- .../8.4/createFunction.xml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/createFunction.xml diff --git a/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/createFunction.xml b/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/createFunction.xml new file mode 100644 index 000000000..d84858d59 --- /dev/null +++ b/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/createFunction.xml @@ -0,0 +1,26 @@ + + + + SET GLOBAL log_bin_trust_function_creators = 1; + + + + CREATE FUNCTION test_function() + RETURNS VARCHAR(20) + BEGIN + RETURN 'Hello'; + END + + + + + + \ No newline at end of file From 43d5891fe8835ead4bb8b20ecb4cda558f0a3a29 Mon Sep 17 00:00:00 2001 From: Pavlo Tytarchuk Date: Fri, 20 Dec 2024 13:41:25 +0100 Subject: [PATCH 3/3] DAT-14344. #2 fix for a failing test --- .../8.4/dropFunction.xml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/dropFunction.xml diff --git a/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/dropFunction.xml b/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/dropFunction.xml new file mode 100644 index 000000000..a89e30de5 --- /dev/null +++ b/src/main/resources/liquibase/harness/change/changelogs/percona-xtradb-cluster/8.4/dropFunction.xml @@ -0,0 +1,28 @@ + + + + SET GLOBAL log_bin_trust_function_creators = 1; + + + + CREATE FUNCTION test_function() + RETURNS VARCHAR(20) + BEGIN + RETURN 'Hello'; + END + + + + + + + + \ No newline at end of file