From 7348dca2290237be29b66fa3f96eb4c2216289f4 Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Wed, 4 Dec 2024 17:55:48 -0500 Subject: [PATCH 1/6] bump leo local mysql from 5.7 to 8.4 --- .github/workflows/unit_test.yml | 2 +- docker/run-mysql.sh | 4 ++-- .../leonardo/liquibase/changesets/20170811_label.xml | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index 44581a85125..2c97abe6b73 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -21,7 +21,7 @@ jobs: services: mysql: - image: mysql:5.7 + image: mysql:8.4 env: MYSQL_ROOT_PASSWORD: leonardo-test MYSQL_USER: leonardo-test diff --git a/docker/run-mysql.sh b/docker/run-mysql.sh index ae5d11308b1..4d268d8bd13 100755 --- a/docker/run-mysql.sh +++ b/docker/run-mysql.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# The CloudSQL console simply states "MySQL 5.7" so we may not match the minor version number -MYSQL_VERSION=5.7 +# The CloudSQL console simply states "MySQL 8.4" so we may not match the minor version number +MYSQL_VERSION=8.4 start() { echo "attempting to remove old $CONTAINER container..." diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_label.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_label.xml index 7fc63823529..2590074f6a5 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_label.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_label.xml @@ -1,6 +1,12 @@ + 8:1d8581dc0977ea88b1f006f6bc00f5b9 + + Mysql 8.4+ does not allow partial keys to be referenced for a foreign key anymore, see https://bugs.mysql.com/bug.php?id=114838. + This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the flag did not need to be set because the default was OFF. + + SET restrict_fk_on_non_standard_key = OFF; From c8bb4381c118144618d841c6932958842ea6e7f6 Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Tue, 10 Dec 2024 16:02:24 -0500 Subject: [PATCH 2/6] try to switch default format of bigger tables to dynamic --- .../workbench/leonardo/liquibase/changesets/20170811_cluster.xml | 1 + .../changesets/20200427_create_persistent_disk_table.xml | 1 + .../leonardo/liquibase/changesets/20200501_kubernetes_tables.xml | 1 + .../liquibase/changesets/20200520_kubernetes_refactor.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml index d8b3aabe75f..f8a7e731864 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml @@ -1,6 +1,7 @@ + SET innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml index 8ad6bca4f6c..6535c96b86b 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml @@ -6,6 +6,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was not set. + SET innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml index 1c5ed3cf766..fb975122ca9 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml @@ -7,6 +7,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. + SET innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml index f8522bbc9b5..ea2d4bf1865 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml @@ -24,6 +24,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. + SET innodb_default_row_format=DYNAMIC; From 22324e298c3fb522fdc29acee4b1ad2116808dc2 Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Tue, 10 Dec 2024 16:19:59 -0500 Subject: [PATCH 3/6] make variable global --- .../leonardo/liquibase/changesets/20170811_cluster.xml | 2 +- .../changesets/20200427_create_persistent_disk_table.xml | 2 +- .../liquibase/changesets/20200501_kubernetes_tables.xml | 2 +- .../liquibase/changesets/20200520_kubernetes_refactor.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml index f8a7e731864..f3460d97d50 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml @@ -1,7 +1,7 @@ - SET innodb_default_row_format=DYNAMIC; + SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml index 6535c96b86b..1b28a805239 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml @@ -6,7 +6,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was not set. - SET innodb_default_row_format=DYNAMIC; + SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml index fb975122ca9..518a14efe92 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml @@ -7,7 +7,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. - SET innodb_default_row_format=DYNAMIC; + SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml index ea2d4bf1865..89745f1c1c0 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml @@ -24,7 +24,7 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. - SET innodb_default_row_format=DYNAMIC; + SET GLOBAL innodb_default_row_format=DYNAMIC; From e0913259a63f06ec1d75018310ccf5f26b7f3c8a Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Tue, 10 Dec 2024 16:50:32 -0500 Subject: [PATCH 4/6] change some varchar to TEXT --- .../dsde/workbench/leonardo/liquibase/changelog.xml | 1 + .../leonardo/liquibase/changesets/20170811_cluster.xml | 1 - .../changesets/20200427_create_persistent_disk_table.xml | 1 - .../liquibase/changesets/20200501_kubernetes_tables.xml | 1 - .../liquibase/changesets/20200520_kubernetes_refactor.xml | 1 - .../changesets/20241210_varchar_to_text_types.xml | 8 ++++++++ 6 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml index 17028065374..c1bab4dce20 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml @@ -118,4 +118,5 @@ + diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml index f3460d97d50..d8b3aabe75f 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170811_cluster.xml @@ -1,7 +1,6 @@ - SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml index 1b28a805239..8ad6bca4f6c 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200427_create_persistent_disk_table.xml @@ -6,7 +6,6 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was not set. - SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml index 518a14efe92..1c5ed3cf766 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200501_kubernetes_tables.xml @@ -7,7 +7,6 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. - SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml index 89745f1c1c0..f8522bbc9b5 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20200520_kubernetes_refactor.xml @@ -24,7 +24,6 @@ Mysql 5.7+ changed default time stamps. This changeSet has been modified to reflect that; the validCheckSum is the checksum from when the default was 0000-00-00 00:00:00.000000. - SET GLOBAL innodb_default_row_format=DYNAMIC; diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml new file mode 100644 index 00000000000..3b82e06b98b --- /dev/null +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 0e5ccfb7fca8de81a095f7b3127600aa048aad65 Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Tue, 10 Dec 2024 17:06:18 -0500 Subject: [PATCH 5/6] fix silly typo --- .../dsde/workbench/leonardo/liquibase/changelog.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml index c1bab4dce20..046c447a429 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml @@ -118,5 +118,5 @@ - + From 09695f856247596f32195bb98c420bbf0360a80b Mon Sep 17 00:00:00 2001 From: LizBaldo Date: Wed, 11 Dec 2024 13:30:23 -0500 Subject: [PATCH 6/6] revert type change --- .../dsde/workbench/leonardo/liquibase/changelog.xml | 1 - .../changesets/20241210_varchar_to_text_types.xml | 8 -------- 2 files changed, 9 deletions(-) delete mode 100644 http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml index 046c447a429..17028065374 100644 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml +++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changelog.xml @@ -118,5 +118,4 @@ - diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml deleted file mode 100644 index 3b82e06b98b..00000000000 --- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20241210_varchar_to_text_types.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file