Skip to content

Commit

Permalink
Merge pull request #832 from liquibase/DAT-17726
Browse files Browse the repository at this point in the history
[DAT-17726] Update CockroachDB version
  • Loading branch information
vitaliimak authored Jul 2, 2024
2 parents 78abef8 + 8852a7f commit d85f032
Show file tree
Hide file tree
Showing 21 changed files with 111 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
description: Databases to start up. Comma separated list of "name"
required: true
default: "[\"mysql-5.6\",\"mysql-5.7\",\"mysql-8\",\"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\",\"mssql-2019\",\"mssql-2022\",\"crdb-20.2\",\"crdb-21.1\",\"crdb-21.2\",\"crdb-22.1\",\"percona-xtradb-cluster-5.7\",\"percona-xtradb-cluster-8.0\",
\"mariadb-10.7\",\"mssql-2017\",\"mssql-2019\",\"mssql-2022\",\"crdb-23.1\",\"crdb-23.2\",\"crdb-24.1\",\"percona-xtradb-cluster-5.7\",\"percona-xtradb-cluster-8.0\",
\"edb-edb-12\",\"edb-edb-13\",\"edb-edb-14\",\"db2-luw\",\"H2Database-2.2\",\"sqlite\",\"derby\",
\"firebird-3\",\"firebird-4\",\"hsqldb-2.4\",\"hsqldb-2.5\",\"diff\"]"

Expand All @@ -51,7 +51,7 @@ jobs:
liquibaseRepo: ${{ steps.configure-build.outputs.liquibaseRepo }}
databases: ${{ github.event.inputs.databases || '["mysql-5.6","mysql-5.7","mysql-8",
"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","mssql-2019","mssql-2022","crdb-20.2","crdb-21.1","crdb-21.2","crdb-22.1","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","crdb-23.1","crdb-23.2","crdb-24.1","percona-xtradb-cluster-5.7","percona-xtradb-cluster-8.0",
"edb-edb-12","edb-edb-13","edb-edb-14","db2-luw","H2Database-2.2","sqlite","derby","firebird-3","firebird-4",
"hsqldb-2.4","hsqldb-2.5","diff"]' }}
testClasses: ${{ 'AdvancedHarnessSuiteTest' }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ on:
"mssql-2019",
"mssql-2022",
"H2Database-2.2",
"crdb-20.2",
"crdb-21.1",
"crdb-21.2",
"crdb-22.1",
"crdb-23.1",
"crdb-23.2",
"crdb-24.1",
"edb-postgres-12",
"edb-postgres-13",
"edb-postgres-14",
Expand Down Expand Up @@ -113,7 +112,7 @@ jobs:
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",
"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","mssql-2019","mssql-2022","H2Database-2.2","crdb-20.2","crdb-21.1","crdb-21.2","crdb-22.1",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1",
"edb-postgres-12","edb-postgres-13","edb-postgres-14",
"edb-edb-12","edb-edb-13","edb-edb-14","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw"]' }}
testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| SQL Server | `2017`, `2019`, `2022` | Advanced |
| Percona XtraDB | `5.7`, `8.0` | Advanced |
| Oracle | `18.3.0, 18.4.0, 21.3.0` | Advanced |
| CockroachDB | `20.2, 21.1, 21.2, 22.1` | Advanced |
| CockroachDB | `23.1, 23.2, 24.1` | Advanced |
| EDB | `12, 13, 14` | Advanced |
| DB2 on z/OS | `11.1, 12` | BaseHarnessSuite |
| DB2 on Linux/Unix/Windows | `11.5.7` | Advanced |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "autoincrement_test"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"autoIncrementInformation": {
"incrementBy": "2\\!\\{java.math.BigInteger\\}",
"startWith": "100\\!\\{java.math.BigInteger\\}"
},
"name": "intColumn",
"nullable": false
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "autoincrement_test"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"autoIncrementInformation": {
"incrementBy": "2\\!\\{java.math.BigInteger\\}",
"startWith": "100\\!\\{java.math.BigInteger\\}"
},
"name": "intColumn",
"nullable": false
}
}
]
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 6 additions & 9 deletions src/test/resources/automation-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,14 @@ case $db in
"H2Database-2.2" )
test_command mvn -ntp -Dtest=$tc -DdbName=h2 test
;;
"crdb-20.2" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=20.2 test
"crdb-23.1" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=23.1 test
;;
"crdb-21.1" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=21.1 test
"crdb-23.2" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=23.2 test
;;
"crdb-21.2" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=21.2 test
;;
"crdb-22.1" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=22.1 test
"crdb-24.1" )
test_command mvn -ntp -Dtest=$tc -DdbName=cockroachdb -DdbVersion=24.1 test
;;
"edb-postgres-12" )
test_command mvn -ntp -Dtest=$tc -DdbName=edb-postgres -DdbVersion=12 test
Expand Down
20 changes: 19 additions & 1 deletion src/test/resources/docker/create-infra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,25 @@ case $db in
;;

# crdb also has an init container
"crdb-20.2"|"crdb-21.1"|"crdb-21.2"|"crdb-22.1")
"crdb-23.1")
docker compose up -d $db
sleep 20
docker compose up -d ${db}-init
docker compose logs $db
docker compose logs ${db}-init
exit 0
;;

"crdb-23.2")
docker compose up -d $db
sleep 20
docker compose up -d ${db}-init
docker compose logs $db
docker compose logs ${db}-init
exit 0
;;

"crdb-24.1")
docker compose up -d $db
sleep 20
docker compose up -d ${db}-init
Expand Down
67 changes: 23 additions & 44 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,95 +273,74 @@ services:
ports:
- "50000:50000"

crdb-20.2:
image: cockroachdb/cockroach:v20.2.19
crdb-23.1:
image: cockroachdb/cockroach:v23.1.12
command: start-single-node --insecure
expose:
- "8080"
- "26257"
ports:
- "26257:26257"
- "26261:26257"
- "8080:8080"
networks:
- roachnet
crdb-20.2-init:
image: cockroachdb/cockroach:v20.2.19
networks:
- roachnet
volumes:
- ./setup_db.sh:/setup_db.sh
entrypoint: "/bin/bash"
command: /setup_db.sh crdb-20.2
depends_on:
- crdb-20.2

crdb-21.1:
image: cockroachdb/cockroach:v21.1.16
command: start-single-node --insecure
expose:
- "8080"
- "26257"
ports:
- "26258:26257"
- "8081:8080"
networks:
- roachnet
crdb-21.1-init:
image: cockroachdb/cockroach:v21.1.16
crdb-23.1-init:
image: cockroachdb/cockroach:v23.1.12
networks:
- roachnet
volumes:
- ./setup_db.sh:/setup_db.sh
entrypoint: "/bin/bash"
command: /setup_db.sh crdb-21.1
command: /setup_db.sh crdb-23.1
depends_on:
- crdb-21.1
- crdb-23.1

crdb-21.2:
image: cockroachdb/cockroach:v21.2.7
crdb-23.2:
image: cockroachdb/cockroach:v23.2.6
command: start-single-node --insecure
expose:
- "8080"
- "26257"
ports:
- "26259:26257"
- "8082:8080"
- "26262:26257"
- "8081:8080"
networks:
- roachnet

crdb-21.2-init:
image: cockroachdb/cockroach:v21.2.7
crdb-23.2-init:
image: cockroachdb/cockroach:v23.2.6
networks:
- roachnet
volumes:
- ./setup_db.sh:/setup_db.sh
entrypoint: "/bin/bash"
command: /setup_db.sh crdb-21.2
command: /setup_db.sh crdb-23.2
depends_on:
- crdb-21.2
- crdb-23.2

crdb-22.1:
image: cockroachdb/cockroach-unstable:v22.1.0-beta.4
crdb-24.1:
image: cockroachdb/cockroach:v24.1.1
command: start-single-node --insecure
expose:
- "8080"
- "26257"
ports:
- "26260:26257"
- "8083:8080"
- "26263:26257"
- "8082:8080"
networks:
- roachnet

crdb-22.1-init:
image: cockroachdb/cockroach-unstable:v22.1.0-beta.4
crdb-24.1-init:
image: cockroachdb/cockroach:v24.1.1
networks:
- roachnet
volumes:
- ./setup_db.sh:/setup_db.sh
entrypoint: "/bin/bash"
command: /setup_db.sh crdb-22.1
command: /setup_db.sh crdb-24.1
depends_on:
- crdb-22.1
- crdb-24.1

# Titan (https://titan-data.io) is managing these images for our CI/CD process. If you want to run them locally you'll have to
# populate init script (hsqldb-init.sql) for this platform manually or install titan and pull image pre-populated with data
Expand Down
19 changes: 6 additions & 13 deletions src/test/resources/harness-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,22 @@ databasesUnderTest:

- name: cockroachdb
prefix: docker
version: 20.2
url: jdbc:postgresql://localhost:26257/lbcat
version: 23.1
url: jdbc:postgresql://localhost:26261/lbcat
username: lbuser
password:

- name: cockroachdb
prefix: docker
version: 21.1
url: jdbc:postgresql://localhost:26258/lbcat
version: 23.2
url: jdbc:postgresql://localhost:26262/lbcat
username: lbuser
password:

- name: cockroachdb
prefix: docker
version: 21.2
url: jdbc:postgresql://localhost:26259/lbcat
username: lbuser
password:

- name: cockroachdb
prefix: docker
version: 22.1
url: jdbc:postgresql://localhost:26260/lbcat
version: 24.1
url: jdbc:postgresql://localhost:26263/lbcat
username: lbuser
password:

Expand Down

0 comments on commit d85f032

Please sign in to comment.