Checklist:
[x] I've included the version.
[x] I've included reproduction steps.
[ ] I've included the workflow YAML.
Not necessary. Any workflow will trigger this.
What happened:
I'm trying to activate workflow archives. I've created a sql container, added a Secret to store credentials and fired it up. Now the workflow-controller pod crashes with this error (see below).
What you expected to happen:
The workflow should be archived normally.
How to reproduce it (as minimally and precisely as possible):
Use the mysql:5.6 docker container, out of the box, setting the env vars: MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE and MYSQL_ROOT_PASSWORD. Create a service that points to the pod, and finally, reference this in the workflow-controller-configmap, using mysql as an archive store.
Anything else we need to know?:
PostgreSQL works fine. Probably MySQL > 5.x works fine as well. I didn't test it though.
The MySQL syntax is wrong. It tries to:
alter table argo_archived_workflows rename column id to uid
but it should be:
alter table argo_archived_workflows change column id uid varchar(128)
(I'm not sure about the number within varchar() but it needs to be specified)
Environment:
$ argo version
argo: v2.7.0-rc2
BuildDate: 2020-03-23T17:54:38Z
GitCommit: 240d7ad9298c60a69d4ce056e3d83ef9283a83ec
GitTreeState: clean
GitTag: v2.7.0-rc2
GoVersion: go1.13.4
Compiler: gc
Platform: linux/amd64
$ kubectl version -o yaml
clientVersion:
buildDate: "2019-06-19T16:40:16Z"
compiler: gc
gitCommit: e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529
gitTreeState: clean
gitVersion: v1.15.0
goVersion: go1.12.5
major: "1"
minor: "15"
platform: linux/amd64
serverVersion:
buildDate: "2019-04-08T17:02:58Z"
compiler: gc
gitCommit: b7394102d6ef778017f2ca4046abbaa23b88c290
gitTreeState: clean
gitVersion: v1.14.1
goVersion: go1.12.1
major: "1"
minor: "14"
platform: linux/amd64
Logs
time="2020-04-06T07:24:03Z" level=info msg="Migrating database schema" clusterName=default dbType=mysql
time="2020-04-06T07:24:03Z" level=info msg="applying database change" change="alter table argo_archived_workflows rename column id to uid" changeSchemaVersion=10
time="2020-04-06T07:24:03Z" level=fatal msg="Failed to update config: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'column id to uid' at line 1"
Message from the maintainers:
If you are impacted by this bug please add a 馃憤 reaction to this issue! We often sort issues this way to know what to prioritize.
This could probably be best fixed by someone with MySQL knowledge.
Steps:
manifests/quick-start/mysql/mysql-deployment.yaml and change the image version.make start pf to update the test manifests. kubectl logs -l app=workflow-controller)persist/sqldb/migrate.go and fix the errors you find.@lkeijser - Unfortunately the minimal Mysql version we support is 5.7.8, because column type json was not supported until that version.
Most helpful comment
@lkeijser - Unfortunately the minimal Mysql version we support is
5.7.8, because column typejsonwas not supported until that version.