From ecd397edf1440ce9805d6fab6bba54b6f784822d Mon Sep 17 00:00:00 2001
From: lmcnatt <85642387+lucymcnatt@users.noreply.github.com>
Date: Mon, 16 Sep 2024 11:26:12 -0400
Subject: [PATCH 1/4] [IA-4456] Update mysql to 5.7 for tests
---
.github/workflows/unit_test.yml | 2 +-
docker/run-mysql.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml
index a479154ca8f..c3e7fbd9054 100644
--- a/.github/workflows/unit_test.yml
+++ b/.github/workflows/unit_test.yml
@@ -21,7 +21,7 @@ jobs:
services:
mysql:
- image: mysql/mysql-server:5.6
+ image: mysql/mysql-server:5.7
env:
MYSQL_ROOT_PASSWORD: leonardo-test
MYSQL_USER: leonardo-test
diff --git a/docker/run-mysql.sh b/docker/run-mysql.sh
index 29d81d39f83..881141d2cc1 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.6" so we may not match the minor version number
-MYSQL_VERSION=5.6
+MYSQL_VERSION=5.7
start() {
echo "attempting to remove old $CONTAINER container..."
From 54a7fb338ad446501672ae8370c296ee530ace80 Mon Sep 17 00:00:00 2001
From: lmcnatt <85642387+lucymcnatt@users.noreply.github.com>
Date: Mon, 16 Sep 2024 11:27:56 -0400
Subject: [PATCH 2/4] todo
---
.../broadinstitute/dsde/workbench/leonardo/db/LeoProfile.scala | 2 +-
http/src/test/resources/reference.conf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/db/LeoProfile.scala b/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/db/LeoProfile.scala
index c79ab7c9e38..0a4a8f6479b 100644
--- a/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/db/LeoProfile.scala
+++ b/http/src/main/scala/org/broadinstitute/dsde/workbench/leonardo/db/LeoProfile.scala
@@ -120,7 +120,7 @@ private[leonardo] object LeoProfile extends MySQLProfile {
implicit val cloudServiceMappedColumnType: BaseColumnType[CloudService] =
MappedColumnType
.base[CloudService, String](_.asString, s => CloudService.withName(s))
- // mysql 5.6 doesns't support json. Hence writing properties field as string in json format
+ // TODO: change with mysql upgrade to 5.7 (mysql 5.6 doesn't support json. Hence writing properties field as string in json format)
implicit val mapMappedColumnType: BaseColumnType[Map[String, String]] =
MappedColumnType
.base[Map[String, String], String](
diff --git a/http/src/test/resources/reference.conf b/http/src/test/resources/reference.conf
index 2de180f239b..db059b77925 100644
--- a/http/src/test/resources/reference.conf
+++ b/http/src/test/resources/reference.conf
@@ -5,7 +5,7 @@
# -e MYSQL_USER=leonardo-test \
# -e MYSQL_PASSWORD=leonardo-test \
# -e MYSQL_DATABASE=leotestdb \
-# -d -p 3311:3306 mysql/mysql-server:5.6
+# -d -p 3311:3306 mysql/mysql-server:5.7
application {
leoGoogleProject = "leo-project"
From a931fecfb325945c7d122e0d896e83784f883677 Mon Sep 17 00:00:00 2001
From: lmcnatt <85642387+lucymcnatt@users.noreply.github.com>
Date: Wed, 18 Sep 2024 17:48:38 -0400
Subject: [PATCH 3/4] cant default to 0
---
docker/run-mysql.sh | 2 +-
.../changesets/20170901_cluster-createdDate-default.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docker/run-mysql.sh b/docker/run-mysql.sh
index 881141d2cc1..aeec2c72ced 100755
--- a/docker/run-mysql.sh
+++ b/docker/run-mysql.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-# The CloudSQL console simply states "MySQL 5.6" so we may not match the minor version number
+# The CloudSQL console simply states "MySQL 5.7" so we may not match the minor version number
MYSQL_VERSION=5.7
start() {
diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170901_cluster-createdDate-default.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170901_cluster-createdDate-default.xml
index b100269e07b..c46895b651a 100644
--- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170901_cluster-createdDate-default.xml
+++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20170901_cluster-createdDate-default.xml
@@ -2,6 +2,6 @@
ALTER TABLE CLUSTER
- CHANGE createdDate createdDate TIMESTAMP(6) NOT NULL DEFAULT 0
+ CHANGE createdDate createdDate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
\ No newline at end of file
From ac9ed9af6b80c018c29d4866572c129b2e94c5ab Mon Sep 17 00:00:00 2001
From: lmcnatt <85642387+lucymcnatt@users.noreply.github.com>
Date: Wed, 18 Sep 2024 22:40:14 -0400
Subject: [PATCH 4/4] get rid of fractional seconds
---
.../changesets/20171011_cluster_destroyedDate_not_null.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20171011_cluster_destroyedDate_not_null.xml b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20171011_cluster_destroyedDate_not_null.xml
index 928b9bd3850..8bfd5283be7 100644
--- a/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20171011_cluster_destroyedDate_not_null.xml
+++ b/http/src/main/resources/org/broadinstitute/dsde/workbench/leonardo/liquibase/changesets/20171011_cluster_destroyedDate_not_null.xml
@@ -3,11 +3,11 @@
\ No newline at end of file