Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IA-4456] Update mysql to 5.7 for tests #4783

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/run-mysql.sh
Original file line number Diff line number Diff line change
@@ -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
# The CloudSQL console simply states "MySQL 5.7" so we may not match the minor version number
MYSQL_VERSION=5.7
start() {

echo "attempting to remove old $CONTAINER container..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<databaseChangeLog logicalFilePath="leonardo" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet logicalFilePath="leonardo" author="kumra" id="cluster-createdDate-default">
<sql dbms="mysql">ALTER TABLE CLUSTER
CHANGE createdDate createdDate TIMESTAMP(6) NOT NULL DEFAULT 0</sql>
CHANGE createdDate createdDate TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)</sql>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<changeSet logicalFilePath="leonardo" author="vkumra" id="cluster_destroyeddate_not_null">
<addNotNullConstraint columnDataType="TIMESTAMP(6)"
columnName="destroyedDate"
defaultNullValue="1970-01-01 00:00:01.000000"
defaultNullValue="1970-01-01 00:00:01"
tableName="CLUSTER"/>
<addDefaultValue columnDataType="TIMESTAMP(6)"
columnName="destroyedDate"
defaultValue="1970-01-01 00:00:01.000000"
defaultValue="1970-01-01 00:00:01"
tableName="CLUSTER"/>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -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](
Expand Down
2 changes: 1 addition & 1 deletion http/src/test/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading